@jonmilner/ui 0.15.1 → 0.16.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/dist/Combobox/Combobox.css +1 -1
- package/dist/MultiSelect/MultiSelect.css +1 -1
- package/dist/Text/Text.css +1 -1
- package/dist/Text/Text.css.mjs +30 -30
- package/dist/Text/index.mjs +5 -4
- package/dist/docs/Text.md +8 -7
- package/dist/docs/llms.txt +1 -1
- package/dist/docs/manifest.json +1 -1
- package/dist/docs/migrations/0.16.0.md +57 -0
- package/package.json +4 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.combobox{.y6b2yi0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}.y6b2yi1{--_5qoq940:transparent;text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(.y6b2yi1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(.y6b2yi1) ._1gwwloa1{min-inline-size:0}:where(.y6b2yi1) ._1gwwloa2{text-transform:none;min-inline-size:0;font-weight:var(--font-weight-medium);flex:auto}.y6b2yi2{min-inline-size:0;display:block}.y6b2yi2[data-placeholder]{color:var(--color-fg-muted)}.y6b2yi3{min-inline-size:0;display:grid}.y6b2yi4{grid-area:1/1}.y6b2yi4[aria-hidden=true]{visibility:hidden}.y6b2yi5{grid-area:1/1}.y6b2yi6{border:var(--space-1) solid var(--color-border);min-inline-size:var(--anchor-width);max-block-size:var(--available-height);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter);gap:var(--space-4);flex-direction:column;display:flex;overflow:hidden}.y6b2yi6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi6[data-starting-style],.y6b2yi6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.y6b2yi7{appearance:none;border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);border-radius:var(--radius-med);background-color:var(--color-bg);inline-size:100%;min-inline-size:0;color:var(--color-fg);padding-block:0}.y6b2yi7::placeholder{color:var(--color-fg-muted);opacity:1}.y6b2yi7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi7:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;border-style:dashed}.y6b2yi7[aria-invalid=true]{border-color:var(--color-danger)}.y6b2yi8{block-size:var(--size-xs);padding-inline:var(--space-6)}.y6b2yi9{block-size:var(--size-sm);padding-inline:var(--space-8)}.y6b2yia{block-size:var(--size-med);padding-inline:var(--space-12)}.y6b2yib:empty{position:absolute}.y6b2yib:not(:empty){padding-block:var(--space-8);padding-inline:var(--space-12)}.y6b2yic{min-block-size:0;overflow-y:auto}.y6b2yid{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.y6b2yid:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}.y6b2yid[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}.y6b2yid[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}.y6b2yie{visibility:hidden;flex-shrink:0}.y6b2yid[aria-selected=true] .y6b2yie{visibility:visible}@media (pointer:coarse){.y6b2yi7{font-size:var(--font-size-med)}}@media (forced-colors:active){.y6b2yi1[aria-disabled=true]{border-color:graytext}.y6b2yi7:disabled{color:graytext;border-color:graytext}.y6b2yid[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}.y6b2yid[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}.y6b2yid[aria-disabled=true]{color:graytext}}}
|
|
2
|
+
@layer components.combobox{.y6b2yi0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}.y6b2yi1{--_5qoq940:transparent;text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(.y6b2yi1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(.y6b2yi1) ._1gwwloa1{min-inline-size:0}:where(.y6b2yi1) ._1gwwloa2{text-transform:none;min-inline-size:0;font-weight:var(--font-weight-medium);flex:auto}.y6b2yi2{min-inline-size:0;display:block}.y6b2yi2[data-placeholder]{color:var(--color-fg-muted)}.y6b2yi3{min-inline-size:0;display:grid}.y6b2yi4{grid-area:1/1}.y6b2yi4[aria-hidden=true]{visibility:hidden}.y6b2yi5{grid-area:1/1}.y6b2yi6{border:var(--space-1) solid var(--color-border);min-inline-size:var(--anchor-width);max-block-size:var(--available-height);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter);gap:var(--space-4);flex-direction:column;display:flex;overflow:hidden}.y6b2yi6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi6[data-starting-style],.y6b2yi6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.y6b2yi7{appearance:none;border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);border-radius:var(--radius-med);background-color:var(--color-bg);inline-size:100%;min-inline-size:0;color:var(--color-fg);padding-block:0}.y6b2yi7::placeholder{color:var(--color-fg-muted);opacity:1}.y6b2yi7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi7:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;border-style:dashed}.y6b2yi7[aria-invalid=true]{border-color:var(--color-danger)}.y6b2yi8{block-size:var(--size-xs);padding-inline:var(--space-6)}.y6b2yi9{block-size:var(--size-sm);padding-inline:var(--space-8)}.y6b2yia{block-size:var(--size-med);padding-inline:var(--space-12)}.y6b2yib:empty{position:absolute}.y6b2yib:not(:empty){padding-block:var(--space-8);padding-inline:var(--space-12)}.y6b2yic{min-block-size:0;overflow-y:auto}.y6b2yid{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.y6b2yid:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}.y6b2yid[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}.y6b2yid[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}.y6b2yie{visibility:hidden;flex-shrink:0}.y6b2yid[aria-selected=true] .y6b2yie{visibility:visible}@media (pointer:coarse){.y6b2yi7{font-size:var(--font-size-med)}}@media (forced-colors:active){.y6b2yi1[aria-disabled=true]{border-color:graytext}.y6b2yi7:disabled{color:graytext;border-color:graytext}.y6b2yid[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}.y6b2yid[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}.y6b2yid[aria-disabled=true]{color:graytext}}@supports (text-box:trim-both cap alphabetic){.y6b2yi4,.y6b2yi5{text-box-trim:trim-both}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.multiselect{._1seauxl0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._1seauxl1{--_5qoq940:transparent;text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(._1seauxl1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(._1seauxl1) ._1gwwloa1{min-inline-size:0}:where(._1seauxl1) ._1gwwloa2{text-transform:none;min-inline-size:0;font-weight:var(--font-weight-medium);flex:auto}._1seauxl2{min-inline-size:0;display:block}._1seauxl2[data-placeholder]{color:var(--color-fg-muted)}._1seauxl3{min-inline-size:0;display:grid}._1seauxl4{grid-area:1/1}._1seauxl4[aria-hidden=true]{visibility:hidden}._1seauxl5{grid-area:1/1}._1seauxl6{border:var(--space-1) solid var(--color-border);min-inline-size:var(--anchor-width);max-block-size:var(--available-height);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter);overflow-y:auto}._1seauxl6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1seauxl6[data-starting-style],._1seauxl6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}._1seauxl7{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}._1seauxl7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}._1seauxl7[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}._1seauxl7[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}._1seauxl8{visibility:hidden;flex-shrink:0}._1seauxl7[aria-selected=true] ._1seauxl8{visibility:visible}@media (forced-colors:active){._1seauxl1[aria-disabled=true]{border-color:graytext}._1seauxl7[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}._1seauxl7[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}._1seauxl7[aria-disabled=true]{color:graytext}}}
|
|
2
|
+
@layer components.multiselect{._1seauxl0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._1seauxl1{--_5qoq940:transparent;text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(._1seauxl1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(._1seauxl1) ._1gwwloa1{min-inline-size:0}:where(._1seauxl1) ._1gwwloa2{text-transform:none;min-inline-size:0;font-weight:var(--font-weight-medium);flex:auto}._1seauxl2{min-inline-size:0;display:block}._1seauxl2[data-placeholder]{color:var(--color-fg-muted)}._1seauxl3{min-inline-size:0;display:grid}._1seauxl4{grid-area:1/1}._1seauxl4[aria-hidden=true]{visibility:hidden}._1seauxl5{grid-area:1/1}._1seauxl6{border:var(--space-1) solid var(--color-border);min-inline-size:var(--anchor-width);max-block-size:var(--available-height);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter);overflow-y:auto}._1seauxl6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1seauxl6[data-starting-style],._1seauxl6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}._1seauxl7{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}._1seauxl7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}._1seauxl7[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}._1seauxl7[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}._1seauxl8{visibility:hidden;flex-shrink:0}._1seauxl7[aria-selected=true] ._1seauxl8{visibility:visible}@media (forced-colors:active){._1seauxl1[aria-disabled=true]{border-color:graytext}._1seauxl7[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}._1seauxl7[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}._1seauxl7[aria-disabled=true]{color:graytext}}@supports (text-box:trim-both cap alphabetic){._1seauxl4,._1seauxl5{text-box-trim:trim-both}}}
|
package/dist/Text/Text.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.text{._1mgdisq4{--_1mgdisq0:var(--line-height-med);--_1mgdisq3:var(--font-tracking-body);--_1mgdisq1:calc((var(--font-trim-body-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-body-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-body);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:var(--_1mgdisq0)}
|
|
2
|
+
@layer components.text{._1mgdisq4{--_1mgdisq0:var(--line-height-med);--_1mgdisq3:var(--font-tracking-body);--_1mgdisq1:calc((var(--font-trim-body-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-body-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-body);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:var(--_1mgdisq0)}:where(li)>._1mgdisq5{display:flow-root}:where(li:has(>._1mgdisq5))::marker{font-family:var(--font-body);line-height:0}:where(._1mgdisq4)>._1mgdisq4:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var){--_1mgdisq0:inherit;--_1mgdisq3:inherit;--_1mgdisq1:inherit;--_1mgdisq2:inherit;font-feature-settings:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;display:inline}._1mgdisq7{--_1mgdisq0:inherit;--_1mgdisq3:inherit;--_1mgdisq1:inherit;--_1mgdisq2:inherit;text-overflow:ellipsis;white-space:nowrap;font-feature-settings:inherit;min-block-size:0;min-inline-size:0;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;overflow-y:visible}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisq7{white-space:normal;text-overflow:clip}._1mgdisq8{--_1mgdisq3:var(--font-tracking-body);--_1mgdisq1:calc((var(--font-trim-body-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-body-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-body)}._1mgdisq9{--_1mgdisq3:var(--font-tracking-heading);--_1mgdisq1:calc((var(--font-trim-heading-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-heading-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-heading);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-heading)}._1mgdisqa{--_1mgdisq3:var(--font-tracking-display);--_1mgdisq1:calc((var(--font-trim-display-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-display-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-display);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-display)}._1mgdisqb{--_1mgdisq3:var(--font-tracking-label);--_1mgdisq1:calc((var(--font-trim-label-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-label-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-label);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-label)}._1mgdisqc{--_1mgdisq3:var(--font-tracking-mono);--_1mgdisq1:calc((var(--font-trim-mono-cap) - var(--_1mgdisq0) / 2) * 1em);--_1mgdisq2:calc((var(--font-trim-mono-baseline) - var(--_1mgdisq0) / 2) * 1em);font-family:var(--font-mono);letter-spacing:var(--_1mgdisq3);font-feature-settings:var(--font-features-mono)}._1mgdisqd{font-size:var(--font-size-xs)}._1mgdisqe{font-size:var(--font-size-sm)}._1mgdisqf{font-size:var(--font-size-med)}._1mgdisqg{font-size:var(--font-size-lg)}._1mgdisqh{font-size:var(--font-size-xl)}._1mgdisqi{font-size:var(--font-size-2xl)}._1mgdisqj{font-size:var(--font-size-3xl)}._1mgdisqk{font-size:var(--font-size-4xl)}._1mgdisql{font-weight:var(--font-weight-regular)}._1mgdisqm{font-weight:var(--font-weight-medium)}._1mgdisqn{font-weight:var(--font-weight-semibold)}._1mgdisqo{font-weight:var(--font-weight-bold)}._1mgdisqp{--_1mgdisq0:var(--line-height-sm);line-height:var(--_1mgdisq0)}._1mgdisqq{--_1mgdisq0:var(--line-height-meta);line-height:var(--_1mgdisq0)}._1mgdisqr{--_1mgdisq0:var(--line-height-body);line-height:var(--_1mgdisq0)}._1mgdisqs{--_1mgdisq0:var(--line-height-med);line-height:var(--_1mgdisq0)}._1mgdisqt{--_1mgdisq0:var(--line-height-lg);line-height:var(--_1mgdisq0)}._1mgdisqu{font-variant-numeric:tabular-nums}._1mgdisqv{white-space:nowrap}._1mgdisqw{white-space:pre-wrap;overflow-wrap:anywhere}._1mgdisqx{white-space:pre}._1mgdisqy{text-overflow:ellipsis;white-space:nowrap;min-block-size:0;min-inline-size:0;margin-block-start:var(--_1mgdisq1);margin-block-end:var(--_1mgdisq2);padding-block-start:calc(-1 * var(--_1mgdisq1));padding-block-end:calc(-1 * var(--_1mgdisq2))}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisqy{white-space:normal;text-overflow:clip}@supports (text-box:trim-both cap alphabetic){._1mgdisq4{text-box:trim-both cap alphabetic}._1mgdisq6{text-box:normal}._1mgdisq6:before{content:"";margin-block-end:var(--_1mgdisq1);display:table}._1mgdisq6:after{content:"";margin-block-start:var(--_1mgdisq2);display:table}:where(li)>._1mgdisq6:before,:where(li)>._1mgdisq6:after{display:block}:where(._1mgdisq4)>._1mgdisq4:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var){text-box-trim:none}:where(._1mgdisq4)>._1mgdisq4:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):before,:where(._1mgdisq4)>._1mgdisq4:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):after{content:none}._1mgdisq7{text-box-trim:none}}@supports not (text-box:trim-both cap alphabetic){._1mgdisq4:before{content:"";margin-block-end:var(--_1mgdisq1);display:table}._1mgdisq4:after{content:"";margin-block-start:var(--_1mgdisq2);display:table}:where(li)>._1mgdisq5:before,:where(li)>._1mgdisq5:after{display:block}:where(._1mgdisq4)>._1mgdisq4:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):before,:where(._1mgdisq4)>._1mgdisq4:where(a,abbr,b,bdi,bdo,cite,code,data,del,dfn,em,i,ins,kbd,label,mark,output,q,s,samp,small,span,strong,sub,sup,time,u,var):after,._1mgdisq7:before,._1mgdisq7:after{content:none}}}
|
package/dist/Text/Text.css.mjs
CHANGED
|
@@ -3,35 +3,35 @@ import "./Text.css";
|
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
// src/Text/Text.css.ts
|
|
6
|
-
var e = "_1mgdisq4", t = "_1mgdisq5", n = "_1mgdisq6", r = {
|
|
7
|
-
body: "
|
|
8
|
-
heading: "
|
|
9
|
-
display: "
|
|
10
|
-
label: "
|
|
11
|
-
mono: "
|
|
12
|
-
}, i = {
|
|
13
|
-
xs: "_1mgdisqc",
|
|
14
|
-
sm: "_1mgdisqd",
|
|
15
|
-
med: "_1mgdisqe",
|
|
16
|
-
lg: "_1mgdisqf",
|
|
17
|
-
xl: "_1mgdisqg",
|
|
18
|
-
"2xl": "_1mgdisqh",
|
|
19
|
-
"3xl": "_1mgdisqi",
|
|
20
|
-
"4xl": "_1mgdisqj"
|
|
6
|
+
var e = "_1mgdisq4", t = "_1mgdisq5", n = "_1mgdisq6", r = "_1mgdisq7", i = {
|
|
7
|
+
body: "_1mgdisq8",
|
|
8
|
+
heading: "_1mgdisq9",
|
|
9
|
+
display: "_1mgdisqa",
|
|
10
|
+
label: "_1mgdisqb",
|
|
11
|
+
mono: "_1mgdisqc"
|
|
21
12
|
}, a = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
xs: "_1mgdisqd",
|
|
14
|
+
sm: "_1mgdisqe",
|
|
15
|
+
med: "_1mgdisqf",
|
|
16
|
+
lg: "_1mgdisqg",
|
|
17
|
+
xl: "_1mgdisqh",
|
|
18
|
+
"2xl": "_1mgdisqi",
|
|
19
|
+
"3xl": "_1mgdisqj",
|
|
20
|
+
"4xl": "_1mgdisqk"
|
|
26
21
|
}, o = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
regular: "_1mgdisql",
|
|
23
|
+
medium: "_1mgdisqm",
|
|
24
|
+
semibold: "_1mgdisqn",
|
|
25
|
+
bold: "_1mgdisqo"
|
|
26
|
+
}, s = {
|
|
27
|
+
sm: "_1mgdisqp",
|
|
28
|
+
meta: "_1mgdisqq",
|
|
29
|
+
body: "_1mgdisqr",
|
|
30
|
+
med: "_1mgdisqs",
|
|
31
|
+
lg: "_1mgdisqt"
|
|
32
|
+
}, c = "_1mgdisqu", l = {
|
|
33
|
+
nowrap: "_1mgdisqv",
|
|
34
|
+
"pre-wrap": "_1mgdisqw",
|
|
35
|
+
pre: "_1mgdisqx"
|
|
36
|
+
}, u = "_1mgdisqy";
|
|
37
|
+
export { t as block, i as font, s as leading, e as root, n as scrollContainer, a as size, c as tabularNums, u as truncate, r as truncateBox, o as weight, l as wrap };
|
package/dist/Text/index.mjs
CHANGED
|
@@ -3,18 +3,19 @@ import { Box as t } from "../Box/base.mjs";
|
|
|
3
3
|
import { font as n, leading as r, root as i, size as a, weight as o, wrap as s } from "./Text.css.mjs";
|
|
4
4
|
import { jsx as c } from "react/jsx-runtime";
|
|
5
5
|
// src/Text/index.tsx
|
|
6
|
-
function l({ as: l, size: u, font: d, weight: f, leading: p, tabularNums: m, truncate: h, wrap: g, display: _ = "block", overflow: v = h ? "
|
|
6
|
+
function l({ as: l, size: u, font: d, weight: f, leading: p, tabularNums: m, truncate: h, wrap: g, display: _ = "block", overflow: v = h ? "clip" : void 0, className: y, ...b }) {
|
|
7
7
|
let x = [
|
|
8
8
|
i,
|
|
9
9
|
_ === "block" && "_1mgdisq5",
|
|
10
|
-
h === "box" && "
|
|
10
|
+
h === "box" && "_1mgdisq7",
|
|
11
|
+
h !== "box" && (v === "hidden" || v === "auto") && "_1mgdisq6",
|
|
11
12
|
d && n[d],
|
|
12
13
|
u && a[u],
|
|
13
14
|
f && o[f],
|
|
14
15
|
p && r[p],
|
|
15
|
-
m && "
|
|
16
|
+
m && "_1mgdisqu",
|
|
16
17
|
g && !h && s[g],
|
|
17
|
-
h === !0 && "
|
|
18
|
+
h === !0 && "_1mgdisqy",
|
|
18
19
|
y
|
|
19
20
|
];
|
|
20
21
|
return /* @__PURE__ */ c(t, {
|
package/dist/docs/Text.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
The base of all visible text, and the primitive every text component builds on.
|
|
5
|
+
The base of all visible text, and the primitive every text component builds on. Its box is trimmed to the cap height and the baseline, so the gap around text is the visible space and text sits centred in a padded control. It takes every Box style prop (`color`, `textAlign`, margins), plus `size`, `font`, `weight`, `leading`, `truncate` and `wrap`.
|
|
6
6
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@ The base of all visible text, and the primitive every text component builds on.
|
|
|
20
20
|
- `as` defaults to `p`, so a run inside a paragraph must set an inline element: `as="span"`, `"strong"`, `"em"`, `"code"`, `"time"`. A `p` inside a `p` is invalid HTML and breaks hydration.
|
|
21
21
|
- A run inherits the outer weight, so `<Text as="strong">` is not bold until it sets `weight="bold"` (or `semibold`).
|
|
22
22
|
- A run is inline whatever its `display` prop, and `truncate` gives it no ellipsis; truncate a block Text instead.
|
|
23
|
-
- `display="flex"` or `"grid"
|
|
23
|
+
- Do not set `display="flex"` or `"grid"`: natively the box is not trimmed, and on the fallback the trim pseudo-elements become flex or grid items that `gap` spaces. Wrap the text in a Box for layout instead. A block element (`p`, `div`, `h2`) or a Text inside a `Box` inside a Text keeps its own trimmed box.
|
|
24
24
|
- `size` takes a `fontSize` step: `xs`, `sm`, `med`, `lg`, `xl`, `2xl`, `3xl`, `4xl`. The top-level default is `med`.
|
|
25
25
|
- `font` takes a font role: `body` (default), `heading`, `display`, `label`, `mono`. The brand maps roles to fonts.
|
|
26
26
|
- `weight` takes `regular` (default), `medium`, `semibold` or `bold`.
|
|
@@ -28,16 +28,17 @@ The base of all visible text, and the primitive every text component builds on.
|
|
|
28
28
|
- `font` also sets the brand's tracking and font features for the role (the `default` brand tightens Inter by `-0.006em` and turns on `cv11` and `ss03`); a run inherits the outer Text's.
|
|
29
29
|
- `tabularNums` gives every digit the same width, so figures in a column or a ticking count line up: amounts, durations, counts in a table. Prose numbers keep the font's own figures.
|
|
30
30
|
- `color` takes a color role (`fg`, `fgMuted`, `accent`, …), never a raw color. Unset, it inherits.
|
|
31
|
-
- `truncate` keeps one line and cuts it with an ellipsis, without clipping ascenders or descenders. It sets the block margins, so do not combine it with margin props.
|
|
32
|
-
- `truncate="box"` cuts a part of another Text's line (a field's summary inside a button's label) at its own box: untrimmed, in the outer Text's font until its own props say otherwise. Use it only inside another Text, below a Box or element that is not a Text run.
|
|
31
|
+
- `truncate` keeps one line and cuts it with an ellipsis, without clipping ascenders or descenders. It clips with `overflow: clip` and a zero minimum size, so it shrinks in a flex or grid row; that minimum beats a `minInlineSize` or `minBlockSize` prop, so put a minimum on a wrapping Box. It sets the block margins, so do not combine it with margin props.
|
|
32
|
+
- `truncate="box"` cuts a part of another Text's line (a field's summary inside a button's label) at its own box: untrimmed, in the outer Text's font until its own props say otherwise. Use it only inside another Text, below a Box or element that is not a Text run. A block one is a line of the outer Text like any other, so the outer trim cuts it where it is the first or last line; it clips only across, so no glyph is cut. Put it directly in the outer Text or in a block, not in an inline element (Safari trims a block inside an inline wrongly) nor a grid or flex item (where `text-box` is supported, the outer trim does not reach one, so its line stays untrimmed).
|
|
33
33
|
- `wrap="nowrap"` keeps the text on one line, uncut: a short label that must never break. A long string overflows its box, so cap it with `truncate` instead.
|
|
34
34
|
- `wrap="pre-wrap"` keeps newlines and runs of spaces and wraps, breaking a long unbroken string (a path, a URL, a hash) anywhere so it stays in its box: logs, commit messages, user-entered text.
|
|
35
|
-
- `wrap="pre"` keeps newlines and runs of spaces on unwrapped lines, so a long line overflows its box: aligned output whose columns must not reflow.
|
|
35
|
+
- `wrap="pre"` keeps newlines and runs of spaces on unwrapped lines, so a long line overflows its box: aligned output whose columns must not reflow. Where the box cannot grow, use `pre-wrap`.
|
|
36
36
|
- `truncate` wins over `wrap`: a Text with both keeps one line, collapses whitespace and ignores `wrap`.
|
|
37
37
|
- Plain wrapped text with a long unbroken string and no whitespace to keep has no `wrap` value; its component sets `overflow-wrap` in its own styles.
|
|
38
38
|
- A list item's text is a Text directly inside the `li`: `<li><Text>…</Text></li>`. At its default `display`, that Text keeps the marker on its first line at the trimmed height; with another `display` it does not. Do not render the Text as the `li` itself. Trimmed items touch, so space them with the list's `gap`: `<Stack as="ul" gap="8">`. The marker takes the body font, whatever the `li` or the Text's `font` sets; to change it, style `li::marker`.
|
|
39
|
-
- The trim
|
|
40
|
-
-
|
|
39
|
+
- The trim has two paths (ADR 0160). Where the browser supports `text-box: trim-both cap alphabetic`, Text uses it, exact at the engine's own glyph positions. Elsewhere capsize trims with two pseudo-elements from the brand's font metrics, which can sit up to 0.8px off centre. Both give the same box height, so layout does not change between them.
|
|
40
|
+
- Do not style `::before` or `::after` on a Text: the fallback path uses them.
|
|
41
|
+
- To clip a Text, use `truncate` or `overflow="clip"`. At `overflow="hidden"` or `"auto"` it is a scroll container, which Firefox does not trim natively, so Text trims it with the pseudo-elements on both paths; set those through the `overflow` prop, never a class or `style`.
|
|
41
42
|
|
|
42
43
|
## Do
|
|
43
44
|
|
package/dist/docs/llms.txt
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
- [Table](Table.md): Records in rows that share named columns, so a reader can scan and compare them: transactions, members, invoices. A native `table` with parts for each element (`Table.Head`, `Table.Body`, `Table.Foot`, `Table.Row`, `Table.HeaderCell`, `Table.Cell`, `Table.ColumnGroup`, `Table.Column`), and `Table.ScrollArea` for a table wider than its container. It has no `grid` role and no roving focus: a link, `Checkbox` or `Menu` in a cell keeps the page's tab order, and a screen reader's table commands work as on any table.
|
|
41
41
|
- [Tabs](Tabs.md): Switches between views that share one place on the page. The parts are `Tabs` (the root, a flex column; a row when vertical), `Tabs.List` (the `tablist`), `Tabs.Tab` (a `tab` button on `Clickable`) and `Tabs.Panel` (the `tabpanel`). Built on Base UI `Tabs` (ADR 0003, 0046): it owns the selection, one tab stop with arrow-key roving, `aria-selected`, and the ids that tie each tab to its panel. The selected tab shows an accent bar that fades and grows in (ADR 0049).
|
|
42
42
|
- [Tag](Tag.md): A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `lg` radius (half a one-line tag's height, so one line reads as a pill and wrapped lines stay inside the fill) around a `Text` in the `label` font. It can be read-only, a link, or removable.
|
|
43
|
-
- [Text](Text.md): The base of all visible text, and the primitive every text component builds on.
|
|
43
|
+
- [Text](Text.md): The base of all visible text, and the primitive every text component builds on. Its box is trimmed to the cap height and the baseline, so the gap around text is the visible space and text sits centred in a padded control. It takes every Box style prop (`color`, `textAlign`, margins), plus `size`, `font`, `weight`, `leading`, `truncate` and `wrap`.
|
|
44
44
|
- [TextField](TextField.md): A form field for one line of text that is not a search: an `<input>` (role `textbox`) with SearchField's look and no icon or button over it. `type` picks `text`, `email`, `url` or `tel`. Built on Base UI's `Input` (ADR 0003); it composes `Field` for its label, description and error (ADR 0026, 0110). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124).
|
|
45
45
|
- [Textarea](Textarea.md): A form field for several lines of free text: a `<textarea>` (role `textbox`, multi-line) with TextField's look. Built on Base UI's `Input` rendered as a textarea (ADR 0003); it composes `Field` for its label, description and error (ADR 0026, 0136). `rows` sets its starting height, three by default, and the user can drag it taller or shorter. Three sizes (`sm`, `med`, `lg`) set TextField's text size and padding, so the first line sits where a TextField's text does (ADR 0124).
|
|
46
46
|
- [Toast](Toast.md): Tells the user briefly about the result of an action without interrupting them: "Changes saved", "Message sent", "Couldn't upload the file". Material calls it a snackbar and Atlassian a flag. Built on Base UI's Toast, which owns the queue, the timers and swipe-to-dismiss. The parts add the look: a raised card in a stack at the bottom end corner, an icon per variant, a close button, and a slide-up-and-fade that is a plain fade under reduced motion. A toast never takes focus and moves nothing on the page.
|
package/dist/docs/manifest.json
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# 0.16.0
|
|
2
|
+
|
|
3
|
+
Text now trims with native `text-box: trim-both cap alphabetic` where the browser supports it and with capsize's `::before`/`::after` only where it does not (decision 0160), so labels sit exactly centred; `truncate` clips with `overflow: clip` instead of `hidden`. Most apps change nothing. The trim no longer reaches a flex or grid Text natively, a Text's pseudo-elements exist only on the fallback, and a Text placed inside an inline element mis-trims in WebKit.
|
|
4
|
+
|
|
5
|
+
## Find
|
|
6
|
+
|
|
7
|
+
In the app's source (`*.tsx`):
|
|
8
|
+
|
|
9
|
+
- A Text laid out as a flex or grid container: regex `<(Text|Heading)\b[^>]*display=["{]["']?(inline-)?(flex|grid)`.
|
|
10
|
+
- A Text given a clipping overflow through a class or `style` instead of the `overflow` prop: regex `<(Text|Heading)\b[^>]*style=\{\{[^}]*overflow`.
|
|
11
|
+
- A truncating Text given a minimum size, which its own zero minimum now overrides: regex `<(Text|Heading)\b[^>]*\btruncate\b[^>]*min(Inline|Block)Size` and `<(Text|Heading)\b[^>]*min(Inline|Block)Size[^>]*\btruncate\b`.
|
|
12
|
+
|
|
13
|
+
In the app's styles (`*.css`, `*.css.ts`):
|
|
14
|
+
|
|
15
|
+
- Rules on a Text's pseudo-elements or its trim: regex `::?(before|after)|text-box`, kept where the selector targets a Text or Heading.
|
|
16
|
+
|
|
17
|
+
## Replace
|
|
18
|
+
|
|
19
|
+
Move a flex or grid layout off the Text onto a Box around it:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
// before
|
|
23
|
+
<Text display="flex" gap="1">
|
|
24
|
+
<CheckIcon /> Saved
|
|
25
|
+
</Text>
|
|
26
|
+
// after
|
|
27
|
+
<Box display="flex" gap="1">
|
|
28
|
+
<CheckIcon />
|
|
29
|
+
<Text>Saved</Text>
|
|
30
|
+
</Box>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Pass a clipping or scrolling overflow as the prop, which keeps the trim in every engine:
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
// before
|
|
37
|
+
<Text style={{ overflow: "hidden" }}>{summary}</Text>
|
|
38
|
+
// after
|
|
39
|
+
<Text overflow="hidden">{summary}</Text>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Move a truncating Text's minimum size onto a Box around it:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
// before
|
|
46
|
+
<Text minInlineSize="xs" truncate>{name}</Text>
|
|
47
|
+
// after
|
|
48
|
+
<Box minInlineSize="xs">
|
|
49
|
+
<Text truncate>{name}</Text>
|
|
50
|
+
</Box>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Delete styles on a Text's `::before` or `::after`, and any `text-box` override on a Text; put decoration on a wrapping Box instead.
|
|
54
|
+
|
|
55
|
+
## Verify
|
|
56
|
+
|
|
57
|
+
The Find regexes match nothing. Then update the app's visual baselines: text moves by under a pixel inside padded controls (up to 0.8px in Chromium), and box heights stay the same.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jonmilner/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"bin": {
|
|
5
5
|
"ui-doctor": "./dist/cli/ui-doctor.mjs"
|
|
6
6
|
},
|
|
@@ -191,6 +191,8 @@
|
|
|
191
191
|
"@base-ui/react": "1.9.0",
|
|
192
192
|
"@capsizecss/core": "4.1.3",
|
|
193
193
|
"@capsizecss/metrics": "4.4.0",
|
|
194
|
+
"@fontsource/inter": "5.3.0",
|
|
195
|
+
"@fontsource/jetbrains-mono": "5.3.0",
|
|
194
196
|
"@size-limit/file": "14.3.0",
|
|
195
197
|
"@types/react": "19.3.0",
|
|
196
198
|
"@types/react-dom": "19.3.0",
|
|
@@ -217,7 +219,7 @@
|
|
|
217
219
|
"icons:sync": "node scripts/icons.ts sync",
|
|
218
220
|
"lint": "vp lint",
|
|
219
221
|
"typecheck": "tsc -p tsconfig.json",
|
|
220
|
-
"test": "playwright install --only-shell chromium && vp test run",
|
|
222
|
+
"test": "playwright install --only-shell chromium firefox webkit && vp test run",
|
|
221
223
|
"metrics": "node scripts/import-styles.ts",
|
|
222
224
|
"metrics:atoms": "node scripts/atoms-usage.ts",
|
|
223
225
|
"size": "size-limit",
|