@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/DS1/2-core/ds-chart.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { html, LitElement, nothing, unsafeCSS, type PropertyValues } from "lit";
|
|
2
|
-
import {
|
|
3
|
-
import { type DataPoint, drawSparkline, GridChart, type Marker, type Series, type SeriesKind } from "./chart/grid-chart";
|
|
1
|
+
import { html, LitElement, nothing, unsafeCSS, type PropertyDeclarations, type PropertyValues } from "lit";
|
|
2
|
+
import { type DataPoint, drawSparkline, GridChart, type Marker, type Series, type SeriesKind, STEPS } from "./chart/grid-chart";
|
|
4
3
|
|
|
5
4
|
import { define } from "../0-face/define";
|
|
6
5
|
import styles from "./chart/chart.css?inline";
|
|
@@ -8,9 +7,19 @@ export * from "./chart/grid-chart";
|
|
|
8
7
|
|
|
9
8
|
/** Independent chart configuration; no module-wide size or theme state. */
|
|
10
9
|
export class ChartElement extends LitElement {
|
|
10
|
+
static properties: PropertyDeclarations = {
|
|
11
|
+
unit: { type: Number },
|
|
12
|
+
grid: {},
|
|
13
|
+
};
|
|
11
14
|
static styles = unsafeCSS(styles);
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
declare unit: number;
|
|
16
|
+
declare grid: "full" | "rows" | "none";
|
|
17
|
+
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.unit = 20;
|
|
21
|
+
this.grid = "rows";
|
|
22
|
+
}
|
|
14
23
|
private media?: MediaQueryList;
|
|
15
24
|
private themeChanged = () => this.refreshTheme();
|
|
16
25
|
connectedCallback(): void {
|
|
@@ -43,22 +52,53 @@ function observeWidth(element: HTMLElement, callback: (width: number) => void):
|
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
export class GridLineChart extends ChartElement {
|
|
55
|
+
static properties: PropertyDeclarations = {
|
|
56
|
+
data: { attribute: false },
|
|
57
|
+
kind: {},
|
|
58
|
+
base: { type: Number },
|
|
59
|
+
color: {},
|
|
60
|
+
rows: { type: Number },
|
|
61
|
+
markers: { attribute: false },
|
|
62
|
+
timeRange: { attribute: false },
|
|
63
|
+
extremes: { type: Boolean },
|
|
64
|
+
labels: { type: Boolean },
|
|
65
|
+
live: { type: Boolean },
|
|
66
|
+
format: { attribute: false },
|
|
67
|
+
drawKey: {},
|
|
68
|
+
dot: { state: true },
|
|
69
|
+
};
|
|
46
70
|
connectedCallback(): void { this.dataset.chartKind = "line"; super.connectedCallback(); }
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
71
|
+
declare data: DataPoint[];
|
|
72
|
+
declare kind: SeriesKind;
|
|
73
|
+
declare base: number | undefined;
|
|
74
|
+
declare color: string;
|
|
75
|
+
declare rows: number;
|
|
76
|
+
declare markers: Marker[];
|
|
77
|
+
declare timeRange: [number, number] | null;
|
|
78
|
+
declare extremes: boolean;
|
|
79
|
+
declare labels: boolean;
|
|
80
|
+
declare live: boolean;
|
|
81
|
+
declare format: (value: number) => string;
|
|
58
82
|
/** Changing this replays the draw-in. */
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
83
|
+
declare drawKey: string;
|
|
84
|
+
|
|
85
|
+
private declare dot: { x: number; y: number } | null;
|
|
86
|
+
|
|
87
|
+
constructor() {
|
|
88
|
+
super();
|
|
89
|
+
this.data = [];
|
|
90
|
+
this.kind = "area";
|
|
91
|
+
this.color = "--ds-chart-ink";
|
|
92
|
+
this.rows = 8;
|
|
93
|
+
this.markers = [];
|
|
94
|
+
this.timeRange = null;
|
|
95
|
+
this.extremes = false;
|
|
96
|
+
this.labels = false;
|
|
97
|
+
this.live = false;
|
|
98
|
+
this.format = (v) => v.toFixed(2);
|
|
99
|
+
this.drawKey = "";
|
|
100
|
+
this.dot = null;
|
|
101
|
+
}
|
|
62
102
|
|
|
63
103
|
private chart?: GridChart;
|
|
64
104
|
private series?: Series;
|
|
@@ -182,10 +222,21 @@ export class GridLineChart extends ChartElement {
|
|
|
182
222
|
}
|
|
183
223
|
|
|
184
224
|
export class GridSpark extends ChartElement {
|
|
225
|
+
static properties: PropertyDeclarations = {
|
|
226
|
+
values: { attribute: false },
|
|
227
|
+
base: { type: Number },
|
|
228
|
+
cols: { type: Number },
|
|
229
|
+
};
|
|
185
230
|
connectedCallback(): void { this.dataset.chartKind = "spark"; super.connectedCallback(); }
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
231
|
+
declare values: number[];
|
|
232
|
+
declare base: number | undefined;
|
|
233
|
+
declare cols: number;
|
|
234
|
+
|
|
235
|
+
constructor() {
|
|
236
|
+
super();
|
|
237
|
+
this.values = [];
|
|
238
|
+
this.cols = 4;
|
|
239
|
+
}
|
|
189
240
|
refreshTheme(): void { this.draw(); }
|
|
190
241
|
|
|
191
242
|
render() {
|
|
@@ -222,39 +273,105 @@ export interface BarItem {
|
|
|
222
273
|
caption?: string;
|
|
223
274
|
}
|
|
224
275
|
|
|
276
|
+
/**
|
|
277
|
+
* The round size each square of a bar chart stands for (the line chart's steps: 1, 2, 2.5 and 5 times
|
|
278
|
+
* a power of ten), the smallest with which `max` fits in `squares`.
|
|
279
|
+
*/
|
|
280
|
+
export function barStep(max: number, squares: number): number {
|
|
281
|
+
return STEPS.find((step) => Math.ceil(max / step) <= Math.max(1, squares)) ?? STEPS[STEPS.length - 1]!;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const compact = new Intl.NumberFormat(undefined, { notation: "compact", maximumFractionDigits: 1 });
|
|
285
|
+
|
|
225
286
|
export class GridBars extends ChartElement {
|
|
287
|
+
static properties: PropertyDeclarations = {
|
|
288
|
+
items: { attribute: false },
|
|
289
|
+
rows: { type: Number },
|
|
290
|
+
span: { type: Number },
|
|
291
|
+
axis: { type: Boolean, reflect: true },
|
|
292
|
+
values: { type: Boolean, reflect: true },
|
|
293
|
+
fill: { type: Boolean, reflect: true },
|
|
294
|
+
format: { attribute: false },
|
|
295
|
+
};
|
|
226
296
|
connectedCallback(): void { this.dataset.chartKind = "bars"; super.connectedCallback(); }
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
297
|
+
declare items: BarItem[];
|
|
298
|
+
declare rows: number;
|
|
299
|
+
declare span: number;
|
|
300
|
+
/** A scale at the end, two squares wide: each square of the area one round step, labelled just above its line, the lines across the bars. */
|
|
301
|
+
declare axis: boolean;
|
|
302
|
+
/** Each bar's value written over it, by `format`. */
|
|
303
|
+
declare values: boolean;
|
|
304
|
+
/** The bars share the width left beside the scale, in whole pixels, instead of `span` squares each. */
|
|
305
|
+
declare fill: boolean;
|
|
306
|
+
/** Writes the scale's labels and the values over the bars. */
|
|
307
|
+
declare format: (value: number) => string;
|
|
308
|
+
|
|
309
|
+
constructor() {
|
|
310
|
+
super();
|
|
311
|
+
this.items = [];
|
|
312
|
+
this.rows = 4;
|
|
313
|
+
this.span = 2;
|
|
314
|
+
this.axis = false;
|
|
315
|
+
this.values = false;
|
|
316
|
+
this.fill = false;
|
|
317
|
+
this.format = (value) => compact.format(value);
|
|
318
|
+
}
|
|
230
319
|
|
|
231
320
|
render() {
|
|
232
|
-
const
|
|
321
|
+
const squares = Math.max(1, this.rows - 1);
|
|
322
|
+
const height = squares * this.unit;
|
|
233
323
|
const max = Math.max(...this.items.flatMap((item) => [item.value, item.compare ?? 0]), 1e-9);
|
|
234
|
-
|
|
324
|
+
// With a scale, a square is a step, so the bars stand on its lines; a value over the tallest
|
|
325
|
+
// keeps its square above it.
|
|
326
|
+
const step = this.axis ? barStep(max, squares - (this.values ? 1 : 0)) : 0;
|
|
327
|
+
const room = height - 4 - (this.values ? this.unit : 0);
|
|
328
|
+
const px = (v: number) => Math.max(1, Math.round(this.axis ? (v / step) * this.unit : (v / max) * room));
|
|
329
|
+
const captions = this.items.some((item) => item.caption);
|
|
330
|
+
const lines = this.axis ? Array.from({ length: squares }, (_, i) => i + 1).filter((row) => row * step <= max + step) : [];
|
|
235
331
|
return html`<div class="bars" style="--span: ${this.span}">
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
332
|
+
<div class="bar-columns">
|
|
333
|
+
${this.axis ? html`<span class="bar-guides" style="top: ${height - lines.length * this.unit}px; height: ${lines.length * this.unit}px" aria-hidden="true"></span>` : nothing}
|
|
334
|
+
${this.items.map(
|
|
335
|
+
(item) => html`<div class="bar-cell">
|
|
336
|
+
<div class="bar-area" style="height: ${height}px">
|
|
337
|
+
${item.compare !== undefined
|
|
338
|
+
? html`<span class="bar-compare" style="height: ${px(item.compare)}px"></span>`
|
|
339
|
+
: nothing}
|
|
340
|
+
${item.value > 0
|
|
341
|
+
? html`<span class="bar-fill ${item.tone ?? "ink"}" style="height: ${px(item.value)}px"></span>`
|
|
342
|
+
: nothing}
|
|
343
|
+
${this.values && item.value > 0
|
|
344
|
+
? html`<span class="bar-value" style="bottom: ${px(item.value) + 2}px">${this.format(item.value)}</span>`
|
|
345
|
+
: nothing}
|
|
346
|
+
</div>
|
|
347
|
+
${captions ? html`<span class="bar-caption">${item.caption ?? ""}</span>` : nothing}
|
|
348
|
+
<span class="bar-label">${item.label}</span>
|
|
349
|
+
</div>`,
|
|
350
|
+
)}
|
|
351
|
+
</div>
|
|
352
|
+
${this.axis
|
|
353
|
+
? html`<div class="bar-axis" style="height: ${height}px" aria-hidden="true">
|
|
354
|
+
${lines.map((row) => html`<span class="bar-tick" style="bottom: ${row * this.unit}px">${this.format(row * step)}</span>`)}
|
|
355
|
+
</div>`
|
|
356
|
+
: nothing}
|
|
250
357
|
</div>`;
|
|
251
358
|
}
|
|
252
359
|
}
|
|
253
360
|
|
|
254
361
|
export class GridRatio extends ChartElement {
|
|
362
|
+
static properties: PropertyDeclarations = {
|
|
363
|
+
value: { type: Number },
|
|
364
|
+
width: { state: true },
|
|
365
|
+
};
|
|
255
366
|
connectedCallback(): void { this.dataset.chartKind = "ratio"; super.connectedCallback(); }
|
|
256
|
-
|
|
257
|
-
|
|
367
|
+
declare value: number;
|
|
368
|
+
private declare width: number;
|
|
369
|
+
|
|
370
|
+
constructor() {
|
|
371
|
+
super();
|
|
372
|
+
this.value = 0.5;
|
|
373
|
+
this.width = 0;
|
|
374
|
+
}
|
|
258
375
|
private observer?: ResizeObserver;
|
|
259
376
|
|
|
260
377
|
protected initialize(): void {
|
|
@@ -283,13 +400,31 @@ export interface RangeMark {
|
|
|
283
400
|
}
|
|
284
401
|
|
|
285
402
|
export class GridRange extends ChartElement {
|
|
403
|
+
static properties: PropertyDeclarations = {
|
|
404
|
+
min: { type: Number },
|
|
405
|
+
max: { type: Number },
|
|
406
|
+
from: { type: Number },
|
|
407
|
+
to: { type: Number },
|
|
408
|
+
marks: { attribute: false },
|
|
409
|
+
width: { state: true },
|
|
410
|
+
};
|
|
286
411
|
connectedCallback(): void { this.dataset.chartKind = "range"; super.connectedCallback(); }
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
412
|
+
declare min: number;
|
|
413
|
+
declare max: number;
|
|
414
|
+
declare from: number;
|
|
415
|
+
declare to: number;
|
|
416
|
+
declare marks: RangeMark[];
|
|
417
|
+
private declare width: number;
|
|
418
|
+
|
|
419
|
+
constructor() {
|
|
420
|
+
super();
|
|
421
|
+
this.min = 0;
|
|
422
|
+
this.max = 1;
|
|
423
|
+
this.from = 0;
|
|
424
|
+
this.to = 1;
|
|
425
|
+
this.marks = [];
|
|
426
|
+
this.width = 0;
|
|
427
|
+
}
|
|
293
428
|
private observer?: ResizeObserver;
|
|
294
429
|
|
|
295
430
|
protected initialize(): void {
|
package/DS1/2-core/ds-cycle.ts
CHANGED
|
@@ -11,6 +11,7 @@ import type { LanguageCode } from "../0-face/i18n";
|
|
|
11
11
|
import { LANGUAGE_METADATA, isLanguage, normalizeLanguage } from "../0-face/languages";
|
|
12
12
|
import { currentThemeMode, setThemeMode, THEME_MODES } from "../0-face/theme";
|
|
13
13
|
import type { ThemeMode } from "../0-face/theme";
|
|
14
|
+
import { getShape, setShape, SHAPES, type Shape } from "../0-face/shape";
|
|
14
15
|
import { savePreferences } from "../0-face/preferences";
|
|
15
16
|
import "./ds-button";
|
|
16
17
|
import "./ds-icon";
|
|
@@ -31,24 +32,6 @@ const applyAccentColor = () => {
|
|
|
31
32
|
document.documentElement.style.setProperty("--accent-color", `var(${color})`);
|
|
32
33
|
};
|
|
33
34
|
|
|
34
|
-
// Notes style medium utilities
|
|
35
|
-
const saveNotesStyleMedium = (style: string) => {
|
|
36
|
-
localStorage.setItem("notesStyleMedium", style);
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
const getNotesStyleMedium = (): string => {
|
|
40
|
-
return localStorage.getItem("notesStyleMedium") || "note"; // Default to note
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// Note behavior utilities
|
|
44
|
-
const savePageStyle = (style: string) => {
|
|
45
|
-
localStorage.setItem("pageStyle", style);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const getPageStyle = (): string => {
|
|
49
|
-
return localStorage.getItem("pageStyle") || "note"; // Default to note
|
|
50
|
-
};
|
|
51
|
-
|
|
52
35
|
// App width utilities removed
|
|
53
36
|
|
|
54
37
|
// The settings a cycle knows by name. Any other cycle steps through its own
|
|
@@ -65,7 +48,7 @@ export function nativeLanguageName(code: string): string {
|
|
|
65
48
|
return getLanguageDisplayName(code, { locale: code });
|
|
66
49
|
}
|
|
67
50
|
|
|
68
|
-
const SETTINGS = new Set(["language", "theme", "
|
|
51
|
+
const SETTINGS = new Set(["language", "theme", "shape", "accent-color"]);
|
|
69
52
|
|
|
70
53
|
// Use a regular class with proper TypeScript type declarations and JSDoc comments
|
|
71
54
|
export class Cycle extends LitElement {
|
|
@@ -120,7 +103,6 @@ export class Cycle extends LitElement {
|
|
|
120
103
|
handleLanguageChanged: EventListener;
|
|
121
104
|
handleThemeChanged: EventListener;
|
|
122
105
|
handleAccentColorChanged: EventListener;
|
|
123
|
-
handleNoteBehaviorChanged: EventListener;
|
|
124
106
|
};
|
|
125
107
|
|
|
126
108
|
constructor() {
|
|
@@ -148,7 +130,6 @@ export class Cycle extends LitElement {
|
|
|
148
130
|
handleLanguageChanged: this.handleLanguageChanged.bind(this),
|
|
149
131
|
handleThemeChanged: this.handleThemeChanged.bind(this),
|
|
150
132
|
handleAccentColorChanged: this.handleAccentColorChanged.bind(this),
|
|
151
|
-
handleNoteBehaviorChanged: this.handleNoteBehaviorChanged.bind(this),
|
|
152
133
|
};
|
|
153
134
|
}
|
|
154
135
|
|
|
@@ -172,14 +153,11 @@ export class Cycle extends LitElement {
|
|
|
172
153
|
"theme-changed",
|
|
173
154
|
this.boundHandlers.handleThemeChanged
|
|
174
155
|
);
|
|
156
|
+
window.addEventListener("shape-changed", this.onShapeChanged);
|
|
175
157
|
window.addEventListener(
|
|
176
158
|
"accent-color-changed",
|
|
177
159
|
this.boundHandlers.handleAccentColorChanged
|
|
178
160
|
);
|
|
179
|
-
window.addEventListener(
|
|
180
|
-
"page-style-changed",
|
|
181
|
-
this.boundHandlers.handleNoteBehaviorChanged
|
|
182
|
-
);
|
|
183
161
|
|
|
184
162
|
// Initialize the component
|
|
185
163
|
this.initializeValues();
|
|
@@ -196,6 +174,10 @@ export class Cycle extends LitElement {
|
|
|
196
174
|
// Light, dark and the system's, the stored choice
|
|
197
175
|
this.values = [...THEME_MODES];
|
|
198
176
|
this.currentValue = currentThemeMode.get();
|
|
177
|
+
} else if (this.type === "shape") {
|
|
178
|
+
// Square, rounded and circular, the stored choice
|
|
179
|
+
this.values = [...SHAPES];
|
|
180
|
+
this.currentValue = getShape();
|
|
199
181
|
} else if (this.type === "accent-color") {
|
|
200
182
|
// Set up accent color cycling
|
|
201
183
|
this.values = [
|
|
@@ -215,30 +197,6 @@ export class Cycle extends LitElement {
|
|
|
215
197
|
|
|
216
198
|
// Apply the accent color to ensure it's active
|
|
217
199
|
applyAccentColor();
|
|
218
|
-
} else if (this.type === "notes-style-medium") {
|
|
219
|
-
// Set up notes style medium cycling
|
|
220
|
-
this.values = ["default", "big", "gallery"];
|
|
221
|
-
|
|
222
|
-
// Set initial value based on current notes style medium
|
|
223
|
-
const currentNotesStyle = getNotesStyleMedium();
|
|
224
|
-
this.currentValue = currentNotesStyle;
|
|
225
|
-
|
|
226
|
-
// Check if this should be disabled based on note behavior
|
|
227
|
-
const currentPageStyle = getPageStyle();
|
|
228
|
-
this.disabled = currentPageStyle === "note";
|
|
229
|
-
} else if (this.type === "page-style") {
|
|
230
|
-
// Set up page style cycling
|
|
231
|
-
this.values = ["note", "page"];
|
|
232
|
-
|
|
233
|
-
// Set initial value based on current page style
|
|
234
|
-
const currentPageStyle = getPageStyle();
|
|
235
|
-
this.currentValue = currentPageStyle;
|
|
236
|
-
} else if (this.type === "icon-only") {
|
|
237
|
-
// Set up icon-only cycling (no label)
|
|
238
|
-
this.values = ["note", "page"];
|
|
239
|
-
|
|
240
|
-
// Set initial value
|
|
241
|
-
this.currentValue = this.values[0];
|
|
242
200
|
}
|
|
243
201
|
|
|
244
202
|
// Request update to re-render with new values
|
|
@@ -262,6 +220,8 @@ export class Cycle extends LitElement {
|
|
|
262
220
|
} else if (this.type === "theme") {
|
|
263
221
|
// The stored choice, which may be the system's
|
|
264
222
|
this.currentValue = currentThemeMode.get();
|
|
223
|
+
} else if (this.type === "shape") {
|
|
224
|
+
this.currentValue = getShape();
|
|
265
225
|
} else if (this.type === "accent-color") {
|
|
266
226
|
// Get current accent color
|
|
267
227
|
const currentAccentColor = getAccentColor();
|
|
@@ -269,22 +229,6 @@ export class Cycle extends LitElement {
|
|
|
269
229
|
|
|
270
230
|
// Apply the accent color to ensure it's active
|
|
271
231
|
applyAccentColor();
|
|
272
|
-
} else if (this.type === "notes-style-medium") {
|
|
273
|
-
// Get current notes style medium
|
|
274
|
-
const currentNotesStyle = getNotesStyleMedium();
|
|
275
|
-
this.currentValue = currentNotesStyle;
|
|
276
|
-
|
|
277
|
-
// Check if this should be disabled based on note behavior
|
|
278
|
-
const currentPageStyle = getPageStyle();
|
|
279
|
-
this.disabled = currentPageStyle === "note";
|
|
280
|
-
} else if (this.type === "page-style") {
|
|
281
|
-
// Get current page style
|
|
282
|
-
const currentPageStyle = getPageStyle();
|
|
283
|
-
this.currentValue = currentPageStyle;
|
|
284
|
-
} else if (this.type === "icon-only") {
|
|
285
|
-
// Get current page style for icon-only
|
|
286
|
-
const currentPageStyle = getPageStyle();
|
|
287
|
-
this.currentValue = currentPageStyle;
|
|
288
232
|
}
|
|
289
233
|
|
|
290
234
|
this.requestUpdate();
|
|
@@ -311,14 +255,11 @@ export class Cycle extends LitElement {
|
|
|
311
255
|
"theme-changed",
|
|
312
256
|
this.boundHandlers.handleThemeChanged
|
|
313
257
|
);
|
|
258
|
+
window.removeEventListener("shape-changed", this.onShapeChanged);
|
|
314
259
|
window.removeEventListener(
|
|
315
260
|
"accent-color-changed",
|
|
316
261
|
this.boundHandlers.handleAccentColorChanged
|
|
317
262
|
);
|
|
318
|
-
window.removeEventListener(
|
|
319
|
-
"page-style-changed",
|
|
320
|
-
this.boundHandlers.handleNoteBehaviorChanged
|
|
321
|
-
);
|
|
322
263
|
}
|
|
323
264
|
|
|
324
265
|
handleButtonClick(e: Event) {
|
|
@@ -367,6 +308,11 @@ export class Cycle extends LitElement {
|
|
|
367
308
|
savePreferences({ theme: newTheme as ThemeMode });
|
|
368
309
|
|
|
369
310
|
// Theme helper already emits the change event, so no manual dispatch here
|
|
311
|
+
} else if (this.type === "shape") {
|
|
312
|
+
const next = this.values[(this.values.indexOf(this.currentValue) + 1) % this.values.length];
|
|
313
|
+
this.currentValue = next;
|
|
314
|
+
// The runtime stores it, marks the root and emits shape-changed
|
|
315
|
+
setShape(next as Shape);
|
|
370
316
|
} else if (this.type === "accent-color") {
|
|
371
317
|
// Cycle through accent colors
|
|
372
318
|
const currentIndex = this.values.indexOf(this.currentValue);
|
|
@@ -391,69 +337,6 @@ export class Cycle extends LitElement {
|
|
|
391
337
|
detail: { color: newColor },
|
|
392
338
|
})
|
|
393
339
|
);
|
|
394
|
-
} else if (this.type === "notes-style-medium") {
|
|
395
|
-
// Cycle through notes style medium options
|
|
396
|
-
const currentIndex = this.values.indexOf(this.currentValue);
|
|
397
|
-
const nextIndex = (currentIndex + 1) % this.values.length;
|
|
398
|
-
const newStyle = this.values[nextIndex];
|
|
399
|
-
|
|
400
|
-
// Update current value
|
|
401
|
-
this.currentValue = newStyle;
|
|
402
|
-
|
|
403
|
-
// Save the new notes style medium
|
|
404
|
-
saveNotesStyleMedium(newStyle);
|
|
405
|
-
|
|
406
|
-
// Save preferences
|
|
407
|
-
savePreferences({ notesStyleMedium: newStyle });
|
|
408
|
-
|
|
409
|
-
// Dispatch notes style medium change event
|
|
410
|
-
window.dispatchEvent(
|
|
411
|
-
new CustomEvent("notes-style-medium-changed", {
|
|
412
|
-
detail: { style: newStyle },
|
|
413
|
-
})
|
|
414
|
-
);
|
|
415
|
-
} else if (this.type === "page-style") {
|
|
416
|
-
// Cycle through note behavior options
|
|
417
|
-
const currentIndex = this.values.indexOf(this.currentValue);
|
|
418
|
-
const nextIndex = (currentIndex + 1) % this.values.length;
|
|
419
|
-
const newBehavior = this.values[nextIndex];
|
|
420
|
-
|
|
421
|
-
// Update current value
|
|
422
|
-
this.currentValue = newBehavior;
|
|
423
|
-
|
|
424
|
-
// Save the new note behavior
|
|
425
|
-
savePageStyle(newBehavior);
|
|
426
|
-
|
|
427
|
-
// Save preferences
|
|
428
|
-
savePreferences({ pageStyle: newBehavior });
|
|
429
|
-
|
|
430
|
-
// Dispatch note behavior change event
|
|
431
|
-
window.dispatchEvent(
|
|
432
|
-
new CustomEvent("page-style-changed", {
|
|
433
|
-
detail: { behavior: newBehavior },
|
|
434
|
-
})
|
|
435
|
-
);
|
|
436
|
-
} else if (this.type === "icon-only") {
|
|
437
|
-
// Cycle through icon-only options (note/page)
|
|
438
|
-
const currentIndex = this.values.indexOf(this.currentValue);
|
|
439
|
-
const nextIndex = (currentIndex + 1) % this.values.length;
|
|
440
|
-
const newIconOnlyValue = this.values[nextIndex];
|
|
441
|
-
|
|
442
|
-
// Update current value
|
|
443
|
-
this.currentValue = newIconOnlyValue;
|
|
444
|
-
|
|
445
|
-
// Save the new page style
|
|
446
|
-
savePageStyle(newIconOnlyValue);
|
|
447
|
-
|
|
448
|
-
// Save preferences
|
|
449
|
-
savePreferences({ pageStyle: newIconOnlyValue });
|
|
450
|
-
|
|
451
|
-
// Dispatch page style change event
|
|
452
|
-
window.dispatchEvent(
|
|
453
|
-
new CustomEvent("page-style-changed", {
|
|
454
|
-
detail: { behavior: newIconOnlyValue },
|
|
455
|
-
})
|
|
456
|
-
);
|
|
457
340
|
} else if (!SETTINGS.has(this.type)) {
|
|
458
341
|
const next = this.values[(this.values.indexOf(this.currentValue) + 1) % this.values.length];
|
|
459
342
|
this.currentValue = this.value = next;
|
|
@@ -464,9 +347,19 @@ export class Cycle extends LitElement {
|
|
|
464
347
|
this.requestUpdate();
|
|
465
348
|
}
|
|
466
349
|
|
|
350
|
+
/** Another control, or another tab, chose a shape. */
|
|
351
|
+
private onShapeChanged = (): void => {
|
|
352
|
+
if (this.type === "shape") this.setupInitialValue();
|
|
353
|
+
};
|
|
354
|
+
|
|
467
355
|
getValueDisplay(value: string): string | any {
|
|
468
356
|
if (this.type === "language") {
|
|
469
357
|
return nativeLanguageName(value);
|
|
358
|
+
} else if (this.type === "shape") {
|
|
359
|
+
// Square, Rounded or Circular, in the shared words
|
|
360
|
+
const word = value.charAt(0).toUpperCase() + value.slice(1);
|
|
361
|
+
const translated = this.translationsReady ? translate(word) : "";
|
|
362
|
+
return translated && translated !== word ? translated : word;
|
|
470
363
|
} else if (this.type === "theme") {
|
|
471
364
|
// Try to get translated theme name
|
|
472
365
|
if (this.translationsReady) {
|
|
@@ -481,29 +374,6 @@ export class Cycle extends LitElement {
|
|
|
481
374
|
} else if (this.type === "accent-color") {
|
|
482
375
|
// Get color name from CSS variable
|
|
483
376
|
return this.getColorName(value);
|
|
484
|
-
} else if (this.type === "notes-style-medium") {
|
|
485
|
-
// Return SVG icon for notes style medium
|
|
486
|
-
return this.getNotesStyleIcon(value);
|
|
487
|
-
} else if (this.type === "page-style") {
|
|
488
|
-
// Return translated text for note behavior
|
|
489
|
-
if (this.translationsReady) {
|
|
490
|
-
const translatedText = translate(value === "note" ? "Note" : "Page");
|
|
491
|
-
if (
|
|
492
|
-
translatedText &&
|
|
493
|
-
translatedText !== (value === "note" ? "Note" : "Page")
|
|
494
|
-
) {
|
|
495
|
-
return translatedText;
|
|
496
|
-
}
|
|
497
|
-
}
|
|
498
|
-
return value;
|
|
499
|
-
} else if (this.type === "icon-only") {
|
|
500
|
-
// Return SVG icon for icon-only type (note/page icons)
|
|
501
|
-
if (value === "note") {
|
|
502
|
-
return html`<ds-icon type="note"></ds-icon>`;
|
|
503
|
-
} else if (value === "page") {
|
|
504
|
-
return html`<ds-icon type="page"></ds-icon>`;
|
|
505
|
-
}
|
|
506
|
-
return html`<span>${value}</span>`;
|
|
507
377
|
}
|
|
508
378
|
|
|
509
379
|
return value;
|
|
@@ -550,21 +420,6 @@ export class Cycle extends LitElement {
|
|
|
550
420
|
return colorVar.replace("--", "").replace("-", " ");
|
|
551
421
|
}
|
|
552
422
|
|
|
553
|
-
getNotesStyleIcon(style: string) {
|
|
554
|
-
if (style === "page") {
|
|
555
|
-
return html`<ds-icon type="page"></ds-icon>`;
|
|
556
|
-
} else if (style === "note") {
|
|
557
|
-
return html`<ds-icon type="note"></ds-icon>`;
|
|
558
|
-
} else if (style === "default") {
|
|
559
|
-
return html`<ds-icon type="default"></ds-icon>`;
|
|
560
|
-
} else if (style === "big") {
|
|
561
|
-
return html`<ds-icon type="big"></ds-icon>`;
|
|
562
|
-
} else if (style === "gallery") {
|
|
563
|
-
return html`<ds-icon type="gallery"></ds-icon>`;
|
|
564
|
-
}
|
|
565
|
-
return html`<span>${style}</span>`;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
423
|
/**
|
|
569
424
|
* A cycle without a stated look takes the one its type has always had: the
|
|
570
425
|
* language and theme cycles are grey chips, every other one, the accent
|
|
@@ -594,7 +449,6 @@ export class Cycle extends LitElement {
|
|
|
594
449
|
if (this.type === "language") return nativeLanguageName(value);
|
|
595
450
|
if (this.type === "theme") return translate(value === "light" ? "Light" : value === "dark" ? "Dark" : "System");
|
|
596
451
|
if (this.type === "accent-color") return translate(this.getColorKey(value));
|
|
597
|
-
if (this.type === "page-style" || this.type === "icon-only") return translate(value === "note" ? "Note" : "Page");
|
|
598
452
|
return value;
|
|
599
453
|
}
|
|
600
454
|
|
|
@@ -637,12 +491,7 @@ export class Cycle extends LitElement {
|
|
|
637
491
|
?disabled=${this.disabled || this._fieldsetDisabled}
|
|
638
492
|
@click=${this.handleButtonClick}
|
|
639
493
|
>
|
|
640
|
-
${this.type === "
|
|
641
|
-
? html`<span
|
|
642
|
-
style="display: inline-flex; align-items: center; gap: var(--025)"
|
|
643
|
-
>${this.getValueDisplay(this.currentValue)}</span
|
|
644
|
-
>`
|
|
645
|
-
: this.type === "language"
|
|
494
|
+
${this.type === "language"
|
|
646
495
|
? html`<ds-text
|
|
647
496
|
literal text=${this.getValueDisplay(this.currentValue)}
|
|
648
497
|
></ds-text>`
|
|
@@ -654,11 +503,7 @@ export class Cycle extends LitElement {
|
|
|
654
503
|
? html`<ds-text
|
|
655
504
|
text=${this.getColorKey(this.currentValue)}
|
|
656
505
|
></ds-text>`
|
|
657
|
-
:
|
|
658
|
-
? html`<ds-text
|
|
659
|
-
text=${this.currentValue === "note" ? "Note" : "Page"}
|
|
660
|
-
></ds-text>`
|
|
661
|
-
: html`<ds-text
|
|
506
|
+
: html`<ds-text
|
|
662
507
|
literal text=${this.getValueDisplay(this.currentValue)}
|
|
663
508
|
></ds-text>`}
|
|
664
509
|
</ds-button>
|
|
@@ -689,10 +534,6 @@ export class Cycle extends LitElement {
|
|
|
689
534
|
private handleAccentColorChanged() {
|
|
690
535
|
this.setupInitialValue();
|
|
691
536
|
}
|
|
692
|
-
|
|
693
|
-
private handleNoteBehaviorChanged() {
|
|
694
|
-
this.setupInitialValue();
|
|
695
|
-
}
|
|
696
537
|
}
|
|
697
538
|
|
|
698
539
|
define("ds-cycle", Cycle);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../5-visual-kit/device-bezel';
|