@ds-mo/ui 14.17.0 → 14.17.1

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 +1 @@
1
- {"schemaVersion":1,"package":"@ds-mo/ui","version":"14.17.0","components":75,"digest":"164c8b7610af73d99625b60558788633e533c03a5a440431ef40724142b3e164","completedAt":"2026-08-25T15:33:04.025Z"}
1
+ {"schemaVersion":1,"package":"@ds-mo/ui","version":"14.17.1","components":75,"digest":"8eb90c122e4876b8113eabacc841fb1dcfd71b10b594c1526aca0060228ba168","completedAt":"2026-08-25T16:56:49.434Z"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": "@ds-mo/ui",
4
- "packageVersion": "14.17.0",
4
+ "packageVersion": "14.17.1",
5
5
  "kind": "patterns",
6
6
  "entries": [
7
7
  {
package/dist/agent.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
3
  "package": "@ds-mo/ui",
4
- "packageVersion": "14.17.0",
4
+ "packageVersion": "14.17.1",
5
5
  "kind": "components",
6
6
  "entries": [
7
7
  {
@@ -1990,7 +1990,7 @@
1990
1990
  "An open popup is a transient pressed state rather than a selected one. While expanded is true and haspopup or hasMenu identifies a popup, the pressed wash is held for the popup's complete rendered lifecycle and survives hover without promoting foreground or selected fill, including when chrome opts out of selected fills with activeFill set to false. Expanded disclosure buttons without popup semantics remain visually neutral."
1991
1991
  ],
1992
1992
  "responsiveBehavior": [
1993
- "The consuming layout decides when an icon-label action becomes icon-only and must provide an explicit accessible name after changing variants. Table caption Customize is one such layout: below 900px it uses the icon shape, and a customized catalog promotes the Table icon to primary.",
1993
+ "The consuming layout decides when an icon-label action becomes icon-only and must provide an explicit accessible name after changing variants. Table caption Customize is one such layout: below 900px it uses the icon shape while keeping the same neutral resting foreground regardless of the controlled column configuration.",
1994
1994
  "When collapseLabel is set inside a named ds-table container narrower than 900px, an icon-label caption action omits its label and chevron and becomes icon-only while keeping its accessible name. An active control then promotes the icon to primary.",
1995
1995
  "Use fill width only when the parent layout requires a full-width secondary action."
1996
1996
  ],
@@ -8867,7 +8867,7 @@
8867
8867
  "pattern:menu-trigger"
8868
8868
  ],
8869
8869
  "accessibility": [
8870
- "The rendered structure uses a native table, caption, column headers, row groups, and data cells; keep the caption non-empty. The native caption remains visually hidden as the table's accessible name. When caption visibility is enabled, a 48px header bar renders as component chrome outside the horizontal scrollport. It defaults to a presentational caption title that does not duplicate the accessible name. Application-owned labeled controls supplied through the single named header slot replace that fallback and occupy the leading content width inside the component-owned 8px inset. When columnCustomizer is enabled, the table adds a trailing Customize control named Customize table; the label becomes Customized table when hidden or reordered columns differ from the catalog default. The control is icon-label at typical widths and the icon-only Table menu button below 900px. Otherwise the header slot receives the complete content width.",
8870
+ "The rendered structure uses a native table, caption, column headers, row groups, and data cells; keep the caption non-empty. The native caption remains visually hidden as the table's accessible name. When caption visibility is enabled, a 48px header bar renders as component chrome outside the horizontal scrollport. It defaults to a presentational caption title that does not duplicate the accessible name. Application-owned labeled controls supplied through the single named header slot replace that fallback and occupy the leading content width inside the component-owned 8px inset. When columnCustomizer is enabled, the table adds a trailing Customize control named Customize table. Its label and resting foreground remain neutral when hidden or reordered columns differ from the catalog default. The control is icon-label at typical widths and the icon-only Table menu button below 900px. Otherwise the header slot receives the complete content width.",
8871
8871
  "The data-mode switcher is the shared Menu of the table's supported infinite, pagination, and virtual modes. It uses an Ellipses trigger. The switcher is the final caption-bar action; when the column customizer is also present, a decorative vertical divider separates the two controls. dataMode remains controlled, and the application responds to change intent by supplying the matching records, pagination state, loading behavior, and query consequences. Escape, dismissal, and selection return focus to the trigger.",
8872
8872
  "The column customizer is the shared Menu of switch rows, not a table-owned dialog. Data columns can be shown, hidden, and reordered. Action columns and the selection checkbox never appear in the menu. The last remaining visible data column cannot be hidden, but it stays focusable so it can still be reordered. Escape and outside click restore focus to the trigger. Persistence stays in the application.",
8873
8873
  "Sorting controls remain buttons inside column headers and expose the table's one controlled member-row sort through aria-sort. ds-table-sort in the toolbar trailing cluster is the matching menu of Data and Direction sections; it emits the same dsSortChange shape so header clicks and menu choices stay in sync. Grouping never adds a second sort indicator or header control; the application supplies groups in its fixed product order. Optional column help underlines the header label with the shared dotted decoration and shows ds-tooltip from that label; it does not add a second header control or replace the column name.",
@@ -8878,7 +8878,7 @@
8878
8878
  "Static and infinite tables may show an optional result summary footer when displayedCount and totalCount are finite. Virtual mode shows a total-only summary and ignores displayedCount. Pagination mode instead renders a named Pagination control with a compact selected-size total, vertical divider, and page position; range changes are announced independently with complete phrasing. Unmodified Left and Right Arrow request the adjacent page while focus is inside a paginated table or on a containing page scroller that owns it; editable fields, choice controls, sliders, open menus, and modified key combinations retain their own keyboard behavior. A table-owned footer slot can replace summary copy, while footer-leading and footer-trailing remain available in the same compact-bar anatomy. Nested dialog footers are ignored."
8879
8879
  ],
8880
8880
  "states": [
8881
- "Columns, rows, groups, grouping, sorting, selected row IDs, collapsed group IDs, hiddenColumnIds, columnOrder, dataMode, pagination, displayedCount, totalCount, and incremental-loading state are controlled inputs. Events communicate intent and never mutate those inputs. The optional header is one composable table-local surface: the component owns its 48px chrome, 8px inset on every side, and sticky placement while the application owns the leading slot's internal layout, controls, labels, filtering behavior, and action handling. Opting into dataModeSwitcher and columnCustomizer adds their trailing Menu triggers and requires caption visibility. When both are present, Customize precedes a decorative divider and the data-mode trigger remains the final action. The Customize label becomes Customized when hidden or reordered columns differ from the catalog default. That state is foreground-only: the label goes primary on the icon-label shape, and the Table icon goes primary on the compact icon shape. The table closes one trailing Menu before opening the other. The footer retains its compact-bar composition: application-owned leading status sits left while a controlled result summary or Pagination aligns right, before any trailing action. Content-sized tables remain natural for sparse or fixed-count results. height bounds the complete header, frame, and footer composition. fitViewport reserves the compact-state composition height in the nearest vertical scrollport while growing the visible table into that reservation as surrounding page chrome collapses.",
8881
+ "Columns, rows, groups, grouping, sorting, selected row IDs, collapsed group IDs, hiddenColumnIds, columnOrder, dataMode, pagination, displayedCount, totalCount, and incremental-loading state are controlled inputs. Events communicate intent and never mutate those inputs. The optional header is one composable table-local surface: the component owns its 48px chrome, 8px inset on every side, and sticky placement while the application owns the leading slot's internal layout, controls, labels, filtering behavior, and action handling. Opting into dataModeSwitcher and columnCustomizer adds their trailing Menu triggers and requires caption visibility. When both are present, Customize precedes a decorative divider and the data-mode trigger remains the final action. The Customize trigger keeps one stable label and neutral resting foreground whether or not hiddenColumnIds or columnOrder differ from the catalog default; the configured state remains visible inside the Menu. The table closes one trailing Menu before opening the other. The footer retains its compact-bar composition: application-owned leading status sits left while a controlled result summary or Pagination aligns right, before any trailing action. Content-sized tables remain natural for sparse or fixed-count results. height bounds the complete header, frame, and footer composition. fitViewport reserves the compact-state composition height in the nearest vertical scrollport while growing the visible table into that reservation as surrounding page chrome collapses.",
8882
8882
  "Grouping supports one level. The application supplies groups in a fixed product-defined order and supplies ordered member rows independently. Group section headers show an emphasized text-body-medium label followed by a middle dot and plain secondary loaded progress, for example Critical · 50 of 166. The loaded value comes from the supplied member rows and the total comes from totalCount. A localized countLabel total phrase remains available for the complete assistive progress announcement. Virtual mode shows totals only, for example Critical · 166, because there is no loaded window. Groups may declare an optional intent (brand, neutral, negative, warning, caution, positive) that paints an LTR gradient from the faint intent surface at the label edge into faint neutral at the trailing edge, plus a bold intent title color. Neutral groups remain solid faint neutral. Section separators are painted inside that viewport-width surface so translucent border tokens composite with each intent background. Internal sections keep their separators; a collapsed or empty section header yields its separator only when it is the table's final rendered item. A trailing visually neutral icon-only ButtonUnfilled uses the 24px md double-inset action recipe and toggles controlled collapsedGroupIds, showing ChevronUp while expanded and ChevronDown while collapsed. While any group is expanded, a ChevronDownUp action uses the xs sort-control recipe widened to a table-owned 24px lane and collapses every group. It appears at the inline-end edge of the trailing column declared with kind action when one exists; otherwise a button-hugging 24px by 16px medium-elevation surface floats at the visible scrollport's header edge so the action remains reachable while member columns scroll beneath it. With stickyHeader enabled, each contained section uses its one real section row as a native sticky header inside its real row-group boundary. The browser therefore owns pinning, push-off, scrolling, and resize layout in one pass without a duplicated lane, active-section state, transforms, or scroll-time geometry. Shared grid tracks retain exact header and member-cell alignment. The section surface also stays pinned to the visible horizontal scrollport and spans the smaller of the visible viewport or table width. Virtual grouped tables flatten headers and members into that same scrollport; expanding a section never introduces an inner scroller.",
8883
8883
  "When columnCustomizer is false, columns render in catalog order. When it is true, columns remains the catalog: hiddenColumnIds and columnOrder control visibility and data-column sequence, action columns stay last, cannot be hidden, and remain absent from the customizer Menu, and dsColumnsConfigChange reports the next hidden ids and data-column order without mutating those inputs. The customizer Menu live-applies show/hide and data-column reorder. The table does not persist preferences.",
8884
8884
  "An active member sort toggles only between ascending and descending; activating a different sortable label moves the one sorting state to that key. Applications may still clear the controlled sort state explicitly. Grouping does not introduce another interactive direction.",
@@ -8893,7 +8893,7 @@
8893
8893
  ],
8894
8894
  "responsiveBehavior": [
8895
8895
  "The table keeps native semantics at narrow widths and scrolls horizontally instead of transforming into cards.",
8896
- "Inside the named ds-table container, caption Filter, Group, and Sort controls that opt into collapseLabel become icon-only below 900px by omitting their labels and chevrons. Active filtering or grouping promotes the visible icon to primary. Sort keeps resting secondary chrome because its selection lives in the menu and headers. Customize switches to the icon-only Table menu button below 900px; a customized catalog then promotes that icon to primary.",
8896
+ "Inside the named ds-table container, caption Filter, Group, and Sort controls that opt into collapseLabel become icon-only below 900px by omitting their labels and chevrons. Active filtering or grouping promotes the visible icon to primary. Sort keeps resting secondary chrome because its selection lives in the menu and headers. Customize switches to the icon-only Table menu button below 900px and keeps its neutral resting foreground regardless of the controlled column configuration.",
8897
8897
  "stickyHeader follows the active vertical scroll owner: a maxHeight, height, or fitViewport table keeps its native header and group sections inside one bounded table scrollport, while a document-flow table retains a semantic native header and renders a sticky control header whose columns follow the body's native inline scroll timeline. Consumers set --ds-table-sticky-header-offset when page chrome occupies an unbounded document scrollport edge. When the 48px table header bar is visible, it sticks at that external offset and the column header stacks immediately below it.",
8898
8898
  "fitViewport uses viewportInsetBlockStart and viewportInsetBlockEnd to describe compact surrounding chrome and page gutters relative to the nearest vertical scroll owner. Before the table reaches that compact position, its host reserves the eventual height while the visible composition grows and vertical input remains owned by the outer page. Once settled, the internal table viewport becomes the vertical scroll owner. Bounded grouped tables use browser-native sticky section rows inside real block row-group boundaries, so scroll and resize do not run component JavaScript or trigger reactive section swaps. Document-flow tables retain the synchronized visual lane required by their separate horizontal scrollport.",
8899
8899
  "Without maxHeight the table grows the document and automatic lazy loading observes the browser viewport. Horizontal scrolling chains vertical wheel and trackpad movement to the page instead of trapping it.",
@@ -1,2 +1,2 @@
1
- import{p as s,H as e,c as t,h as i,a as n,t as o}from"./index.js";import{i as r}from"./p-BdnQv7Zl.js";import{d as c}from"./p-a6qP60zb.js";import{d as l}from"./p-NzGRAPcF.js";import{d as a}from"./p-BFfLvMZd.js";import{d}from"./p-JPTkZ3Ji.js";import{d as u}from"./p-Asi9h3pa.js";import{d as m}from"./p-BHDkJmrC.js";import{d as f}from"./p-BhYWdbEp.js";import{d as h}from"./p-y4jhIkRc.js";import{d as b}from"./p-BGXqFq2C.js";const p="direction:asc";const k="direction:desc";const g="field:";function E(s){const e=[];const t=new Set;for(const i of s){if(r(i)||!i.sortable)continue;const s=i.headerSegments?.filter((s=>s.sortKey.trim()))??[];if(s.length>0){for(const i of s){if(t.has(i.sortKey))continue;t.add(i.sortKey);e.push({id:i.sortKey,label:i.label.trim()||i.sortKey})}continue}if(t.has(i.id))continue;t.add(i.id);e.push({id:i.id,label:i.header.trim()||i.headerLabel?.trim()||i.id})}return e}function j(s,e){const t=E(s);return[{header:"Data",items:t.map((s=>({label:s.label,value:`${g}${encodeURIComponent(s.id)}`,isSelected:e?.columnId===s.id})))},{header:"Direction",items:[{label:"Ascending",value:p,icon:"ArrowUp",isSelected:e?.direction==="asc"},{label:"Descending",value:k,icon:"ArrowDown",isSelected:e?.direction==="desc"}]}]}function w(s,e){if(s===e)return true;if(!s||!e)return false;return s.columnId===e.columnId&&s.direction===e.direction}function S(s,e,t){const i=E(s);if(i.length===0)return e??null;if(t.value===p||t.value===k){const s=t.value===p?"asc":"desc";const n=i.some((s=>s.id===e?.columnId))?e.columnId:i[0].id;return{columnId:n,direction:s}}if(!t.value?.startsWith(g))return e??null;let n;try{n=decodeURIComponent(t.value.slice(g.length))}catch{return e??null}if(!i.some((s=>s.id===n)))return e??null;if(e?.columnId===n)return e??null;return{columnId:n,direction:e?.direction??"asc"}}const x=()=>`.sc-ds-table-sort-h{display:inline-flex;min-inline-size:0;max-inline-size:var(--dimension-menu-width-xs)}[hidden].sc-ds-table-sort-h{display:none}`;let y=0;const C=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsSortChange=t(this,"dsSortChange",3);this.columns=[];this.sort=null;this.ariaLabel=null;this.menuOpen=false;this.initialFocusVisible=false;this.componentId=`ds-table-sort-${++y}`;this.triggerId=`${this.componentId}-trigger`;this.menuId=`${this.componentId}-menu`}async setFocus(){const s=this.el.querySelector(`#${CSS.escape(this.triggerId)}`);await(s?.setFocus?.())}render(){const s=E(this.columns);const e=this.ariaLabel?.trim()||"Sort table";return i(n,{key:"d5d0c2d0bdcc0c28ccd85870b39c41d7b2a30844",hidden:s.length===0?true:undefined},s.length===0?null:i("ds-button-unfilled",{id:this.triggerId,variant:"icon-label",size:"md",icon:"ArrowsVertical",label:"Sort","aria-label":e,hasMenu:true,collapseLabel:true,expanded:this.menuOpen,controls:this.menuId,onDsClick:s=>{this.toggle(s.detail.detail===0)}}),s.length===0?null:i("ds-menu",{id:this.menuId,open:this.menuOpen,anchorId:this.triggerId,align:"end",side:"bottom",menuLabel:e,selectionMode:"none",initialFocusVisible:this.initialFocusVisible,sections:j(this.columns,this.sort),onDsClose:()=>this.close(),onDsSelect:s=>this.handleSelect(s.detail)}))}toggle(s=false){if(this.menuOpen)this.close();else this.open(s)}open(s=false){if(this.menuOpen)return;this.initialFocusVisible=s;this.menuOpen=true}close(){this.menuOpen=false}handleSelect(s){const e=S(this.columns,this.sort,s);if(w(this.sort,e))return;this.dsSortChange.emit({sort:e})}get el(){return this}static get style(){return x()}},[2,"ds-table-sort",{columns:[16],sort:[16],ariaLabel:[1,"aria-label"],menuOpen:[32],initialFocusVisible:[32],setFocus:[64]}]);function D(){if(typeof customElements==="undefined"){return}const s=["ds-table-sort","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-swatch-picker","ds-switch","ds-tag","ds-text"];s.forEach((s=>{switch(s){case"ds-table-sort":if(!customElements.get(o(s))){customElements.define(o(s),C)}break;case"ds-badge":if(!customElements.get(o(s))){c()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){l()}break;case"ds-icon":if(!customElements.get(o(s))){a()}break;case"ds-loader":if(!customElements.get(o(s))){d()}break;case"ds-menu":if(!customElements.get(o(s))){u()}break;case"ds-swatch-picker":if(!customElements.get(o(s))){m()}break;case"ds-switch":if(!customElements.get(o(s))){f()}break;case"ds-tag":if(!customElements.get(o(s))){h()}break;case"ds-text":if(!customElements.get(o(s))){b()}break}}))}D();const v=C;const F=D;export{v as DsTableSort,F as defineCustomElement};
1
+ import{p as s,H as e,c as t,h as i,a as n,t as o}from"./index.js";import{i as r}from"./p-BMERUCe1.js";import{d as c}from"./p-a6qP60zb.js";import{d as l}from"./p-NzGRAPcF.js";import{d as a}from"./p-BFfLvMZd.js";import{d}from"./p-JPTkZ3Ji.js";import{d as u}from"./p-Asi9h3pa.js";import{d as m}from"./p-BHDkJmrC.js";import{d as f}from"./p-BhYWdbEp.js";import{d as h}from"./p-y4jhIkRc.js";import{d as b}from"./p-BGXqFq2C.js";const p="direction:asc";const k="direction:desc";const g="field:";function E(s){const e=[];const t=new Set;for(const i of s){if(r(i)||!i.sortable)continue;const s=i.headerSegments?.filter((s=>s.sortKey.trim()))??[];if(s.length>0){for(const i of s){if(t.has(i.sortKey))continue;t.add(i.sortKey);e.push({id:i.sortKey,label:i.label.trim()||i.sortKey})}continue}if(t.has(i.id))continue;t.add(i.id);e.push({id:i.id,label:i.header.trim()||i.headerLabel?.trim()||i.id})}return e}function j(s,e){const t=E(s);return[{header:"Data",items:t.map((s=>({label:s.label,value:`${g}${encodeURIComponent(s.id)}`,isSelected:e?.columnId===s.id})))},{header:"Direction",items:[{label:"Ascending",value:p,icon:"ArrowUp",isSelected:e?.direction==="asc"},{label:"Descending",value:k,icon:"ArrowDown",isSelected:e?.direction==="desc"}]}]}function w(s,e){if(s===e)return true;if(!s||!e)return false;return s.columnId===e.columnId&&s.direction===e.direction}function S(s,e,t){const i=E(s);if(i.length===0)return e??null;if(t.value===p||t.value===k){const s=t.value===p?"asc":"desc";const n=i.some((s=>s.id===e?.columnId))?e.columnId:i[0].id;return{columnId:n,direction:s}}if(!t.value?.startsWith(g))return e??null;let n;try{n=decodeURIComponent(t.value.slice(g.length))}catch{return e??null}if(!i.some((s=>s.id===n)))return e??null;if(e?.columnId===n)return e??null;return{columnId:n,direction:e?.direction??"asc"}}const x=()=>`.sc-ds-table-sort-h{display:inline-flex;min-inline-size:0;max-inline-size:var(--dimension-menu-width-xs)}[hidden].sc-ds-table-sort-h{display:none}`;let C=0;const y=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.dsSortChange=t(this,"dsSortChange",3);this.columns=[];this.sort=null;this.ariaLabel=null;this.menuOpen=false;this.initialFocusVisible=false;this.componentId=`ds-table-sort-${++C}`;this.triggerId=`${this.componentId}-trigger`;this.menuId=`${this.componentId}-menu`}async setFocus(){const s=this.el.querySelector(`#${CSS.escape(this.triggerId)}`);await(s?.setFocus?.())}render(){const s=E(this.columns);const e=this.ariaLabel?.trim()||"Sort table";return i(n,{key:"d5d0c2d0bdcc0c28ccd85870b39c41d7b2a30844",hidden:s.length===0?true:undefined},s.length===0?null:i("ds-button-unfilled",{id:this.triggerId,variant:"icon-label",size:"md",icon:"ArrowsVertical",label:"Sort","aria-label":e,hasMenu:true,collapseLabel:true,expanded:this.menuOpen,controls:this.menuId,onDsClick:s=>{this.toggle(s.detail.detail===0)}}),s.length===0?null:i("ds-menu",{id:this.menuId,open:this.menuOpen,anchorId:this.triggerId,align:"end",side:"bottom",menuLabel:e,selectionMode:"none",initialFocusVisible:this.initialFocusVisible,sections:j(this.columns,this.sort),onDsClose:()=>this.close(),onDsSelect:s=>this.handleSelect(s.detail)}))}toggle(s=false){if(this.menuOpen)this.close();else this.open(s)}open(s=false){if(this.menuOpen)return;this.initialFocusVisible=s;this.menuOpen=true}close(){this.menuOpen=false}handleSelect(s){const e=S(this.columns,this.sort,s);if(w(this.sort,e))return;this.dsSortChange.emit({sort:e})}get el(){return this}static get style(){return x()}},[2,"ds-table-sort",{columns:[16],sort:[16],ariaLabel:[1,"aria-label"],menuOpen:[32],initialFocusVisible:[32],setFocus:[64]}]);function D(){if(typeof customElements==="undefined"){return}const s=["ds-table-sort","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-menu","ds-swatch-picker","ds-switch","ds-tag","ds-text"];s.forEach((s=>{switch(s){case"ds-table-sort":if(!customElements.get(o(s))){customElements.define(o(s),y)}break;case"ds-badge":if(!customElements.get(o(s))){c()}break;case"ds-button-unfilled":if(!customElements.get(o(s))){l()}break;case"ds-icon":if(!customElements.get(o(s))){a()}break;case"ds-loader":if(!customElements.get(o(s))){d()}break;case"ds-menu":if(!customElements.get(o(s))){u()}break;case"ds-swatch-picker":if(!customElements.get(o(s))){m()}break;case"ds-switch":if(!customElements.get(o(s))){f()}break;case"ds-tag":if(!customElements.get(o(s))){h()}break;case"ds-text":if(!customElements.get(o(s))){b()}break}}))}D();const F=y;const v=D;export{F as DsTableSort,v as defineCustomElement};
2
2
  //# sourceMappingURL=ds-table-sort.js.map