@jonmilner/ui 0.25.1 → 0.25.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -1
  2. package/dist/Alert/Alert.css +1 -1
  3. package/dist/Avatar/Avatar.css +1 -1
  4. package/dist/Badge/Badge.css +1 -1
  5. package/dist/Box/Box.css +1 -1
  6. package/dist/Button/Button.css +1 -1
  7. package/dist/Checkbox/Checkbox.css +1 -1
  8. package/dist/Chip/Chip.css +1 -1
  9. package/dist/Clickable/Clickable.css +1 -1
  10. package/dist/ClickableBox/ClickableBox.css +1 -1
  11. package/dist/Code/Code.css +1 -1
  12. package/dist/ColorField/ColorField.css +1 -1
  13. package/dist/Combobox/Combobox.css +1 -1
  14. package/dist/Dialog/Dialog.css +1 -1
  15. package/dist/Dialog/client.d.mts +1 -1
  16. package/dist/Dialog/client.mjs +32 -51
  17. package/dist/Drawer/Drawer.css +2 -0
  18. package/dist/Drawer/Drawer.css.mjs +7 -0
  19. package/dist/Drawer/client.d.mts +12 -0
  20. package/dist/Drawer/client.mjs +96 -0
  21. package/dist/Drawer/index.d.mts +27 -0
  22. package/dist/Drawer/index.mjs +118 -0
  23. package/dist/Field/Field.css +1 -1
  24. package/dist/Heading/Heading.css +1 -1
  25. package/dist/Icon/Icon.css +1 -1
  26. package/dist/IconButton/IconButton.css +1 -1
  27. package/dist/Inline/Inline.css +1 -1
  28. package/dist/Link/Link.css +1 -1
  29. package/dist/Markdown/Markdown.css +1 -1
  30. package/dist/Markdown/index.d.mts +10 -1
  31. package/dist/Markdown/index.mjs +100 -85
  32. package/dist/Menu/Menu.css +1 -1
  33. package/dist/MultiSelect/MultiSelect.css +1 -1
  34. package/dist/NavList/NavList.css +1 -1
  35. package/dist/NumberField/NumberField.css +1 -1
  36. package/dist/Popover/Popover.css +1 -1
  37. package/dist/RadioGroup/RadioGroup.css +1 -1
  38. package/dist/SearchField/SearchField.css +1 -1
  39. package/dist/Select/Select.css +1 -1
  40. package/dist/Sidebar/Sidebar.css +1 -1
  41. package/dist/SidebarLayout/SidebarLayout.css +1 -1
  42. package/dist/Stack/Stack.css +1 -1
  43. package/dist/Switch/Switch.css +1 -1
  44. package/dist/TabBar/TabBar.css +2 -0
  45. package/dist/TabBar/TabBar.css.mjs +7 -0
  46. package/dist/TabBar/index.d.mts +25 -0
  47. package/dist/TabBar/index.mjs +61 -0
  48. package/dist/Table/Table.css +1 -1
  49. package/dist/Tabs/Tabs.css +1 -1
  50. package/dist/Tag/Tag.css +1 -1
  51. package/dist/Text/Text.css +2 -2
  52. package/dist/Text/Text.css.mjs +2 -0
  53. package/dist/TextField/TextField.css +1 -1
  54. package/dist/Textarea/Textarea.css +1 -1
  55. package/dist/Toast/Toast.css +1 -1
  56. package/dist/Tooltip/Tooltip.css +1 -1
  57. package/dist/VisuallyHidden/VisuallyHidden.css +1 -1
  58. package/dist/base.css +1 -1
  59. package/dist/docs/Dialog.md +2 -0
  60. package/dist/docs/Drawer.md +156 -0
  61. package/dist/docs/Markdown.md +21 -1
  62. package/dist/docs/NavList.md +1 -0
  63. package/dist/docs/Sidebar.md +1 -0
  64. package/dist/docs/TabBar.md +135 -0
  65. package/dist/docs/Tabs.md +1 -1
  66. package/dist/docs/Text.md +28 -0
  67. package/dist/docs/llms.txt +2 -0
  68. package/dist/docs/manifest.json +256 -1
  69. package/dist/index.d.mts +6 -3
  70. package/dist/index.mjs +37 -35
  71. package/dist/popup/client.mjs +1 -1
  72. package/dist/popup/modal-frame.d.mts +3 -0
  73. package/dist/popup/modal-frame.mjs +30 -0
  74. package/dist/styles/atoms.css +1 -1
  75. package/dist/styles/layers.css +1 -1
  76. package/dist/styles/responsive.css +1 -1
  77. package/dist/styles/scroll-region.css +1 -1
  78. package/dist/styles/status-message.css +1 -1
  79. package/package.json +11 -3
