@unabridged/midwest 0.0.7 → 0.4.2
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/README.md +70 -15
- package/app/assets/icons/accessibility-outline.svg +1 -1
- package/app/assets/icons/accessibility-sharp.svg +1 -1
- package/app/assets/icons/accessibility.svg +1 -1
- package/app/assets/icons/add-circle-outline.svg +1 -1
- package/app/assets/icons/add-circle-sharp.svg +1 -1
- package/app/assets/icons/add-circle.svg +1 -1
- package/app/assets/icons/add-outline.svg +1 -1
- package/app/assets/icons/add-sharp.svg +1 -1
- package/app/assets/icons/add.svg +1 -1
- package/app/assets/icons/airplane-outline.svg +1 -1
- package/app/assets/icons/airplane-sharp.svg +1 -1
- package/app/assets/icons/airplane.svg +1 -1
- package/app/assets/icons/alarm-outline.svg +1 -1
- package/app/assets/icons/alarm-sharp.svg +1 -1
- package/app/assets/icons/alarm.svg +1 -1
- package/app/assets/icons/albums-outline.svg +1 -1
- package/app/assets/icons/albums-sharp.svg +1 -1
- package/app/assets/icons/albums.svg +1 -1
- package/app/assets/icons/alert-circle-outline.svg +1 -1
- package/app/assets/icons/alert-circle-sharp.svg +1 -1
- package/app/assets/icons/alert-circle.svg +1 -1
- package/app/assets/icons/alert-outline.svg +1 -1
- package/app/assets/icons/alert-sharp.svg +1 -1
- package/app/assets/icons/alert.svg +1 -1
- package/app/assets/icons/american-football-outline.svg +1 -1
- package/app/assets/icons/american-football-sharp.svg +1 -1
- package/app/assets/icons/american-football.svg +1 -1
- package/app/assets/icons/analytics-outline.svg +1 -1
- package/app/assets/icons/analytics-sharp.svg +1 -1
- package/app/assets/icons/analytics.svg +1 -1
- package/app/assets/icons/aperture-outline.svg +1 -1
- package/app/assets/icons/aperture-sharp.svg +1 -1
- package/app/assets/icons/aperture.svg +1 -1
- package/app/assets/icons/apps-outline.svg +1 -1
- package/app/assets/icons/apps-sharp.svg +1 -1
- package/app/assets/icons/apps.svg +1 -1
- package/app/assets/icons/archive-outline.svg +1 -1
- package/app/assets/icons/archive-sharp.svg +1 -1
- package/app/assets/icons/archive.svg +1 -1
- package/app/assets/icons/arrow-back-circle-outline.svg +1 -1
- package/app/assets/icons/arrow-back-circle-sharp.svg +1 -1
- package/app/assets/icons/arrow-back-circle.svg +1 -1
- package/app/assets/icons/arrow-back-outline.svg +1 -1
- package/app/assets/icons/arrow-back-sharp.svg +1 -1
- package/app/assets/icons/arrow-back.svg +1 -1
- package/app/assets/icons/arrow-down-circle-outline.svg +1 -1
- package/app/assets/icons/arrow-down-circle-sharp.svg +1 -1
- package/app/assets/icons/arrow-down-circle.svg +1 -1
- package/app/assets/icons/arrow-down-outline.svg +1 -1
- package/app/assets/icons/arrow-down-sharp.svg +1 -1
- package/app/assets/icons/arrow-down.svg +1 -1
- package/app/assets/icons/arrow-forward-circle-outline.svg +1 -1
- package/app/assets/icons/arrow-forward-circle-sharp.svg +1 -1
- package/app/assets/icons/arrow-forward-circle.svg +1 -1
- package/app/assets/icons/arrow-forward-outline.svg +1 -1
- package/app/assets/icons/arrow-forward-sharp.svg +1 -1
- package/app/assets/icons/arrow-forward.svg +1 -1
- package/app/assets/icons/arrow-redo-circle-outline.svg +1 -1
- package/app/assets/icons/arrow-redo-circle-sharp.svg +1 -1
- package/app/assets/icons/arrow-redo-circle.svg +1 -1
- package/app/assets/icons/arrow-redo-outline.svg +1 -1
- package/app/assets/icons/arrow-redo-sharp.svg +1 -1
- package/app/assets/icons/arrow-redo.svg +1 -1
- package/app/assets/icons/arrow-undo-circle-outline.svg +1 -1
- package/app/assets/icons/arrow-undo-circle-sharp.svg +1 -1
- package/app/assets/icons/arrow-undo-circle.svg +1 -1
- package/app/assets/icons/arrow-undo-outline.svg +1 -1
- package/app/assets/icons/arrow-undo-sharp.svg +1 -1
- package/app/assets/icons/arrow-undo.svg +1 -1
- package/app/assets/icons/arrow-up-circle-outline.svg +1 -1
- package/app/assets/icons/arrow-up-circle-sharp.svg +1 -1
- package/app/assets/icons/arrow-up-circle.svg +1 -1
- package/app/assets/icons/arrow-up-outline.svg +1 -1
- package/app/assets/icons/arrow-up-sharp.svg +1 -1
- package/app/assets/icons/arrow-up.svg +1 -1
- package/app/assets/icons/at-circle-outline.svg +1 -1
- package/app/assets/icons/at-circle-sharp.svg +1 -1
- package/app/assets/icons/at-circle.svg +1 -1
- package/app/assets/icons/at-outline.svg +1 -1
- package/app/assets/icons/at-sharp.svg +1 -1
- package/app/assets/icons/at.svg +1 -1
- package/app/assets/icons/attach-outline.svg +1 -1
- package/app/assets/icons/attach-sharp.svg +1 -1
- package/app/assets/icons/attach.svg +1 -1
- package/app/assets/icons/available-icons.yml +1 -0
- package/app/assets/icons/backspace-outline.svg +1 -1
- package/app/assets/icons/backspace-sharp.svg +1 -1
- package/app/assets/icons/backspace.svg +1 -1
- package/app/assets/icons/bag-add-outline.svg +1 -1
- package/app/assets/icons/bag-add-sharp.svg +1 -1
- package/app/assets/icons/bag-add.svg +1 -1
- package/app/assets/icons/bag-check-outline.svg +1 -1
- package/app/assets/icons/bag-check-sharp.svg +1 -1
- package/app/assets/icons/bag-check.svg +1 -1
- package/app/assets/icons/bag-handle-outline.svg +1 -1
- package/app/assets/icons/bag-handle-sharp.svg +1 -1
- package/app/assets/icons/bag-handle.svg +1 -1
- package/app/assets/icons/bag-outline.svg +1 -1
- package/app/assets/icons/bag-remove-outline.svg +1 -1
- package/app/assets/icons/bag-remove-sharp.svg +1 -1
- package/app/assets/icons/bag-remove.svg +1 -1
- package/app/assets/icons/bag-sharp.svg +1 -1
- package/app/assets/icons/bag.svg +1 -1
- package/app/assets/icons/balloon-outline.svg +1 -1
- package/app/assets/icons/balloon-sharp.svg +1 -1
- package/app/assets/icons/balloon.svg +1 -1
- package/app/assets/icons/ban-outline.svg +1 -1
- package/app/assets/icons/ban-sharp.svg +1 -1
- package/app/assets/icons/ban.svg +1 -1
- package/app/assets/icons/bandage-outline.svg +1 -1
- package/app/assets/icons/bandage-sharp.svg +1 -1
- package/app/assets/icons/bandage.svg +1 -1
- package/app/assets/icons/bar-chart-outline.svg +1 -1
- package/app/assets/icons/bar-chart-sharp.svg +1 -1
- package/app/assets/icons/bar-chart.svg +1 -1
- package/app/assets/icons/barbell-outline.svg +1 -1
- package/app/assets/icons/barbell-sharp.svg +1 -1
- package/app/assets/icons/barbell.svg +1 -1
- package/app/assets/icons/barcode-outline.svg +1 -1
- package/app/assets/icons/barcode-sharp.svg +1 -1
- package/app/assets/icons/barcode.svg +1 -1
- package/app/assets/icons/baseball-outline.svg +1 -1
- package/app/assets/icons/baseball-sharp.svg +1 -1
- package/app/assets/icons/baseball.svg +1 -1
- package/app/assets/icons/basket-outline.svg +1 -1
- package/app/assets/icons/basket-sharp.svg +1 -1
- package/app/assets/icons/basket.svg +1 -1
- package/app/assets/icons/basketball-outline.svg +1 -1
- package/app/assets/icons/basketball-sharp.svg +1 -1
- package/app/assets/icons/basketball.svg +1 -1
- package/app/assets/icons/battery-charging-outline.svg +1 -1
- package/app/assets/icons/battery-charging-sharp.svg +1 -1
- package/app/assets/icons/battery-charging.svg +1 -1
- package/app/assets/icons/battery-dead-outline.svg +1 -1
- package/app/assets/icons/battery-dead-sharp.svg +1 -1
- package/app/assets/icons/battery-dead.svg +1 -1
- package/app/assets/icons/battery-full-outline.svg +1 -1
- package/app/assets/icons/battery-full-sharp.svg +1 -1
- package/app/assets/icons/battery-full.svg +1 -1
- package/app/assets/icons/battery-half-outline.svg +1 -1
- package/app/assets/icons/battery-half-sharp.svg +1 -1
- package/app/assets/icons/battery-half.svg +1 -1
- package/app/assets/icons/beaker-outline.svg +1 -1
- package/app/assets/icons/beaker-sharp.svg +1 -1
- package/app/assets/icons/beaker.svg +1 -1
- package/app/assets/icons/bed-outline.svg +1 -1
- package/app/assets/icons/bed-sharp.svg +1 -1
- package/app/assets/icons/bed.svg +1 -1
- package/app/assets/icons/beer-outline.svg +1 -1
- package/app/assets/icons/beer-sharp.svg +1 -1
- package/app/assets/icons/beer.svg +1 -1
- package/app/assets/icons/bicycle-outline.svg +1 -1
- package/app/assets/icons/bicycle-sharp.svg +1 -1
- package/app/assets/icons/bicycle.svg +1 -1
- package/app/assets/icons/bluetooth-outline.svg +1 -1
- package/app/assets/icons/bluetooth-sharp.svg +1 -1
- package/app/assets/icons/bluetooth.svg +1 -1
- package/app/assets/icons/boat-outline.svg +1 -1
- package/app/assets/icons/boat-sharp.svg +1 -1
- package/app/assets/icons/boat.svg +1 -1
- package/app/assets/icons/body-outline.svg +1 -1
- package/app/assets/icons/body-sharp.svg +1 -1
- package/app/assets/icons/body.svg +1 -1
- package/app/assets/icons/bonfire-outline.svg +1 -1
- package/app/assets/icons/bonfire-sharp.svg +1 -1
- package/app/assets/icons/bonfire.svg +1 -1
- package/app/assets/icons/book-outline.svg +1 -1
- package/app/assets/icons/book-sharp.svg +1 -1
- package/app/assets/icons/book.svg +1 -1
- package/app/assets/icons/bookmark-outline.svg +1 -1
- package/app/assets/icons/bookmark-sharp.svg +1 -1
- package/app/assets/icons/bookmark.svg +1 -1
- package/app/assets/icons/bookmarks-outline.svg +1 -1
- package/app/assets/icons/bookmarks-sharp.svg +1 -1
- package/app/assets/icons/bookmarks.svg +1 -1
- package/app/assets/icons/bowling-ball-outline.svg +1 -1
- package/app/assets/icons/bowling-ball-sharp.svg +1 -1
- package/app/assets/icons/bowling-ball.svg +1 -1
- package/app/assets/icons/briefcase-outline.svg +1 -1
- package/app/assets/icons/briefcase-sharp.svg +1 -1
- package/app/assets/icons/briefcase.svg +1 -1
- package/app/assets/icons/browsers-outline.svg +1 -1
- package/app/assets/icons/browsers-sharp.svg +1 -1
- package/app/assets/icons/browsers.svg +1 -1
- package/app/assets/icons/brush-outline.svg +1 -1
- package/app/assets/icons/brush-sharp.svg +1 -1
- package/app/assets/icons/brush.svg +1 -1
- package/app/assets/icons/bug-outline.svg +1 -1
- package/app/assets/icons/bug-sharp.svg +1 -1
- package/app/assets/icons/bug.svg +1 -1
- package/app/assets/icons/build-outline.svg +1 -1
- package/app/assets/icons/build-sharp.svg +1 -1
- package/app/assets/icons/build.svg +1 -1
- package/app/assets/icons/bulb-outline.svg +1 -1
- package/app/assets/icons/bulb-sharp.svg +1 -1
- package/app/assets/icons/bulb.svg +1 -1
- package/app/assets/icons/bus-outline.svg +1 -1
- package/app/assets/icons/bus-sharp.svg +1 -1
- package/app/assets/icons/bus.svg +1 -1
- package/app/assets/icons/business-outline.svg +1 -1
- package/app/assets/icons/business-sharp.svg +1 -1
- package/app/assets/icons/business.svg +1 -1
- package/app/assets/icons/cafe-outline.svg +1 -1
- package/app/assets/icons/cafe-sharp.svg +1 -1
- package/app/assets/icons/cafe.svg +1 -1
- package/app/assets/icons/calculator-outline.svg +1 -1
- package/app/assets/icons/calculator-sharp.svg +1 -1
- package/app/assets/icons/calculator.svg +1 -1
- package/app/assets/icons/calendar-clear-outline.svg +1 -1
- package/app/assets/icons/calendar-clear-sharp.svg +1 -1
- package/app/assets/icons/calendar-clear.svg +1 -1
- package/app/assets/icons/calendar-number-outline.svg +1 -1
- package/app/assets/icons/calendar-number-sharp.svg +1 -1
- package/app/assets/icons/calendar-number.svg +1 -1
- package/app/assets/icons/calendar-outline.svg +1 -1
- package/app/assets/icons/calendar-sharp.svg +1 -1
- package/app/assets/icons/calendar.svg +1 -1
- package/app/assets/icons/call-outline.svg +1 -1
- package/app/assets/icons/call-sharp.svg +1 -1
- package/app/assets/icons/call.svg +1 -1
- package/app/assets/icons/camera-outline.svg +1 -1
- package/app/assets/icons/camera-reverse-outline.svg +1 -1
- package/app/assets/icons/camera-reverse-sharp.svg +1 -1
- package/app/assets/icons/camera-reverse.svg +1 -1
- package/app/assets/icons/camera-sharp.svg +1 -1
- package/app/assets/icons/camera.svg +1 -1
- package/app/assets/icons/car-outline.svg +1 -1
- package/app/assets/icons/car-sharp.svg +1 -1
- package/app/assets/icons/car-sport-outline.svg +1 -1
- package/app/assets/icons/car-sport-sharp.svg +1 -1
- package/app/assets/icons/car-sport.svg +1 -1
- package/app/assets/icons/car.svg +1 -1
- package/app/assets/icons/card-outline.svg +1 -1
- package/app/assets/icons/card-sharp.svg +1 -1
- package/app/assets/icons/card.svg +1 -1
- package/app/assets/icons/caret-back-circle-outline.svg +1 -1
- package/app/assets/icons/caret-back-circle-sharp.svg +1 -1
- package/app/assets/icons/caret-back-circle.svg +1 -1
- package/app/assets/icons/caret-back-outline.svg +1 -1
- package/app/assets/icons/caret-back-sharp.svg +1 -1
- package/app/assets/icons/caret-back.svg +1 -1
- package/app/assets/icons/caret-down-circle-outline.svg +1 -1
- package/app/assets/icons/caret-down-circle-sharp.svg +1 -1
- package/app/assets/icons/caret-down-circle.svg +1 -1
- package/app/assets/icons/caret-down-outline.svg +1 -1
- package/app/assets/icons/caret-down-sharp.svg +1 -1
- package/app/assets/icons/caret-down.svg +1 -1
- package/app/assets/icons/caret-forward-circle-outline.svg +1 -1
- package/app/assets/icons/caret-forward-circle-sharp.svg +1 -1
- package/app/assets/icons/caret-forward-circle.svg +1 -1
- package/app/assets/icons/caret-forward-outline.svg +1 -1
- package/app/assets/icons/caret-forward-sharp.svg +1 -1
- package/app/assets/icons/caret-forward.svg +1 -1
- package/app/assets/icons/caret-up-circle-outline.svg +1 -1
- package/app/assets/icons/caret-up-circle-sharp.svg +1 -1
- package/app/assets/icons/caret-up-circle.svg +1 -1
- package/app/assets/icons/caret-up-outline.svg +1 -1
- package/app/assets/icons/caret-up-sharp.svg +1 -1
- package/app/assets/icons/caret-up.svg +1 -1
- package/app/assets/icons/cart-outline.svg +1 -1
- package/app/assets/icons/cart-sharp.svg +1 -1
- package/app/assets/icons/cart.svg +1 -1
- package/app/assets/icons/cash-outline.svg +1 -1
- package/app/assets/icons/cash-sharp.svg +1 -1
- package/app/assets/icons/cash.svg +1 -1
- package/app/assets/icons/cellular-outline.svg +1 -1
- package/app/assets/icons/cellular-sharp.svg +1 -1
- package/app/assets/icons/cellular.svg +1 -1
- package/app/assets/icons/chatbox-ellipses-outline.svg +1 -1
- package/app/assets/icons/chatbox-ellipses-sharp.svg +1 -1
- package/app/assets/icons/chatbox-ellipses.svg +1 -1
- package/app/assets/icons/chatbox-outline.svg +1 -1
- package/app/assets/icons/chatbox-sharp.svg +1 -1
- package/app/assets/icons/chatbox.svg +1 -1
- package/app/assets/icons/chatbubble-ellipses-outline.svg +1 -1
- package/app/assets/icons/chatbubble-ellipses-sharp.svg +1 -1
- package/app/assets/icons/chatbubble-ellipses.svg +1 -1
- package/app/assets/icons/chatbubble-outline.svg +1 -1
- package/app/assets/icons/chatbubble-sharp.svg +1 -1
- package/app/assets/icons/chatbubble.svg +1 -1
- package/app/assets/icons/chatbubbles-outline.svg +1 -1
- package/app/assets/icons/chatbubbles-sharp.svg +1 -1
- package/app/assets/icons/chatbubbles.svg +1 -1
- package/app/assets/icons/checkbox-outline.svg +1 -1
- package/app/assets/icons/checkbox-sharp.svg +1 -1
- package/app/assets/icons/checkbox.svg +1 -1
- package/app/assets/icons/checkmark-circle-outline.svg +1 -1
- package/app/assets/icons/checkmark-circle-sharp.svg +1 -1
- package/app/assets/icons/checkmark-circle.svg +1 -1
- package/app/assets/icons/checkmark-done-circle-outline.svg +1 -1
- package/app/assets/icons/checkmark-done-circle-sharp.svg +1 -1
- package/app/assets/icons/checkmark-done-circle.svg +1 -1
- package/app/assets/icons/checkmark-done-outline.svg +1 -1
- package/app/assets/icons/checkmark-done-sharp.svg +1 -1
- package/app/assets/icons/checkmark-done.svg +1 -1
- package/app/assets/icons/checkmark-outline.svg +1 -1
- package/app/assets/icons/checkmark-sharp.svg +1 -1
- package/app/assets/icons/checkmark.svg +1 -1
- package/app/assets/icons/chevron-back-circle-outline.svg +1 -1
- package/app/assets/icons/chevron-back-circle-sharp.svg +1 -1
- package/app/assets/icons/chevron-back-circle.svg +1 -1
- package/app/assets/icons/chevron-back-outline.svg +1 -1
- package/app/assets/icons/chevron-back-sharp.svg +1 -1
- package/app/assets/icons/chevron-back.svg +1 -1
- package/app/assets/icons/chevron-down-circle-outline.svg +1 -1
- package/app/assets/icons/chevron-down-circle-sharp.svg +1 -1
- package/app/assets/icons/chevron-down-circle.svg +1 -1
- package/app/assets/icons/chevron-down-outline.svg +1 -1
- package/app/assets/icons/chevron-down-sharp.svg +1 -1
- package/app/assets/icons/chevron-down.svg +1 -1
- package/app/assets/icons/chevron-forward-circle-outline.svg +1 -1
- package/app/assets/icons/chevron-forward-circle-sharp.svg +1 -1
- package/app/assets/icons/chevron-forward-circle.svg +1 -1
- package/app/assets/icons/chevron-forward-outline.svg +1 -1
- package/app/assets/icons/chevron-forward-sharp.svg +1 -1
- package/app/assets/icons/chevron-forward.svg +1 -1
- package/app/assets/icons/chevron-up-circle-outline.svg +1 -1
- package/app/assets/icons/chevron-up-circle-sharp.svg +1 -1
- package/app/assets/icons/chevron-up-circle.svg +1 -1
- package/app/assets/icons/chevron-up-outline.svg +1 -1
- package/app/assets/icons/chevron-up-sharp.svg +1 -1
- package/app/assets/icons/chevron-up.svg +1 -1
- package/app/assets/icons/clipboard-outline.svg +1 -1
- package/app/assets/icons/clipboard-sharp.svg +1 -1
- package/app/assets/icons/clipboard.svg +1 -1
- package/app/assets/icons/close-circle-outline.svg +1 -1
- package/app/assets/icons/close-circle-sharp.svg +1 -1
- package/app/assets/icons/close-circle.svg +1 -1
- package/app/assets/icons/close-outline.svg +1 -1
- package/app/assets/icons/close-sharp.svg +1 -1
- package/app/assets/icons/close.svg +1 -1
- package/app/assets/icons/cloud-circle-outline.svg +1 -1
- package/app/assets/icons/cloud-circle-sharp.svg +1 -1
- package/app/assets/icons/cloud-circle.svg +1 -1
- package/app/assets/icons/cloud-done-outline.svg +1 -1
- package/app/assets/icons/cloud-done-sharp.svg +1 -1
- package/app/assets/icons/cloud-done.svg +1 -1
- package/app/assets/icons/cloud-download-outline.svg +1 -1
- package/app/assets/icons/cloud-download-sharp.svg +1 -1
- package/app/assets/icons/cloud-download.svg +1 -1
- package/app/assets/icons/cloud-offline-outline.svg +1 -1
- package/app/assets/icons/cloud-offline-sharp.svg +1 -1
- package/app/assets/icons/cloud-offline.svg +1 -1
- package/app/assets/icons/cloud-outline.svg +1 -1
- package/app/assets/icons/cloud-sharp.svg +1 -1
- package/app/assets/icons/cloud-upload-outline.svg +1 -1
- package/app/assets/icons/cloud-upload-sharp.svg +1 -1
- package/app/assets/icons/cloud-upload.svg +1 -1
- package/app/assets/icons/cloud.svg +1 -1
- package/app/assets/icons/cloudy-night-outline.svg +1 -1
- package/app/assets/icons/cloudy-night-sharp.svg +1 -1
- package/app/assets/icons/cloudy-night.svg +1 -1
- package/app/assets/icons/cloudy-outline.svg +1 -1
- package/app/assets/icons/cloudy-sharp.svg +1 -1
- package/app/assets/icons/cloudy.svg +1 -1
- package/app/assets/icons/code-download-outline.svg +1 -1
- package/app/assets/icons/code-download-sharp.svg +1 -1
- package/app/assets/icons/code-download.svg +1 -1
- package/app/assets/icons/code-outline.svg +1 -1
- package/app/assets/icons/code-sharp.svg +1 -1
- package/app/assets/icons/code-slash-outline.svg +1 -1
- package/app/assets/icons/code-slash-sharp.svg +1 -1
- package/app/assets/icons/code-slash.svg +1 -1
- package/app/assets/icons/code-working-outline.svg +1 -1
- package/app/assets/icons/code-working-sharp.svg +1 -1
- package/app/assets/icons/code-working.svg +1 -1
- package/app/assets/icons/code.svg +1 -1
- package/app/assets/icons/cog-outline.svg +1 -1
- package/app/assets/icons/cog-sharp.svg +1 -1
- package/app/assets/icons/cog.svg +1 -1
- package/app/assets/icons/color-fill-outline.svg +1 -1
- package/app/assets/icons/color-fill-sharp.svg +1 -1
- package/app/assets/icons/color-fill.svg +1 -1
- package/app/assets/icons/color-filter-outline.svg +1 -1
- package/app/assets/icons/color-filter-sharp.svg +1 -1
- package/app/assets/icons/color-filter.svg +1 -1
- package/app/assets/icons/color-palette-outline.svg +1 -1
- package/app/assets/icons/color-palette-sharp.svg +1 -1
- package/app/assets/icons/color-palette.svg +1 -1
- package/app/assets/icons/color-wand-outline.svg +1 -1
- package/app/assets/icons/color-wand-sharp.svg +1 -1
- package/app/assets/icons/color-wand.svg +1 -1
- package/app/assets/icons/compass-outline.svg +1 -1
- package/app/assets/icons/compass-sharp.svg +1 -1
- package/app/assets/icons/compass.svg +1 -1
- package/app/assets/icons/construct-outline.svg +1 -1
- package/app/assets/icons/construct-sharp.svg +1 -1
- package/app/assets/icons/construct.svg +1 -1
- package/app/assets/icons/contract-outline.svg +1 -1
- package/app/assets/icons/contract-sharp.svg +1 -1
- package/app/assets/icons/contract.svg +1 -1
- package/app/assets/icons/contrast-outline.svg +1 -1
- package/app/assets/icons/contrast-sharp.svg +1 -1
- package/app/assets/icons/contrast.svg +1 -1
- package/app/assets/icons/copy-outline.svg +1 -1
- package/app/assets/icons/copy-sharp.svg +1 -1
- package/app/assets/icons/copy.svg +1 -1
- package/app/assets/icons/create-outline.svg +1 -1
- package/app/assets/icons/create-sharp.svg +1 -1
- package/app/assets/icons/create.svg +1 -1
- package/app/assets/icons/crop-outline.svg +1 -1
- package/app/assets/icons/crop-sharp.svg +1 -1
- package/app/assets/icons/crop.svg +1 -1
- package/app/assets/icons/cube-outline.svg +1 -1
- package/app/assets/icons/cube-sharp.svg +1 -1
- package/app/assets/icons/cube.svg +1 -1
- package/app/assets/icons/cut-outline.svg +1 -1
- package/app/assets/icons/cut-sharp.svg +1 -1
- package/app/assets/icons/cut.svg +1 -1
- package/app/assets/icons/desktop-outline.svg +1 -1
- package/app/assets/icons/desktop-sharp.svg +1 -1
- package/app/assets/icons/desktop.svg +1 -1
- package/app/assets/icons/diamond-outline.svg +1 -1
- package/app/assets/icons/diamond-sharp.svg +1 -1
- package/app/assets/icons/diamond.svg +1 -1
- package/app/assets/icons/dice-outline.svg +1 -1
- package/app/assets/icons/dice-sharp.svg +1 -1
- package/app/assets/icons/dice.svg +1 -1
- package/app/assets/icons/disc-outline.svg +1 -1
- package/app/assets/icons/disc-sharp.svg +1 -1
- package/app/assets/icons/disc.svg +1 -1
- package/app/assets/icons/document-attach-outline.svg +1 -1
- package/app/assets/icons/document-attach-sharp.svg +1 -1
- package/app/assets/icons/document-attach.svg +1 -1
- package/app/assets/icons/document-lock-outline.svg +1 -1
- package/app/assets/icons/document-lock-sharp.svg +1 -1
- package/app/assets/icons/document-lock.svg +1 -1
- package/app/assets/icons/document-outline.svg +1 -1
- package/app/assets/icons/document-sharp.svg +1 -1
- package/app/assets/icons/document-text-outline.svg +1 -1
- package/app/assets/icons/document-text-sharp.svg +1 -1
- package/app/assets/icons/document-text.svg +1 -1
- package/app/assets/icons/document.svg +1 -1
- package/app/assets/icons/documents-outline.svg +1 -1
- package/app/assets/icons/documents-sharp.svg +1 -1
- package/app/assets/icons/documents.svg +1 -1
- package/app/assets/icons/download-outline.svg +1 -1
- package/app/assets/icons/download-sharp.svg +1 -1
- package/app/assets/icons/download.svg +1 -1
- package/app/assets/icons/duplicate-outline.svg +1 -1
- package/app/assets/icons/duplicate-sharp.svg +1 -1
- package/app/assets/icons/duplicate.svg +1 -1
- package/app/assets/icons/ear-outline.svg +1 -1
- package/app/assets/icons/ear-sharp.svg +1 -1
- package/app/assets/icons/ear.svg +1 -1
- package/app/assets/icons/earth-outline.svg +1 -1
- package/app/assets/icons/earth-sharp.svg +1 -1
- package/app/assets/icons/earth.svg +1 -1
- package/app/assets/icons/easel-outline.svg +1 -1
- package/app/assets/icons/easel-sharp.svg +1 -1
- package/app/assets/icons/easel.svg +1 -1
- package/app/assets/icons/egg-outline.svg +1 -1
- package/app/assets/icons/egg-sharp.svg +1 -1
- package/app/assets/icons/egg.svg +1 -1
- package/app/assets/icons/ellipse-outline.svg +1 -1
- package/app/assets/icons/ellipse-sharp.svg +1 -1
- package/app/assets/icons/ellipse.svg +1 -1
- package/app/assets/icons/ellipsis-horizontal-circle-outline.svg +1 -1
- package/app/assets/icons/ellipsis-horizontal-circle-sharp.svg +1 -1
- package/app/assets/icons/ellipsis-horizontal-circle.svg +1 -1
- package/app/assets/icons/ellipsis-horizontal-outline.svg +1 -1
- package/app/assets/icons/ellipsis-horizontal-sharp.svg +1 -1
- package/app/assets/icons/ellipsis-horizontal.svg +1 -1
- package/app/assets/icons/ellipsis-vertical-circle-outline.svg +1 -1
- package/app/assets/icons/ellipsis-vertical-circle-sharp.svg +1 -1
- package/app/assets/icons/ellipsis-vertical-circle.svg +1 -1
- package/app/assets/icons/ellipsis-vertical-outline.svg +1 -1
- package/app/assets/icons/ellipsis-vertical-sharp.svg +1 -1
- package/app/assets/icons/ellipsis-vertical.svg +1 -1
- package/app/assets/icons/enter-outline.svg +1 -1
- package/app/assets/icons/enter-sharp.svg +1 -1
- package/app/assets/icons/enter.svg +1 -1
- package/app/assets/icons/exit-outline.svg +1 -1
- package/app/assets/icons/exit-sharp.svg +1 -1
- package/app/assets/icons/exit.svg +1 -1
- package/app/assets/icons/expand-outline.svg +1 -1
- package/app/assets/icons/expand-sharp.svg +1 -1
- package/app/assets/icons/expand.svg +1 -1
- package/app/assets/icons/extension-puzzle-outline.svg +1 -1
- package/app/assets/icons/extension-puzzle-sharp.svg +1 -1
- package/app/assets/icons/extension-puzzle.svg +1 -1
- package/app/assets/icons/eye-off-outline.svg +1 -1
- package/app/assets/icons/eye-off-sharp.svg +1 -1
- package/app/assets/icons/eye-off.svg +1 -1
- package/app/assets/icons/eye-outline.svg +1 -1
- package/app/assets/icons/eye-sharp.svg +1 -1
- package/app/assets/icons/eye.svg +1 -1
- package/app/assets/icons/eyedrop-outline.svg +1 -1
- package/app/assets/icons/eyedrop-sharp.svg +1 -1
- package/app/assets/icons/eyedrop.svg +1 -1
- package/app/assets/icons/fast-food-outline.svg +1 -1
- package/app/assets/icons/fast-food-sharp.svg +1 -1
- package/app/assets/icons/fast-food.svg +1 -1
- package/app/assets/icons/female-outline.svg +1 -1
- package/app/assets/icons/female-sharp.svg +1 -1
- package/app/assets/icons/female.svg +1 -1
- package/app/assets/icons/file-tray-full-outline.svg +1 -1
- package/app/assets/icons/file-tray-full-sharp.svg +1 -1
- package/app/assets/icons/file-tray-full.svg +1 -1
- package/app/assets/icons/file-tray-outline.svg +1 -1
- package/app/assets/icons/file-tray-sharp.svg +1 -1
- package/app/assets/icons/file-tray-stacked-outline.svg +1 -1
- package/app/assets/icons/file-tray-stacked-sharp.svg +1 -1
- package/app/assets/icons/file-tray-stacked.svg +1 -1
- package/app/assets/icons/file-tray.svg +1 -1
- package/app/assets/icons/film-outline.svg +1 -1
- package/app/assets/icons/film-sharp.svg +1 -1
- package/app/assets/icons/film.svg +1 -1
- package/app/assets/icons/filter-circle-outline.svg +1 -1
- package/app/assets/icons/filter-circle-sharp.svg +1 -1
- package/app/assets/icons/filter-circle.svg +1 -1
- package/app/assets/icons/filter-outline.svg +1 -1
- package/app/assets/icons/filter-sharp.svg +1 -1
- package/app/assets/icons/filter.svg +1 -1
- package/app/assets/icons/finger-print-outline.svg +1 -1
- package/app/assets/icons/finger-print-sharp.svg +1 -1
- package/app/assets/icons/finger-print.svg +1 -1
- package/app/assets/icons/fish-outline.svg +1 -1
- package/app/assets/icons/fish-sharp.svg +1 -1
- package/app/assets/icons/fish.svg +1 -1
- package/app/assets/icons/fitness-outline.svg +1 -1
- package/app/assets/icons/fitness-sharp.svg +1 -1
- package/app/assets/icons/fitness.svg +1 -1
- package/app/assets/icons/flag-outline.svg +1 -1
- package/app/assets/icons/flag-sharp.svg +1 -1
- package/app/assets/icons/flag.svg +1 -1
- package/app/assets/icons/flame-outline.svg +1 -1
- package/app/assets/icons/flame-sharp.svg +1 -1
- package/app/assets/icons/flame.svg +1 -1
- package/app/assets/icons/flash-off-outline.svg +1 -1
- package/app/assets/icons/flash-off-sharp.svg +1 -1
- package/app/assets/icons/flash-off.svg +1 -1
- package/app/assets/icons/flash-outline.svg +1 -1
- package/app/assets/icons/flash-sharp.svg +1 -1
- package/app/assets/icons/flash.svg +1 -1
- package/app/assets/icons/flashlight-outline.svg +1 -1
- package/app/assets/icons/flashlight-sharp.svg +1 -1
- package/app/assets/icons/flashlight.svg +1 -1
- package/app/assets/icons/flask-outline.svg +1 -1
- package/app/assets/icons/flask-sharp.svg +1 -1
- package/app/assets/icons/flask.svg +1 -1
- package/app/assets/icons/flower-outline.svg +1 -1
- package/app/assets/icons/flower-sharp.svg +1 -1
- package/app/assets/icons/flower.svg +1 -1
- package/app/assets/icons/folder-open-outline.svg +1 -1
- package/app/assets/icons/folder-open-sharp.svg +1 -1
- package/app/assets/icons/folder-open.svg +1 -1
- package/app/assets/icons/folder-outline.svg +1 -1
- package/app/assets/icons/folder-sharp.svg +1 -1
- package/app/assets/icons/folder.svg +1 -1
- package/app/assets/icons/football-outline.svg +1 -1
- package/app/assets/icons/football-sharp.svg +1 -1
- package/app/assets/icons/football.svg +1 -1
- package/app/assets/icons/footsteps-outline.svg +1 -1
- package/app/assets/icons/footsteps-sharp.svg +1 -1
- package/app/assets/icons/footsteps.svg +1 -1
- package/app/assets/icons/funnel-outline.svg +1 -1
- package/app/assets/icons/funnel-sharp.svg +1 -1
- package/app/assets/icons/funnel.svg +1 -1
- package/app/assets/icons/game-controller-outline.svg +1 -1
- package/app/assets/icons/game-controller-sharp.svg +1 -1
- package/app/assets/icons/game-controller.svg +1 -1
- package/app/assets/icons/gift-outline.svg +1 -1
- package/app/assets/icons/gift-sharp.svg +1 -1
- package/app/assets/icons/gift.svg +1 -1
- package/app/assets/icons/git-branch-outline.svg +1 -1
- package/app/assets/icons/git-branch-sharp.svg +1 -1
- package/app/assets/icons/git-branch.svg +1 -1
- package/app/assets/icons/git-commit-outline.svg +1 -1
- package/app/assets/icons/git-commit-sharp.svg +1 -1
- package/app/assets/icons/git-commit.svg +1 -1
- package/app/assets/icons/git-compare-outline.svg +1 -1
- package/app/assets/icons/git-compare-sharp.svg +1 -1
- package/app/assets/icons/git-compare.svg +1 -1
- package/app/assets/icons/git-merge-outline.svg +1 -1
- package/app/assets/icons/git-merge-sharp.svg +1 -1
- package/app/assets/icons/git-merge.svg +1 -1
- package/app/assets/icons/git-network-outline.svg +1 -1
- package/app/assets/icons/git-network-sharp.svg +1 -1
- package/app/assets/icons/git-network.svg +1 -1
- package/app/assets/icons/git-pull-request-outline.svg +1 -1
- package/app/assets/icons/git-pull-request-sharp.svg +1 -1
- package/app/assets/icons/git-pull-request.svg +1 -1
- package/app/assets/icons/glasses-outline.svg +1 -1
- package/app/assets/icons/glasses-sharp.svg +1 -1
- package/app/assets/icons/glasses.svg +1 -1
- package/app/assets/icons/globe-outline.svg +1 -1
- package/app/assets/icons/globe-sharp.svg +1 -1
- package/app/assets/icons/globe.svg +1 -1
- package/app/assets/icons/golf-outline.svg +1 -1
- package/app/assets/icons/golf-sharp.svg +1 -1
- package/app/assets/icons/golf.svg +1 -1
- package/app/assets/icons/grid-outline.svg +1 -1
- package/app/assets/icons/grid-sharp.svg +1 -1
- package/app/assets/icons/grid.svg +1 -1
- package/app/assets/icons/hammer-outline.svg +1 -1
- package/app/assets/icons/hammer-sharp.svg +1 -1
- package/app/assets/icons/hammer.svg +1 -1
- package/app/assets/icons/hand-left-outline.svg +1 -1
- package/app/assets/icons/hand-left-sharp.svg +1 -1
- package/app/assets/icons/hand-left.svg +1 -1
- package/app/assets/icons/hand-right-outline.svg +1 -1
- package/app/assets/icons/hand-right-sharp.svg +1 -1
- package/app/assets/icons/hand-right.svg +1 -1
- package/app/assets/icons/happy-outline.svg +1 -1
- package/app/assets/icons/happy-sharp.svg +1 -1
- package/app/assets/icons/happy.svg +1 -1
- package/app/assets/icons/hardware-chip-outline.svg +1 -1
- package/app/assets/icons/hardware-chip-sharp.svg +1 -1
- package/app/assets/icons/hardware-chip.svg +1 -1
- package/app/assets/icons/headset-outline.svg +1 -1
- package/app/assets/icons/headset-sharp.svg +1 -1
- package/app/assets/icons/headset.svg +1 -1
- package/app/assets/icons/heart-circle-outline.svg +1 -1
- package/app/assets/icons/heart-circle-sharp.svg +1 -1
- package/app/assets/icons/heart-circle.svg +1 -1
- package/app/assets/icons/heart-dislike-circle-outline.svg +1 -1
- package/app/assets/icons/heart-dislike-circle-sharp.svg +1 -1
- package/app/assets/icons/heart-dislike-circle.svg +1 -1
- package/app/assets/icons/heart-dislike-outline.svg +1 -1
- package/app/assets/icons/heart-dislike-sharp.svg +1 -1
- package/app/assets/icons/heart-dislike.svg +1 -1
- package/app/assets/icons/heart-half-outline.svg +1 -1
- package/app/assets/icons/heart-half-sharp.svg +1 -1
- package/app/assets/icons/heart-half.svg +1 -1
- package/app/assets/icons/heart-outline.svg +1 -1
- package/app/assets/icons/heart-sharp.svg +1 -1
- package/app/assets/icons/heart.svg +1 -1
- package/app/assets/icons/help-buoy-outline.svg +1 -1
- package/app/assets/icons/help-buoy-sharp.svg +1 -1
- package/app/assets/icons/help-buoy.svg +1 -1
- package/app/assets/icons/help-circle-outline.svg +1 -1
- package/app/assets/icons/help-circle-sharp.svg +1 -1
- package/app/assets/icons/help-circle.svg +1 -1
- package/app/assets/icons/help-outline.svg +1 -1
- package/app/assets/icons/help-sharp.svg +1 -1
- package/app/assets/icons/help.svg +1 -1
- package/app/assets/icons/home-outline.svg +1 -1
- package/app/assets/icons/home-sharp.svg +1 -1
- package/app/assets/icons/home.svg +1 -1
- package/app/assets/icons/hourglass-outline.svg +1 -1
- package/app/assets/icons/hourglass-sharp.svg +1 -1
- package/app/assets/icons/hourglass.svg +1 -1
- package/app/assets/icons/ice-cream-outline.svg +1 -1
- package/app/assets/icons/ice-cream-sharp.svg +1 -1
- package/app/assets/icons/ice-cream.svg +1 -1
- package/app/assets/icons/id-card-outline.svg +1 -1
- package/app/assets/icons/id-card-sharp.svg +1 -1
- package/app/assets/icons/id-card.svg +1 -1
- package/app/assets/icons/image-outline.svg +1 -1
- package/app/assets/icons/image-sharp.svg +1 -1
- package/app/assets/icons/image.svg +1 -1
- package/app/assets/icons/images-outline.svg +1 -1
- package/app/assets/icons/images-sharp.svg +1 -1
- package/app/assets/icons/images.svg +1 -1
- package/app/assets/icons/infinite-outline.svg +1 -1
- package/app/assets/icons/infinite-sharp.svg +1 -1
- package/app/assets/icons/infinite.svg +1 -1
- package/app/assets/icons/information-circle-outline.svg +1 -1
- package/app/assets/icons/information-circle-sharp.svg +1 -1
- package/app/assets/icons/information-circle.svg +1 -1
- package/app/assets/icons/information-outline.svg +1 -1
- package/app/assets/icons/information-sharp.svg +1 -1
- package/app/assets/icons/information.svg +1 -1
- package/app/assets/icons/invert-mode-outline.svg +1 -1
- package/app/assets/icons/invert-mode-sharp.svg +1 -1
- package/app/assets/icons/invert-mode.svg +1 -1
- package/app/assets/icons/journal-outline.svg +1 -1
- package/app/assets/icons/journal-sharp.svg +1 -1
- package/app/assets/icons/journal.svg +1 -1
- package/app/assets/icons/key-outline.svg +1 -1
- package/app/assets/icons/key-sharp.svg +1 -1
- package/app/assets/icons/key.svg +1 -1
- package/app/assets/icons/keypad-outline.svg +1 -1
- package/app/assets/icons/keypad-sharp.svg +1 -1
- package/app/assets/icons/keypad.svg +1 -1
- package/app/assets/icons/language-outline.svg +1 -1
- package/app/assets/icons/language-sharp.svg +1 -1
- package/app/assets/icons/language.svg +1 -1
- package/app/assets/icons/laptop-outline.svg +1 -1
- package/app/assets/icons/laptop-sharp.svg +1 -1
- package/app/assets/icons/laptop.svg +1 -1
- package/app/assets/icons/layers-outline.svg +1 -1
- package/app/assets/icons/layers-sharp.svg +1 -1
- package/app/assets/icons/layers.svg +1 -1
- package/app/assets/icons/leaf-outline.svg +1 -1
- package/app/assets/icons/leaf-sharp.svg +1 -1
- package/app/assets/icons/leaf.svg +1 -1
- package/app/assets/icons/library-outline.svg +1 -1
- package/app/assets/icons/library-sharp.svg +1 -1
- package/app/assets/icons/library.svg +1 -1
- package/app/assets/icons/link-outline.svg +1 -1
- package/app/assets/icons/link-sharp.svg +1 -1
- package/app/assets/icons/link.svg +1 -1
- package/app/assets/icons/list-circle-outline.svg +1 -1
- package/app/assets/icons/list-circle-sharp.svg +1 -1
- package/app/assets/icons/list-circle.svg +1 -1
- package/app/assets/icons/list-outline.svg +1 -1
- package/app/assets/icons/list-sharp.svg +1 -1
- package/app/assets/icons/list.svg +1 -1
- package/app/assets/icons/locate-outline.svg +1 -1
- package/app/assets/icons/locate-sharp.svg +1 -1
- package/app/assets/icons/locate.svg +1 -1
- package/app/assets/icons/location-outline.svg +1 -1
- package/app/assets/icons/location-sharp.svg +1 -1
- package/app/assets/icons/location.svg +1 -1
- package/app/assets/icons/lock-closed-outline.svg +1 -1
- package/app/assets/icons/lock-closed-sharp.svg +1 -1
- package/app/assets/icons/lock-closed.svg +1 -1
- package/app/assets/icons/lock-open-outline.svg +1 -1
- package/app/assets/icons/lock-open-sharp.svg +1 -1
- package/app/assets/icons/lock-open.svg +1 -1
- package/app/assets/icons/log-in-outline.svg +1 -1
- package/app/assets/icons/log-in-sharp.svg +1 -1
- package/app/assets/icons/log-in.svg +1 -1
- package/app/assets/icons/log-out-outline.svg +1 -1
- package/app/assets/icons/log-out-sharp.svg +1 -1
- package/app/assets/icons/log-out.svg +1 -1
- package/app/assets/icons/logo-alipay.svg +1 -1
- package/app/assets/icons/logo-amazon.svg +1 -1
- package/app/assets/icons/logo-amplify.svg +1 -1
- package/app/assets/icons/logo-android.svg +1 -1
- package/app/assets/icons/logo-angular.svg +1 -1
- package/app/assets/icons/logo-apple-appstore.svg +1 -1
- package/app/assets/icons/logo-apple-ar.svg +1 -1
- package/app/assets/icons/logo-apple.svg +1 -1
- package/app/assets/icons/logo-behance.svg +1 -1
- package/app/assets/icons/logo-bitbucket.svg +1 -1
- package/app/assets/icons/logo-bitcoin.svg +1 -1
- package/app/assets/icons/logo-buffer.svg +1 -1
- package/app/assets/icons/logo-capacitor.svg +1 -1
- package/app/assets/icons/logo-chrome.svg +1 -1
- package/app/assets/icons/logo-closed-captioning.svg +1 -1
- package/app/assets/icons/logo-codepen.svg +1 -1
- package/app/assets/icons/logo-css3.svg +1 -1
- package/app/assets/icons/logo-designernews.svg +1 -1
- package/app/assets/icons/logo-deviantart.svg +1 -1
- package/app/assets/icons/logo-discord.svg +1 -1
- package/app/assets/icons/logo-docker.svg +1 -1
- package/app/assets/icons/logo-dribbble.svg +1 -1
- package/app/assets/icons/logo-dropbox.svg +1 -1
- package/app/assets/icons/logo-edge.svg +1 -1
- package/app/assets/icons/logo-electron.svg +1 -1
- package/app/assets/icons/logo-euro.svg +1 -1
- package/app/assets/icons/logo-facebook.svg +1 -1
- package/app/assets/icons/logo-figma.svg +1 -1
- package/app/assets/icons/logo-firebase.svg +1 -1
- package/app/assets/icons/logo-firefox.svg +1 -1
- package/app/assets/icons/logo-flickr.svg +1 -1
- package/app/assets/icons/logo-foursquare.svg +1 -1
- package/app/assets/icons/logo-github.svg +1 -1
- package/app/assets/icons/logo-gitlab.svg +1 -1
- package/app/assets/icons/logo-google-playstore.svg +1 -1
- package/app/assets/icons/logo-google.svg +1 -1
- package/app/assets/icons/logo-hackernews.svg +1 -1
- package/app/assets/icons/logo-html5.svg +1 -1
- package/app/assets/icons/logo-instagram.svg +1 -1
- package/app/assets/icons/logo-ionic.svg +1 -1
- package/app/assets/icons/logo-ionitron.svg +1 -1
- package/app/assets/icons/logo-javascript.svg +1 -1
- package/app/assets/icons/logo-laravel.svg +1 -1
- package/app/assets/icons/logo-linkedin.svg +1 -1
- package/app/assets/icons/logo-markdown.svg +1 -1
- package/app/assets/icons/logo-mastodon.svg +1 -1
- package/app/assets/icons/logo-medium.svg +1 -1
- package/app/assets/icons/logo-microsoft.svg +1 -1
- package/app/assets/icons/logo-no-smoking.svg +1 -1
- package/app/assets/icons/logo-nodejs.svg +1 -1
- package/app/assets/icons/logo-npm.svg +1 -1
- package/app/assets/icons/logo-octocat.svg +1 -1
- package/app/assets/icons/logo-paypal.svg +1 -1
- package/app/assets/icons/logo-pinterest.svg +1 -1
- package/app/assets/icons/logo-playstation.svg +1 -1
- package/app/assets/icons/logo-pwa.svg +1 -1
- package/app/assets/icons/logo-python.svg +1 -1
- package/app/assets/icons/logo-react.svg +1 -1
- package/app/assets/icons/logo-reddit.svg +1 -1
- package/app/assets/icons/logo-rss.svg +1 -1
- package/app/assets/icons/logo-sass.svg +1 -1
- package/app/assets/icons/logo-skype.svg +1 -1
- package/app/assets/icons/logo-slack.svg +1 -1
- package/app/assets/icons/logo-snapchat.svg +1 -1
- package/app/assets/icons/logo-soundcloud.svg +1 -1
- package/app/assets/icons/logo-stackoverflow.svg +1 -1
- package/app/assets/icons/logo-steam.svg +1 -1
- package/app/assets/icons/logo-stencil.svg +1 -1
- package/app/assets/icons/logo-tableau.svg +1 -1
- package/app/assets/icons/logo-tiktok.svg +1 -1
- package/app/assets/icons/logo-tumblr.svg +1 -1
- package/app/assets/icons/logo-tux.svg +1 -1
- package/app/assets/icons/logo-twitch.svg +1 -1
- package/app/assets/icons/logo-twitter.svg +1 -1
- package/app/assets/icons/logo-usd.svg +1 -1
- package/app/assets/icons/logo-venmo.svg +1 -1
- package/app/assets/icons/logo-vercel.svg +1 -1
- package/app/assets/icons/logo-vimeo.svg +1 -1
- package/app/assets/icons/logo-vk.svg +1 -1
- package/app/assets/icons/logo-vue.svg +1 -1
- package/app/assets/icons/logo-web-component.svg +1 -1
- package/app/assets/icons/logo-wechat.svg +1 -1
- package/app/assets/icons/logo-whatsapp.svg +1 -1
- package/app/assets/icons/logo-windows.svg +1 -1
- package/app/assets/icons/logo-wordpress.svg +1 -1
- package/app/assets/icons/logo-xbox.svg +1 -1
- package/app/assets/icons/logo-xing.svg +1 -1
- package/app/assets/icons/logo-yahoo.svg +1 -1
- package/app/assets/icons/logo-yen.svg +1 -1
- package/app/assets/icons/logo-youtube.svg +1 -1
- package/app/assets/icons/magnet-outline.svg +1 -1
- package/app/assets/icons/magnet-sharp.svg +1 -1
- package/app/assets/icons/magnet.svg +1 -1
- package/app/assets/icons/mail-open-outline.svg +1 -1
- package/app/assets/icons/mail-open-sharp.svg +1 -1
- package/app/assets/icons/mail-open.svg +1 -1
- package/app/assets/icons/mail-outline.svg +1 -1
- package/app/assets/icons/mail-sharp.svg +1 -1
- package/app/assets/icons/mail-unread-outline.svg +1 -1
- package/app/assets/icons/mail-unread-sharp.svg +1 -1
- package/app/assets/icons/mail-unread.svg +1 -1
- package/app/assets/icons/mail.svg +1 -1
- package/app/assets/icons/male-female-outline.svg +1 -1
- package/app/assets/icons/male-female-sharp.svg +1 -1
- package/app/assets/icons/male-female.svg +1 -1
- package/app/assets/icons/male-outline.svg +1 -1
- package/app/assets/icons/male-sharp.svg +1 -1
- package/app/assets/icons/male.svg +1 -1
- package/app/assets/icons/man-outline.svg +1 -1
- package/app/assets/icons/man-sharp.svg +1 -1
- package/app/assets/icons/man.svg +1 -1
- package/app/assets/icons/map-outline.svg +1 -1
- package/app/assets/icons/map-sharp.svg +1 -1
- package/app/assets/icons/map.svg +1 -1
- package/app/assets/icons/medal-outline.svg +1 -1
- package/app/assets/icons/medal-sharp.svg +1 -1
- package/app/assets/icons/medal.svg +1 -1
- package/app/assets/icons/medical-outline.svg +1 -1
- package/app/assets/icons/medical-sharp.svg +1 -1
- package/app/assets/icons/medical.svg +1 -1
- package/app/assets/icons/medkit-outline.svg +1 -1
- package/app/assets/icons/medkit-sharp.svg +1 -1
- package/app/assets/icons/medkit.svg +1 -1
- package/app/assets/icons/megaphone-outline.svg +1 -1
- package/app/assets/icons/megaphone-sharp.svg +1 -1
- package/app/assets/icons/megaphone.svg +1 -1
- package/app/assets/icons/menu-outline.svg +1 -1
- package/app/assets/icons/menu-sharp.svg +1 -1
- package/app/assets/icons/menu.svg +1 -1
- package/app/assets/icons/mic-circle-outline.svg +1 -1
- package/app/assets/icons/mic-circle-sharp.svg +1 -1
- package/app/assets/icons/mic-circle.svg +1 -1
- package/app/assets/icons/mic-off-circle-outline.svg +1 -1
- package/app/assets/icons/mic-off-circle-sharp.svg +1 -1
- package/app/assets/icons/mic-off-circle.svg +1 -1
- package/app/assets/icons/mic-off-outline.svg +1 -1
- package/app/assets/icons/mic-off-sharp.svg +1 -1
- package/app/assets/icons/mic-off.svg +1 -1
- package/app/assets/icons/mic-outline.svg +1 -1
- package/app/assets/icons/mic-sharp.svg +1 -1
- package/app/assets/icons/mic.svg +1 -1
- package/app/assets/icons/moon-outline.svg +1 -1
- package/app/assets/icons/moon-sharp.svg +1 -1
- package/app/assets/icons/moon.svg +1 -1
- package/app/assets/icons/move-outline.svg +1 -1
- package/app/assets/icons/move-sharp.svg +1 -1
- package/app/assets/icons/move.svg +1 -1
- package/app/assets/icons/musical-note-outline.svg +1 -1
- package/app/assets/icons/musical-note-sharp.svg +1 -1
- package/app/assets/icons/musical-note.svg +1 -1
- package/app/assets/icons/musical-notes-outline.svg +1 -1
- package/app/assets/icons/musical-notes-sharp.svg +1 -1
- package/app/assets/icons/musical-notes.svg +1 -1
- package/app/assets/icons/navigate-circle-outline.svg +1 -1
- package/app/assets/icons/navigate-circle-sharp.svg +1 -1
- package/app/assets/icons/navigate-circle.svg +1 -1
- package/app/assets/icons/navigate-outline.svg +1 -1
- package/app/assets/icons/navigate-sharp.svg +1 -1
- package/app/assets/icons/navigate.svg +1 -1
- package/app/assets/icons/newspaper-outline.svg +1 -1
- package/app/assets/icons/newspaper-sharp.svg +1 -1
- package/app/assets/icons/newspaper.svg +1 -1
- package/app/assets/icons/notifications-circle-outline.svg +1 -1
- package/app/assets/icons/notifications-circle-sharp.svg +1 -1
- package/app/assets/icons/notifications-circle.svg +1 -1
- package/app/assets/icons/notifications-off-circle-outline.svg +1 -1
- package/app/assets/icons/notifications-off-circle-sharp.svg +1 -1
- package/app/assets/icons/notifications-off-circle.svg +1 -1
- package/app/assets/icons/notifications-off-outline.svg +1 -1
- package/app/assets/icons/notifications-off-sharp.svg +1 -1
- package/app/assets/icons/notifications-off.svg +1 -1
- package/app/assets/icons/notifications-outline.svg +1 -1
- package/app/assets/icons/notifications-sharp.svg +1 -1
- package/app/assets/icons/notifications.svg +1 -1
- package/app/assets/icons/nuclear-outline.svg +1 -1
- package/app/assets/icons/nuclear-sharp.svg +1 -1
- package/app/assets/icons/nuclear.svg +1 -1
- package/app/assets/icons/nutrition-outline.svg +1 -1
- package/app/assets/icons/nutrition-sharp.svg +1 -1
- package/app/assets/icons/nutrition.svg +1 -1
- package/app/assets/icons/open-outline.svg +1 -1
- package/app/assets/icons/open-sharp.svg +1 -1
- package/app/assets/icons/open.svg +1 -1
- package/app/assets/icons/options-outline.svg +1 -1
- package/app/assets/icons/options-sharp.svg +1 -1
- package/app/assets/icons/options.svg +1 -1
- package/app/assets/icons/paper-plane-outline.svg +1 -1
- package/app/assets/icons/paper-plane-sharp.svg +1 -1
- package/app/assets/icons/paper-plane.svg +1 -1
- package/app/assets/icons/partly-sunny-outline.svg +1 -1
- package/app/assets/icons/partly-sunny-sharp.svg +1 -1
- package/app/assets/icons/partly-sunny.svg +1 -1
- package/app/assets/icons/pause-circle-outline.svg +1 -1
- package/app/assets/icons/pause-circle-sharp.svg +1 -1
- package/app/assets/icons/pause-circle.svg +1 -1
- package/app/assets/icons/pause-outline.svg +1 -1
- package/app/assets/icons/pause-sharp.svg +1 -1
- package/app/assets/icons/pause.svg +1 -1
- package/app/assets/icons/paw-outline.svg +1 -1
- package/app/assets/icons/paw-sharp.svg +1 -1
- package/app/assets/icons/paw.svg +1 -1
- package/app/assets/icons/pencil-outline.svg +1 -1
- package/app/assets/icons/pencil-sharp.svg +1 -1
- package/app/assets/icons/pencil.svg +1 -1
- package/app/assets/icons/people-circle-outline.svg +1 -1
- package/app/assets/icons/people-circle-sharp.svg +1 -1
- package/app/assets/icons/people-circle.svg +1 -1
- package/app/assets/icons/people-outline.svg +1 -1
- package/app/assets/icons/people-sharp.svg +1 -1
- package/app/assets/icons/people.svg +1 -1
- package/app/assets/icons/person-add-outline.svg +1 -1
- package/app/assets/icons/person-add-sharp.svg +1 -1
- package/app/assets/icons/person-add.svg +1 -1
- package/app/assets/icons/person-circle-outline.svg +1 -1
- package/app/assets/icons/person-circle-sharp.svg +1 -1
- package/app/assets/icons/person-circle.svg +1 -1
- package/app/assets/icons/person-outline.svg +1 -1
- package/app/assets/icons/person-remove-outline.svg +1 -1
- package/app/assets/icons/person-remove-sharp.svg +1 -1
- package/app/assets/icons/person-remove.svg +1 -1
- package/app/assets/icons/person-sharp.svg +1 -1
- package/app/assets/icons/person.svg +1 -1
- package/app/assets/icons/phone-landscape-outline.svg +1 -1
- package/app/assets/icons/phone-landscape-sharp.svg +1 -1
- package/app/assets/icons/phone-landscape.svg +1 -1
- package/app/assets/icons/phone-portrait-outline.svg +1 -1
- package/app/assets/icons/phone-portrait-sharp.svg +1 -1
- package/app/assets/icons/phone-portrait.svg +1 -1
- package/app/assets/icons/pie-chart-outline.svg +1 -1
- package/app/assets/icons/pie-chart-sharp.svg +1 -1
- package/app/assets/icons/pie-chart.svg +1 -1
- package/app/assets/icons/pin-outline.svg +1 -1
- package/app/assets/icons/pin-sharp.svg +1 -1
- package/app/assets/icons/pin.svg +1 -1
- package/app/assets/icons/pint-outline.svg +1 -1
- package/app/assets/icons/pint-sharp.svg +1 -1
- package/app/assets/icons/pint.svg +1 -1
- package/app/assets/icons/pizza-outline.svg +1 -1
- package/app/assets/icons/pizza-sharp.svg +1 -1
- package/app/assets/icons/pizza.svg +1 -1
- package/app/assets/icons/planet-outline.svg +1 -1
- package/app/assets/icons/planet-sharp.svg +1 -1
- package/app/assets/icons/planet.svg +1 -1
- package/app/assets/icons/play-back-circle-outline.svg +1 -1
- package/app/assets/icons/play-back-circle-sharp.svg +1 -1
- package/app/assets/icons/play-back-circle.svg +1 -1
- package/app/assets/icons/play-back-outline.svg +1 -1
- package/app/assets/icons/play-back-sharp.svg +1 -1
- package/app/assets/icons/play-back.svg +1 -1
- package/app/assets/icons/play-circle-outline.svg +1 -1
- package/app/assets/icons/play-circle-sharp.svg +1 -1
- package/app/assets/icons/play-circle.svg +1 -1
- package/app/assets/icons/play-forward-circle-outline.svg +1 -1
- package/app/assets/icons/play-forward-circle-sharp.svg +1 -1
- package/app/assets/icons/play-forward-circle.svg +1 -1
- package/app/assets/icons/play-forward-outline.svg +1 -1
- package/app/assets/icons/play-forward-sharp.svg +1 -1
- package/app/assets/icons/play-forward.svg +1 -1
- package/app/assets/icons/play-outline.svg +1 -1
- package/app/assets/icons/play-sharp.svg +1 -1
- package/app/assets/icons/play-skip-back-circle-outline.svg +1 -1
- package/app/assets/icons/play-skip-back-circle-sharp.svg +1 -1
- package/app/assets/icons/play-skip-back-circle.svg +1 -1
- package/app/assets/icons/play-skip-back-outline.svg +1 -1
- package/app/assets/icons/play-skip-back-sharp.svg +1 -1
- package/app/assets/icons/play-skip-back.svg +1 -1
- package/app/assets/icons/play-skip-forward-circle-outline.svg +1 -1
- package/app/assets/icons/play-skip-forward-circle-sharp.svg +1 -1
- package/app/assets/icons/play-skip-forward-circle.svg +1 -1
- package/app/assets/icons/play-skip-forward-outline.svg +1 -1
- package/app/assets/icons/play-skip-forward-sharp.svg +1 -1
- package/app/assets/icons/play-skip-forward.svg +1 -1
- package/app/assets/icons/play.svg +1 -1
- package/app/assets/icons/podium-outline.svg +1 -1
- package/app/assets/icons/podium-sharp.svg +1 -1
- package/app/assets/icons/podium.svg +1 -1
- package/app/assets/icons/power-outline.svg +1 -1
- package/app/assets/icons/power-sharp.svg +1 -1
- package/app/assets/icons/power.svg +1 -1
- package/app/assets/icons/pricetag-outline.svg +1 -1
- package/app/assets/icons/pricetag-sharp.svg +1 -1
- package/app/assets/icons/pricetag.svg +1 -1
- package/app/assets/icons/pricetags-outline.svg +1 -1
- package/app/assets/icons/pricetags-sharp.svg +1 -1
- package/app/assets/icons/pricetags.svg +1 -1
- package/app/assets/icons/print-outline.svg +1 -1
- package/app/assets/icons/print-sharp.svg +1 -1
- package/app/assets/icons/print.svg +1 -1
- package/app/assets/icons/prism-outline.svg +1 -1
- package/app/assets/icons/prism-sharp.svg +1 -1
- package/app/assets/icons/prism.svg +1 -1
- package/app/assets/icons/pulse-outline.svg +1 -1
- package/app/assets/icons/pulse-sharp.svg +1 -1
- package/app/assets/icons/pulse.svg +1 -1
- package/app/assets/icons/push-outline.svg +1 -1
- package/app/assets/icons/push-sharp.svg +1 -1
- package/app/assets/icons/push.svg +1 -1
- package/app/assets/icons/qr-code-outline.svg +1 -1
- package/app/assets/icons/qr-code-sharp.svg +1 -1
- package/app/assets/icons/qr-code.svg +1 -1
- package/app/assets/icons/radio-button-off-outline.svg +1 -1
- package/app/assets/icons/radio-button-off-sharp.svg +1 -1
- package/app/assets/icons/radio-button-off.svg +1 -1
- package/app/assets/icons/radio-button-on-outline.svg +1 -1
- package/app/assets/icons/radio-button-on-sharp.svg +1 -1
- package/app/assets/icons/radio-button-on.svg +1 -1
- package/app/assets/icons/radio-outline.svg +1 -1
- package/app/assets/icons/radio-sharp.svg +1 -1
- package/app/assets/icons/radio.svg +1 -1
- package/app/assets/icons/rainy-outline.svg +1 -1
- package/app/assets/icons/rainy-sharp.svg +1 -1
- package/app/assets/icons/rainy.svg +1 -1
- package/app/assets/icons/reader-outline.svg +1 -1
- package/app/assets/icons/reader-sharp.svg +1 -1
- package/app/assets/icons/reader.svg +1 -1
- package/app/assets/icons/receipt-outline.svg +1 -1
- package/app/assets/icons/receipt-sharp.svg +1 -1
- package/app/assets/icons/receipt.svg +1 -1
- package/app/assets/icons/recording-outline.svg +1 -1
- package/app/assets/icons/recording-sharp.svg +1 -1
- package/app/assets/icons/recording.svg +1 -1
- package/app/assets/icons/refresh-circle-outline.svg +1 -1
- package/app/assets/icons/refresh-circle-sharp.svg +1 -1
- package/app/assets/icons/refresh-circle.svg +1 -1
- package/app/assets/icons/refresh-outline.svg +1 -1
- package/app/assets/icons/refresh-sharp.svg +1 -1
- package/app/assets/icons/refresh.svg +1 -1
- package/app/assets/icons/reload-circle-outline.svg +1 -1
- package/app/assets/icons/reload-circle-sharp.svg +1 -1
- package/app/assets/icons/reload-circle.svg +1 -1
- package/app/assets/icons/reload-outline.svg +1 -1
- package/app/assets/icons/reload-sharp.svg +1 -1
- package/app/assets/icons/reload.svg +1 -1
- package/app/assets/icons/remove-circle-outline.svg +1 -1
- package/app/assets/icons/remove-circle-sharp.svg +1 -1
- package/app/assets/icons/remove-circle.svg +1 -1
- package/app/assets/icons/remove-outline.svg +1 -1
- package/app/assets/icons/remove-sharp.svg +1 -1
- package/app/assets/icons/remove.svg +1 -1
- package/app/assets/icons/reorder-four-outline.svg +1 -1
- package/app/assets/icons/reorder-four-sharp.svg +1 -1
- package/app/assets/icons/reorder-four.svg +1 -1
- package/app/assets/icons/reorder-three-outline.svg +1 -1
- package/app/assets/icons/reorder-three-sharp.svg +1 -1
- package/app/assets/icons/reorder-three.svg +1 -1
- package/app/assets/icons/reorder-two-outline.svg +1 -1
- package/app/assets/icons/reorder-two-sharp.svg +1 -1
- package/app/assets/icons/reorder-two.svg +1 -1
- package/app/assets/icons/repeat-outline.svg +1 -1
- package/app/assets/icons/repeat-sharp.svg +1 -1
- package/app/assets/icons/repeat.svg +1 -1
- package/app/assets/icons/resize-outline.svg +1 -1
- package/app/assets/icons/resize-sharp.svg +1 -1
- package/app/assets/icons/resize.svg +1 -1
- package/app/assets/icons/restaurant-outline.svg +1 -1
- package/app/assets/icons/restaurant-sharp.svg +1 -1
- package/app/assets/icons/restaurant.svg +1 -1
- package/app/assets/icons/return-down-back-outline.svg +1 -1
- package/app/assets/icons/return-down-back-sharp.svg +1 -1
- package/app/assets/icons/return-down-back.svg +1 -1
- package/app/assets/icons/return-down-forward-outline.svg +1 -1
- package/app/assets/icons/return-down-forward-sharp.svg +1 -1
- package/app/assets/icons/return-down-forward.svg +1 -1
- package/app/assets/icons/return-up-back-outline.svg +1 -1
- package/app/assets/icons/return-up-back-sharp.svg +1 -1
- package/app/assets/icons/return-up-back.svg +1 -1
- package/app/assets/icons/return-up-forward-outline.svg +1 -1
- package/app/assets/icons/return-up-forward-sharp.svg +1 -1
- package/app/assets/icons/return-up-forward.svg +1 -1
- package/app/assets/icons/ribbon-outline.svg +1 -1
- package/app/assets/icons/ribbon-sharp.svg +1 -1
- package/app/assets/icons/ribbon.svg +1 -1
- package/app/assets/icons/rocket-outline.svg +1 -1
- package/app/assets/icons/rocket-sharp.svg +1 -1
- package/app/assets/icons/rocket.svg +1 -1
- package/app/assets/icons/rose-outline.svg +1 -1
- package/app/assets/icons/rose-sharp.svg +1 -1
- package/app/assets/icons/rose.svg +1 -1
- package/app/assets/icons/sad-outline.svg +1 -1
- package/app/assets/icons/sad-sharp.svg +1 -1
- package/app/assets/icons/sad.svg +1 -1
- package/app/assets/icons/save-outline.svg +1 -1
- package/app/assets/icons/save-sharp.svg +1 -1
- package/app/assets/icons/save.svg +1 -1
- package/app/assets/icons/scale-outline.svg +1 -1
- package/app/assets/icons/scale-sharp.svg +1 -1
- package/app/assets/icons/scale.svg +1 -1
- package/app/assets/icons/scan-circle-outline.svg +1 -1
- package/app/assets/icons/scan-circle-sharp.svg +1 -1
- package/app/assets/icons/scan-circle.svg +1 -1
- package/app/assets/icons/scan-outline.svg +1 -1
- package/app/assets/icons/scan-sharp.svg +1 -1
- package/app/assets/icons/scan.svg +1 -1
- package/app/assets/icons/school-outline.svg +1 -1
- package/app/assets/icons/school-sharp.svg +1 -1
- package/app/assets/icons/school.svg +1 -1
- package/app/assets/icons/search-circle-outline.svg +1 -1
- package/app/assets/icons/search-circle-sharp.svg +1 -1
- package/app/assets/icons/search-circle.svg +1 -1
- package/app/assets/icons/search-outline.svg +1 -1
- package/app/assets/icons/search-sharp.svg +1 -1
- package/app/assets/icons/search.svg +1 -1
- package/app/assets/icons/send-outline.svg +1 -1
- package/app/assets/icons/send-sharp.svg +1 -1
- package/app/assets/icons/send.svg +1 -1
- package/app/assets/icons/server-outline.svg +1 -1
- package/app/assets/icons/server-sharp.svg +1 -1
- package/app/assets/icons/server.svg +1 -1
- package/app/assets/icons/settings-outline.svg +1 -1
- package/app/assets/icons/settings-sharp.svg +1 -1
- package/app/assets/icons/settings.svg +1 -1
- package/app/assets/icons/shapes-outline.svg +1 -1
- package/app/assets/icons/shapes-sharp.svg +1 -1
- package/app/assets/icons/shapes.svg +1 -1
- package/app/assets/icons/share-outline.svg +1 -1
- package/app/assets/icons/share-sharp.svg +1 -1
- package/app/assets/icons/share-social-outline.svg +1 -1
- package/app/assets/icons/share-social-sharp.svg +1 -1
- package/app/assets/icons/share-social.svg +1 -1
- package/app/assets/icons/share.svg +1 -1
- package/app/assets/icons/shield-checkmark-outline.svg +1 -1
- package/app/assets/icons/shield-checkmark-sharp.svg +1 -1
- package/app/assets/icons/shield-checkmark.svg +1 -1
- package/app/assets/icons/shield-half-outline.svg +1 -1
- package/app/assets/icons/shield-half-sharp.svg +1 -1
- package/app/assets/icons/shield-half.svg +1 -1
- package/app/assets/icons/shield-outline.svg +1 -1
- package/app/assets/icons/shield-sharp.svg +1 -1
- package/app/assets/icons/shield.svg +1 -1
- package/app/assets/icons/shirt-outline.svg +1 -1
- package/app/assets/icons/shirt-sharp.svg +1 -1
- package/app/assets/icons/shirt.svg +1 -1
- package/app/assets/icons/shuffle-outline.svg +1 -1
- package/app/assets/icons/shuffle-sharp.svg +1 -1
- package/app/assets/icons/shuffle.svg +1 -1
- package/app/assets/icons/skull-outline.svg +1 -1
- package/app/assets/icons/skull-sharp.svg +1 -1
- package/app/assets/icons/skull.svg +1 -1
- package/app/assets/icons/snow-outline.svg +1 -1
- package/app/assets/icons/snow-sharp.svg +1 -1
- package/app/assets/icons/snow.svg +1 -1
- package/app/assets/icons/sparkles-outline.svg +1 -1
- package/app/assets/icons/sparkles-sharp.svg +1 -1
- package/app/assets/icons/sparkles.svg +1 -1
- package/app/assets/icons/speedometer-outline.svg +1 -1
- package/app/assets/icons/speedometer-sharp.svg +1 -1
- package/app/assets/icons/speedometer.svg +1 -1
- package/app/assets/icons/square-outline.svg +1 -1
- package/app/assets/icons/square-sharp.svg +1 -1
- package/app/assets/icons/square.svg +1 -1
- package/app/assets/icons/star-half-outline.svg +1 -1
- package/app/assets/icons/star-half-sharp.svg +1 -1
- package/app/assets/icons/star-half.svg +1 -1
- package/app/assets/icons/star-outline.svg +1 -1
- package/app/assets/icons/star-sharp.svg +1 -1
- package/app/assets/icons/star.svg +1 -1
- package/app/assets/icons/stats-chart-outline.svg +1 -1
- package/app/assets/icons/stats-chart-sharp.svg +1 -1
- package/app/assets/icons/stats-chart.svg +1 -1
- package/app/assets/icons/stop-circle-outline.svg +1 -1
- package/app/assets/icons/stop-circle-sharp.svg +1 -1
- package/app/assets/icons/stop-circle.svg +1 -1
- package/app/assets/icons/stop-outline.svg +1 -1
- package/app/assets/icons/stop-sharp.svg +1 -1
- package/app/assets/icons/stop.svg +1 -1
- package/app/assets/icons/stopwatch-outline.svg +1 -1
- package/app/assets/icons/stopwatch-sharp.svg +1 -1
- package/app/assets/icons/stopwatch.svg +1 -1
- package/app/assets/icons/storefront-outline.svg +1 -1
- package/app/assets/icons/storefront-sharp.svg +1 -1
- package/app/assets/icons/storefront.svg +1 -1
- package/app/assets/icons/subway-outline.svg +1 -1
- package/app/assets/icons/subway-sharp.svg +1 -1
- package/app/assets/icons/subway.svg +1 -1
- package/app/assets/icons/sunny-outline.svg +1 -1
- package/app/assets/icons/sunny-sharp.svg +1 -1
- package/app/assets/icons/sunny.svg +1 -1
- package/app/assets/icons/swap-horizontal-outline.svg +1 -1
- package/app/assets/icons/swap-horizontal-sharp.svg +1 -1
- package/app/assets/icons/swap-horizontal.svg +1 -1
- package/app/assets/icons/swap-vertical-outline.svg +1 -1
- package/app/assets/icons/swap-vertical-sharp.svg +1 -1
- package/app/assets/icons/swap-vertical.svg +1 -1
- package/app/assets/icons/sync-circle-outline.svg +1 -1
- package/app/assets/icons/sync-circle-sharp.svg +1 -1
- package/app/assets/icons/sync-circle.svg +1 -1
- package/app/assets/icons/sync-outline.svg +1 -1
- package/app/assets/icons/sync-sharp.svg +1 -1
- package/app/assets/icons/sync.svg +1 -1
- package/app/assets/icons/tablet-landscape-outline.svg +1 -1
- package/app/assets/icons/tablet-landscape-sharp.svg +1 -1
- package/app/assets/icons/tablet-landscape.svg +1 -1
- package/app/assets/icons/tablet-portrait-outline.svg +1 -1
- package/app/assets/icons/tablet-portrait-sharp.svg +1 -1
- package/app/assets/icons/tablet-portrait.svg +1 -1
- package/app/assets/icons/telescope-outline.svg +1 -1
- package/app/assets/icons/telescope-sharp.svg +1 -1
- package/app/assets/icons/telescope.svg +1 -1
- package/app/assets/icons/tennisball-outline.svg +1 -1
- package/app/assets/icons/tennisball-sharp.svg +1 -1
- package/app/assets/icons/tennisball.svg +1 -1
- package/app/assets/icons/terminal-outline.svg +1 -1
- package/app/assets/icons/terminal-sharp.svg +1 -1
- package/app/assets/icons/terminal.svg +1 -1
- package/app/assets/icons/text-outline.svg +1 -1
- package/app/assets/icons/text-sharp.svg +1 -1
- package/app/assets/icons/text.svg +1 -1
- package/app/assets/icons/thermometer-outline.svg +1 -1
- package/app/assets/icons/thermometer-sharp.svg +1 -1
- package/app/assets/icons/thermometer.svg +1 -1
- package/app/assets/icons/thumbs-down-outline.svg +1 -1
- package/app/assets/icons/thumbs-down-sharp.svg +1 -1
- package/app/assets/icons/thumbs-down.svg +1 -1
- package/app/assets/icons/thumbs-up-outline.svg +1 -1
- package/app/assets/icons/thumbs-up-sharp.svg +1 -1
- package/app/assets/icons/thumbs-up.svg +1 -1
- package/app/assets/icons/thunderstorm-outline.svg +1 -1
- package/app/assets/icons/thunderstorm-sharp.svg +1 -1
- package/app/assets/icons/thunderstorm.svg +1 -1
- package/app/assets/icons/ticket-outline.svg +1 -1
- package/app/assets/icons/ticket-sharp.svg +1 -1
- package/app/assets/icons/ticket.svg +1 -1
- package/app/assets/icons/time-outline.svg +1 -1
- package/app/assets/icons/time-sharp.svg +1 -1
- package/app/assets/icons/time.svg +1 -1
- package/app/assets/icons/timer-outline.svg +1 -1
- package/app/assets/icons/timer-sharp.svg +1 -1
- package/app/assets/icons/timer.svg +1 -1
- package/app/assets/icons/today-outline.svg +1 -1
- package/app/assets/icons/today-sharp.svg +1 -1
- package/app/assets/icons/today.svg +1 -1
- package/app/assets/icons/toggle-outline.svg +1 -1
- package/app/assets/icons/toggle-sharp.svg +1 -1
- package/app/assets/icons/toggle.svg +1 -1
- package/app/assets/icons/trail-sign-outline.svg +1 -1
- package/app/assets/icons/trail-sign-sharp.svg +1 -1
- package/app/assets/icons/trail-sign.svg +1 -1
- package/app/assets/icons/train-outline.svg +1 -1
- package/app/assets/icons/train-sharp.svg +1 -1
- package/app/assets/icons/train.svg +1 -1
- package/app/assets/icons/transgender-outline.svg +1 -1
- package/app/assets/icons/transgender-sharp.svg +1 -1
- package/app/assets/icons/transgender.svg +1 -1
- package/app/assets/icons/trash-bin-outline.svg +1 -1
- package/app/assets/icons/trash-bin-sharp.svg +1 -1
- package/app/assets/icons/trash-bin.svg +1 -1
- package/app/assets/icons/trash-outline.svg +1 -1
- package/app/assets/icons/trash-sharp.svg +1 -1
- package/app/assets/icons/trash.svg +1 -1
- package/app/assets/icons/trending-down-outline.svg +1 -1
- package/app/assets/icons/trending-down-sharp.svg +1 -1
- package/app/assets/icons/trending-down.svg +1 -1
- package/app/assets/icons/trending-up-outline.svg +1 -1
- package/app/assets/icons/trending-up-sharp.svg +1 -1
- package/app/assets/icons/trending-up.svg +1 -1
- package/app/assets/icons/triangle-outline.svg +1 -1
- package/app/assets/icons/triangle-sharp.svg +1 -1
- package/app/assets/icons/triangle.svg +1 -1
- package/app/assets/icons/trophy-outline.svg +1 -1
- package/app/assets/icons/trophy-sharp.svg +1 -1
- package/app/assets/icons/trophy.svg +1 -1
- package/app/assets/icons/tv-outline.svg +1 -1
- package/app/assets/icons/tv-sharp.svg +1 -1
- package/app/assets/icons/tv.svg +1 -1
- package/app/assets/icons/umbrella-outline.svg +1 -1
- package/app/assets/icons/umbrella-sharp.svg +1 -1
- package/app/assets/icons/umbrella.svg +1 -1
- package/app/assets/icons/unabridged-software.svg +22 -0
- package/app/assets/icons/unlink-outline.svg +1 -1
- package/app/assets/icons/unlink-sharp.svg +1 -1
- package/app/assets/icons/unlink.svg +1 -1
- package/app/assets/icons/videocam-off-outline.svg +1 -1
- package/app/assets/icons/videocam-off-sharp.svg +1 -1
- package/app/assets/icons/videocam-off.svg +1 -1
- package/app/assets/icons/videocam-outline.svg +1 -1
- package/app/assets/icons/videocam-sharp.svg +1 -1
- package/app/assets/icons/videocam.svg +1 -1
- package/app/assets/icons/volume-high-outline.svg +1 -1
- package/app/assets/icons/volume-high-sharp.svg +1 -1
- package/app/assets/icons/volume-high.svg +1 -1
- package/app/assets/icons/volume-low-outline.svg +1 -1
- package/app/assets/icons/volume-low-sharp.svg +1 -1
- package/app/assets/icons/volume-low.svg +1 -1
- package/app/assets/icons/volume-medium-outline.svg +1 -1
- package/app/assets/icons/volume-medium-sharp.svg +1 -1
- package/app/assets/icons/volume-medium.svg +1 -1
- package/app/assets/icons/volume-mute-outline.svg +1 -1
- package/app/assets/icons/volume-mute-sharp.svg +1 -1
- package/app/assets/icons/volume-mute.svg +1 -1
- package/app/assets/icons/volume-off-outline.svg +1 -1
- package/app/assets/icons/volume-off-sharp.svg +1 -1
- package/app/assets/icons/volume-off.svg +1 -1
- package/app/assets/icons/walk-outline.svg +1 -1
- package/app/assets/icons/walk-sharp.svg +1 -1
- package/app/assets/icons/walk.svg +1 -1
- package/app/assets/icons/wallet-outline.svg +1 -1
- package/app/assets/icons/wallet-sharp.svg +1 -1
- package/app/assets/icons/wallet.svg +1 -1
- package/app/assets/icons/warning-outline.svg +1 -1
- package/app/assets/icons/warning-sharp.svg +1 -1
- package/app/assets/icons/warning.svg +1 -1
- package/app/assets/icons/watch-outline.svg +1 -1
- package/app/assets/icons/watch-sharp.svg +1 -1
- package/app/assets/icons/watch.svg +1 -1
- package/app/assets/icons/water-outline.svg +1 -1
- package/app/assets/icons/water-sharp.svg +1 -1
- package/app/assets/icons/water.svg +1 -1
- package/app/assets/icons/wifi-outline.svg +1 -1
- package/app/assets/icons/wifi-sharp.svg +1 -1
- package/app/assets/icons/wifi.svg +1 -1
- package/app/assets/icons/wine-outline.svg +1 -1
- package/app/assets/icons/wine-sharp.svg +1 -1
- package/app/assets/icons/wine.svg +1 -1
- package/app/assets/icons/woman-outline.svg +1 -1
- package/app/assets/icons/woman-sharp.svg +1 -1
- package/app/assets/icons/woman.svg +1 -1
- package/app/assets/javascript/midwest/index.ts +30 -4
- package/app/assets/javascript/midwest.js +2954 -2
- package/app/assets/javascript/midwest.js.map +1 -1
- package/app/assets/stylesheets/midwest/color-system.css +207 -186
- package/app/assets/stylesheets/midwest/form-group.css +17 -0
- package/app/assets/stylesheets/midwest/responsive-system.css +9 -6
- package/app/assets/stylesheets/midwest/scrollbars.css +36 -0
- package/app/assets/stylesheets/midwest/utilities.css +21 -1
- package/app/assets/stylesheets/midwest.css +2 -2
- package/app/assets/stylesheets/midwest.tailwind.css +34 -15
- package/config/tailwind.theme.js +67 -0
- package/dist/css/midwest.css +2 -2
- package/dist/javascript/collection/app/assets/javascript/midwest/index.js +36 -0
- package/dist/javascript/collection/app/assets/javascript/midwest/index.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/avatar_component/avatar_component_controller.js +10 -0
- package/dist/javascript/collection/app/components/midwest/avatar_component/avatar_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/banner_component/banner_component_controller.js +17 -0
- package/dist/javascript/collection/app/components/midwest/banner_component/banner_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/callout_component/callout_component_controller.js +10 -0
- package/dist/javascript/collection/app/components/midwest/callout_component/callout_component_controller.js.map +1 -0
- package/dist/javascript/{midwest/midwest.js → collection/app/components/midwest/card_component/card_component_controller.js} +2 -6
- package/dist/javascript/collection/app/components/midwest/card_component/card_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/dialog_component/dialog_component_controller.js +93 -0
- package/dist/javascript/collection/app/components/midwest/dialog_component/dialog_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/dropdown_component/dropdown_component_controller.js +90 -0
- package/dist/javascript/collection/app/components/midwest/dropdown_component/dropdown_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/dropdown_item_component/dropdown_item_component_controller.js +10 -0
- package/dist/javascript/collection/app/components/midwest/dropdown_item_component/dropdown_item_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/form/file_component/file_component_controller.js +40 -0
- package/dist/javascript/collection/app/components/midwest/form/file_component/file_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/form/input_component/input_component_controller.js +19 -0
- package/dist/javascript/collection/app/components/midwest/form/input_component/input_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/form/switch_component/switch_component_controller.js +10 -0
- package/dist/javascript/collection/app/components/midwest/form/switch_component/switch_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/prose_component/prose_component_controller.js +28 -0
- package/dist/javascript/collection/app/components/midwest/prose_component/prose_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/tabs_component/tabs_component_controller.js +35 -0
- package/dist/javascript/collection/app/components/midwest/tabs_component/tabs_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/tooltip_component/tooltip_component_controller.js +14 -0
- package/dist/javascript/collection/app/components/midwest/tooltip_component/tooltip_component_controller.js.map +1 -0
- package/dist/javascript/collection/app/components/midwest/video_component/video_component_controller.js +10 -0
- package/dist/javascript/collection/app/components/midwest/video_component/video_component_controller.js.map +1 -0
- package/dist/javascript/collection/assets/javascript/midwest/index.js +32 -0
- package/dist/javascript/collection/assets/javascript/midwest/index.js.map +1 -0
- package/dist/javascript/collection/components/midwest/avatar_component/avatar_component_controller.js +10 -0
- package/dist/javascript/collection/components/midwest/avatar_component/avatar_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/banner_component/banner_component_controller.js +17 -0
- package/dist/javascript/collection/components/midwest/banner_component/banner_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/callout_component/callout_component_controller.js +10 -0
- package/dist/javascript/collection/components/midwest/callout_component/callout_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/card_component/card_component_controller.js +38 -0
- package/dist/javascript/collection/components/midwest/card_component/card_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/dialog_component/dialog_component_controller.js +89 -0
- package/dist/javascript/collection/components/midwest/dialog_component/dialog_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/dropdown_component/dropdown_component_controller.js +14 -0
- package/dist/javascript/collection/components/midwest/dropdown_component/dropdown_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/dropdown_item_component/dropdown_item_component_controller.js +10 -0
- package/dist/javascript/collection/components/midwest/dropdown_item_component/dropdown_item_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/form/file_component/file_component_controller.js +40 -0
- package/dist/javascript/collection/components/midwest/form/file_component/file_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/form/input_component/input_component_controller.js +19 -0
- package/dist/javascript/collection/components/midwest/form/input_component/input_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/form/switch_component/switch_component_controller.js +10 -0
- package/dist/javascript/collection/components/midwest/form/switch_component/switch_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/prose_component/prose_component_controller.js +28 -0
- package/dist/javascript/collection/components/midwest/prose_component/prose_component_controller.js.map +1 -0
- package/dist/javascript/collection/components/midwest/video_component/video_component_controller.js +10 -0
- package/dist/javascript/collection/components/midwest/video_component/video_component_controller.js.map +1 -0
- package/dist/javascript/collection/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +1059 -0
- package/dist/javascript/collection/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js.map +1 -0
- package/dist/javascript/collection/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +772 -0
- package/dist/javascript/collection/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js.map +1 -0
- package/dist/javascript/collection/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js +166 -0
- package/dist/javascript/collection/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs.js.map +1 -0
- package/dist/javascript/collection/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +137 -0
- package/dist/javascript/collection/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js.map +1 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js +3910 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js.map +1 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js +22 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js.map +1 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js +32 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js.map +1 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js +53 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js.map +1 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js +6 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js.map +1 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js +34 -0
- package/dist/javascript/collection/node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/adapters.js +7 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/adapters.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/connection.js +170 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/connection.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/connection_monitor.js +128 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/connection_monitor.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/consumer.js +78 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/consumer.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/index.js +25 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/index.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/internal.js +22 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/internal.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/logger.js +25 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/logger.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/subscription.js +92 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/subscription.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/subscription_guarantor.js +53 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/subscription_guarantor.js.map +1 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/subscriptions.js +106 -0
- package/dist/javascript/collection/node_modules/@rails/actioncable/src/subscriptions.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/assets/javascript/midwest/index.js +29 -0
- package/dist/javascript/collection/vendor/midwest/app/assets/javascript/midwest/index.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/avatar_component/avatar_component_controller.js +10 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/avatar_component/avatar_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/banner_component/banner_component_controller.js +17 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/banner_component/banner_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/callout_component/callout_component_controller.js +10 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/callout_component/callout_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/card_component/card_component_controller.js +38 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/card_component/card_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/dialog_component/dialog_component_controller.js +83 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/dialog_component/dialog_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/dropdown_component/dropdown_component_controller.js +14 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/dropdown_component/dropdown_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/form/file_component/file_component_controller.js +40 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/form/file_component/file_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/form/input_component/input_component_controller.js +19 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/form/input_component/input_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/form/switch_component/switch_component_controller.js +10 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/form/switch_component/switch_component_controller.js.map +1 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/prose_component/prose_component_controller.js +28 -0
- package/dist/javascript/collection/vendor/midwest/app/components/midwest/prose_component/prose_component_controller.js.map +1 -0
- package/dist/javascript/midwest.d.ts +6 -1
- package/dist/javascript/midwest.js +2954 -2
- package/dist/javascript/midwest.js.map +1 -1
- package/package.json +19 -5
- package/dist/javascript/midwest/midwest.js.map +0 -1
|
@@ -1,4 +1,492 @@
|
|
|
1
|
-
|
|
1
|
+
/*
|
|
2
|
+
Stimulus 3.2.1
|
|
3
|
+
Copyright © 2023 Basecamp, LLC
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
function camelize(value) {
|
|
7
|
+
return value.replace(/(?:[_-])([a-z0-9])/g, (_, char) => char.toUpperCase());
|
|
8
|
+
}
|
|
9
|
+
function namespaceCamelize(value) {
|
|
10
|
+
return camelize(value.replace(/--/g, "-").replace(/__/g, "_"));
|
|
11
|
+
}
|
|
12
|
+
function capitalize(value) {
|
|
13
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
|
14
|
+
}
|
|
15
|
+
function dasherize(value) {
|
|
16
|
+
return value.replace(/([A-Z])/g, (_, char) => `-${char.toLowerCase()}`);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function isSomething(object) {
|
|
20
|
+
return object !== null && object !== undefined;
|
|
21
|
+
}
|
|
22
|
+
function hasProperty(object, property) {
|
|
23
|
+
return Object.prototype.hasOwnProperty.call(object, property);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function readInheritableStaticArrayValues(constructor, propertyName) {
|
|
27
|
+
const ancestors = getAncestorsForConstructor(constructor);
|
|
28
|
+
return Array.from(ancestors.reduce((values, constructor) => {
|
|
29
|
+
getOwnStaticArrayValues(constructor, propertyName).forEach((name) => values.add(name));
|
|
30
|
+
return values;
|
|
31
|
+
}, new Set()));
|
|
32
|
+
}
|
|
33
|
+
function readInheritableStaticObjectPairs(constructor, propertyName) {
|
|
34
|
+
const ancestors = getAncestorsForConstructor(constructor);
|
|
35
|
+
return ancestors.reduce((pairs, constructor) => {
|
|
36
|
+
pairs.push(...getOwnStaticObjectPairs(constructor, propertyName));
|
|
37
|
+
return pairs;
|
|
38
|
+
}, []);
|
|
39
|
+
}
|
|
40
|
+
function getAncestorsForConstructor(constructor) {
|
|
41
|
+
const ancestors = [];
|
|
42
|
+
while (constructor) {
|
|
43
|
+
ancestors.push(constructor);
|
|
44
|
+
constructor = Object.getPrototypeOf(constructor);
|
|
45
|
+
}
|
|
46
|
+
return ancestors.reverse();
|
|
47
|
+
}
|
|
48
|
+
function getOwnStaticArrayValues(constructor, propertyName) {
|
|
49
|
+
const definition = constructor[propertyName];
|
|
50
|
+
return Array.isArray(definition) ? definition : [];
|
|
51
|
+
}
|
|
52
|
+
function getOwnStaticObjectPairs(constructor, propertyName) {
|
|
53
|
+
const definition = constructor[propertyName];
|
|
54
|
+
return definition ? Object.keys(definition).map((key) => [key, definition[key]]) : [];
|
|
55
|
+
}
|
|
56
|
+
(() => {
|
|
57
|
+
function extendWithReflect(constructor) {
|
|
58
|
+
function extended() {
|
|
59
|
+
return Reflect.construct(constructor, arguments, new.target);
|
|
60
|
+
}
|
|
61
|
+
extended.prototype = Object.create(constructor.prototype, {
|
|
62
|
+
constructor: { value: extended },
|
|
63
|
+
});
|
|
64
|
+
Reflect.setPrototypeOf(extended, constructor);
|
|
65
|
+
return extended;
|
|
66
|
+
}
|
|
67
|
+
function testReflectExtension() {
|
|
68
|
+
const a = function () {
|
|
69
|
+
this.a.call(this);
|
|
70
|
+
};
|
|
71
|
+
const b = extendWithReflect(a);
|
|
72
|
+
b.prototype.a = function () { };
|
|
73
|
+
return new b();
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
testReflectExtension();
|
|
77
|
+
return extendWithReflect;
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
return (constructor) => class extended extends constructor {
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
})();
|
|
84
|
+
|
|
85
|
+
({
|
|
86
|
+
controllerAttribute: "data-controller",
|
|
87
|
+
actionAttribute: "data-action",
|
|
88
|
+
targetAttribute: "data-target",
|
|
89
|
+
targetAttributeForScope: (identifier) => `data-${identifier}-target`,
|
|
90
|
+
outletAttributeForScope: (identifier, outlet) => `data-${identifier}-${outlet}-outlet`,
|
|
91
|
+
keyMappings: Object.assign(Object.assign({ enter: "Enter", tab: "Tab", esc: "Escape", space: " ", up: "ArrowUp", down: "ArrowDown", left: "ArrowLeft", right: "ArrowRight", home: "Home", end: "End", page_up: "PageUp", page_down: "PageDown" }, objectFromEntries("abcdefghijklmnopqrstuvwxyz".split("").map((c) => [c, c]))), objectFromEntries("0123456789".split("").map((n) => [n, n]))),
|
|
92
|
+
});
|
|
93
|
+
function objectFromEntries(array) {
|
|
94
|
+
return array.reduce((memo, [k, v]) => (Object.assign(Object.assign({}, memo), { [k]: v })), {});
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function ClassPropertiesBlessing(constructor) {
|
|
98
|
+
const classes = readInheritableStaticArrayValues(constructor, "classes");
|
|
99
|
+
return classes.reduce((properties, classDefinition) => {
|
|
100
|
+
return Object.assign(properties, propertiesForClassDefinition(classDefinition));
|
|
101
|
+
}, {});
|
|
102
|
+
}
|
|
103
|
+
function propertiesForClassDefinition(key) {
|
|
104
|
+
return {
|
|
105
|
+
[`${key}Class`]: {
|
|
106
|
+
get() {
|
|
107
|
+
const { classes } = this;
|
|
108
|
+
if (classes.has(key)) {
|
|
109
|
+
return classes.get(key);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
const attribute = classes.getAttributeName(key);
|
|
113
|
+
throw new Error(`Missing attribute "${attribute}"`);
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
[`${key}Classes`]: {
|
|
118
|
+
get() {
|
|
119
|
+
return this.classes.getAll(key);
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
[`has${capitalize(key)}Class`]: {
|
|
123
|
+
get() {
|
|
124
|
+
return this.classes.has(key);
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function OutletPropertiesBlessing(constructor) {
|
|
131
|
+
const outlets = readInheritableStaticArrayValues(constructor, "outlets");
|
|
132
|
+
return outlets.reduce((properties, outletDefinition) => {
|
|
133
|
+
return Object.assign(properties, propertiesForOutletDefinition(outletDefinition));
|
|
134
|
+
}, {});
|
|
135
|
+
}
|
|
136
|
+
function getOutletController(controller, element, identifier) {
|
|
137
|
+
return controller.application.getControllerForElementAndIdentifier(element, identifier);
|
|
138
|
+
}
|
|
139
|
+
function getControllerAndEnsureConnectedScope(controller, element, outletName) {
|
|
140
|
+
let outletController = getOutletController(controller, element, outletName);
|
|
141
|
+
if (outletController)
|
|
142
|
+
return outletController;
|
|
143
|
+
controller.application.router.proposeToConnectScopeForElementAndIdentifier(element, outletName);
|
|
144
|
+
outletController = getOutletController(controller, element, outletName);
|
|
145
|
+
if (outletController)
|
|
146
|
+
return outletController;
|
|
147
|
+
}
|
|
148
|
+
function propertiesForOutletDefinition(name) {
|
|
149
|
+
const camelizedName = namespaceCamelize(name);
|
|
150
|
+
return {
|
|
151
|
+
[`${camelizedName}Outlet`]: {
|
|
152
|
+
get() {
|
|
153
|
+
const outletElement = this.outlets.find(name);
|
|
154
|
+
const selector = this.outlets.getSelectorForOutletName(name);
|
|
155
|
+
if (outletElement) {
|
|
156
|
+
const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);
|
|
157
|
+
if (outletController)
|
|
158
|
+
return outletController;
|
|
159
|
+
throw new Error(`The provided outlet element is missing an outlet controller "${name}" instance for host controller "${this.identifier}"`);
|
|
160
|
+
}
|
|
161
|
+
throw new Error(`Missing outlet element "${name}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${selector}".`);
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
[`${camelizedName}Outlets`]: {
|
|
165
|
+
get() {
|
|
166
|
+
const outlets = this.outlets.findAll(name);
|
|
167
|
+
if (outlets.length > 0) {
|
|
168
|
+
return outlets
|
|
169
|
+
.map((outletElement) => {
|
|
170
|
+
const outletController = getControllerAndEnsureConnectedScope(this, outletElement, name);
|
|
171
|
+
if (outletController)
|
|
172
|
+
return outletController;
|
|
173
|
+
console.warn(`The provided outlet element is missing an outlet controller "${name}" instance for host controller "${this.identifier}"`, outletElement);
|
|
174
|
+
})
|
|
175
|
+
.filter((controller) => controller);
|
|
176
|
+
}
|
|
177
|
+
return [];
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
[`${camelizedName}OutletElement`]: {
|
|
181
|
+
get() {
|
|
182
|
+
const outletElement = this.outlets.find(name);
|
|
183
|
+
const selector = this.outlets.getSelectorForOutletName(name);
|
|
184
|
+
if (outletElement) {
|
|
185
|
+
return outletElement;
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
throw new Error(`Missing outlet element "${name}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${selector}".`);
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
[`${camelizedName}OutletElements`]: {
|
|
193
|
+
get() {
|
|
194
|
+
return this.outlets.findAll(name);
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
[`has${capitalize(camelizedName)}Outlet`]: {
|
|
198
|
+
get() {
|
|
199
|
+
return this.outlets.has(name);
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function TargetPropertiesBlessing(constructor) {
|
|
206
|
+
const targets = readInheritableStaticArrayValues(constructor, "targets");
|
|
207
|
+
return targets.reduce((properties, targetDefinition) => {
|
|
208
|
+
return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));
|
|
209
|
+
}, {});
|
|
210
|
+
}
|
|
211
|
+
function propertiesForTargetDefinition(name) {
|
|
212
|
+
return {
|
|
213
|
+
[`${name}Target`]: {
|
|
214
|
+
get() {
|
|
215
|
+
const target = this.targets.find(name);
|
|
216
|
+
if (target) {
|
|
217
|
+
return target;
|
|
218
|
+
}
|
|
219
|
+
else {
|
|
220
|
+
throw new Error(`Missing target element "${name}" for "${this.identifier}" controller`);
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
[`${name}Targets`]: {
|
|
225
|
+
get() {
|
|
226
|
+
return this.targets.findAll(name);
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
[`has${capitalize(name)}Target`]: {
|
|
230
|
+
get() {
|
|
231
|
+
return this.targets.has(name);
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function ValuePropertiesBlessing(constructor) {
|
|
238
|
+
const valueDefinitionPairs = readInheritableStaticObjectPairs(constructor, "values");
|
|
239
|
+
const propertyDescriptorMap = {
|
|
240
|
+
valueDescriptorMap: {
|
|
241
|
+
get() {
|
|
242
|
+
return valueDefinitionPairs.reduce((result, valueDefinitionPair) => {
|
|
243
|
+
const valueDescriptor = parseValueDefinitionPair(valueDefinitionPair, this.identifier);
|
|
244
|
+
const attributeName = this.data.getAttributeNameForKey(valueDescriptor.key);
|
|
245
|
+
return Object.assign(result, { [attributeName]: valueDescriptor });
|
|
246
|
+
}, {});
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
};
|
|
250
|
+
return valueDefinitionPairs.reduce((properties, valueDefinitionPair) => {
|
|
251
|
+
return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));
|
|
252
|
+
}, propertyDescriptorMap);
|
|
253
|
+
}
|
|
254
|
+
function propertiesForValueDefinitionPair(valueDefinitionPair, controller) {
|
|
255
|
+
const definition = parseValueDefinitionPair(valueDefinitionPair, controller);
|
|
256
|
+
const { key, name, reader: read, writer: write } = definition;
|
|
257
|
+
return {
|
|
258
|
+
[name]: {
|
|
259
|
+
get() {
|
|
260
|
+
const value = this.data.get(key);
|
|
261
|
+
if (value !== null) {
|
|
262
|
+
return read(value);
|
|
263
|
+
}
|
|
264
|
+
else {
|
|
265
|
+
return definition.defaultValue;
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
set(value) {
|
|
269
|
+
if (value === undefined) {
|
|
270
|
+
this.data.delete(key);
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
this.data.set(key, write(value));
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
[`has${capitalize(name)}`]: {
|
|
278
|
+
get() {
|
|
279
|
+
return this.data.has(key) || definition.hasCustomDefaultValue;
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
function parseValueDefinitionPair([token, typeDefinition], controller) {
|
|
285
|
+
return valueDescriptorForTokenAndTypeDefinition({
|
|
286
|
+
controller,
|
|
287
|
+
token,
|
|
288
|
+
typeDefinition,
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
function parseValueTypeConstant(constant) {
|
|
292
|
+
switch (constant) {
|
|
293
|
+
case Array:
|
|
294
|
+
return "array";
|
|
295
|
+
case Boolean:
|
|
296
|
+
return "boolean";
|
|
297
|
+
case Number:
|
|
298
|
+
return "number";
|
|
299
|
+
case Object:
|
|
300
|
+
return "object";
|
|
301
|
+
case String:
|
|
302
|
+
return "string";
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
function parseValueTypeDefault(defaultValue) {
|
|
306
|
+
switch (typeof defaultValue) {
|
|
307
|
+
case "boolean":
|
|
308
|
+
return "boolean";
|
|
309
|
+
case "number":
|
|
310
|
+
return "number";
|
|
311
|
+
case "string":
|
|
312
|
+
return "string";
|
|
313
|
+
}
|
|
314
|
+
if (Array.isArray(defaultValue))
|
|
315
|
+
return "array";
|
|
316
|
+
if (Object.prototype.toString.call(defaultValue) === "[object Object]")
|
|
317
|
+
return "object";
|
|
318
|
+
}
|
|
319
|
+
function parseValueTypeObject(payload) {
|
|
320
|
+
const { controller, token, typeObject } = payload;
|
|
321
|
+
const hasType = isSomething(typeObject.type);
|
|
322
|
+
const hasDefault = isSomething(typeObject.default);
|
|
323
|
+
const fullObject = hasType && hasDefault;
|
|
324
|
+
const onlyType = hasType && !hasDefault;
|
|
325
|
+
const onlyDefault = !hasType && hasDefault;
|
|
326
|
+
const typeFromObject = parseValueTypeConstant(typeObject.type);
|
|
327
|
+
const typeFromDefaultValue = parseValueTypeDefault(payload.typeObject.default);
|
|
328
|
+
if (onlyType)
|
|
329
|
+
return typeFromObject;
|
|
330
|
+
if (onlyDefault)
|
|
331
|
+
return typeFromDefaultValue;
|
|
332
|
+
if (typeFromObject !== typeFromDefaultValue) {
|
|
333
|
+
const propertyPath = controller ? `${controller}.${token}` : token;
|
|
334
|
+
throw new Error(`The specified default value for the Stimulus Value "${propertyPath}" must match the defined type "${typeFromObject}". The provided default value of "${typeObject.default}" is of type "${typeFromDefaultValue}".`);
|
|
335
|
+
}
|
|
336
|
+
if (fullObject)
|
|
337
|
+
return typeFromObject;
|
|
338
|
+
}
|
|
339
|
+
function parseValueTypeDefinition(payload) {
|
|
340
|
+
const { controller, token, typeDefinition } = payload;
|
|
341
|
+
const typeObject = { controller, token, typeObject: typeDefinition };
|
|
342
|
+
const typeFromObject = parseValueTypeObject(typeObject);
|
|
343
|
+
const typeFromDefaultValue = parseValueTypeDefault(typeDefinition);
|
|
344
|
+
const typeFromConstant = parseValueTypeConstant(typeDefinition);
|
|
345
|
+
const type = typeFromObject || typeFromDefaultValue || typeFromConstant;
|
|
346
|
+
if (type)
|
|
347
|
+
return type;
|
|
348
|
+
const propertyPath = controller ? `${controller}.${typeDefinition}` : token;
|
|
349
|
+
throw new Error(`Unknown value type "${propertyPath}" for "${token}" value`);
|
|
350
|
+
}
|
|
351
|
+
function defaultValueForDefinition(typeDefinition) {
|
|
352
|
+
const constant = parseValueTypeConstant(typeDefinition);
|
|
353
|
+
if (constant)
|
|
354
|
+
return defaultValuesByType[constant];
|
|
355
|
+
const hasDefault = hasProperty(typeDefinition, "default");
|
|
356
|
+
const hasType = hasProperty(typeDefinition, "type");
|
|
357
|
+
const typeObject = typeDefinition;
|
|
358
|
+
if (hasDefault)
|
|
359
|
+
return typeObject.default;
|
|
360
|
+
if (hasType) {
|
|
361
|
+
const { type } = typeObject;
|
|
362
|
+
const constantFromType = parseValueTypeConstant(type);
|
|
363
|
+
if (constantFromType)
|
|
364
|
+
return defaultValuesByType[constantFromType];
|
|
365
|
+
}
|
|
366
|
+
return typeDefinition;
|
|
367
|
+
}
|
|
368
|
+
function valueDescriptorForTokenAndTypeDefinition(payload) {
|
|
369
|
+
const { token, typeDefinition } = payload;
|
|
370
|
+
const key = `${dasherize(token)}-value`;
|
|
371
|
+
const type = parseValueTypeDefinition(payload);
|
|
372
|
+
return {
|
|
373
|
+
type,
|
|
374
|
+
key,
|
|
375
|
+
name: camelize(key),
|
|
376
|
+
get defaultValue() {
|
|
377
|
+
return defaultValueForDefinition(typeDefinition);
|
|
378
|
+
},
|
|
379
|
+
get hasCustomDefaultValue() {
|
|
380
|
+
return parseValueTypeDefault(typeDefinition) !== undefined;
|
|
381
|
+
},
|
|
382
|
+
reader: readers[type],
|
|
383
|
+
writer: writers[type] || writers.default,
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
const defaultValuesByType = {
|
|
387
|
+
get array() {
|
|
388
|
+
return [];
|
|
389
|
+
},
|
|
390
|
+
boolean: false,
|
|
391
|
+
number: 0,
|
|
392
|
+
get object() {
|
|
393
|
+
return {};
|
|
394
|
+
},
|
|
395
|
+
string: "",
|
|
396
|
+
};
|
|
397
|
+
const readers = {
|
|
398
|
+
array(value) {
|
|
399
|
+
const array = JSON.parse(value);
|
|
400
|
+
if (!Array.isArray(array)) {
|
|
401
|
+
throw new TypeError(`expected value of type "array" but instead got value "${value}" of type "${parseValueTypeDefault(array)}"`);
|
|
402
|
+
}
|
|
403
|
+
return array;
|
|
404
|
+
},
|
|
405
|
+
boolean(value) {
|
|
406
|
+
return !(value == "0" || String(value).toLowerCase() == "false");
|
|
407
|
+
},
|
|
408
|
+
number(value) {
|
|
409
|
+
return Number(value.replace(/_/g, ""));
|
|
410
|
+
},
|
|
411
|
+
object(value) {
|
|
412
|
+
const object = JSON.parse(value);
|
|
413
|
+
if (object === null || typeof object != "object" || Array.isArray(object)) {
|
|
414
|
+
throw new TypeError(`expected value of type "object" but instead got value "${value}" of type "${parseValueTypeDefault(object)}"`);
|
|
415
|
+
}
|
|
416
|
+
return object;
|
|
417
|
+
},
|
|
418
|
+
string(value) {
|
|
419
|
+
return value;
|
|
420
|
+
},
|
|
421
|
+
};
|
|
422
|
+
const writers = {
|
|
423
|
+
default: writeString,
|
|
424
|
+
array: writeJSON,
|
|
425
|
+
object: writeJSON,
|
|
426
|
+
};
|
|
427
|
+
function writeJSON(value) {
|
|
428
|
+
return JSON.stringify(value);
|
|
429
|
+
}
|
|
430
|
+
function writeString(value) {
|
|
431
|
+
return `${value}`;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
class Controller {
|
|
435
|
+
constructor(context) {
|
|
436
|
+
this.context = context;
|
|
437
|
+
}
|
|
438
|
+
static get shouldLoad() {
|
|
439
|
+
return true;
|
|
440
|
+
}
|
|
441
|
+
static afterLoad(_identifier, _application) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
get application() {
|
|
445
|
+
return this.context.application;
|
|
446
|
+
}
|
|
447
|
+
get scope() {
|
|
448
|
+
return this.context.scope;
|
|
449
|
+
}
|
|
450
|
+
get element() {
|
|
451
|
+
return this.scope.element;
|
|
452
|
+
}
|
|
453
|
+
get identifier() {
|
|
454
|
+
return this.scope.identifier;
|
|
455
|
+
}
|
|
456
|
+
get targets() {
|
|
457
|
+
return this.scope.targets;
|
|
458
|
+
}
|
|
459
|
+
get outlets() {
|
|
460
|
+
return this.scope.outlets;
|
|
461
|
+
}
|
|
462
|
+
get classes() {
|
|
463
|
+
return this.scope.classes;
|
|
464
|
+
}
|
|
465
|
+
get data() {
|
|
466
|
+
return this.scope.data;
|
|
467
|
+
}
|
|
468
|
+
initialize() {
|
|
469
|
+
}
|
|
470
|
+
connect() {
|
|
471
|
+
}
|
|
472
|
+
disconnect() {
|
|
473
|
+
}
|
|
474
|
+
dispatch(eventName, { target = this.element, detail = {}, prefix = this.identifier, bubbles = true, cancelable = true, } = {}) {
|
|
475
|
+
const type = prefix ? `${prefix}:${eventName}` : eventName;
|
|
476
|
+
const event = new CustomEvent(type, { detail, bubbles, cancelable });
|
|
477
|
+
target.dispatchEvent(event);
|
|
478
|
+
return event;
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
Controller.blessings = [
|
|
482
|
+
ClassPropertiesBlessing,
|
|
483
|
+
TargetPropertiesBlessing,
|
|
484
|
+
ValuePropertiesBlessing,
|
|
485
|
+
OutletPropertiesBlessing,
|
|
486
|
+
];
|
|
487
|
+
Controller.targets = [];
|
|
488
|
+
Controller.outlets = [];
|
|
489
|
+
Controller.values = {};
|
|
2
490
|
|
|
3
491
|
class Card extends Controller {
|
|
4
492
|
static targets = ["back", "front"];
|
|
@@ -34,9 +522,2473 @@ class Card extends Controller {
|
|
|
34
522
|
}
|
|
35
523
|
}
|
|
36
524
|
|
|
525
|
+
class Banner extends Controller {
|
|
526
|
+
connect() {
|
|
527
|
+
this.element.classList.add("shown");
|
|
528
|
+
this.element.classList.add("visible");
|
|
529
|
+
}
|
|
530
|
+
close() {
|
|
531
|
+
this.element.classList.add("closing");
|
|
532
|
+
setTimeout(() => {
|
|
533
|
+
this.element.classList.add("closed");
|
|
534
|
+
}, 350);
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
class Callout extends Controller {
|
|
539
|
+
connect() {
|
|
540
|
+
console.log("Hello from Callout!");
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
class Input extends Controller {
|
|
545
|
+
static targets = ["input"];
|
|
546
|
+
connect() {
|
|
547
|
+
this.applyColor();
|
|
548
|
+
}
|
|
549
|
+
applyColor() {
|
|
550
|
+
if (this.inputTarget.type !== "color") {
|
|
551
|
+
return;
|
|
552
|
+
}
|
|
553
|
+
this.inputTarget.addEventListener("input", () => {
|
|
554
|
+
this.inputTarget.setAttribute("value", this.inputTarget.value);
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
class File extends Controller {
|
|
560
|
+
static targets = ["input", "output"];
|
|
561
|
+
connect() {
|
|
562
|
+
this.inputTarget.addEventListener("change", () => {
|
|
563
|
+
console.log("words words words");
|
|
564
|
+
this.outputTarget.innerHTML = this.previewHTML;
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
get previewHTML() {
|
|
568
|
+
return this.files.map(
|
|
569
|
+
(file) => `<div class="file-preview file-preview-${file.type} layer-children">
|
|
570
|
+
<span class='midwest-badge size-default theme-primary'><span class='value'>${file.type}</span></span>
|
|
571
|
+
<span class='midwest-badge size-default theme-gray ml-auto'><span class='value'>${new Intl.NumberFormat(
|
|
572
|
+
void 0,
|
|
573
|
+
{
|
|
574
|
+
notation: "compact",
|
|
575
|
+
style: "unit",
|
|
576
|
+
unit: "byte",
|
|
577
|
+
unitDisplay: "narrow"
|
|
578
|
+
}
|
|
579
|
+
).format(file.size)}</span></span>
|
|
580
|
+
|
|
581
|
+
${file.type.includes("image") ? `<img src="${window.URL.createObjectURL(file)}" />` : ""}
|
|
582
|
+
${!file.type.includes("image") ? `<div class="placeholder-file">${file.name}</div>` : ""}
|
|
583
|
+
|
|
584
|
+
</div>`
|
|
585
|
+
).join("");
|
|
586
|
+
}
|
|
587
|
+
get files() {
|
|
588
|
+
if (this.inputTarget.files == null) {
|
|
589
|
+
return [];
|
|
590
|
+
}
|
|
591
|
+
return Array.from(this.inputTarget.files);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
class Switch extends Controller {
|
|
596
|
+
connect() {
|
|
597
|
+
console.log("Hello from Switch!");
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/**
|
|
602
|
+
* Custom positioning reference element.
|
|
603
|
+
* @see https://floating-ui.com/docs/virtual-elements
|
|
604
|
+
*/
|
|
605
|
+
|
|
606
|
+
const sides = ['top', 'right', 'bottom', 'left'];
|
|
607
|
+
const alignments = ['start', 'end'];
|
|
608
|
+
const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
|
|
609
|
+
const min = Math.min;
|
|
610
|
+
const max = Math.max;
|
|
611
|
+
const round = Math.round;
|
|
612
|
+
const floor = Math.floor;
|
|
613
|
+
const createCoords = v => ({
|
|
614
|
+
x: v,
|
|
615
|
+
y: v
|
|
616
|
+
});
|
|
617
|
+
const oppositeSideMap = {
|
|
618
|
+
left: 'right',
|
|
619
|
+
right: 'left',
|
|
620
|
+
bottom: 'top',
|
|
621
|
+
top: 'bottom'
|
|
622
|
+
};
|
|
623
|
+
function clamp(start, value, end) {
|
|
624
|
+
return max(start, min(value, end));
|
|
625
|
+
}
|
|
626
|
+
function evaluate(value, param) {
|
|
627
|
+
return typeof value === 'function' ? value(param) : value;
|
|
628
|
+
}
|
|
629
|
+
function getSide(placement) {
|
|
630
|
+
return placement.split('-')[0];
|
|
631
|
+
}
|
|
632
|
+
function getAlignment(placement) {
|
|
633
|
+
return placement.split('-')[1];
|
|
634
|
+
}
|
|
635
|
+
function getOppositeAxis(axis) {
|
|
636
|
+
return axis === 'x' ? 'y' : 'x';
|
|
637
|
+
}
|
|
638
|
+
function getAxisLength(axis) {
|
|
639
|
+
return axis === 'y' ? 'height' : 'width';
|
|
640
|
+
}
|
|
641
|
+
function getSideAxis(placement) {
|
|
642
|
+
const firstChar = placement[0];
|
|
643
|
+
return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
|
|
644
|
+
}
|
|
645
|
+
function getAlignmentAxis(placement) {
|
|
646
|
+
return getOppositeAxis(getSideAxis(placement));
|
|
647
|
+
}
|
|
648
|
+
function getAlignmentSides(placement, rects, rtl) {
|
|
649
|
+
if (rtl === void 0) {
|
|
650
|
+
rtl = false;
|
|
651
|
+
}
|
|
652
|
+
const alignment = getAlignment(placement);
|
|
653
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
654
|
+
const length = getAxisLength(alignmentAxis);
|
|
655
|
+
let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
|
|
656
|
+
if (rects.reference[length] > rects.floating[length]) {
|
|
657
|
+
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
658
|
+
}
|
|
659
|
+
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
660
|
+
}
|
|
661
|
+
function getExpandedPlacements(placement) {
|
|
662
|
+
const oppositePlacement = getOppositePlacement(placement);
|
|
663
|
+
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
664
|
+
}
|
|
665
|
+
function getOppositeAlignmentPlacement(placement) {
|
|
666
|
+
return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
|
|
667
|
+
}
|
|
668
|
+
const lrPlacement = ['left', 'right'];
|
|
669
|
+
const rlPlacement = ['right', 'left'];
|
|
670
|
+
const tbPlacement = ['top', 'bottom'];
|
|
671
|
+
const btPlacement = ['bottom', 'top'];
|
|
672
|
+
function getSideList(side, isStart, rtl) {
|
|
673
|
+
switch (side) {
|
|
674
|
+
case 'top':
|
|
675
|
+
case 'bottom':
|
|
676
|
+
if (rtl) return isStart ? rlPlacement : lrPlacement;
|
|
677
|
+
return isStart ? lrPlacement : rlPlacement;
|
|
678
|
+
case 'left':
|
|
679
|
+
case 'right':
|
|
680
|
+
return isStart ? tbPlacement : btPlacement;
|
|
681
|
+
default:
|
|
682
|
+
return [];
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
686
|
+
const alignment = getAlignment(placement);
|
|
687
|
+
let list = getSideList(getSide(placement), direction === 'start', rtl);
|
|
688
|
+
if (alignment) {
|
|
689
|
+
list = list.map(side => side + "-" + alignment);
|
|
690
|
+
if (flipAlignment) {
|
|
691
|
+
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
return list;
|
|
695
|
+
}
|
|
696
|
+
function getOppositePlacement(placement) {
|
|
697
|
+
const side = getSide(placement);
|
|
698
|
+
return oppositeSideMap[side] + placement.slice(side.length);
|
|
699
|
+
}
|
|
700
|
+
function expandPaddingObject(padding) {
|
|
701
|
+
return {
|
|
702
|
+
top: 0,
|
|
703
|
+
right: 0,
|
|
704
|
+
bottom: 0,
|
|
705
|
+
left: 0,
|
|
706
|
+
...padding
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
function getPaddingObject(padding) {
|
|
710
|
+
return typeof padding !== 'number' ? expandPaddingObject(padding) : {
|
|
711
|
+
top: padding,
|
|
712
|
+
right: padding,
|
|
713
|
+
bottom: padding,
|
|
714
|
+
left: padding
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
function rectToClientRect(rect) {
|
|
718
|
+
const {
|
|
719
|
+
x,
|
|
720
|
+
y,
|
|
721
|
+
width,
|
|
722
|
+
height
|
|
723
|
+
} = rect;
|
|
724
|
+
return {
|
|
725
|
+
width,
|
|
726
|
+
height,
|
|
727
|
+
top: y,
|
|
728
|
+
left: x,
|
|
729
|
+
right: x + width,
|
|
730
|
+
bottom: y + height,
|
|
731
|
+
x,
|
|
732
|
+
y
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
737
|
+
let {
|
|
738
|
+
reference,
|
|
739
|
+
floating
|
|
740
|
+
} = _ref;
|
|
741
|
+
const sideAxis = getSideAxis(placement);
|
|
742
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
743
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
744
|
+
const side = getSide(placement);
|
|
745
|
+
const isVertical = sideAxis === 'y';
|
|
746
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
747
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
748
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
749
|
+
let coords;
|
|
750
|
+
switch (side) {
|
|
751
|
+
case 'top':
|
|
752
|
+
coords = {
|
|
753
|
+
x: commonX,
|
|
754
|
+
y: reference.y - floating.height
|
|
755
|
+
};
|
|
756
|
+
break;
|
|
757
|
+
case 'bottom':
|
|
758
|
+
coords = {
|
|
759
|
+
x: commonX,
|
|
760
|
+
y: reference.y + reference.height
|
|
761
|
+
};
|
|
762
|
+
break;
|
|
763
|
+
case 'right':
|
|
764
|
+
coords = {
|
|
765
|
+
x: reference.x + reference.width,
|
|
766
|
+
y: commonY
|
|
767
|
+
};
|
|
768
|
+
break;
|
|
769
|
+
case 'left':
|
|
770
|
+
coords = {
|
|
771
|
+
x: reference.x - floating.width,
|
|
772
|
+
y: commonY
|
|
773
|
+
};
|
|
774
|
+
break;
|
|
775
|
+
default:
|
|
776
|
+
coords = {
|
|
777
|
+
x: reference.x,
|
|
778
|
+
y: reference.y
|
|
779
|
+
};
|
|
780
|
+
}
|
|
781
|
+
switch (getAlignment(placement)) {
|
|
782
|
+
case 'start':
|
|
783
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
784
|
+
break;
|
|
785
|
+
case 'end':
|
|
786
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
return coords;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Resolves with an object of overflow side offsets that determine how much the
|
|
794
|
+
* element is overflowing a given clipping boundary on each side.
|
|
795
|
+
* - positive = overflowing the boundary by that number of pixels
|
|
796
|
+
* - negative = how many pixels left before it will overflow
|
|
797
|
+
* - 0 = lies flush with the boundary
|
|
798
|
+
* @see https://floating-ui.com/docs/detectOverflow
|
|
799
|
+
*/
|
|
800
|
+
async function detectOverflow(state, options) {
|
|
801
|
+
var _await$platform$isEle;
|
|
802
|
+
if (options === void 0) {
|
|
803
|
+
options = {};
|
|
804
|
+
}
|
|
805
|
+
const {
|
|
806
|
+
x,
|
|
807
|
+
y,
|
|
808
|
+
platform,
|
|
809
|
+
rects,
|
|
810
|
+
elements,
|
|
811
|
+
strategy
|
|
812
|
+
} = state;
|
|
813
|
+
const {
|
|
814
|
+
boundary = 'clippingAncestors',
|
|
815
|
+
rootBoundary = 'viewport',
|
|
816
|
+
elementContext = 'floating',
|
|
817
|
+
altBoundary = false,
|
|
818
|
+
padding = 0
|
|
819
|
+
} = evaluate(options, state);
|
|
820
|
+
const paddingObject = getPaddingObject(padding);
|
|
821
|
+
const altContext = elementContext === 'floating' ? 'reference' : 'floating';
|
|
822
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
823
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
824
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
|
|
825
|
+
boundary,
|
|
826
|
+
rootBoundary,
|
|
827
|
+
strategy
|
|
828
|
+
}));
|
|
829
|
+
const rect = elementContext === 'floating' ? {
|
|
830
|
+
x,
|
|
831
|
+
y,
|
|
832
|
+
width: rects.floating.width,
|
|
833
|
+
height: rects.floating.height
|
|
834
|
+
} : rects.reference;
|
|
835
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
836
|
+
const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
|
|
837
|
+
x: 1,
|
|
838
|
+
y: 1
|
|
839
|
+
} : {
|
|
840
|
+
x: 1,
|
|
841
|
+
y: 1
|
|
842
|
+
};
|
|
843
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
844
|
+
elements,
|
|
845
|
+
rect,
|
|
846
|
+
offsetParent,
|
|
847
|
+
strategy
|
|
848
|
+
}) : rect);
|
|
849
|
+
return {
|
|
850
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
851
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
852
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
853
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
// Maximum number of resets that can occur before bailing to avoid infinite reset loops.
|
|
858
|
+
const MAX_RESET_COUNT = 50;
|
|
859
|
+
|
|
860
|
+
/**
|
|
861
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
862
|
+
* next to a given reference element.
|
|
863
|
+
*
|
|
864
|
+
* This export does not have any `platform` interface logic. You will need to
|
|
865
|
+
* write one for the platform you are using Floating UI with.
|
|
866
|
+
*/
|
|
867
|
+
const computePosition$1 = async (reference, floating, config) => {
|
|
868
|
+
const {
|
|
869
|
+
placement = 'bottom',
|
|
870
|
+
strategy = 'absolute',
|
|
871
|
+
middleware = [],
|
|
872
|
+
platform
|
|
873
|
+
} = config;
|
|
874
|
+
const platformWithDetectOverflow = platform.detectOverflow ? platform : {
|
|
875
|
+
...platform,
|
|
876
|
+
detectOverflow
|
|
877
|
+
};
|
|
878
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
879
|
+
let rects = await platform.getElementRects({
|
|
880
|
+
reference,
|
|
881
|
+
floating,
|
|
882
|
+
strategy
|
|
883
|
+
});
|
|
884
|
+
let {
|
|
885
|
+
x,
|
|
886
|
+
y
|
|
887
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
888
|
+
let statefulPlacement = placement;
|
|
889
|
+
let resetCount = 0;
|
|
890
|
+
const middlewareData = {};
|
|
891
|
+
for (let i = 0; i < middleware.length; i++) {
|
|
892
|
+
const currentMiddleware = middleware[i];
|
|
893
|
+
if (!currentMiddleware) {
|
|
894
|
+
continue;
|
|
895
|
+
}
|
|
896
|
+
const {
|
|
897
|
+
name,
|
|
898
|
+
fn
|
|
899
|
+
} = currentMiddleware;
|
|
900
|
+
const {
|
|
901
|
+
x: nextX,
|
|
902
|
+
y: nextY,
|
|
903
|
+
data,
|
|
904
|
+
reset
|
|
905
|
+
} = await fn({
|
|
906
|
+
x,
|
|
907
|
+
y,
|
|
908
|
+
initialPlacement: placement,
|
|
909
|
+
placement: statefulPlacement,
|
|
910
|
+
strategy,
|
|
911
|
+
middlewareData,
|
|
912
|
+
rects,
|
|
913
|
+
platform: platformWithDetectOverflow,
|
|
914
|
+
elements: {
|
|
915
|
+
reference,
|
|
916
|
+
floating
|
|
917
|
+
}
|
|
918
|
+
});
|
|
919
|
+
x = nextX != null ? nextX : x;
|
|
920
|
+
y = nextY != null ? nextY : y;
|
|
921
|
+
middlewareData[name] = {
|
|
922
|
+
...middlewareData[name],
|
|
923
|
+
...data
|
|
924
|
+
};
|
|
925
|
+
if (reset && resetCount < MAX_RESET_COUNT) {
|
|
926
|
+
resetCount++;
|
|
927
|
+
if (typeof reset === 'object') {
|
|
928
|
+
if (reset.placement) {
|
|
929
|
+
statefulPlacement = reset.placement;
|
|
930
|
+
}
|
|
931
|
+
if (reset.rects) {
|
|
932
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
933
|
+
reference,
|
|
934
|
+
floating,
|
|
935
|
+
strategy
|
|
936
|
+
}) : reset.rects;
|
|
937
|
+
}
|
|
938
|
+
({
|
|
939
|
+
x,
|
|
940
|
+
y
|
|
941
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
942
|
+
}
|
|
943
|
+
i = -1;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
return {
|
|
947
|
+
x,
|
|
948
|
+
y,
|
|
949
|
+
placement: statefulPlacement,
|
|
950
|
+
strategy,
|
|
951
|
+
middlewareData
|
|
952
|
+
};
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Provides data to position an inner element of the floating element so that it
|
|
957
|
+
* appears centered to the reference element.
|
|
958
|
+
* @see https://floating-ui.com/docs/arrow
|
|
959
|
+
*/
|
|
960
|
+
const arrow = options => ({
|
|
961
|
+
name: 'arrow',
|
|
962
|
+
options,
|
|
963
|
+
async fn(state) {
|
|
964
|
+
const {
|
|
965
|
+
x,
|
|
966
|
+
y,
|
|
967
|
+
placement,
|
|
968
|
+
rects,
|
|
969
|
+
platform,
|
|
970
|
+
elements,
|
|
971
|
+
middlewareData
|
|
972
|
+
} = state;
|
|
973
|
+
// Since `element` is required, we don't Partial<> the type.
|
|
974
|
+
const {
|
|
975
|
+
element,
|
|
976
|
+
padding = 0
|
|
977
|
+
} = evaluate(options, state) || {};
|
|
978
|
+
if (element == null) {
|
|
979
|
+
return {};
|
|
980
|
+
}
|
|
981
|
+
const paddingObject = getPaddingObject(padding);
|
|
982
|
+
const coords = {
|
|
983
|
+
x,
|
|
984
|
+
y
|
|
985
|
+
};
|
|
986
|
+
const axis = getAlignmentAxis(placement);
|
|
987
|
+
const length = getAxisLength(axis);
|
|
988
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
989
|
+
const isYAxis = axis === 'y';
|
|
990
|
+
const minProp = isYAxis ? 'top' : 'left';
|
|
991
|
+
const maxProp = isYAxis ? 'bottom' : 'right';
|
|
992
|
+
const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
|
|
993
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
994
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
995
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
996
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
997
|
+
|
|
998
|
+
// DOM platform can return `window` as the `offsetParent`.
|
|
999
|
+
if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
|
|
1000
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
1001
|
+
}
|
|
1002
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
1003
|
+
|
|
1004
|
+
// If the padding is large enough that it causes the arrow to no longer be
|
|
1005
|
+
// centered, modify the padding so that it is centered.
|
|
1006
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
1007
|
+
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
1008
|
+
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
1009
|
+
|
|
1010
|
+
// Make sure the arrow doesn't overflow the floating element if the center
|
|
1011
|
+
// point is outside the floating element's bounds.
|
|
1012
|
+
const min$1 = minPadding;
|
|
1013
|
+
const max = clientSize - arrowDimensions[length] - maxPadding;
|
|
1014
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
1015
|
+
const offset = clamp(min$1, center, max);
|
|
1016
|
+
|
|
1017
|
+
// If the reference is small enough that the arrow's padding causes it to
|
|
1018
|
+
// to point to nothing for an aligned placement, adjust the offset of the
|
|
1019
|
+
// floating element itself. To ensure `shift()` continues to take action,
|
|
1020
|
+
// a single reset is performed when this is true.
|
|
1021
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
1022
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
|
|
1023
|
+
return {
|
|
1024
|
+
[axis]: coords[axis] + alignmentOffset,
|
|
1025
|
+
data: {
|
|
1026
|
+
[axis]: offset,
|
|
1027
|
+
centerOffset: center - offset - alignmentOffset,
|
|
1028
|
+
...(shouldAddOffset && {
|
|
1029
|
+
alignmentOffset
|
|
1030
|
+
})
|
|
1031
|
+
},
|
|
1032
|
+
reset: shouldAddOffset
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
});
|
|
1036
|
+
|
|
1037
|
+
function getPlacementList(alignment, autoAlignment, allowedPlacements) {
|
|
1038
|
+
const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
|
|
1039
|
+
return allowedPlacementsSortedByAlignment.filter(placement => {
|
|
1040
|
+
if (alignment) {
|
|
1041
|
+
return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
|
|
1042
|
+
}
|
|
1043
|
+
return true;
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
1048
|
+
* that has the most space available automatically, without needing to specify a
|
|
1049
|
+
* preferred placement. Alternative to `flip`.
|
|
1050
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
1051
|
+
*/
|
|
1052
|
+
const autoPlacement$1 = function (options) {
|
|
1053
|
+
if (options === void 0) {
|
|
1054
|
+
options = {};
|
|
1055
|
+
}
|
|
1056
|
+
return {
|
|
1057
|
+
name: 'autoPlacement',
|
|
1058
|
+
options,
|
|
1059
|
+
async fn(state) {
|
|
1060
|
+
var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
|
|
1061
|
+
const {
|
|
1062
|
+
rects,
|
|
1063
|
+
middlewareData,
|
|
1064
|
+
placement,
|
|
1065
|
+
platform,
|
|
1066
|
+
elements
|
|
1067
|
+
} = state;
|
|
1068
|
+
const {
|
|
1069
|
+
crossAxis = false,
|
|
1070
|
+
alignment,
|
|
1071
|
+
allowedPlacements = placements,
|
|
1072
|
+
autoAlignment = true,
|
|
1073
|
+
...detectOverflowOptions
|
|
1074
|
+
} = evaluate(options, state);
|
|
1075
|
+
const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
|
|
1076
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
1077
|
+
const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
|
|
1078
|
+
const currentPlacement = placements$1[currentIndex];
|
|
1079
|
+
if (currentPlacement == null) {
|
|
1080
|
+
return {};
|
|
1081
|
+
}
|
|
1082
|
+
const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
|
|
1083
|
+
|
|
1084
|
+
// Make `computeCoords` start from the right place.
|
|
1085
|
+
if (placement !== currentPlacement) {
|
|
1086
|
+
return {
|
|
1087
|
+
reset: {
|
|
1088
|
+
placement: placements$1[0]
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
|
|
1093
|
+
const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
|
|
1094
|
+
placement: currentPlacement,
|
|
1095
|
+
overflows: currentOverflows
|
|
1096
|
+
}];
|
|
1097
|
+
const nextPlacement = placements$1[currentIndex + 1];
|
|
1098
|
+
|
|
1099
|
+
// There are more placements to check.
|
|
1100
|
+
if (nextPlacement) {
|
|
1101
|
+
return {
|
|
1102
|
+
data: {
|
|
1103
|
+
index: currentIndex + 1,
|
|
1104
|
+
overflows: allOverflows
|
|
1105
|
+
},
|
|
1106
|
+
reset: {
|
|
1107
|
+
placement: nextPlacement
|
|
1108
|
+
}
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
const placementsSortedByMostSpace = allOverflows.map(d => {
|
|
1112
|
+
const alignment = getAlignment(d.placement);
|
|
1113
|
+
return [d.placement, alignment && crossAxis ?
|
|
1114
|
+
// Check along the mainAxis and main crossAxis side.
|
|
1115
|
+
d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
|
|
1116
|
+
// Check only the mainAxis.
|
|
1117
|
+
d.overflows[0], d.overflows];
|
|
1118
|
+
}).sort((a, b) => a[1] - b[1]);
|
|
1119
|
+
const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
|
|
1120
|
+
// Aligned placements should not check their opposite crossAxis
|
|
1121
|
+
// side.
|
|
1122
|
+
getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
|
|
1123
|
+
const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
|
|
1124
|
+
if (resetPlacement !== placement) {
|
|
1125
|
+
return {
|
|
1126
|
+
data: {
|
|
1127
|
+
index: currentIndex + 1,
|
|
1128
|
+
overflows: allOverflows
|
|
1129
|
+
},
|
|
1130
|
+
reset: {
|
|
1131
|
+
placement: resetPlacement
|
|
1132
|
+
}
|
|
1133
|
+
};
|
|
1134
|
+
}
|
|
1135
|
+
return {};
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
|
|
1140
|
+
/**
|
|
1141
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
1142
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
1143
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
1144
|
+
* @see https://floating-ui.com/docs/flip
|
|
1145
|
+
*/
|
|
1146
|
+
const flip = function (options) {
|
|
1147
|
+
if (options === void 0) {
|
|
1148
|
+
options = {};
|
|
1149
|
+
}
|
|
1150
|
+
return {
|
|
1151
|
+
name: 'flip',
|
|
1152
|
+
options,
|
|
1153
|
+
async fn(state) {
|
|
1154
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
1155
|
+
const {
|
|
1156
|
+
placement,
|
|
1157
|
+
middlewareData,
|
|
1158
|
+
rects,
|
|
1159
|
+
initialPlacement,
|
|
1160
|
+
platform,
|
|
1161
|
+
elements
|
|
1162
|
+
} = state;
|
|
1163
|
+
const {
|
|
1164
|
+
mainAxis: checkMainAxis = true,
|
|
1165
|
+
crossAxis: checkCrossAxis = true,
|
|
1166
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
1167
|
+
fallbackStrategy = 'bestFit',
|
|
1168
|
+
fallbackAxisSideDirection = 'none',
|
|
1169
|
+
flipAlignment = true,
|
|
1170
|
+
...detectOverflowOptions
|
|
1171
|
+
} = evaluate(options, state);
|
|
1172
|
+
|
|
1173
|
+
// If a reset by the arrow was caused due to an alignment offset being
|
|
1174
|
+
// added, we should skip any logic now since `flip()` has already done its
|
|
1175
|
+
// work.
|
|
1176
|
+
// https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
|
|
1177
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1178
|
+
return {};
|
|
1179
|
+
}
|
|
1180
|
+
const side = getSide(placement);
|
|
1181
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
1182
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
1183
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
1184
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
1185
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
|
|
1186
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
1187
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
1188
|
+
}
|
|
1189
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
1190
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
1191
|
+
const overflows = [];
|
|
1192
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
1193
|
+
if (checkMainAxis) {
|
|
1194
|
+
overflows.push(overflow[side]);
|
|
1195
|
+
}
|
|
1196
|
+
if (checkCrossAxis) {
|
|
1197
|
+
const sides = getAlignmentSides(placement, rects, rtl);
|
|
1198
|
+
overflows.push(overflow[sides[0]], overflow[sides[1]]);
|
|
1199
|
+
}
|
|
1200
|
+
overflowsData = [...overflowsData, {
|
|
1201
|
+
placement,
|
|
1202
|
+
overflows
|
|
1203
|
+
}];
|
|
1204
|
+
|
|
1205
|
+
// One or more sides is overflowing.
|
|
1206
|
+
if (!overflows.every(side => side <= 0)) {
|
|
1207
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
1208
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
1209
|
+
const nextPlacement = placements[nextIndex];
|
|
1210
|
+
if (nextPlacement) {
|
|
1211
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
1212
|
+
if (!ignoreCrossAxisOverflow ||
|
|
1213
|
+
// We leave the current main axis only if every placement on that axis
|
|
1214
|
+
// overflows the main axis.
|
|
1215
|
+
overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
1216
|
+
// Try next placement and re-run the lifecycle.
|
|
1217
|
+
return {
|
|
1218
|
+
data: {
|
|
1219
|
+
index: nextIndex,
|
|
1220
|
+
overflows: overflowsData
|
|
1221
|
+
},
|
|
1222
|
+
reset: {
|
|
1223
|
+
placement: nextPlacement
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
// First, find the candidates that fit on the mainAxis side of overflow,
|
|
1230
|
+
// then find the placement that fits the best on the main crossAxis side.
|
|
1231
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
1232
|
+
|
|
1233
|
+
// Otherwise fallback.
|
|
1234
|
+
if (!resetPlacement) {
|
|
1235
|
+
switch (fallbackStrategy) {
|
|
1236
|
+
case 'bestFit':
|
|
1237
|
+
{
|
|
1238
|
+
var _overflowsData$filter2;
|
|
1239
|
+
const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
|
|
1240
|
+
if (hasFallbackAxisSideDirection) {
|
|
1241
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
1242
|
+
return currentSideAxis === initialSideAxis ||
|
|
1243
|
+
// Create a bias to the `y` side axis due to horizontal
|
|
1244
|
+
// reading directions favoring greater width.
|
|
1245
|
+
currentSideAxis === 'y';
|
|
1246
|
+
}
|
|
1247
|
+
return true;
|
|
1248
|
+
}).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
1249
|
+
if (placement) {
|
|
1250
|
+
resetPlacement = placement;
|
|
1251
|
+
}
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
case 'initialPlacement':
|
|
1255
|
+
resetPlacement = initialPlacement;
|
|
1256
|
+
break;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
if (placement !== resetPlacement) {
|
|
1260
|
+
return {
|
|
1261
|
+
reset: {
|
|
1262
|
+
placement: resetPlacement
|
|
1263
|
+
}
|
|
1264
|
+
};
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
return {};
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
function getSideOffsets(overflow, rect) {
|
|
1273
|
+
return {
|
|
1274
|
+
top: overflow.top - rect.height,
|
|
1275
|
+
right: overflow.right - rect.width,
|
|
1276
|
+
bottom: overflow.bottom - rect.height,
|
|
1277
|
+
left: overflow.left - rect.width
|
|
1278
|
+
};
|
|
1279
|
+
}
|
|
1280
|
+
function isAnySideFullyClipped(overflow) {
|
|
1281
|
+
return sides.some(side => overflow[side] >= 0);
|
|
1282
|
+
}
|
|
1283
|
+
/**
|
|
1284
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
1285
|
+
* when it is not in the same clipping context as the reference element.
|
|
1286
|
+
* @see https://floating-ui.com/docs/hide
|
|
1287
|
+
*/
|
|
1288
|
+
const hide$1 = function (options) {
|
|
1289
|
+
if (options === void 0) {
|
|
1290
|
+
options = {};
|
|
1291
|
+
}
|
|
1292
|
+
return {
|
|
1293
|
+
name: 'hide',
|
|
1294
|
+
options,
|
|
1295
|
+
async fn(state) {
|
|
1296
|
+
const {
|
|
1297
|
+
rects,
|
|
1298
|
+
platform
|
|
1299
|
+
} = state;
|
|
1300
|
+
const {
|
|
1301
|
+
strategy = 'referenceHidden',
|
|
1302
|
+
...detectOverflowOptions
|
|
1303
|
+
} = evaluate(options, state);
|
|
1304
|
+
switch (strategy) {
|
|
1305
|
+
case 'referenceHidden':
|
|
1306
|
+
{
|
|
1307
|
+
const overflow = await platform.detectOverflow(state, {
|
|
1308
|
+
...detectOverflowOptions,
|
|
1309
|
+
elementContext: 'reference'
|
|
1310
|
+
});
|
|
1311
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
1312
|
+
return {
|
|
1313
|
+
data: {
|
|
1314
|
+
referenceHiddenOffsets: offsets,
|
|
1315
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
1316
|
+
}
|
|
1317
|
+
};
|
|
1318
|
+
}
|
|
1319
|
+
case 'escaped':
|
|
1320
|
+
{
|
|
1321
|
+
const overflow = await platform.detectOverflow(state, {
|
|
1322
|
+
...detectOverflowOptions,
|
|
1323
|
+
altBoundary: true
|
|
1324
|
+
});
|
|
1325
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
1326
|
+
return {
|
|
1327
|
+
data: {
|
|
1328
|
+
escapedOffsets: offsets,
|
|
1329
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
1330
|
+
}
|
|
1331
|
+
};
|
|
1332
|
+
}
|
|
1333
|
+
default:
|
|
1334
|
+
{
|
|
1335
|
+
return {};
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
function getBoundingRect(rects) {
|
|
1343
|
+
const minX = min(...rects.map(rect => rect.left));
|
|
1344
|
+
const minY = min(...rects.map(rect => rect.top));
|
|
1345
|
+
const maxX = max(...rects.map(rect => rect.right));
|
|
1346
|
+
const maxY = max(...rects.map(rect => rect.bottom));
|
|
1347
|
+
return {
|
|
1348
|
+
x: minX,
|
|
1349
|
+
y: minY,
|
|
1350
|
+
width: maxX - minX,
|
|
1351
|
+
height: maxY - minY
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
function getRectsByLine(rects) {
|
|
1355
|
+
const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
|
|
1356
|
+
const groups = [];
|
|
1357
|
+
let prevRect = null;
|
|
1358
|
+
for (let i = 0; i < sortedRects.length; i++) {
|
|
1359
|
+
const rect = sortedRects[i];
|
|
1360
|
+
if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
|
|
1361
|
+
groups.push([rect]);
|
|
1362
|
+
} else {
|
|
1363
|
+
groups[groups.length - 1].push(rect);
|
|
1364
|
+
}
|
|
1365
|
+
prevRect = rect;
|
|
1366
|
+
}
|
|
1367
|
+
return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
|
|
1368
|
+
}
|
|
1369
|
+
/**
|
|
1370
|
+
* Provides improved positioning for inline reference elements that can span
|
|
1371
|
+
* over multiple lines, such as hyperlinks or range selections.
|
|
1372
|
+
* @see https://floating-ui.com/docs/inline
|
|
1373
|
+
*/
|
|
1374
|
+
const inline = function (options) {
|
|
1375
|
+
if (options === void 0) {
|
|
1376
|
+
options = {};
|
|
1377
|
+
}
|
|
1378
|
+
return {
|
|
1379
|
+
name: 'inline',
|
|
1380
|
+
options,
|
|
1381
|
+
async fn(state) {
|
|
1382
|
+
const {
|
|
1383
|
+
placement,
|
|
1384
|
+
elements,
|
|
1385
|
+
rects,
|
|
1386
|
+
platform,
|
|
1387
|
+
strategy
|
|
1388
|
+
} = state;
|
|
1389
|
+
// A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
|
|
1390
|
+
// ClientRect's bounds, despite the event listener being triggered. A
|
|
1391
|
+
// padding of 2 seems to handle this issue.
|
|
1392
|
+
const {
|
|
1393
|
+
padding = 2,
|
|
1394
|
+
x,
|
|
1395
|
+
y
|
|
1396
|
+
} = evaluate(options, state);
|
|
1397
|
+
const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
|
|
1398
|
+
const clientRects = getRectsByLine(nativeClientRects);
|
|
1399
|
+
const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
|
|
1400
|
+
const paddingObject = getPaddingObject(padding);
|
|
1401
|
+
function getBoundingClientRect() {
|
|
1402
|
+
// There are two rects and they are disjoined.
|
|
1403
|
+
if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
|
|
1404
|
+
// Find the first rect in which the point is fully inside.
|
|
1405
|
+
return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
// There are 2 or more connected rects.
|
|
1409
|
+
if (clientRects.length >= 2) {
|
|
1410
|
+
if (getSideAxis(placement) === 'y') {
|
|
1411
|
+
const firstRect = clientRects[0];
|
|
1412
|
+
const lastRect = clientRects[clientRects.length - 1];
|
|
1413
|
+
const isTop = getSide(placement) === 'top';
|
|
1414
|
+
const top = firstRect.top;
|
|
1415
|
+
const bottom = lastRect.bottom;
|
|
1416
|
+
const left = isTop ? firstRect.left : lastRect.left;
|
|
1417
|
+
const right = isTop ? firstRect.right : lastRect.right;
|
|
1418
|
+
const width = right - left;
|
|
1419
|
+
const height = bottom - top;
|
|
1420
|
+
return {
|
|
1421
|
+
top,
|
|
1422
|
+
bottom,
|
|
1423
|
+
left,
|
|
1424
|
+
right,
|
|
1425
|
+
width,
|
|
1426
|
+
height,
|
|
1427
|
+
x: left,
|
|
1428
|
+
y: top
|
|
1429
|
+
};
|
|
1430
|
+
}
|
|
1431
|
+
const isLeftSide = getSide(placement) === 'left';
|
|
1432
|
+
const maxRight = max(...clientRects.map(rect => rect.right));
|
|
1433
|
+
const minLeft = min(...clientRects.map(rect => rect.left));
|
|
1434
|
+
const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
|
|
1435
|
+
const top = measureRects[0].top;
|
|
1436
|
+
const bottom = measureRects[measureRects.length - 1].bottom;
|
|
1437
|
+
const left = minLeft;
|
|
1438
|
+
const right = maxRight;
|
|
1439
|
+
const width = right - left;
|
|
1440
|
+
const height = bottom - top;
|
|
1441
|
+
return {
|
|
1442
|
+
top,
|
|
1443
|
+
bottom,
|
|
1444
|
+
left,
|
|
1445
|
+
right,
|
|
1446
|
+
width,
|
|
1447
|
+
height,
|
|
1448
|
+
x: left,
|
|
1449
|
+
y: top
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
return fallback;
|
|
1453
|
+
}
|
|
1454
|
+
const resetRects = await platform.getElementRects({
|
|
1455
|
+
reference: {
|
|
1456
|
+
getBoundingClientRect
|
|
1457
|
+
},
|
|
1458
|
+
floating: elements.floating,
|
|
1459
|
+
strategy
|
|
1460
|
+
});
|
|
1461
|
+
if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
|
|
1462
|
+
return {
|
|
1463
|
+
reset: {
|
|
1464
|
+
rects: resetRects
|
|
1465
|
+
}
|
|
1466
|
+
};
|
|
1467
|
+
}
|
|
1468
|
+
return {};
|
|
1469
|
+
}
|
|
1470
|
+
};
|
|
1471
|
+
};
|
|
1472
|
+
|
|
1473
|
+
const originSides = /*#__PURE__*/new Set(['left', 'top']);
|
|
1474
|
+
|
|
1475
|
+
// For type backwards-compatibility, the `OffsetOptions` type was also
|
|
1476
|
+
// Derivable.
|
|
1477
|
+
|
|
1478
|
+
async function convertValueToCoords(state, options) {
|
|
1479
|
+
const {
|
|
1480
|
+
placement,
|
|
1481
|
+
platform,
|
|
1482
|
+
elements
|
|
1483
|
+
} = state;
|
|
1484
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
1485
|
+
const side = getSide(placement);
|
|
1486
|
+
const alignment = getAlignment(placement);
|
|
1487
|
+
const isVertical = getSideAxis(placement) === 'y';
|
|
1488
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
1489
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
1490
|
+
const rawValue = evaluate(options, state);
|
|
1491
|
+
|
|
1492
|
+
// eslint-disable-next-line prefer-const
|
|
1493
|
+
let {
|
|
1494
|
+
mainAxis,
|
|
1495
|
+
crossAxis,
|
|
1496
|
+
alignmentAxis
|
|
1497
|
+
} = typeof rawValue === 'number' ? {
|
|
1498
|
+
mainAxis: rawValue,
|
|
1499
|
+
crossAxis: 0,
|
|
1500
|
+
alignmentAxis: null
|
|
1501
|
+
} : {
|
|
1502
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
1503
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
1504
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
1505
|
+
};
|
|
1506
|
+
if (alignment && typeof alignmentAxis === 'number') {
|
|
1507
|
+
crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
|
|
1508
|
+
}
|
|
1509
|
+
return isVertical ? {
|
|
1510
|
+
x: crossAxis * crossAxisMulti,
|
|
1511
|
+
y: mainAxis * mainAxisMulti
|
|
1512
|
+
} : {
|
|
1513
|
+
x: mainAxis * mainAxisMulti,
|
|
1514
|
+
y: crossAxis * crossAxisMulti
|
|
1515
|
+
};
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
/**
|
|
1519
|
+
* Modifies the placement by translating the floating element along the
|
|
1520
|
+
* specified axes.
|
|
1521
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
1522
|
+
* object may be passed.
|
|
1523
|
+
* @see https://floating-ui.com/docs/offset
|
|
1524
|
+
*/
|
|
1525
|
+
const offset$1 = function (options) {
|
|
1526
|
+
if (options === void 0) {
|
|
1527
|
+
options = 0;
|
|
1528
|
+
}
|
|
1529
|
+
return {
|
|
1530
|
+
name: 'offset',
|
|
1531
|
+
options,
|
|
1532
|
+
async fn(state) {
|
|
1533
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
1534
|
+
const {
|
|
1535
|
+
x,
|
|
1536
|
+
y,
|
|
1537
|
+
placement,
|
|
1538
|
+
middlewareData
|
|
1539
|
+
} = state;
|
|
1540
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
1541
|
+
|
|
1542
|
+
// If the placement is the same and the arrow caused an alignment offset
|
|
1543
|
+
// then we don't need to change the positioning coordinates.
|
|
1544
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
1545
|
+
return {};
|
|
1546
|
+
}
|
|
1547
|
+
return {
|
|
1548
|
+
x: x + diffCoords.x,
|
|
1549
|
+
y: y + diffCoords.y,
|
|
1550
|
+
data: {
|
|
1551
|
+
...diffCoords,
|
|
1552
|
+
placement
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
};
|
|
1557
|
+
};
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
1561
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
1562
|
+
* @see https://floating-ui.com/docs/shift
|
|
1563
|
+
*/
|
|
1564
|
+
const shift$1 = function (options) {
|
|
1565
|
+
if (options === void 0) {
|
|
1566
|
+
options = {};
|
|
1567
|
+
}
|
|
1568
|
+
return {
|
|
1569
|
+
name: 'shift',
|
|
1570
|
+
options,
|
|
1571
|
+
async fn(state) {
|
|
1572
|
+
const {
|
|
1573
|
+
x,
|
|
1574
|
+
y,
|
|
1575
|
+
placement,
|
|
1576
|
+
platform
|
|
1577
|
+
} = state;
|
|
1578
|
+
const {
|
|
1579
|
+
mainAxis: checkMainAxis = true,
|
|
1580
|
+
crossAxis: checkCrossAxis = false,
|
|
1581
|
+
limiter = {
|
|
1582
|
+
fn: _ref => {
|
|
1583
|
+
let {
|
|
1584
|
+
x,
|
|
1585
|
+
y
|
|
1586
|
+
} = _ref;
|
|
1587
|
+
return {
|
|
1588
|
+
x,
|
|
1589
|
+
y
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
...detectOverflowOptions
|
|
1594
|
+
} = evaluate(options, state);
|
|
1595
|
+
const coords = {
|
|
1596
|
+
x,
|
|
1597
|
+
y
|
|
1598
|
+
};
|
|
1599
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
1600
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
1601
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
1602
|
+
let mainAxisCoord = coords[mainAxis];
|
|
1603
|
+
let crossAxisCoord = coords[crossAxis];
|
|
1604
|
+
if (checkMainAxis) {
|
|
1605
|
+
const minSide = mainAxis === 'y' ? 'top' : 'left';
|
|
1606
|
+
const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
|
|
1607
|
+
const min = mainAxisCoord + overflow[minSide];
|
|
1608
|
+
const max = mainAxisCoord - overflow[maxSide];
|
|
1609
|
+
mainAxisCoord = clamp(min, mainAxisCoord, max);
|
|
1610
|
+
}
|
|
1611
|
+
if (checkCrossAxis) {
|
|
1612
|
+
const minSide = crossAxis === 'y' ? 'top' : 'left';
|
|
1613
|
+
const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
|
|
1614
|
+
const min = crossAxisCoord + overflow[minSide];
|
|
1615
|
+
const max = crossAxisCoord - overflow[maxSide];
|
|
1616
|
+
crossAxisCoord = clamp(min, crossAxisCoord, max);
|
|
1617
|
+
}
|
|
1618
|
+
const limitedCoords = limiter.fn({
|
|
1619
|
+
...state,
|
|
1620
|
+
[mainAxis]: mainAxisCoord,
|
|
1621
|
+
[crossAxis]: crossAxisCoord
|
|
1622
|
+
});
|
|
1623
|
+
return {
|
|
1624
|
+
...limitedCoords,
|
|
1625
|
+
data: {
|
|
1626
|
+
x: limitedCoords.x - x,
|
|
1627
|
+
y: limitedCoords.y - y,
|
|
1628
|
+
enabled: {
|
|
1629
|
+
[mainAxis]: checkMainAxis,
|
|
1630
|
+
[crossAxis]: checkCrossAxis
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
};
|
|
1634
|
+
}
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
/**
|
|
1638
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
1639
|
+
*/
|
|
1640
|
+
const limitShift = function (options) {
|
|
1641
|
+
if (options === void 0) {
|
|
1642
|
+
options = {};
|
|
1643
|
+
}
|
|
1644
|
+
return {
|
|
1645
|
+
options,
|
|
1646
|
+
fn(state) {
|
|
1647
|
+
const {
|
|
1648
|
+
x,
|
|
1649
|
+
y,
|
|
1650
|
+
placement,
|
|
1651
|
+
rects,
|
|
1652
|
+
middlewareData
|
|
1653
|
+
} = state;
|
|
1654
|
+
const {
|
|
1655
|
+
offset = 0,
|
|
1656
|
+
mainAxis: checkMainAxis = true,
|
|
1657
|
+
crossAxis: checkCrossAxis = true
|
|
1658
|
+
} = evaluate(options, state);
|
|
1659
|
+
const coords = {
|
|
1660
|
+
x,
|
|
1661
|
+
y
|
|
1662
|
+
};
|
|
1663
|
+
const crossAxis = getSideAxis(placement);
|
|
1664
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
1665
|
+
let mainAxisCoord = coords[mainAxis];
|
|
1666
|
+
let crossAxisCoord = coords[crossAxis];
|
|
1667
|
+
const rawOffset = evaluate(offset, state);
|
|
1668
|
+
const computedOffset = typeof rawOffset === 'number' ? {
|
|
1669
|
+
mainAxis: rawOffset,
|
|
1670
|
+
crossAxis: 0
|
|
1671
|
+
} : {
|
|
1672
|
+
mainAxis: 0,
|
|
1673
|
+
crossAxis: 0,
|
|
1674
|
+
...rawOffset
|
|
1675
|
+
};
|
|
1676
|
+
if (checkMainAxis) {
|
|
1677
|
+
const len = mainAxis === 'y' ? 'height' : 'width';
|
|
1678
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
1679
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
1680
|
+
if (mainAxisCoord < limitMin) {
|
|
1681
|
+
mainAxisCoord = limitMin;
|
|
1682
|
+
} else if (mainAxisCoord > limitMax) {
|
|
1683
|
+
mainAxisCoord = limitMax;
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
if (checkCrossAxis) {
|
|
1687
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
1688
|
+
const len = mainAxis === 'y' ? 'width' : 'height';
|
|
1689
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
1690
|
+
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
1691
|
+
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
1692
|
+
if (crossAxisCoord < limitMin) {
|
|
1693
|
+
crossAxisCoord = limitMin;
|
|
1694
|
+
} else if (crossAxisCoord > limitMax) {
|
|
1695
|
+
crossAxisCoord = limitMax;
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
return {
|
|
1699
|
+
[mainAxis]: mainAxisCoord,
|
|
1700
|
+
[crossAxis]: crossAxisCoord
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
};
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Provides data that allows you to change the size of the floating element —
|
|
1708
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
1709
|
+
* width of the reference element.
|
|
1710
|
+
* @see https://floating-ui.com/docs/size
|
|
1711
|
+
*/
|
|
1712
|
+
const size = function (options) {
|
|
1713
|
+
if (options === void 0) {
|
|
1714
|
+
options = {};
|
|
1715
|
+
}
|
|
1716
|
+
return {
|
|
1717
|
+
name: 'size',
|
|
1718
|
+
options,
|
|
1719
|
+
async fn(state) {
|
|
1720
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
1721
|
+
const {
|
|
1722
|
+
placement,
|
|
1723
|
+
rects,
|
|
1724
|
+
platform,
|
|
1725
|
+
elements
|
|
1726
|
+
} = state;
|
|
1727
|
+
const {
|
|
1728
|
+
apply = () => {},
|
|
1729
|
+
...detectOverflowOptions
|
|
1730
|
+
} = evaluate(options, state);
|
|
1731
|
+
const overflow = await platform.detectOverflow(state, detectOverflowOptions);
|
|
1732
|
+
const side = getSide(placement);
|
|
1733
|
+
const alignment = getAlignment(placement);
|
|
1734
|
+
const isYAxis = getSideAxis(placement) === 'y';
|
|
1735
|
+
const {
|
|
1736
|
+
width,
|
|
1737
|
+
height
|
|
1738
|
+
} = rects.floating;
|
|
1739
|
+
let heightSide;
|
|
1740
|
+
let widthSide;
|
|
1741
|
+
if (side === 'top' || side === 'bottom') {
|
|
1742
|
+
heightSide = side;
|
|
1743
|
+
widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
|
|
1744
|
+
} else {
|
|
1745
|
+
widthSide = side;
|
|
1746
|
+
heightSide = alignment === 'end' ? 'top' : 'bottom';
|
|
1747
|
+
}
|
|
1748
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
1749
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
1750
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
1751
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
1752
|
+
const noShift = !state.middlewareData.shift;
|
|
1753
|
+
let availableHeight = overflowAvailableHeight;
|
|
1754
|
+
let availableWidth = overflowAvailableWidth;
|
|
1755
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
1756
|
+
availableWidth = maximumClippingWidth;
|
|
1757
|
+
}
|
|
1758
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
1759
|
+
availableHeight = maximumClippingHeight;
|
|
1760
|
+
}
|
|
1761
|
+
if (noShift && !alignment) {
|
|
1762
|
+
const xMin = max(overflow.left, 0);
|
|
1763
|
+
const xMax = max(overflow.right, 0);
|
|
1764
|
+
const yMin = max(overflow.top, 0);
|
|
1765
|
+
const yMax = max(overflow.bottom, 0);
|
|
1766
|
+
if (isYAxis) {
|
|
1767
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
1768
|
+
} else {
|
|
1769
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
await apply({
|
|
1773
|
+
...state,
|
|
1774
|
+
availableWidth,
|
|
1775
|
+
availableHeight
|
|
1776
|
+
});
|
|
1777
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
1778
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
1779
|
+
return {
|
|
1780
|
+
reset: {
|
|
1781
|
+
rects: true
|
|
1782
|
+
}
|
|
1783
|
+
};
|
|
1784
|
+
}
|
|
1785
|
+
return {};
|
|
1786
|
+
}
|
|
1787
|
+
};
|
|
1788
|
+
};
|
|
1789
|
+
|
|
1790
|
+
function hasWindow() {
|
|
1791
|
+
return typeof window !== 'undefined';
|
|
1792
|
+
}
|
|
1793
|
+
function getNodeName(node) {
|
|
1794
|
+
if (isNode(node)) {
|
|
1795
|
+
return (node.nodeName || '').toLowerCase();
|
|
1796
|
+
}
|
|
1797
|
+
// Mocked nodes in testing environments may not be instances of Node. By
|
|
1798
|
+
// returning `#document` an infinite loop won't occur.
|
|
1799
|
+
// https://github.com/floating-ui/floating-ui/issues/2317
|
|
1800
|
+
return '#document';
|
|
1801
|
+
}
|
|
1802
|
+
function getWindow(node) {
|
|
1803
|
+
var _node$ownerDocument;
|
|
1804
|
+
return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
1805
|
+
}
|
|
1806
|
+
function getDocumentElement(node) {
|
|
1807
|
+
var _ref;
|
|
1808
|
+
return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
|
|
1809
|
+
}
|
|
1810
|
+
function isNode(value) {
|
|
1811
|
+
if (!hasWindow()) {
|
|
1812
|
+
return false;
|
|
1813
|
+
}
|
|
1814
|
+
return value instanceof Node || value instanceof getWindow(value).Node;
|
|
1815
|
+
}
|
|
1816
|
+
function isElement(value) {
|
|
1817
|
+
if (!hasWindow()) {
|
|
1818
|
+
return false;
|
|
1819
|
+
}
|
|
1820
|
+
return value instanceof Element || value instanceof getWindow(value).Element;
|
|
1821
|
+
}
|
|
1822
|
+
function isHTMLElement(value) {
|
|
1823
|
+
if (!hasWindow()) {
|
|
1824
|
+
return false;
|
|
1825
|
+
}
|
|
1826
|
+
return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
|
|
1827
|
+
}
|
|
1828
|
+
function isShadowRoot(value) {
|
|
1829
|
+
if (!hasWindow() || typeof ShadowRoot === 'undefined') {
|
|
1830
|
+
return false;
|
|
1831
|
+
}
|
|
1832
|
+
return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
|
|
1833
|
+
}
|
|
1834
|
+
function isOverflowElement(element) {
|
|
1835
|
+
const {
|
|
1836
|
+
overflow,
|
|
1837
|
+
overflowX,
|
|
1838
|
+
overflowY,
|
|
1839
|
+
display
|
|
1840
|
+
} = getComputedStyle$1(element);
|
|
1841
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
|
|
1842
|
+
}
|
|
1843
|
+
function isTableElement(element) {
|
|
1844
|
+
return /^(table|td|th)$/.test(getNodeName(element));
|
|
1845
|
+
}
|
|
1846
|
+
function isTopLayer(element) {
|
|
1847
|
+
try {
|
|
1848
|
+
if (element.matches(':popover-open')) {
|
|
1849
|
+
return true;
|
|
1850
|
+
}
|
|
1851
|
+
} catch (_e) {
|
|
1852
|
+
// no-op
|
|
1853
|
+
}
|
|
1854
|
+
try {
|
|
1855
|
+
return element.matches(':modal');
|
|
1856
|
+
} catch (_e) {
|
|
1857
|
+
return false;
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
|
|
1861
|
+
const containRe = /paint|layout|strict|content/;
|
|
1862
|
+
const isNotNone = value => !!value && value !== 'none';
|
|
1863
|
+
let isWebKitValue;
|
|
1864
|
+
function isContainingBlock(elementOrCss) {
|
|
1865
|
+
const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
|
|
1866
|
+
|
|
1867
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1868
|
+
// https://drafts.csswg.org/css-transforms-2/#individual-transforms
|
|
1869
|
+
return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
|
|
1870
|
+
}
|
|
1871
|
+
function getContainingBlock(element) {
|
|
1872
|
+
let currentNode = getParentNode(element);
|
|
1873
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
1874
|
+
if (isContainingBlock(currentNode)) {
|
|
1875
|
+
return currentNode;
|
|
1876
|
+
} else if (isTopLayer(currentNode)) {
|
|
1877
|
+
return null;
|
|
1878
|
+
}
|
|
1879
|
+
currentNode = getParentNode(currentNode);
|
|
1880
|
+
}
|
|
1881
|
+
return null;
|
|
1882
|
+
}
|
|
1883
|
+
function isWebKit() {
|
|
1884
|
+
if (isWebKitValue == null) {
|
|
1885
|
+
isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
|
|
1886
|
+
}
|
|
1887
|
+
return isWebKitValue;
|
|
1888
|
+
}
|
|
1889
|
+
function isLastTraversableNode(node) {
|
|
1890
|
+
return /^(html|body|#document)$/.test(getNodeName(node));
|
|
1891
|
+
}
|
|
1892
|
+
function getComputedStyle$1(element) {
|
|
1893
|
+
return getWindow(element).getComputedStyle(element);
|
|
1894
|
+
}
|
|
1895
|
+
function getNodeScroll(element) {
|
|
1896
|
+
if (isElement(element)) {
|
|
1897
|
+
return {
|
|
1898
|
+
scrollLeft: element.scrollLeft,
|
|
1899
|
+
scrollTop: element.scrollTop
|
|
1900
|
+
};
|
|
1901
|
+
}
|
|
1902
|
+
return {
|
|
1903
|
+
scrollLeft: element.scrollX,
|
|
1904
|
+
scrollTop: element.scrollY
|
|
1905
|
+
};
|
|
1906
|
+
}
|
|
1907
|
+
function getParentNode(node) {
|
|
1908
|
+
if (getNodeName(node) === 'html') {
|
|
1909
|
+
return node;
|
|
1910
|
+
}
|
|
1911
|
+
const result =
|
|
1912
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1913
|
+
node.assignedSlot ||
|
|
1914
|
+
// DOM Element detected.
|
|
1915
|
+
node.parentNode ||
|
|
1916
|
+
// ShadowRoot detected.
|
|
1917
|
+
isShadowRoot(node) && node.host ||
|
|
1918
|
+
// Fallback.
|
|
1919
|
+
getDocumentElement(node);
|
|
1920
|
+
return isShadowRoot(result) ? result.host : result;
|
|
1921
|
+
}
|
|
1922
|
+
function getNearestOverflowAncestor(node) {
|
|
1923
|
+
const parentNode = getParentNode(node);
|
|
1924
|
+
if (isLastTraversableNode(parentNode)) {
|
|
1925
|
+
return node.ownerDocument ? node.ownerDocument.body : node.body;
|
|
1926
|
+
}
|
|
1927
|
+
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
1928
|
+
return parentNode;
|
|
1929
|
+
}
|
|
1930
|
+
return getNearestOverflowAncestor(parentNode);
|
|
1931
|
+
}
|
|
1932
|
+
function getOverflowAncestors(node, list, traverseIframes) {
|
|
1933
|
+
var _node$ownerDocument2;
|
|
1934
|
+
if (list === void 0) {
|
|
1935
|
+
list = [];
|
|
1936
|
+
}
|
|
1937
|
+
if (traverseIframes === void 0) {
|
|
1938
|
+
traverseIframes = true;
|
|
1939
|
+
}
|
|
1940
|
+
const scrollableAncestor = getNearestOverflowAncestor(node);
|
|
1941
|
+
const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
|
|
1942
|
+
const win = getWindow(scrollableAncestor);
|
|
1943
|
+
if (isBody) {
|
|
1944
|
+
const frameElement = getFrameElement(win);
|
|
1945
|
+
return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
|
|
1946
|
+
} else {
|
|
1947
|
+
return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
function getFrameElement(win) {
|
|
1951
|
+
return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
function getCssDimensions(element) {
|
|
1955
|
+
const css = getComputedStyle$1(element);
|
|
1956
|
+
// In testing environments, the `width` and `height` properties are empty
|
|
1957
|
+
// strings for SVG elements, returning NaN. Fallback to `0` in this case.
|
|
1958
|
+
let width = parseFloat(css.width) || 0;
|
|
1959
|
+
let height = parseFloat(css.height) || 0;
|
|
1960
|
+
const hasOffset = isHTMLElement(element);
|
|
1961
|
+
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
1962
|
+
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
1963
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
1964
|
+
if (shouldFallback) {
|
|
1965
|
+
width = offsetWidth;
|
|
1966
|
+
height = offsetHeight;
|
|
1967
|
+
}
|
|
1968
|
+
return {
|
|
1969
|
+
width,
|
|
1970
|
+
height,
|
|
1971
|
+
$: shouldFallback
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
function unwrapElement(element) {
|
|
1976
|
+
return !isElement(element) ? element.contextElement : element;
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
function getScale(element) {
|
|
1980
|
+
const domElement = unwrapElement(element);
|
|
1981
|
+
if (!isHTMLElement(domElement)) {
|
|
1982
|
+
return createCoords(1);
|
|
1983
|
+
}
|
|
1984
|
+
const rect = domElement.getBoundingClientRect();
|
|
1985
|
+
const {
|
|
1986
|
+
width,
|
|
1987
|
+
height,
|
|
1988
|
+
$
|
|
1989
|
+
} = getCssDimensions(domElement);
|
|
1990
|
+
let x = ($ ? round(rect.width) : rect.width) / width;
|
|
1991
|
+
let y = ($ ? round(rect.height) : rect.height) / height;
|
|
1992
|
+
|
|
1993
|
+
// 0, NaN, or Infinity should always fallback to 1.
|
|
1994
|
+
|
|
1995
|
+
if (!x || !Number.isFinite(x)) {
|
|
1996
|
+
x = 1;
|
|
1997
|
+
}
|
|
1998
|
+
if (!y || !Number.isFinite(y)) {
|
|
1999
|
+
y = 1;
|
|
2000
|
+
}
|
|
2001
|
+
return {
|
|
2002
|
+
x,
|
|
2003
|
+
y
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
const noOffsets = /*#__PURE__*/createCoords(0);
|
|
2008
|
+
function getVisualOffsets(element) {
|
|
2009
|
+
const win = getWindow(element);
|
|
2010
|
+
if (!isWebKit() || !win.visualViewport) {
|
|
2011
|
+
return noOffsets;
|
|
2012
|
+
}
|
|
2013
|
+
return {
|
|
2014
|
+
x: win.visualViewport.offsetLeft,
|
|
2015
|
+
y: win.visualViewport.offsetTop
|
|
2016
|
+
};
|
|
2017
|
+
}
|
|
2018
|
+
function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
|
|
2019
|
+
if (isFixed === void 0) {
|
|
2020
|
+
isFixed = false;
|
|
2021
|
+
}
|
|
2022
|
+
if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
|
|
2023
|
+
return false;
|
|
2024
|
+
}
|
|
2025
|
+
return isFixed;
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
2029
|
+
if (includeScale === void 0) {
|
|
2030
|
+
includeScale = false;
|
|
2031
|
+
}
|
|
2032
|
+
if (isFixedStrategy === void 0) {
|
|
2033
|
+
isFixedStrategy = false;
|
|
2034
|
+
}
|
|
2035
|
+
const clientRect = element.getBoundingClientRect();
|
|
2036
|
+
const domElement = unwrapElement(element);
|
|
2037
|
+
let scale = createCoords(1);
|
|
2038
|
+
if (includeScale) {
|
|
2039
|
+
if (offsetParent) {
|
|
2040
|
+
if (isElement(offsetParent)) {
|
|
2041
|
+
scale = getScale(offsetParent);
|
|
2042
|
+
}
|
|
2043
|
+
} else {
|
|
2044
|
+
scale = getScale(element);
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
|
|
2048
|
+
let x = (clientRect.left + visualOffsets.x) / scale.x;
|
|
2049
|
+
let y = (clientRect.top + visualOffsets.y) / scale.y;
|
|
2050
|
+
let width = clientRect.width / scale.x;
|
|
2051
|
+
let height = clientRect.height / scale.y;
|
|
2052
|
+
if (domElement) {
|
|
2053
|
+
const win = getWindow(domElement);
|
|
2054
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
2055
|
+
let currentWin = win;
|
|
2056
|
+
let currentIFrame = getFrameElement(currentWin);
|
|
2057
|
+
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
2058
|
+
const iframeScale = getScale(currentIFrame);
|
|
2059
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
2060
|
+
const css = getComputedStyle$1(currentIFrame);
|
|
2061
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
2062
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
2063
|
+
x *= iframeScale.x;
|
|
2064
|
+
y *= iframeScale.y;
|
|
2065
|
+
width *= iframeScale.x;
|
|
2066
|
+
height *= iframeScale.y;
|
|
2067
|
+
x += left;
|
|
2068
|
+
y += top;
|
|
2069
|
+
currentWin = getWindow(currentIFrame);
|
|
2070
|
+
currentIFrame = getFrameElement(currentWin);
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
return rectToClientRect({
|
|
2074
|
+
width,
|
|
2075
|
+
height,
|
|
2076
|
+
x,
|
|
2077
|
+
y
|
|
2078
|
+
});
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
2082
|
+
// incorrect for RTL.
|
|
2083
|
+
function getWindowScrollBarX(element, rect) {
|
|
2084
|
+
const leftScroll = getNodeScroll(element).scrollLeft;
|
|
2085
|
+
if (!rect) {
|
|
2086
|
+
return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
|
|
2087
|
+
}
|
|
2088
|
+
return rect.left + leftScroll;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
function getHTMLOffset(documentElement, scroll) {
|
|
2092
|
+
const htmlRect = documentElement.getBoundingClientRect();
|
|
2093
|
+
const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
|
|
2094
|
+
const y = htmlRect.top + scroll.scrollTop;
|
|
2095
|
+
return {
|
|
2096
|
+
x,
|
|
2097
|
+
y
|
|
2098
|
+
};
|
|
2099
|
+
}
|
|
2100
|
+
|
|
2101
|
+
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
2102
|
+
let {
|
|
2103
|
+
elements,
|
|
2104
|
+
rect,
|
|
2105
|
+
offsetParent,
|
|
2106
|
+
strategy
|
|
2107
|
+
} = _ref;
|
|
2108
|
+
const isFixed = strategy === 'fixed';
|
|
2109
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
2110
|
+
const topLayer = elements ? isTopLayer(elements.floating) : false;
|
|
2111
|
+
if (offsetParent === documentElement || topLayer && isFixed) {
|
|
2112
|
+
return rect;
|
|
2113
|
+
}
|
|
2114
|
+
let scroll = {
|
|
2115
|
+
scrollLeft: 0,
|
|
2116
|
+
scrollTop: 0
|
|
2117
|
+
};
|
|
2118
|
+
let scale = createCoords(1);
|
|
2119
|
+
const offsets = createCoords(0);
|
|
2120
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2121
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
2122
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
2123
|
+
scroll = getNodeScroll(offsetParent);
|
|
2124
|
+
}
|
|
2125
|
+
if (isOffsetParentAnElement) {
|
|
2126
|
+
const offsetRect = getBoundingClientRect(offsetParent);
|
|
2127
|
+
scale = getScale(offsetParent);
|
|
2128
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
2129
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
2130
|
+
}
|
|
2131
|
+
}
|
|
2132
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
2133
|
+
return {
|
|
2134
|
+
width: rect.width * scale.x,
|
|
2135
|
+
height: rect.height * scale.y,
|
|
2136
|
+
x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
|
|
2137
|
+
y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
|
|
2138
|
+
};
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
function getClientRects(element) {
|
|
2142
|
+
return Array.from(element.getClientRects());
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
// Gets the entire size of the scrollable document area, even extending outside
|
|
2146
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable.
|
|
2147
|
+
function getDocumentRect(element) {
|
|
2148
|
+
const html = getDocumentElement(element);
|
|
2149
|
+
const scroll = getNodeScroll(element);
|
|
2150
|
+
const body = element.ownerDocument.body;
|
|
2151
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
2152
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
2153
|
+
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
2154
|
+
const y = -scroll.scrollTop;
|
|
2155
|
+
if (getComputedStyle$1(body).direction === 'rtl') {
|
|
2156
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
2157
|
+
}
|
|
2158
|
+
return {
|
|
2159
|
+
width,
|
|
2160
|
+
height,
|
|
2161
|
+
x,
|
|
2162
|
+
y
|
|
2163
|
+
};
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
// Safety check: ensure the scrollbar space is reasonable in case this
|
|
2167
|
+
// calculation is affected by unusual styles.
|
|
2168
|
+
// Most scrollbars leave 15-18px of space.
|
|
2169
|
+
const SCROLLBAR_MAX = 25;
|
|
2170
|
+
function getViewportRect(element, strategy) {
|
|
2171
|
+
const win = getWindow(element);
|
|
2172
|
+
const html = getDocumentElement(element);
|
|
2173
|
+
const visualViewport = win.visualViewport;
|
|
2174
|
+
let width = html.clientWidth;
|
|
2175
|
+
let height = html.clientHeight;
|
|
2176
|
+
let x = 0;
|
|
2177
|
+
let y = 0;
|
|
2178
|
+
if (visualViewport) {
|
|
2179
|
+
width = visualViewport.width;
|
|
2180
|
+
height = visualViewport.height;
|
|
2181
|
+
const visualViewportBased = isWebKit();
|
|
2182
|
+
if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
|
|
2183
|
+
x = visualViewport.offsetLeft;
|
|
2184
|
+
y = visualViewport.offsetTop;
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
const windowScrollbarX = getWindowScrollBarX(html);
|
|
2188
|
+
// <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
|
|
2189
|
+
// visual width of the <html> but this is not considered in the size
|
|
2190
|
+
// of `html.clientWidth`.
|
|
2191
|
+
if (windowScrollbarX <= 0) {
|
|
2192
|
+
const doc = html.ownerDocument;
|
|
2193
|
+
const body = doc.body;
|
|
2194
|
+
const bodyStyles = getComputedStyle(body);
|
|
2195
|
+
const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
2196
|
+
const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
|
|
2197
|
+
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
2198
|
+
width -= clippingStableScrollbarWidth;
|
|
2199
|
+
}
|
|
2200
|
+
} else if (windowScrollbarX <= SCROLLBAR_MAX) {
|
|
2201
|
+
// If the <body> scrollbar is on the left, the width needs to be extended
|
|
2202
|
+
// by the scrollbar amount so there isn't extra space on the right.
|
|
2203
|
+
width += windowScrollbarX;
|
|
2204
|
+
}
|
|
2205
|
+
return {
|
|
2206
|
+
width,
|
|
2207
|
+
height,
|
|
2208
|
+
x,
|
|
2209
|
+
y
|
|
2210
|
+
};
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
// Returns the inner client rect, subtracting scrollbars if present.
|
|
2214
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
2215
|
+
const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
|
|
2216
|
+
const top = clientRect.top + element.clientTop;
|
|
2217
|
+
const left = clientRect.left + element.clientLeft;
|
|
2218
|
+
const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
|
|
2219
|
+
const width = element.clientWidth * scale.x;
|
|
2220
|
+
const height = element.clientHeight * scale.y;
|
|
2221
|
+
const x = left * scale.x;
|
|
2222
|
+
const y = top * scale.y;
|
|
2223
|
+
return {
|
|
2224
|
+
width,
|
|
2225
|
+
height,
|
|
2226
|
+
x,
|
|
2227
|
+
y
|
|
2228
|
+
};
|
|
2229
|
+
}
|
|
2230
|
+
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
2231
|
+
let rect;
|
|
2232
|
+
if (clippingAncestor === 'viewport') {
|
|
2233
|
+
rect = getViewportRect(element, strategy);
|
|
2234
|
+
} else if (clippingAncestor === 'document') {
|
|
2235
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
2236
|
+
} else if (isElement(clippingAncestor)) {
|
|
2237
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
2238
|
+
} else {
|
|
2239
|
+
const visualOffsets = getVisualOffsets(element);
|
|
2240
|
+
rect = {
|
|
2241
|
+
x: clippingAncestor.x - visualOffsets.x,
|
|
2242
|
+
y: clippingAncestor.y - visualOffsets.y,
|
|
2243
|
+
width: clippingAncestor.width,
|
|
2244
|
+
height: clippingAncestor.height
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
return rectToClientRect(rect);
|
|
2248
|
+
}
|
|
2249
|
+
function hasFixedPositionAncestor(element, stopNode) {
|
|
2250
|
+
const parentNode = getParentNode(element);
|
|
2251
|
+
if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
|
|
2252
|
+
return false;
|
|
2253
|
+
}
|
|
2254
|
+
return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
// A "clipping ancestor" is an `overflow` element with the characteristic of
|
|
2258
|
+
// clipping (or hiding) child elements. This returns all clipping ancestors
|
|
2259
|
+
// of the given element up the tree.
|
|
2260
|
+
function getClippingElementAncestors(element, cache) {
|
|
2261
|
+
const cachedResult = cache.get(element);
|
|
2262
|
+
if (cachedResult) {
|
|
2263
|
+
return cachedResult;
|
|
2264
|
+
}
|
|
2265
|
+
let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
|
|
2266
|
+
let currentContainingBlockComputedStyle = null;
|
|
2267
|
+
const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
|
|
2268
|
+
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
2269
|
+
|
|
2270
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
2271
|
+
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
2272
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
2273
|
+
const currentNodeIsContaining = isContainingBlock(currentNode);
|
|
2274
|
+
if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
|
|
2275
|
+
currentContainingBlockComputedStyle = null;
|
|
2276
|
+
}
|
|
2277
|
+
const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
|
|
2278
|
+
if (shouldDropCurrentNode) {
|
|
2279
|
+
// Drop non-containing blocks.
|
|
2280
|
+
result = result.filter(ancestor => ancestor !== currentNode);
|
|
2281
|
+
} else {
|
|
2282
|
+
// Record last containing block for next iteration.
|
|
2283
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
2284
|
+
}
|
|
2285
|
+
currentNode = getParentNode(currentNode);
|
|
2286
|
+
}
|
|
2287
|
+
cache.set(element, result);
|
|
2288
|
+
return result;
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
// Gets the maximum area that the element is visible in due to any number of
|
|
2292
|
+
// clipping ancestors.
|
|
2293
|
+
function getClippingRect(_ref) {
|
|
2294
|
+
let {
|
|
2295
|
+
element,
|
|
2296
|
+
boundary,
|
|
2297
|
+
rootBoundary,
|
|
2298
|
+
strategy
|
|
2299
|
+
} = _ref;
|
|
2300
|
+
const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
2301
|
+
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
2302
|
+
const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
|
|
2303
|
+
let top = firstRect.top;
|
|
2304
|
+
let right = firstRect.right;
|
|
2305
|
+
let bottom = firstRect.bottom;
|
|
2306
|
+
let left = firstRect.left;
|
|
2307
|
+
for (let i = 1; i < clippingAncestors.length; i++) {
|
|
2308
|
+
const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
|
|
2309
|
+
top = max(rect.top, top);
|
|
2310
|
+
right = min(rect.right, right);
|
|
2311
|
+
bottom = min(rect.bottom, bottom);
|
|
2312
|
+
left = max(rect.left, left);
|
|
2313
|
+
}
|
|
2314
|
+
return {
|
|
2315
|
+
width: right - left,
|
|
2316
|
+
height: bottom - top,
|
|
2317
|
+
x: left,
|
|
2318
|
+
y: top
|
|
2319
|
+
};
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
function getDimensions(element) {
|
|
2323
|
+
const {
|
|
2324
|
+
width,
|
|
2325
|
+
height
|
|
2326
|
+
} = getCssDimensions(element);
|
|
2327
|
+
return {
|
|
2328
|
+
width,
|
|
2329
|
+
height
|
|
2330
|
+
};
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
2334
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2335
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
2336
|
+
const isFixed = strategy === 'fixed';
|
|
2337
|
+
const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
|
|
2338
|
+
let scroll = {
|
|
2339
|
+
scrollLeft: 0,
|
|
2340
|
+
scrollTop: 0
|
|
2341
|
+
};
|
|
2342
|
+
const offsets = createCoords(0);
|
|
2343
|
+
|
|
2344
|
+
// If the <body> scrollbar appears on the left (e.g. RTL systems). Use
|
|
2345
|
+
// Firefox with layout.scrollbar.side = 3 in about:config to test this.
|
|
2346
|
+
function setLeftRTLScrollbarOffset() {
|
|
2347
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
2348
|
+
}
|
|
2349
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
2350
|
+
if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
|
|
2351
|
+
scroll = getNodeScroll(offsetParent);
|
|
2352
|
+
}
|
|
2353
|
+
if (isOffsetParentAnElement) {
|
|
2354
|
+
const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
|
|
2355
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
2356
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
2357
|
+
} else if (documentElement) {
|
|
2358
|
+
setLeftRTLScrollbarOffset();
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
if (isFixed && !isOffsetParentAnElement && documentElement) {
|
|
2362
|
+
setLeftRTLScrollbarOffset();
|
|
2363
|
+
}
|
|
2364
|
+
const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
|
|
2365
|
+
const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
|
|
2366
|
+
const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
|
|
2367
|
+
return {
|
|
2368
|
+
x,
|
|
2369
|
+
y,
|
|
2370
|
+
width: rect.width,
|
|
2371
|
+
height: rect.height
|
|
2372
|
+
};
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
function isStaticPositioned(element) {
|
|
2376
|
+
return getComputedStyle$1(element).position === 'static';
|
|
2377
|
+
}
|
|
2378
|
+
|
|
2379
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
2380
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
2381
|
+
return null;
|
|
2382
|
+
}
|
|
2383
|
+
if (polyfill) {
|
|
2384
|
+
return polyfill(element);
|
|
2385
|
+
}
|
|
2386
|
+
let rawOffsetParent = element.offsetParent;
|
|
2387
|
+
|
|
2388
|
+
// Firefox returns the <html> element as the offsetParent if it's non-static,
|
|
2389
|
+
// while Chrome and Safari return the <body> element. The <body> element must
|
|
2390
|
+
// be used to perform the correct calculations even if the <html> element is
|
|
2391
|
+
// non-static.
|
|
2392
|
+
if (getDocumentElement(element) === rawOffsetParent) {
|
|
2393
|
+
rawOffsetParent = rawOffsetParent.ownerDocument.body;
|
|
2394
|
+
}
|
|
2395
|
+
return rawOffsetParent;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
2399
|
+
// such as table ancestors and cross browser bugs.
|
|
2400
|
+
function getOffsetParent(element, polyfill) {
|
|
2401
|
+
const win = getWindow(element);
|
|
2402
|
+
if (isTopLayer(element)) {
|
|
2403
|
+
return win;
|
|
2404
|
+
}
|
|
2405
|
+
if (!isHTMLElement(element)) {
|
|
2406
|
+
let svgOffsetParent = getParentNode(element);
|
|
2407
|
+
while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
|
|
2408
|
+
if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
|
|
2409
|
+
return svgOffsetParent;
|
|
2410
|
+
}
|
|
2411
|
+
svgOffsetParent = getParentNode(svgOffsetParent);
|
|
2412
|
+
}
|
|
2413
|
+
return win;
|
|
2414
|
+
}
|
|
2415
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
2416
|
+
while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
|
|
2417
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
2418
|
+
}
|
|
2419
|
+
if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
|
|
2420
|
+
return win;
|
|
2421
|
+
}
|
|
2422
|
+
return offsetParent || getContainingBlock(element) || win;
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
const getElementRects = async function (data) {
|
|
2426
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
2427
|
+
const getDimensionsFn = this.getDimensions;
|
|
2428
|
+
const floatingDimensions = await getDimensionsFn(data.floating);
|
|
2429
|
+
return {
|
|
2430
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
2431
|
+
floating: {
|
|
2432
|
+
x: 0,
|
|
2433
|
+
y: 0,
|
|
2434
|
+
width: floatingDimensions.width,
|
|
2435
|
+
height: floatingDimensions.height
|
|
2436
|
+
}
|
|
2437
|
+
};
|
|
2438
|
+
};
|
|
2439
|
+
|
|
2440
|
+
function isRTL(element) {
|
|
2441
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
const platform = {
|
|
2445
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
2446
|
+
getDocumentElement,
|
|
2447
|
+
getClippingRect,
|
|
2448
|
+
getOffsetParent,
|
|
2449
|
+
getElementRects,
|
|
2450
|
+
getClientRects,
|
|
2451
|
+
getDimensions,
|
|
2452
|
+
getScale,
|
|
2453
|
+
isElement,
|
|
2454
|
+
isRTL
|
|
2455
|
+
};
|
|
2456
|
+
|
|
2457
|
+
function rectsAreEqual(a, b) {
|
|
2458
|
+
return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
// https://samthor.au/2021/observing-dom/
|
|
2462
|
+
function observeMove(element, onMove) {
|
|
2463
|
+
let io = null;
|
|
2464
|
+
let timeoutId;
|
|
2465
|
+
const root = getDocumentElement(element);
|
|
2466
|
+
function cleanup() {
|
|
2467
|
+
var _io;
|
|
2468
|
+
clearTimeout(timeoutId);
|
|
2469
|
+
(_io = io) == null || _io.disconnect();
|
|
2470
|
+
io = null;
|
|
2471
|
+
}
|
|
2472
|
+
function refresh(skip, threshold) {
|
|
2473
|
+
if (skip === void 0) {
|
|
2474
|
+
skip = false;
|
|
2475
|
+
}
|
|
2476
|
+
if (threshold === void 0) {
|
|
2477
|
+
threshold = 1;
|
|
2478
|
+
}
|
|
2479
|
+
cleanup();
|
|
2480
|
+
const elementRectForRootMargin = element.getBoundingClientRect();
|
|
2481
|
+
const {
|
|
2482
|
+
left,
|
|
2483
|
+
top,
|
|
2484
|
+
width,
|
|
2485
|
+
height
|
|
2486
|
+
} = elementRectForRootMargin;
|
|
2487
|
+
if (!skip) {
|
|
2488
|
+
onMove();
|
|
2489
|
+
}
|
|
2490
|
+
if (!width || !height) {
|
|
2491
|
+
return;
|
|
2492
|
+
}
|
|
2493
|
+
const insetTop = floor(top);
|
|
2494
|
+
const insetRight = floor(root.clientWidth - (left + width));
|
|
2495
|
+
const insetBottom = floor(root.clientHeight - (top + height));
|
|
2496
|
+
const insetLeft = floor(left);
|
|
2497
|
+
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
2498
|
+
const options = {
|
|
2499
|
+
rootMargin,
|
|
2500
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
2501
|
+
};
|
|
2502
|
+
let isFirstUpdate = true;
|
|
2503
|
+
function handleObserve(entries) {
|
|
2504
|
+
const ratio = entries[0].intersectionRatio;
|
|
2505
|
+
if (ratio !== threshold) {
|
|
2506
|
+
if (!isFirstUpdate) {
|
|
2507
|
+
return refresh();
|
|
2508
|
+
}
|
|
2509
|
+
if (!ratio) {
|
|
2510
|
+
// If the reference is clipped, the ratio is 0. Throttle the refresh
|
|
2511
|
+
// to prevent an infinite loop of updates.
|
|
2512
|
+
timeoutId = setTimeout(() => {
|
|
2513
|
+
refresh(false, 1e-7);
|
|
2514
|
+
}, 1000);
|
|
2515
|
+
} else {
|
|
2516
|
+
refresh(false, ratio);
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
|
|
2520
|
+
// It's possible that even though the ratio is reported as 1, the
|
|
2521
|
+
// element is not actually fully within the IntersectionObserver's root
|
|
2522
|
+
// area anymore. This can happen under performance constraints. This may
|
|
2523
|
+
// be a bug in the browser's IntersectionObserver implementation. To
|
|
2524
|
+
// work around this, we compare the element's bounding rect now with
|
|
2525
|
+
// what it was at the time we created the IntersectionObserver. If they
|
|
2526
|
+
// are not equal then the element moved, so we refresh.
|
|
2527
|
+
refresh();
|
|
2528
|
+
}
|
|
2529
|
+
isFirstUpdate = false;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
// Older browsers don't support a `document` as the root and will throw an
|
|
2533
|
+
// error.
|
|
2534
|
+
try {
|
|
2535
|
+
io = new IntersectionObserver(handleObserve, {
|
|
2536
|
+
...options,
|
|
2537
|
+
// Handle <iframe>s
|
|
2538
|
+
root: root.ownerDocument
|
|
2539
|
+
});
|
|
2540
|
+
} catch (_e) {
|
|
2541
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
2542
|
+
}
|
|
2543
|
+
io.observe(element);
|
|
2544
|
+
}
|
|
2545
|
+
refresh(true);
|
|
2546
|
+
return cleanup;
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
/**
|
|
2550
|
+
* Automatically updates the position of the floating element when necessary.
|
|
2551
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
2552
|
+
* visible on the screen.
|
|
2553
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
2554
|
+
* removed from the DOM or hidden from the screen.
|
|
2555
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
2556
|
+
*/
|
|
2557
|
+
function autoUpdate(reference, floating, update, options) {
|
|
2558
|
+
if (options === void 0) {
|
|
2559
|
+
options = {};
|
|
2560
|
+
}
|
|
2561
|
+
const {
|
|
2562
|
+
ancestorScroll = true,
|
|
2563
|
+
ancestorResize = true,
|
|
2564
|
+
elementResize = typeof ResizeObserver === 'function',
|
|
2565
|
+
layoutShift = typeof IntersectionObserver === 'function',
|
|
2566
|
+
animationFrame = false
|
|
2567
|
+
} = options;
|
|
2568
|
+
const referenceEl = unwrapElement(reference);
|
|
2569
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
|
|
2570
|
+
ancestors.forEach(ancestor => {
|
|
2571
|
+
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
2572
|
+
passive: true
|
|
2573
|
+
});
|
|
2574
|
+
ancestorResize && ancestor.addEventListener('resize', update);
|
|
2575
|
+
});
|
|
2576
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
2577
|
+
let reobserveFrame = -1;
|
|
2578
|
+
let resizeObserver = null;
|
|
2579
|
+
if (elementResize) {
|
|
2580
|
+
resizeObserver = new ResizeObserver(_ref => {
|
|
2581
|
+
let [firstEntry] = _ref;
|
|
2582
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
|
|
2583
|
+
// Prevent update loops when using the `size` middleware.
|
|
2584
|
+
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
2585
|
+
resizeObserver.unobserve(floating);
|
|
2586
|
+
cancelAnimationFrame(reobserveFrame);
|
|
2587
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
2588
|
+
var _resizeObserver;
|
|
2589
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
2590
|
+
});
|
|
2591
|
+
}
|
|
2592
|
+
update();
|
|
2593
|
+
});
|
|
2594
|
+
if (referenceEl && !animationFrame) {
|
|
2595
|
+
resizeObserver.observe(referenceEl);
|
|
2596
|
+
}
|
|
2597
|
+
if (floating) {
|
|
2598
|
+
resizeObserver.observe(floating);
|
|
2599
|
+
}
|
|
2600
|
+
}
|
|
2601
|
+
let frameId;
|
|
2602
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
2603
|
+
if (animationFrame) {
|
|
2604
|
+
frameLoop();
|
|
2605
|
+
}
|
|
2606
|
+
function frameLoop() {
|
|
2607
|
+
const nextRefRect = getBoundingClientRect(reference);
|
|
2608
|
+
if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
|
|
2609
|
+
update();
|
|
2610
|
+
}
|
|
2611
|
+
prevRefRect = nextRefRect;
|
|
2612
|
+
frameId = requestAnimationFrame(frameLoop);
|
|
2613
|
+
}
|
|
2614
|
+
update();
|
|
2615
|
+
return () => {
|
|
2616
|
+
var _resizeObserver2;
|
|
2617
|
+
ancestors.forEach(ancestor => {
|
|
2618
|
+
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
2619
|
+
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
2620
|
+
});
|
|
2621
|
+
cleanupIo == null || cleanupIo();
|
|
2622
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
2623
|
+
resizeObserver = null;
|
|
2624
|
+
if (animationFrame) {
|
|
2625
|
+
cancelAnimationFrame(frameId);
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
/**
|
|
2631
|
+
* Modifies the placement by translating the floating element along the
|
|
2632
|
+
* specified axes.
|
|
2633
|
+
* A number (shorthand for `mainAxis` or distance), or an axes configuration
|
|
2634
|
+
* object may be passed.
|
|
2635
|
+
* @see https://floating-ui.com/docs/offset
|
|
2636
|
+
*/
|
|
2637
|
+
const offset = offset$1;
|
|
2638
|
+
|
|
2639
|
+
/**
|
|
2640
|
+
* Optimizes the visibility of the floating element by choosing the placement
|
|
2641
|
+
* that has the most space available automatically, without needing to specify a
|
|
2642
|
+
* preferred placement. Alternative to `flip`.
|
|
2643
|
+
* @see https://floating-ui.com/docs/autoPlacement
|
|
2644
|
+
*/
|
|
2645
|
+
const autoPlacement = autoPlacement$1;
|
|
2646
|
+
|
|
2647
|
+
/**
|
|
2648
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
2649
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
2650
|
+
* @see https://floating-ui.com/docs/shift
|
|
2651
|
+
*/
|
|
2652
|
+
const shift = shift$1;
|
|
2653
|
+
|
|
2654
|
+
/**
|
|
2655
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
2656
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
2657
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
2658
|
+
* @see https://floating-ui.com/docs/flip
|
|
2659
|
+
*/
|
|
2660
|
+
flip;
|
|
2661
|
+
|
|
2662
|
+
/**
|
|
2663
|
+
* Provides data that allows you to change the size of the floating element —
|
|
2664
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
2665
|
+
* width of the reference element.
|
|
2666
|
+
* @see https://floating-ui.com/docs/size
|
|
2667
|
+
*/
|
|
2668
|
+
size;
|
|
2669
|
+
|
|
2670
|
+
/**
|
|
2671
|
+
* Provides data to hide the floating element in applicable situations, such as
|
|
2672
|
+
* when it is not in the same clipping context as the reference element.
|
|
2673
|
+
* @see https://floating-ui.com/docs/hide
|
|
2674
|
+
*/
|
|
2675
|
+
const hide = hide$1;
|
|
2676
|
+
|
|
2677
|
+
/**
|
|
2678
|
+
* Provides data to position an inner element of the floating element so that it
|
|
2679
|
+
* appears centered to the reference element.
|
|
2680
|
+
* @see https://floating-ui.com/docs/arrow
|
|
2681
|
+
*/
|
|
2682
|
+
arrow;
|
|
2683
|
+
|
|
2684
|
+
/**
|
|
2685
|
+
* Provides improved positioning for inline reference elements that can span
|
|
2686
|
+
* over multiple lines, such as hyperlinks or range selections.
|
|
2687
|
+
* @see https://floating-ui.com/docs/inline
|
|
2688
|
+
*/
|
|
2689
|
+
inline;
|
|
2690
|
+
|
|
2691
|
+
/**
|
|
2692
|
+
* Built-in `limiter` that will stop `shift()` at a certain point.
|
|
2693
|
+
*/
|
|
2694
|
+
limitShift;
|
|
2695
|
+
|
|
2696
|
+
/**
|
|
2697
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
2698
|
+
* next to a given reference element.
|
|
2699
|
+
*/
|
|
2700
|
+
const computePosition = (reference, floating, options) => {
|
|
2701
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
|
2702
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
2703
|
+
// single call. If other functions become expensive, we can add them as well.
|
|
2704
|
+
const cache = new Map();
|
|
2705
|
+
const mergedOptions = {
|
|
2706
|
+
platform,
|
|
2707
|
+
...options
|
|
2708
|
+
};
|
|
2709
|
+
const platformWithCache = {
|
|
2710
|
+
...mergedOptions.platform,
|
|
2711
|
+
_c: cache
|
|
2712
|
+
};
|
|
2713
|
+
return computePosition$1(reference, floating, {
|
|
2714
|
+
...mergedOptions,
|
|
2715
|
+
platform: platformWithCache
|
|
2716
|
+
});
|
|
2717
|
+
};
|
|
2718
|
+
|
|
2719
|
+
class Dropdown extends Controller {
|
|
2720
|
+
static values = {
|
|
2721
|
+
computed: { type: Boolean, default: false },
|
|
2722
|
+
supported: { type: Boolean, default: true },
|
|
2723
|
+
align: { type: String, default: "right" }
|
|
2724
|
+
};
|
|
2725
|
+
observer = new IntersectionObserver(this.computedCB.bind(this), { threshold: 1 });
|
|
2726
|
+
cleanup;
|
|
2727
|
+
connect() {
|
|
2728
|
+
this.supportedValue = CSS.supports("anchor-name: --myanchor");
|
|
2729
|
+
if (this.isComputed) {
|
|
2730
|
+
this.buttonEl.addEventListener("click", this.unsupportedClickCB);
|
|
2731
|
+
this.cleanup = autoUpdate(this.buttonEl, this.element, async () => await this.computation());
|
|
2732
|
+
}
|
|
2733
|
+
this.element.addEventListener("toggle", this.addOpenedClass);
|
|
2734
|
+
this.element.addEventListener("turbo:click", this.closeIfOpen);
|
|
2735
|
+
this.element.addEventListener("popover:close", this.closeIfOpen);
|
|
2736
|
+
}
|
|
2737
|
+
disconnect() {
|
|
2738
|
+
if (this.isComputed) {
|
|
2739
|
+
this.cleanup();
|
|
2740
|
+
}
|
|
2741
|
+
this.buttonEl.removeEventListener("click", this.unsupportedClickCB);
|
|
2742
|
+
this.element.removeEventListener("toggle", this.addOpenedClass);
|
|
2743
|
+
this.element.removeEventListener("turbo:click", this.closeIfOpen);
|
|
2744
|
+
}
|
|
2745
|
+
unsupportedClickCB = (event) => {
|
|
2746
|
+
event.preventDefault();
|
|
2747
|
+
event.stopPropagation();
|
|
2748
|
+
this.element.togglePopover();
|
|
2749
|
+
};
|
|
2750
|
+
get buttonEl() {
|
|
2751
|
+
return this.element.parentElement?.querySelector(
|
|
2752
|
+
`[popovertarget="${this.element.id}"]`
|
|
2753
|
+
);
|
|
2754
|
+
}
|
|
2755
|
+
get isComputed() {
|
|
2756
|
+
return this.computedValue || !this.supportedValue;
|
|
2757
|
+
}
|
|
2758
|
+
addOpenedClass = (event) => {
|
|
2759
|
+
this.buttonEl.classList.toggle("opened", event.newState === "open");
|
|
2760
|
+
};
|
|
2761
|
+
computedCB(entries) {
|
|
2762
|
+
entries.forEach(async () => {
|
|
2763
|
+
this.computation();
|
|
2764
|
+
});
|
|
2765
|
+
}
|
|
2766
|
+
closeIfOpen = () => {
|
|
2767
|
+
this.element.hidePopover();
|
|
2768
|
+
};
|
|
2769
|
+
async computation() {
|
|
2770
|
+
if (!this.buttonEl)
|
|
2771
|
+
return;
|
|
2772
|
+
if (!this.isComputed)
|
|
2773
|
+
return;
|
|
2774
|
+
const { x, y, middlewareData } = await computePosition(this.buttonEl, this.element, {
|
|
2775
|
+
strategy: "fixed",
|
|
2776
|
+
placement: this.alignValue,
|
|
2777
|
+
middleware: [
|
|
2778
|
+
hide(),
|
|
2779
|
+
offset(6),
|
|
2780
|
+
autoPlacement({
|
|
2781
|
+
allowedPlacements: [
|
|
2782
|
+
"left-start",
|
|
2783
|
+
"left-end",
|
|
2784
|
+
"right-start",
|
|
2785
|
+
"right-end",
|
|
2786
|
+
"bottom-end",
|
|
2787
|
+
"bottom-start"
|
|
2788
|
+
],
|
|
2789
|
+
crossAxis: true
|
|
2790
|
+
}),
|
|
2791
|
+
shift({ padding: 24 })
|
|
2792
|
+
]
|
|
2793
|
+
});
|
|
2794
|
+
if (!middlewareData || middlewareData.hide == null)
|
|
2795
|
+
return;
|
|
2796
|
+
Object.assign(this.element.style, {
|
|
2797
|
+
left: `${x}px`,
|
|
2798
|
+
top: `${y}px`,
|
|
2799
|
+
visibility: middlewareData.hide.referenceHidden ? "hidden" : "visible"
|
|
2800
|
+
});
|
|
2801
|
+
}
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
class Avatar extends Controller {
|
|
2805
|
+
connect() {
|
|
2806
|
+
console.log("Hello from Avatar!");
|
|
2807
|
+
}
|
|
2808
|
+
}
|
|
2809
|
+
|
|
2810
|
+
class Prose extends Controller {
|
|
2811
|
+
static values = {
|
|
2812
|
+
initial: { type: Number, default: 1 },
|
|
2813
|
+
open: Boolean
|
|
2814
|
+
};
|
|
2815
|
+
connect() {
|
|
2816
|
+
if (!this.element.classList.contains("clamp")) {
|
|
2817
|
+
return;
|
|
2818
|
+
}
|
|
2819
|
+
this.initialValue = parseInt(getComputedStyle(this.element).getPropertyValue("--clamp"));
|
|
2820
|
+
this.element.addEventListener("click", () => {
|
|
2821
|
+
this.toggle();
|
|
2822
|
+
});
|
|
2823
|
+
}
|
|
2824
|
+
toggle() {
|
|
2825
|
+
if (this.openValue) {
|
|
2826
|
+
this.element.style.setProperty("--clamp", `${this.initialValue}`);
|
|
2827
|
+
} else {
|
|
2828
|
+
this.element.style.setProperty("--clamp", "0");
|
|
2829
|
+
}
|
|
2830
|
+
this.openValue = !this.openValue;
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
class Dialog extends Controller {
|
|
2835
|
+
static targets = ["remoteContent", "clearableForm"];
|
|
2836
|
+
static values = {
|
|
2837
|
+
resetFrame: { type: Boolean, default: false }
|
|
2838
|
+
};
|
|
2839
|
+
connect() {
|
|
2840
|
+
document.addEventListener("turbo:frame-load", this.setupDialogListeners.bind(this));
|
|
2841
|
+
this.setupDialogListeners();
|
|
2842
|
+
}
|
|
2843
|
+
get dialog() {
|
|
2844
|
+
return this.element;
|
|
2845
|
+
}
|
|
2846
|
+
get htmlEl() {
|
|
2847
|
+
return document.documentElement;
|
|
2848
|
+
}
|
|
2849
|
+
get toggleEls() {
|
|
2850
|
+
return document.querySelectorAll(`[data-toggle-dialog="${this.dialog.id}"]`);
|
|
2851
|
+
}
|
|
2852
|
+
get frameEl() {
|
|
2853
|
+
return this.dialog.querySelector("turbo-frame");
|
|
2854
|
+
}
|
|
2855
|
+
setupDialogListeners() {
|
|
2856
|
+
document.addEventListener("click", (event) => {
|
|
2857
|
+
if (event?.target instanceof Element) {
|
|
2858
|
+
if (!event?.target?.contains(this.dialog))
|
|
2859
|
+
return;
|
|
2860
|
+
this.dismiss();
|
|
2861
|
+
}
|
|
2862
|
+
});
|
|
2863
|
+
document.addEventListener("turbo:before-visit", this.dismiss.bind(this));
|
|
2864
|
+
this.toggleEls.forEach((el) => {
|
|
2865
|
+
el.addEventListener("click", this.toggle.bind(this));
|
|
2866
|
+
});
|
|
2867
|
+
this.dialog.addEventListener("close", this.onClose.bind(this));
|
|
2868
|
+
}
|
|
2869
|
+
remoteContentTargetConnected() {
|
|
2870
|
+
this.show();
|
|
2871
|
+
}
|
|
2872
|
+
toggle(e = void 0) {
|
|
2873
|
+
if (e instanceof Event)
|
|
2874
|
+
e.preventDefault();
|
|
2875
|
+
this.htmlEl.classList.toggle("overflow-hidden", true);
|
|
2876
|
+
if (this.dialog.open) {
|
|
2877
|
+
this.dialog.close();
|
|
2878
|
+
} else {
|
|
2879
|
+
this.dialog.showModal();
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
show(e = void 0) {
|
|
2883
|
+
if (e instanceof Event)
|
|
2884
|
+
e.preventDefault();
|
|
2885
|
+
this.htmlEl.classList.toggle("overflow-hidden", true);
|
|
2886
|
+
this.dialog.showModal();
|
|
2887
|
+
}
|
|
2888
|
+
hide({ detail }) {
|
|
2889
|
+
if (!detail.success)
|
|
2890
|
+
return;
|
|
2891
|
+
this.dismiss();
|
|
2892
|
+
}
|
|
2893
|
+
dismiss() {
|
|
2894
|
+
this.dialog.close();
|
|
2895
|
+
}
|
|
2896
|
+
reloadPage() {
|
|
2897
|
+
window.location.reload();
|
|
2898
|
+
}
|
|
2899
|
+
async onClose() {
|
|
2900
|
+
this.htmlEl.classList.toggle("overflow-hidden", false);
|
|
2901
|
+
await this.delay(500);
|
|
2902
|
+
this.resetForm();
|
|
2903
|
+
this.resetFrame();
|
|
2904
|
+
}
|
|
2905
|
+
resetFrame() {
|
|
2906
|
+
if (!this.resetFrameValue || this.frameEl == null)
|
|
2907
|
+
return;
|
|
2908
|
+
this.frameEl.innerHTML = "";
|
|
2909
|
+
this.frameEl.removeAttribute("src");
|
|
2910
|
+
}
|
|
2911
|
+
resetForm() {
|
|
2912
|
+
if (!this.hasClearableFormTarget)
|
|
2913
|
+
return;
|
|
2914
|
+
this.clearableFormTarget.reset();
|
|
2915
|
+
}
|
|
2916
|
+
async delay(time = 500) {
|
|
2917
|
+
return await new Promise((resolve) => {
|
|
2918
|
+
setTimeout(resolve, time);
|
|
2919
|
+
});
|
|
2920
|
+
}
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
class Video extends Controller {
|
|
2924
|
+
connect() {
|
|
2925
|
+
console.log("Hello from Video!");
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
class DropdownItem extends Controller {
|
|
2930
|
+
connect() {
|
|
2931
|
+
console.log("Hello from DropdownItem!");
|
|
2932
|
+
}
|
|
2933
|
+
}
|
|
2934
|
+
|
|
2935
|
+
class Tabs extends Controller {
|
|
2936
|
+
static targets = ["tab", "panel"];
|
|
2937
|
+
connect() {
|
|
2938
|
+
const activeIndex = this.tabTargets.findIndex(
|
|
2939
|
+
(tab) => tab.getAttribute("aria-selected") === "true"
|
|
2940
|
+
);
|
|
2941
|
+
this.activateTab(activeIndex >= 0 ? activeIndex : 0);
|
|
2942
|
+
}
|
|
2943
|
+
select(event) {
|
|
2944
|
+
const tab = event.currentTarget;
|
|
2945
|
+
const index = this.tabTargets.indexOf(tab);
|
|
2946
|
+
if (index >= 0)
|
|
2947
|
+
this.activateTab(index);
|
|
2948
|
+
}
|
|
2949
|
+
activateTab(index) {
|
|
2950
|
+
this.tabTargets.forEach((tab, i) => {
|
|
2951
|
+
const active = i === index;
|
|
2952
|
+
tab.setAttribute("aria-selected", String(active));
|
|
2953
|
+
tab.setAttribute("tabindex", active ? "0" : "-1");
|
|
2954
|
+
tab.classList.toggle("active", active);
|
|
2955
|
+
});
|
|
2956
|
+
this.panelTargets.forEach((panel, i) => {
|
|
2957
|
+
if (i === index) {
|
|
2958
|
+
panel.removeAttribute("hidden");
|
|
2959
|
+
} else {
|
|
2960
|
+
panel.setAttribute("hidden", "");
|
|
2961
|
+
}
|
|
2962
|
+
});
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2966
|
+
class Tooltip extends Controller {
|
|
2967
|
+
static targets = ["popover"];
|
|
2968
|
+
show() {
|
|
2969
|
+
this.popoverTarget.showPopover();
|
|
2970
|
+
}
|
|
2971
|
+
hide() {
|
|
2972
|
+
this.popoverTarget.hidePopover();
|
|
2973
|
+
}
|
|
2974
|
+
}
|
|
2975
|
+
|
|
37
2976
|
function registerMidwestControllers(application) {
|
|
38
2977
|
application.register("midwest-card", Card);
|
|
2978
|
+
application.register("midwest-banner", Banner);
|
|
2979
|
+
application.register("midwest-callout", Callout);
|
|
2980
|
+
application.register("midwest-input", Input);
|
|
2981
|
+
application.register("midwest-file", File);
|
|
2982
|
+
application.register("midwest-switch", Switch);
|
|
2983
|
+
application.register("midwest-dropdown", Dropdown);
|
|
2984
|
+
application.register("midwest-avatar", Avatar);
|
|
2985
|
+
application.register("midwest-prose", Prose);
|
|
2986
|
+
application.register("midwest-dialog", Dialog);
|
|
2987
|
+
application.register("midwest-video", Video);
|
|
2988
|
+
application.register("midwest-dropdown-item", DropdownItem);
|
|
2989
|
+
application.register("midwest-tabs", Tabs);
|
|
2990
|
+
application.register("midwest-tooltip", Tooltip);
|
|
39
2991
|
}
|
|
40
2992
|
|
|
41
|
-
export { Card, registerMidwestControllers };
|
|
2993
|
+
export { Banner, Card, registerMidwestControllers };
|
|
42
2994
|
//# sourceMappingURL=midwest.js.map
|