@stratakit/structures 0.1.0 → 0.2.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.
@@ -1,5 +1,5 @@
1
1
  // inline-css:/home/runner/work/design-system/design-system/packages/structures/src/styles.css
2
- var styles_default = String.raw``;
2
+ var styles_default = String.raw`@layer itwinui.components{@layer base{.🥝-list-item{cursor:pointer;line-height:1.2;font-size:var(--ids-font-size-12);min-block-size:var(--🥝list-item-height,1.75rem);background-color:var(--🥝list-item-background-color);--🥝list-item-background-color:var(--🌀list-item-state--default,transparent)var(--🌀list-item-state--hover,var(--ids-color-bg-glow-on-surface-neutral-hover))var(--🌀list-item-state--pressed,var(--ids-color-bg-glow-on-surface-neutral-pressed))var(--🌀list-item-state--active,var(--ids-color-bg-glow-on-surface-accent-pressed))var(--🌀list-item-state--active-hover,var(--ids-color-bg-glow-on-surface-accent-pressed))var(--🌀list-item-state--disabled,transparent);color:var(--🥝list-item-color,var(--🌀list-item-state--default,var(--ids-color-text-neutral-primary))var(--🌀list-item-state--hover,var(--ids-color-text-neutral-primary))var(--🌀list-item-state--pressed,var(--ids-color-text-neutral-primary))var(--🌀list-item-state--active,var(--ids-color-text-accent-strong))var(--🌀list-item-state--active-hover,var(--ids-color-text-accent-strong))var(--🌀list-item-state--disabled,var(--ids-color-text-neutral-disabled)));--🥝icon-color:var(--🌀list-item-state--default,var(--ids-color-icon-neutral-base))var(--🌀list-item-state--hover,var(--ids-color-icon-neutral-hover))var(--🌀list-item-state--pressed,var(--ids-color-icon-neutral-hover))var(--🌀list-item-state--active,var(--ids-color-icon-accent-strong))var(--🌀list-item-state--active-hover,var(--ids-color-icon-accent-strong))var(--🌀list-item-state--disabled,var(--ids-color-icon-neutral-disabled));grid-template-columns:[decoration-before-start]auto[decoration-before-end content-start]minmax(0,1fr)[content-end decoration-after-start]auto[decoration-after-end];align-content:center;align-items:center;padding-inline:.5rem;display:grid}}@layer states{@media (any-hover:hover){.🥝-list-item:where(:hover){--🌀list-item-state:var(--🌀list-item-state--hover)}}.🥝-list-item:where(:active){--🌀list-item-state:var(--🌀list-item-state--pressed)}.🥝-list-item:where(:disabled,[aria-disabled=true]){--🌀list-item-state:var(--🌀list-item-state--disabled);cursor:not-allowed}}@layer modifiers{.🥝-list-item:where(:has(>:nth-child(2 of .🥝-list-item-content))){--🥝list-item-height:2.75rem;grid-template-rows:repeat(auto-fit,minmax(0,auto))}}@layer base.🌀{.🥝-list-item{--🌀list-item-state:var(--🌀list-item-state--default);--🌀list-item-state--default:var(--🌀list-item-state, );--🌀list-item-state--hover:var(--🌀list-item-state, );--🌀list-item-state--pressed:var(--🌀list-item-state, );--🌀list-item-state--active:var(--🌀list-item-state, );--🌀list-item-state--active-hover:var(--🌀list-item-state, );--🌀list-item-state--disabled:var(--🌀list-item-state, )}}@layer base{.🥝-list-item-content{grid-column:content}}@layer base{.🥝-list-item-decoration{grid-area:1/decoration-before/-1;align-self:start;align-items:center;margin-inline-end:.25rem;display:flex}:where(.🥝-list-item-content)~.🥝-list-item-decoration{grid-column:decoration-after;margin-inline:.25rem 0}}@media (forced-colors:active){.🥝-list-item:where(:disabled,[aria-disabled=true]){color:graytext}}.🥝-accordion-item{--🥝accordion-item-gap:12px;--🥝accordion-item-padding:12px}@layer base{.🥝-accordion-item{contain:paint;border-block-end:1px solid var(--ids-color-border-neutral-muted);grid-template-rows:[header-start]auto[header-end content-start]auto[content-end];grid-template-columns:[decoration-before-start]auto[decoration-before-end content-start]minmax(0,1fr)[content-end decoration-after-start]auto[decoration-after-end];display:grid}}@layer states{.🥝-accordion-item:where([data-kiwi-open=true]){--🥝chevron-down-rotate:-.5turn}}@layer base{.🥝-accordion-item-header{padding:var(--🥝accordion-item-padding);grid-area:header/decoration-before-start/header/decoration-after-end;grid-template-columns:inherit;align-items:center;display:grid;position:relative}@supports (grid-template-columns:subgrid){.🥝-accordion-item-header{grid-template-columns:subgrid}}}@layer base{.🥝-accordion-item-marker{pointer-events:none;grid-area:1/decoration-after;margin-inline-start:var(--🥝accordion-item-gap);margin-inline-end:calc(-1*var(--🥝ghost-inline-offset))}}@layer states{@media (any-hover:hover){:where(.🥝-accordion-item-header:hover) .🥝-accordion-item-marker{--🌀button-state:var(--🌀button-state--hover)}}}@layer base{.🥝-accordion-item-label.🥝-text{-webkit-hyphens:auto;hyphens:auto;overflow-wrap:break-word;text-box:cap alphabetic;font-weight:500;display:inline-block}}@layer base{.🥝-accordion-item-button{cursor:pointer;--🥝focus-outline-offset:-4px;border-radius:12px;grid-column:content}.🥝-accordion-item-button:after{content:"";border-radius:inherit;position:absolute;inset:0}}@layer states{.🥝-accordion-item-button:focus-visible{outline:0}.🥝-accordion-item-button:focus-visible:after{outline:var(--🥝focus-outline);outline-offset:var(--🥝focus-outline-offset)}}@layer base{.🥝-accordion-item-content{text-box:cap alphabetic;color:var(--ids-color-text-neutral-secondary);grid-area:content;padding-block-end:var(--🥝accordion-item-padding)}}@layer base{.🥝-accordion-item-decoration{grid-column:decoration-before;margin-inline-end:var(--🥝accordion-item-gap)}}@layer base{.🥝-accordion-item-heading{text-box:cap alphabetic;grid-column:content;margin-block:0}}@layer base{.🥝-banner{background-color:var(--🥝banner-color-background);border:1px solid var(--🥝banner-color-border);border-radius:8px;grid-template-columns:[start]auto[content]minmax(0,1fr)[end]auto;align-items:center;inline-size:100%;padding:12px;display:grid}}@layer modifiers{.🥝-banner:where([data-kiwi-variant=outline]){--🥝banner-color-background:var(--ids-color-bg-elevation-base)}.🥝-banner:where([data-kiwi-variant=outline]):where([data-kiwi-tone=neutral]){--🥝banner-color-border:var(--ids-color-border-neutral-base)}.🥝-banner:where([data-kiwi-tone=info]){--🥝banner-color-border:var(--ids-color-border-info-base);--🥝icon-color:var(--ids-color-icon-info-base)}.🥝-banner:where([data-kiwi-tone=positive]){--🥝banner-color-border:var(--ids-color-border-positive-base);--🥝icon-color:var(--ids-color-icon-positive-base)}.🥝-banner:where([data-kiwi-tone=attention]){--🥝banner-color-border:var(--ids-color-border-attention-base);--🥝icon-color:var(--ids-color-icon-attention-base)}.🥝-banner:where([data-kiwi-tone=critical]){--🥝banner-color-border:var(--ids-color-border-critical-base);--🥝icon-color:var(--ids-color-icon-critical-base)}}@layer base{.🥝-banner-icon{grid-area:1/start;align-self:start;margin-inline-end:8px}}@layer base{.🥝-banner-label{grid-column:content;align-self:start;margin-block-end:4px;font-weight:500}}@layer base{.🥝-banner-message{overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;grid-column:content;overflow:hidden}}@layer base{.🥝-banner-actions{flex-wrap:wrap;grid-column:content;justify-self:start;align-items:baseline;gap:8px;margin-block-start:12px;display:flex}}@layer base{.🥝-banner-dismiss-button{grid-area:1/end;align-self:start;margin-inline-start:12px}}@media (forced-colors:active){.🥝-banner{--🥝icon-color:CanvasText}}@layer base{.🥝-chip{isolation:isolate;--🥝chip-padding-inline:.5rem;padding-inline:var(--🥝chip-padding-inline);border:none;border-radius:9999px;align-items:center;min-block-size:1.5rem;display:inline-flex;position:relative}}.🥝-chip:before{z-index:-1;content:"";border-radius:inherit;border:1px solid var(--ids-color-border-neutral-base);pointer-events:none;position:absolute;inset:0}@layer modifiers{.🥝-chip:where([data-kiwi-variant=solid]){background-color:var(--ids-color-bg-neutral-base)}.🥝-chip:where([data-kiwi-variant=outline]){background-color:var(--ids-color-bg-page-base)}}@layer base{.🥝-chip-dismiss-button.🥝-icon-button{border-radius:inherit;margin-inline-end:calc(-1*var(--🥝chip-padding-inline));position:relative}}@layer base{.🥝-dropdown-menu{background-color:var(--ids-color-bg-elevation-level-1);min-inline-size:min(95vi,164px);box-shadow:var(--ids-shadow-surface-xl);border-radius:8px;flex-direction:column;padding:4px;display:flex}@media (forced-colors:active){.🥝-dropdown-menu{border:1px solid canvastext}}}@layer states{.🥝-dropdown-menu-button:where([aria-expanded=true]){--🥝disclosure-arrow-rotate:.5turn}}@layer base{.🥝-dropdown-menu-item.🥝-list-item{border-radius:4px}}@layer states{.🥝-dropdown-menu-item.🥝-list-item:where([role=menuitemcheckbox]:not([aria-checked=true])){--🥝dropdown-menu-checkmark-visibility:hidden}}@layer base{.🥝-dropdown-menu-item-dot.🥝-dot{align-self:center}}@layer base{.🥝-dropdown-menu-checkmark{visibility:var(--🥝dropdown-menu-checkmark-visibility)}}@layer base{.🥝-dropdown-menu-item-shortcuts{margin-inline-start:.5rem}}@layer base{.🥝-error-region{z-index:1;position:relative}}@layer states{.🥝-error-region:where([data-kiwi-expanded=true]){--🥝chevron-down-rotate:-.5turn;--🥝error-region-header-border-end-radius:0}.🥝-error-region:where([data-kiwi-visible=true]){block-size:2.625rem;padding-block:4px;padding-inline:4px}.🥝-error-region:where([data-kiwi-visible=false]){--🥝error-region-container-display:none}}@layer base{.🥝-error-region-container{isolation:isolate;display:var(--🥝error-region-container-display,flex);border:1px solid var(--ids-color-border-attention-base);background-color:var(--ids-color-bg-elevation-base);box-shadow:var(--ids-shadow-surface-sm);border-radius:8px;flex-direction:column;position:relative}@media (prefers-reduced-motion:no-preference){.🥝-error-region-container:before{content:"";border-radius:inherit;z-index:-1;position:absolute;inset:0}}}@layer base{.🥝-error-region-header{border-start-start-radius:7px;border-start-end-radius:7px;border-end-end-radius:var(--🥝error-region-header-border-end-radius,calc(8px - 1px));border-end-start-radius:var(--🥝error-region-header-border-end-radius,calc(8px - 1px));flex-wrap:wrap;min-block-size:2rem;padding-inline:8px 4px;font-weight:400;transition:border-radius 0s linear .15s}}@layer base{.🥝-error-region-icon{--🥝icon-color:var(--ids-color-icon-attention-base)}}@layer base{.🥝-error-region-label{text-align:start;overflow-wrap:break-word;flex:1;max-inline-size:100%}}@layer base{.🥝-error-region-dialog{transition:max-block-size .15s linear,opacity .15s linear;overflow:hidden}}@layer states{.🥝-error-region-dialog:where(:not([data-enter])){opacity:0}@media (prefers-reduced-motion:no-preference){.🥝-error-region-dialog:where(:not([data-enter])){max-block-size:0}}.🥝-error-region-dialog:where([data-enter]){opacity:1}@media (prefers-reduced-motion:no-preference){.🥝-error-region-dialog:where([data-enter]){max-block-size:calc(348px - 2rem)}@supports (interpolate-size:allow-keywords){.🥝-error-region-dialog:where([data-enter]){max-block-size:max-content}}}}@layer base{.🥝-error-region-items{border-block-start:1px solid var(--ids-color-border-page-base);max-block-size:calc(348px - 2rem);overflow:auto}}@layer base{.🥝-error-region-item{flex-direction:column;padding-block:12px;padding-inline:calc(12px + 1rem) 4px;display:flex}.🥝-error-region-item:where(:not(:nth-child(1 of .🥝-error-region-item))){border-block-start:1px solid var(--ids-color-border-page-base)}}@layer base{.🥝-error-region-item-actions{margin-block-start:8px}}@layer base{.🥝-table:where(table){table-layout:fixed;inline-size:100%}}@layer base{.🥝-table-header{color:var(--ids-color-text-neutral-secondary)}}@layer base{.🥝-table-row:where([role=row]){display:flex}}@layer base{.🥝-table-caption,.🥝-table-cell{overflow-wrap:anywhere;-webkit-hyphens:auto;hyphens:auto;align-content:center;min-block-size:3rem;padding-block:.5rem;padding-inline:1rem .75rem}:is(.🥝-table-caption,.🥝-table-cell):where(th,td){block-size:3rem}}@layer base{.🥝-table-cell{background-color:var(--🌀table-cell-state--default,var(--ids-color-bg-page-base))var(--🌀table-cell-state--hover,color-mix(in oklch,var(--ids-color-bg-page-base)100.0%,var(--ids-color-glow-hue)var(--ids-color-bg-glow-base-hover-\%)));border-block-end:1px solid var(--ids-color-border-neutral-muted);min-inline-size:4rem}.🥝-table-cell:where(:not(th,td)){flex-grow:1;flex-basis:4rem;column-gap:.5rem}.🥝-table-cell:where(th){font-weight:inherit}}@layer states{@media (any-hover:hover){.🥝-table-cell:where(:hover){--🌀table-cell-state:var(--🌀table-cell-state--hover)}:where(.🥝-table-row:hover) .🥝-table-cell:where([role=cell],td){--🌀table-cell-state:var(--🌀table-cell-state--hover)}}}@layer base.🌀{.🥝-table-cell{--🌀table-cell-state:var(--🌀table-cell-state--default);--🌀table-cell-state--default:var(--🌀table-cell-state, );--🌀table-cell-state--hover:var(--🌀table-cell-state, )}}@layer base{.🥝-tab-list{--🥝tab-active-stripe-gap:8px;--🥝tab-active-stripe-size:2px;--🥝tab-padding-inline:4px;gap:8px;display:flex;position:relative}@supports (position-anchor:--foo){.🥝-tab-list:after{content:"";position-anchor:--🥝active-tab;inline-size:calc(anchor-size(inline) - 2*var(--🥝tab-padding-inline));block-size:var(--🥝tab-active-stripe-size);background-color:var(--🥝tab-active-stripe-color);position:absolute;inset-block-end:calc(anchor(end) - var(--🥝tab-active-stripe-gap));inset-inline-start:calc(anchor(start) + var(--🥝tab-padding-inline))}@media (prefers-reduced-motion:no-preference){.🥝-tab-list:after{transition:inset-inline-start .15s ease-in-out,inline-size .15s ease-in-out}}}}@layer modifiers{.🥝-tab-list[aria-orientation=horizontal]{padding-block-end:var(--🥝tab-active-stripe-gap)}.🥝-tab-list:where([data-kiwi-tone=neutral]){--🥝tab-active-stripe-color:var(--ids-color-border-neutral-inverse)}.🥝-tab-list:where([data-kiwi-tone=accent]){--🥝tab-active-stripe-color:var(--ids-color-border-accent-strong)}}@layer base{.🥝-tab{font-size:var(--ids-font-size-12);color:var(--🥝tab-color);background-color:var(--🥝tab-bg);block-size:1.25rem;padding-inline:var(--🥝tab-padding-inline);-webkit-user-select:none;user-select:none;white-space:nowrap;cursor:pointer;border:none;border-radius:4px;transition:background-color .15s ease-out,color .15s ease-out;position:relative}.🥝-tab:before{content:"";inset-inline:0;inset-block:0 calc(var(--🥝tab-active-stripe-gap)*-1);position:absolute}}@layer modifiers{:where(.🥝-tab-list[data-kiwi-tone=neutral]) .🥝-tab{--🥝tab-bg:var(--🌀tab-state--default,transparent)var(--🌀tab-state--hover,var(--ids-color-bg-glow-on-surface-neutral-hover))var(--🌀tab-state--selected,transparent)var(--🌀tab-state--disabled,transparent);--🥝tab-color:var(--🌀tab-state--default,var(--ids-color-text-neutral-tertiary))var(--🌀tab-state--hover,var(--ids-color-text-neutral-primary))var(--🌀tab-state--selected,var(--ids-color-text-neutral-primary))var(--🌀tab-state--disabled,var(--ids-color-text-neutral-disabled));-webkit-tap-highlight-color:var(--ids-color-bg-glow-on-surface-neutral-pressed)}:where(.🥝-tab-list[data-kiwi-tone=accent]) .🥝-tab{--🥝tab-bg:var(--🌀tab-state--default,transparent)var(--🌀tab-state--hover,var(--ids-color-bg-glow-on-surface-accent-hover))var(--🌀tab-state--selected,transparent)var(--🌀tab-state--disabled,transparent);--🥝tab-color:var(--🌀tab-state--default,var(--ids-color-text-neutral-tertiary))var(--🌀tab-state--hover,var(--ids-color-text-accent-strong))var(--🌀tab-state--selected,var(--ids-color-text-accent-strong))var(--🌀tab-state--disabled,var(--ids-color-text-neutral-disabled));-webkit-tap-highlight-color:var(--ids-color-bg-glow-on-surface-accent-pressed)}}@layer states{.🥝-tab:where([aria-selected=true]){--🌀tab-state:var(--🌀tab-state--selected);anchor-name:--🥝active-tab}@supports not (anchor-name:--foo){.🥝-tab:where([aria-selected=true]):after{content:"";background-color:var(--🥝tab-active-stripe-color);block-size:var(--🥝tab-active-stripe-size);inset-inline:var(--🥝tab-padding-inline);inset-block:auto calc(var(--🥝tab-active-stripe-gap)*-1);position:absolute}}@media (any-hover:hover){.🥝-tab:where(:hover){--🌀tab-state:var(--🌀tab-state--hover)}}.🥝-tab:where(:disabled,[aria-disabled=true]){--🌀tab-state:var(--🌀tab-state--disabled);--🥝tab-active-stripe-color:var(--ids-color-border-neutral-disabled);cursor:not-allowed;-webkit-tap-highlight-color:transparent}}@layer base.🌀{.🥝-tab{--🌀tab-state:var(--🌀tab-state--default);--🌀tab-state--default:var(--🌀tab-state, );--🌀tab-state--hover:var(--🌀tab-state, );--🌀tab-state--selected:var(--🌀tab-state, );--🌀tab-state--disabled:var(--🌀tab-state, )}}@layer base{.🥝-tab-panel{--🥝focus-outline-offset:-2px}.🥝-tab-panel:not([data-open]){display:none!important}}@media (forced-colors:active){.🥝-tab-list,.🥝-tab{--🥝tab-active-stripe-color:CanvasText}.🥝-tab{--🥝tab-color:CanvasText}.🥝-tab:where([aria-selected=true]){forced-color-adjust:none;--🥝tab-bg:SelectedItem;--🥝tab-color:SelectedItemText}.🥝-tab:where(:disabled,[aria-disabled=true]){--🥝tab-color:GrayText}}@layer base{.🥝-toolbar{background-color:var(--ids-color-bg-page-base);box-shadow:var(--ids-shadow-toolbar-base);border-radius:8px;gap:4px;padding:4px;display:inline-flex}}@media (forced-colors:active){.🥝-toolbar{border:1px solid}}@layer base{.🥝-tree{background-color:var(--ids-color-bg-page-base);align-content:start;display:grid;overflow:auto}}@layer base{.🥝-tree-item{min-inline-size:max-content;position:relative}}@layer states{.🥝-tree-item:focus-visible{isolation:isolate;outline:none}.🥝-tree-item:focus-visible:before{content:"";z-index:1;pointer-events:none;outline:var(--🥝focus-outline);outline-offset:-1px;position:absolute;inset:0}@media (any-hover:hover){.🥝-tree-item:where(:not(:hover,:focus-visible,:has(:focus-visible),:has([data-has-popover-open]))){--🥝tree-item-action-visibility:hidden}@supports not selector(:has(+ *)){.🥝-tree-item{--🥝tree-item-action-visibility:visible}}}}@layer base{.🥝-tree-item-node.🥝-list-item{isolation:isolate;--🥝list-item-color:var(--🥝tree-item-color);padding-inline-start:calc(8px + 6px*(var(--🥝tree-item-level) - 1));padding-inline-end:0;position:relative}}@layer modifiers{.🥝-tree-item-node.🥝-list-item:where([data-kiwi-error=true]){--🥝icon-color:var(--ids-color-icon-attention-base);--🥝tree-item-color:var(--ids-color-text-attention-base)}}@layer states{.🥝-tree-item-node.🥝-list-item:where([data-kiwi-selected=true]){--🌀list-item-state:var(--🌀list-item-state--active)}.🥝-tree-item-node.🥝-list-item:where([data-kiwi-expanded=false]){--🥝chevron-down-rotate:-.25turn}.🥝-tree-item-node.🥝-list-item:where(:not([data-kiwi-expanded])){--🥝tree-item-expander-visibility:hidden}}@layer base{.🥝-tree-item-content.🥝-list-item-content{white-space:nowrap}}@layer base{.🥝-tree-item-description.🥝-list-item-content{color:var(--🥝tree-item-color,var(--🌀list-item-state--default,var(--ids-color-text-neutral-secondary)))}}@layer base{.🥝-tree-item-actions-container.🥝-list-item-decoration{background-color:var(--ids-color-bg-page-base);visibility:var(--🥝tree-item-actions-container-visibility,var(--🥝tree-item-action-visibility));align-self:stretch;padding-inline-end:4px;display:inline-flex;position:sticky;inset-inline-end:0}.🥝-tree-item-actions-container.🥝-list-item-decoration:before{content:"";background-color:var(--🥝list-item-background-color);z-index:-1;position:absolute;inset:0}}@layer modifiers{.🥝-tree-item-actions-container.🥝-list-item-decoration:where(:has(.🥝-tree-item-action[data-kiwi-visible=true])){--🥝tree-item-actions-container-visibility:visible}}@layer base{.🥝-tree-item-action.🥝-icon-button{visibility:var(--🥝tree-item-action-visibility);transition:visibility 16ms}}@layer modifiers{.🥝-tree-item-action.🥝-icon-button:where([data-kiwi-visible=false]){--🥝tree-item-action-visibility:hidden}.🥝-tree-item-action.🥝-icon-button:where([data-kiwi-visible=true]){--🥝tree-item-action-visibility:visible}}@layer base{.🥝-tree-item-expander.🥝-icon-button{visibility:var(--🥝tree-item-expander-visibility);z-index:1}}@layer base{.🥝-tree-item-decoration{align-items:center;gap:.25rem;display:flex}}@media (forced-colors:active){.🥝-tree-item-node.🥝-list-item{--🥝list-item-background-color:Canvas;--🥝tree-item-color:CanvasText}.🥝-tree-item-node.🥝-list-item:where([data-kiwi-error=true],[data-kiwi-selected=true]){forced-color-adjust:none}.🥝-tree-item-node.🥝-list-item:where([data-kiwi-error=true]) .🥝-tree-item-content,.🥝-tree-item-node.🥝-list-item:where([data-kiwi-error=true]) .🥝-tree-item-decoration{color:marktext;background-color:mark}.🥝-tree-item-node.🥝-list-item:where([data-kiwi-selected=true]){--🥝list-item-background-color:SelectedItem;--🥝tree-item-color:SelectedItemText}}}`;
3
3
 