@@ -1,2 +1,2 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
- @layer components.text{._1mgdisq1{--_1nsw9rp0:var(--line-height-med);--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:var(--_1nsw9rp0)}:where(li)>._1mgdisq2{display:flow-root}:where(li:has(>._1mgdisq2))::marker{font-family:var(--font-body);line-height:0}:where(._1mgdisq1)>._1mgdisq1: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){--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2:inherit;font-feature-settings:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;display:inline}._1mgdisq4{--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2: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) ._1mgdisq4{white-space:normal;text-overflow:clip}._1mgdisq5{--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body)}._1mgdisq6{--_1mgdisq0:var(--font-tracking-heading);--_1nsw9rp1:calc((var(--font-trim-heading-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-heading-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-heading);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-heading)}._1mgdisq7{--_1mgdisq0:var(--font-tracking-display);--_1nsw9rp1:calc((var(--font-trim-display-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-display-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-display);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-display)}._1mgdisq8{--_1mgdisq0:var(--font-tracking-label);--_1nsw9rp1:calc((var(--font-trim-label-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-label-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-label);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-label)}._1mgdisq9{--_1mgdisq0:var(--font-tracking-mono);--_1nsw9rp1:calc((var(--font-trim-mono-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-mono-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-mono);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-mono)}._1mgdisqa{font-size:var(--font-size-xs)}._1mgdisqb{font-size:var(--font-size-sm)}._1mgdisqc{font-size:var(--font-size-med)}._1mgdisqd{font-size:var(--font-size-lg)}._1mgdisqe{font-size:var(--font-size-xl)}._1mgdisqf{font-size:var(--font-size-2xl)}._1mgdisqg{font-size:var(--font-size-3xl)}._1mgdisqh{font-size:var(--font-size-4xl)}._1mgdisqi{font-weight:var(--font-weight-regular)}._1mgdisqj{font-weight:var(--font-weight-medium)}._1mgdisqk{font-weight:var(--font-weight-semibold)}._1mgdisql{font-weight:var(--font-weight-bold)}._1mgdisqm{--_1nsw9rp0:var(--line-height-sm);line-height:var(--_1nsw9rp0)}._1mgdisqn{--_1nsw9rp0:var(--line-height-meta);line-height:var(--_1nsw9rp0)}._1mgdisqo{--_1nsw9rp0:var(--line-height-body);line-height:var(--_1nsw9rp0)}._1mgdisqp{--_1nsw9rp0:var(--line-height-med);line-height:var(--_1nsw9rp0)}._1mgdisqq{--_1nsw9rp0:var(--line-height-lg);line-height:var(--_1nsw9rp0)}._1mgdisqr{font-variant-numeric:tabular-nums}._1mgdisqs{white-space:nowrap}._1mgdisqt{white-space:pre-wrap;overflow-wrap:anywhere}._1mgdisqu{white-space:pre}._1mgdisqv{text-overflow:ellipsis;white-space:nowrap;min-block-size:0;min-inline-size:0;margin-block-start:var(--_1nsw9rp1);margin-block-end:var(--_1nsw9rp2);padding-block-start:calc(-1 * var(--_1nsw9rp1));padding-block-end:calc(-1 * var(--_1nsw9rp2))}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisqv{white-space:normal;text-overflow:clip}@supports (text-box:trim-both cap alphabetic){._1mgdisq1{text-box:trim-both cap alphabetic}._1mgdisq3{text-box:normal}._1mgdisq3:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq3:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}:where(li)>._1mgdisq3:before,:where(li)>._1mgdisq3:after{display:block}:where(._1mgdisq1)>._1mgdisq1: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(._1mgdisq1)>._1mgdisq1: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(._1mgdisq1)>._1mgdisq1: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}._1mgdisq4{text-box-trim:none}}@supports not (text-box:trim-both cap alphabetic){._1mgdisq1:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq1:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}:where(li)>._1mgdisq2:before,:where(li)>._1mgdisq2:after{display:block}:where(._1mgdisq1)>._1mgdisq1: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(._1mgdisq1)>._1mgdisq1: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,._1mgdisq4:before,._1mgdisq4:after{content:none}}}
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
+ @layer components.text{._1mgdisq1{--_1nsw9rp0:var(--line-height-med);--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body);font-size:var(--font-size-med);font-weight:var(--font-weight-regular);line-height:var(--_1nsw9rp0)}:where(li)>._1mgdisq2{display:flow-root}:where(li:has(>._1mgdisq2))::marker{font-family:var(--font-body);line-height:0}:where(._1mgdisq1)>._1mgdisq1: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){--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2:inherit;font-feature-settings:inherit;font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;display:inline}._1mgdisq4{--_1nsw9rp0:inherit;--_1mgdisq0:inherit;--_1nsw9rp1:inherit;--_1nsw9rp2: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) ._1mgdisq4{white-space:normal;text-overflow:clip}._1mgdisq5{--_1mgdisq0:var(--font-tracking-body);--_1nsw9rp1:calc((var(--font-trim-body-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-body-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-body);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-body)}._1mgdisq6{--_1mgdisq0:var(--font-tracking-heading);--_1nsw9rp1:calc((var(--font-trim-heading-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-heading-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-heading);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-heading)}._1mgdisq7{--_1mgdisq0:var(--font-tracking-display);--_1nsw9rp1:calc((var(--font-trim-display-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-display-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-display);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-display)}._1mgdisq8{--_1mgdisq0:var(--font-tracking-label);--_1nsw9rp1:calc((var(--font-trim-label-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-label-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-label);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-label)}._1mgdisq9{--_1mgdisq0:var(--font-tracking-mono);--_1nsw9rp1:calc((var(--font-trim-mono-cap) - var(--_1nsw9rp0) / 2) * 1em);--_1nsw9rp2:calc((var(--font-trim-mono-baseline) - var(--_1nsw9rp0) / 2) * 1em);font-family:var(--font-mono);letter-spacing:var(--_1mgdisq0);font-feature-settings:var(--font-features-mono)}._1mgdisqa{font-size:var(--font-size-xs)}._1mgdisqb{font-size:var(--font-size-sm)}._1mgdisqc{font-size:var(--font-size-med)}._1mgdisqd{font-size:var(--font-size-lg)}._1mgdisqe{font-size:var(--font-size-xl)}._1mgdisqf{font-size:var(--font-size-2xl)}._1mgdisqg{font-size:var(--font-size-3xl)}._1mgdisqh{font-size:var(--font-size-4xl)}._1mgdisqi{font-weight:var(--font-weight-regular)}._1mgdisqj{font-weight:var(--font-weight-medium)}._1mgdisqk{font-weight:var(--font-weight-semibold)}._1mgdisql{font-weight:var(--font-weight-bold)}._1mgdisqm{--_1nsw9rp0:var(--line-height-sm);line-height:var(--_1nsw9rp0)}._1mgdisqn{--_1nsw9rp0:var(--line-height-meta);line-height:var(--_1nsw9rp0)}._1mgdisqo{--_1nsw9rp0:var(--line-height-body);line-height:var(--_1nsw9rp0)}._1mgdisqp{--_1nsw9rp0:var(--line-height-med);line-height:var(--_1nsw9rp0)}._1mgdisqq{--_1nsw9rp0:var(--line-height-lg);line-height:var(--_1nsw9rp0)}._1mgdisqr{font-variant-numeric:tabular-nums}._1mgdisqs{white-space:nowrap}._1mgdisqt{white-space:pre-wrap;overflow-wrap:anywhere}._1mgdisqu{white-space:pre}._1mgdisqv{text-overflow:ellipsis;white-space:nowrap;min-block-size:0;min-inline-size:0;margin-block-start:var(--_1nsw9rp1);margin-block-end:var(--_1nsw9rp2);padding-block-start:calc(-1 * var(--_1nsw9rp1));padding-block-end:calc(-1 * var(--_1nsw9rp2))}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1mgdisqv{white-space:normal;text-overflow:clip}@supports (text-box:trim-both cap alphabetic){._1mgdisq1{text-box:trim-both cap alphabetic}._1mgdisq3{text-box:normal}._1mgdisq3:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq3:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}:where(li)>._1mgdisq3:before,:where(li)>._1mgdisq3:after{display:block}:where(._1mgdisq1)>._1mgdisq1: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(._1mgdisq1)>._1mgdisq1: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(._1mgdisq1)>._1mgdisq1: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}._1mgdisq4{text-box-trim:none}}@supports not (text-box:trim-both cap alphabetic){._1mgdisq1:before{content:"";margin-block-end:var(--_1nsw9rp1);display:table}._1mgdisq1:after{content:"";margin-block-start:var(--_1nsw9rp2);display:table}._1mgdisq1:where(:has(>._1dkxmm01:is(._1dkxmm014c,._1dkxmm014e):not(._1mgdisq1):first-child)):before,._1mgdisq1:where(:has(>._1dkxmm01:is(._1dkxmm014c,._1dkxmm014e):not(._1mgdisq1):last-child)):after{content:none}:where(li)>._1mgdisq2:before,:where(li)>._1mgdisq2:after{display:block}:where(._1mgdisq1)>._1mgdisq1: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(._1mgdisq1)>._1mgdisq1: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,._1mgdisq4:before,._1mgdisq4:after{content:none}}}
@@ -1,6 +1,8 @@
1
1
  import "../styles/layers.css";
2
+ import "../styles/atoms.css";
2
3
  import "./Text.css";
3
4
  /* empty css */
5
+ /* empty css */
4
6
  /* empty css */
5
7
  // src/Text/Text.css.ts
6
8
  var e = "_1mgdisq1", t = "_1mgdisq2", n = "_1mgdisq3", r = "_1mgdisq4", i = {
@@ -1,2 +1,2 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
2
  @layer components.text-field{._20at410{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._20at411{appearance:none;inline-size:100%;min-inline-size:0;color:var(--color-fg);border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);background-color:var(--color-bg);grid-area:1/1;padding-block:0}._20at411::placeholder{color:var(--color-fg-muted);opacity:1}._20at411:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._20at411:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;border-style:dashed}._20at411[aria-invalid=true]{border-color:var(--color-danger)}._20at411[aria-invalid=true]:not(:focus-visible){outline:var(--space-1) solid var(--color-danger);outline-offset:calc(-1 * var(--space-2))}._20at412{block-size:var(--size-xs);padding-inline:var(--space-6)}._20at413{block-size:var(--size-sm);padding-inline:var(--space-8)}._20at414{block-size:var(--size-med);padding-inline:var(--space-12)}._20at415{font-family:var(--font-body);font-size:var(--font-size-xs);color:var(--color-fg-muted);pointer-events:none;grid-area:1/1;place-self:center start;padding-inline-start:var(--space-6);line-height:normal}._20at416{font-family:var(--font-body);font-size:var(--font-size-sm);color:var(--color-fg-muted);pointer-events:none;grid-area:1/1;place-self:center start;padding-inline-start:var(--space-8);line-height:normal}._20at417{font-family:var(--font-body);font-size:var(--font-size-med);color:var(--color-fg-muted);pointer-events:none;grid-area:1/1;place-self:center start;padding-inline-start:var(--space-12);line-height:normal}._20at418{font-family:var(--font-body);font-size:var(--font-size-xs);color:var(--color-fg-muted);pointer-events:none;grid-area:1/1;place-self:center end;padding-inline-end:var(--space-6);line-height:normal}._20at419{font-family:var(--font-body);font-size:var(--font-size-sm);color:var(--color-fg-muted);pointer-events:none;grid-area:1/1;place-self:center end;padding-inline-end:var(--space-8);line-height:normal}._20at41a{font-family:var(--font-body);font-size:var(--font-size-med);color:var(--color-fg-muted);pointer-events:none;grid-area:1/1;place-self:center end;padding-inline-end:var(--space-12);line-height:normal}._20at41b{vertical-align:calc((1cap - var(--font-size-xs)) / 2);display:inline-block}._20at41c{vertical-align:calc((1cap - var(--font-size-sm)) / 2);display:inline-block}._20at41d{vertical-align:calc((1cap - var(--font-size-med)) / 2);display:inline-block}._20at41e{padding-inline-start:calc(var(--space-6) + var(--font-size-xs) + var(--space-4))}._20at41f{padding-inline-start:calc(var(--space-8) + var(--font-size-sm) + var(--space-4))}._20at41g{padding-inline-start:calc(var(--space-12) + var(--font-size-med) + var(--space-8))}._20at41h{padding-inline-end:calc(var(--space-6) + var(--font-size-xs) + var(--space-4))}._20at41i{padding-inline-end:calc(var(--space-8) + var(--font-size-sm) + var(--space-4))}._20at41j{padding-inline-end:calc(var(--space-12) + var(--font-size-med) + var(--space-8))}@media (pointer:coarse){._20at411,._20at415,._20at416,._20at417,._20at418,._20at419,._20at41a{font-size:var(--font-size-med)}}@media (forced-colors:active){._20at411:disabled{color:graytext;border-color:graytext}}@supports (text-box:trim-both cap alphabetic){._20at411{text-box-trim:none}}}
@@ -1,2 +1,2 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
2
  @layer components.textarea{._1kwv2lp0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._1kwv2lp4{--_1kwv2lp3:calc(var(--_1kwv2lp1) + 2 * var(--_1kwv2lp2) + 2 * var(--space-1));appearance:none;inline-size:100%;min-inline-size:0;color:var(--color-fg);border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);background-color:var(--color-bg);min-block-size:var(--_1kwv2lp3);resize:block;padding-block:0}._1kwv2lp4::placeholder{color:var(--color-fg-muted);opacity:1}._1kwv2lp4:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1kwv2lp4:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;resize:none;border-style:dashed}._1kwv2lp4[aria-invalid=true]{border-color:var(--color-danger)}._1kwv2lp4[aria-invalid=true]:not(:focus-visible){outline:var(--space-1) solid var(--color-danger);outline-offset:calc(-1 * var(--space-2))}._1kwv2lp5{--_1kwv2lp1:calc(var(--font-size-xs) * var(--line-height-med));--_1kwv2lp2:calc((var(--size-xs) - 2 * var(--space-1) - var(--font-size-xs) * var(--line-height-med)) / 2);padding-block:var(--_1kwv2lp2);padding-inline:var(--space-6)}._1kwv2lp6{--_1kwv2lp1:calc(var(--font-size-sm) * var(--line-height-med));--_1kwv2lp2:calc((var(--size-sm) - 2 * var(--space-1) - var(--font-size-sm) * var(--line-height-med)) / 2);padding-block:var(--_1kwv2lp2);padding-inline:var(--space-8)}._1kwv2lp7{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:calc((var(--size-med) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2);padding-block:var(--_1kwv2lp2);padding-inline:var(--space-12)}._1kwv2lp8{border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);background-color:var(--color-bg);inline-size:100%;min-inline-size:0}._1kwv2lp8:has(textarea:focus-visible){outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1kwv2lp8:has(textarea:disabled){background-color:var(--color-bg-muted);border-style:dashed}._1kwv2lp8:has(textarea[aria-invalid=true]){border-color:var(--color-danger)}._1kwv2lp8:has(textarea[aria-invalid=true]:not(:focus-visible)){outline:var(--space-1) solid var(--color-danger);outline-offset:calc(-1 * var(--space-2))}._1kwv2lp9{--_1kwv2lp3:calc(var(--_1kwv2lp1) + 2 * var(--_1kwv2lp2) + 2 * var(--space-0));appearance:none;inline-size:100%;min-inline-size:0;color:var(--color-fg);min-block-size:var(--_1kwv2lp3);resize:block;background-color:#0000;border-width:0;padding-block:0}._1kwv2lp9::placeholder{color:var(--color-fg-muted);opacity:1}._1kwv2lp9:focus-visible{outline:none}._1kwv2lp9:disabled{color:var(--color-fg-muted);cursor:not-allowed;resize:none}._1kwv2lpa{--_1kwv2lp1:calc(var(--font-size-xs) * var(--line-height-med));--_1kwv2lp2:calc((var(--size-xs) - 2 * var(--space-1) - var(--font-size-xs) * var(--line-height-med)) / 2);padding-block:var(--_1kwv2lp2);padding-inline:var(--space-6)}._1kwv2lpb{--_1kwv2lp1:calc(var(--font-size-sm) * var(--line-height-med));--_1kwv2lp2:calc((var(--size-sm) - 2 * var(--space-1) - var(--font-size-sm) * var(--line-height-med)) / 2);padding-block:var(--_1kwv2lp2);padding-inline:var(--space-8)}._1kwv2lpc{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:calc((var(--size-med) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2);padding-block:var(--_1kwv2lp2);padding-inline:var(--space-12)}._1kwv2lpf{resize:none;field-sizing:content;min-block-size:calc((var(--_1kwv2lpd) - 1) * var(--_1kwv2lp1) + var(--_1kwv2lp3));max-block-size:var(--_1kwv2lpe,none);overflow-y:auto}@media (pointer:coarse){._1kwv2lp4{font-size:var(--font-size-med)}._1kwv2lp5{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:max(var(--space-0), calc((var(--size-xs) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lp6{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:max(var(--space-0), calc((var(--size-sm) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lp7{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:max(var(--space-0), calc((var(--size-med) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lp9{font-size:var(--font-size-med)}._1kwv2lpa{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:max(var(--space-0), calc((var(--size-xs) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lpb{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:max(var(--space-0), calc((var(--size-sm) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}._1kwv2lpc{--_1kwv2lp1:calc(var(--font-size-med) * var(--line-height-med));--_1kwv2lp2:max(var(--space-0), calc((var(--size-med) - 2 * var(--space-1) - var(--font-size-med) * var(--line-height-med)) / 2))}}@media (forced-colors:active){._1kwv2lp4:disabled{color:graytext;border-color:graytext}._1kwv2lp8:has(textarea:disabled){border-color:graytext}._1kwv2lp9:disabled{color:graytext}}@supports (text-box:trim-both cap alphabetic){._1kwv2lp4,._1kwv2lp9{text-box-trim:none}}}
@@ -1,2 +1,2 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
2
  @layer components.toast{.hcnvsc0{inline-size:min(100% - 2 * var(--space-16), 6 * var(--space-64));inset-block-end:var(--space-16);inset-inline-end:var(--space-16);container:_1ed90zt0/inline-size}.hcnvsc0:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.hcnvsc1{margin:calc(-1 * var(--space-16));padding:var(--space-16);overscroll-behavior:contain;max-block-size:100dvh;margin-inline-start:calc(-1 * var(--space-24));padding-inline-start:var(--space-24);overflow:hidden auto}.hcnvsc1:empty{padding:0}.hcnvsc1:has([data-swiping],[data-swipe-direction=down]){overflow-y:hidden}.hcnvsc2{transform:translate(var(--toast-swipe-movement-x,0), var(--toast-swipe-movement-y,0));transition:opacity var(--duration-med) var(--easing-standard), translate var(--duration-med) var(--easing-enter), transform var(--duration-med) var(--easing-enter)}.hcnvsc2:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.hcnvsc2[data-starting-style],.hcnvsc2[data-ending-style]{opacity:0;translate:0 var(--distance-med)}.hcnvsc2[data-swiping]{transition:none}.hcnvsc2[data-limited]{display:none}.hcnvsc8{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;inset-block-start:0;inset-inline-start:0;overflow:hidden}}
@@ -1,2 +1,2 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
2
  @layer components.tooltip{.ivrt881{border:var(--space-1) solid var(--color-border);max-inline-size:var(--available-width);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter)}.ivrt881[data-starting-style],.ivrt881[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.ivrt881[data-instant]{transition:none}}
@@ -1,2 +1,2 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
2
  @layer components.visually-hidden{._1qk18b30{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}}
package/dist/base.css CHANGED
@@ -1,4 +1,4 @@
1
- @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
1
+ @layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.clickable-box, components.flex, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.alert, components.avatar, components.badge, components.body, components.button, components.caption, components.chip, components.code, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.drawer, components.label, components.link, components.menu, components.multiselect, components.number-field, components.popover, components.radio-group, components.run, components.search-field, components.select, components.switch, components.tab-bar, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table, components.markdown;
2
2
  @layer tokens{:root{--space-0:0rem;--space-1:.0625rem;--space-2:.125rem;--space-4:.25rem;--space-6:.375rem;--space-8:.5rem;--space-12:.75rem;--space-16:1rem;--space-20:1.25rem;--space-24:1.5rem;--space-32:2rem;--space-40:2.5rem;--space-48:3rem;--space-64:4rem;--space-80:5rem;--space-96:6rem;--size-xs:1.5rem;--size-sm:2rem;--size-med:2.5rem;--size-lg:3rem;--size-xl:3.5rem;--container-sidebar:15rem;--container-rail:3.5rem;--container-prose:40rem;--container-page:64rem;--container-wide:80rem;--radius-none:0;--radius-xs:.25rem;--radius-sm:.375rem;--radius-med:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-full:9999px;--font-size-xs:.75rem;--font-size-sm:.875rem;--font-size-med:1rem;--font-size-lg:1.125rem;--font-size-xl:1.25rem;--font-size-2xl:1.5rem;--font-size-3xl:1.875rem;--font-size-4xl:2.25rem;--font-weight-regular:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--line-height-sm:1.25;--line-height-meta:1.3334;--line-height-body:1.4286;--line-height-med:1.5;--line-height-lg:1.75;--z-index-base:0;--z-index-raised:1;--z-index-dropdown:1000;--z-index-sticky:1100;--z-index-overlay:1200;--z-index-modal:1300;--z-index-popover:1400;--z-index-toast:1500;--z-index-tooltip:1600;--duration-fast:.12s;--duration-med:.2s;--duration-slow:.32s;--easing-standard:cubic-bezier(.2, 0, 0, 1);--easing-enter:cubic-bezier(0, 0, 0, 1);--easing-exit:cubic-bezier(.3, 0, 1, 1);--distance-sm:.25rem;--distance-med:.5rem;--distance-lg:1rem;--scale-sm:.02;--scale-med:.05;--scale-lg:.1}[data-brand]{--shadow-sm:0 1px 2px color-mix(in srgb, var(--color-shadow) 12%, transparent);--shadow-med:0 2px 8px color-mix(in srgb, var(--color-shadow) 14%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 8%, transparent);--shadow-lg:0 8px 24px color-mix(in srgb, var(--color-shadow) 16%, transparent), 0 2px 6px color-mix(in srgb, var(--color-shadow) 8%, transparent)}[data-brand][data-mode=light]{color-scheme:light}[data-brand][data-mode=dark]{--shadow-sm:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 40%, transparent);--shadow-med:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 2px 8px color-mix(in srgb, var(--color-shadow) 48%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 32%, transparent);--shadow-lg:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 8px 24px color-mix(in srgb, var(--color-shadow) 56%, transparent), 0 2px 6px color-mix(in srgb, var(--color-shadow) 32%, transparent);color-scheme:dark}[data-brand][data-mode=system]{color-scheme:light dark}:dir(ltr){--dir:1}:dir(rtl){--dir:-1}@media (prefers-color-scheme:dark){[data-brand][data-mode=system]{--shadow-sm:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 40%, transparent);--shadow-med:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 2px 8px color-mix(in srgb, var(--color-shadow) 48%, transparent), 0 1px 2px color-mix(in srgb, var(--color-shadow) 32%, transparent);--shadow-lg:0 0 0 1px color-mix(in srgb, var(--color-fg) 10%, transparent), 0 8px 24px color-mix(in srgb, var(--color-shadow) 56%, transparent), 0 2px 6px color-mix(in srgb, var(--color-shadow) 32%, transparent)}}@media (prefers-reduced-motion:reduce){:root{--distance-sm:0rem;--distance-med:0rem;--distance-lg:0rem;--scale-sm:0;--scale-med:0;--scale-lg:0;--duration-fast:.12s;--duration-med:.12s;--duration-slow:.12s}}}
