@0001-labs/design-system-1 0.3.0-alpha.27 → 0.3.0
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/DS1/0-face/button-label.ts +28 -0
- package/DS1/0-face/calendar.ts +6 -4
- package/DS1/0-face/carousel.ts +70 -0
- package/DS1/0-face/constraint-panel.ts +422 -0
- package/DS1/0-face/constraint-site.ts +200 -0
- package/DS1/0-face/constraints.ts +281 -0
- package/DS1/0-face/copy-text.ts +1 -1
- package/DS1/0-face/cut-fade.ts +312 -0
- package/DS1/0-face/define.ts +30 -2
- package/DS1/0-face/face-correction.ts +96 -0
- package/DS1/0-face/failures.ts +32 -0
- package/DS1/0-face/feedback-overlays.ts +5 -3
- package/DS1/0-face/feedback.ts +3 -0
- package/DS1/0-face/focus-vision.swift +31 -0
- package/DS1/0-face/focus.ts +181 -0
- package/DS1/0-face/google-face-metrics.json +102 -0
- package/DS1/0-face/grid.ts +61 -4
- package/DS1/0-face/i18n.ts +36 -18
- package/DS1/0-face/layout-inspector.ts +124 -98
- package/DS1/0-face/preference-options.ts +4 -0
- package/DS1/0-face/scaling.ts +21 -3
- package/DS1/0-face/shape.ts +43 -0
- package/DS1/0-face/text-contrast.ts +164 -0
- package/DS1/0-face/theme-bootstrap.js +43 -0
- package/DS1/0-face/toast-queue.ts +7 -1
- package/DS1/0-face/translations/da.json +10 -1
- package/DS1/0-face/translations/de.json +10 -1
- package/DS1/0-face/translations/en.json +10 -1
- package/DS1/0-face/translations/es.json +10 -1
- package/DS1/0-face/translations/fi.json +10 -1
- package/DS1/0-face/translations/fr.json +10 -1
- package/DS1/0-face/translations/is.json +10 -1
- package/DS1/0-face/translations/it.json +10 -1
- package/DS1/0-face/translations/ja.json +10 -1
- package/DS1/0-face/translations/ko.json +10 -1
- package/DS1/0-face/translations/nb.json +10 -1
- package/DS1/0-face/translations/pt-BR.json +10 -1
- package/DS1/0-face/translations/pt.json +10 -1
- package/DS1/0-face/translations/sv.json +10 -1
- package/DS1/0-face/translations/zh.json +10 -1
- package/DS1/0-face/word-wrap.ts +113 -0
- package/DS1/1-root/card.css +47 -20
- package/DS1/1-root/carousel.css +7 -0
- package/DS1/1-root/cjk.css +1 -1
- package/DS1/1-root/component-tokens.css +3 -2
- package/DS1/1-root/context.css +44 -6
- package/DS1/1-root/controls.css +99 -8
- package/DS1/1-root/document.css +9 -1
- package/DS1/1-root/empty.css +46 -5
- package/DS1/1-root/figures.css +50 -3
- package/DS1/1-root/fonts.css +1 -1
- package/DS1/1-root/footer.css +147 -16
- package/DS1/1-root/foundation.ts +60 -0
- package/DS1/1-root/guide.css +35 -0
- package/DS1/1-root/header.css +30 -9
- package/DS1/1-root/library-tokens.ts +1 -2
- package/DS1/1-root/material.css +67 -0
- package/DS1/1-root/notice.css +10 -2
- package/DS1/1-root/one.css +14 -7
- package/DS1/1-root/palette.ts +3 -3
- package/DS1/1-root/progress.css +9 -1
- package/DS1/1-root/row.css +68 -2
- package/DS1/1-root/table.css +47 -4
- package/DS1/1-root/text.css +26 -0
- package/DS1/2-core/button-split.ts +10 -5
- package/DS1/2-core/chart/chart.css +71 -2
- package/DS1/2-core/chart/grid-chart.ts +2 -1
- package/DS1/2-core/ds-activity.ts +32 -0
- package/DS1/2-core/ds-app-chrome.ts +1 -0
- package/DS1/2-core/ds-avatar.ts +35 -6
- package/DS1/2-core/ds-badge.ts +8 -1
- package/DS1/2-core/ds-button.ts +7 -1
- package/DS1/2-core/ds-chart.ts +184 -49
- package/DS1/2-core/ds-cycle.ts +27 -186
- package/DS1/2-core/ds-device-bezel.ts +1 -0
- package/DS1/2-core/ds-empty.ts +6 -4
- package/DS1/2-core/ds-input.ts +23 -3
- package/DS1/2-core/ds-message.ts +22 -0
- package/DS1/2-core/ds-number.ts +349 -0
- package/DS1/2-core/ds-progress.ts +3 -0
- package/DS1/2-core/ds-radio.ts +3 -0
- package/DS1/2-core/ds-stat.ts +3 -0
- package/DS1/2-core/ds-switch.ts +5 -1
- package/DS1/2-core/ds-tag.ts +9 -2
- package/DS1/2-core/ds-text.ts +7 -0
- package/DS1/2-core/ds-token.ts +3 -0
- package/DS1/2-core/ds-tooltip.ts +17 -2
- package/DS1/2-core/ds-window.ts +1 -0
- package/DS1/2-core/generated/ds-icon-map.ts +47 -5
- package/DS1/2-core/generated/icons-extra.ts +24 -3
- package/DS1/2-core/generated/icons-immediate.ts +3 -3
- package/DS1/2-core/number-expression.ts +64 -0
- package/DS1/2-core/styles/ds-activity.css +16 -0
- package/DS1/2-core/styles/ds-badge.css +4 -1
- package/DS1/2-core/styles/ds-button-host.css +45 -12
- package/DS1/2-core/styles/ds-button-split.css +8 -0
- package/DS1/2-core/styles/ds-button.css +92 -19
- package/DS1/2-core/styles/ds-card.css +6 -0
- package/DS1/2-core/styles/ds-checkbox.css +20 -8
- package/DS1/2-core/styles/ds-image.css +2 -1
- package/DS1/2-core/styles/ds-input.css +37 -4
- package/DS1/2-core/styles/ds-number.css +127 -0
- package/DS1/2-core/styles/ds-radio.css +4 -1
- package/DS1/2-core/styles/ds-switch.css +34 -4
- package/DS1/2-core/styles/ds-tag.css +32 -5
- package/DS1/2-core/styles/ds-text.css +13 -4
- package/DS1/2-core/styles/ds-token.css +4 -1
- package/DS1/2-core/styles/ds-tooltip.css +13 -7
- package/DS1/3-unit/calendar-base.ts +5 -2
- package/DS1/3-unit/ds-calendar.ts +711 -37
- package/DS1/3-unit/ds-carousel.ts +13 -1
- package/DS1/3-unit/ds-context.ts +40 -2
- package/DS1/3-unit/ds-form.ts +45 -10
- package/DS1/3-unit/ds-list.ts +31 -3
- package/DS1/3-unit/ds-matrix.ts +3 -0
- package/DS1/3-unit/ds-menu.ts +9 -5
- package/DS1/3-unit/ds-row.ts +17 -2
- package/DS1/3-unit/ds-select.ts +1 -1
- package/DS1/3-unit/ds-sidebar.ts +18 -3
- package/DS1/3-unit/ds-table-of-contents.ts +166 -0
- package/DS1/3-unit/ds-tabs.ts +40 -2
- package/DS1/3-unit/styles/ds-calendar.css +356 -42
- package/DS1/3-unit/styles/ds-context.css +38 -0
- package/DS1/3-unit/styles/ds-list.css +26 -1
- package/DS1/3-unit/styles/ds-matrix.css +4 -1
- package/DS1/3-unit/styles/ds-row.css +39 -0
- package/DS1/3-unit/styles/ds-select.css +22 -12
- package/DS1/3-unit/styles/ds-sidebar.css +16 -2
- package/DS1/3-unit/styles/ds-table-of-contents.css +40 -0
- package/DS1/3-unit/styles/ds-tabs.css +95 -0
- package/DS1/4-page/ds-document.ts +3 -0
- package/DS1/4-page/ds-footer.ts +93 -18
- package/DS1/4-page/ds-header.ts +5 -1
- package/DS1/4-page/ds-overlay.ts +8 -3
- package/DS1/4-page/ds-page.ts +22 -1
- package/DS1/4-page/email.ts +7 -4
- package/DS1/4-page/styles/ds-container.css +0 -1
- package/DS1/4-page/styles/ds-overlay.css +7 -0
- package/DS1/4-page/styles/ds-page.css +10 -0
- package/DS1/5-visual-kit/app-chrome.ts +129 -0
- package/DS1/5-visual-kit/bezels.ts +394 -0
- package/DS1/5-visual-kit/browser-icons.LICENSE +53 -0
- package/DS1/5-visual-kit/browser-icons.ts +47 -0
- package/DS1/5-visual-kit/browser-styles.ts +53 -0
- package/DS1/5-visual-kit/device-bezel.ts +55 -0
- package/DS1/5-visual-kit/instagram-frame.ts +15 -0
- package/DS1/5-visual-kit/instagram.ts +41 -0
- package/DS1/5-visual-kit/mobile-chrome.ts +25 -0
- package/DS1/5-visual-kit/native-icon-paths.ts +145 -0
- package/DS1/5-visual-kit/window.ts +22 -0
- package/DS1/components.ts +1 -0
- package/DS1/index.ts +14 -1
- package/DS1/react/choice.ts +4 -2
- package/DS1/react/context.ts +11 -6
- package/DS1/react/empty.ts +2 -2
- package/DS1/react/footer.ts +5 -5
- package/DS1/react/header.ts +1 -1
- package/DS1/react/message.ts +4 -2
- package/DS1/react/number.ts +53 -0
- package/DS1/react/sidebar.ts +4 -2
- package/DS1/react/table-of-contents.ts +28 -0
- package/DS1/x-flag/LICENSE.md +26 -0
- package/DS1/x-flag/ac.svg +1 -0
- package/DS1/x-flag/ad.svg +1 -0
- package/DS1/x-flag/ae.svg +1 -0
- package/DS1/x-flag/af.svg +1 -0
- package/DS1/x-flag/ag.svg +1 -0
- package/DS1/x-flag/ai.svg +1 -0
- package/DS1/x-flag/al.svg +1 -0
- package/DS1/x-flag/am.svg +1 -0
- package/DS1/x-flag/ao.svg +1 -0
- package/DS1/x-flag/aq.svg +1 -0
- package/DS1/x-flag/ar.svg +1 -0
- package/DS1/x-flag/as.svg +1 -0
- package/DS1/x-flag/at.svg +1 -0
- package/DS1/x-flag/au.svg +1 -0
- package/DS1/x-flag/aw.svg +1 -0
- package/DS1/x-flag/ax.svg +1 -0
- package/DS1/x-flag/az.svg +1 -0
- package/DS1/x-flag/ba.svg +1 -0
- package/DS1/x-flag/bb.svg +1 -0
- package/DS1/x-flag/bd.svg +1 -0
- package/DS1/x-flag/be.svg +1 -0
- package/DS1/x-flag/bf.svg +1 -0
- package/DS1/x-flag/bg.svg +1 -0
- package/DS1/x-flag/bh.svg +1 -0
- package/DS1/x-flag/bi.svg +1 -0
- package/DS1/x-flag/bj.svg +1 -0
- package/DS1/x-flag/bl.svg +1 -0
- package/DS1/x-flag/bm.svg +1 -0
- package/DS1/x-flag/bn.svg +1 -0
- package/DS1/x-flag/bo.svg +1 -0
- package/DS1/x-flag/bq-bo.svg +1 -0
- package/DS1/x-flag/bq-sa.svg +1 -0
- package/DS1/x-flag/bq-se.svg +1 -0
- package/DS1/x-flag/bq.svg +1 -0
- package/DS1/x-flag/br.svg +1 -0
- package/DS1/x-flag/bs.svg +1 -0
- package/DS1/x-flag/bt.svg +1 -0
- package/DS1/x-flag/bv.svg +1 -0
- package/DS1/x-flag/bw.svg +1 -0
- package/DS1/x-flag/by.svg +1 -0
- package/DS1/x-flag/bz.svg +1 -0
- package/DS1/x-flag/ca.svg +1 -0
- package/DS1/x-flag/cc.svg +1 -0
- package/DS1/x-flag/cd.svg +1 -0
- package/DS1/x-flag/cf.svg +1 -0
- package/DS1/x-flag/cg.svg +1 -0
- package/DS1/x-flag/ch.svg +1 -0
- package/DS1/x-flag/ci.svg +1 -0
- package/DS1/x-flag/ck.svg +1 -0
- package/DS1/x-flag/cl.svg +1 -0
- package/DS1/x-flag/cm.svg +1 -0
- package/DS1/x-flag/cn.svg +1 -0
- package/DS1/x-flag/co.svg +1 -0
- package/DS1/x-flag/cr.svg +1 -0
- package/DS1/x-flag/cu.svg +1 -0
- package/DS1/x-flag/cv.svg +1 -0
- package/DS1/x-flag/cw.svg +1 -0
- package/DS1/x-flag/cx.svg +1 -0
- package/DS1/x-flag/cy.svg +1 -0
- package/DS1/x-flag/cz.svg +1 -0
- package/DS1/x-flag/de.svg +1 -0
- package/DS1/x-flag/dj.svg +1 -0
- package/DS1/x-flag/dk.svg +1 -0
- package/DS1/x-flag/dm.svg +1 -0
- package/DS1/x-flag/do.svg +1 -0
- package/DS1/x-flag/dz.svg +1 -0
- package/DS1/x-flag/ec.svg +1 -0
- package/DS1/x-flag/ee.svg +1 -0
- package/DS1/x-flag/eg.svg +1 -0
- package/DS1/x-flag/eh.svg +1 -0
- package/DS1/x-flag/er.svg +1 -0
- package/DS1/x-flag/es-ct.svg +1 -0
- package/DS1/x-flag/es.svg +1 -0
- package/DS1/x-flag/et.svg +1 -0
- package/DS1/x-flag/eu.svg +1 -0
- package/DS1/x-flag/fi.svg +1 -0
- package/DS1/x-flag/fj.svg +1 -0
- package/DS1/x-flag/fk.svg +1 -0
- package/DS1/x-flag/fm.svg +1 -0
- package/DS1/x-flag/fo.svg +1 -0
- package/DS1/x-flag/fr.svg +1 -0
- package/DS1/x-flag/ga.svg +1 -0
- package/DS1/x-flag/gb-eng.svg +1 -0
- package/DS1/x-flag/gb-nir.svg +1 -0
- package/DS1/x-flag/gb-sct.svg +1 -0
- package/DS1/x-flag/gb-wls.svg +1 -0
- package/DS1/x-flag/gb.svg +1 -0
- package/DS1/x-flag/gd.svg +1 -0
- package/DS1/x-flag/ge.svg +1 -0
- package/DS1/x-flag/gf.svg +1 -0
- package/DS1/x-flag/gg.svg +1 -0
- package/DS1/x-flag/gh.svg +1 -0
- package/DS1/x-flag/gi.svg +1 -0
- package/DS1/x-flag/gl.svg +1 -0
- package/DS1/x-flag/gm.svg +1 -0
- package/DS1/x-flag/gn.svg +1 -0
- package/DS1/x-flag/gp.svg +1 -0
- package/DS1/x-flag/gq.svg +1 -0
- package/DS1/x-flag/gr.svg +1 -0
- package/DS1/x-flag/gs.svg +1 -0
- package/DS1/x-flag/gt.svg +1 -0
- package/DS1/x-flag/gu.svg +1 -0
- package/DS1/x-flag/gw.svg +1 -0
- package/DS1/x-flag/gy.svg +1 -0
- package/DS1/x-flag/hk.svg +1 -0
- package/DS1/x-flag/hm.svg +1 -0
- package/DS1/x-flag/hn.svg +1 -0
- package/DS1/x-flag/hr.svg +1 -0
- package/DS1/x-flag/ht.svg +1 -0
- package/DS1/x-flag/hu.svg +1 -0
- package/DS1/x-flag/ic.svg +1 -0
- package/DS1/x-flag/id.svg +1 -0
- package/DS1/x-flag/ie.svg +1 -0
- package/DS1/x-flag/il.svg +1 -0
- package/DS1/x-flag/im.svg +1 -0
- package/DS1/x-flag/in.svg +1 -0
- package/DS1/x-flag/io.svg +1 -0
- package/DS1/x-flag/iq.svg +1 -0
- package/DS1/x-flag/ir.svg +1 -0
- package/DS1/x-flag/is.svg +1 -0
- package/DS1/x-flag/it.svg +1 -0
- package/DS1/x-flag/je.svg +1 -0
- package/DS1/x-flag/jm.svg +1 -0
- package/DS1/x-flag/jo.svg +1 -0
- package/DS1/x-flag/jp.svg +1 -0
- package/DS1/x-flag/ke.svg +1 -0
- package/DS1/x-flag/kg.svg +1 -0
- package/DS1/x-flag/kh.svg +1 -0
- package/DS1/x-flag/ki.svg +1 -0
- package/DS1/x-flag/km.svg +1 -0
- package/DS1/x-flag/kn.svg +1 -0
- package/DS1/x-flag/kp.svg +1 -0
- package/DS1/x-flag/kr.svg +1 -0
- package/DS1/x-flag/kw.svg +1 -0
- package/DS1/x-flag/ky.svg +1 -0
- package/DS1/x-flag/kz.svg +1 -0
- package/DS1/x-flag/la.svg +1 -0
- package/DS1/x-flag/lb.svg +1 -0
- package/DS1/x-flag/lc.svg +1 -0
- package/DS1/x-flag/li.svg +1 -0
- package/DS1/x-flag/lk.svg +1 -0
- package/DS1/x-flag/lr.svg +1 -0
- package/DS1/x-flag/ls.svg +1 -0
- package/DS1/x-flag/lt.svg +1 -0
- package/DS1/x-flag/lu.svg +1 -0
- package/DS1/x-flag/lv.svg +1 -0
- package/DS1/x-flag/ly.svg +1 -0
- package/DS1/x-flag/ma.svg +1 -0
- package/DS1/x-flag/mc.svg +1 -0
- package/DS1/x-flag/md.svg +1 -0
- package/DS1/x-flag/me.svg +1 -0
- package/DS1/x-flag/mf.svg +1 -0
- package/DS1/x-flag/mg.svg +1 -0
- package/DS1/x-flag/mh.svg +1 -0
- package/DS1/x-flag/mk.svg +1 -0
- package/DS1/x-flag/ml.svg +1 -0
- package/DS1/x-flag/mm.svg +1 -0
- package/DS1/x-flag/mn.svg +1 -0
- package/DS1/x-flag/mo.svg +1 -0
- package/DS1/x-flag/mp.svg +1 -0
- package/DS1/x-flag/mq.svg +1 -0
- package/DS1/x-flag/mr.svg +1 -0
- package/DS1/x-flag/ms.svg +1 -0
- package/DS1/x-flag/mt.svg +1 -0
- package/DS1/x-flag/mu.svg +1 -0
- package/DS1/x-flag/mv.svg +1 -0
- package/DS1/x-flag/mw.svg +1 -0
- package/DS1/x-flag/mx.svg +1 -0
- package/DS1/x-flag/my.svg +1 -0
- package/DS1/x-flag/mz.svg +1 -0
- package/DS1/x-flag/na.svg +1 -0
- package/DS1/x-flag/nc.svg +1 -0
- package/DS1/x-flag/ne.svg +1 -0
- package/DS1/x-flag/nf.svg +1 -0
- package/DS1/x-flag/ng.svg +1 -0
- package/DS1/x-flag/ni.svg +1 -0
- package/DS1/x-flag/nl.svg +1 -0
- package/DS1/x-flag/no.svg +1 -0
- package/DS1/x-flag/np.svg +1 -0
- package/DS1/x-flag/nr.svg +1 -0
- package/DS1/x-flag/nu.svg +1 -0
- package/DS1/x-flag/nz.svg +1 -0
- package/DS1/x-flag/om.svg +1 -0
- package/DS1/x-flag/pa.svg +1 -0
- package/DS1/x-flag/pe.svg +1 -0
- package/DS1/x-flag/pf.svg +1 -0
- package/DS1/x-flag/pg.svg +1 -0
- package/DS1/x-flag/ph.svg +1 -0
- package/DS1/x-flag/pk.svg +1 -0
- package/DS1/x-flag/pl.svg +1 -0
- package/DS1/x-flag/pm.svg +1 -0
- package/DS1/x-flag/pn.svg +1 -0
- package/DS1/x-flag/pr.svg +1 -0
- package/DS1/x-flag/ps.svg +1 -0
- package/DS1/x-flag/pt.svg +1 -0
- package/DS1/x-flag/pw.svg +1 -0
- package/DS1/x-flag/py.svg +1 -0
- package/DS1/x-flag/qa.svg +1 -0
- package/DS1/x-flag/re.svg +1 -0
- package/DS1/x-flag/ro.svg +1 -0
- package/DS1/x-flag/rs.svg +1 -0
- package/DS1/x-flag/ru.svg +1 -0
- package/DS1/x-flag/rw.svg +1 -0
- package/DS1/x-flag/sa.svg +1 -0
- package/DS1/x-flag/sb.svg +1 -0
- package/DS1/x-flag/sc.svg +1 -0
- package/DS1/x-flag/sd.svg +1 -0
- package/DS1/x-flag/se.svg +1 -0
- package/DS1/x-flag/sg.svg +1 -0
- package/DS1/x-flag/sh.svg +1 -0
- package/DS1/x-flag/si.svg +1 -0
- package/DS1/x-flag/sj.svg +1 -0
- package/DS1/x-flag/sk.svg +1 -0
- package/DS1/x-flag/sl.svg +1 -0
- package/DS1/x-flag/sm.svg +1 -0
- package/DS1/x-flag/sn.svg +1 -0
- package/DS1/x-flag/so.svg +1 -0
- package/DS1/x-flag/sr.svg +1 -0
- package/DS1/x-flag/ss.svg +1 -0
- package/DS1/x-flag/st.svg +1 -0
- package/DS1/x-flag/sv.svg +1 -0
- package/DS1/x-flag/sx.svg +1 -0
- package/DS1/x-flag/sy.svg +1 -0
- package/DS1/x-flag/sz.svg +1 -0
- package/DS1/x-flag/ta.svg +1 -0
- package/DS1/x-flag/tc.svg +1 -0
- package/DS1/x-flag/td.svg +1 -0
- package/DS1/x-flag/tf.svg +1 -0
- package/DS1/x-flag/tg.svg +1 -0
- package/DS1/x-flag/th.svg +1 -0
- package/DS1/x-flag/tj.svg +1 -0
- package/DS1/x-flag/tk.svg +1 -0
- package/DS1/x-flag/tl.svg +1 -0
- package/DS1/x-flag/tm.svg +1 -0
- package/DS1/x-flag/tn.svg +1 -0
- package/DS1/x-flag/to.svg +1 -0
- package/DS1/x-flag/tr.svg +1 -0
- package/DS1/x-flag/tt.svg +1 -0
- package/DS1/x-flag/tv.svg +1 -0
- package/DS1/x-flag/tw.svg +1 -0
- package/DS1/x-flag/tz.svg +1 -0
- package/DS1/x-flag/ua.svg +1 -0
- package/DS1/x-flag/ug.svg +1 -0
- package/DS1/x-flag/um.svg +1 -0
- package/DS1/x-flag/us.svg +1 -0
- package/DS1/x-flag/uy.svg +1 -0
- package/DS1/x-flag/uz.svg +1 -0
- package/DS1/x-flag/va.svg +1 -0
- package/DS1/x-flag/vc.svg +1 -0
- package/DS1/x-flag/ve.svg +1 -0
- package/DS1/x-flag/vg.svg +1 -0
- package/DS1/x-flag/vi.svg +1 -0
- package/DS1/x-flag/vn.svg +1 -0
- package/DS1/x-flag/vu.svg +1 -0
- package/DS1/x-flag/wf.svg +1 -0
- package/DS1/x-flag/ws.svg +1 -0
- package/DS1/x-flag/xk.svg +1 -0
- package/DS1/x-flag/ye.svg +1 -0
- package/DS1/x-flag/yt.svg +1 -0
- package/DS1/x-flag/za.svg +1 -0
- package/DS1/x-flag/zm.svg +1 -0
- package/DS1/x-flag/zw.svg +1 -0
- package/DS1/x-icon/android.svg +9 -0
- package/DS1/x-icon/arrange-check.svg +1 -1
- package/DS1/x-icon/arrange-page.svg +1 -1
- package/DS1/x-icon/chrome.svg +7 -0
- package/DS1/x-icon/edge-brand.svg +6 -0
- package/DS1/x-icon/firefox.svg +4 -0
- package/DS1/x-icon/health.svg +3 -0
- package/DS1/x-icon/left.svg +2 -3
- package/DS1/x-icon/linux.svg +1 -0
- package/DS1/x-icon/material.svg +1 -0
- package/DS1/x-icon/milestone-planned.svg +3 -0
- package/DS1/x-icon/milestone.svg +3 -0
- package/DS1/x-icon/more.svg +1 -5
- package/DS1/x-icon/network.svg +3 -0
- package/DS1/x-icon/opera.svg +4 -0
- package/DS1/x-icon/prediction.svg +3 -0
- package/DS1/x-icon/priority-high.svg +3 -0
- package/DS1/x-icon/priority-low.svg +3 -0
- package/DS1/x-icon/priority-medium.svg +3 -0
- package/DS1/x-icon/project.svg +3 -0
- package/DS1/x-icon/redo.svg +2 -2
- package/DS1/x-icon/repeat-small.svg +3 -0
- package/DS1/x-icon/safari.svg +4 -0
- package/DS1/x-icon/scaling.svg +3 -0
- package/DS1/x-icon/tabs.svg +4 -0
- package/DS1/x-icon/windows.svg +5 -0
- package/README.md +10 -6
- package/dist/0-face/button-label.d.ts +5 -0
- package/dist/0-face/button-label.d.ts.map +1 -0
- package/dist/0-face/button-label.js +31 -0
- package/dist/0-face/calendar.d.ts +1 -1
- package/dist/0-face/calendar.d.ts.map +1 -1
- package/dist/0-face/calendar.js +6 -3
- package/dist/0-face/carousel.d.ts +9 -0
- package/dist/0-face/carousel.d.ts.map +1 -1
- package/dist/0-face/carousel.js +80 -0
- package/dist/0-face/constraint-panel.d.ts +43 -0
- package/dist/0-face/constraint-panel.d.ts.map +1 -0
- package/dist/0-face/constraint-panel.js +429 -0
- package/dist/0-face/constraint-site.d.ts +72 -0
- package/dist/0-face/constraint-site.d.ts.map +1 -0
- package/dist/0-face/constraint-site.js +185 -0
- package/dist/0-face/constraints.d.ts +47 -0
- package/dist/0-face/constraints.d.ts.map +1 -0
- package/dist/0-face/constraints.js +247 -0
- package/dist/0-face/copy-text.js +1 -1
- package/dist/0-face/cut-fade.d.ts +112 -0
- package/dist/0-face/cut-fade.d.ts.map +1 -0
- package/dist/0-face/cut-fade.js +274 -0
- package/dist/0-face/define.d.ts.map +1 -1
- package/dist/0-face/define.js +24 -3
- package/dist/0-face/face-correction.d.ts +51 -0
- package/dist/0-face/face-correction.d.ts.map +1 -0
- package/dist/0-face/face-correction.js +80 -0
- package/dist/0-face/failures.d.ts +16 -0
- package/dist/0-face/failures.d.ts.map +1 -0
- package/dist/0-face/failures.js +21 -0
- package/dist/0-face/feedback-overlays.d.ts.map +1 -1
- package/dist/0-face/feedback-overlays.js +5 -3
- package/dist/0-face/feedback.d.ts +2 -0
- package/dist/0-face/feedback.d.ts.map +1 -1
- package/dist/0-face/feedback.js +1 -0
- package/dist/0-face/focus.d.ts +71 -0
- package/dist/0-face/focus.d.ts.map +1 -0
- package/dist/0-face/focus.js +196 -0
- package/dist/0-face/grid.d.ts +11 -1
- package/dist/0-face/grid.d.ts.map +1 -1
- package/dist/0-face/grid.js +90 -4
- package/dist/0-face/i18n.d.ts.map +1 -1
- package/dist/0-face/i18n.js +38 -16
- package/dist/0-face/layout-inspector.d.ts +5 -1
- package/dist/0-face/layout-inspector.d.ts.map +1 -1
- package/dist/0-face/layout-inspector.js +130 -104
- package/dist/0-face/preference-options.d.ts +4 -0
- package/dist/0-face/preference-options.d.ts.map +1 -1
- package/dist/0-face/scaling.d.ts +8 -1
- package/dist/0-face/scaling.d.ts.map +1 -1
- package/dist/0-face/scaling.js +19 -2
- package/dist/0-face/shape.d.ts +35 -0
- package/dist/0-face/shape.d.ts.map +1 -0
- package/dist/0-face/shape.js +23 -0
- package/dist/0-face/text-contrast.d.ts +22 -0
- package/dist/0-face/text-contrast.d.ts.map +1 -0
- package/dist/0-face/text-contrast.js +178 -0
- package/dist/0-face/theme-bootstrap.js +56 -0
- package/dist/0-face/toast-queue.d.ts +4 -0
- package/dist/0-face/toast-queue.d.ts.map +1 -1
- package/dist/0-face/toast-queue.js +4 -1
- package/dist/0-face/translations/da.json +10 -1
- package/dist/0-face/translations/de.json +10 -1
- package/dist/0-face/translations/en.json +10 -1
- package/dist/0-face/translations/es.json +10 -1
- package/dist/0-face/translations/fi.json +10 -1
- package/dist/0-face/translations/fr.json +10 -1
- package/dist/0-face/translations/is.json +10 -1
- package/dist/0-face/translations/it.json +10 -1
- package/dist/0-face/translations/ja.json +10 -1
- package/dist/0-face/translations/ko.json +10 -1
- package/dist/0-face/translations/nb.json +10 -1
- package/dist/0-face/translations/pt-BR.json +10 -1
- package/dist/0-face/translations/pt.json +10 -1
- package/dist/0-face/translations/sv.json +10 -1
- package/dist/0-face/translations/zh.json +10 -1
- package/dist/0-face/word-wrap.d.ts +6 -0
- package/dist/0-face/word-wrap.d.ts.map +1 -0
- package/dist/0-face/word-wrap.js +119 -0
- package/dist/1-root/foundation.d.ts +12 -0
- package/dist/1-root/foundation.d.ts.map +1 -0
- package/dist/1-root/foundation.js +59 -0
- package/dist/1-root/library-tokens.d.ts.map +1 -1
- package/dist/1-root/library-tokens.js +1 -2
- package/dist/1-root/palette.d.ts +2 -2
- package/dist/1-root/palette.d.ts.map +1 -1
- package/dist/1-root/palette.js +3 -3
- package/dist/2-core/button-split.d.ts +1 -0
- package/dist/2-core/button-split.d.ts.map +1 -1
- package/dist/2-core/button-split.js +9 -4
- package/dist/2-core/chart/grid-chart.d.ts +2 -0
- package/dist/2-core/chart/grid-chart.d.ts.map +1 -1
- package/dist/2-core/chart/grid-chart.js +2 -1
- package/dist/2-core/ds-activity.d.ts +25 -0
- package/dist/2-core/ds-activity.d.ts.map +1 -0
- package/dist/2-core/ds-activity.js +28 -0
- package/dist/2-core/ds-app-chrome.d.ts +2 -0
- package/dist/2-core/ds-app-chrome.d.ts.map +1 -0
- package/dist/2-core/ds-app-chrome.js +1 -0
- package/dist/2-core/ds-avatar.d.ts +7 -0
- package/dist/2-core/ds-avatar.d.ts.map +1 -1
- package/dist/2-core/ds-avatar.js +41 -6
- package/dist/2-core/ds-badge.d.ts +7 -1
- package/dist/2-core/ds-badge.d.ts.map +1 -1
- package/dist/2-core/ds-badge.js +8 -1
- package/dist/2-core/ds-button.d.ts +12 -0
- package/dist/2-core/ds-button.d.ts.map +1 -1
- package/dist/2-core/ds-button.js +4 -0
- package/dist/2-core/ds-chart.d.ts +28 -3
- package/dist/2-core/ds-chart.d.ts.map +1 -1
- package/dist/2-core/ds-chart.js +110 -130
- package/dist/2-core/ds-cycle.d.ts +2 -2
- package/dist/2-core/ds-cycle.d.ts.map +1 -1
- package/dist/2-core/ds-cycle.js +36 -171
- package/dist/2-core/ds-device-bezel.d.ts +2 -0
- package/dist/2-core/ds-device-bezel.d.ts.map +1 -0
- package/dist/2-core/ds-device-bezel.js +1 -0
- package/dist/2-core/ds-empty.d.ts +2 -2
- package/dist/2-core/ds-empty.d.ts.map +1 -1
- package/dist/2-core/ds-empty.js +6 -4
- package/dist/2-core/ds-input.d.ts +7 -0
- package/dist/2-core/ds-input.d.ts.map +1 -1
- package/dist/2-core/ds-input.js +23 -3
- package/dist/2-core/ds-message.d.ts +11 -0
- package/dist/2-core/ds-message.d.ts.map +1 -1
- package/dist/2-core/ds-message.js +18 -0
- package/dist/2-core/ds-number.d.ts +86 -0
- package/dist/2-core/ds-number.d.ts.map +1 -0
- package/dist/2-core/ds-number.js +326 -0
- package/dist/2-core/ds-progress.d.ts +3 -0
- package/dist/2-core/ds-progress.d.ts.map +1 -1
- package/dist/2-core/ds-progress.js +3 -0
- package/dist/2-core/ds-radio.d.ts +3 -0
- package/dist/2-core/ds-radio.d.ts.map +1 -1
- package/dist/2-core/ds-radio.js +10 -1
- package/dist/2-core/ds-stat.d.ts +3 -0
- package/dist/2-core/ds-stat.d.ts.map +1 -1
- package/dist/2-core/ds-stat.js +3 -0
- package/dist/2-core/ds-switch.d.ts +14 -1
- package/dist/2-core/ds-switch.d.ts.map +1 -1
- package/dist/2-core/ds-switch.js +3 -1
- package/dist/2-core/ds-tag.d.ts +8 -1
- package/dist/2-core/ds-tag.d.ts.map +1 -1
- package/dist/2-core/ds-tag.js +12 -2
- package/dist/2-core/ds-text.d.ts +7 -0
- package/dist/2-core/ds-text.d.ts.map +1 -1
- package/dist/2-core/ds-text.js +7 -0
- package/dist/2-core/ds-token.d.ts +3 -0
- package/dist/2-core/ds-token.d.ts.map +1 -1
- package/dist/2-core/ds-token.js +3 -0
- package/dist/2-core/ds-tooltip.d.ts.map +1 -1
- package/dist/2-core/ds-tooltip.js +23 -2
- package/dist/2-core/ds-window.d.ts +2 -0
- package/dist/2-core/ds-window.d.ts.map +1 -0
- package/dist/2-core/ds-window.js +1 -0
- package/dist/2-core/generated/ds-icon-map.d.ts +27 -6
- package/dist/2-core/generated/ds-icon-map.d.ts.map +1 -1
- package/dist/2-core/generated/ds-icon-map.js +47 -5
- package/dist/2-core/generated/icons-extra.d.ts.map +1 -1
- package/dist/2-core/generated/icons-extra.js +24 -3
- package/dist/2-core/generated/icons-immediate.d.ts +1 -1
- package/dist/2-core/generated/icons-immediate.d.ts.map +1 -1
- package/dist/2-core/generated/icons-immediate.js +3 -3
- package/dist/2-core/number-expression.d.ts +12 -0
- package/dist/2-core/number-expression.d.ts.map +1 -0
- package/dist/2-core/number-expression.js +82 -0
- package/dist/3-unit/calendar-base.d.ts +5 -0
- package/dist/3-unit/calendar-base.d.ts.map +1 -1
- package/dist/3-unit/calendar-base.js +3 -2
- package/dist/3-unit/ds-calendar.d.ts +197 -4
- package/dist/3-unit/ds-calendar.d.ts.map +1 -1
- package/dist/3-unit/ds-calendar.js +687 -45
- package/dist/3-unit/ds-carousel.d.ts +3 -0
- package/dist/3-unit/ds-carousel.d.ts.map +1 -1
- package/dist/3-unit/ds-carousel.js +13 -1
- package/dist/3-unit/ds-context.d.ts +18 -1
- package/dist/3-unit/ds-context.d.ts.map +1 -1
- package/dist/3-unit/ds-context.js +37 -1
- package/dist/3-unit/ds-form.d.ts +9 -0
- package/dist/3-unit/ds-form.d.ts.map +1 -1
- package/dist/3-unit/ds-form.js +50 -10
- package/dist/3-unit/ds-list.d.ts +20 -1
- package/dist/3-unit/ds-list.d.ts.map +1 -1
- package/dist/3-unit/ds-list.js +31 -3
- package/dist/3-unit/ds-matrix.d.ts +3 -0
- package/dist/3-unit/ds-matrix.d.ts.map +1 -1
- package/dist/3-unit/ds-matrix.js +3 -0
- package/dist/3-unit/ds-menu.d.ts.map +1 -1
- package/dist/3-unit/ds-menu.js +17 -1
- package/dist/3-unit/ds-row.d.ts +13 -0
- package/dist/3-unit/ds-row.d.ts.map +1 -1
- package/dist/3-unit/ds-row.js +15 -2
- package/dist/3-unit/ds-select.js +1 -1
- package/dist/3-unit/ds-sidebar.d.ts +17 -0
- package/dist/3-unit/ds-sidebar.d.ts.map +1 -1
- package/dist/3-unit/ds-sidebar.js +14 -3
- package/dist/3-unit/ds-table-of-contents.d.ts +68 -0
- package/dist/3-unit/ds-table-of-contents.d.ts.map +1 -0
- package/dist/3-unit/ds-table-of-contents.js +190 -0
- package/dist/3-unit/ds-tabs.d.ts +32 -1
- package/dist/3-unit/ds-tabs.d.ts.map +1 -1
- package/dist/3-unit/ds-tabs.js +39 -1
- package/dist/4-page/ds-document.d.ts +3 -0
- package/dist/4-page/ds-document.d.ts.map +1 -1
- package/dist/4-page/ds-document.js +3 -0
- package/dist/4-page/ds-footer.d.ts +47 -7
- package/dist/4-page/ds-footer.d.ts.map +1 -1
- package/dist/4-page/ds-footer.js +58 -14
- package/dist/4-page/ds-header.d.ts +6 -0
- package/dist/4-page/ds-header.d.ts.map +1 -1
- package/dist/4-page/ds-header.js +4 -1
- package/dist/4-page/ds-overlay.d.ts +2 -2
- package/dist/4-page/ds-overlay.d.ts.map +1 -1
- package/dist/4-page/ds-overlay.js +8 -3
- package/dist/4-page/ds-page.d.ts +12 -0
- package/dist/4-page/ds-page.d.ts.map +1 -1
- package/dist/4-page/ds-page.js +19 -1
- package/dist/4-page/email.d.ts +2 -0
- package/dist/4-page/email.d.ts.map +1 -1
- package/dist/4-page/email.js +5 -4
- package/dist/5-visual-kit/app-chrome.d.ts +98 -0
- package/dist/5-visual-kit/app-chrome.d.ts.map +1 -0
- package/dist/5-visual-kit/app-chrome.js +119 -0
- package/dist/5-visual-kit/bezels.d.ts +30 -0
- package/dist/5-visual-kit/bezels.d.ts.map +1 -0
- package/dist/5-visual-kit/bezels.js +388 -0
- package/dist/5-visual-kit/browser-icons.d.ts +5 -0
- package/dist/5-visual-kit/browser-icons.d.ts.map +1 -0
- package/dist/5-visual-kit/browser-icons.js +51 -0
- package/dist/5-visual-kit/browser-styles.d.ts +3 -0
- package/dist/5-visual-kit/browser-styles.d.ts.map +1 -0
- package/dist/5-visual-kit/browser-styles.js +52 -0
- package/dist/5-visual-kit/device-bezel.d.ts +84 -0
- package/dist/5-visual-kit/device-bezel.d.ts.map +1 -0
- package/dist/5-visual-kit/device-bezel.js +56 -0
- package/dist/5-visual-kit/instagram-frame.d.ts +8 -0
- package/dist/5-visual-kit/instagram-frame.d.ts.map +1 -0
- package/dist/5-visual-kit/instagram-frame.js +13 -0
- package/dist/5-visual-kit/instagram.d.ts +18 -0
- package/dist/5-visual-kit/instagram.d.ts.map +1 -0
- package/dist/5-visual-kit/instagram.js +39 -0
- package/dist/5-visual-kit/mobile-chrome.d.ts +4 -0
- package/dist/5-visual-kit/mobile-chrome.d.ts.map +1 -0
- package/dist/5-visual-kit/mobile-chrome.js +24 -0
- package/dist/5-visual-kit/native-icon-paths.d.ts +146 -0
- package/dist/5-visual-kit/native-icon-paths.d.ts.map +1 -0
- package/dist/5-visual-kit/native-icon-paths.js +145 -0
- package/dist/5-visual-kit/window.d.ts +51 -0
- package/dist/5-visual-kit/window.d.ts.map +1 -0
- package/dist/5-visual-kit/window.js +20 -0
- package/dist/browser-icons-BFbS1tIx.js +56 -0
- package/dist/browser-icons-BFbS1tIx.js.map +1 -0
- package/dist/browser-icons-CT8qU77Z.js +48 -0
- package/dist/browser-icons-CT8qU77Z.js.map +1 -0
- package/dist/components.d.ts +1 -0
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +1 -0
- package/dist/design-system-1.bundle.js +5505 -2068
- package/dist/design-system-1.bundle.js.map +1 -1
- package/dist/design-system-1.bundle.min.js +7026 -4628
- package/dist/design-system-1.bundle.min.js.map +1 -1
- package/dist/design-system-1.css +1 -1
- package/dist/feedback.js +197 -167
- package/dist/feedback.js.map +1 -1
- package/dist/{icons-extra-CRxxWFjX.js → icons-extra-BMPvmQPI.js} +25 -4
- package/dist/icons-extra-BMPvmQPI.js.map +1 -0
- package/dist/{icons-extra-H5pqCM_R.js → icons-extra-BfYOw-cR.js} +83 -5
- package/dist/icons-extra-BfYOw-cR.js.map +1 -0
- package/dist/index.d.ts +12 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -1
- package/dist/instagram-CKofs55A.js +50 -0
- package/dist/instagram-CKofs55A.js.map +1 -0
- package/dist/instagram-CcYf5oiM.js +48 -0
- package/dist/instagram-CcYf5oiM.js.map +1 -0
- package/dist/lit-Ce_uWYM4.js +612 -0
- package/dist/lit-Ce_uWYM4.js.map +1 -0
- package/dist/lit-DGUVm1Ce.js +557 -0
- package/dist/lit-DGUVm1Ce.js.map +1 -0
- package/dist/native-icon-paths-CB9evXBM.js +93 -0
- package/dist/native-icon-paths-CB9evXBM.js.map +1 -0
- package/dist/native-icon-paths-zay-3g_n.js +150 -0
- package/dist/native-icon-paths-zay-3g_n.js.map +1 -0
- package/dist/react/avatar.d.ts +1 -1
- package/dist/react/choice.d.ts +4 -0
- package/dist/react/choice.d.ts.map +1 -1
- package/dist/react/choice.js +2 -2
- package/dist/react/context.d.ts +19 -4
- package/dist/react/context.d.ts.map +1 -1
- package/dist/react/context.js +4 -4
- package/dist/react/empty.d.ts +2 -2
- package/dist/react/empty.d.ts.map +1 -1
- package/dist/react/empty.js +1 -1
- package/dist/react/footer.d.ts +5 -5
- package/dist/react/footer.d.ts.map +1 -1
- package/dist/react/footer.js +2 -2
- package/dist/react/header.d.ts +2 -2
- package/dist/react/header.d.ts.map +1 -1
- package/dist/react/message.d.ts +4 -0
- package/dist/react/message.d.ts.map +1 -1
- package/dist/react/message.js +2 -2
- package/dist/react/number.d.ts +53 -0
- package/dist/react/number.d.ts.map +1 -0
- package/dist/react/number.js +25 -0
- package/dist/react/page.d.ts +1 -1
- package/dist/react/sidebar.d.ts +4 -0
- package/dist/react/sidebar.d.ts.map +1 -1
- package/dist/react/sidebar.js +2 -2
- package/dist/react/table-of-contents.d.ts +19 -0
- package/dist/react/table-of-contents.d.ts.map +1 -0
- package/dist/react/table-of-contents.js +28 -0
- package/dist/{shared-words-CdMDVtXx.js → shared-words-C5cjxMjZ.js} +151 -16
- package/dist/shared-words-C5cjxMjZ.js.map +1 -0
- package/dist/{shared-words-BtRee8xR.js → shared-words-Cdm7xd-_.js} +163 -28
- package/dist/shared-words-Cdm7xd-_.js.map +1 -0
- package/package.json +24 -13
- package/DS1/1-root/one.semantic.css +0 -735
- package/DS1/3-unit/ds-calendar-large.ts +0 -353
- package/DS1/3-unit/styles/ds-calendar-large.css +0 -178
- package/dist/3-unit/ds-calendar-large.d.ts +0 -142
- package/dist/3-unit/ds-calendar-large.d.ts.map +0 -1
- package/dist/3-unit/ds-calendar-large.js +0 -308
- package/dist/icons-extra-CRxxWFjX.js.map +0 -1
- package/dist/icons-extra-H5pqCM_R.js.map +0 -1
- package/dist/shared-words-BtRee8xR.js.map +0 -1
- package/dist/shared-words-CdMDVtXx.js.map +0 -1
package/dist/feedback.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
1
|
+
var H = Object.defineProperty, y = (t, e, s) => () => {
|
|
2
2
|
if (s) throw s[0];
|
|
3
3
|
try {
|
|
4
4
|
return t && (e = t(t = 0)), e;
|
|
5
|
-
} catch (
|
|
6
|
-
throw s = [
|
|
5
|
+
} catch (o) {
|
|
6
|
+
throw s = [o], o;
|
|
7
7
|
}
|
|
8
|
-
},
|
|
8
|
+
}, W = (t, e) => {
|
|
9
9
|
let s = {};
|
|
10
|
-
for (var
|
|
11
|
-
|
|
12
|
-
get: t[
|
|
10
|
+
for (var o in t)
|
|
11
|
+
H(s, o, {
|
|
12
|
+
get: t[o],
|
|
13
13
|
enumerable: !0
|
|
14
14
|
});
|
|
15
|
-
return e ||
|
|
15
|
+
return e || H(s, Symbol.toStringTag, { value: "Module" }), s;
|
|
16
16
|
};
|
|
17
|
-
function
|
|
18
|
-
|
|
17
|
+
function ft(t) {
|
|
18
|
+
w = t;
|
|
19
19
|
}
|
|
20
20
|
function p(t) {
|
|
21
|
-
if (typeof
|
|
22
|
-
const e =
|
|
21
|
+
if (typeof w == "function") return w(t);
|
|
22
|
+
const e = w?.[t];
|
|
23
23
|
if (e !== void 0) return e;
|
|
24
|
-
const s = globalThis[
|
|
24
|
+
const s = globalThis[D];
|
|
25
25
|
return typeof s == "function" ? String(s(t)) : t;
|
|
26
26
|
}
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
})), K,
|
|
30
|
-
K = '[data-ds-shape="square"], :host([data-ds-shape="square"]){--ds-corner-size: 0px;--ds-corner-shape: round;--ds-button-inset: 0.5px}[data-ds-shape="rounded"], :host([data-ds-shape="rounded"]){--ds-corner-size: 4px;--ds-corner-shape: round;--ds-button-inset: 2.5px}[data-ds-shape="circular"], :host([data-ds-shape="circular"]){--ds-corner-size: 999px;--ds-corner-shape: round;--ds-button-inset: 5px}@supports (corner-shape: squircle){[data-ds-shape="rounded"], :host([data-ds-shape="rounded"]){--ds-corner-size: 8px;--ds-corner-shape: squircle}}:root, :host, :where([data-ds-surface]){--ds-unit: calc(var(--ds-1, 20px) * var(--ds-sf, 1));--ds-control-height: calc(var(--ds-control-size, var(--ds-08, 16px)) * var(--ds-sf, 1));--ds-row-height: calc(var(--ds-row-size, var(--ds-1, 20px)) * var(--ds-sf, 1));--ds-type-size-default: calc(var(--ds-text-size, 14px) * var(--ds-sf, 1));--ds-type-size-small: calc(var(--ds-small-text-size, 10px) * var(--ds-sf, 1));--ds-type-size-heading: calc(var(--ds-heading-text-size, 13px) * var(--ds-sf, 1));--ds-type-size-display: calc(var(--ds-display-text-size, 20px) * var(--ds-sf, 1));--ds-type-lineheight-default: calc(var(--ds-text-leading, 16px) * var(--ds-sf, 1));--ds-type-letterspacing-default: calc(var(--ds-text-tracking, -0.3px) * var(--ds-sf, 1));--ds-radius: calc(var(--ds-corner-size, 4px) * var(--ds-sf, 1));--ds-radius-card: calc(var(--ds-card-corner-size, 4px) * var(--ds-sf, 1))}:host{--ds-toast-width: calc(16 * var(--ds-unit));--ds-toast-offset: var(--ds-unit);--ds-toast-gap: calc(var(--ds-unit) - var(--ds-control-height));--ds-toast-background: var(--ds-tooltip-background, light-dark(var(--ds-black, #2a2a2a), var(--ds-white, #ffffff)));--ds-toast-color: var(--ds-tooltip-color, light-dark(var(--ds-white, #ffffff), var(--ds-black, #2a2a2a)));display: contents}section{display: contents}ol{--lift: -1;position: fixed;z-index: 2147483000;inset: auto;overflow: visible;border: 0;background: transparent;color: inherit;box-sizing: border-box;width: min(var(--ds-toast-width), calc(100% - 2 * var(--ds-toast-offset)));height: calc(var(--height) + var(--gaps) * var(--ds-toast-gap));margin: 0;padding: 0;list-style: none;outline: none;pointer-events: none}ol[data-y="top"]{--lift: 1;top: calc(var(--ds-toast-offset) + env(safe-area-inset-top, 0px))}ol[data-y="bottom"]{bottom: calc(var(--ds-toast-offset) + env(safe-area-inset-bottom, 0px))}ol[data-x="left"]{left: var(--ds-toast-offset)}ol[data-x="right"]{right: var(--ds-toast-offset)}ol[data-x="center"]{left: 50%;transform: translateX(-50%)}:host([contained]) ol{position: absolute;z-index: var(--ds-toast-z-index, 60)}:host([contained]) ol[data-y="top"]{top: var(--ds-toast-offset)}:host([contained]) ol[data-y="bottom"]{bottom: var(--ds-toast-offset)}.toast{--swipe: 0px;position: absolute;left: 0;right: 0;box-sizing: border-box;width: max-content;max-width: 100%;overflow: hidden;border-radius: var(--ds-radius);background: var(--ds-toast-background);color: var(--ds-toast-color);font-family: var(--ds-typeface-regular);font-feature-settings: var(--ds-font-features);font-size: var(--ds-type-size-default);line-height: var(--ds-control-height);letter-spacing: var(--ds-type-letterspacing-default);outline: none;touch-action: none;user-select: none;pointer-events: auto;opacity: 0;transition: transform 400ms ease, opacity 400ms ease}ol[data-y="bottom"] .toast{bottom: 0}ol[data-y="top"] .toast{top: 0}ol[data-x="center"] .toast{margin-inline: auto}ol[data-x="left"] .toast{margin-right: auto}ol[data-x="right"] .toast{margin-left: auto}.toast:focus-visible{outline: 2px solid var(--ds-focus-ring);outline-offset: 1px}.toast[data-mounted="false"]{transform: translateY(calc(var(--lift) * -100%))}.toast[data-mounted="true"]{opacity: 1}ol[data-expanded="false"] .toast[data-mounted="true"]{transform: translateY(calc(var(--lift) * var(--index) * var(--ds-toast-gap) + var(--swipe))) scale(calc(1 - var(--index) * 0.05))}ol[data-expanded="false"] .toast[data-front="false"]{height: var(--front-height)}ol[data-expanded="false"] .toast[data-front="false"] .body{opacity: 0}ol[data-expanded="true"] .toast[data-mounted="true"]{transform: translateY(calc(var(--lift) * (var(--offset) + var(--index) * var(--ds-toast-gap)) + var(--swipe)))}.toast[data-visible="false"]{opacity: 0;pointer-events: none}.toast[data-swiping="true"]{transition: none}.toast[data-removed="true"]{opacity: 0;pointer-events: none}.toast[data-removed="true"][data-front="true"]{transform: translateY(calc(var(--lift) * -100%))}.toast[data-swipe-out="true"]{transform: translateY(calc(var(--swipe) + var(--lift) * -100%))}.body{display: flex;align-items: flex-start;gap: calc(4px * var(--ds-sf));box-sizing: border-box;min-height: var(--ds-control-height);padding-inline: calc(4px * var(--ds-sf));transition: opacity 400ms ease}.icon{display: inline-flex;flex: 0 0 auto;align-items: center;justify-content: center;width: var(--ds-control-height);height: var(--ds-control-height);--ds-icon-color: currentColor}.icon:first-child{margin-left: calc(-4px * var(--ds-sf))}.icon > svg, .close > svg{width: calc(14px * var(--ds-sf));height: calc(14px * var(--ds-sf))}.content{flex: 1 1 auto;min-width: 0}.title, .description{white-space: normal;overflow-wrap: anywhere}.description{opacity: 0.7}.button{flex: 0 0 auto;margin: 0 0 0 calc(4px * var(--ds-sf));padding: 0;border: 0;background: none;color: inherit;font: inherit;letter-spacing: inherit;text-decoration: underline;text-underline-offset: 2px;cursor: pointer}a.button{display: inline-block}.button.cancel{opacity: 0.7}.button:focus-visible, .close:focus-visible{outline: 1px solid currentColor;outline-offset: 1px;border-radius: 1px}.close{display: inline-flex;flex: 0 0 auto;align-items: center;justify-content: center;width: var(--ds-control-height);height: var(--ds-control-height);margin: 0 calc(-4px * var(--ds-sf)) 0 0;padding: 0;border: 0;background: none;color: inherit;cursor: pointer;--ds-icon-color: currentColor}.spinner{width: calc(10px * var(--ds-sf));height: calc(10px * var(--ds-sf));box-sizing: border-box;border: 1px solid color-mix(in srgb, currentColor 25%, transparent);border-top-color: currentColor;border-radius: 50%;animation: ds-toast-spin 720ms linear infinite}@keyframes ds-toast-spin{to{transform: rotate(360deg)}}:host([rich-colors]) .toast[data-type="success"]{--ds-toast-background: var(--ds-apple-green)}:host([rich-colors]) .toast[data-type="info"]{--ds-toast-background: var(--ds-zenith-blue)}:host([rich-colors]) .toast[data-type="warning"]{--ds-toast-background: var(--ds-orange)}:host([rich-colors]) .toast[data-type="error"]{--ds-toast-background: var(--ds-tuned-red)}:host([rich-colors]) .toast:is([data-type="success"], [data-type="info"], [data-type="warning"], [data-type="error"]){--ds-toast-color: var(--ds-black)}@media (prefers-reduced-motion: reduce){.toast, .body{transition: none}.spinner{animation: none}}',
|
|
27
|
+
var D, w, C = y((() => {
|
|
28
|
+
D = /* @__PURE__ */ Symbol.for("design-system-1.translate"), w = null;
|
|
29
|
+
})), K, N, Z = y((() => {
|
|
30
|
+
K = '[data-ds-shape="square"], :host([data-ds-shape="square"]){--ds-corner-size: 0px;--ds-corner-shape: round;--ds-button-inset: 0.5px}[data-ds-shape="rounded"], :host([data-ds-shape="rounded"]){--ds-corner-size: 4px;--ds-corner-shape: round;--ds-button-inset: 2.5px}[data-ds-shape="circular"], :host([data-ds-shape="circular"]){--ds-corner-size: 999px;--ds-corner-shape: round;--ds-button-inset: 5px}@supports (corner-shape: squircle){[data-ds-shape="rounded"], :host([data-ds-shape="rounded"]){--ds-corner-size: 8px;--ds-corner-shape: squircle}}:root, :host, :where([data-ds-surface]){--ds-unit: calc(var(--ds-1, 20px) * var(--ds-sf, 1));--ds-control-height: calc(var(--ds-control-size, var(--ds-08, 16px)) * var(--ds-sf, 1));--ds-row-height: calc(var(--ds-row-size, var(--ds-1, 20px)) * var(--ds-sf, 1));--ds-type-size-default: calc(var(--ds-text-size, 14px) * var(--ds-sf, 1));--ds-type-size-small: calc(var(--ds-small-text-size, 10px) * var(--ds-sf, 1));--ds-type-size-heading: calc(var(--ds-heading-text-size, 13px) * var(--ds-sf, 1));--ds-type-size-display: calc(var(--ds-display-text-size, 20px) * var(--ds-sf, 1));--ds-type-lineheight-default: calc(var(--ds-text-leading, 16px) * var(--ds-sf, 1));--ds-type-letterspacing-default: calc(var(--ds-text-tracking, -0.3px) * var(--ds-sf, 1));--ds-radius: calc(var(--ds-corner-size, 4px) * var(--ds-sf, 1));--ds-radius-card: calc(var(--ds-card-corner-size, 4px) * var(--ds-sf, 1))}:host{--ds-toast-width: calc(16 * var(--ds-unit));--ds-toast-offset: var(--ds-unit);--ds-toast-gap: calc(var(--ds-unit) - var(--ds-control-height));--ds-toast-background: var(--ds-tooltip-background, light-dark(var(--ds-black, #2a2a2a), var(--ds-white, #ffffff)));--ds-toast-color: var(--ds-tooltip-color, light-dark(var(--ds-white, #ffffff), var(--ds-black, #2a2a2a)));display: contents}section{display: contents}ol{--lift: -1;position: fixed;z-index: 2147483000;inset: auto;overflow: visible;border: 0;background: transparent;color: inherit;box-sizing: border-box;width: min(var(--ds-toast-width), calc(100% - 2 * var(--ds-toast-offset)));height: calc(var(--height) + var(--gaps) * var(--ds-toast-gap));margin: 0;padding: 0;list-style: none;outline: none;pointer-events: none}ol[data-y="top"]{--lift: 1;top: calc(var(--ds-toast-offset) + env(safe-area-inset-top, 0px))}ol[data-y="bottom"]{bottom: calc(var(--ds-toast-offset) + env(safe-area-inset-bottom, 0px))}ol[data-x="left"]{left: var(--ds-toast-offset)}ol[data-x="right"]{right: var(--ds-toast-offset)}ol[data-x="center"]{left: 50%;transform: translateX(-50%)}:host([contained]) ol{position: absolute;z-index: var(--ds-toast-z-index, 60)}:host([contained]) ol[data-y="top"]{top: var(--ds-toast-offset)}:host([contained]) ol[data-y="bottom"]{bottom: var(--ds-toast-offset)}.toast{--swipe: 0px;position: absolute;left: 0;right: 0;box-sizing: border-box;width: max-content;max-width: 100%;overflow: hidden;border-radius: var(--ds-radius);background: var(--ds-toast-background);color: var(--ds-toast-color);font-family: var(--ds-typeface-regular);font-feature-settings: var(--ds-font-features);font-size: var(--ds-type-size-default);line-height: var(--ds-control-height);letter-spacing: var(--ds-type-letterspacing-default);outline: none;touch-action: none;user-select: none;pointer-events: auto;opacity: 0;transition: transform 400ms ease, opacity 400ms ease}ol[data-y="bottom"] .toast{bottom: 0}ol[data-y="top"] .toast{top: 0}ol[data-x="center"] .toast{margin-inline: auto}ol[data-x="left"] .toast{margin-right: auto}ol[data-x="right"] .toast{margin-left: auto}.toast:focus-visible{outline: 2px solid var(--ds-focus-ring);outline-offset: 1px}.toast[data-mounted="false"]{transform: translateY(calc(var(--lift) * -100%))}.toast[data-mounted="true"]{opacity: 1}ol[data-expanded="false"] .toast[data-mounted="true"]{transform: translateY(calc(var(--lift) * var(--index) * var(--ds-toast-gap) + var(--swipe))) scale(calc(1 - var(--index) * 0.05))}ol[data-expanded="false"] .toast[data-front="false"]{height: var(--front-height)}ol[data-expanded="false"] .toast[data-front="false"] .body{opacity: 0}ol[data-expanded="true"] .toast[data-mounted="true"]{transform: translateY(calc(var(--lift) * (var(--offset) + var(--index) * var(--ds-toast-gap)) + var(--swipe)))}.toast[data-visible="false"]{opacity: 0;pointer-events: none}.toast[data-swiping="true"]{transition: none}.toast[data-removed="true"]{opacity: 0;pointer-events: none}.toast[data-removed="true"][data-front="true"]{transform: translateY(calc(var(--lift) * -100%))}.toast[data-swipe-out="true"]{transform: translateY(calc(var(--swipe) + var(--lift) * -100%))}.body{display: flex;align-items: flex-start;gap: calc(4px * var(--ds-sf));box-sizing: border-box;min-height: var(--ds-control-height);padding-inline: calc(4px * var(--ds-sf));transition: opacity 400ms ease}.icon{display: inline-flex;flex: 0 0 auto;align-items: center;justify-content: center;width: var(--ds-control-height);height: var(--ds-control-height);--ds-icon-color: currentColor}.icon:first-child{margin-left: calc(-4px * var(--ds-sf))}.icon > svg, .close > svg{width: calc(14px * var(--ds-sf));height: calc(14px * var(--ds-sf))}.content{flex: 1 1 auto;min-width: 0}.title, .description{white-space: normal;overflow-wrap: anywhere}.description{opacity: 0.7}.button{flex: 0 0 auto;margin: 0 0 0 calc(4px * var(--ds-sf));padding: 0;border: 0;background: none;color: inherit;font: inherit;letter-spacing: inherit;text-decoration: underline;text-underline-offset: 2px;cursor: pointer}a.button{display: inline-block}.button.cancel{opacity: 0.7}.button:focus-visible, .close:focus-visible{outline: 1px solid currentColor;outline-offset: 1px;border-radius: 1px}.close{display: inline-flex;flex: 0 0 auto;align-items: center;justify-content: center;width: var(--ds-control-height);height: var(--ds-control-height);margin: 0 calc(-4px * var(--ds-sf)) 0 0;padding: 0;border: 0;background: none;color: inherit;cursor: pointer;--ds-icon-color: currentColor}.spinner{width: calc(10px * var(--ds-sf));height: calc(10px * var(--ds-sf));box-sizing: border-box;border: 1px solid color-mix(in srgb, currentColor 25%, transparent);border-top-color: currentColor;border-radius: 50%;animation: ds-toast-spin 720ms linear infinite}@keyframes ds-toast-spin{to{transform: rotate(360deg)}}:host([rich-colors]) .toast[data-type="success"]{--ds-toast-background: var(--ds-apple-green)}:host([rich-colors]) .toast[data-type="info"]{--ds-toast-background: var(--ds-zenith-blue)}:host([rich-colors]) .toast[data-type="warning"]{--ds-toast-background: var(--ds-orange)}:host([rich-colors]) .toast[data-type="error"]{--ds-toast-background: var(--ds-tuned-red)}:host([rich-colors]) .toast:is([data-type="success"], [data-type="info"], [data-type="warning"], [data-type="error"]){--ds-toast-color: var(--ds-black)}@media (prefers-reduced-motion: reduce){.toast, .body{transition: none}.spinner{animation: none}}', N = {
|
|
31
31
|
check: `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
32
32
|
<path d="M6.68649 11.884L12.443 6.13601L11.736 5.42715L6.68835 10.4827L4.26399 8.0501L3.55696 8.74525L6.68649 11.884Z" fill="currentColor"/>
|
|
33
33
|
</svg>
|
|
@@ -46,47 +46,67 @@ var j, x, C = w((() => {
|
|
|
46
46
|
`
|
|
47
47
|
};
|
|
48
48
|
}));
|
|
49
|
+
function X(t) {
|
|
50
|
+
if (typeof window > "u" || typeof t?.code != "string" || typeof t.message != "string" || !/^[a-z][a-z0-9_.-]{0,79}$/.test(t.code) || !t.message.trim()) return;
|
|
51
|
+
const e = t.error instanceof Error ? t.error : /* @__PURE__ */ new Error(), s = (t.stack ?? e.stack ?? "").split(`
|
|
52
|
+
`).filter((i) => /^\s*at\s/.test(i) || /@.*:\d+/.test(i)).slice(0, 8).join(`
|
|
53
|
+
`).trim().slice(0, 500), o = {
|
|
54
|
+
code: t.code,
|
|
55
|
+
message: t.message.trim().slice(0, 200),
|
|
56
|
+
...s ? { stack: s } : {}
|
|
57
|
+
};
|
|
58
|
+
if (window.dispatchEvent(new CustomEvent("ds-failure", {
|
|
59
|
+
detail: o,
|
|
60
|
+
cancelable: !0
|
|
61
|
+
}))) {
|
|
62
|
+
const i = globalThis, n = i[L] ?? (i[L] = []);
|
|
63
|
+
n.push(o), n.length > 20 && n.shift();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
var G, L, V = y((() => {
|
|
67
|
+
G = "ds-failure", L = /* @__PURE__ */ Symbol.for("design-system-1.pending-failures");
|
|
68
|
+
}));
|
|
49
69
|
function g() {
|
|
50
70
|
const t = globalThis;
|
|
51
|
-
return t[
|
|
71
|
+
return t[z] ?? (t[z] = {
|
|
52
72
|
toasters: /* @__PURE__ */ new Set(),
|
|
53
73
|
fallbacks: /* @__PURE__ */ new Set(),
|
|
54
74
|
lastId: 0
|
|
55
75
|
});
|
|
56
76
|
}
|
|
57
|
-
function
|
|
77
|
+
function J(t, { fallback: e = !1 } = {}) {
|
|
58
78
|
const s = e ? g().fallbacks : g().toasters;
|
|
59
79
|
return s.add(t), () => {
|
|
60
80
|
s.delete(t);
|
|
61
81
|
};
|
|
62
82
|
}
|
|
63
|
-
function
|
|
83
|
+
function Q() {
|
|
64
84
|
const t = g();
|
|
65
85
|
return t.toasters.size > 0 || t.fallbacks.size > 0 || !!t.mountFallback || typeof customElements < "u" && !!customElements.get("ds-toast");
|
|
66
86
|
}
|
|
67
|
-
function
|
|
87
|
+
function tt(t) {
|
|
68
88
|
g().mountFallback = t;
|
|
69
89
|
}
|
|
70
90
|
function h(t, e, s = {}) {
|
|
71
|
-
const
|
|
72
|
-
!
|
|
91
|
+
const o = g(), i = s.id ?? ++o.lastId;
|
|
92
|
+
!o.toasters.size && typeof document < "u" && document.body && (typeof customElements < "u" && customElements.get("ds-toast") ? document.body.appendChild(document.createElement("ds-toast")) : o.fallbacks.size || o.mountFallback?.());
|
|
73
93
|
const n = s.important ?? (e === "error" ? !0 : void 0), a = {
|
|
74
94
|
...s,
|
|
75
95
|
...n === void 0 ? {} : { important: n },
|
|
76
|
-
id:
|
|
96
|
+
id: i,
|
|
77
97
|
title: t,
|
|
78
98
|
type: e
|
|
79
99
|
};
|
|
80
|
-
for (const r of Array.from(
|
|
81
|
-
return
|
|
100
|
+
for (const r of Array.from(o.toasters.size ? o.toasters : o.fallbacks)) r({ toast: a });
|
|
101
|
+
return e === "error" && s.failure && X(s.failure), i;
|
|
82
102
|
}
|
|
83
|
-
var
|
|
84
|
-
|
|
103
|
+
var et, st, Y, z, S, P = y((() => {
|
|
104
|
+
V(), et = 1 / 0, st = 0.11, Y = {
|
|
85
105
|
success: "check",
|
|
86
106
|
info: "notifications",
|
|
87
107
|
warning: "warning",
|
|
88
108
|
error: "warning"
|
|
89
|
-
},
|
|
109
|
+
}, z = /* @__PURE__ */ Symbol.for("design-system-1.toasts"), S = Object.assign((t, e) => h(t, "default", e), {
|
|
90
110
|
message: (t, e) => h(t, "default", e),
|
|
91
111
|
success: (t, e) => h(t, "success", e),
|
|
92
112
|
info: (t, e) => h(t, "info", e),
|
|
@@ -94,16 +114,20 @@ var G, J, B, L, z, O = w((() => {
|
|
|
94
114
|
error: (t, e) => h(t, "error", e),
|
|
95
115
|
loading: (t, e) => h(t, "loading", e),
|
|
96
116
|
promise(t, e) {
|
|
97
|
-
const { loading: s, success:
|
|
117
|
+
const { loading: s, success: o, error: i, finally: n, ...a } = e, r = h(s, "loading", a);
|
|
98
118
|
return Promise.resolve(typeof t == "function" ? t() : t).then((l) => {
|
|
99
|
-
h(typeof
|
|
119
|
+
h(typeof o == "function" ? o(l) : o, "success", {
|
|
100
120
|
...a,
|
|
101
121
|
id: r
|
|
102
122
|
});
|
|
103
123
|
}, (l) => {
|
|
104
|
-
h(typeof
|
|
124
|
+
h(typeof i == "function" ? i(l) : i, "error", {
|
|
105
125
|
...a,
|
|
106
|
-
id: r
|
|
126
|
+
id: r,
|
|
127
|
+
...a.failure ? { failure: {
|
|
128
|
+
...a.failure,
|
|
129
|
+
error: l
|
|
130
|
+
} } : {}
|
|
107
131
|
});
|
|
108
132
|
}).finally(() => n?.()), r;
|
|
109
133
|
},
|
|
@@ -114,32 +138,32 @@ var G, J, B, L, z, O = w((() => {
|
|
|
114
138
|
}
|
|
115
139
|
});
|
|
116
140
|
}));
|
|
117
|
-
function
|
|
141
|
+
function ht(t) {
|
|
118
142
|
f = {
|
|
119
143
|
...f,
|
|
120
144
|
...t
|
|
121
|
-
},
|
|
145
|
+
}, x?.render();
|
|
122
146
|
}
|
|
123
147
|
function c(t, e = {}, s) {
|
|
124
|
-
const
|
|
125
|
-
for (const [
|
|
126
|
-
return s !== void 0 && (
|
|
148
|
+
const o = document.createElement(t);
|
|
149
|
+
for (const [i, n] of Object.entries(e)) o.setAttribute(i, n);
|
|
150
|
+
return s !== void 0 && (o.textContent = s), o;
|
|
127
151
|
}
|
|
128
|
-
function
|
|
129
|
-
const s =
|
|
152
|
+
function it(t, e) {
|
|
153
|
+
const s = O[t];
|
|
130
154
|
if (!s) return;
|
|
131
|
-
const
|
|
155
|
+
const o = c("span", {
|
|
132
156
|
class: e,
|
|
133
157
|
"aria-hidden": "true"
|
|
134
158
|
});
|
|
135
|
-
return
|
|
159
|
+
return o.innerHTML = s, o;
|
|
136
160
|
}
|
|
137
|
-
function
|
|
161
|
+
function A() {
|
|
138
162
|
if (!(typeof document > "u" || !document.body))
|
|
139
|
-
return
|
|
163
|
+
return x ?? (x = new B()), x.attach(), x.host;
|
|
140
164
|
}
|
|
141
|
-
var
|
|
142
|
-
if (C(),
|
|
165
|
+
var R, O, f, x, q, B, U = y((() => {
|
|
166
|
+
if (C(), Z(), P(), R = /(fill|stroke)=("|')(#1E1E1E|#2A2A2A|#000000|#000|black)\2/gi, O = Object.fromEntries(Object.entries(N).map(([t, e]) => [t, e.replace(R, '$1="currentColor"')])), f = {}, q = (t) => typeof requestAnimationFrame == "function" ? requestAnimationFrame(t) : setTimeout(t, 16), B = class {
|
|
143
167
|
constructor() {
|
|
144
168
|
this.host = c("div", { "data-ds-toaster": "" }), this.section = c("section", {
|
|
145
169
|
"aria-live": "polite",
|
|
@@ -150,13 +174,13 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
150
174
|
popover: "manual"
|
|
151
175
|
}), this.items = [], this.heights = /* @__PURE__ */ new Map(), this.timers = /* @__PURE__ */ new Map(), this.hovered = !1, this.focused = !1, this.interacting = !1, this.mounting = !1, this.resizes = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(() => this.measure()), this.receive = (e) => {
|
|
152
176
|
if ("dismiss" in e) {
|
|
153
|
-
for (const
|
|
177
|
+
for (const i of this.live) (e.dismiss === void 0 || i.data.id === e.dismiss) && this.removeToast(i.data.id);
|
|
154
178
|
return;
|
|
155
179
|
}
|
|
156
180
|
this.attach();
|
|
157
|
-
const s = e.toast,
|
|
158
|
-
|
|
159
|
-
...
|
|
181
|
+
const s = e.toast, o = this.live.find((i) => i.data.id === s.id);
|
|
182
|
+
o ? (o.data = {
|
|
183
|
+
...o.data,
|
|
160
184
|
...s
|
|
161
185
|
}, this.clearTimer(s.id)) : this.items = [{
|
|
162
186
|
data: s,
|
|
@@ -165,20 +189,20 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
165
189
|
swipeOut: !1,
|
|
166
190
|
index: 0,
|
|
167
191
|
offset: 0
|
|
168
|
-
}, ...this.items.filter((
|
|
192
|
+
}, ...this.items.filter((i) => i.data.id !== s.id)], this.render();
|
|
169
193
|
}, this.syncTimers = () => {
|
|
170
194
|
const e = Date.now();
|
|
171
195
|
for (const s of this.live) {
|
|
172
|
-
const { id:
|
|
173
|
-
if (
|
|
174
|
-
this.clearTimer(
|
|
196
|
+
const { id: o, type: i } = s.data, n = s.data.duration ?? f.duration ?? 1 / 0;
|
|
197
|
+
if (i === "loading" || n === 1 / 0) {
|
|
198
|
+
this.clearTimer(o);
|
|
175
199
|
continue;
|
|
176
200
|
}
|
|
177
|
-
let a = this.timers.get(
|
|
201
|
+
let a = this.timers.get(o);
|
|
178
202
|
a || (a = {
|
|
179
203
|
remaining: n,
|
|
180
204
|
started: e
|
|
181
|
-
}, this.timers.set(
|
|
205
|
+
}, this.timers.set(o, a)), this.paused && a.handle !== void 0 ? (clearTimeout(a.handle), a.handle = void 0, a.remaining -= e - a.started) : !this.paused && a.handle === void 0 && (a.started = e, a.handle = setTimeout(() => this.removeToast(o, "auto"), Math.max(0, a.remaining)));
|
|
182
206
|
}
|
|
183
207
|
}, this.hotkey = (e) => {
|
|
184
208
|
e.altKey && e.code === "KeyT" && this.live.length ? (this.focused = !0, this.list.focus(), this.render()) : e.key === "Escape" && this.focused && (this.focused = !1, this.render());
|
|
@@ -192,7 +216,7 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
192
216
|
this.focused = !0, this.render();
|
|
193
217
|
}), this.list.addEventListener("focusout", (e) => {
|
|
194
218
|
e.relatedTarget instanceof Node && t.contains(e.relatedTarget) || (this.focused = !1, this.render());
|
|
195
|
-
}), document.addEventListener("keydown", this.hotkey), document.addEventListener("visibilitychange", this.syncTimers), window.addEventListener("language-changed", () => this.render()),
|
|
219
|
+
}), document.addEventListener("keydown", this.hotkey), document.addEventListener("visibilitychange", this.syncTimers), window.addEventListener("language-changed", () => this.render()), J(this.receive, { fallback: !0 }), this.attach(), this.render();
|
|
196
220
|
}
|
|
197
221
|
attach() {
|
|
198
222
|
!this.host.isConnected && document.body && document.body.appendChild(this.host);
|
|
@@ -210,9 +234,9 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
210
234
|
return this.hovered || this.focused || this.interacting || document.hidden;
|
|
211
235
|
}
|
|
212
236
|
removeToast(t, e = "dismiss") {
|
|
213
|
-
const s = this.live.find((
|
|
237
|
+
const s = this.live.find((o) => o.data.id === t);
|
|
214
238
|
s && (this.clearTimer(t), this.heights.delete(t), (e === "auto" ? s.data.onAutoClose : s.data.onDismiss)?.(s.data), s.removed = !0, s.swipeOut = e === "swipe", this.render(), setTimeout(() => {
|
|
215
|
-
this.items = this.items.filter((
|
|
239
|
+
this.items = this.items.filter((o) => o !== s), this.render();
|
|
216
240
|
}, 200));
|
|
217
241
|
}
|
|
218
242
|
clearTimer(t) {
|
|
@@ -221,10 +245,10 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
221
245
|
measure() {
|
|
222
246
|
let t = !1;
|
|
223
247
|
for (const e of this.live) {
|
|
224
|
-
const s = e.element,
|
|
225
|
-
if (!s || !
|
|
226
|
-
const
|
|
227
|
-
this.heights.get(e.data.id) !==
|
|
248
|
+
const s = e.element, o = s?.querySelector(".body");
|
|
249
|
+
if (!s || !o) continue;
|
|
250
|
+
const i = o.offsetHeight + s.offsetHeight - s.clientHeight;
|
|
251
|
+
this.heights.get(e.data.id) !== i && (this.heights.set(e.data.id, i), t = !0);
|
|
228
252
|
}
|
|
229
253
|
t && this.layout();
|
|
230
254
|
}
|
|
@@ -232,17 +256,17 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
232
256
|
s.onClick?.(t), (s.href || !t.defaultPrevented) && this.removeToast(e);
|
|
233
257
|
}
|
|
234
258
|
button(t, e, s) {
|
|
235
|
-
const
|
|
259
|
+
const o = e.href ? c("a", {
|
|
236
260
|
class: `button ${s}`,
|
|
237
261
|
href: e.href
|
|
238
262
|
}, e.label) : c("button", {
|
|
239
263
|
class: `button ${s}`,
|
|
240
264
|
type: "button"
|
|
241
265
|
}, e.label);
|
|
242
|
-
return
|
|
266
|
+
return o.addEventListener("click", (i) => this.press(i, t, e)), o;
|
|
243
267
|
}
|
|
244
268
|
draw(t) {
|
|
245
|
-
const { data: e } = t, s = e.dismissible !== !1,
|
|
269
|
+
const { data: e } = t, s = e.dismissible !== !1, o = (e.closeButton ?? f.closeButton ?? !0) && s, i = f.closeLabel ?? p("Close"), n = JSON.stringify([
|
|
246
270
|
e.title,
|
|
247
271
|
e.description,
|
|
248
272
|
e.type,
|
|
@@ -251,8 +275,8 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
251
275
|
e.action?.href,
|
|
252
276
|
e.cancel?.label,
|
|
253
277
|
e.cancel?.href,
|
|
254
|
-
|
|
255
|
-
|
|
278
|
+
o,
|
|
279
|
+
i
|
|
256
280
|
]), a = t.element?.querySelector(".body");
|
|
257
281
|
if (t.drawn === n && a) return;
|
|
258
282
|
t.drawn = n, a && this.resizes?.unobserve(a);
|
|
@@ -262,16 +286,16 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
262
286
|
}), l = e.type === "loading" ? c("span", {
|
|
263
287
|
class: "icon",
|
|
264
288
|
"aria-hidden": "true"
|
|
265
|
-
}) :
|
|
289
|
+
}) : it(e.icon ?? Y[e.type] ?? "", "icon");
|
|
266
290
|
e.type === "loading" && l.appendChild(c("span", { class: "spinner" }));
|
|
267
291
|
const m = c("div", { class: "content" });
|
|
268
|
-
if (m.appendChild(c("div", { class: "title" }, e.title)), e.description && m.appendChild(c("div", { class: "description" }, e.description)), l && r.appendChild(l), r.appendChild(m), e.cancel && r.appendChild(this.button(e.id, e.cancel, "cancel")), e.action && r.appendChild(this.button(e.id, e.action, "action")),
|
|
269
|
-
const
|
|
292
|
+
if (m.appendChild(c("div", { class: "title" }, e.title)), e.description && m.appendChild(c("div", { class: "description" }, e.description)), l && r.appendChild(l), r.appendChild(m), e.cancel && r.appendChild(this.button(e.id, e.cancel, "cancel")), e.action && r.appendChild(this.button(e.id, e.action, "action")), o) {
|
|
293
|
+
const b = c("button", {
|
|
270
294
|
class: "close",
|
|
271
295
|
type: "button",
|
|
272
|
-
"aria-label":
|
|
296
|
+
"aria-label": i
|
|
273
297
|
});
|
|
274
|
-
|
|
298
|
+
b.innerHTML = O.close, b.addEventListener("click", () => this.removeToast(e.id)), r.appendChild(b);
|
|
275
299
|
}
|
|
276
300
|
t.element.replaceChildren(r), this.resizes?.observe(r);
|
|
277
301
|
}
|
|
@@ -282,27 +306,27 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
282
306
|
tabindex: "0",
|
|
283
307
|
"aria-atomic": "true"
|
|
284
308
|
}), s = t.data.id;
|
|
285
|
-
e.addEventListener("pointerdown", (
|
|
309
|
+
e.addEventListener("pointerdown", (i) => {
|
|
286
310
|
const n = this.live.find((a) => a.data.id === s);
|
|
287
|
-
!n || n.data.dismissible === !1 || n.data.type === "loading" ||
|
|
311
|
+
!n || n.data.dismissible === !1 || n.data.type === "loading" || i.composedPath().some((a) => a instanceof Element && a.matches("button, a")) || (e.setPointerCapture?.(i.pointerId), this.swipe = {
|
|
288
312
|
id: s,
|
|
289
|
-
start:
|
|
313
|
+
start: i.clientY,
|
|
290
314
|
time: Date.now(),
|
|
291
315
|
amount: 0
|
|
292
316
|
}, this.interacting = !0, this.syncTimers());
|
|
293
|
-
}), e.addEventListener("pointermove", (
|
|
317
|
+
}), e.addEventListener("pointermove", (i) => {
|
|
294
318
|
if (!this.swipe || this.swipe.id !== s) return;
|
|
295
319
|
const n = this.position.startsWith("top") ? -1 : 1;
|
|
296
|
-
this.swipe.amount = Math.max(0, (
|
|
320
|
+
this.swipe.amount = Math.max(0, (i.clientY - this.swipe.start) * n), e.dataset.swiping = "true", e.style.setProperty("--swipe", `${this.swipe.amount * n}px`);
|
|
297
321
|
});
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
if (!
|
|
322
|
+
const o = () => {
|
|
323
|
+
const i = this.swipe;
|
|
324
|
+
if (!i || i.id !== s) return;
|
|
301
325
|
this.swipe = void 0, this.interacting = !1, delete e.dataset.swiping;
|
|
302
|
-
const n =
|
|
303
|
-
|
|
326
|
+
const n = i.amount / Math.max(1, Date.now() - i.time);
|
|
327
|
+
i.amount >= 45 || n > 0.11 ? this.removeToast(s, "swipe") : e.style.setProperty("--swipe", "0px"), this.syncTimers();
|
|
304
328
|
};
|
|
305
|
-
return e.addEventListener("pointerup",
|
|
329
|
+
return e.addEventListener("pointerup", o), e.addEventListener("pointercancel", o), e;
|
|
306
330
|
}
|
|
307
331
|
raise() {
|
|
308
332
|
const t = this.live[0]?.data.id;
|
|
@@ -326,7 +350,7 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
326
350
|
const e = t.querySelector(".body");
|
|
327
351
|
e && this.resizes?.unobserve(e), t.remove();
|
|
328
352
|
}
|
|
329
|
-
this.layout(), this.measure(), this.syncTimers(), !this.mounting && this.items.some((t) => !t.mounted) && (this.mounting = !0,
|
|
353
|
+
this.layout(), this.measure(), this.syncTimers(), !this.mounting && this.items.some((t) => !t.mounted) && (this.mounting = !0, q(() => {
|
|
330
354
|
this.mounting = !1;
|
|
331
355
|
for (const t of this.items) t.mounted = !0;
|
|
332
356
|
this.layout();
|
|
@@ -337,12 +361,12 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
337
361
|
this.live.forEach((r, l) => {
|
|
338
362
|
r.index = l, r.offset = t, t += this.heights.get(r.data.id) ?? 0;
|
|
339
363
|
});
|
|
340
|
-
const e = this.live, s = e.length ? this.heights.get(e[0].data.id) ?? 0 : 0,
|
|
364
|
+
const e = this.live, s = e.length ? this.heights.get(e[0].data.id) ?? 0 : 0, o = this.expanded, [i, n] = this.position.split("-");
|
|
341
365
|
Object.assign(this.list.dataset, {
|
|
342
|
-
y:
|
|
366
|
+
y: i,
|
|
343
367
|
x: n,
|
|
344
|
-
expanded: String(
|
|
345
|
-
}), this.list.style.setProperty("--height", `${
|
|
368
|
+
expanded: String(o)
|
|
369
|
+
}), this.list.style.setProperty("--height", `${o ? t : s}px`), this.list.style.setProperty("--gaps", String(o ? Math.max(0, e.length - 1) : 0));
|
|
346
370
|
const a = f.visibleToasts ?? 3;
|
|
347
371
|
for (const r of this.items) {
|
|
348
372
|
const l = r.element;
|
|
@@ -356,42 +380,42 @@ var q, A, f, b, F, D, V = w((() => {
|
|
|
356
380
|
}), l.style.setProperty("--index", String(r.index)), l.style.setProperty("--offset", `${r.offset}px`), l.style.setProperty("--front-height", `${s}px`), l.style.zIndex = String(this.items.length - r.index);
|
|
357
381
|
}
|
|
358
382
|
}
|
|
359
|
-
},
|
|
360
|
-
|
|
383
|
+
}, tt(() => {
|
|
384
|
+
A();
|
|
361
385
|
}), typeof document < "u") {
|
|
362
386
|
const t = () => {
|
|
363
|
-
(typeof customElements > "u" || !customElements.get("ds-toast")) &&
|
|
387
|
+
(typeof customElements > "u" || !customElements.get("ds-toast")) && A();
|
|
364
388
|
};
|
|
365
389
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", t, { once: !0 }) : t();
|
|
366
390
|
}
|
|
367
391
|
}));
|
|
368
|
-
|
|
392
|
+
U();
|
|
369
393
|
C();
|
|
370
|
-
var
|
|
371
|
-
function
|
|
394
|
+
var j = [], T = !1, ot = 0;
|
|
395
|
+
function M(t) {
|
|
372
396
|
return new Promise((e, s) => {
|
|
373
|
-
const
|
|
397
|
+
const o = () => {
|
|
374
398
|
T = !0, t().then(e, s).finally(() => {
|
|
375
|
-
T = !1,
|
|
399
|
+
T = !1, j.shift()?.();
|
|
376
400
|
});
|
|
377
401
|
};
|
|
378
|
-
T ?
|
|
402
|
+
T ? j.push(o) : o();
|
|
379
403
|
});
|
|
380
404
|
}
|
|
381
|
-
function
|
|
405
|
+
function at() {
|
|
382
406
|
let t = document.activeElement;
|
|
383
407
|
for (; t?.shadowRoot?.activeElement; ) t = t.shadowRoot.activeElement;
|
|
384
408
|
return t instanceof HTMLElement ? t : null;
|
|
385
409
|
}
|
|
386
410
|
function u(t, e = {}, s) {
|
|
387
|
-
const
|
|
388
|
-
for (const [
|
|
389
|
-
return s !== void 0 && (
|
|
411
|
+
const o = document.createElement(t);
|
|
412
|
+
for (const [i, n] of Object.entries(e)) o.setAttribute(i, n);
|
|
413
|
+
return s !== void 0 && (o.textContent = s), o;
|
|
390
414
|
}
|
|
391
|
-
function
|
|
415
|
+
function _(t) {
|
|
392
416
|
return new Promise((e) => {
|
|
393
|
-
const s = `ds-feedback-${++
|
|
394
|
-
class: "ds-overlay",
|
|
417
|
+
const s = `ds-feedback-${++ot}`, o = at(), i = u("dialog", {
|
|
418
|
+
class: typeof matchMedia == "function" && matchMedia("(max-width: 768px)").matches ? "ds-overlay ds-overlay--sheet" : "ds-overlay",
|
|
395
419
|
role: t.kind === "prompt" ? "dialog" : "alertdialog",
|
|
396
420
|
"aria-labelledby": `${s}-title`,
|
|
397
421
|
"data-ds-feedback": t.kind
|
|
@@ -402,7 +426,7 @@ function M(t) {
|
|
|
402
426
|
}, t.title)), t.text && (n.appendChild(u("p", {
|
|
403
427
|
id: `${s}-text`,
|
|
404
428
|
"data-ds-overlay": "description"
|
|
405
|
-
}, t.text)),
|
|
429
|
+
}, t.text)), i.setAttribute("aria-describedby", `${s}-text`)), i.appendChild(n);
|
|
406
430
|
let a;
|
|
407
431
|
if (t.field) {
|
|
408
432
|
const d = u("div", { "data-ds-overlay": "field" });
|
|
@@ -414,7 +438,7 @@ function M(t) {
|
|
|
414
438
|
}), a.value = t.field.value, t.field.placeholder && (a.placeholder = t.field.placeholder), t.field.label ? d.appendChild(u("label", {
|
|
415
439
|
for: a.id,
|
|
416
440
|
"data-ds-overlay": "label"
|
|
417
|
-
}, t.field.label)) : a.setAttribute("aria-labelledby", `${s}-title`), d.appendChild(a),
|
|
441
|
+
}, t.field.label)) : a.setAttribute("aria-labelledby", `${s}-title`), d.appendChild(a), i.appendChild(d);
|
|
418
442
|
}
|
|
419
443
|
const r = u("div", { "data-ds-overlay": "footer" }), l = t.cancel === void 0 ? void 0 : u("button", {
|
|
420
444
|
type: "button",
|
|
@@ -422,133 +446,139 @@ function M(t) {
|
|
|
422
446
|
value: "cancel"
|
|
423
447
|
}, t.cancel), m = u("button", {
|
|
424
448
|
type: "button",
|
|
425
|
-
class: t.danger ? "ds-button ds-button--
|
|
449
|
+
class: t.danger ? "ds-button ds-button--danger" : "ds-button ds-button--primary",
|
|
426
450
|
value: "confirm"
|
|
427
451
|
}, t.confirm);
|
|
428
|
-
l && r.appendChild(l), r.appendChild(m),
|
|
429
|
-
const
|
|
430
|
-
let
|
|
452
|
+
l && r.appendChild(l), r.appendChild(m), i.appendChild(r);
|
|
453
|
+
const b = t.kind === "prompt" ? null : !1;
|
|
454
|
+
let $ = !1;
|
|
431
455
|
const v = (d) => {
|
|
432
|
-
|
|
456
|
+
$ || ($ = !0, i.open && i.close(), i.remove(), o?.isConnected && o.focus({ preventScroll: !0 }), e(t.kind === "alert" ? !0 : d ? a ? a.value : !0 : b));
|
|
433
457
|
};
|
|
434
458
|
m.addEventListener("click", () => v(!0)), l?.addEventListener("click", () => v(!1)), a?.addEventListener("keydown", (d) => {
|
|
435
459
|
d.key !== "Enter" || d.isComposing || d.shiftKey || d.altKey || d.metaKey || d.ctrlKey || (d.preventDefault(), v(!0));
|
|
436
|
-
}),
|
|
460
|
+
}), i.addEventListener("cancel", (d) => {
|
|
437
461
|
d.preventDefault(), v(!1);
|
|
438
|
-
}),
|
|
439
|
-
const
|
|
440
|
-
if (d.target !==
|
|
441
|
-
const k =
|
|
462
|
+
}), i.addEventListener("close", () => v(!1));
|
|
463
|
+
const I = (d) => {
|
|
464
|
+
if (d.target !== i) return !1;
|
|
465
|
+
const k = i.getBoundingClientRect();
|
|
442
466
|
return d.clientX < k.left || d.clientX > k.right || d.clientY < k.top || d.clientY > k.bottom;
|
|
443
467
|
};
|
|
444
468
|
let E = !1;
|
|
445
|
-
t.danger || (
|
|
446
|
-
E = d.button === 0 &&
|
|
447
|
-
}),
|
|
448
|
-
E &&
|
|
469
|
+
t.danger || (i.addEventListener("pointerdown", (d) => {
|
|
470
|
+
E = d.button === 0 && I(d);
|
|
471
|
+
}), i.addEventListener("click", (d) => {
|
|
472
|
+
E && I(d) && v(!1), E = !1;
|
|
449
473
|
}));
|
|
450
|
-
const
|
|
451
|
-
|
|
474
|
+
const F = a ?? (t.danger ? l : void 0) ?? m;
|
|
475
|
+
F.setAttribute("autofocus", ""), document.body.appendChild(i);
|
|
452
476
|
try {
|
|
453
|
-
|
|
477
|
+
i.showModal();
|
|
454
478
|
} catch {
|
|
455
|
-
|
|
479
|
+
i.setAttribute("open", "");
|
|
456
480
|
}
|
|
457
|
-
|
|
481
|
+
F.focus(), a?.select();
|
|
458
482
|
});
|
|
459
483
|
}
|
|
460
|
-
function
|
|
461
|
-
const { title: e, text: s, confirm:
|
|
462
|
-
return typeof document > "u" ? Promise.resolve() :
|
|
484
|
+
function ut(t) {
|
|
485
|
+
const { title: e, text: s, confirm: o } = typeof t == "string" ? { title: t } : t;
|
|
486
|
+
return typeof document > "u" ? Promise.resolve() : M(() => _({
|
|
463
487
|
kind: "alert",
|
|
464
488
|
title: e,
|
|
465
489
|
text: s,
|
|
466
|
-
confirm:
|
|
490
|
+
confirm: o ?? p("OK")
|
|
467
491
|
})).then(() => {
|
|
468
492
|
});
|
|
469
493
|
}
|
|
470
|
-
function
|
|
471
|
-
const { title: e, text: s, confirm:
|
|
472
|
-
return typeof document > "u" ? Promise.resolve(!1) :
|
|
494
|
+
function pt(t) {
|
|
495
|
+
const { title: e, text: s, confirm: o, cancel: i, danger: n } = typeof t == "string" ? { title: t } : t;
|
|
496
|
+
return typeof document > "u" ? Promise.resolve(!1) : M(() => _({
|
|
473
497
|
kind: "confirm",
|
|
474
498
|
title: e,
|
|
475
499
|
text: s,
|
|
476
|
-
confirm:
|
|
477
|
-
cancel:
|
|
500
|
+
confirm: o ?? p("OK"),
|
|
501
|
+
cancel: i ?? p("Cancel"),
|
|
478
502
|
danger: n
|
|
479
503
|
})).then((a) => a === !0);
|
|
480
504
|
}
|
|
481
|
-
function
|
|
482
|
-
const { title: e, text: s, label:
|
|
483
|
-
return typeof document > "u" ? Promise.resolve(null) :
|
|
505
|
+
function mt(t) {
|
|
506
|
+
const { title: e, text: s, label: o, value: i = "", placeholder: n, confirm: a, cancel: r } = typeof t == "string" ? { title: t } : t;
|
|
507
|
+
return typeof document > "u" ? Promise.resolve(null) : M(() => _({
|
|
484
508
|
kind: "prompt",
|
|
485
509
|
title: e,
|
|
486
510
|
text: s,
|
|
487
511
|
confirm: a ?? p("OK"),
|
|
488
512
|
cancel: r ?? p("Cancel"),
|
|
489
513
|
field: {
|
|
490
|
-
label:
|
|
491
|
-
value:
|
|
514
|
+
label: o,
|
|
515
|
+
value: i,
|
|
492
516
|
placeholder: n
|
|
493
517
|
}
|
|
494
518
|
})).then((l) => typeof l == "string" ? l : null);
|
|
495
519
|
}
|
|
496
|
-
var
|
|
520
|
+
var nt = /* @__PURE__ */ W({ pageToaster: () => A }), rt = y((() => {
|
|
497
521
|
}));
|
|
498
522
|
C();
|
|
499
|
-
|
|
500
|
-
function
|
|
523
|
+
P();
|
|
524
|
+
function dt() {
|
|
501
525
|
try {
|
|
502
526
|
return document.querySelector("dialog:modal");
|
|
503
527
|
} catch {
|
|
504
528
|
return null;
|
|
505
529
|
}
|
|
506
530
|
}
|
|
507
|
-
function
|
|
531
|
+
function lt(t) {
|
|
508
532
|
if (typeof document > "u" || !document.body) return !1;
|
|
509
|
-
const e = document.activeElement instanceof HTMLElement ? document.activeElement : null, s = document.getSelection(),
|
|
510
|
-
|
|
533
|
+
const e = document.activeElement instanceof HTMLElement ? document.activeElement : null, s = document.getSelection(), o = s ? Array.from({ length: s.rangeCount }, (a, r) => s.getRangeAt(r)) : [], i = document.createElement("textarea");
|
|
534
|
+
i.value = t, i.setAttribute("readonly", ""), i.setAttribute("aria-hidden", "true"), i.tabIndex = -1, i.style.cssText = "position:fixed;top:0;left:0;width:1px;height:1px;margin:0;padding:0;border:0;opacity:0;pointer-events:none", (dt() ?? document.body).appendChild(i), i.focus({ preventScroll: !0 }), i.select(), i.setSelectionRange(0, t.length);
|
|
511
535
|
let n = !1;
|
|
512
536
|
try {
|
|
513
537
|
n = document.execCommand("copy");
|
|
514
538
|
} catch {
|
|
515
539
|
n = !1;
|
|
516
540
|
}
|
|
517
|
-
if (
|
|
541
|
+
if (i.remove(), e?.focus({ preventScroll: !0 }), s) {
|
|
518
542
|
s.removeAllRanges();
|
|
519
|
-
for (const a of
|
|
543
|
+
for (const a of o) s.addRange(a);
|
|
520
544
|
}
|
|
521
545
|
return n;
|
|
522
546
|
}
|
|
523
|
-
async function
|
|
547
|
+
async function vt(t, e = {}) {
|
|
524
548
|
let s = !1;
|
|
525
|
-
const
|
|
526
|
-
if (
|
|
527
|
-
await
|
|
549
|
+
const o = typeof navigator > "u" ? void 0 : navigator.clipboard;
|
|
550
|
+
if (o?.writeText) try {
|
|
551
|
+
await o.writeText(t), s = !0;
|
|
528
552
|
} catch {
|
|
529
553
|
s = !1;
|
|
530
554
|
}
|
|
531
|
-
return s || (s =
|
|
555
|
+
return s || (s = lt(t)), e.toast !== !1 && await ct(s, s ? e.toast ?? p("Copied") : p("Could not copy")), s;
|
|
532
556
|
}
|
|
533
|
-
async function
|
|
534
|
-
if (!
|
|
535
|
-
(await Promise.resolve().then(() => (
|
|
557
|
+
async function ct(t, e) {
|
|
558
|
+
if (!Q()) try {
|
|
559
|
+
(await Promise.resolve().then(() => (rt(), nt))).pageToaster();
|
|
536
560
|
} catch {
|
|
537
561
|
}
|
|
538
|
-
t ?
|
|
562
|
+
t ? S.success(e) : S.error(e, { failure: {
|
|
563
|
+
code: "clipboard.copy",
|
|
564
|
+
message: "Clipboard copy failed"
|
|
565
|
+
} });
|
|
539
566
|
}
|
|
540
|
-
|
|
567
|
+
U();
|
|
541
568
|
C();
|
|
542
|
-
|
|
569
|
+
V();
|
|
570
|
+
P();
|
|
543
571
|
export {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
572
|
+
G as FAILURE_EVENT,
|
|
573
|
+
ut as alert,
|
|
574
|
+
ht as configureToaster,
|
|
575
|
+
pt as confirm,
|
|
576
|
+
vt as copyText,
|
|
577
|
+
A as pageToaster,
|
|
578
|
+
mt as prompt,
|
|
579
|
+
X as reportFailure,
|
|
580
|
+
ft as setFeedbackWords,
|
|
581
|
+
S as toast
|
|
552
582
|
};
|
|
553
583
|
|
|
554
584
|
//# sourceMappingURL=feedback.js.map
|