@beamimpact/web-sdk 1.55.8 → 1.56.3
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 +5 -0
- package/dist/chunks/_share-dialog-dependencies-Bk60ibnw.esm.js +2 -0
- package/dist/chunks/{_share-dialog-dependencies-BG0p8uUr.esm.js.map → _share-dialog-dependencies-Bk60ibnw.esm.js.map} +1 -1
- package/dist/chunks/_share-dialog-dependencies-D6vA_2f6.esm.js +2 -0
- package/dist/chunks/{_share-dialog-dependencies-dHlBUqo0.esm.js.map → _share-dialog-dependencies-D6vA_2f6.esm.js.map} +1 -1
- package/dist/chunks/{beam-errors-CCe004HS.esm.d.ts → beam-errors-DUQ9pK2V.esm.d.ts} +7 -1
- package/dist/chunks/{cart-contents-CLT7p7Gd.esm.d.ts → cart-contents-CEoSx3y4.esm.d.ts} +1 -1
- package/dist/chunks/{css-card-grid-CvoGpsJH.esm.js → css-card-grid-DixMt6ek.esm.js} +2 -2
- package/dist/chunks/{css-card-grid-CvoGpsJH.esm.js.map → css-card-grid-DixMt6ek.esm.js.map} +1 -1
- package/dist/chunks/enforce-config-DHnpgqSK.esm.js +3 -0
- package/dist/chunks/enforce-config-DHnpgqSK.esm.js.map +1 -0
- package/dist/chunks/enforce-config-DUbQnaLO.esm.js +3 -0
- package/dist/chunks/enforce-config-DUbQnaLO.esm.js.map +1 -0
- package/dist/chunks/events-COWOQoLW.esm.js +2 -0
- package/dist/chunks/{events-Dki0ka4F.esm.js.map → events-COWOQoLW.esm.js.map} +1 -1
- package/dist/chunks/{events-CSyogxoH.esm.d.ts → events-Dwqfqbij.esm.d.ts} +33 -5
- package/dist/chunks/index-8rOpG9kf.esm.js +2 -0
- package/dist/chunks/index-8rOpG9kf.esm.js.map +1 -0
- package/dist/chunks/{index-DnTE6QlY.esm.js → index-B1GmdVT3.esm.js} +2 -2
- package/dist/chunks/index-B1GmdVT3.esm.js.map +1 -0
- package/dist/chunks/{index-DEaZqGi7.esm.js → index-B2dxbh1d.esm.js} +2 -2
- package/dist/chunks/{index-DEaZqGi7.esm.js.map → index-B2dxbh1d.esm.js.map} +1 -1
- package/dist/chunks/{index-2OQzw7UI.esm.js → index-BEEmYYxP.esm.js} +28 -18
- package/dist/chunks/index-BEEmYYxP.esm.js.map +1 -0
- package/dist/chunks/{index-RhV6PBPH.esm.js → index-BIEV1MH0.esm.js} +2 -2
- package/dist/chunks/{index-RhV6PBPH.esm.js.map → index-BIEV1MH0.esm.js.map} +1 -1
- package/dist/chunks/{index-CBS5Fqry.esm.d.ts → index-BLlSL37B.esm.d.ts} +4 -2
- package/dist/chunks/{index-C-hPf29c.esm.d.ts → index-BY5lSRmw.esm.d.ts} +4 -1
- package/dist/chunks/index-BaWMWAyt.esm.js +2 -0
- package/dist/chunks/index-BaWMWAyt.esm.js.map +1 -0
- package/dist/chunks/index-BeX4QeUu.esm.js +2 -0
- package/dist/chunks/index-BeX4QeUu.esm.js.map +1 -0
- package/dist/chunks/{index-CGKJagBi.esm.js → index-C3v-y56g.esm.js} +2 -2
- package/dist/chunks/index-C3v-y56g.esm.js.map +1 -0
- package/dist/chunks/{index-CJ1y1kTs.esm.d.ts → index-C_u1FXtO.esm.d.ts} +33 -5
- package/dist/chunks/{index-DrxhkT6Y.esm.js → index-CqqF1sQo.esm.js} +2 -2
- package/dist/chunks/index-CqqF1sQo.esm.js.map +1 -0
- package/dist/chunks/index-Cs4Kp9X4.esm.js +2 -0
- package/dist/chunks/index-Cs4Kp9X4.esm.js.map +1 -0
- package/dist/chunks/index-D20ifskY.esm.d.ts +21 -0
- package/dist/chunks/{index-BTDB5Gk-.esm.js → index-D3hxLDQF.esm.js} +2 -2
- package/dist/chunks/index-D3hxLDQF.esm.js.map +1 -0
- package/dist/chunks/{index-DBb5HSkR.esm.js → index-D5TZB-zM.esm.js} +2 -2
- package/dist/chunks/index-D5TZB-zM.esm.js.map +1 -0
- package/dist/chunks/{index-iqYDqEil.esm.d.ts → index-DDCtGN21.esm.d.ts} +15 -2
- package/dist/chunks/index-DSJACB_p.esm.js +2 -0
- package/dist/chunks/{index-BNjsFEGn.esm.js.map → index-DSJACB_p.esm.js.map} +1 -1
- package/dist/chunks/{index-Ct1m4IjM.esm.js → index-DmjZnpod.esm.js} +2 -2
- package/dist/chunks/index-DmjZnpod.esm.js.map +1 -0
- package/dist/chunks/{index-rxgS4BLp.esm.d.ts → index-DyUuvdr3.esm.d.ts} +6 -2
- package/dist/chunks/{index-B1lGZARl.esm.d.ts → index-EJRmgmQu.esm.d.ts} +33 -5
- package/dist/chunks/{index-C5gnsl34.esm.js → index-UMeAzKTG.esm.js} +28 -18
- package/dist/chunks/index-UMeAzKTG.esm.js.map +1 -0
- package/dist/chunks/{index-BjGPkgs-.esm.d.ts → index-hghrT7Z_.esm.d.ts} +13 -1
- package/dist/chunks/index-mppXVWCH.esm.js +2 -0
- package/dist/chunks/{index-IKiJwo5v.esm.js.map → index-mppXVWCH.esm.js.map} +1 -1
- package/dist/chunks/{index-Cg65EbvX.esm.js → index-n62IxH5D.esm.js} +2 -2
- package/dist/chunks/index-n62IxH5D.esm.js.map +1 -0
- package/dist/chunks/{index-tbwbkOdj.esm.js → index-nAPzvUWE.esm.js} +2 -2
- package/dist/chunks/index-nAPzvUWE.esm.js.map +1 -0
- package/dist/chunks/{index-DXj15KHe.esm.d.ts → index-xcGPhpiO.esm.d.ts} +13 -1
- package/dist/chunks/lit-JRlupCB5.esm.js +25 -0
- package/dist/chunks/lit-JRlupCB5.esm.js.map +1 -0
- package/dist/chunks/loading-template-BFvXaTlD.esm.js +2 -0
- package/dist/chunks/{loading-template-DG4lkIIc.esm.js.map → loading-template-BFvXaTlD.esm.js.map} +1 -1
- package/dist/chunks/{localize-Btu9xYcE.esm.js → localize-Dg7NgKIP.esm.js} +4 -4
- package/dist/chunks/localize-Dg7NgKIP.esm.js.map +1 -0
- package/dist/chunks/{localize-C25pEGnx.esm.js → localize-DkAbsh05.esm.js} +4 -4
- package/dist/chunks/localize-DkAbsh05.esm.js.map +1 -0
- package/dist/chunks/lodash-BSs6Il-c.esm.js +2 -0
- package/dist/chunks/lodash-BSs6Il-c.esm.js.map +1 -0
- package/dist/chunks/{openapi-spec-Bk7E2QQP.esm.d.ts → openapi-spec-B4z4_CMq.esm.d.ts} +18 -0
- package/dist/chunks/{order-page-BRG7MXZ2.esm.js → order-page-B0WbVrvh.esm.js} +2 -2
- package/dist/chunks/order-page-B0WbVrvh.esm.js.map +1 -0
- package/dist/chunks/{order-page-Qn1yyNbN.esm.d.ts → order-page-CSEjG6ma.esm.d.ts} +19 -18
- package/dist/chunks/{order-page-BbHDQfmy.esm.js → order-page-CT3hnhzf.esm.js} +2 -2
- package/dist/chunks/order-page-CT3hnhzf.esm.js.map +1 -0
- package/dist/chunks/{progress-bar-DF7UuuHb.esm.js → progress-bar-B82FOT8n.esm.js} +2 -2
- package/dist/chunks/{progress-bar-DF7UuuHb.esm.js.map → progress-bar-B82FOT8n.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-ByFGhdxh.esm.js → promo-pill-label-D_4zJ7uy.esm.js} +3 -3
- package/dist/chunks/{promo-pill-label-ByFGhdxh.esm.js.map → promo-pill-label-D_4zJ7uy.esm.js.map} +1 -1
- package/dist/chunks/{promo-pill-label-WGLW3bql.esm.js → promo-pill-label-DcsiJS_N.esm.js} +3 -3
- package/dist/chunks/{promo-pill-label-WGLW3bql.esm.js.map → promo-pill-label-DcsiJS_N.esm.js.map} +1 -1
- package/dist/chunks/{promo-types-7r9-UuiP.esm.d.ts → promo-types-CmZzhkpN.esm.d.ts} +3 -2
- package/dist/chunks/{responsive-BR8qUfBa.esm.js → responsive-CIV4sFdH.esm.js} +2 -2
- package/dist/chunks/{responsive-BR8qUfBa.esm.js.map → responsive-CIV4sFdH.esm.js.map} +1 -1
- package/dist/chunks/routes-BIMwJ8u9.esm.js +2 -0
- package/dist/chunks/routes-BIMwJ8u9.esm.js.map +1 -0
- package/dist/chunks/routes-DSu5s3K7.esm.js +2 -0
- package/dist/chunks/routes-DSu5s3K7.esm.js.map +1 -0
- package/dist/chunks/routes-OxC3Ah30.esm.d.ts +638 -0
- package/dist/chunks/{share-button-DPNNnXeM.esm.js → share-button-CLMw49f5.esm.js} +2 -2
- package/dist/chunks/{share-button-DPNNnXeM.esm.js.map → share-button-CLMw49f5.esm.js.map} +1 -1
- package/dist/chunks/{share-button-M8cMa6ol.esm.js → share-button-DXS3zbJz.esm.js} +2 -2
- package/dist/chunks/{share-button-M8cMa6ol.esm.js.map → share-button-DXS3zbJz.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BRjKJc5L.esm.js → share-button-DkTpGZk1.esm.js} +8 -3
- package/dist/chunks/share-button-DkTpGZk1.esm.js.map +1 -0
- package/dist/chunks/{share-button-DmjRJmXh.esm.js → share-button-Dzc7loia.esm.js} +8 -3
- package/dist/chunks/share-button-Dzc7loia.esm.js.map +1 -0
- package/dist/chunks/{types-CPxMwnoR.esm.d.ts → types-D_PLq1pj.esm.d.ts} +1 -1
- package/dist/chunks/{update-cart-gwNcGXkd.esm.js → update-cart-ByUvNLyZ.esm.js} +2 -2
- package/dist/chunks/update-cart-ByUvNLyZ.esm.js.map +1 -0
- package/dist/chunks/{update-cart-CauFT0AF.esm.d.ts → update-cart-DWgFuC7U.esm.d.ts} +3 -2
- package/dist/chunks/{update-cart-CJywJNax.esm.js → update-cart-yj_9VGHp.esm.js} +2 -2
- package/dist/chunks/update-cart-yj_9VGHp.esm.js.map +1 -0
- package/dist/chunks/vendor-ckSdd6aH.esm.js +1286 -0
- package/dist/chunks/vendor-ckSdd6aH.esm.js.map +1 -0
- package/dist/components/beam-partner-logos.esm.js +5 -5
- package/dist/components/beam-partner-logos.esm.js.map +1 -1
- package/dist/components/beam-partner-logos.js +5 -5
- package/dist/components/beam-partner-logos.js.map +1 -1
- package/dist/components/community-impact.d.ts +1 -3
- package/dist/components/community-impact.esm.js +11 -6
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +11 -6
- package/dist/components/community-impact.js.map +1 -1
- package/dist/components/cumulative-impact.d.ts +1 -1
- package/dist/components/cumulative-impact.esm.js +10 -10
- package/dist/components/cumulative-impact.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +10 -10
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.d.ts +36 -39
- package/dist/components/impact-overview.esm.js +11 -6
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +11 -6
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +5 -8
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +9 -11
- package/dist/components/post-purchase.esm.js +4 -4
- package/dist/components/post-purchase.esm.js.map +1 -1
- package/dist/components/post-purchase.js +4 -4
- package/dist/components/post-purchase.js.map +1 -1
- package/dist/components/product-details-page.d.ts +26 -27
- package/dist/components/product-details-page.esm.js +18 -18
- package/dist/components/product-details-page.esm.js.map +1 -1
- package/dist/components/product-details-page.js +18 -18
- package/dist/components/product-details-page.js.map +1 -1
- package/dist/components/redeem-transaction.d.ts +3 -6
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/select-nonprofit.d.ts +3 -15
- package/dist/components/select-nonprofit.esm.js +6 -5
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +6 -5
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.d.ts +1 -2
- package/dist/components/select-subscription-nonprofit.esm.js +42 -21
- package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.js +42 -21
- package/dist/components/select-subscription-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +8 -12
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/social-share.d.ts +13 -2
- package/dist/components/social-share.esm.js +11 -4
- package/dist/components/social-share.esm.js.map +1 -1
- package/dist/components/social-share.js +11 -4
- package/dist/components/social-share.js.map +1 -1
- package/dist/components/subscription-impact.d.ts +36 -49
- package/dist/components/subscription-impact.esm.js +15 -3
- package/dist/components/subscription-impact.esm.js.map +1 -1
- package/dist/components/subscription-impact.js +15 -3
- package/dist/components/subscription-impact.js.map +1 -1
- package/dist/components/subscription-management.d.ts +91 -92
- package/dist/components/subscription-management.esm.js +4 -3
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +4 -3
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +19 -22
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.d.ts +3 -2
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.esm.js.map +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/beam.js.map +1 -1
- package/dist/integrations/cart.d.ts +3 -3
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +14 -18
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.d.ts +2 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/promoManager.d.ts +1 -1
- package/dist/integrations/promoManager.esm.js +1 -1
- package/dist/integrations/promoManager.esm.js.map +1 -1
- package/dist/integrations/promoManager.js +1 -1
- package/dist/integrations/promoManager.js.map +1 -1
- package/dist/integrations/session.d.ts +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify.d.ts +6 -10
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.d.ts +9 -5
- package/dist/integrations/statsig.esm.js +14 -14
- package/dist/integrations/statsig.esm.js.map +1 -1
- package/dist/integrations/statsig.js +14 -14
- package/dist/integrations/statsig.js.map +1 -1
- package/dist/integrations/utils.d.ts +7 -7
- package/dist/integrations/utils.esm.js +1 -1
- package/dist/integrations/utils.js +1 -1
- package/dist/react/beam-partner-logos.esm.js +1 -1
- package/dist/react/beam-partner-logos.js +1 -1
- package/dist/react/community-impact.d.ts +1 -3
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.esm.js.map +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/community-impact.js.map +1 -1
- package/dist/react/cumulative-impact.d.ts +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.esm.js.map +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/cumulative-impact.js.map +1 -1
- package/dist/react/impact-overview.d.ts +1 -4
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.esm.js.map +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/impact-overview.js.map +1 -1
- package/dist/react/index.d.ts +7 -10
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +3 -7
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.esm.js.map +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/post-purchase.js.map +1 -1
- package/dist/react/product-details-page.d.ts +1 -2
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.esm.js.map +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/product-details-page.js.map +1 -1
- package/dist/react/redeem-transaction.d.ts +5 -8
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.esm.js.map +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/redeem-transaction.js.map +1 -1
- package/dist/react/select-nonprofit.d.ts +5 -7
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.esm.js.map +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-nonprofit.js.map +1 -1
- package/dist/react/select-subscription-nonprofit.d.ts +5 -6
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js.map +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/select-subscription-nonprofit.js.map +1 -1
- package/dist/react/social-share.d.ts +1 -2
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.esm.js.map +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/social-share.js.map +1 -1
- package/dist/react/subscription-impact.d.ts +1 -3
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.esm.js.map +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-impact.js.map +1 -1
- package/dist/react/subscription-management.d.ts +4 -6
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/dist/utils/beam-errors.d.ts +1 -1
- package/dist/utils/cookies.d.ts +1 -41
- package/dist/utils/cookies.esm.js +1 -1
- package/dist/utils/cookies.esm.js.map +1 -1
- package/dist/utils/cookies.js +1 -1
- package/dist/utils/cookies.js.map +1 -1
- package/dist/utils/debounce.esm.js +1 -1
- package/dist/utils/debounce.js +1 -1
- package/dist/utils/events.d.ts +5 -5
- package/dist/utils/events.esm.js +1 -1
- package/dist/utils/events.js +1 -1
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/is-equal.esm.js +1 -1
- package/dist/utils/is-equal.js +1 -1
- package/dist/utils/memoize-last.esm.js +1 -1
- package/dist/utils/memoize-last.js +1 -1
- package/dist/utils/network-listeners.esm.js +1 -1
- package/dist/utils/network-listeners.esm.js.map +1 -1
- package/dist/utils/network-listeners.js +1 -1
- package/dist/utils/network-listeners.js.map +1 -1
- package/dist/utils/promoManager.d.ts +6 -18
- package/dist/utils/promoManager.esm.js.map +1 -1
- package/dist/utils/promoManager.js.map +1 -1
- package/package.json +42 -39
- package/dist/chunks/_share-dialog-dependencies-BG0p8uUr.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-dHlBUqo0.esm.js +0 -2
- package/dist/chunks/enforce-config-Ba1JkOHs.esm.js +0 -3
- package/dist/chunks/enforce-config-Ba1JkOHs.esm.js.map +0 -1
- package/dist/chunks/enforce-config-CZ3ToOgr.esm.js +0 -3
- package/dist/chunks/enforce-config-CZ3ToOgr.esm.js.map +0 -1
- package/dist/chunks/events-Dki0ka4F.esm.js +0 -2
- package/dist/chunks/index-2OQzw7UI.esm.js.map +0 -1
- package/dist/chunks/index-B1Y88trP.esm.js +0 -2
- package/dist/chunks/index-B1Y88trP.esm.js.map +0 -1
- package/dist/chunks/index-B7hOLixE.esm.d.ts +0 -15
- package/dist/chunks/index-BNjsFEGn.esm.js +0 -2
- package/dist/chunks/index-BTDB5Gk-.esm.js.map +0 -1
- package/dist/chunks/index-BX6GnRsb.esm.js +0 -2
- package/dist/chunks/index-BX6GnRsb.esm.js.map +0 -1
- package/dist/chunks/index-C5gnsl34.esm.js.map +0 -1
- package/dist/chunks/index-CGKJagBi.esm.js.map +0 -1
- package/dist/chunks/index-CWKcDbs6.esm.js +0 -2
- package/dist/chunks/index-CWKcDbs6.esm.js.map +0 -1
- package/dist/chunks/index-Cg65EbvX.esm.js.map +0 -1
- package/dist/chunks/index-Ct1m4IjM.esm.js.map +0 -1
- package/dist/chunks/index-DBb5HSkR.esm.js.map +0 -1
- package/dist/chunks/index-DnTE6QlY.esm.js.map +0 -1
- package/dist/chunks/index-DrxhkT6Y.esm.js.map +0 -1
- package/dist/chunks/index-IKiJwo5v.esm.js +0 -2
- package/dist/chunks/index-eCVyk0rc.esm.js +0 -2
- package/dist/chunks/index-eCVyk0rc.esm.js.map +0 -1
- package/dist/chunks/index-tbwbkOdj.esm.js.map +0 -1
- package/dist/chunks/lit-WqMxC_PA.esm.js +0 -34
- package/dist/chunks/lit-WqMxC_PA.esm.js.map +0 -1
- package/dist/chunks/loading-template-DG4lkIIc.esm.js +0 -2
- package/dist/chunks/localize-Btu9xYcE.esm.js.map +0 -1
- package/dist/chunks/localize-C25pEGnx.esm.js.map +0 -1
- package/dist/chunks/lodash-D3TLHRR_.esm.js +0 -2
- package/dist/chunks/lodash-D3TLHRR_.esm.js.map +0 -1
- package/dist/chunks/order-page-BRG7MXZ2.esm.js.map +0 -1
- package/dist/chunks/order-page-BbHDQfmy.esm.js.map +0 -1
- package/dist/chunks/progress-bar-CveZ8E6Q.esm.d.ts +0 -15
- package/dist/chunks/promo-pill-label-BXRqZHET.esm.d.ts +0 -19
- package/dist/chunks/routes-BvX92EDq.esm.js +0 -2
- package/dist/chunks/routes-BvX92EDq.esm.js.map +0 -1
- package/dist/chunks/routes-DahRzf8t.esm.d.ts +0 -638
- package/dist/chunks/routes-DguZveS3.esm.js +0 -2
- package/dist/chunks/routes-DguZveS3.esm.js.map +0 -1
- package/dist/chunks/share-button-BRjKJc5L.esm.js.map +0 -1
- package/dist/chunks/share-button-CDVVaxEc.esm.d.ts +0 -27
- package/dist/chunks/share-button-DmjRJmXh.esm.js.map +0 -1
- package/dist/chunks/update-cart-CJywJNax.esm.js.map +0 -1
- package/dist/chunks/update-cart-gwNcGXkd.esm.js.map +0 -1
- package/dist/chunks/vendor-KKSARHWL.esm.js +0 -1284
- package/dist/chunks/vendor-KKSARHWL.esm.js.map +0 -1
|
@@ -1,1284 +0,0 @@
|
|
|
1
|
-
import{i as U,n as u,s as Xe,r as Lt,x as Y,e as Ye,a as ot,b as I,c as zt,o as E,d as Ot}from"./lit-WqMxC_PA.esm.js";var qt="";function Kt(t){qt=t}function Ze(t=""){if(!qt){const e=[...document.getElementsByTagName("script")],o=e.find(r=>r.hasAttribute("data-shoelace"));if(o)Kt(o.getAttribute("data-shoelace"));else{const r=e.find(n=>/shoelace(\.min)?\.js($|\?)/.test(n.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(n.src));let i="";r&&(i=r.getAttribute("src")),Kt(i.split("/").slice(0,-1).join("/"))}}return qt.replace(/\/$/,"")+(t?`/${t.replace(/^\//,"")}`:"")}var he=Object.defineProperty,Ge=Object.defineProperties,Je=Object.getOwnPropertyDescriptor,Qe=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,to=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable,Xt=(t,e)=>(e=Symbol[t])?e:Symbol.for("Symbol."+t),fe=(t,e,o)=>e in t?he(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,rt=(t,e)=>{for(var o in e||(e={}))to.call(e,o)&&fe(t,o,e[o]);if(pe)for(var o of pe(e))eo.call(e,o)&&fe(t,o,e[o]);return t},$t=(t,e)=>Ge(t,Qe(e)),c=(t,e,o,r)=>{for(var i=r>1?void 0:r?Je(e,o):e,n=t.length-1,s;n>=0;n--)(s=t[n])&&(i=(r?s(e,o,i):s(i))||i);return r&&i&&he(e,o,i),i},oo=function(t,e){this[0]=t,this[1]=e},ro=t=>{var e=t[Xt("asyncIterator")],o=!1,r,i={};return e==null?(e=t[Xt("iterator")](),r=n=>i[n]=s=>e[n](s)):(e=e.call(t),r=n=>i[n]=s=>{if(o){if(o=!1,n==="throw")throw s;return s}return o=!0,{done:!1,value:new oo(new Promise(a=>{var l=e[n](s);if(!(l instanceof Object))throw TypeError("Object expected");a(l)}),1)}}),i[Xt("iterator")]=()=>i,r("next"),"throw"in e?r("throw"):i.throw=n=>{throw n},"return"in e&&r("return"),i},io={name:"default",resolver:t=>Ze(`assets/icons/${t}.svg`)},no=io,be={caret:`
|
|
2
|
-
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
3
|
-
<polyline points="6 9 12 15 18 9"></polyline>
|
|
4
|
-
</svg>
|
|
5
|
-
`,check:`
|
|
6
|
-
<svg part="checked-icon" class="checkbox__icon" viewBox="0 0 16 16">
|
|
7
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
8
|
-
<g stroke="currentColor">
|
|
9
|
-
<g transform="translate(3.428571, 3.428571)">
|
|
10
|
-
<path d="M0,5.71428571 L3.42857143,9.14285714"></path>
|
|
11
|
-
<path d="M9.14285714,0 L3.42857143,9.14285714"></path>
|
|
12
|
-
</g>
|
|
13
|
-
</g>
|
|
14
|
-
</g>
|
|
15
|
-
</svg>
|
|
16
|
-
`,"chevron-down":`
|
|
17
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-down" viewBox="0 0 16 16">
|
|
18
|
-
<path fill-rule="evenodd" d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/>
|
|
19
|
-
</svg>
|
|
20
|
-
`,"chevron-left":`
|
|
21
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-left" viewBox="0 0 16 16">
|
|
22
|
-
<path fill-rule="evenodd" d="M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"/>
|
|
23
|
-
</svg>
|
|
24
|
-
`,"chevron-right":`
|
|
25
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
|
|
26
|
-
<path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"/>
|
|
27
|
-
</svg>
|
|
28
|
-
`,copy:`
|
|
29
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-copy" viewBox="0 0 16 16">
|
|
30
|
-
<path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V2Zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H6ZM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1H2Z"/>
|
|
31
|
-
</svg>
|
|
32
|
-
`,eye:`
|
|
33
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
|
|
34
|
-
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
|
35
|
-
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
|
36
|
-
</svg>
|
|
37
|
-
`,"eye-slash":`
|
|
38
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash" viewBox="0 0 16 16">
|
|
39
|
-
<path d="M13.359 11.238C15.06 9.72 16 8 16 8s-3-5.5-8-5.5a7.028 7.028 0 0 0-2.79.588l.77.771A5.944 5.944 0 0 1 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.134 13.134 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755-.165.165-.337.328-.517.486l.708.709z"/>
|
|
40
|
-
<path d="M11.297 9.176a3.5 3.5 0 0 0-4.474-4.474l.823.823a2.5 2.5 0 0 1 2.829 2.829l.822.822zm-2.943 1.299.822.822a3.5 3.5 0 0 1-4.474-4.474l.823.823a2.5 2.5 0 0 0 2.829 2.829z"/>
|
|
41
|
-
<path d="M3.35 5.47c-.18.16-.353.322-.518.487A13.134 13.134 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7.029 7.029 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12-.708.708z"/>
|
|
42
|
-
</svg>
|
|
43
|
-
`,eyedropper:`
|
|
44
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eyedropper" viewBox="0 0 16 16">
|
|
45
|
-
<path d="M13.354.646a1.207 1.207 0 0 0-1.708 0L8.5 3.793l-.646-.647a.5.5 0 1 0-.708.708L8.293 5l-7.147 7.146A.5.5 0 0 0 1 12.5v1.793l-.854.853a.5.5 0 1 0 .708.707L1.707 15H3.5a.5.5 0 0 0 .354-.146L11 7.707l1.146 1.147a.5.5 0 0 0 .708-.708l-.647-.646 3.147-3.146a1.207 1.207 0 0 0 0-1.708l-2-2zM2 12.707l7-7L10.293 7l-7 7H2v-1.293z"></path>
|
|
46
|
-
</svg>
|
|
47
|
-
`,"grip-vertical":`
|
|
48
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-grip-vertical" viewBox="0 0 16 16">
|
|
49
|
-
<path d="M7 2a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zM7 8a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-3 3a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm3 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0z"></path>
|
|
50
|
-
</svg>
|
|
51
|
-
`,indeterminate:`
|
|
52
|
-
<svg part="indeterminate-icon" class="checkbox__icon" viewBox="0 0 16 16">
|
|
53
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round">
|
|
54
|
-
<g stroke="currentColor" stroke-width="2">
|
|
55
|
-
<g transform="translate(2.285714, 6.857143)">
|
|
56
|
-
<path d="M10.2857143,1.14285714 L1.14285714,1.14285714"></path>
|
|
57
|
-
</g>
|
|
58
|
-
</g>
|
|
59
|
-
</g>
|
|
60
|
-
</svg>
|
|
61
|
-
`,"person-fill":`
|
|
62
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
|
|
63
|
-
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/>
|
|
64
|
-
</svg>
|
|
65
|
-
`,"play-fill":`
|
|
66
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-play-fill" viewBox="0 0 16 16">
|
|
67
|
-
<path d="m11.596 8.697-6.363 3.692c-.54.313-1.233-.066-1.233-.697V4.308c0-.63.692-1.01 1.233-.696l6.363 3.692a.802.802 0 0 1 0 1.393z"></path>
|
|
68
|
-
</svg>
|
|
69
|
-
`,"pause-fill":`
|
|
70
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-pause-fill" viewBox="0 0 16 16">
|
|
71
|
-
<path d="M5.5 3.5A1.5 1.5 0 0 1 7 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5zm5 0A1.5 1.5 0 0 1 12 5v6a1.5 1.5 0 0 1-3 0V5a1.5 1.5 0 0 1 1.5-1.5z"></path>
|
|
72
|
-
</svg>
|
|
73
|
-
`,radio:`
|
|
74
|
-
<svg part="checked-icon" class="radio__icon" viewBox="0 0 16 16">
|
|
75
|
-
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
76
|
-
<g fill="currentColor">
|
|
77
|
-
<circle cx="8" cy="8" r="3.42857143"></circle>
|
|
78
|
-
</g>
|
|
79
|
-
</g>
|
|
80
|
-
</svg>
|
|
81
|
-
`,"star-fill":`
|
|
82
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-star-fill" viewBox="0 0 16 16">
|
|
83
|
-
<path d="M3.612 15.443c-.386.198-.824-.149-.746-.592l.83-4.73L.173 6.765c-.329-.314-.158-.888.283-.95l4.898-.696L7.538.792c.197-.39.73-.39.927 0l2.184 4.327 4.898.696c.441.062.612.636.282.95l-3.522 3.356.83 4.73c.078.443-.36.79-.746.592L8 13.187l-4.389 2.256z"/>
|
|
84
|
-
</svg>
|
|
85
|
-
`,"x-lg":`
|
|
86
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-lg" viewBox="0 0 16 16">
|
|
87
|
-
<path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
|
|
88
|
-
</svg>
|
|
89
|
-
`,"x-circle-fill":`
|
|
90
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-circle-fill" viewBox="0 0 16 16">
|
|
91
|
-
<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z"></path>
|
|
92
|
-
</svg>
|
|
93
|
-
`},so={name:"system",resolver:t=>t in be?`data:image/svg+xml,${encodeURIComponent(be[t])}`:""},ao=so,Pt=[no,ao],Ft=[];function lo(t){Ft.push(t)}function co(t){Ft=Ft.filter(e=>e!==t)}function ge(t){return Pt.find(e=>e.name===t)}function uo(t,e){ho(t),Pt.push({name:t,resolver:e.resolver,mutator:e.mutator,spriteSheet:e.spriteSheet}),Ft.forEach(o=>{o.library===t&&o.setIcon()})}function ho(t){Pt=Pt.filter(e=>e.name!==t)}var po=U`
|
|
94
|
-
:host {
|
|
95
|
-
display: inline-block;
|
|
96
|
-
width: 1em;
|
|
97
|
-
height: 1em;
|
|
98
|
-
box-sizing: content-box !important;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
svg {
|
|
102
|
-
display: block;
|
|
103
|
-
height: 100%;
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
106
|
-
`;function it(t,e){const o=rt({waitUntilFirstUpdate:!1},e);return(r,i)=>{const{update:n}=r,s=Array.isArray(t)?t:[t];r.update=function(a){s.forEach(l=>{const d=l;if(a.has(d)){const p=a.get(d),b=this[d];p!==b&&(!o.waitUntilFirstUpdate||this.hasUpdated)&&this[i](p,b)}}),n.call(this,a)}}}var Z=U`
|
|
107
|
-
:host {
|
|
108
|
-
box-sizing: border-box;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
:host *,
|
|
112
|
-
:host *::before,
|
|
113
|
-
:host *::after {
|
|
114
|
-
box-sizing: inherit;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
[hidden] {
|
|
118
|
-
display: none !important;
|
|
119
|
-
}
|
|
120
|
-
`,B=class extends Xe{constructor(){super(),Object.entries(this.constructor.dependencies).forEach(([t,e])=>{this.constructor.define(t,e)})}emit(t,e){const o=new CustomEvent(t,rt({bubbles:!0,cancelable:!1,composed:!0,detail:{}},e));return this.dispatchEvent(o),o}static define(t,e=this,o={}){const r=customElements.get(t);if(!r){customElements.define(t,class extends e{},o);return}let i=" (unknown version)",n=i;"version"in e&&e.version&&(i=" v"+e.version),"version"in r&&r.version&&(n=" v"+r.version),!(i&&n&&i===n)&&console.warn(`Attempted to register <${t}>${i}, but <${t}>${n} has already been registered.`)}};B.version="2.15.0",B.dependencies={},c([u()],B.prototype,"dir",2),c([u()],B.prototype,"lang",2);var yt=Symbol(),Rt=Symbol(),Yt,Zt=new Map,D=class extends B{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(t,e){var o;let r;if(e?.spriteSheet){this.svg=Y`<svg part="svg">
|
|
121
|
-
<use part="use" href="${t}"></use>
|
|
122
|
-
</svg>`,await this.updateComplete;const i=this.shadowRoot.querySelector("[part='svg']");return typeof e.mutator=="function"&&e.mutator(i),this.svg}try{if(r=await fetch(t,{mode:"cors"}),!r.ok)return r.status===410?yt:Rt}catch{return Rt}try{const i=document.createElement("div");i.innerHTML=await r.text();const n=i.firstElementChild;if(((o=n?.tagName)==null?void 0:o.toLowerCase())!=="svg")return yt;Yt||(Yt=new DOMParser);const a=Yt.parseFromString(n.outerHTML,"text/html").body.querySelector("svg");return a?(a.part.add("svg"),document.adoptNode(a)):yt}catch{return yt}}connectedCallback(){super.connectedCallback(),lo(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),co(this)}getIconSource(){const t=ge(this.library);return this.name&&t?{url:t.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const{url:e,fromLibrary:o}=this.getIconSource(),r=o?ge(this.library):void 0;if(!e){this.svg=null;return}let i=Zt.get(e);if(i||(i=this.resolveIcon(e,r),Zt.set(e,i)),!this.initialRender)return;const n=await i;if(n===Rt&&Zt.delete(e),e===this.getIconSource().url){if(Ye(n)){this.svg=n;return}switch(n){case Rt:case yt:this.svg=null,this.emit("sl-error");break;default:this.svg=n.cloneNode(!0),(t=r?.mutator)==null||t.call(r,this.svg),this.emit("sl-load")}}}render(){return this.svg}};D.styles=[Z,po],c([Lt()],D.prototype,"svg",2),c([u({reflect:!0})],D.prototype,"name",2),c([u()],D.prototype,"src",2),c([u()],D.prototype,"label",2),c([u({reflect:!0})],D.prototype,"library",2),c([it("label")],D.prototype,"handleLabelChange",1),c([it(["name","src","library"])],D.prototype,"setIcon",1),D.define("sl-icon");var fo=U`
|
|
123
|
-
:host {
|
|
124
|
-
display: inline-flex;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.badge {
|
|
128
|
-
display: inline-flex;
|
|
129
|
-
align-items: center;
|
|
130
|
-
justify-content: center;
|
|
131
|
-
font-size: max(12px, 0.75em);
|
|
132
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
133
|
-
letter-spacing: var(--sl-letter-spacing-normal);
|
|
134
|
-
line-height: 1;
|
|
135
|
-
border-radius: var(--sl-border-radius-small);
|
|
136
|
-
border: solid 1px var(--sl-color-neutral-0);
|
|
137
|
-
white-space: nowrap;
|
|
138
|
-
padding: 0.35em 0.6em;
|
|
139
|
-
user-select: none;
|
|
140
|
-
-webkit-user-select: none;
|
|
141
|
-
cursor: inherit;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* Variant modifiers */
|
|
145
|
-
.badge--primary {
|
|
146
|
-
background-color: var(--sl-color-primary-600);
|
|
147
|
-
color: var(--sl-color-neutral-0);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
.badge--success {
|
|
151
|
-
background-color: var(--sl-color-success-600);
|
|
152
|
-
color: var(--sl-color-neutral-0);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.badge--neutral {
|
|
156
|
-
background-color: var(--sl-color-neutral-600);
|
|
157
|
-
color: var(--sl-color-neutral-0);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.badge--warning {
|
|
161
|
-
background-color: var(--sl-color-warning-600);
|
|
162
|
-
color: var(--sl-color-neutral-0);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.badge--danger {
|
|
166
|
-
background-color: var(--sl-color-danger-600);
|
|
167
|
-
color: var(--sl-color-neutral-0);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* Pill modifier */
|
|
171
|
-
.badge--pill {
|
|
172
|
-
border-radius: var(--sl-border-radius-pill);
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
/* Pulse modifier */
|
|
176
|
-
.badge--pulse {
|
|
177
|
-
animation: pulse 1.5s infinite;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.badge--pulse.badge--primary {
|
|
181
|
-
--pulse-color: var(--sl-color-primary-600);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.badge--pulse.badge--success {
|
|
185
|
-
--pulse-color: var(--sl-color-success-600);
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.badge--pulse.badge--neutral {
|
|
189
|
-
--pulse-color: var(--sl-color-neutral-600);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.badge--pulse.badge--warning {
|
|
193
|
-
--pulse-color: var(--sl-color-warning-600);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.badge--pulse.badge--danger {
|
|
197
|
-
--pulse-color: var(--sl-color-danger-600);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
@keyframes pulse {
|
|
201
|
-
0% {
|
|
202
|
-
box-shadow: 0 0 0 0 var(--pulse-color);
|
|
203
|
-
}
|
|
204
|
-
70% {
|
|
205
|
-
box-shadow: 0 0 0 0.5rem transparent;
|
|
206
|
-
}
|
|
207
|
-
100% {
|
|
208
|
-
box-shadow: 0 0 0 0 transparent;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
`,wt=class extends B{constructor(){super(...arguments),this.variant="primary",this.pill=!1,this.pulse=!1}render(){return Y`
|
|
212
|
-
<span
|
|
213
|
-
part="base"
|
|
214
|
-
class=${ot({badge:!0,"badge--primary":this.variant==="primary","badge--success":this.variant==="success","badge--neutral":this.variant==="neutral","badge--warning":this.variant==="warning","badge--danger":this.variant==="danger","badge--pill":this.pill,"badge--pulse":this.pulse})}
|
|
215
|
-
role="status"
|
|
216
|
-
>
|
|
217
|
-
<slot></slot>
|
|
218
|
-
</span>
|
|
219
|
-
`}};wt.styles=[Z,fo],c([u({reflect:!0})],wt.prototype,"variant",2),c([u({type:Boolean,reflect:!0})],wt.prototype,"pill",2),c([u({type:Boolean,reflect:!0})],wt.prototype,"pulse",2),wt.define("sl-badge");var bo=U`
|
|
220
|
-
:host {
|
|
221
|
-
--max-width: 20rem;
|
|
222
|
-
--hide-delay: 0ms;
|
|
223
|
-
--show-delay: 150ms;
|
|
224
|
-
|
|
225
|
-
display: contents;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.tooltip {
|
|
229
|
-
--arrow-size: var(--sl-tooltip-arrow-size);
|
|
230
|
-
--arrow-color: var(--sl-tooltip-background-color);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.tooltip::part(popup) {
|
|
234
|
-
z-index: var(--sl-z-index-tooltip);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
.tooltip[placement^='top']::part(popup) {
|
|
238
|
-
transform-origin: bottom;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
.tooltip[placement^='bottom']::part(popup) {
|
|
242
|
-
transform-origin: top;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.tooltip[placement^='left']::part(popup) {
|
|
246
|
-
transform-origin: right;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.tooltip[placement^='right']::part(popup) {
|
|
250
|
-
transform-origin: left;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.tooltip__body {
|
|
254
|
-
display: block;
|
|
255
|
-
width: max-content;
|
|
256
|
-
max-width: var(--max-width);
|
|
257
|
-
border-radius: var(--sl-tooltip-border-radius);
|
|
258
|
-
background-color: var(--sl-tooltip-background-color);
|
|
259
|
-
font-family: var(--sl-tooltip-font-family);
|
|
260
|
-
font-size: var(--sl-tooltip-font-size);
|
|
261
|
-
font-weight: var(--sl-tooltip-font-weight);
|
|
262
|
-
line-height: var(--sl-tooltip-line-height);
|
|
263
|
-
color: var(--sl-tooltip-color);
|
|
264
|
-
padding: var(--sl-tooltip-padding);
|
|
265
|
-
pointer-events: none;
|
|
266
|
-
user-select: none;
|
|
267
|
-
-webkit-user-select: none;
|
|
268
|
-
}
|
|
269
|
-
`,go=U`
|
|
270
|
-
:host {
|
|
271
|
-
--arrow-color: var(--sl-color-neutral-1000);
|
|
272
|
-
--arrow-size: 6px;
|
|
273
|
-
|
|
274
|
-
/*
|
|
275
|
-
* These properties are computed to account for the arrow's dimensions after being rotated 45º. The constant
|
|
276
|
-
* 0.7071 is derived from sin(45), which is the diagonal size of the arrow's container after rotating.
|
|
277
|
-
*/
|
|
278
|
-
--arrow-size-diagonal: calc(var(--arrow-size) * 0.7071);
|
|
279
|
-
--arrow-padding-offset: calc(var(--arrow-size-diagonal) - var(--arrow-size));
|
|
280
|
-
|
|
281
|
-
display: contents;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.popup {
|
|
285
|
-
position: absolute;
|
|
286
|
-
isolation: isolate;
|
|
287
|
-
max-width: var(--auto-size-available-width, none);
|
|
288
|
-
max-height: var(--auto-size-available-height, none);
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
.popup--fixed {
|
|
292
|
-
position: fixed;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.popup:not(.popup--active) {
|
|
296
|
-
display: none;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.popup__arrow {
|
|
300
|
-
position: absolute;
|
|
301
|
-
width: calc(var(--arrow-size-diagonal) * 2);
|
|
302
|
-
height: calc(var(--arrow-size-diagonal) * 2);
|
|
303
|
-
rotate: 45deg;
|
|
304
|
-
background: var(--arrow-color);
|
|
305
|
-
z-index: -1;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/* Hover bridge */
|
|
309
|
-
.popup-hover-bridge:not(.popup-hover-bridge--visible) {
|
|
310
|
-
display: none;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
.popup-hover-bridge {
|
|
314
|
-
position: fixed;
|
|
315
|
-
z-index: calc(var(--sl-z-index-dropdown) - 1);
|
|
316
|
-
top: 0;
|
|
317
|
-
right: 0;
|
|
318
|
-
bottom: 0;
|
|
319
|
-
left: 0;
|
|
320
|
-
clip-path: polygon(
|
|
321
|
-
var(--hover-bridge-top-left-x, 0) var(--hover-bridge-top-left-y, 0),
|
|
322
|
-
var(--hover-bridge-top-right-x, 0) var(--hover-bridge-top-right-y, 0),
|
|
323
|
-
var(--hover-bridge-bottom-right-x, 0) var(--hover-bridge-bottom-right-y, 0),
|
|
324
|
-
var(--hover-bridge-bottom-left-x, 0) var(--hover-bridge-bottom-left-y, 0)
|
|
325
|
-
);
|
|
326
|
-
}
|
|
327
|
-
`;const G=Math.min,P=Math.max,Bt=Math.round,Tt=Math.floor,J=t=>({x:t,y:t}),mo={left:"right",right:"left",bottom:"top",top:"bottom"},vo={start:"end",end:"start"};function Gt(t,e,o){return P(t,G(e,o))}function dt(t,e){return typeof t=="function"?t(e):t}function Q(t){return t.split("-")[0]}function ut(t){return t.split("-")[1]}function me(t){return t==="x"?"y":"x"}function Jt(t){return t==="y"?"height":"width"}function xt(t){return["top","bottom"].includes(Q(t))?"y":"x"}function Qt(t){return me(xt(t))}function yo(t,e,o){o===void 0&&(o=!1);const r=ut(t),i=Qt(t),n=Jt(i);let s=i==="x"?r===(o?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[n]>e.floating[n]&&(s=Dt(s)),[s,Dt(s)]}function wo(t){const e=Dt(t);return[te(t),e,te(e)]}function te(t){return t.replace(/start|end/g,e=>vo[e])}function xo(t,e,o){const r=["left","right"],i=["right","left"],n=["top","bottom"],s=["bottom","top"];switch(t){case"top":case"bottom":return o?e?i:r:e?r:i;case"left":case"right":return e?n:s;default:return[]}}function ko(t,e,o,r){const i=ut(t);let n=xo(Q(t),o==="start",r);return i&&(n=n.map(s=>s+"-"+i),e&&(n=n.concat(n.map(te)))),n}function Dt(t){return t.replace(/left|right|bottom|top/g,e=>mo[e])}function _o(t){return{top:0,right:0,bottom:0,left:0,...t}}function ve(t){return typeof t!="number"?_o(t):{top:t,right:t,bottom:t,left:t}}function Vt(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function ye(t,e,o){let{reference:r,floating:i}=t;const n=xt(e),s=Qt(e),a=Jt(s),l=Q(e),d=n==="y",p=r.x+r.width/2-i.width/2,b=r.y+r.height/2-i.height/2,g=r[a]/2-i[a]/2;let h;switch(l){case"top":h={x:p,y:r.y-i.height};break;case"bottom":h={x:p,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:b};break;case"left":h={x:r.x-i.width,y:b};break;default:h={x:r.x,y:r.y}}switch(ut(e)){case"start":h[s]-=g*(o&&d?-1:1);break;case"end":h[s]+=g*(o&&d?-1:1);break}return h}const Co=async(t,e,o)=>{const{placement:r="bottom",strategy:i="absolute",middleware:n=[],platform:s}=o,a=n.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let d=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:b}=ye(d,r,l),g=r,h={},f=0;for(let m=0;m<a.length;m++){const{name:y,fn:v}=a[m],{x,y:_,data:A,reset:C}=await v({x:p,y:b,initialPlacement:r,placement:g,strategy:i,middlewareData:h,rects:d,platform:s,elements:{reference:t,floating:e}});if(p=x??p,b=_??b,h={...h,[y]:{...h[y],...A}},C&&f<=50){f++,typeof C=="object"&&(C.placement&&(g=C.placement),C.rects&&(d=C.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):C.rects),{x:p,y:b}=ye(d,g,l)),m=-1;continue}}return{x:p,y:b,placement:g,strategy:i,middlewareData:h}};async function ee(t,e){var o;e===void 0&&(e={});const{x:r,y:i,platform:n,rects:s,elements:a,strategy:l}=t,{boundary:d="clippingAncestors",rootBoundary:p="viewport",elementContext:b="floating",altBoundary:g=!1,padding:h=0}=dt(e,t),f=ve(h),y=a[g?b==="floating"?"reference":"floating":b],v=Vt(await n.getClippingRect({element:(o=await(n.isElement==null?void 0:n.isElement(y)))==null||o?y:y.contextElement||await(n.getDocumentElement==null?void 0:n.getDocumentElement(a.floating)),boundary:d,rootBoundary:p,strategy:l})),x=b==="floating"?{...s.floating,x:r,y:i}:s.reference,_=await(n.getOffsetParent==null?void 0:n.getOffsetParent(a.floating)),A=await(n.isElement==null?void 0:n.isElement(_))?await(n.getScale==null?void 0:n.getScale(_))||{x:1,y:1}:{x:1,y:1},C=Vt(n.convertOffsetParentRelativeRectToViewportRelativeRect?await n.convertOffsetParentRelativeRectToViewportRelativeRect({rect:x,offsetParent:_,strategy:l}):x);return{top:(v.top-C.top+f.top)/A.y,bottom:(C.bottom-v.bottom+f.bottom)/A.y,left:(v.left-C.left+f.left)/A.x,right:(C.right-v.right+f.right)/A.x}}const Eo=t=>({name:"arrow",options:t,async fn(e){const{x:o,y:r,placement:i,rects:n,platform:s,elements:a,middlewareData:l}=e,{element:d,padding:p=0}=dt(t,e)||{};if(d==null)return{};const b=ve(p),g={x:o,y:r},h=Qt(i),f=Jt(h),m=await s.getDimensions(d),y=h==="y",v=y?"top":"left",x=y?"bottom":"right",_=y?"clientHeight":"clientWidth",A=n.reference[f]+n.reference[h]-g[h]-n.floating[f],C=g[h]-n.reference[h],S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let O=S?S[_]:0;(!O||!await(s.isElement==null?void 0:s.isElement(S)))&&(O=a.floating[_]||n.floating[f]);const V=A/2-C/2,X=O/2-m[f]/2-1,gt=G(b[v],X),mt=G(b[x],X),R=gt,vt=O-m[f]-mt,$=O/2-m[f]/2+V,M=Gt(R,$,vt),N=!l.arrow&&ut(i)!=null&&$!=M&&n.reference[f]/2-($<R?gt:mt)-m[f]/2<0,j=N?$<R?$-R:$-vt:0;return{[h]:g[h]+j,data:{[h]:M,centerOffset:$-M-j,...N&&{alignmentOffset:j}},reset:N}}}),So=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var o,r;const{placement:i,middlewareData:n,rects:s,initialPlacement:a,platform:l,elements:d}=e,{mainAxis:p=!0,crossAxis:b=!0,fallbackPlacements:g,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...y}=dt(t,e);if((o=n.arrow)!=null&&o.alignmentOffset)return{};const v=Q(i),x=Q(a)===a,_=await(l.isRTL==null?void 0:l.isRTL(d.floating)),A=g||(x||!m?[Dt(a)]:wo(a));!g&&f!=="none"&&A.push(...ko(a,m,f,_));const C=[a,...A],S=await ee(e,y),O=[];let V=((r=n.flip)==null?void 0:r.overflows)||[];if(p&&O.push(S[v]),b){const R=yo(i,s,_);O.push(S[R[0]],S[R[1]])}if(V=[...V,{placement:i,overflows:O}],!O.every(R=>R<=0)){var X,gt;const R=(((X=n.flip)==null?void 0:X.index)||0)+1,vt=C[R];if(vt)return{data:{index:R,overflows:V},reset:{placement:vt}};let $=(gt=V.filter(M=>M.overflows[0]<=0).sort((M,N)=>M.overflows[1]-N.overflows[1])[0])==null?void 0:gt.placement;if(!$)switch(h){case"bestFit":{var mt;const M=(mt=V.map(N=>[N.placement,N.overflows.filter(j=>j>0).reduce((j,Ke)=>j+Ke,0)]).sort((N,j)=>N[1]-j[1])[0])==null?void 0:mt[0];M&&($=M);break}case"initialPlacement":$=a;break}if(i!==$)return{reset:{placement:$}}}return{}}}};async function Ao(t,e){const{placement:o,platform:r,elements:i}=t,n=await(r.isRTL==null?void 0:r.isRTL(i.floating)),s=Q(o),a=ut(o),l=xt(o)==="y",d=["left","top"].includes(s)?-1:1,p=n&&l?-1:1,b=dt(e,t);let{mainAxis:g,crossAxis:h,alignmentAxis:f}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...b};return a&&typeof f=="number"&&(h=a==="end"?f*-1:f),l?{x:h*p,y:g*d}:{x:g*d,y:h*p}}const Lo=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){const{x:o,y:r}=e,i=await Ao(e,t);return{x:o+i.x,y:r+i.y,data:i}}}},zo=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:r,placement:i}=e,{mainAxis:n=!0,crossAxis:s=!1,limiter:a={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...l}=dt(t,e),d={x:o,y:r},p=await ee(e,l),b=xt(Q(i)),g=me(b);let h=d[g],f=d[b];if(n){const y=g==="y"?"top":"left",v=g==="y"?"bottom":"right",x=h+p[y],_=h-p[v];h=Gt(x,h,_)}if(s){const y=b==="y"?"top":"left",v=b==="y"?"bottom":"right",x=f+p[y],_=f-p[v];f=Gt(x,f,_)}const m=a.fn({...e,[g]:h,[b]:f});return{...m,data:{x:m.x-o,y:m.y-r}}}}},we=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:o,rects:r,platform:i,elements:n}=e,{apply:s=()=>{},...a}=dt(t,e),l=await ee(e,a),d=Q(o),p=ut(o),b=xt(o)==="y",{width:g,height:h}=r.floating;let f,m;d==="top"||d==="bottom"?(f=d,m=p===(await(i.isRTL==null?void 0:i.isRTL(n.floating))?"start":"end")?"left":"right"):(m=d,f=p==="end"?"top":"bottom");const y=h-l[f],v=g-l[m],x=!e.middlewareData.shift;let _=y,A=v;if(b){const S=g-l.left-l.right;A=p||x?G(v,S):S}else{const S=h-l.top-l.bottom;_=p||x?G(y,S):S}if(x&&!p){const S=P(l.left,0),O=P(l.right,0),V=P(l.top,0),X=P(l.bottom,0);b?A=g-2*(S!==0||O!==0?S+O:P(l.left,l.right)):_=h-2*(V!==0||X!==0?V+X:P(l.top,l.bottom))}await s({...e,availableWidth:A,availableHeight:_});const C=await i.getDimensions(n.floating);return g!==C.width||h!==C.height?{reset:{rects:!0}}:{}}}};function tt(t){return xe(t)?(t.nodeName||"").toLowerCase():"#document"}function F(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function q(t){var e;return(e=(xe(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function xe(t){return t instanceof Node||t instanceof F(t).Node}function K(t){return t instanceof Element||t instanceof F(t).Element}function W(t){return t instanceof HTMLElement||t instanceof F(t).HTMLElement}function ke(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof F(t).ShadowRoot}function kt(t){const{overflow:e,overflowX:o,overflowY:r,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+o)&&!["inline","contents"].includes(i)}function Oo(t){return["table","td","th"].includes(tt(t))}function oe(t){const e=re(),o=T(t);return o.transform!=="none"||o.perspective!=="none"||(o.containerType?o.containerType!=="normal":!1)||!e&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!e&&(o.filter?o.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(o.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(o.contain||"").includes(r))}function $o(t){let e=ht(t);for(;W(e)&&!Mt(e);){if(oe(e))return e;e=ht(e)}return null}function re(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Mt(t){return["html","body","#document"].includes(tt(t))}function T(t){return F(t).getComputedStyle(t)}function Nt(t){return K(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ht(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ke(t)&&t.host||q(t);return ke(e)?e.host:e}function _e(t){const e=ht(t);return Mt(e)?t.ownerDocument?t.ownerDocument.body:t.body:W(e)&&kt(e)?e:_e(e)}function _t(t,e,o){var r;e===void 0&&(e=[]),o===void 0&&(o=!0);const i=_e(t),n=i===((r=t.ownerDocument)==null?void 0:r.body),s=F(i);return n?e.concat(s,s.visualViewport||[],kt(i)?i:[],s.frameElement&&o?_t(s.frameElement):[]):e.concat(i,_t(i,[],o))}function Ce(t){const e=T(t);let o=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=W(t),n=i?t.offsetWidth:o,s=i?t.offsetHeight:r,a=Bt(o)!==n||Bt(r)!==s;return a&&(o=n,r=s),{width:o,height:r,$:a}}function ie(t){return K(t)?t:t.contextElement}function pt(t){const e=ie(t);if(!W(e))return J(1);const o=e.getBoundingClientRect(),{width:r,height:i,$:n}=Ce(e);let s=(n?Bt(o.width):o.width)/r,a=(n?Bt(o.height):o.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Po=J(0);function Ee(t){const e=F(t);return!re()||!e.visualViewport?Po:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Fo(t,e,o){return e===void 0&&(e=!1),!o||e&&o!==F(t)?!1:e}function nt(t,e,o,r){e===void 0&&(e=!1),o===void 0&&(o=!1);const i=t.getBoundingClientRect(),n=ie(t);let s=J(1);e&&(r?K(r)&&(s=pt(r)):s=pt(t));const a=Fo(n,o,r)?Ee(n):J(0);let l=(i.left+a.x)/s.x,d=(i.top+a.y)/s.y,p=i.width/s.x,b=i.height/s.y;if(n){const g=F(n),h=r&&K(r)?F(r):r;let f=g.frameElement;for(;f&&r&&h!==g;){const m=pt(f),y=f.getBoundingClientRect(),v=T(f),x=y.left+(f.clientLeft+parseFloat(v.paddingLeft))*m.x,_=y.top+(f.clientTop+parseFloat(v.paddingTop))*m.y;l*=m.x,d*=m.y,p*=m.x,b*=m.y,l+=x,d+=_,f=F(f).frameElement}}return Vt({width:p,height:b,x:l,y:d})}function Ro(t){let{rect:e,offsetParent:o,strategy:r}=t;const i=W(o),n=q(o);if(o===n)return e;let s={scrollLeft:0,scrollTop:0},a=J(1);const l=J(0);if((i||!i&&r!=="fixed")&&((tt(o)!=="body"||kt(n))&&(s=Nt(o)),W(o))){const d=nt(o);a=pt(o),l.x=d.x+o.clientLeft,l.y=d.y+o.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-s.scrollLeft*a.x+l.x,y:e.y*a.y-s.scrollTop*a.y+l.y}}function Bo(t){return Array.from(t.getClientRects())}function Se(t){return nt(q(t)).left+Nt(t).scrollLeft}function To(t){const e=q(t),o=Nt(t),r=t.ownerDocument.body,i=P(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),n=P(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let s=-o.scrollLeft+Se(t);const a=-o.scrollTop;return T(r).direction==="rtl"&&(s+=P(e.clientWidth,r.clientWidth)-i),{width:i,height:n,x:s,y:a}}function Do(t,e){const o=F(t),r=q(t),i=o.visualViewport;let n=r.clientWidth,s=r.clientHeight,a=0,l=0;if(i){n=i.width,s=i.height;const d=re();(!d||d&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:n,height:s,x:a,y:l}}function Vo(t,e){const o=nt(t,!0,e==="fixed"),r=o.top+t.clientTop,i=o.left+t.clientLeft,n=W(t)?pt(t):J(1),s=t.clientWidth*n.x,a=t.clientHeight*n.y,l=i*n.x,d=r*n.y;return{width:s,height:a,x:l,y:d}}function Ae(t,e,o){let r;if(e==="viewport")r=Do(t,o);else if(e==="document")r=To(q(t));else if(K(e))r=Vo(e,o);else{const i=Ee(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return Vt(r)}function Le(t,e){const o=ht(t);return o===e||!K(o)||Mt(o)?!1:T(o).position==="fixed"||Le(o,e)}function Mo(t,e){const o=e.get(t);if(o)return o;let r=_t(t,[],!1).filter(a=>K(a)&&tt(a)!=="body"),i=null;const n=T(t).position==="fixed";let s=n?ht(t):t;for(;K(s)&&!Mt(s);){const a=T(s),l=oe(s);!l&&a.position==="fixed"&&(i=null),(n?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kt(s)&&!l&&Le(t,s))?r=r.filter(p=>p!==s):i=a,s=ht(s)}return e.set(t,r),r}function No(t){let{element:e,boundary:o,rootBoundary:r,strategy:i}=t;const s=[...o==="clippingAncestors"?Mo(e,this._c):[].concat(o),r],a=s[0],l=s.reduce((d,p)=>{const b=Ae(e,p,i);return d.top=P(b.top,d.top),d.right=G(b.right,d.right),d.bottom=G(b.bottom,d.bottom),d.left=P(b.left,d.left),d},Ae(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Io(t){return Ce(t)}function Wo(t,e,o){const r=W(e),i=q(e),n=o==="fixed",s=nt(t,!0,n,e);let a={scrollLeft:0,scrollTop:0};const l=J(0);if(r||!r&&!n)if((tt(e)!=="body"||kt(i))&&(a=Nt(e)),r){const d=nt(e,!0,n,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=Se(i));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function ze(t,e){return!W(t)||T(t).position==="fixed"?null:e?e(t):t.offsetParent}function Oe(t,e){const o=F(t);if(!W(t))return o;let r=ze(t,e);for(;r&&Oo(r)&&T(r).position==="static";)r=ze(r,e);return r&&(tt(r)==="html"||tt(r)==="body"&&T(r).position==="static"&&!oe(r))?o:r||$o(t)||o}const Ho=async function(t){let{reference:e,floating:o,strategy:r}=t;const i=this.getOffsetParent||Oe,n=this.getDimensions;return{reference:Wo(e,await i(o),r),floating:{x:0,y:0,...await n(o)}}};function jo(t){return T(t).direction==="rtl"}const It={convertOffsetParentRelativeRectToViewportRelativeRect:Ro,getDocumentElement:q,getClippingRect:No,getOffsetParent:Oe,getElementRects:Ho,getClientRects:Bo,getDimensions:Io,getScale:pt,isElement:K,isRTL:jo};function Uo(t,e){let o=null,r;const i=q(t);function n(){clearTimeout(r),o&&o.disconnect(),o=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),n();const{left:d,top:p,width:b,height:g}=t.getBoundingClientRect();if(a||e(),!b||!g)return;const h=Tt(p),f=Tt(i.clientWidth-(d+b)),m=Tt(i.clientHeight-(p+g)),y=Tt(d),x={rootMargin:-h+"px "+-f+"px "+-m+"px "+-y+"px",threshold:P(0,G(1,l))||1};let _=!0;function A(C){const S=C[0].intersectionRatio;if(S!==l){if(!_)return s();S?s(!1,S):r=setTimeout(()=>{s(!1,1e-7)},100)}_=!1}try{o=new IntersectionObserver(A,{...x,root:i.ownerDocument})}catch{o=new IntersectionObserver(A,x)}o.observe(t)}return s(!0),n}function qo(t,e,o,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:n=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,d=ie(t),p=i||n?[...d?_t(d):[],..._t(e)]:[];p.forEach(v=>{i&&v.addEventListener("scroll",o,{passive:!0}),n&&v.addEventListener("resize",o)});const b=d&&a?Uo(d,o):null;let g=-1,h=null;s&&(h=new ResizeObserver(v=>{let[x]=v;x&&x.target===d&&h&&(h.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{h&&h.observe(e)})),o()}),d&&!l&&h.observe(d),h.observe(e));let f,m=l?nt(t):null;l&&y();function y(){const v=nt(t);m&&(v.x!==m.x||v.y!==m.y||v.width!==m.width||v.height!==m.height)&&o(),m=v,f=requestAnimationFrame(y)}return o(),()=>{p.forEach(v=>{i&&v.removeEventListener("scroll",o),n&&v.removeEventListener("resize",o)}),b&&b(),h&&h.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Ko=(t,e,o)=>{const r=new Map,i={platform:It,...o},n={...i.platform,_c:r};return Co(t,e,{...i,platform:n})};function Xo(t){return Yo(t)}function ne(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function Yo(t){for(let e=t;e;e=ne(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=ne(t);e;e=ne(e)){if(!(e instanceof Element))continue;const o=getComputedStyle(e);if(o.display!=="contents"&&(o.position!=="static"||o.filter!=="none"||e.tagName==="BODY"))return e}return null}function Zo(t){return t!==null&&typeof t=="object"&&"getBoundingClientRect"in t&&("contextElement"in t?t instanceof Element:!0)}var k=class extends B{constructor(){super(...arguments),this.active=!1,this.placement="top",this.strategy="absolute",this.distance=0,this.skidding=0,this.arrow=!1,this.arrowPlacement="anchor",this.arrowPadding=10,this.flip=!1,this.flipFallbackPlacements="",this.flipFallbackStrategy="best-fit",this.flipPadding=0,this.shift=!1,this.shiftPadding=0,this.autoSizePadding=0,this.hoverBridge=!1,this.updateHoverBridge=()=>{if(this.hoverBridge&&this.anchorEl){const t=this.anchorEl.getBoundingClientRect(),e=this.popup.getBoundingClientRect(),o=this.placement.includes("top")||this.placement.includes("bottom");let r=0,i=0,n=0,s=0,a=0,l=0,d=0,p=0;o?t.top<e.top?(r=t.left,i=t.bottom,n=t.right,s=t.bottom,a=e.left,l=e.top,d=e.right,p=e.top):(r=e.left,i=e.bottom,n=e.right,s=e.bottom,a=t.left,l=t.top,d=t.right,p=t.top):t.left<e.left?(r=t.right,i=t.top,n=e.left,s=e.top,a=t.right,l=t.bottom,d=e.left,p=e.bottom):(r=e.right,i=e.top,n=t.left,s=t.top,a=e.right,l=e.bottom,d=t.left,p=t.bottom),this.style.setProperty("--hover-bridge-top-left-x",`${r}px`),this.style.setProperty("--hover-bridge-top-left-y",`${i}px`),this.style.setProperty("--hover-bridge-top-right-x",`${n}px`),this.style.setProperty("--hover-bridge-top-right-y",`${s}px`),this.style.setProperty("--hover-bridge-bottom-left-x",`${a}px`),this.style.setProperty("--hover-bridge-bottom-left-y",`${l}px`),this.style.setProperty("--hover-bridge-bottom-right-x",`${d}px`),this.style.setProperty("--hover-bridge-bottom-right-y",`${p}px`)}}}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start()}disconnectedCallback(){super.disconnectedCallback(),this.stop()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){const t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof Element||Zo(this.anchor)?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),this.anchorEl&&this.start()}start(){this.anchorEl&&(this.cleanup=qo(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;const t=[Lo({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(we({apply:({rects:o})=>{const r=this.sync==="width"||this.sync==="both",i=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${o.reference.width}px`:"",this.popup.style.height=i?`${o.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(So({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(zo({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(we({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:o,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${o}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Eo({element:this.arrowEl,padding:this.arrowPadding}));const e=this.strategy==="absolute"?o=>It.getOffsetParent(o,Xo):It.getOffsetParent;Ko(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy,platform:$t(rt({},It),{getOffsetParent:e})}).then(({x:o,y:r,middlewareData:i,placement:n})=>{const s=getComputedStyle(this).direction==="rtl",a={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${o}px`,top:`${r}px`}),this.arrow){const l=i.arrow.x,d=i.arrow.y;let p="",b="",g="",h="";if(this.arrowPlacement==="start"){const f=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";p=typeof d=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",b=s?f:"",h=s?"":f}else if(this.arrowPlacement==="end"){const f=typeof l=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";b=s?"":f,h=s?f:"",g=typeof d=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?(h=typeof l=="number"?"calc(50% - var(--arrow-size-diagonal))":"",p=typeof d=="number"?"calc(50% - var(--arrow-size-diagonal))":""):(h=typeof l=="number"?`${l}px`:"",p=typeof d=="number"?`${d}px`:"");Object.assign(this.arrowEl.style,{top:p,right:b,bottom:g,left:h,[a]:"calc(var(--arrow-size-diagonal) * -1)"})}}),requestAnimationFrame(()=>this.updateHoverBridge()),this.emit("sl-reposition")}render(){return Y`
|
|
328
|
-
<slot name="anchor" @slotchange=${this.handleAnchorChange}></slot>
|
|
329
|
-
|
|
330
|
-
<span
|
|
331
|
-
part="hover-bridge"
|
|
332
|
-
class=${ot({"popup-hover-bridge":!0,"popup-hover-bridge--visible":this.hoverBridge&&this.active})}
|
|
333
|
-
></span>
|
|
334
|
-
|
|
335
|
-
<div
|
|
336
|
-
part="popup"
|
|
337
|
-
class=${ot({popup:!0,"popup--active":this.active,"popup--fixed":this.strategy==="fixed","popup--has-arrow":this.arrow})}
|
|
338
|
-
>
|
|
339
|
-
<slot></slot>
|
|
340
|
-
${this.arrow?Y`<div part="arrow" class="popup__arrow" role="presentation"></div>`:""}
|
|
341
|
-
</div>
|
|
342
|
-
`}};k.styles=[Z,go],c([I(".popup")],k.prototype,"popup",2),c([I(".popup__arrow")],k.prototype,"arrowEl",2),c([u()],k.prototype,"anchor",2),c([u({type:Boolean,reflect:!0})],k.prototype,"active",2),c([u({reflect:!0})],k.prototype,"placement",2),c([u({reflect:!0})],k.prototype,"strategy",2),c([u({type:Number})],k.prototype,"distance",2),c([u({type:Number})],k.prototype,"skidding",2),c([u({type:Boolean})],k.prototype,"arrow",2),c([u({attribute:"arrow-placement"})],k.prototype,"arrowPlacement",2),c([u({attribute:"arrow-padding",type:Number})],k.prototype,"arrowPadding",2),c([u({type:Boolean})],k.prototype,"flip",2),c([u({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],k.prototype,"flipFallbackPlacements",2),c([u({attribute:"flip-fallback-strategy"})],k.prototype,"flipFallbackStrategy",2),c([u({type:Object})],k.prototype,"flipBoundary",2),c([u({attribute:"flip-padding",type:Number})],k.prototype,"flipPadding",2),c([u({type:Boolean})],k.prototype,"shift",2),c([u({type:Object})],k.prototype,"shiftBoundary",2),c([u({attribute:"shift-padding",type:Number})],k.prototype,"shiftPadding",2),c([u({attribute:"auto-size"})],k.prototype,"autoSize",2),c([u()],k.prototype,"sync",2),c([u({type:Object})],k.prototype,"autoSizeBoundary",2),c([u({attribute:"auto-size-padding",type:Number})],k.prototype,"autoSizePadding",2),c([u({attribute:"hover-bridge",type:Boolean})],k.prototype,"hoverBridge",2);var $e=new Map,Go=new WeakMap;function Jo(t){return t??{keyframes:[],options:{duration:0}}}function Pe(t,e){return e.toLowerCase()==="rtl"?{keyframes:t.rtlKeyframes||t.keyframes,options:t.options}:t}function st(t,e){$e.set(t,Jo(e))}function at(t,e,o){const r=Go.get(t);if(r?.[e])return Pe(r[e],o.dir);const i=$e.get(e);return i?Pe(i,o.dir):{keyframes:[],options:{duration:0}}}function Wt(t,e){return new Promise(o=>{function r(i){i.target===t&&(t.removeEventListener(e,r),o())}t.addEventListener(e,r)})}function lt(t,e,o){return new Promise(r=>{if(o?.duration===1/0)throw new Error("Promise-based animations must be finite.");const i=t.animate(e,$t(rt({},o),{duration:Qo()?0:o.duration}));i.addEventListener("cancel",r,{once:!0}),i.addEventListener("finish",r,{once:!0})})}function Fe(t){return t=t.toString().toLowerCase(),t.indexOf("ms")>-1?parseFloat(t):t.indexOf("s")>-1?parseFloat(t)*1e3:parseFloat(t)}function Qo(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ft(t){return Promise.all(t.getAnimations().map(e=>new Promise(o=>{e.cancel(),requestAnimationFrame(o)})))}const se=new Set,tr=new MutationObserver(De),bt=new Map;let Re=document.documentElement.dir||"ltr",Be=document.documentElement.lang||navigator.language,ct;tr.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});function Te(...t){t.map(e=>{const o=e.$code.toLowerCase();bt.has(o)?bt.set(o,Object.assign(Object.assign({},bt.get(o)),e)):bt.set(o,e),ct||(ct=e)}),De()}function De(){Re=document.documentElement.dir||"ltr",Be=document.documentElement.lang||navigator.language,[...se.keys()].map(t=>{typeof t.requestUpdate=="function"&&t.requestUpdate()})}let er=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){se.add(this.host)}hostDisconnected(){se.delete(this.host)}dir(){return`${this.host.dir||Re}`.toLowerCase()}lang(){return`${this.host.lang||Be}`.toLowerCase()}getTranslationData(e){var o,r;const i=new Intl.Locale(e.replace(/_/g,"-")),n=i?.language.toLowerCase(),s=(r=(o=i?.region)===null||o===void 0?void 0:o.toLowerCase())!==null&&r!==void 0?r:"",a=bt.get(`${n}-${s}`),l=bt.get(n);return{locale:i,language:n,region:s,primary:a,secondary:l}}exists(e,o){var r;const{primary:i,secondary:n}=this.getTranslationData((r=o.lang)!==null&&r!==void 0?r:this.lang());return o=Object.assign({includeFallback:!1},o),!!(i&&i[e]||n&&n[e]||o.includeFallback&&ct&&ct[e])}term(e,...o){const{primary:r,secondary:i}=this.getTranslationData(this.lang());let n;if(r&&r[e])n=r[e];else if(i&&i[e])n=i[e];else if(ct&&ct[e])n=ct[e];else return console.error(`No translation found for: ${String(e)}`),String(e);return typeof n=="function"?n(...o):n}date(e,o){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),o).format(e)}number(e,o){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),o).format(e)}relativeTime(e,o,r){return new Intl.RelativeTimeFormat(this.lang(),r).format(e,o)}};var Ve={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(t,e)=>`Go to slide ${t} of ${e}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:t=>t===0?"No options selected":t===1?"1 option selected":`${t} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:t=>`Slide ${t}`,toggleColorFormat:"Toggle color format"};Te(Ve);var or=Ve,Ht=class extends er{};Te(or);var L=class extends B{constructor(){super(),this.localize=new Ht(this),this.content="",this.placement="top",this.disabled=!1,this.distance=8,this.open=!1,this.skidding=0,this.trigger="hover focus",this.hoist=!1,this.handleBlur=()=>{this.hasTrigger("focus")&&this.hide()},this.handleClick=()=>{this.hasTrigger("click")&&(this.open?this.hide():this.show())},this.handleFocus=()=>{this.hasTrigger("focus")&&this.show()},this.handleDocumentKeyDown=t=>{t.key==="Escape"&&(t.stopPropagation(),this.hide())},this.handleMouseOver=()=>{if(this.hasTrigger("hover")){const t=Fe(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}},this.handleMouseOut=()=>{if(this.hasTrigger("hover")){const t=Fe(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}},this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)}disconnectedCallback(){var t;(t=this.closeWatcher)==null||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}firstUpdated(){this.body.hidden=!this.open,this.open&&(this.popup.active=!0,this.popup.reposition())}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){var t,e;if(this.open){if(this.disabled)return;this.emit("sl-show"),"CloseWatcher"in window?((t=this.closeWatcher)==null||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>{this.hide()}):document.addEventListener("keydown",this.handleDocumentKeyDown),await ft(this.body),this.body.hidden=!1,this.popup.active=!0;const{keyframes:o,options:r}=at(this,"tooltip.show",{dir:this.localize.dir()});await lt(this.popup.popup,o,r),this.popup.reposition(),this.emit("sl-after-show")}else{this.emit("sl-hide"),(e=this.closeWatcher)==null||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown),await ft(this.body);const{keyframes:o,options:r}=at(this,"tooltip.hide",{dir:this.localize.dir()});await lt(this.popup.popup,o,r),this.popup.active=!1,this.body.hidden=!0,this.emit("sl-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,Wt(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Wt(this,"sl-after-hide")}render(){return Y`
|
|
343
|
-
<sl-popup
|
|
344
|
-
part="base"
|
|
345
|
-
exportparts="
|
|
346
|
-
popup:base__popup,
|
|
347
|
-
arrow:base__arrow
|
|
348
|
-
"
|
|
349
|
-
class=${ot({tooltip:!0,"tooltip--open":this.open})}
|
|
350
|
-
placement=${this.placement}
|
|
351
|
-
distance=${this.distance}
|
|
352
|
-
skidding=${this.skidding}
|
|
353
|
-
strategy=${this.hoist?"fixed":"absolute"}
|
|
354
|
-
flip
|
|
355
|
-
shift
|
|
356
|
-
arrow
|
|
357
|
-
hover-bridge
|
|
358
|
-
>
|
|
359
|
-
${""}
|
|
360
|
-
<slot slot="anchor" aria-describedby="tooltip"></slot>
|
|
361
|
-
|
|
362
|
-
${""}
|
|
363
|
-
<div part="body" id="tooltip" class="tooltip__body" role="tooltip" aria-live=${this.open?"polite":"off"}>
|
|
364
|
-
<slot name="content">${this.content}</slot>
|
|
365
|
-
</div>
|
|
366
|
-
</sl-popup>
|
|
367
|
-
`}};L.styles=[Z,bo],L.dependencies={"sl-popup":k},c([I("slot:not([name])")],L.prototype,"defaultSlot",2),c([I(".tooltip__body")],L.prototype,"body",2),c([I("sl-popup")],L.prototype,"popup",2),c([u()],L.prototype,"content",2),c([u()],L.prototype,"placement",2),c([u({type:Boolean,reflect:!0})],L.prototype,"disabled",2),c([u({type:Number})],L.prototype,"distance",2),c([u({type:Boolean,reflect:!0})],L.prototype,"open",2),c([u({type:Number})],L.prototype,"skidding",2),c([u()],L.prototype,"trigger",2),c([u({type:Boolean})],L.prototype,"hoist",2),c([it("open",{waitUntilFirstUpdate:!0})],L.prototype,"handleOpenChange",1),c([it(["content","distance","hoist","placement","skidding"])],L.prototype,"handleOptionsChange",1),c([it("disabled")],L.prototype,"handleDisabledChange",1),st("tooltip.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:150,easing:"ease"}}),st("tooltip.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:150,easing:"ease"}}),L.define("sl-tooltip");var rr=U`
|
|
368
|
-
:host {
|
|
369
|
-
--track-width: 2px;
|
|
370
|
-
--track-color: rgb(128 128 128 / 25%);
|
|
371
|
-
--indicator-color: var(--sl-color-primary-600);
|
|
372
|
-
--speed: 2s;
|
|
373
|
-
|
|
374
|
-
display: inline-flex;
|
|
375
|
-
width: 1em;
|
|
376
|
-
height: 1em;
|
|
377
|
-
flex: none;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
.spinner {
|
|
381
|
-
flex: 1 1 auto;
|
|
382
|
-
height: 100%;
|
|
383
|
-
width: 100%;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
.spinner__track,
|
|
387
|
-
.spinner__indicator {
|
|
388
|
-
fill: none;
|
|
389
|
-
stroke-width: var(--track-width);
|
|
390
|
-
r: calc(0.5em - var(--track-width) / 2);
|
|
391
|
-
cx: 0.5em;
|
|
392
|
-
cy: 0.5em;
|
|
393
|
-
transform-origin: 50% 50%;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
.spinner__track {
|
|
397
|
-
stroke: var(--track-color);
|
|
398
|
-
transform-origin: 0% 0%;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.spinner__indicator {
|
|
402
|
-
stroke: var(--indicator-color);
|
|
403
|
-
stroke-linecap: round;
|
|
404
|
-
stroke-dasharray: 150% 75%;
|
|
405
|
-
animation: spin var(--speed) linear infinite;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
@keyframes spin {
|
|
409
|
-
0% {
|
|
410
|
-
transform: rotate(0deg);
|
|
411
|
-
stroke-dasharray: 0.05em, 3em;
|
|
412
|
-
}
|
|
413
|
-
|
|
414
|
-
50% {
|
|
415
|
-
transform: rotate(450deg);
|
|
416
|
-
stroke-dasharray: 1.375em, 1.375em;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
100% {
|
|
420
|
-
transform: rotate(1080deg);
|
|
421
|
-
stroke-dasharray: 0.05em, 3em;
|
|
422
|
-
}
|
|
423
|
-
}
|
|
424
|
-
`,Me=class extends B{constructor(){super(...arguments),this.localize=new Ht(this)}render(){return Y`
|
|
425
|
-
<svg part="base" class="spinner" role="progressbar" aria-label=${this.localize.term("loading")}>
|
|
426
|
-
<circle class="spinner__track"></circle>
|
|
427
|
-
<circle class="spinner__indicator"></circle>
|
|
428
|
-
</svg>
|
|
429
|
-
`}};Me.styles=[Z,rr];var Ct=new WeakMap,Et=new WeakMap,St=new WeakMap,ae=new WeakSet,jt=new WeakMap,ir=class{constructor(t,e){this.handleFormData=o=>{const r=this.options.disabled(this.host),i=this.options.name(this.host),n=this.options.value(this.host),s=this.host.tagName.toLowerCase()==="sl-button";this.host.isConnected&&!r&&!s&&typeof i=="string"&&i.length>0&&typeof n<"u"&&(Array.isArray(n)?n.forEach(a=>{o.formData.append(i,a.toString())}):o.formData.append(i,n.toString()))},this.handleFormSubmit=o=>{var r;const i=this.options.disabled(this.host),n=this.options.reportValidity;this.form&&!this.form.noValidate&&((r=Ct.get(this.form))==null||r.forEach(s=>{this.setUserInteracted(s,!0)})),this.form&&!this.form.noValidate&&!i&&!n(this.host)&&(o.preventDefault(),o.stopImmediatePropagation())},this.handleFormReset=()=>{this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1),jt.set(this.host,[])},this.handleInteraction=o=>{const r=jt.get(this.host);r.includes(o.type)||r.push(o.type),r.length===this.options.assumeInteractionOn.length&&this.setUserInteracted(this.host,!0)},this.checkFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const r of o)if(typeof r.checkValidity=="function"&&!r.checkValidity())return!1}return!0},this.reportFormValidity=()=>{if(this.form&&!this.form.noValidate){const o=this.form.querySelectorAll("*");for(const r of o)if(typeof r.reportValidity=="function"&&!r.reportValidity())return!1}return!0},(this.host=t).addController(this),this.options=rt({form:o=>{const r=o.form;if(r){const n=o.getRootNode().querySelector(`#${r}`);if(n)return n}return o.closest("form")},name:o=>o.name,value:o=>o.value,defaultValue:o=>o.defaultValue,disabled:o=>{var r;return(r=o.disabled)!=null?r:!1},reportValidity:o=>typeof o.reportValidity=="function"?o.reportValidity():!0,checkValidity:o=>typeof o.checkValidity=="function"?o.checkValidity():!0,setValue:(o,r)=>o.value=r,assumeInteractionOn:["sl-input"]},e)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),jt.set(this.host,[]),this.options.assumeInteractionOn.forEach(e=>{this.host.addEventListener(e,this.handleInteraction)})}hostDisconnected(){this.detachForm(),jt.delete(this.host),this.options.assumeInteractionOn.forEach(t=>{this.host.removeEventListener(t,this.handleInteraction)})}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.validity.valid)}attachForm(t){t?(this.form=t,Ct.has(this.form)?Ct.get(this.form).add(this.host):Ct.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),Et.has(this.form)||(Et.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity()),St.has(this.form)||(St.set(this.form,this.form.checkValidity),this.form.checkValidity=()=>this.checkFormValidity())):this.form=void 0}detachForm(){if(!this.form)return;const t=Ct.get(this.form);t&&(t.delete(this.host),t.size<=0&&(this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),Et.has(this.form)&&(this.form.reportValidity=Et.get(this.form),Et.delete(this.form)),St.has(this.form)&&(this.form.checkValidity=St.get(this.form),St.delete(this.form)),this.form=void 0))}setUserInteracted(t,e){e?ae.add(t):ae.delete(t),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach(r=>{e.hasAttribute(r)&&o.setAttribute(r,e.getAttribute(r))})),this.form.append(o),o.click(),o.remove()}}getForm(){var t;return(t=this.form)!=null?t:null}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){const e=this.host,o=!!ae.has(e),r=!!e.required;e.toggleAttribute("data-required",r),e.toggleAttribute("data-optional",!r),e.toggleAttribute("data-invalid",!t),e.toggleAttribute("data-valid",t),e.toggleAttribute("data-user-invalid",!t&&o),e.toggleAttribute("data-user-valid",t&&o)}updateValidity(){const t=this.host;this.setValidity(t.validity.valid)}emitInvalidEvent(t){const e=new CustomEvent("sl-invalid",{bubbles:!1,composed:!1,cancelable:!0,detail:{}});t||e.preventDefault(),this.host.dispatchEvent(e)||t?.preventDefault()}},le=Object.freeze({badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1});Object.freeze($t(rt({},le),{valid:!1,valueMissing:!0})),Object.freeze($t(rt({},le),{valid:!1,customError:!0}));var nr=U`
|
|
430
|
-
:host {
|
|
431
|
-
display: inline-block;
|
|
432
|
-
position: relative;
|
|
433
|
-
width: auto;
|
|
434
|
-
cursor: pointer;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
.button {
|
|
438
|
-
display: inline-flex;
|
|
439
|
-
align-items: stretch;
|
|
440
|
-
justify-content: center;
|
|
441
|
-
width: 100%;
|
|
442
|
-
border-style: solid;
|
|
443
|
-
border-width: var(--sl-input-border-width);
|
|
444
|
-
font-family: var(--sl-input-font-family);
|
|
445
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
446
|
-
text-decoration: none;
|
|
447
|
-
user-select: none;
|
|
448
|
-
-webkit-user-select: none;
|
|
449
|
-
white-space: nowrap;
|
|
450
|
-
vertical-align: middle;
|
|
451
|
-
padding: 0;
|
|
452
|
-
transition:
|
|
453
|
-
var(--sl-transition-x-fast) background-color,
|
|
454
|
-
var(--sl-transition-x-fast) color,
|
|
455
|
-
var(--sl-transition-x-fast) border,
|
|
456
|
-
var(--sl-transition-x-fast) box-shadow;
|
|
457
|
-
cursor: inherit;
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
.button::-moz-focus-inner {
|
|
461
|
-
border: 0;
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
.button:focus {
|
|
465
|
-
outline: none;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.button:focus-visible {
|
|
469
|
-
outline: var(--sl-focus-ring);
|
|
470
|
-
outline-offset: var(--sl-focus-ring-offset);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
.button--disabled {
|
|
474
|
-
opacity: 0.5;
|
|
475
|
-
cursor: not-allowed;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/* When disabled, prevent mouse events from bubbling up from children */
|
|
479
|
-
.button--disabled * {
|
|
480
|
-
pointer-events: none;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
.button__prefix,
|
|
484
|
-
.button__suffix {
|
|
485
|
-
flex: 0 0 auto;
|
|
486
|
-
display: flex;
|
|
487
|
-
align-items: center;
|
|
488
|
-
pointer-events: none;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.button__label {
|
|
492
|
-
display: inline-block;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
.button__label::slotted(sl-icon) {
|
|
496
|
-
vertical-align: -2px;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
/*
|
|
500
|
-
* Standard buttons
|
|
501
|
-
*/
|
|
502
|
-
|
|
503
|
-
/* Default */
|
|
504
|
-
.button--standard.button--default {
|
|
505
|
-
background-color: var(--sl-color-neutral-0);
|
|
506
|
-
border-color: var(--sl-color-neutral-300);
|
|
507
|
-
color: var(--sl-color-neutral-700);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.button--standard.button--default:hover:not(.button--disabled) {
|
|
511
|
-
background-color: var(--sl-color-primary-50);
|
|
512
|
-
border-color: var(--sl-color-primary-300);
|
|
513
|
-
color: var(--sl-color-primary-700);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
.button--standard.button--default:active:not(.button--disabled) {
|
|
517
|
-
background-color: var(--sl-color-primary-100);
|
|
518
|
-
border-color: var(--sl-color-primary-400);
|
|
519
|
-
color: var(--sl-color-primary-700);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
/* Primary */
|
|
523
|
-
.button--standard.button--primary {
|
|
524
|
-
background-color: var(--sl-color-primary-600);
|
|
525
|
-
border-color: var(--sl-color-primary-600);
|
|
526
|
-
color: var(--sl-color-neutral-0);
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
.button--standard.button--primary:hover:not(.button--disabled) {
|
|
530
|
-
background-color: var(--sl-color-primary-500);
|
|
531
|
-
border-color: var(--sl-color-primary-500);
|
|
532
|
-
color: var(--sl-color-neutral-0);
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
.button--standard.button--primary:active:not(.button--disabled) {
|
|
536
|
-
background-color: var(--sl-color-primary-600);
|
|
537
|
-
border-color: var(--sl-color-primary-600);
|
|
538
|
-
color: var(--sl-color-neutral-0);
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
/* Success */
|
|
542
|
-
.button--standard.button--success {
|
|
543
|
-
background-color: var(--sl-color-success-600);
|
|
544
|
-
border-color: var(--sl-color-success-600);
|
|
545
|
-
color: var(--sl-color-neutral-0);
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
.button--standard.button--success:hover:not(.button--disabled) {
|
|
549
|
-
background-color: var(--sl-color-success-500);
|
|
550
|
-
border-color: var(--sl-color-success-500);
|
|
551
|
-
color: var(--sl-color-neutral-0);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
.button--standard.button--success:active:not(.button--disabled) {
|
|
555
|
-
background-color: var(--sl-color-success-600);
|
|
556
|
-
border-color: var(--sl-color-success-600);
|
|
557
|
-
color: var(--sl-color-neutral-0);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
/* Neutral */
|
|
561
|
-
.button--standard.button--neutral {
|
|
562
|
-
background-color: var(--sl-color-neutral-600);
|
|
563
|
-
border-color: var(--sl-color-neutral-600);
|
|
564
|
-
color: var(--sl-color-neutral-0);
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
.button--standard.button--neutral:hover:not(.button--disabled) {
|
|
568
|
-
background-color: var(--sl-color-neutral-500);
|
|
569
|
-
border-color: var(--sl-color-neutral-500);
|
|
570
|
-
color: var(--sl-color-neutral-0);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
.button--standard.button--neutral:active:not(.button--disabled) {
|
|
574
|
-
background-color: var(--sl-color-neutral-600);
|
|
575
|
-
border-color: var(--sl-color-neutral-600);
|
|
576
|
-
color: var(--sl-color-neutral-0);
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
/* Warning */
|
|
580
|
-
.button--standard.button--warning {
|
|
581
|
-
background-color: var(--sl-color-warning-600);
|
|
582
|
-
border-color: var(--sl-color-warning-600);
|
|
583
|
-
color: var(--sl-color-neutral-0);
|
|
584
|
-
}
|
|
585
|
-
.button--standard.button--warning:hover:not(.button--disabled) {
|
|
586
|
-
background-color: var(--sl-color-warning-500);
|
|
587
|
-
border-color: var(--sl-color-warning-500);
|
|
588
|
-
color: var(--sl-color-neutral-0);
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
.button--standard.button--warning:active:not(.button--disabled) {
|
|
592
|
-
background-color: var(--sl-color-warning-600);
|
|
593
|
-
border-color: var(--sl-color-warning-600);
|
|
594
|
-
color: var(--sl-color-neutral-0);
|
|
595
|
-
}
|
|
596
|
-
|
|
597
|
-
/* Danger */
|
|
598
|
-
.button--standard.button--danger {
|
|
599
|
-
background-color: var(--sl-color-danger-600);
|
|
600
|
-
border-color: var(--sl-color-danger-600);
|
|
601
|
-
color: var(--sl-color-neutral-0);
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
.button--standard.button--danger:hover:not(.button--disabled) {
|
|
605
|
-
background-color: var(--sl-color-danger-500);
|
|
606
|
-
border-color: var(--sl-color-danger-500);
|
|
607
|
-
color: var(--sl-color-neutral-0);
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
.button--standard.button--danger:active:not(.button--disabled) {
|
|
611
|
-
background-color: var(--sl-color-danger-600);
|
|
612
|
-
border-color: var(--sl-color-danger-600);
|
|
613
|
-
color: var(--sl-color-neutral-0);
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
/*
|
|
617
|
-
* Outline buttons
|
|
618
|
-
*/
|
|
619
|
-
|
|
620
|
-
.button--outline {
|
|
621
|
-
background: none;
|
|
622
|
-
border: solid 1px;
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
/* Default */
|
|
626
|
-
.button--outline.button--default {
|
|
627
|
-
border-color: var(--sl-color-neutral-300);
|
|
628
|
-
color: var(--sl-color-neutral-700);
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
.button--outline.button--default:hover:not(.button--disabled),
|
|
632
|
-
.button--outline.button--default.button--checked:not(.button--disabled) {
|
|
633
|
-
border-color: var(--sl-color-primary-600);
|
|
634
|
-
background-color: var(--sl-color-primary-600);
|
|
635
|
-
color: var(--sl-color-neutral-0);
|
|
636
|
-
}
|
|
637
|
-
|
|
638
|
-
.button--outline.button--default:active:not(.button--disabled) {
|
|
639
|
-
border-color: var(--sl-color-primary-700);
|
|
640
|
-
background-color: var(--sl-color-primary-700);
|
|
641
|
-
color: var(--sl-color-neutral-0);
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
/* Primary */
|
|
645
|
-
.button--outline.button--primary {
|
|
646
|
-
border-color: var(--sl-color-primary-600);
|
|
647
|
-
color: var(--sl-color-primary-600);
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
.button--outline.button--primary:hover:not(.button--disabled),
|
|
651
|
-
.button--outline.button--primary.button--checked:not(.button--disabled) {
|
|
652
|
-
background-color: var(--sl-color-primary-600);
|
|
653
|
-
color: var(--sl-color-neutral-0);
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
.button--outline.button--primary:active:not(.button--disabled) {
|
|
657
|
-
border-color: var(--sl-color-primary-700);
|
|
658
|
-
background-color: var(--sl-color-primary-700);
|
|
659
|
-
color: var(--sl-color-neutral-0);
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
/* Success */
|
|
663
|
-
.button--outline.button--success {
|
|
664
|
-
border-color: var(--sl-color-success-600);
|
|
665
|
-
color: var(--sl-color-success-600);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
|
-
.button--outline.button--success:hover:not(.button--disabled),
|
|
669
|
-
.button--outline.button--success.button--checked:not(.button--disabled) {
|
|
670
|
-
background-color: var(--sl-color-success-600);
|
|
671
|
-
color: var(--sl-color-neutral-0);
|
|
672
|
-
}
|
|
673
|
-
|
|
674
|
-
.button--outline.button--success:active:not(.button--disabled) {
|
|
675
|
-
border-color: var(--sl-color-success-700);
|
|
676
|
-
background-color: var(--sl-color-success-700);
|
|
677
|
-
color: var(--sl-color-neutral-0);
|
|
678
|
-
}
|
|
679
|
-
|
|
680
|
-
/* Neutral */
|
|
681
|
-
.button--outline.button--neutral {
|
|
682
|
-
border-color: var(--sl-color-neutral-600);
|
|
683
|
-
color: var(--sl-color-neutral-600);
|
|
684
|
-
}
|
|
685
|
-
|
|
686
|
-
.button--outline.button--neutral:hover:not(.button--disabled),
|
|
687
|
-
.button--outline.button--neutral.button--checked:not(.button--disabled) {
|
|
688
|
-
background-color: var(--sl-color-neutral-600);
|
|
689
|
-
color: var(--sl-color-neutral-0);
|
|
690
|
-
}
|
|
691
|
-
|
|
692
|
-
.button--outline.button--neutral:active:not(.button--disabled) {
|
|
693
|
-
border-color: var(--sl-color-neutral-700);
|
|
694
|
-
background-color: var(--sl-color-neutral-700);
|
|
695
|
-
color: var(--sl-color-neutral-0);
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
/* Warning */
|
|
699
|
-
.button--outline.button--warning {
|
|
700
|
-
border-color: var(--sl-color-warning-600);
|
|
701
|
-
color: var(--sl-color-warning-600);
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
.button--outline.button--warning:hover:not(.button--disabled),
|
|
705
|
-
.button--outline.button--warning.button--checked:not(.button--disabled) {
|
|
706
|
-
background-color: var(--sl-color-warning-600);
|
|
707
|
-
color: var(--sl-color-neutral-0);
|
|
708
|
-
}
|
|
709
|
-
|
|
710
|
-
.button--outline.button--warning:active:not(.button--disabled) {
|
|
711
|
-
border-color: var(--sl-color-warning-700);
|
|
712
|
-
background-color: var(--sl-color-warning-700);
|
|
713
|
-
color: var(--sl-color-neutral-0);
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
/* Danger */
|
|
717
|
-
.button--outline.button--danger {
|
|
718
|
-
border-color: var(--sl-color-danger-600);
|
|
719
|
-
color: var(--sl-color-danger-600);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
.button--outline.button--danger:hover:not(.button--disabled),
|
|
723
|
-
.button--outline.button--danger.button--checked:not(.button--disabled) {
|
|
724
|
-
background-color: var(--sl-color-danger-600);
|
|
725
|
-
color: var(--sl-color-neutral-0);
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
.button--outline.button--danger:active:not(.button--disabled) {
|
|
729
|
-
border-color: var(--sl-color-danger-700);
|
|
730
|
-
background-color: var(--sl-color-danger-700);
|
|
731
|
-
color: var(--sl-color-neutral-0);
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
@media (forced-colors: active) {
|
|
735
|
-
.button.button--outline.button--checked:not(.button--disabled) {
|
|
736
|
-
outline: solid 2px transparent;
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
|
-
|
|
740
|
-
/*
|
|
741
|
-
* Text buttons
|
|
742
|
-
*/
|
|
743
|
-
|
|
744
|
-
.button--text {
|
|
745
|
-
background-color: transparent;
|
|
746
|
-
border-color: transparent;
|
|
747
|
-
color: var(--sl-color-primary-600);
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
.button--text:hover:not(.button--disabled) {
|
|
751
|
-
background-color: transparent;
|
|
752
|
-
border-color: transparent;
|
|
753
|
-
color: var(--sl-color-primary-500);
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
.button--text:focus-visible:not(.button--disabled) {
|
|
757
|
-
background-color: transparent;
|
|
758
|
-
border-color: transparent;
|
|
759
|
-
color: var(--sl-color-primary-500);
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
.button--text:active:not(.button--disabled) {
|
|
763
|
-
background-color: transparent;
|
|
764
|
-
border-color: transparent;
|
|
765
|
-
color: var(--sl-color-primary-700);
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
/*
|
|
769
|
-
* Size modifiers
|
|
770
|
-
*/
|
|
771
|
-
|
|
772
|
-
.button--small {
|
|
773
|
-
height: auto;
|
|
774
|
-
min-height: var(--sl-input-height-small);
|
|
775
|
-
font-size: var(--sl-button-font-size-small);
|
|
776
|
-
line-height: calc(var(--sl-input-height-small) - var(--sl-input-border-width) * 2);
|
|
777
|
-
border-radius: var(--sl-input-border-radius-small);
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
.button--medium {
|
|
781
|
-
height: auto;
|
|
782
|
-
min-height: var(--sl-input-height-medium);
|
|
783
|
-
font-size: var(--sl-button-font-size-medium);
|
|
784
|
-
line-height: calc(var(--sl-input-height-medium) - var(--sl-input-border-width) * 2);
|
|
785
|
-
border-radius: var(--sl-input-border-radius-medium);
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
.button--large {
|
|
789
|
-
height: auto;
|
|
790
|
-
min-height: var(--sl-input-height-large);
|
|
791
|
-
font-size: var(--sl-button-font-size-large);
|
|
792
|
-
line-height: calc(var(--sl-input-height-large) - var(--sl-input-border-width) * 2);
|
|
793
|
-
border-radius: var(--sl-input-border-radius-large);
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
/*
|
|
797
|
-
* Pill modifier
|
|
798
|
-
*/
|
|
799
|
-
|
|
800
|
-
.button--pill.button--small {
|
|
801
|
-
border-radius: var(--sl-input-height-small);
|
|
802
|
-
}
|
|
803
|
-
|
|
804
|
-
.button--pill.button--medium {
|
|
805
|
-
border-radius: var(--sl-input-height-medium);
|
|
806
|
-
}
|
|
807
|
-
|
|
808
|
-
.button--pill.button--large {
|
|
809
|
-
border-radius: var(--sl-input-height-large);
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
/*
|
|
813
|
-
* Circle modifier
|
|
814
|
-
*/
|
|
815
|
-
|
|
816
|
-
.button--circle {
|
|
817
|
-
padding-left: 0;
|
|
818
|
-
padding-right: 0;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
.button--circle.button--small {
|
|
822
|
-
width: var(--sl-input-height-small);
|
|
823
|
-
border-radius: 50%;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.button--circle.button--medium {
|
|
827
|
-
width: var(--sl-input-height-medium);
|
|
828
|
-
border-radius: 50%;
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
.button--circle.button--large {
|
|
832
|
-
width: var(--sl-input-height-large);
|
|
833
|
-
border-radius: 50%;
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
.button--circle .button__prefix,
|
|
837
|
-
.button--circle .button__suffix,
|
|
838
|
-
.button--circle .button__caret {
|
|
839
|
-
display: none;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
|
-
/*
|
|
843
|
-
* Caret modifier
|
|
844
|
-
*/
|
|
845
|
-
|
|
846
|
-
.button--caret .button__suffix {
|
|
847
|
-
display: none;
|
|
848
|
-
}
|
|
849
|
-
|
|
850
|
-
.button--caret .button__caret {
|
|
851
|
-
height: auto;
|
|
852
|
-
}
|
|
853
|
-
|
|
854
|
-
/*
|
|
855
|
-
* Loading modifier
|
|
856
|
-
*/
|
|
857
|
-
|
|
858
|
-
.button--loading {
|
|
859
|
-
position: relative;
|
|
860
|
-
cursor: wait;
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
.button--loading .button__prefix,
|
|
864
|
-
.button--loading .button__label,
|
|
865
|
-
.button--loading .button__suffix,
|
|
866
|
-
.button--loading .button__caret {
|
|
867
|
-
visibility: hidden;
|
|
868
|
-
}
|
|
869
|
-
|
|
870
|
-
.button--loading sl-spinner {
|
|
871
|
-
--indicator-color: currentColor;
|
|
872
|
-
position: absolute;
|
|
873
|
-
font-size: 1em;
|
|
874
|
-
height: 1em;
|
|
875
|
-
width: 1em;
|
|
876
|
-
top: calc(50% - 0.5em);
|
|
877
|
-
left: calc(50% - 0.5em);
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
/*
|
|
881
|
-
* Badges
|
|
882
|
-
*/
|
|
883
|
-
|
|
884
|
-
.button ::slotted(sl-badge) {
|
|
885
|
-
position: absolute;
|
|
886
|
-
top: 0;
|
|
887
|
-
right: 0;
|
|
888
|
-
translate: 50% -50%;
|
|
889
|
-
pointer-events: none;
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
.button--rtl ::slotted(sl-badge) {
|
|
893
|
-
right: auto;
|
|
894
|
-
left: 0;
|
|
895
|
-
translate: -50% -50%;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
/*
|
|
899
|
-
* Button spacing
|
|
900
|
-
*/
|
|
901
|
-
|
|
902
|
-
.button--has-label.button--small .button__label {
|
|
903
|
-
padding: 0 var(--sl-spacing-small);
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
.button--has-label.button--medium .button__label {
|
|
907
|
-
padding: 0 var(--sl-spacing-medium);
|
|
908
|
-
}
|
|
909
|
-
|
|
910
|
-
.button--has-label.button--large .button__label {
|
|
911
|
-
padding: 0 var(--sl-spacing-large);
|
|
912
|
-
}
|
|
913
|
-
|
|
914
|
-
.button--has-prefix.button--small {
|
|
915
|
-
padding-inline-start: var(--sl-spacing-x-small);
|
|
916
|
-
}
|
|
917
|
-
|
|
918
|
-
.button--has-prefix.button--small .button__label {
|
|
919
|
-
padding-inline-start: var(--sl-spacing-x-small);
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
.button--has-prefix.button--medium {
|
|
923
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
.button--has-prefix.button--medium .button__label {
|
|
927
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
.button--has-prefix.button--large {
|
|
931
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
932
|
-
}
|
|
933
|
-
|
|
934
|
-
.button--has-prefix.button--large .button__label {
|
|
935
|
-
padding-inline-start: var(--sl-spacing-small);
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
.button--has-suffix.button--small,
|
|
939
|
-
.button--caret.button--small {
|
|
940
|
-
padding-inline-end: var(--sl-spacing-x-small);
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
.button--has-suffix.button--small .button__label,
|
|
944
|
-
.button--caret.button--small .button__label {
|
|
945
|
-
padding-inline-end: var(--sl-spacing-x-small);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
.button--has-suffix.button--medium,
|
|
949
|
-
.button--caret.button--medium {
|
|
950
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
951
|
-
}
|
|
952
|
-
|
|
953
|
-
.button--has-suffix.button--medium .button__label,
|
|
954
|
-
.button--caret.button--medium .button__label {
|
|
955
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
.button--has-suffix.button--large,
|
|
959
|
-
.button--caret.button--large {
|
|
960
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
961
|
-
}
|
|
962
|
-
|
|
963
|
-
.button--has-suffix.button--large .button__label,
|
|
964
|
-
.button--caret.button--large .button__label {
|
|
965
|
-
padding-inline-end: var(--sl-spacing-small);
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/*
|
|
969
|
-
* Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
|
|
970
|
-
* This means buttons aren't always direct descendants of the button group, thus we can't target them with the
|
|
971
|
-
* ::slotted selector. To work around this, the button group component does some magic to add these special classes to
|
|
972
|
-
* buttons and we style them here instead.
|
|
973
|
-
*/
|
|
974
|
-
|
|
975
|
-
:host([data-sl-button-group__button--first]:not([data-sl-button-group__button--last])) .button {
|
|
976
|
-
border-start-end-radius: 0;
|
|
977
|
-
border-end-end-radius: 0;
|
|
978
|
-
}
|
|
979
|
-
|
|
980
|
-
:host([data-sl-button-group__button--inner]) .button {
|
|
981
|
-
border-radius: 0;
|
|
982
|
-
}
|
|
983
|
-
|
|
984
|
-
:host([data-sl-button-group__button--last]:not([data-sl-button-group__button--first])) .button {
|
|
985
|
-
border-start-start-radius: 0;
|
|
986
|
-
border-end-start-radius: 0;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
/* All except the first */
|
|
990
|
-
:host([data-sl-button-group__button]:not([data-sl-button-group__button--first])) {
|
|
991
|
-
margin-inline-start: calc(-1 * var(--sl-input-border-width));
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
/* Add a visual separator between solid buttons */
|
|
995
|
-
:host(
|
|
996
|
-
[data-sl-button-group__button]:not(
|
|
997
|
-
[data-sl-button-group__button--first],
|
|
998
|
-
[data-sl-button-group__button--radio],
|
|
999
|
-
[variant='default']
|
|
1000
|
-
):not(:hover)
|
|
1001
|
-
)
|
|
1002
|
-
.button:after {
|
|
1003
|
-
content: '';
|
|
1004
|
-
position: absolute;
|
|
1005
|
-
top: 0;
|
|
1006
|
-
inset-inline-start: 0;
|
|
1007
|
-
bottom: 0;
|
|
1008
|
-
border-left: solid 1px rgb(128 128 128 / 33%);
|
|
1009
|
-
mix-blend-mode: multiply;
|
|
1010
|
-
}
|
|
1011
|
-
|
|
1012
|
-
/* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
|
|
1013
|
-
:host([data-sl-button-group__button--hover]) {
|
|
1014
|
-
z-index: 1;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
/* Focus and checked are always on top */
|
|
1018
|
-
:host([data-sl-button-group__button--focus]),
|
|
1019
|
-
:host([data-sl-button-group__button[checked]]) {
|
|
1020
|
-
z-index: 2;
|
|
1021
|
-
}
|
|
1022
|
-
`,Ne=class{constructor(t,...e){this.slotNames=[],this.handleSlotChange=o=>{const r=o.target;(this.slotNames.includes("[default]")&&!r.name||r.name&&this.slotNames.includes(r.name))&&this.host.requestUpdate()},(this.host=t).addController(this),this.slotNames=e}hasDefaultSlot(){return[...this.host.childNodes].some(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent.trim()!=="")return!0;if(t.nodeType===t.ELEMENT_NODE){const e=t;if(e.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!e.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(t){return this.host.querySelector(`:scope > [slot="${t}"]`)!==null}test(t){return t==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(t)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}},w=class extends B{constructor(){super(...arguments),this.formControlController=new ir(this,{assumeInteractionOn:["click"]}),this.hasSlotController=new Ne(this,"[default]","prefix","suffix"),this.localize=new Ht(this),this.hasFocus=!1,this.invalid=!1,this.title="",this.variant="default",this.size="medium",this.caret=!1,this.disabled=!1,this.loading=!1,this.outline=!1,this.pill=!1,this.circle=!1,this.type="button",this.name="",this.value="",this.href="",this.rel="noreferrer noopener"}get validity(){return this.isButton()?this.button.validity:le}get validationMessage(){return this.isButton()?this.button.validationMessage:""}firstUpdated(){this.isButton()&&this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(){this.type==="submit"&&this.formControlController.submit(this),this.type==="reset"&&this.formControlController.reset(this)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t)}isButton(){return!this.href}isLink(){return!!this.href}handleDisabledChange(){this.isButton()&&this.formControlController.setValidity(this.disabled)}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}checkValidity(){return this.isButton()?this.button.checkValidity():!0}getForm(){return this.formControlController.getForm()}reportValidity(){return this.isButton()?this.button.reportValidity():!0}setCustomValidity(t){this.isButton()&&(this.button.setCustomValidity(t),this.formControlController.updateValidity())}render(){const t=this.isLink(),e=t?zt`a`:zt`button`;return Ot`
|
|
1023
|
-
<${e}
|
|
1024
|
-
part="base"
|
|
1025
|
-
class=${ot({button:!0,"button--default":this.variant==="default","button--primary":this.variant==="primary","button--success":this.variant==="success","button--neutral":this.variant==="neutral","button--warning":this.variant==="warning","button--danger":this.variant==="danger","button--text":this.variant==="text","button--small":this.size==="small","button--medium":this.size==="medium","button--large":this.size==="large","button--caret":this.caret,"button--circle":this.circle,"button--disabled":this.disabled,"button--focused":this.hasFocus,"button--loading":this.loading,"button--standard":!this.outline,"button--outline":this.outline,"button--pill":this.pill,"button--rtl":this.localize.dir()==="rtl","button--has-label":this.hasSlotController.test("[default]"),"button--has-prefix":this.hasSlotController.test("prefix"),"button--has-suffix":this.hasSlotController.test("suffix")})}
|
|
1026
|
-
?disabled=${E(t?void 0:this.disabled)}
|
|
1027
|
-
type=${E(t?void 0:this.type)}
|
|
1028
|
-
title=${this.title}
|
|
1029
|
-
name=${E(t?void 0:this.name)}
|
|
1030
|
-
value=${E(t?void 0:this.value)}
|
|
1031
|
-
href=${E(t?this.href:void 0)}
|
|
1032
|
-
target=${E(t?this.target:void 0)}
|
|
1033
|
-
download=${E(t?this.download:void 0)}
|
|
1034
|
-
rel=${E(t?this.rel:void 0)}
|
|
1035
|
-
role=${E(t?void 0:"button")}
|
|
1036
|
-
aria-disabled=${this.disabled?"true":"false"}
|
|
1037
|
-
tabindex=${this.disabled?"-1":"0"}
|
|
1038
|
-
@blur=${this.handleBlur}
|
|
1039
|
-
@focus=${this.handleFocus}
|
|
1040
|
-
@invalid=${this.isButton()?this.handleInvalid:null}
|
|
1041
|
-
@click=${this.handleClick}
|
|
1042
|
-
>
|
|
1043
|
-
<slot name="prefix" part="prefix" class="button__prefix"></slot>
|
|
1044
|
-
<slot part="label" class="button__label"></slot>
|
|
1045
|
-
<slot name="suffix" part="suffix" class="button__suffix"></slot>
|
|
1046
|
-
${this.caret?Ot` <sl-icon part="caret" class="button__caret" library="system" name="caret"></sl-icon> `:""}
|
|
1047
|
-
${this.loading?Ot`<sl-spinner part="spinner"></sl-spinner>`:""}
|
|
1048
|
-
</${e}>
|
|
1049
|
-
`}};w.styles=[Z,nr],w.dependencies={"sl-icon":D,"sl-spinner":Me},c([I(".button")],w.prototype,"button",2),c([Lt()],w.prototype,"hasFocus",2),c([Lt()],w.prototype,"invalid",2),c([u()],w.prototype,"title",2),c([u({reflect:!0})],w.prototype,"variant",2),c([u({reflect:!0})],w.prototype,"size",2),c([u({type:Boolean,reflect:!0})],w.prototype,"caret",2),c([u({type:Boolean,reflect:!0})],w.prototype,"disabled",2),c([u({type:Boolean,reflect:!0})],w.prototype,"loading",2),c([u({type:Boolean,reflect:!0})],w.prototype,"outline",2),c([u({type:Boolean,reflect:!0})],w.prototype,"pill",2),c([u({type:Boolean,reflect:!0})],w.prototype,"circle",2),c([u()],w.prototype,"type",2),c([u()],w.prototype,"name",2),c([u()],w.prototype,"value",2),c([u()],w.prototype,"href",2),c([u()],w.prototype,"target",2),c([u()],w.prototype,"rel",2),c([u()],w.prototype,"download",2),c([u()],w.prototype,"form",2),c([u({attribute:"formaction"})],w.prototype,"formAction",2),c([u({attribute:"formenctype"})],w.prototype,"formEnctype",2),c([u({attribute:"formmethod"})],w.prototype,"formMethod",2),c([u({attribute:"formnovalidate",type:Boolean})],w.prototype,"formNoValidate",2),c([u({attribute:"formtarget"})],w.prototype,"formTarget",2),c([it("disabled",{waitUntilFirstUpdate:!0})],w.prototype,"handleDisabledChange",1),w.define("sl-button");var Ie=new WeakMap;function We(t){let e=Ie.get(t);return e||(e=window.getComputedStyle(t,null),Ie.set(t,e)),e}function sr(t){if(typeof t.checkVisibility=="function")return t.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});const e=We(t);return e.visibility!=="hidden"&&e.display!=="none"}function ar(t){const e=We(t),{overflowY:o,overflowX:r}=e;return o==="scroll"||r==="scroll"?!0:o!=="auto"||r!=="auto"?!1:t.scrollHeight>t.clientHeight&&o==="auto"||t.scrollWidth>t.clientWidth&&r==="auto"}function lr(t){const e=t.tagName.toLowerCase(),o=Number(t.getAttribute("tabindex"));return t.hasAttribute("tabindex")&&(isNaN(o)||o<=-1)||t.hasAttribute("disabled")||t.closest("[inert]")||e==="input"&&t.getAttribute("type")==="radio"&&!t.hasAttribute("checked")||!sr(t)?!1:(e==="audio"||e==="video")&&t.hasAttribute("controls")||t.hasAttribute("tabindex")||t.hasAttribute("contenteditable")&&t.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(e)?!0:ar(t)}function cr(t,e){var o;return((o=t.getRootNode({composed:!0}))==null?void 0:o.host)!==e}function He(t){const e=new WeakMap,o=[];function r(i){if(i instanceof Element){if(i.hasAttribute("inert")||i.closest("[inert]")||e.has(i))return;e.set(i,!0),!o.includes(i)&&lr(i)&&o.push(i),i instanceof HTMLSlotElement&&cr(i,t)&&i.assignedElements({flatten:!0}).forEach(n=>{r(n)}),i.shadowRoot!==null&&i.shadowRoot.mode==="open"&&r(i.shadowRoot)}for(const n of i.children)r(n)}return r(t),o.sort((i,n)=>{const s=Number(i.getAttribute("tabindex"))||0;return(Number(n.getAttribute("tabindex"))||0)-s})}function*ce(t=document.activeElement){t!=null&&(yield t,"shadowRoot"in t&&t.shadowRoot&&t.shadowRoot.mode!=="closed"&&(yield*ro(ce(t.shadowRoot.activeElement))))}function dr(){return[...ce()].pop()}var At=[],ur=class{constructor(t){this.tabDirection="forward",this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=e=>{var o;if(e.key!=="Tab"||this.isExternalActivated||!this.isActive())return;const r=dr();if(this.previousFocus=r,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;e.shiftKey?this.tabDirection="backward":this.tabDirection="forward";const i=He(this.element);let n=i.findIndex(a=>a===r);this.previousFocus=this.currentFocus;const s=this.tabDirection==="forward"?1:-1;for(;;){n+s>=i.length?n=0:n+s<0?n=i.length-1:n+=s,this.previousFocus=this.currentFocus;const a=i[n];if(this.tabDirection==="backward"&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus)||a&&this.possiblyHasTabbableChildren(a))return;e.preventDefault(),this.currentFocus=a,(o=this.currentFocus)==null||o.focus({preventScroll:!1});const l=[...ce()];if(l.includes(this.currentFocus)||!l.includes(this.previousFocus))break}setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=t,this.elementsWithTabbableControls=["iframe"]}activate(){At.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){At=At.filter(t=>t!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return At[At.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){const t=He(this.element);if(!this.element.matches(":focus-within")){const e=t[0],o=t[t.length-1],r=this.tabDirection==="forward"?e:o;typeof r?.focus=="function"&&(this.currentFocus=r,r.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(t){return this.elementsWithTabbableControls.includes(t.tagName.toLowerCase())||t.hasAttribute("controls")}},de=new Set;function hr(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}function pr(){const t=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(t)||!t?0:t}function je(t){if(de.add(t),!document.documentElement.classList.contains("sl-scroll-lock")){const e=hr()+pr();document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${e}px`)}}function Ue(t){de.delete(t),de.size===0&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}var fr=U`
|
|
1050
|
-
:host {
|
|
1051
|
-
--width: 31rem;
|
|
1052
|
-
--header-spacing: var(--sl-spacing-large);
|
|
1053
|
-
--body-spacing: var(--sl-spacing-large);
|
|
1054
|
-
--footer-spacing: var(--sl-spacing-large);
|
|
1055
|
-
|
|
1056
|
-
display: contents;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
.dialog {
|
|
1060
|
-
display: flex;
|
|
1061
|
-
align-items: center;
|
|
1062
|
-
justify-content: center;
|
|
1063
|
-
position: fixed;
|
|
1064
|
-
top: 0;
|
|
1065
|
-
right: 0;
|
|
1066
|
-
bottom: 0;
|
|
1067
|
-
left: 0;
|
|
1068
|
-
z-index: var(--sl-z-index-dialog);
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
.dialog__panel {
|
|
1072
|
-
display: flex;
|
|
1073
|
-
flex-direction: column;
|
|
1074
|
-
z-index: 2;
|
|
1075
|
-
width: var(--width);
|
|
1076
|
-
max-width: calc(100% - var(--sl-spacing-2x-large));
|
|
1077
|
-
max-height: calc(100% - var(--sl-spacing-2x-large));
|
|
1078
|
-
background-color: var(--sl-panel-background-color);
|
|
1079
|
-
border-radius: var(--sl-border-radius-medium);
|
|
1080
|
-
box-shadow: var(--sl-shadow-x-large);
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
.dialog__panel:focus {
|
|
1084
|
-
outline: none;
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
/* Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone) */
|
|
1088
|
-
@media screen and (max-width: 420px) {
|
|
1089
|
-
.dialog__panel {
|
|
1090
|
-
max-height: 80vh;
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
|
|
1094
|
-
.dialog--open .dialog__panel {
|
|
1095
|
-
display: flex;
|
|
1096
|
-
opacity: 1;
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
|
-
.dialog__header {
|
|
1100
|
-
flex: 0 0 auto;
|
|
1101
|
-
display: flex;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
.dialog__title {
|
|
1105
|
-
flex: 1 1 auto;
|
|
1106
|
-
font: inherit;
|
|
1107
|
-
font-size: var(--sl-font-size-large);
|
|
1108
|
-
line-height: var(--sl-line-height-dense);
|
|
1109
|
-
padding: var(--header-spacing);
|
|
1110
|
-
margin: 0;
|
|
1111
|
-
}
|
|
1112
|
-
|
|
1113
|
-
.dialog__header-actions {
|
|
1114
|
-
flex-shrink: 0;
|
|
1115
|
-
display: flex;
|
|
1116
|
-
flex-wrap: wrap;
|
|
1117
|
-
justify-content: end;
|
|
1118
|
-
gap: var(--sl-spacing-2x-small);
|
|
1119
|
-
padding: 0 var(--header-spacing);
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
.dialog__header-actions sl-icon-button,
|
|
1123
|
-
.dialog__header-actions ::slotted(sl-icon-button) {
|
|
1124
|
-
flex: 0 0 auto;
|
|
1125
|
-
display: flex;
|
|
1126
|
-
align-items: center;
|
|
1127
|
-
font-size: var(--sl-font-size-medium);
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
.dialog__body {
|
|
1131
|
-
flex: 1 1 auto;
|
|
1132
|
-
display: block;
|
|
1133
|
-
padding: var(--body-spacing);
|
|
1134
|
-
overflow: auto;
|
|
1135
|
-
-webkit-overflow-scrolling: touch;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.dialog__footer {
|
|
1139
|
-
flex: 0 0 auto;
|
|
1140
|
-
text-align: right;
|
|
1141
|
-
padding: var(--footer-spacing);
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
|
-
.dialog__footer ::slotted(sl-button:not(:first-of-type)) {
|
|
1145
|
-
margin-inline-start: var(--sl-spacing-x-small);
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
.dialog:not(.dialog--has-footer) .dialog__footer {
|
|
1149
|
-
display: none;
|
|
1150
|
-
}
|
|
1151
|
-
|
|
1152
|
-
.dialog__overlay {
|
|
1153
|
-
position: fixed;
|
|
1154
|
-
top: 0;
|
|
1155
|
-
right: 0;
|
|
1156
|
-
bottom: 0;
|
|
1157
|
-
left: 0;
|
|
1158
|
-
background-color: var(--sl-overlay-background-color);
|
|
1159
|
-
}
|
|
1160
|
-
|
|
1161
|
-
@media (forced-colors: active) {
|
|
1162
|
-
.dialog__panel {
|
|
1163
|
-
border: solid 1px var(--sl-color-neutral-0);
|
|
1164
|
-
}
|
|
1165
|
-
}
|
|
1166
|
-
`,br=U`
|
|
1167
|
-
:host {
|
|
1168
|
-
display: inline-block;
|
|
1169
|
-
color: var(--sl-color-neutral-600);
|
|
1170
|
-
}
|
|
1171
|
-
|
|
1172
|
-
.icon-button {
|
|
1173
|
-
flex: 0 0 auto;
|
|
1174
|
-
display: flex;
|
|
1175
|
-
align-items: center;
|
|
1176
|
-
background: none;
|
|
1177
|
-
border: none;
|
|
1178
|
-
border-radius: var(--sl-border-radius-medium);
|
|
1179
|
-
font-size: inherit;
|
|
1180
|
-
color: inherit;
|
|
1181
|
-
padding: var(--sl-spacing-x-small);
|
|
1182
|
-
cursor: pointer;
|
|
1183
|
-
transition: var(--sl-transition-x-fast) color;
|
|
1184
|
-
-webkit-appearance: none;
|
|
1185
|
-
}
|
|
1186
|
-
|
|
1187
|
-
.icon-button:hover:not(.icon-button--disabled),
|
|
1188
|
-
.icon-button:focus-visible:not(.icon-button--disabled) {
|
|
1189
|
-
color: var(--sl-color-primary-600);
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
.icon-button:active:not(.icon-button--disabled) {
|
|
1193
|
-
color: var(--sl-color-primary-700);
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
.icon-button:focus {
|
|
1197
|
-
outline: none;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
.icon-button--disabled {
|
|
1201
|
-
opacity: 0.5;
|
|
1202
|
-
cursor: not-allowed;
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1205
|
-
.icon-button:focus-visible {
|
|
1206
|
-
outline: var(--sl-focus-ring);
|
|
1207
|
-
outline-offset: var(--sl-focus-ring-offset);
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
.icon-button__icon {
|
|
1211
|
-
pointer-events: none;
|
|
1212
|
-
}
|
|
1213
|
-
`,z=class extends B{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}click(){this.button.click()}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const t=!!this.href,e=t?zt`a`:zt`button`;return Ot`
|
|
1214
|
-
<${e}
|
|
1215
|
-
part="base"
|
|
1216
|
-
class=${ot({"icon-button":!0,"icon-button--disabled":!t&&this.disabled,"icon-button--focused":this.hasFocus})}
|
|
1217
|
-
?disabled=${E(t?void 0:this.disabled)}
|
|
1218
|
-
type=${E(t?void 0:"button")}
|
|
1219
|
-
href=${E(t?this.href:void 0)}
|
|
1220
|
-
target=${E(t?this.target:void 0)}
|
|
1221
|
-
download=${E(t?this.download:void 0)}
|
|
1222
|
-
rel=${E(t&&this.target?"noreferrer noopener":void 0)}
|
|
1223
|
-
role=${E(t?void 0:"button")}
|
|
1224
|
-
aria-disabled=${this.disabled?"true":"false"}
|
|
1225
|
-
aria-label="${this.label}"
|
|
1226
|
-
tabindex=${this.disabled?"-1":"0"}
|
|
1227
|
-
@blur=${this.handleBlur}
|
|
1228
|
-
@focus=${this.handleFocus}
|
|
1229
|
-
@click=${this.handleClick}
|
|
1230
|
-
>
|
|
1231
|
-
<sl-icon
|
|
1232
|
-
class="icon-button__icon"
|
|
1233
|
-
name=${E(this.name)}
|
|
1234
|
-
library=${E(this.library)}
|
|
1235
|
-
src=${E(this.src)}
|
|
1236
|
-
aria-hidden="true"
|
|
1237
|
-
></sl-icon>
|
|
1238
|
-
</${e}>
|
|
1239
|
-
`}};z.styles=[Z,br],z.dependencies={"sl-icon":D},c([I(".icon-button")],z.prototype,"button",2),c([Lt()],z.prototype,"hasFocus",2),c([u()],z.prototype,"name",2),c([u()],z.prototype,"library",2),c([u()],z.prototype,"src",2),c([u()],z.prototype,"href",2),c([u()],z.prototype,"target",2),c([u()],z.prototype,"download",2),c([u()],z.prototype,"label",2),c([u({type:Boolean,reflect:!0})],z.prototype,"disabled",2);var H=class extends B{constructor(){super(...arguments),this.hasSlotController=new Ne(this,"footer"),this.localize=new Ht(this),this.modal=new ur(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=t=>{t.key==="Escape"&&this.modal.isActive()&&this.open&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),je(this))}disconnectedCallback(){var t;super.disconnectedCallback(),this.modal.deactivate(),Ue(this),(t=this.closeWatcher)==null||t.destroy()}requestClose(t){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){const o=at(this,"dialog.denyClose",{dir:this.localize.dir()});lt(this.panel,o.keyframes,o.options);return}this.hide()}addOpenListeners(){var t;"CloseWatcher"in window?((t=this.closeWatcher)==null||t.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var t;(t=this.closeWatcher)==null||t.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),je(this);const t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([ft(this.dialog),ft(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});const e=at(this,"dialog.show",{dir:this.localize.dir()}),o=at(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([lt(this.panel,e.keyframes,e.options),lt(this.overlay,o.keyframes,o.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([ft(this.dialog),ft(this.overlay)]);const t=at(this,"dialog.hide",{dir:this.localize.dir()}),e=at(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([lt(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),lt(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,Ue(this);const o=this.originalTrigger;typeof o?.focus=="function"&&setTimeout(()=>o.focus()),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,Wt(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,Wt(this,"sl-after-hide")}render(){return Y`
|
|
1240
|
-
<div
|
|
1241
|
-
part="base"
|
|
1242
|
-
class=${ot({dialog:!0,"dialog--open":this.open,"dialog--has-footer":this.hasSlotController.test("footer")})}
|
|
1243
|
-
>
|
|
1244
|
-
<div part="overlay" class="dialog__overlay" @click=${()=>this.requestClose("overlay")} tabindex="-1"></div>
|
|
1245
|
-
|
|
1246
|
-
<div
|
|
1247
|
-
part="panel"
|
|
1248
|
-
class="dialog__panel"
|
|
1249
|
-
role="dialog"
|
|
1250
|
-
aria-modal="true"
|
|
1251
|
-
aria-hidden=${this.open?"false":"true"}
|
|
1252
|
-
aria-label=${E(this.noHeader?this.label:void 0)}
|
|
1253
|
-
aria-labelledby=${E(this.noHeader?void 0:"title")}
|
|
1254
|
-
tabindex="-1"
|
|
1255
|
-
>
|
|
1256
|
-
${this.noHeader?"":Y`
|
|
1257
|
-
<header part="header" class="dialog__header">
|
|
1258
|
-
<h2 part="title" class="dialog__title" id="title">
|
|
1259
|
-
<slot name="label"> ${this.label.length>0?this.label:String.fromCharCode(65279)} </slot>
|
|
1260
|
-
</h2>
|
|
1261
|
-
<div part="header-actions" class="dialog__header-actions">
|
|
1262
|
-
<slot name="header-actions"></slot>
|
|
1263
|
-
<sl-icon-button
|
|
1264
|
-
part="close-button"
|
|
1265
|
-
exportparts="base:close-button__base"
|
|
1266
|
-
class="dialog__close"
|
|
1267
|
-
name="x-lg"
|
|
1268
|
-
label=${this.localize.term("close")}
|
|
1269
|
-
library="system"
|
|
1270
|
-
@click="${()=>this.requestClose("close-button")}"
|
|
1271
|
-
></sl-icon-button>
|
|
1272
|
-
</div>
|
|
1273
|
-
</header>
|
|
1274
|
-
`}
|
|
1275
|
-
${""}
|
|
1276
|
-
<div part="body" class="dialog__body" tabindex="-1"><slot></slot></div>
|
|
1277
|
-
|
|
1278
|
-
<footer part="footer" class="dialog__footer">
|
|
1279
|
-
<slot name="footer"></slot>
|
|
1280
|
-
</footer>
|
|
1281
|
-
</div>
|
|
1282
|
-
</div>
|
|
1283
|
-
`}};H.styles=[Z,fr],H.dependencies={"sl-icon-button":z},c([I(".dialog")],H.prototype,"dialog",2),c([I(".dialog__panel")],H.prototype,"panel",2),c([I(".dialog__overlay")],H.prototype,"overlay",2),c([u({type:Boolean,reflect:!0})],H.prototype,"open",2),c([u({reflect:!0})],H.prototype,"label",2),c([u({attribute:"no-header",type:Boolean,reflect:!0})],H.prototype,"noHeader",2),c([it("open",{waitUntilFirstUpdate:!0})],H.prototype,"handleOpenChange",1),st("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}}),st("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}}),st("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}}),st("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}}),st("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}}),H.define("sl-dialog"),z.define("sl-icon-button");function gr(t){return crypto.getRandomValues(new Uint8Array(t))}for(var qe=4096,Ut=[],et=0,ue;et<256;et++)Ut[et]=(et+256).toString(16).substring(1);function mr(){(!ue||et+16>qe)&&(ue=gr(qe),et=0);for(var t=0,e,o="";t<16;t++)e=ue[et+t],t==6?o+=Ut[e&15|64]:t==8?o+=Ut[e&63|128]:o+=Ut[e],t&1&&t>1&&t<11&&(o+="-");return et+=16,o}export{uo as r,Kt as s,mr as v};
|
|
1284
|
-
//# sourceMappingURL=vendor-KKSARHWL.esm.js.map
|