4
4
  // src/styles.css.ts
5
5
  var styles_css_default = styles_default;
@@ -0,0 +1,49 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Role } from "@ariakit/react/role";
3
+ import { Text } from "@stratakit/bricks";
4
+ import { forwardRef } from "@stratakit/foundations/secret-internals";
5
+ import cx from "classnames";
6
+ const ListItem = forwardRef((props, forwardedRef) => {
7
+ return /* @__PURE__ */ jsx(
8
+ Role.div,
9
+ {
10
+ role: "listitem",
11
+ ...props,
12
+ className: cx("\u{1F95D}-list-item", props.className),
13
+ ref: forwardedRef
14
+ }
15
+ );
16
+ });
17
+ DEV: ListItem.displayName = "ListItem.Root";
18
+ const ListItemContent = forwardRef(
19
+ (props, forwardedRef) => {
20
+ return /* @__PURE__ */ jsx(
21
+ Text,
22
+ {
23
+ ...props,
24
+ variant: "body-sm",
25
+ className: cx("\u{1F95D}-list-item-content", props.className),
26
+ ref: forwardedRef
27
+ }
28
+ );
29
+ }
30
+ );
31
+ DEV: ListItemContent.displayName = "ListItem.Content";
32
+ const ListItemDecoration = forwardRef(
33
+ (props, forwardedRef) => {
34
+ return /* @__PURE__ */ jsx(
35
+ Role.div,
36
+ {
37
+ ...props,
38
+ className: cx("\u{1F95D}-list-item-decoration", props.className),
39
+ ref: forwardedRef
40
+ }
41
+ );
42
+ }
43
+ );
44
+ DEV: ListItemDecoration.displayName = "ListItem.Decoration";
45
+ export {
46
+ ListItemContent as Content,
47
+ ListItemDecoration as Decoration,
48
+ ListItem as Root
49
+ };
@@ -0,0 +1,61 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import {
3
+ createIconFromPath,
4
+ forwardRef
5
+ } from "@stratakit/foundations/secret-internals";
6
+ import cx from "classnames";
7
+ const Checkmark = createIconFromPath(
8
+ "M13.854 4.146a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3-3a.5.5 0 1 1 .708-.708L6.5 10.793l6.646-6.647a.5.5 0 0 1 .708 0Z"
9
+ );
10
+ DEV: Checkmark.displayName = "Checkmark";
11
+ const Dismiss = createIconFromPath(
12
+ "M4.853 4.146a.5.5 0 1 0-.707.708L7.293 8l-3.147 3.146a.5.5 0 0 0 .707.708L8 8.707l3.146 3.147a.5.5 0 0 0 .707-.708L8.707 8l3.146-3.146a.5.5 0 1 0-.707-.708L8 7.293 4.853 4.146Z"
13
+ );
14
+ DEV: Dismiss.displayName = "Dismiss";
15
+ const statusIcons = {
16
+ positive: createIconFromPath(
17
+ "M7.748 1.726a.5.5 0 0 1 .504 0l5 2.916a.5.5 0 0 1 .248.432v5.852a.5.5 0 0 1-.248.431l-5 2.917a.5.5 0 0 1-.504 0l-5-2.916a.5.5 0 0 1-.248-.432V5.074a.5.5 0 0 1 .248-.432l5-2.916ZM8.756.862a1.5 1.5 0 0 0-1.512 0l-5 2.917A1.5 1.5 0 0 0 1.5 5.074v5.852a1.5 1.5 0 0 0 .744 1.295l5 2.917a1.5 1.5 0 0 0 1.512 0l5-2.917a1.5 1.5 0 0 0 .744-1.295V5.074a1.5 1.5 0 0 0-.744-1.295l-5-2.917Zm2.139 5.445a.5.5 0 0 0-.79-.614L6.953 9.746l-1.1-1.1a.5.5 0 0 0-.707.708l1.5 1.5a.5.5 0 0 0 .749-.047l3.5-4.5Z"
18
+ ),
19
+ attention: createIconFromPath(
20
+ "M8.354 2.06a.5.5 0 0 0-.708 0L2.061 7.647a.5.5 0 0 0 0 .707l5.585 5.586a.5.5 0 0 0 .708 0l5.585-5.586a.5.5 0 0 0 0-.707L8.354 2.061Zm-1.415-.707a1.5 1.5 0 0 1 2.122 0l5.585 5.586a1.5 1.5 0 0 1 0 2.122l-5.585 5.585a1.5 1.5 0 0 1-2.122 0L1.354 9.061a1.5 1.5 0 0 1 0-2.122l5.585-5.586ZM8.75 10.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8.5 8.5v-3a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0Z"
21
+ ),
22
+ critical: createIconFromPath(
23
+ "M8.252 1.726a.5.5 0 0 0-.504 0l-5 2.916a.5.5 0 0 0-.248.432v5.852a.5.5 0 0 0 .248.431l5 2.917a.5.5 0 0 0 .504 0l5-2.916a.5.5 0 0 0 .248-.432V5.074a.5.5 0 0 0-.248-.432l-5-2.916ZM7.244.862a1.5 1.5 0 0 1 1.512 0l5 2.917a1.5 1.5 0 0 1 .744 1.295v5.852a1.5 1.5 0 0 1-.744 1.295l-5 2.917a1.5 1.5 0 0 1-1.512 0l-5-2.917a1.5 1.5 0 0 1-.744-1.295V5.074a1.5 1.5 0 0 1 .744-1.295l5-2.917ZM8.75 10.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8.5 5.5a.5.5 0 0 0-1 0v3a.5.5 0 0 0 1 0v-3Z"
24
+ ),
25
+ info: createIconFromPath(
26
+ "M8 2a6 6 0 1 0 0 12A6 6 0 0 0 8 2ZM1 8a7 7 0 1 1 14 0A7 7 0 0 1 1 8Zm5.5-1.5a.5.5 0 0 0 0 1h1v3h-1a.5.5 0 1 0 0 1h3a.5.5 0 0 0 0-1h-1V7a.5.5 0 0 0-.5-.5H6.5Zm1.375-1a.625.625 0 1 0 0-1.25.625.625 0 0 0 0 1.25Z"
27
+ )
28
+ };
29
+ const StatusIcon = forwardRef(
30
+ (props, forwardedRef) => {
31
+ const { tone, ...rest } = props;
32
+ const Element = statusIcons[tone];
33
+ return /* @__PURE__ */ jsx(Element, { ...rest, ref: forwardedRef });
34
+ }
35
+ );
36
+ DEV: StatusIcon.displayName = "StatusIcon";
37
+ const MoreHorizontal = createIconFromPath(
38
+ "M3 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm6-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm5 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"
39
+ );
40
+ DEV: MoreHorizontal.displayName = "MoreHorizontal";
41
+ const ChevronDownBase = createIconFromPath(
42
+ "M4.146 6.146a.5.5 0 0 1 .708 0L8 9.293l3.146-3.147a.5.5 0 0 1 .708.708l-3.5 3.5a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 0 1 0-.708Z"
43
+ );
44
+ const ChevronDown = forwardRef((props, forwardedRef) => {
45
+ return /* @__PURE__ */ jsx(
46
+ ChevronDownBase,
47
+ {
48
+ ...props,
49
+ className: cx("\u{1F95D}-chevron-down", props.className),
50
+ ref: forwardedRef
51
+ }
52
+ );
53
+ });
54
+ DEV: ChevronDown.displayName = "ChevronDown";
55
+ export {
56
+ Checkmark,
57
+ ChevronDown,
58
+ Dismiss,
59
+ MoreHorizontal,
60
+ StatusIcon
61
+ };
@@ -0,0 +1,113 @@
1
+ import * as React from "react";
2
+ import type { MenuItemCheckboxProps, MenuProviderProps } from "@ariakit/react/menu";
3
+ import type { PredefinedSymbol } from "@stratakit/bricks/secret-internals";
4
+ import type { AnyString, BaseProps, FocusableProps } from "@stratakit/foundations/secret-internals";
5
+ interface DropdownMenuProps extends Pick<MenuProviderProps, "children" | "placement" | "open" | "setOpen" | "defaultOpen"> {
6
+ }
7
+ /**
8
+ * A dropdown menu displays a list of actions or commands when the menu button is clicked.
9
+ *
10
+ * `DropdownMenu` is a compound component with subcomponents exposed for different parts.
11
+ *
12
+ * Example:
13
+ * ```tsx
14
+ * <DropdownMenu.Root>
15
+ * <DropdownMenu.Button>Actions</DropdownMenu.Button>
16
+ *
17
+ * <DropdownMenu.Content>
18
+ * <DropdownMenu.Item label="Add" />
19
+ * <DropdownMenu.Item label="Edit" />
20
+ * <DropdownMenu.Item label="Delete" />
21
+ * </DropdownMenu.Content>
22
+ * </DropdownMenu.Root>
23
+ * ```
24
+ *
25
+ * **Note**: `DropdownMenu` should not be used for navigation; it is only intended for actions.
26
+ */
27
+ declare function DropdownMenuRoot(props: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
28
+ declare namespace DropdownMenuRoot {
29
+ var displayName: string;
30
+ }
31
+ interface DropdownMenuContentProps extends FocusableProps {
32
+ }
33
+ /**
34
+ * The actual "menu" portion containing the items shown within the dropdown.
35
+ *
36
+ * Should be used as a child of `DropdownMenu.Root`.
37
+ */
38
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<DropdownMenuContentProps & React.RefAttributes<HTMLDivElement | HTMLElement>>;
39
+ interface DropdownMenuButtonProps extends FocusableProps<"button"> {
40
+ }
41
+ /**
42
+ * The button that triggers the dropdown menu to open. Should be used as a child of `DropdownMenu.Root`.
43
+ *
44
+ * Example:
45
+ * ```tsx
46
+ * <DropdownMenu.Button>Actions</DropdownMenu.Button>
47
+ * ```
48
+ *
49
+ * By default it will render a solid `Button` with a disclosure arrow. This can be
50
+ * customized by passing a `render` prop.
51
+ *
52
+ * ```tsx
53
+ * <DropdownMenu.Button
54
+ * render={<IconButton variant="ghost" label="More" icon={<Icon href={…} />} />}
55
+ * />
56
+ * ```
57
+ */
58
+ declare const DropdownMenuButton: React.ForwardRefExoticComponent<DropdownMenuButtonProps & React.RefAttributes<HTMLElement | HTMLButtonElement>>;
59
+ interface DropdownMenuItemProps extends Omit<FocusableProps<"button">, "children">, Partial<Pick<DropdownMenuItemShortcutsProps, "shortcuts"> & Pick<DropdownMenuIconProps, "icon">> {
60
+ /** The primary text label for the menu-item. */
61
+ label: React.ReactNode;
62
+ /** Dot shown on the right end of the menu-item. Value will be used as accessible description. */
63
+ unstable_dot?: string;
64
+ }
65
+ /**
66
+ * A single menu item within the dropdown menu. Should be used as a child of `DropdownMenu.Content`.
67
+ *
68
+ * Example:
69
+ * ```tsx
70
+ * <DropdownMenu.Item label="Add" />
71
+ * <DropdownMenu.Item label="Edit" />
72
+ * ```
73
+ */
74
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<DropdownMenuItemProps & React.RefAttributes<HTMLElement | HTMLButtonElement>>;
75
+ interface DropdownMenuItemShortcutsProps extends Omit<BaseProps<"span">, "children"> {
76
+ /**
77
+ * A string defining the keyboard shortcut(s) associated with the menu item.
78
+ *
79
+ * ```tsx
80
+ * shortcuts="S" // A single key shortcut
81
+ * ```
82
+ *
83
+ * Multiple keys should be separated by the `+` character. If one of the keys is
84
+ * recognized as a symbol name or a modifier key, it will be displayed as a symbol.
85
+ *
86
+ * ```tsx
87
+ * shortcuts="Control+Enter" // A multi-key shortcut, displayed as "Ctrl ⏎"
88
+ * ```
89
+ */
90
+ shortcuts: AnyString | `${PredefinedSymbol}+${AnyString}`;
91
+ }
92
+ interface DropdownMenuIconProps extends BaseProps<"svg"> {
93
+ /**
94
+ * An optional icon displayed before the menu-item label.
95
+ *
96
+ * Can be a URL of an SVG from the `@stratakit/icons` package,
97
+ * or a custom JSX icon.
98
+ */
99
+ icon?: string | React.JSX.Element;
100
+ }
101
+ interface DropdownMenuCheckboxItemProps extends Omit<FocusableProps<"button">, "onChange" | "children" | "name">, Pick<MenuItemCheckboxProps, "defaultChecked" | "checked" | "onChange" | "name" | "value">, Pick<DropdownMenuItemProps, "label" | "icon"> {
102
+ }
103
+ /**
104
+ * A single menu item within the dropdown menu. Should be used as a child of `DropdownMenu.Content`.
105
+ *
106
+ * Example:
107
+ * ```tsx
108
+ * <DropdownMenu.CheckboxItem name="add" label="Add" />
109
+ * <DropdownMenu.CheckboxItem name="edit" label="Edit" />
110
+ * ```
111
+ */
112
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLElement | HTMLButtonElement>>;
113
+ export { DropdownMenuRoot as Root, DropdownMenuButton as Button, DropdownMenuContent as Content, DropdownMenuItem as Item, DropdownMenuCheckboxItem as CheckboxItem, };
@@ -0,0 +1,228 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Button as ButtonAk } from "@ariakit/react/button";
3
+ import {
4
+ Menu,
5
+ MenuButton,
6
+ MenuItem,
7
+ MenuItemCheckbox,
8
+ MenuProvider,
9
+ useMenuContext
10
+ } from "@ariakit/react/menu";
11
+ import { usePopoverContext } from "@ariakit/react/popover";
12
+ import { useStoreState } from "@ariakit/react/store";
13
+ import { Button, Kbd } from "@stratakit/bricks";
14
+ import {
15
+ DisclosureArrow,
16
+ Dot,
17
+ predefinedSymbols
18
+ } from "@stratakit/bricks/secret-internals";
19
+ import { Icon } from "@stratakit/foundations";
20
+ import {
21
+ forwardRef,
22
+ usePopoverApi
23
+ } from "@stratakit/foundations/secret-internals";
24
+ import cx from "classnames";
25
+ import * as React from "react";
26
+ import * as ListItem from "./~utils.ListItem.js";
27
+ import { Checkmark } from "./~utils.icons.js";
28
+ function DropdownMenuRoot(props) {
29
+ const {
30
+ children,
31
+ placement,
32
+ open: openProp,
33
+ setOpen: setOpenProp,
34
+ defaultOpen: defaultOpenProp
35
+ } = props;
36
+ return /* @__PURE__ */ jsx(
37
+ MenuProvider,
38
+ {
39
+ placement,
40
+ defaultOpen: defaultOpenProp,
41
+ open: openProp,
42
+ setOpen: setOpenProp,
43
+ popover: usePopoverContext(),
44
+ children
45
+ }
46
+ );
47
+ }
48
+ const DropdownMenuContent = forwardRef(
49
+ (props, forwardedRef) => {
50
+ const popover = usePopoverApi(useMenuContext());
51
+ return /* @__PURE__ */ jsx(
52
+ Menu,
53
+ {
54
+ portal: true,
55
+ unmountOnHide: true,
56
+ ...props,
57
+ gutter: 4,
58
+ style: { ...popover.style, ...props.style },
59
+ wrapperProps: popover.wrapperProps,
60
+ className: cx("\u{1F95D}-dropdown-menu", props.className),
61
+ ref: forwardedRef
62
+ }
63
+ );
64
+ }
65
+ );
66
+ const DropdownMenuButton = forwardRef(
67
+ (props, forwardedRef) => {
68
+ const { accessibleWhenDisabled = true, children, ...rest } = props;
69
+ const open = useStoreState(useMenuContext(), (state) => state?.open);
70
+ return /* @__PURE__ */ jsx(
71
+ MenuButton,
72
+ {
73
+ accessibleWhenDisabled: true,
74
+ render: /* @__PURE__ */ jsxs(Button, { accessibleWhenDisabled, children: [
75
+ children,
76
+ /* @__PURE__ */ jsx(DisclosureArrow, {})
77
+ ] }),
78
+ ...rest,
79
+ className: cx("\u{1F95D}-dropdown-menu-button", props.className),
80
+ "data-has-popover-open": open || void 0,
81
+ ref: forwardedRef
82
+ }
83
+ );
84
+ }
85
+ );
86
+ const DropdownMenuItem = forwardRef(
87
+ (props, forwardedRef) => {
88
+ const { label, shortcuts, icon, unstable_dot, ...rest } = props;
89
+ const dotId = React.useId();
90
+ return /* @__PURE__ */ jsxs(
91
+ MenuItem,
92
+ {
93
+ accessibleWhenDisabled: true,
94
+ render: /* @__PURE__ */ jsx(
95
+ ListItem.Root,
96
+ {
97
+ render: /* @__PURE__ */ jsx(
98
+ ButtonAk,
99
+ {
100
+ accessibleWhenDisabled: true,
101
+ "aria-describedby": dotId,
102
+ ...rest,
103
+ className: cx("\u{1F95D}-dropdown-menu-item", props.className),
104
+ ref: forwardedRef
105
+ }
106
+ )
107
+ }
108
+ ),
109
+ children: [
110
+ icon ? /* @__PURE__ */ jsx(DropdownMenuIcon, { icon }) : null,
111
+ /* @__PURE__ */ jsx(ListItem.Content, { render: /* @__PURE__ */ jsx("span", {}), children: label }),
112
+ shortcuts ? /* @__PURE__ */ jsx(DropdownMenuItemShortcuts, { shortcuts }) : null,
113
+ unstable_dot ? /* @__PURE__ */ jsx(
114
+ ListItem.Decoration,
115
+ {
116
+ render: /* @__PURE__ */ jsx(Dot, { id: dotId, className: "\u{1F95D}-dropdown-menu-item-dot", children: unstable_dot })
117
+ }
118
+ ) : null
119
+ ]
120
+ }
121
+ );
122
+ }
123
+ );
124
+ const DropdownMenuItemShortcuts = forwardRef((props, forwardedRef) => {
125
+ const { shortcuts, ...rest } = props;
126
+ const shortcutKeys = React.useMemo(() => {
127
+ return shortcuts.split("+").map((key) => ({
128
+ key: key.trim(),
129
+ isSymbol: key in predefinedSymbols
130
+ }));
131
+ }, [shortcuts]);
132
+ return /* @__PURE__ */ jsx(
133
+ ListItem.Decoration,
134
+ {
135
+ render: /* @__PURE__ */ jsx("span", {}),
136
+ ...rest,
137
+ className: cx("\u{1F95D}-dropdown-menu-item-shortcuts", props.className),
138
+ ref: forwardedRef,
139
+ children: shortcutKeys.map(({ key, isSymbol }, index) => {
140
+ if (isSymbol) {
141
+ return /* @__PURE__ */ jsx(
142
+ Kbd,
143
+ {
144
+ variant: "ghost",
145
+ symbol: key
146
+ },
147
+ `${key + index}`
148
+ );
149
+ }
150
+ return /* @__PURE__ */ jsx(Kbd, { variant: "ghost", children: key }, `${key + index}`);
151
+ })
152
+ }
153
+ );
154
+ });
155
+ const DropdownMenuIcon = forwardRef(
156
+ (props, forwardedRef) => {
157
+ const { icon, ...rest } = props;
158
+ return /* @__PURE__ */ jsx(
159
+ ListItem.Decoration,
160
+ {
161
+ render: /* @__PURE__ */ jsx(
162
+ Icon,
163
+ {
164
+ href: typeof icon === "string" ? icon : void 0,
165
+ render: React.isValidElement(icon) ? icon : void 0,
166
+ ...rest,
167
+ ref: forwardedRef
168
+ }
169
+ )
170
+ }
171
+ );
172
+ }
173
+ );
174
+ const DropdownMenuCheckboxItem = forwardRef((props, forwardedRef) => {
175
+ const {
176
+ label,
177
+ icon,
178
+ defaultChecked,
179
+ checked,
180
+ onChange,
181
+ name,
182
+ value = defaultChecked ? "on" : void 0,
183
+ // For defaultChecked to work
184
+ ...rest
185
+ } = props;
186
+ return /* @__PURE__ */ jsxs(
187
+ MenuItemCheckbox,
188
+ {
189
+ accessibleWhenDisabled: true,
190
+ defaultChecked,
191
+ checked,
192
+ name,
193
+ value,
194
+ onChange,
195
+ render: /* @__PURE__ */ jsx(
196
+ ListItem.Root,
197
+ {
198
+ render: /* @__PURE__ */ jsx(
199
+ ButtonAk,
200
+ {
201
+ accessibleWhenDisabled: true,
202
+ ...rest,
203
+ className: cx("\u{1F95D}-dropdown-menu-item", props.className),
204
+ ref: forwardedRef
205
+ }
206
+ )
207
+ }
208
+ ),
209
+ children: [
210
+ icon ? /* @__PURE__ */ jsx(DropdownMenuIcon, { icon }) : null,
211
+ /* @__PURE__ */ jsx(ListItem.Content, { render: /* @__PURE__ */ jsx("span", {}), children: label }),
212
+ /* @__PURE__ */ jsx(
213
+ ListItem.Decoration,
214
+ {
215
+ render: /* @__PURE__ */ jsx(Checkmark, { className: "\u{1F95D}-dropdown-menu-checkmark" })
216
+ }
217
+ )
218
+ ]
219
+ }
220
+ );
221
+ });
222
+ export {
223
+ DropdownMenuButton as Button,
224
+ DropdownMenuCheckboxItem as CheckboxItem,
225
+ DropdownMenuContent as Content,
226
+ DropdownMenuItem as Item,
227
+ DropdownMenuRoot as Root
228
+ };
@@ -0,0 +1,83 @@
1
+ import * as React from "react";
2
+ import type { BaseProps } from "@stratakit/foundations/secret-internals";
3
+ interface ErrorRegionRootProps extends Omit<BaseProps, "children"> {
4
+ /**
5
+ * Label for the error header, usually indicating the number of errors displayed.
6
+ * By default this is used as a name of the region navigational landmark, however an explicit `aria-label` or `aria-labelledby` is strongly suggested.
7
+ *
8
+ * Use `undefined` if you don't want to display errors rather than conditionally rendering the component.
9
+ */
10
+ label?: React.ReactNode;
11
+ /**
12
+ * A list of error items where each item describes an individual error. Must be a list of `ErrorRegion.Item` components.
13
+ */
14
+ items?: React.ReactNode;
15
+ /**
16
+ * The controlled open state of the region.
17
+ */
18
+ open?: boolean;
19
+ /**
20
+ * Callback fired when the region is open.
21
+ *
22
+ * Should be used with the `open` prop.
23
+ */
24
+ setOpen?: (open: boolean) => void;
25
+ }
26
+ /**
27
+ * A collapsible region that displays a list of error messages, which might originate from another
28
+ * component, such as `Tree`.
29
+ *
30
+ * This component is rendered as a [region landmark](https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/region.html)
31
+ * and should be labelled either using `label` or `aria-label`/`aria-labelledby`. Changes to the `label` prop will be
32
+ * announced communicated using a [live region](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Guides/Live_regions).
33
+ *
34
+ * Example:
35
+ * ```tsx
36
+ * <ErrorRegion.Root
37
+ * label="3 issues found"
38
+ * items={
39
+ * <>
40
+ * <ErrorRegion.Item message="…" />
41
+ * <ErrorRegion.Item message="…" />
42
+ * <ErrorRegion.Item message="…" />
43
+ * </>
44
+ * }
45
+ * />
46
+ */
47
+ declare const ErrorRegionRoot: React.ForwardRefExoticComponent<ErrorRegionRootProps & React.RefAttributes<HTMLDivElement | HTMLElement>>;
48
+ interface ErrorRegionItemProps extends Omit<BaseProps, "children"> {
49
+ /**
50
+ * The error message. Consumers might consider using `Anchor` component to link to the associated element in the UI.
51
+ */
52
+ message?: React.ReactNode;
53
+ /**
54
+ * The `id` of the message node which can be used to semantically associate the error item with the related UI item i.e. `Tree.Item`.
55
+ */
56
+ messageId?: string;
57
+ /**
58
+ * The actions available for this item. Must be a list of anchors, each rendered as a button using `<Anchor render={<button />} />`.
59
+ */
60
+ actions?: React.ReactNode;
61
+ }
62
+ /**
63
+ * An individual error item within the `ErrorRegion` component. It displays an error message and optional actions.
64
+ *
65
+ * The `messageId` prop can be used to semantically associate the error item with the related UI item, such as a `Tree.Item`.
66
+ *
67
+ * Example:
68
+ * ```tsx
69
+ * <ErrorRegion.Item
70
+ * message={<>Something went wrong with <Anchor href="item-10001">Item 10001</Anchor>.</>}
71
+ * messageId="item-10001-error"
72
+ * actions={<Button>Retry</Button>}
73
+ * />
74
+ *
75
+ * <Tree.Item
76
+ * id="item-10001"
77
+ * label="Item 10001"
78
+ * error="item-10001-error"
79
+ * />
80
+ * ```
81
+ */
82
+ declare const ErrorRegionItem: React.ForwardRefExoticComponent<ErrorRegionItemProps & React.RefAttributes<HTMLDivElement | HTMLElement>>;
83
+ export { ErrorRegionRoot as Root, ErrorRegionItem as Item };