3
3
 
4
4
  @font-face{src:local(Arial),local(ArialMT);font-weight:400;font-style:normal;size-adjust:101.568%;ascent-override:95.3892%;descent-override:23.7511%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Arial Bold),local(Arial-BoldMT);font-weight:700;font-style:normal;size-adjust:101.637%;ascent-override:95.3241%;descent-override:23.7349%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Arial Italic),local(Arial-ItalicMT);font-weight:400;font-style:italic;size-adjust:101.637%;ascent-override:95.3241%;descent-override:23.7349%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Arial Bold Italic),local(Arial-BoldItalicMT);font-weight:700;font-style:italic;size-adjust:101.706%;ascent-override:95.2591%;descent-override:23.7187%;line-gap-override:0%;font-family:Inter Fallback Arial}@font-face{src:local(Menlo Regular),local(Menlo-Regular);font-weight:400;font-style:normal;size-adjust:100.137%;ascent-override:101.871%;descent-override:29.9621%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Menlo Bold),local(Menlo-Bold);font-weight:700;font-style:normal;size-adjust:100.003%;ascent-override:102.007%;descent-override:30.0022%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Menlo Italic),local(Menlo-Italic);font-weight:400;font-style:italic;size-adjust:100.137%;ascent-override:101.871%;descent-override:29.9621%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Menlo Bold Italic),local(Menlo-BoldItalic);font-weight:700;font-style:italic;size-adjust:100.003%;ascent-override:102.007%;descent-override:30.0022%;line-gap-override:0%;font-family:JetBrains Mono Fallback Menlo}@font-face{src:local(Consolas);font-weight:400;font-style:normal;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Consolas Bold),local(Consolas-Bold);font-weight:700;font-style:normal;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Consolas Italic),local(Consolas-Italic);font-weight:400;font-style:italic;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Consolas Bold Italic),local(Consolas-BoldItalic);font-weight:700;font-style:italic;size-adjust:114.387%;ascent-override:89.1798%;descent-override:26.2293%;line-gap-override:0%;font-family:JetBrains Mono Fallback Consolas}@font-face{src:local(Courier New),local(CourierNewPSMT);font-weight:400;font-style:normal;size-adjust:127.781%;ascent-override:79.8319%;descent-override:23.48%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@font-face{src:local(Courier New Bold),local(CourierNewPS-BoldMT);font-weight:700;font-style:normal;size-adjust:123.353%;ascent-override:82.6977%;descent-override:24.3229%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@font-face{src:local(Courier New Italic),local(CourierNewPS-ItalicMT);font-weight:400;font-style:italic;size-adjust:127.781%;ascent-override:79.8319%;descent-override:23.48%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@font-face{src:local(Courier New Bold Italic),local(CourierNewPS-BoldItalicMT);font-weight:700;font-style:italic;size-adjust:123.353%;ascent-override:82.6977%;descent-override:24.3229%;line-gap-override:0%;font-family:JetBrains Mono Fallback Courier New}@layer tokens{[data-brand=default]{--color-bg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-bg-muted:light-dark(oklch(96.8% .006 265),oklch(27% .006 265));--color-bg-raised:light-dark(oklch(100% 0 0),oklch(20.5% .006 265));--color-bg-panel:light-dark(oklch(98.5% .006 265),oklch(17.7% .006 265));--color-fg:light-dark(oklch(14.5% .006 265),oklch(98.5% .006 265));--color-fg-muted:light-dark(oklch(44.5% .006 265),oklch(71% .006 265));--color-border:light-dark(oklch(92.5% .006 265),oklch(27% .006 265));--color-border-strong:oklch(55.5% .006 265);--color-hover:light-dark(oklch(14.5% .006 265/.04),oklch(98.5% .006 265/.04));--color-control-fill:light-dark(oklch(14.5% .006 265/.05),oklch(98.5% .006 265/.05));--color-selected:light-dark(oklch(14.5% .006 265/.07),oklch(98.5% .006 265/.07));--color-accent:light-dark(oklch(54.6% .19 258),oklch(70.7% .14 258));--color-accent-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-accent-fill:light-dark(oklch(54.6% .19 258),oklch(48.8% .18 258));--color-accent-fill-fg:oklch(100% 0 0);--color-danger:light-dark(oklch(56% .2 25),oklch(70.4% .17 25));--color-danger-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-success:light-dark(oklch(52% .135 150),oklch(76% .15 150));--color-success-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-warning:light-dark(oklch(53% .11 75),oklch(81% .145 75));--color-warning-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-done:light-dark(oklch(55% .2 295),oklch(72% .15 295));--color-done-fg:light-dark(oklch(100% 0 0),oklch(14.5% .006 265));--color-neutral-subtle:light-dark(oklch(96.8% .006 265),oklch(27% .006 265));--color-neutral-subtle-fg:light-dark(oklch(37% .006 265),oklch(87% .006 265));--color-accent-subtle:light-dark(oklch(93.2% .032 258),oklch(28.2% .09 258));--color-accent-subtle-fg:light-dark(oklch(48.8% .18 258),oklch(80.9% .095 258));--color-success-subtle:light-dark(oklch(94.5% .04 150),oklch(26% .06 150));--color-success-subtle-fg:light-dark(oklch(46.5% .12 150),oklch(84% .115 150));--color-warning-subtle:light-dark(oklch(95.5% .03 75),oklch(27% .05 75));--color-warning-subtle-fg:light-dark(oklch(47.5% .1 75),oklch(86% .105 75));--color-danger-subtle:light-dark(oklch(93.6% .032 25),oklch(25.8% .085 25));--color-danger-subtle-fg:light-dark(oklch(50.5% .19 25),oklch(80.8% .105 25));--color-done-subtle:light-dark(oklch(93.8% .032 295),oklch(28% .095 295));--color-done-subtle-fg:light-dark(oklch(49% .19 295),oklch(81.5% .1 295));--color-focus:light-dark(oklch(54.6% .19 258),oklch(70.7% .14 258));--color-shadow:light-dark(oklch(14.5% .006 265),oklch(0% 0 0));--color-backdrop:light-dark(oklch(14.5% .006 265/.4),oklch(0% 0 0/.7));--font-body:"Inter", "Inter Fallback Arial", sans-serif;--font-heading:"Inter", "Inter Fallback Arial", sans-serif;--font-display:"Inter", "Inter Fallback Arial", sans-serif;--font-label:"Inter", "Inter Fallback Arial", sans-serif;--font-mono:"JetBrains Mono", "JetBrains Mono Fallback Menlo", "JetBrains Mono Fallback Consolas", "JetBrains Mono Fallback Courier New", monospace;--font-trim-body-cap:.36377;--font-trim-body-baseline:.36377;--font-trim-heading-cap:.36377;--font-trim-heading-baseline:.36377;--font-trim-display-cap:.36377;--font-trim-display-baseline:.36377;--font-trim-label-cap:.36377;--font-trim-label-baseline:.36377;--font-trim-mono-cap:.37;--font-trim-mono-baseline:.36;--font-tracking-body:-.006em;--font-tracking-heading:-.006em;--font-tracking-display:-.006em;--font-tracking-label:-.006em;--font-tracking-mono:normal;--font-features-body:"cv11", "ss03";--font-features-heading:"cv11", "ss03";--font-features-display:"cv11", "ss03";--font-features-label:"cv11", "ss03";--font-features-mono:normal}@media (forced-colors:active){[data-brand][data-brand]{--color-bg:Canvas;--color-bg-muted:Canvas;--color-bg-raised:Canvas;--color-bg-panel:Canvas;--color-fg:CanvasText;--color-fg-muted:CanvasText;--color-border:CanvasText;--color-border-strong:CanvasText;--color-hover:Highlight;--color-control-fill:ButtonFace;--color-selected:Highlight;--color-accent:LinkText;--color-accent-fg:Canvas;--color-accent-fill:LinkText;--color-accent-fill-fg:Canvas;--color-danger:CanvasText;--color-danger-fg:Canvas;--color-success:CanvasText;--color-success-fg:Canvas;--color-warning:CanvasText;--color-warning-fg:Canvas;--color-done:CanvasText;--color-done-fg:Canvas;--color-neutral-subtle:Canvas;--color-neutral-subtle-fg:CanvasText;--color-accent-subtle:Canvas;--color-accent-subtle-fg:CanvasText;--color-success-subtle:Canvas;--color-success-subtle-fg:CanvasText;--color-warning-subtle:Canvas;--color-warning-subtle-fg:CanvasText;--color-danger-subtle:Canvas;--color-danger-subtle-fg:CanvasText;--color-done-subtle:Canvas;--color-done-subtle-fg:CanvasText;--color-focus:Highlight;--color-shadow:CanvasText;--color-backdrop:transparent}}}
@@ -14,6 +14,7 @@ A modal panel over the page for one short task: edit a name, fill a small form,
14
14
  - Confirming something destructive or irreversible: use `AlertDialog`, which focuses Cancel and ignores outside clicks.
15
15
  - A list of actions: use `Menu`.
16
16
  - Content the user wants beside the page, or a hint: use `Popover` or inline text; a modal blocks the page.
17
+ - A short task or a few actions on a phone, tied to the page behind: use `Drawer`, which slides up from the bottom edge and swipes away.
17
18
  - A long flow or a lot of content: give it a page.
18
19
  - A status message or the result of an action: use `Toast`, which leaves focus where it is; a dialog takes it.
19
20
 
@@ -21,6 +22,7 @@ A modal panel over the page for one short task: edit a name, fill a small form,
21
22
 
22
23
  - Compose the parts: `Dialog` > `Dialog.Trigger` + `Dialog.Popup` > `Dialog.Body` + `Dialog.Actions` > `Dialog.Close`. `Dialog` holds the open state and renders no element, so it takes no `className` or `style`; every other part does, plus style props.
23
24
  - `Dialog.Popup` takes a required `title` and an optional `description`. They head the panel as an `h2` and muted text, and name and describe the dialog for screen readers. Keep the title short: a noun phrase ("Rename project") or the question asked.
25
+ - The `description` renders inside a Text `p`, so a Text in it is an inline run whatever its `display`. For a long description that scrolls in its own box (a message being replied to), pass a `Box as="span" display="block" overflow="auto" tabIndex={0}` with the text in a `Body as="span"` inside it, as Text's docs say; cap its height with `maxBlockSize`, by the viewport too (`min(12lh, 30svh)`), so the body stays in view at 200% text on a phone. No app CSS sets its `display`.
24
26
  - `size` (`sm`, `med`, `lg`; `med` by default) sets the width, 384, 512 or 640 px at the default font size; the panel never gets wider than the viewport less a 16 px edge.
25
27
  - Put the content in `Dialog.Body`. When the dialog outgrows the viewport the whole popup scrolls; keep the content short so the actions stay close.
26
28
  - `Dialog.Actions` end-aligns its buttons and wraps them on a narrow screen. Put `Dialog.Close` first, then one primary `Button`. A dialog with no buttons still closes on Esc and the backdrop, but give it a `Dialog.Close` so a pointer user sees the way out.
@@ -0,0 +1,156 @@
1
+ # Drawer
2
+
3
+ ## Purpose
4
+
5
+ A modal panel that slides up from the bottom edge, for a short task or a few actions tied to the page behind it, without leaving that page, on a touch screen. Built on Base UI's Drawer, which owns the behavior: focus moves into the panel and stays there, the page behind is hidden from assistive tech and does not scroll, and Esc, a press on the backdrop, the close button and a downward swipe all close it, with focus back on the trigger. The parts add the look: a dimmed backdrop, a panel with a drag handle, a title and a close button, and a slide that is a plain fade under reduced motion.
6
+
7
+ ## When to use
8
+
9
+ - A short task or a few actions about one thing on the page, on a phone: an item's options, a "New" menu with a line of help per choice, a small form.
10
+ - The content is a title, an optional line of description, then a short list of actions or a small form.
11
+
12
+ ## When not to use
13
+
14
+ - A confirmation, or a form that stands on its own, or any modal on a wide screen: use `Dialog`, which is centred.
15
+ - Content beside the page that should not block it: use `Popover`, which is non-modal and anchored to its trigger.
16
+ - A list of commands anchored to a button: use `Menu`.
17
+ - Confirming something destructive or irreversible: use `AlertDialog`, which focuses Cancel and ignores outside presses.
18
+ - A long flow or a lot of content: give it a page.
19
+
20
+ ## Rules
21
+
22
+ - Compose the parts: `Drawer` > `Drawer.Trigger` + `Drawer.Popup` > `Drawer.Body` + `Drawer.Actions` > `Drawer.Close`. `Drawer` holds the open state and renders no element, so it takes no `className` or `style`; every other part does, plus style props.
23
+ - `Drawer.Popup` takes a required `title` and an optional `description`. They head the panel as an `h2` and muted text beside a close `IconButton`, and name and describe the drawer for screen readers. Keep the title short: the item or task it is about ("Double cream", "New recipe").
24
+ - `closeLabel` names the close button; it is "Close" by default. Pass the app's own word when it is not in English.
25
+ - The panel spans the viewport's width, its top corners rounded at the dialog radius (`lg`). It is as tall as its content, up to the viewport less a strip of backdrop at the top; taller content scrolls inside it. Its bottom padding adds `env(safe-area-inset-bottom)`, so the last row clears a phone's home indicator; for that, the app's viewport meta needs `viewport-fit=cover`. A `padding`, `paddingBlock` or `paddingBlockEnd` replaces that bottom pad.
26
+ - It opens from the bottom edge only. There is no `side` prop, and no snap points.
27
+ - Put the content in `Drawer.Body`, or a list of actions straight in the popup. `Drawer.Actions` end-aligns buttons and wraps them, as `Dialog.Actions` does.
28
+ - `Drawer.Trigger` and `Drawer.Close` are bare `Clickable`s, as on `Dialog`. Pass Button's `variant`, `size`, `iconStart`, `iconEnd` or `uppercase` for a button look. Without them, style them with style props and give them an accessible name.
29
+ - `disabled` on the trigger keeps it focusable and announced, and stops it opening.
30
+ - Control it with `open` and `onOpenChange` to close it after an action or keep it open on an error. `onOpenChangeComplete` runs once the exit transition ends.
31
+ - The popup portals into the trigger's nearest `ThemeProvider`, so it keeps the brand and mode, on `zIndex` `modal`. That provider must not clip or stack its content, as for `Dialog`. A drawer opened only through `open`, with no `Drawer.Trigger`, portals to `<body>`.
32
+ - It is always modal. Never add key handlers, `tabIndex`, a focus trap or your own swipe handling to the parts.
33
+ - Focus opens on the close button, as in Dialog; `initialFocus` on `Drawer.Popup` sends it elsewhere. `finalFocus` sends focus elsewhere on close, as on `Dialog.Popup` (ADR 0192).
34
+ - The module has no hooks, so a server component can render the parts; `onOpenChange` and other functions must come from a client component.
35
+
36
+ ## Do
37
+
38
+ ```tsx
39
+ <Drawer>
40
+ <Drawer.Trigger variant="secondary">Double cream</Drawer.Trigger>
41
+ <Drawer.Popup title="Double cream" description="On hand · used in 3 of your recipes">
42
+ <Drawer.Body>
43
+ <Button variant="ghost" onClick={runningLow}>
44
+ Running low
45
+ </Button>
46
+ <Button variant="ghost" onClick={ranOut}>
47
+ Ran out
48
+ </Button>
49
+ </Drawer.Body>
50
+ </Drawer.Popup>
51
+ </Drawer>
52
+ ```
53
+
54
+ ```tsx
55
+ // Closes once the action succeeds; stays open on an error.
56
+ const [open, setOpen] = useState(false);
57
+ <Drawer open={open} onOpenChange={setOpen}>
58
+ <Drawer.Trigger variant="primary">New recipe</Drawer.Trigger>
59
+ <Drawer.Popup title="New recipe">…</Drawer.Popup>
60
+ </Drawer>;
61
+ ```
62
+
63
+ ## Don't
64
+
65
+ ```tsx
66
+ // A heading in the body instead of `title`: the drawer has no name.
67
+ <Drawer.Popup title="">
68
+ <Heading>Double cream</Heading>
69
+ </Drawer.Popup>
70
+ ```
71
+
72
+ ```tsx
73
+ // A long form in a drawer on a wide screen: use a Dialog there, or a page.
74
+ <Drawer.Popup title="Edit recipe">
75
+ <RecipeForm />
76
+ </Drawer.Popup>
77
+ ```
78
+
79
+ ## Accessibility
80
+
81
+ - The trigger has `aria-haspopup="dialog"` and `aria-expanded`. The popup is `role="dialog"` with `aria-modal`, labelled by the title and described by the description.
82
+ - Opening moves focus into the popup; Tab and Shift+Tab cycle inside it, and the page behind is `aria-hidden`. Esc, a backdrop press, the close button or a downward swipe closes it, and focus returns to the trigger.
83
+ - A closed drawer stays on the page while it slides out, but is `inert` and `aria-hidden` from the moment it closes, and focus is back on the trigger at once (ADR 0113).
84
+ - The drag handle is decorative and `aria-hidden`; the close button, an `IconButton` named by `closeLabel`, is the way out for a pointer or a keyboard, and a screen reader's dismiss gesture or Esc for the rest.
85
+ - The panel takes the shared focus ring when focused from the keyboard. Under forced colors it keeps a border on its top and sides, and the handle is `CanvasText`.
86
+ - With `prefers-reduced-motion`, it fades in and out where it rests instead of sliding.
87
+ - The backdrop is Dialog's: the `backdrop` color role over the page, and no fill under forced colors. It clears as a swipe drags the panel away.
88
+
89
+ ## Theming
90
+
91
+ The backdrop reads the same `backdrop` color role as `Dialog`; set it as `Dialog.docs.md` shows.
92
+
93
+ ## Props
94
+
95
+ Generated from the TypeScript types.
96
+
97
+ ### Drawer
98
+
99
+ | Prop | Type | Required | Description |
100
+ | --- | --- | --- | --- |
101
+ | `children` | `ReactNode` | no | |
102
+ | `defaultOpen` | `boolean` | no | Whether the drawer is initially open. To render a controlled drawer, use the `open` prop instead. |
103
+ | `onOpenChange` | `((open: boolean, eventDetails: DrawerRootChangeEventDetails) => void)` | no | Event handler called when the drawer is opened or closed. |
104
+ | `onOpenChangeComplete` | `((open: boolean) => void)` | no | Event handler called after any animations complete when the drawer is opened or closed. |
105
+ | `open` | `boolean` | no | Whether the drawer is currently open. |
106
+
107
+ ### Drawer.Actions
108
+
109
+ No props of its own.
110
+
111
+ Also accepts the style props (see `manifest.json` `styleProps`).
112
+
113
+ ### Drawer.Body
114
+
115
+ No props of its own.
116
+
117
+ Also accepts the style props (see `manifest.json` `styleProps`).
118
+
119
+ ### Drawer.Close
120
+
121
+ | Prop | Type | Required | Description |
122
+ | --- | --- | --- | --- |
123
+ | `iconEnd` | `ComponentType` | no | |
124
+ | `iconStart` | `ComponentType` | no | |
125
+ | `size` | `"lg" \| "med" \| "sm"` | no | |
126
+ | `uppercase` | `boolean` | no | |
127
+ | `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
128
+
129
+ Also accepts the style props (see `manifest.json` `styleProps`).
130
+
131
+ ### Drawer.Popup
132
+
133
+ | Prop | Type | Required | Description |
134
+ | --- | --- | --- | --- |
135
+ | `closeLabel` | `string` | no | |
136
+ | `description` | `ReactNode` | no | |
137
+ | `finalFocus` | `boolean \| RefObject<HTMLElement \| null> \| ((closeType: InteractionType) => void \| boolean \| HTMLElement \| null)` | no | Determines the element to focus when the drawer is closed. - `false`: Do not move focus. - `true`: Move focus based on the default behavior (trigger or previously focused element). - `RefObject`: Move focus to the ref element. - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`). Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing. |
138
+ | `initialFocus` | `boolean \| RefObject<HTMLElement \| null> \| ((openType: InteractionType) => void \| boolean \| HTMLElement \| null)` | no | Determines the element to focus when the drawer is opened. - `false`: Do not move focus. - `true`: Move focus based on the default behavior (first tabbable element or popup). - `RefObject`: Move focus to the ref element. - `function`: Called with the interaction type (`mouse`, `touch`, `pen`, or `keyboard`). Return an element to focus, `true` to use the default behavior, or `false`/`undefined` to do nothing. |
139
+ | `title` | `string \| number \| bigint \| Iterable<ReactNode> \| Promise<AwaitedReactNode> \| ReactElement<unknown, string \| JSXElementConstructor<any>> \| ReactPortal` | yes | |
140
+
141
+ Also accepts the style props (see `manifest.json` `styleProps`).
142
+
143
+ ### Drawer.Trigger
144
+
145
+ | Prop | Type | Required | Description |
146
+ | --- | --- | --- | --- |
147
+ | `handle` | `DrawerHandle<unknown>` | no | A handle to associate the trigger with a drawer. Can be created with the Drawer.createHandle() method. |
148
+ | `iconEnd` | `ComponentType` | no | |
149
+ | `iconStart` | `ComponentType` | no | |
150
+ | `id` | `string` | no | ID of the trigger. In addition to being forwarded to the rendered element, it is also used to specify the active trigger for drawers in controlled mode (with the Drawer.Root `triggerId` prop). |
151
+ | `payload` | `unknown` | no | A payload to pass to the drawer when it is opened. |
152
+ | `size` | `"lg" \| "med" \| "sm"` | no | |
153
+ | `uppercase` | `boolean` | no | |
154
+ | `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
155
+
156
+ Also accepts the style props (see `manifest.json` `styleProps`).
@@ -18,7 +18,8 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
18
18
 
19
19
  - `children` is the markdown source, a string.
20
20
  - The root is a `div` that stacks the blocks with a `16` gap. It takes the style props, `className`, `style` and the `div`'s other props; consumer values win.
21
- - `headingLevel` (default `1`) is the level `#` renders at: `headingLevel={3}` makes `#` an `h3` and `##` an `h4`, capped at `h6`. Set it to one below the heading the content sits under, so the page outline stays correct. Sizes stay at body scale or just above (`#` is `lg`, the rest `med`), whatever the level.
21
+ - `headingLevel` (default `1`) is the level `#` renders at: `headingLevel={3}` makes `#` an `h3` and `##` an `h4`, capped at `h6`. Set it to one below the heading the content sits under, so the page outline stays correct. Sizes stay at body scale or just above, whatever the level: `#` is one step above `size`, the rest at it.
22
+ - `size` (`sm`, `med` or `lg`, default `med`) is `Body`'s `size` for paragraphs and the text of tight and loose list items. `#` is `med`, `lg` or `xl` with it, and `##` to `######` match it. Code and tables stay `sm`. Use `size` for small prose; never remap a font-size token to shrink it.
22
23
  - A fenced block is a `Code block`, named "Code, ts" when the fence names `ts`, and "Code" when it names no language. A table is a `Table` in a `Table.ScrollArea`, both named "Table", or "Table 1", "Table 2" and so on when the document has more than one.
23
24
  - Lists keep their markers; a task list item shows a disabled checkbox inside a `label` with the task's text, in place of its marker.
24
25
  - `components` takes react-markdown's `components` shape and is shallow-merged over the library's element map: a key the library maps (`a`, `pre`, `p`, `h1`…) is replaced, and a key it does not map is added. Each component gets the element's props plus `node`, the element's syntax tree (hast); strip `node` before spreading props onto a DOM element.
@@ -29,6 +30,7 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
29
30
  - Raw HTML in the source (`<script>`, `<b>`, `<img onerror>`) renders as escaped text. There is no `rehype-raw` and no `dangerouslySetInnerHTML`.
30
31
  - Link and image URLs keep react-markdown's default `urlTransform`: only `http`, `https`, `irc`, `ircs`, `mailto`, `xmpp` and relative URLs survive. A `javascript:` or `data:` link renders as plain text.
31
32
  - An absolute `http` or `https` link opens in a new tab with `rel="noopener noreferrer"`. A relative link stays in the tab.
33
+ - `linkPolicy` (default `all`) picks which links stay links. With `absolute`, only a URL with a scheme (`https:`, `mailto:`), a protocol-relative `//` one or a `#` fragment (footnotes included) is a link; a relative one (`src/file.ts`, `/docs`, `?q=1`) renders as plain text, with no `a` and no tab stop. Set it where the document's relative links have no route, such as a reply that names repo files. To route them instead, override `components.a`.
32
34
  - Images are dropped: `![alt](url)` renders nothing and the browser makes no request. An app opts in with `components.img`, which then decides how, and from where, an image loads.
33
35
 
34
36
  ## Do
@@ -37,6 +39,13 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
37
39
  <Markdown headingLevel={3}>{reply}</Markdown>
38
40
  ```
39
41
 
42
+ ```tsx
43
+ // Small prose whose relative links point at repo files, not app routes.
44
+ <Markdown linkPolicy="absolute" size="sm">
45
+ {reply}
46
+ </Markdown>
47
+ ```
48
+
40
49
  ```tsx
41
50
  // Route links through the app's router, and allow images from the app's own host.
42
51
  <Markdown
@@ -52,6 +61,14 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
52
61
 
53
62
  ## Don't
54
63
 
64
+ ```tsx
65
+ // Remaps a token to shrink the text, and cancels clicks on links that go nowhere: use
66
+ // `size="sm"` and `linkPolicy="absolute"`.
67
+ <Markdown className={smallText} onClick={stayInApp}>
68
+ {reply}
69
+ </Markdown>
70
+ ```
71
+
55
72
  ```tsx
56
73
  // Markdown is for a markdown string, not for text the app writes.
57
74
  <Markdown>{"Saved"}</Markdown>
@@ -65,6 +82,7 @@ A markdown string, trusted or not, rendered as accessible prose in the library's
65
82
  ## Accessibility
66
83
 
67
84
  - Headings follow `headingLevel`, so embedded content continues the page's outline instead of restarting it at `h1`.
85
+ - A link that opens a new tab ends with a visually hidden " (opens in a new tab)", so its accessible name says so; there is no icon.
68
86
  - Links keep the browser's underline, so they are never color alone, and take the shared focus ring. Under forced colors they are `LinkText`.
69
87
  - A code block or table that overflows scrolls in its own named region, which the keyboard reaches; the page never scrolls sideways.
70
88
  - A task's checkbox is disabled and named by the task's text; it reports its state, never takes input.
@@ -82,5 +100,7 @@ Generated from the TypeScript types.
82
100
  | `children` | `string` | yes | The markdown source. Raw HTML in it renders as text. |
83
101
  | `components` | `MarkdownComponents` | no | Shallow-merged over the library's element map: replaces an element it maps (`a`, `pre`) and adds one it does not (`img`, which renders only through this). |
84
102
  | `headingLevel` | `1 \| 2 \| 3 \| 4 \| 5 \| 6` | no | The level `#` renders at; each `#` more is a level deeper, capped at 6. |
103
+ | `linkPolicy` | `"absolute" \| "all"` | no | Which links stay links: `all` (the default), or `absolute`, where a relative URL renders as plain text and only a URL with a scheme, a `//` one or a `#` fragment links. |
104
+ | `size` | `"lg" \| "med" \| "sm"` | no | The size of paragraphs and list item text, as `Body`'s `size`; headings step from it. |
85
105
 
86
106
  Also accepts the style props (see `manifest.json` `styleProps`).
@@ -14,6 +14,7 @@ A column of links to an app's pages, with the current page marked: a sidebar's o
14
14
  ## When not to use
15
15
 
16
16
  - Switching views that share one page and keep the URL: use `Tabs`.
17
+ - An app's three to five top-level sections along the bottom of a phone screen, icon above label: use `TabBar`.
17
18
  - An item that runs an action or command, such as Sign out or New project: use `Menu` or `Button`. The link itself only navigates. An action that belongs to one row, such as Rename or Delete for that row's page, goes beside the link in `action` (ADR 0169).
18
19
  - Links in running text, or one link on its own: use a link (`Clickable as="a"`).
19
20
  - A tree of collapsible or nested groups, or a drawer that slides in on a phone: not supported. One level of groups, always open.
@@ -13,6 +13,7 @@ An app's sidebar: a named `aside` on the `bgPanel` surface, with a header row, t
13
13
 
14
14
  - A sidebar that never collapses and needs no surface or footer: `SidebarLayout.Sidebar` alone, with a `NavList` in it.
15
15
  - A drawer that slides over the page on a phone: not supported. Below 48em of the layout's width the sidebar stacks above the page, full width.
16
+ - An app's three to five top-level sections on a phone: use `TabBar` along the bottom of the screen; the app's layout shows it in place of the sidebar there.
16
17
  - Secondary content beside the page (filters, an outline): `SidebarLayout.Sidebar as="aside"`.
17
18
 
18
19
  ## Rules
@@ -0,0 +1,135 @@
1
+ # TabBar
2
+
3
+ ## Purpose
4
+
5
+ A bar along the bottom of a phone screen that moves between an app's three to five top-level sections. The parts are `TabBar` (a named `nav` around a list) and `TabBar.Item` (one link: an icon above a one- or two-word label, with an optional count beside the icon). The items share the bar's width equally. Items are links inside a `nav` landmark, not ARIA tabs: an `<a>` by default, or a router's `Link` through `as`, which keeps the router's props typed. The app says which item is current; TabBar reads nothing from the URL (ADR 0205).
6
+
7
+ ## When to use
8
+
9
+ - A phone-first app's top-level sections, always one tap away at the bottom of the screen: Recipes, Plan, Shopping, On hand.
10
+ - Three to five sections of equal weight, each its own route, each with an icon and a short label.
11
+ - A section with a count worth seeing from anywhere (items left to buy, unread messages): `count` beside its icon.
12
+
13
+ ## When not to use
14
+
15
+ - The same links on a wide screen, or more than five of them: use `NavList`, in a `Sidebar` when they run down the side of the page. An app that shows a TabBar on a phone and a Sidebar on a wide screen renders both and hides one in its own layout; TabBar does not hide itself.
16
+ - Switching panels inside one page that keep the URL: use `Tabs`. TabBar's items change the page.
17
+ - An action or command, such as New recipe or Sign out: use `Button`, `IconButton` or `Menu`. An item only navigates.
18
+ - Fixing the bar to the viewport: the app's layout does that (`position: fixed` or a sticky footer row). TabBar is a plain block that sits where it is rendered.
19
+
20
+ ## Rules
21
+
22
+ - `TabBar` needs a name, and its type requires one: `aria-label` ("Sections", "Main") or `aria-labelledby`. A page with another `nav` tells them apart by these names. Its props land on the `nav`.
23
+ - Children are three to five `TabBar.Item`s. The bar puts them in one row of equal columns, whatever their labels; more than five is not supported.
24
+ - `TabBar.Item` is an `<a>` by default: pass `href`. With `as={Link}`, it takes the router's props instead (`to`, `prefetch`) and its type checks them. Every other prop, `ref` and the style props included, lands on the link; the `li` around it takes none. Use the router's plain `Link`, not a `NavLink` that sets `aria-current` itself.
25
+ - `icon` is required: an icon component (`icon={InboxIcon}`), drawn at `xl` (20px) above the label and hidden from assistive tech, since the label names the link.
26
+ - The label is the item's children: a word or two of text, `xs` and medium. It stays on one line; a label too long for its column ends in an ellipsis, and the link's name keeps the full text.
27
+ - `current` marks the link to the section on screen: `aria-current="page"`, the `accent` colour, a semibold label, and a 2px `accent` line, 32px wide, on the bar's top edge above the item. Set it on one item at most. It is the only way to set `aria-current`: the type omits the raw attribute.
28
+ - `count` is a subtle `Badge` at `xs` beside the icon, at its inline-end top corner; the icon stays centred. It is part of the link's accessible name, read after the label, so a bare number says nothing ("Shopping 6"). Give it its meaning with `VisuallyHidden`: `count={<>6<VisuallyHidden> left to buy</VisuallyHidden></>}`. A nullish, boolean or empty count renders nothing, but a `0` or a fragment around one does not: guard it (`left > 0 && <>…</>`) to hide a zero. Keep it short: two or three characters.
29
+ - The bar is `bg` with one `border` separator along its top, `8` of inline padding, and `env(safe-area-inset-bottom)` of padding below the items (at least `4`, so a focus ring stays inside the bar), so they clear a phone's home indicator. That inset is 0 unless the page's viewport meta has `viewport-fit=cover`. The background and inline padding are default style props, so the consumer's win; the separator and the bottom inset are the component's CSS.
30
+ - Items are at least 56px (`xl`) high, `fgMuted` with `4` of inline padding and a `med` radius, as default style props; the consumer's win. Hover turns a non-current item `fg` where hover is real (`(hover: hover)`).
31
+ - A server component can render the whole bar, router `Link` included: no part has hooks.
32
+
33
+ ## Do
34
+
35
+ ```tsx
36
+ <TabBar aria-label="Sections">
37
+ <TabBar.Item href="/recipes" icon={BookIcon}>
38
+ Recipes
39
+ </TabBar.Item>
40
+ <TabBar.Item href="/plan" icon={ClipboardIcon}>
41
+ Plan
42
+ </TabBar.Item>
43
+ <TabBar.Item
44
+ count={
45
+ <>
46
+ 6<VisuallyHidden> left to buy</VisuallyHidden>
47
+ </>
48
+ }
49
+ current
50
+ href="/shopping"
51
+ icon={ShoppingCartIcon}
52
+ >
53
+ Shopping
54
+ </TabBar.Item>
55
+ <TabBar.Item href="/on-hand" icon={RefrigeratorIcon}>
56
+ On hand
57
+ </TabBar.Item>
58
+ </TabBar>
59
+ ```
60
+
61
+ ```tsx
62
+ // A router's link: its props stay typed. The router says which item is current. The app's layout
63
+ // fixes the bar to the bottom of the screen.
64
+ <TabBar aria-label="Sections" className={layout.bottomBar}>
65
+ {sections.map((section) => (
66
+ <TabBar.Item
67
+ as={Link}
68
+ current={pathname.startsWith(section.to)}
69
+ icon={section.icon}
70
+ key={section.to}
71
+ to={section.to}
72
+ >
73
+ {section.label}
74
+ </TabBar.Item>
75
+ ))}
76
+ </TabBar>
77
+ ```
78
+
79
+ ## Don't
80
+
81
+ ```tsx
82
+ // No name: another nav on the page could not be told apart. The type rejects it.
83
+ <TabBar>
84
+ <TabBar.Item href="/" icon={InboxIcon}>
85
+ Inbox
86
+ </TabBar.Item>
87
+ </TabBar>
88
+ ```
89
+
90
+ ```tsx
91
+ // A sentence for a label: it cannot fit a fifth of a phone's width, so it is cut short.
92
+ <TabBar.Item href="/shopping" icon={ShoppingCartIcon}>
93
+ Your shopping list for this week
94
+ </TabBar.Item>
95
+ ```
96
+
97
+ ```tsx
98
+ // A button that runs an action: a TabBar item navigates. Put the action in the page.
99
+ <TabBar.Item as="button" icon={PlusIcon} onClick={addRecipe}>
100
+ Add
101
+ </TabBar.Item>
102
+ ```
103
+
104
+ ## Accessibility
105
+
106
+ - A `nav` landmark named by its `aria-label` or `aria-labelledby`, around a native list: screen readers announce the landmark and the number of links, and their landmark commands reach it (WAI-ARIA landmarks). These are links, not ARIA tabs: no `tablist` role and no arrow-key model, since each item loads a page.
107
+ - The current item has `aria-current="page"`, announced as "current page". Its line and semibold label show it without colour alone (WCAG 1.4.1). Under forced colours the line is `Highlight`.
108
+ - Label text is `fgMuted`, and the current item's `accent`, on the bar's `bg`: both are checked 4.5:1 pairs in light and dark (ADR 0031).
109
+ - The icon is hidden; the label and the count, with its meaning, make the link's name. A truncated label keeps its full text in the name.
110
+ - Links are in the tab order in reading order and show the shared focus ring. Every item is at least 56px high and a quarter to a fifth of the bar wide, past the 24px floor (WCAG 2.5.8, ADR 0124) and the 44px touch guideline.
111
+
112
+ ## Props
113
+
114
+ Generated from the TypeScript types.
115
+
116
+ ### TabBar
117
+
118
+ | Prop | Type | Required | Description |
119
+ | --- | --- | --- | --- |
120
+ | `aria-label` | `string` | no | Defines a string value that labels the current element. |
121
+ | `aria-labelledby` | `string` | no | Identifies the element (or elements) that labels the current element. |
122
+
123
+ Also accepts the style props (see `manifest.json` `styleProps`).
124
+
125
+ ### TabBar.Item
126
+
127
+ | Prop | Type | Required | Description |
128
+ | --- | --- | --- | --- |
129
+ | `as` | `ElementType` | no | |
130
+ | `children` | `ReactNode` | yes | |
131
+ | `count` | `ReactNode` | no | |
132
+ | `current` | `boolean` | no | |
133
+ | `icon` | `ComponentType` | yes | |
134
+
135
+ Also accepts every `<a>` attribute (change the element with `as`) and the style props (see `manifest.json` `styleProps`).
package/dist/docs/Tabs.md CHANGED
@@ -11,7 +11,7 @@ Switches between views that share one place on the page. The parts are `Tabs` (t
11
11
 
12
12
  ## When not to use
13
13
 
14
- - Moving between pages or routes: use `NavList`, or links (`Clickable as="a"`) in a `nav`. Tabs do not change the URL and the panels are not separate pages.
14
+ - Moving between pages or routes: use `NavList`, `TabBar` for an app's top-level sections along the bottom of a phone screen, or links (`Clickable as="a"`) in a `nav`. Tabs do not change the URL and the panels are not separate pages.
15
15
  - A sequence the user must go through in order: use a stepper.
16
16
  - Two or three options that set a value in a form: use `RadioGroup`.
17
17
  - Content that should be readable at once, or compared side by side: show it all, or use sections with headings.
package/dist/docs/Text.md CHANGED
@@ -23,6 +23,7 @@ The base of all visible text, and the primitive every text component builds on.
23
23
  - `as` defaults to `p`, so a run inside a paragraph must set an inline element: `as="span"`, `"strong"`, `"em"`, `"time"`; code is `Code`, not `as="code"`. A `p` inside a `p` is invalid HTML and breaks hydration.
24
24
  - A run inherits the outer weight, so `<Text as="strong">` is not bold until it sets `weight="bold"` (or `semibold`).
25
25
  - A run is inline whatever its `display` prop, and `truncate` gives it no ellipsis; truncate a block Text instead.
26
+ - For a block inside a Text, such as a box that scrolls a long message in a dialog's `description`, put a `Box as="span" display="block"` there and the text in a Text inside it (in an app, `Body`): `<Box as="span" display="block" overflow="auto" tabIndex={0}><Body as="span" wrap="pre-wrap">…</Body></Box>`. The Box is its own formatting context, so the outer Text's box is exactly the Box's on both trim paths, and the inner Text trims itself; no app CSS or style-prop exception. Make the Box the outer Text's only child. `tabIndex={0}` lets a keyboard scroll it. Its cap (`maxBlockSize`, by the viewport too, such as `min(12lh, 30svh)`) and focus ring are the app's.
26
27
  - 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 `Stack` or `Inline` for layout instead. A block element (`p`, `div`, `h2`) or a Text inside a `Box` inside a Text keeps its own trimmed box.
27
28
  - `size` takes a `fontSize` step: `xs`, `sm`, `med`, `lg`, `xl`, `2xl`, `3xl`, `4xl`. The top-level default is `med`.
28
29
  - `font` takes a font role: `body` (default), `heading`, `display`, `label`, `mono`. The brand maps roles to fonts.
@@ -66,6 +67,20 @@ function Eyebrow({ children }: { children: ReactNode }) {
66
67
  }
67
68
  ```
68
69
 
70
+ ```tsx
71
+ // A block scroller inside a Text (here a dialog's description): a Box, not a run, so it is a block.
72
+ <Dialog.Popup
73
+ title="Reply"
74
+ description={
75
+ <Box as="span" className={styles.message} display="block" overflow="auto" tabIndex={0}>
76
+ <Body as="span" wrap="pre-wrap">
77
+ {lastMessage}
78
+ </Body>
79
+ </Box>
80
+ }
81
+ />
82
+ ```
83
+
69
84
  ```tsx
70
85
  <Text as="pre" size="sm" wrap="pre-wrap">
71
86
  {commitMessage}
@@ -84,6 +99,19 @@ function Eyebrow({ children }: { children: ReactNode }) {
84
99
 
85
100
  ## Don't
86
101
 
102
+ ```tsx
103
+ // A run's `display` loses to the run rule: this stays inline, and a class that forces it needs a
104
+ // style-prop exception. Wrap the text in a `Box as="span" display="block"` instead.
105
+ <Dialog.Popup
106
+ title="Reply"
107
+ description={
108
+ <Body as="span" display="block" overflow="auto">
109
+ {lastMessage}
110
+ </Body>
111
+ }
112
+ />
113
+ ```
114
+
87
115
  ```tsx
88
116
  // Raw colors and `md` do not type-check.
89
117
  <Text color="#666" size="md" />