@ds-mo/ui 5.0.0 → 6.0.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.
Files changed (136) hide show
  1. package/dist/.build-stamp +1 -1
  2. package/dist/agent.json +242 -66
  3. package/dist/angular/boolean-value-accessor.d.ts +1 -1
  4. package/dist/angular/boolean-value-accessor.js +2 -2
  5. package/dist/angular/ds-badge.d.ts +1 -1
  6. package/dist/angular/ds-badge.js +3 -3
  7. package/dist/angular/ds-switch.d.ts +15 -0
  8. package/dist/angular/{ds-toggle.js → ds-switch.js} +12 -12
  9. package/dist/angular/index.d.ts +1 -1
  10. package/dist/angular/index.js +1 -1
  11. package/dist/angular/proxies.d.ts +1 -1
  12. package/dist/angular/proxies.js +1 -1
  13. package/dist/components/ds-app-shell.js +1 -1
  14. package/dist/components/ds-app-shell.js.map +1 -1
  15. package/dist/components/ds-badge.js +1 -1
  16. package/dist/components/ds-banner.js +1 -1
  17. package/dist/components/ds-banner.js.map +1 -1
  18. package/dist/components/ds-bar-nav.js +1 -1
  19. package/dist/components/ds-bar-nav.js.map +1 -1
  20. package/dist/components/ds-button-filled.js +1 -1
  21. package/dist/components/ds-button-unfilled.js +1 -1
  22. package/dist/components/ds-card-data-viz-donut.js +1 -1
  23. package/dist/components/ds-card-data-viz-donut.js.map +1 -1
  24. package/dist/components/ds-card-setting.js +1 -1
  25. package/dist/components/ds-card.js +1 -1
  26. package/dist/components/ds-chart-bar.js +1 -1
  27. package/dist/components/ds-chart-donut.js +1 -1
  28. package/dist/components/ds-chart-donut.js.map +1 -1
  29. package/dist/components/ds-chart-legend.js +1 -1
  30. package/dist/components/ds-chart-legend.js.map +1 -1
  31. package/dist/components/ds-chart-line.js +1 -1
  32. package/dist/components/ds-checkbox.js +1 -1
  33. package/dist/components/ds-checkbox.js.map +1 -1
  34. package/dist/components/ds-chip.js +1 -1
  35. package/dist/components/ds-chip.js.map +1 -1
  36. package/dist/components/ds-empty-state.js +1 -1
  37. package/dist/components/ds-field.js +1 -1
  38. package/dist/components/ds-input.js +1 -1
  39. package/dist/components/ds-loader.js +1 -1
  40. package/dist/components/ds-loader.js.map +1 -1
  41. package/dist/components/ds-menu.js +1 -1
  42. package/dist/components/ds-modal.js +1 -1
  43. package/dist/components/ds-modal.js.map +1 -1
  44. package/dist/components/ds-pagination.js +1 -1
  45. package/dist/components/ds-panel-nav.js +1 -1
  46. package/dist/components/ds-panel-nav.js.map +1 -1
  47. package/dist/components/ds-panel-tools.js +1 -1
  48. package/dist/components/ds-panel-tools.js.map +1 -1
  49. package/dist/components/ds-radio-group.js +1 -1
  50. package/dist/components/ds-radio-group.js.map +1 -1
  51. package/dist/components/ds-select.js +1 -1
  52. package/dist/components/ds-select.js.map +1 -1
  53. package/dist/components/ds-shell-gradient-picker.js +1 -1
  54. package/dist/components/ds-shell-gradient-swatch.js +1 -1
  55. package/dist/components/ds-slider.js +1 -1
  56. package/dist/components/ds-slider.js.map +1 -1
  57. package/dist/components/{ds-toggle.d.ts → ds-switch.d.ts} +4 -4
  58. package/dist/components/ds-switch.js +2 -0
  59. package/dist/components/ds-switch.js.map +1 -0
  60. package/dist/components/ds-tab-group-nav.js +1 -1
  61. package/dist/components/ds-tab-group.js +1 -1
  62. package/dist/components/ds-tab-group.js.map +1 -1
  63. package/dist/components/ds-table.js +1 -1
  64. package/dist/components/ds-tag.js +1 -1
  65. package/dist/components/ds-tag.js.map +1 -1
  66. package/dist/components/ds-text.js +1 -1
  67. package/dist/components/ds-tooltip-data-viz.js +1 -1
  68. package/dist/components/ds-tooltip-data-viz.js.map +1 -1
  69. package/dist/components/ds-tooltip.js +1 -1
  70. package/dist/components/p-B-cWYMqs.js +2 -0
  71. package/dist/components/p-B-cWYMqs.js.map +1 -0
  72. package/dist/components/{p-BvmooLHV.js → p-BHtg1fh3.js} +2 -2
  73. package/dist/components/p-BHtg1fh3.js.map +1 -0
  74. package/dist/components/p-BmiNX9Mc.js +2 -0
  75. package/dist/components/p-BmiNX9Mc.js.map +1 -0
  76. package/dist/components/{p-CKjNw4Tl.js → p-CWd8L7Fk.js} +2 -2
  77. package/dist/components/p-CxOQaZ4f.js +2 -0
  78. package/dist/components/{p-DhO43V4c.js.map → p-CxOQaZ4f.js.map} +1 -1
  79. package/dist/components/p-D5wc8lKR.js +2 -0
  80. package/dist/components/p-D5wc8lKR.js.map +1 -0
  81. package/dist/components/p-DPxfMUfH.js +2 -0
  82. package/dist/components/{p-BX7jIHFD.js.map → p-DPxfMUfH.js.map} +1 -1
  83. package/dist/components/p-DhgDNluD.js +2 -0
  84. package/dist/components/p-DhgDNluD.js.map +1 -0
  85. package/dist/components/{p-ZdSNIObv.js → p-DkIbxCpi.js} +2 -2
  86. package/dist/components/p-_OGE_E6L.js +2 -0
  87. package/dist/components/{p-CRrGwSt7.js.map → p-_OGE_E6L.js.map} +1 -1
  88. package/dist/components/{p-D7RssoPm.js → p-bl7d1jB2.js} +2 -2
  89. package/dist/components/p-cgo-rgl4.js +2 -0
  90. package/dist/components/p-cgo-rgl4.js.map +1 -0
  91. package/dist/docs/components.json +504 -364
  92. package/dist/lib/nav/index.js +15 -2
  93. package/dist/lib/nav/index.js.map +2 -2
  94. package/dist/lib/utils/index.d.ts +1 -1
  95. package/dist/lib/utils/index.js +8 -0
  96. package/dist/lib/utils/index.js.map +2 -2
  97. package/dist/lib/utils/resolve-css-time-ms.d.ts +7 -0
  98. package/dist/react/components.d.ts +1 -1
  99. package/dist/react/components.js +1 -1
  100. package/dist/react/{ds-toggle.d.ts → ds-switch.d.ts} +5 -5
  101. package/dist/react/{ds-toggle.js → ds-switch.js} +5 -5
  102. package/dist/types/components/Badge/Badge.d.ts +0 -2
  103. package/dist/types/components/Menu/Menu.d.ts +1 -0
  104. package/dist/types/components/Menu/menu-types.d.ts +3 -2
  105. package/dist/types/components/Modal/Modal.d.ts +1 -0
  106. package/dist/types/components/PanelTools/PanelTools.d.ts +5 -0
  107. package/dist/types/components/PanelTools/panel-tools-utils.d.ts +7 -0
  108. package/dist/types/components/Select/Select.d.ts +1 -1
  109. package/dist/types/components/Switch/Switch.d.ts +40 -0
  110. package/dist/types/components/Switch/index.d.ts +2 -0
  111. package/dist/types/components/Tooltip/Tooltip.d.ts +14 -2
  112. package/dist/types/components/Tooltip/tooltip-position.d.ts +21 -0
  113. package/dist/types/components.d.ts +143 -105
  114. package/dist/types/utils/index.d.ts +1 -1
  115. package/dist/types/utils/resolve-css-time-ms.d.ts +7 -0
  116. package/package.json +2 -2
  117. package/dist/angular/ds-toggle.d.ts +0 -15
  118. package/dist/components/ds-toggle.js +0 -2
  119. package/dist/components/ds-toggle.js.map +0 -1
  120. package/dist/components/p-BCiKXnx7.js +0 -2
  121. package/dist/components/p-BCiKXnx7.js.map +0 -1
  122. package/dist/components/p-BX7jIHFD.js +0 -2
  123. package/dist/components/p-BieM8MH5.js +0 -2
  124. package/dist/components/p-BieM8MH5.js.map +0 -1
  125. package/dist/components/p-BvmooLHV.js.map +0 -1
  126. package/dist/components/p-CRrGwSt7.js +0 -2
  127. package/dist/components/p-D-7A_rRS.js +0 -2
  128. package/dist/components/p-D-7A_rRS.js.map +0 -1
  129. package/dist/components/p-DhO43V4c.js +0 -2
  130. package/dist/components/p-K6uLVQKX.js +0 -2
  131. package/dist/components/p-K6uLVQKX.js.map +0 -1
  132. package/dist/types/components/Toggle/Toggle.d.ts +0 -22
  133. package/dist/types/components/Toggle/index.d.ts +0 -2
  134. /package/dist/components/{p-CKjNw4Tl.js.map → p-CWd8L7Fk.js.map} +0 -0
  135. /package/dist/components/{p-ZdSNIObv.js.map → p-DkIbxCpi.js.map} +0 -0
  136. /package/dist/components/{p-D7RssoPm.js.map → p-bl7d1jB2.js.map} +0 -0
package/dist/.build-stamp CHANGED
@@ -1 +1 @@
1
- 1783964096571
1
+ 1783987573003
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": "5.0.0",
4
+ "packageVersion": "6.0.0",
5
5
  "kind": "components",
6
6
  "entries": [
7
7
  {
@@ -147,10 +147,6 @@
147
147
  "type": "boolean",
148
148
  "required": false
149
149
  },
150
- "isSelected": {
151
- "type": "boolean",
152
- "required": false
153
- },
154
150
  "label": {
155
151
  "type": "string | undefined",
156
152
  "required": false
@@ -1434,15 +1430,15 @@
1434
1430
  "tag": "ds-menu",
1435
1431
  "name": "menu",
1436
1432
  "title": "Menu",
1437
- "summary": "Anchored action or option menu with flat items, grouped sections, selection, supplemental notification dots, toggles, and destructive actions.",
1433
+ "summary": "Anchored action or option menu with flat items, grouped sections, selection, supplemental notification dots, switches, and destructive actions.",
1438
1434
  "intentStatus": "complete",
1439
1435
  "intent": {
1440
1436
  "audience": "general",
1441
1437
  "status": "stable",
1442
- "summary": "Anchored action or option menu with flat items, grouped sections, selection, supplemental notification dots, toggles, and destructive actions.",
1438
+ "summary": "Anchored action or option menu with flat items, grouped sections, selection, supplemental notification dots, switches, and destructive actions.",
1443
1439
  "useWhen": [
1444
1440
  "A trigger reveals a short contextual list of commands or options.",
1445
- "Options need grouping, selected state, supplemental notification dots, toggle rows, or destructive treatment."
1441
+ "Options need grouping, selected state, supplemental notification dots, switch rows, or destructive treatment."
1446
1442
  ],
1447
1443
  "avoidWhen": [
1448
1444
  "The user is selecting a value for a form field.",
@@ -1464,17 +1460,20 @@
1464
1460
  "commonlyComposedWith": [
1465
1461
  "component:ds-button-unfilled",
1466
1462
  "component:ds-panel-nav",
1463
+ "component:ds-switch",
1467
1464
  "component:ds-shell-gradient-picker"
1468
1465
  ],
1469
1466
  "accessibility": [
1470
1467
  "Anchor the menu to the control that opens it and return focus to that control when the menu closes.",
1471
1468
  "Open with visible initial focus only when the trigger was activated from the keyboard.",
1472
1469
  "Keep disabled items discoverable only when their unavailable state is meaningful.",
1470
+ "Switch rows use menuitemcheckbox semantics on the row; the nested ds-switch is an aria-hidden presentation indicator.",
1473
1471
  "Use notification dots only as supplemental status and not as the sole indication of important information."
1474
1472
  ],
1475
1473
  "states": [
1476
1474
  "The host owns open state and responds to selection and close events.",
1477
1475
  "Use either flat items or sections, not both.",
1476
+ "After dsSelect from a switch row, update switchValue in the items property so the controlled indicator reflects the new state.",
1478
1477
  "Arrays, objects, and element anchors must be assigned as JavaScript properties.",
1479
1478
  "Use one gradient-picker section in the user or account Appearance or Theme menu for the global AppShell wash preference; apply dsGradientSelect immediately without closing the menu."
1480
1479
  ],
@@ -1587,6 +1586,7 @@
1587
1586
  "componentDependencies": [
1588
1587
  "badge",
1589
1588
  "shell-gradient-picker",
1589
+ "switch",
1590
1590
  "text"
1591
1591
  ]
1592
1592
  },
@@ -2581,6 +2581,158 @@
2581
2581
  "text"
2582
2582
  ]
2583
2583
  },
2584
+ {
2585
+ "id": "component:ds-switch",
2586
+ "tag": "ds-switch",
2587
+ "name": "switch",
2588
+ "title": "Switch",
2589
+ "summary": "Compact on/off setting control for changes that take effect immediately, with three sizes and form-associated behavior.",
2590
+ "intentStatus": "complete",
2591
+ "intent": {
2592
+ "audience": "general",
2593
+ "status": "stable",
2594
+ "summary": "Compact on/off setting control for changes that take effect immediately, with three sizes and form-associated behavior.",
2595
+ "useWhen": [
2596
+ "A binary setting takes effect immediately when the user turns it on or off.",
2597
+ "A settings, form, or menu row needs a compact on/off control.",
2598
+ "The checked value needs native form submission, required validation, reset, or external form association."
2599
+ ],
2600
+ "avoidWhen": [
2601
+ "The user is providing consent, acknowledging a statement, or selecting multiple independent choices.",
2602
+ "The user must choose one option from a mutually exclusive set.",
2603
+ "The interaction triggers a one-time action instead of maintaining an on/off state."
2604
+ ],
2605
+ "alternatives": [
2606
+ {
2607
+ "when": "The interaction represents consent, acknowledgment, or multi-select choices.",
2608
+ "component": "component:ds-checkbox",
2609
+ "reason": "Checkbox semantics communicate selection or agreement rather than an immediately applied setting."
2610
+ },
2611
+ {
2612
+ "when": "The user must choose one option from a mutually exclusive group.",
2613
+ "component": "component:ds-radio-group",
2614
+ "reason": "RadioGroup communicates one-of-many selection."
2615
+ },
2616
+ {
2617
+ "when": "The control triggers a one-time command or submission.",
2618
+ "component": "component:ds-button-filled",
2619
+ "reason": "Button semantics communicate an action rather than persistent state."
2620
+ }
2621
+ ],
2622
+ "commonlyComposedWith": [
2623
+ "component:ds-field",
2624
+ "component:ds-menu",
2625
+ "component:ds-text"
2626
+ ],
2627
+ "accessibility": [
2628
+ "Every standalone switch requires an accessible name from a native label, aria-label, or aria-labelledby.",
2629
+ "Checked state is exposed through switch semantics and thumb position, so state does not rely on color alone.",
2630
+ "Read-only switches remain focusable and submitted but cannot change; inactive or disabled switches leave the tab order and are omitted from form submission.",
2631
+ "Use presentation mode only when a composite owner such as a menuitemcheckbox provides the interaction and accessible state."
2632
+ ],
2633
+ "states": [
2634
+ "Activation updates checked immediately and emits dsChange with the new boolean value.",
2635
+ "The initial checked value is the form-reset baseline; unchecked switches submit nothing unless uncheckedValue is provided.",
2636
+ "Sizes are md 36×24 with a 16px thumb and 4px body inset, sm 24×16 with a 12px thumb and 2px inset, and xs 12×8 with a 6px thumb and 1px inset.",
2637
+ "Presentation mode removes switch semantics, focus, interaction, and form submission while retaining the checked visual."
2638
+ ],
2639
+ "responsiveBehavior": [
2640
+ "Choose size from the density of the containing row; do not enlarge the switch to the full control height.",
2641
+ "Keep the switch from shrinking when adjacent labels wrap."
2642
+ ],
2643
+ "frameworkCaveats": {
2644
+ "customElements": [
2645
+ "Set checked as a property for application state updates and listen for dsChange.",
2646
+ "Use the form attribute to associate a switch rendered outside its owning form."
2647
+ ],
2648
+ "react": [
2649
+ "Use DsSwitch and handle onDsChange; checked is mutable and updates immediately when the component is activated."
2650
+ ],
2651
+ "angular": [
2652
+ "Use DsSwitch with checked binding and dsChange, or the generated boolean value accessor in Angular forms."
2653
+ ]
2654
+ },
2655
+ "references": [
2656
+ {
2657
+ "label": "Storybook examples",
2658
+ "path": "src/wc/components/Switch/Switch.stories.ts"
2659
+ },
2660
+ {
2661
+ "label": "Cross-browser form and accessibility coverage",
2662
+ "path": "tests/e2e/forms.spec.ts"
2663
+ }
2664
+ ]
2665
+ },
2666
+ "api": {
2667
+ "props": {
2668
+ "checked": {
2669
+ "type": "boolean",
2670
+ "required": false
2671
+ },
2672
+ "disabled": {
2673
+ "type": "boolean",
2674
+ "required": false
2675
+ },
2676
+ "form": {
2677
+ "type": "string | undefined",
2678
+ "required": false
2679
+ },
2680
+ "isInactive": {
2681
+ "type": "boolean",
2682
+ "required": false
2683
+ },
2684
+ "name": {
2685
+ "type": "string | undefined",
2686
+ "required": false
2687
+ },
2688
+ "presentation": {
2689
+ "type": "boolean",
2690
+ "required": false
2691
+ },
2692
+ "readOnly": {
2693
+ "type": "boolean",
2694
+ "required": false
2695
+ },
2696
+ "required": {
2697
+ "type": "boolean",
2698
+ "required": false
2699
+ },
2700
+ "requiredMessage": {
2701
+ "type": "string",
2702
+ "required": false
2703
+ },
2704
+ "size": {
2705
+ "type": "SwitchSize",
2706
+ "required": false
2707
+ },
2708
+ "uncheckedValue": {
2709
+ "type": "string | undefined",
2710
+ "required": false
2711
+ },
2712
+ "value": {
2713
+ "type": "string",
2714
+ "required": false
2715
+ }
2716
+ },
2717
+ "events": [
2718
+ {
2719
+ "name": "dsChange",
2720
+ "detail": "boolean"
2721
+ }
2722
+ ],
2723
+ "slots": []
2724
+ },
2725
+ "exports": {
2726
+ "customElement": "ds-switch",
2727
+ "react": "DsSwitch",
2728
+ "angular": "DsSwitch"
2729
+ },
2730
+ "dependencies": [
2731
+ "@ds-mo/ui",
2732
+ "@ds-mo/tokens"
2733
+ ],
2734
+ "componentDependencies": []
2735
+ },
2584
2736
  {
2585
2737
  "id": "component:ds-tab-group",
2586
2738
  "tag": "ds-tab-group",
@@ -2929,71 +3081,95 @@
2929
3081
  "componentDependencies": []
2930
3082
  },
2931
3083
  {
2932
- "id": "component:ds-toggle",
2933
- "tag": "ds-toggle",
2934
- "name": "toggle",
2935
- "title": "Toggle",
2936
- "summary": "Switch control with on/off state and accessible switch semantics.",
2937
- "intentStatus": "migration-pending",
2938
- "intent": null,
2939
- "api": {
2940
- "props": {
2941
- "checked": {
2942
- "type": "boolean",
2943
- "required": false
2944
- },
2945
- "disabled": {
2946
- "type": "boolean",
2947
- "required": false
2948
- },
2949
- "isInactive": {
2950
- "type": "boolean",
2951
- "required": false
2952
- },
2953
- "name": {
2954
- "type": "string | undefined",
2955
- "required": false
2956
- },
2957
- "required": {
2958
- "type": "boolean",
2959
- "required": false
3084
+ "id": "component:ds-tooltip",
3085
+ "tag": "ds-tooltip",
3086
+ "name": "tooltip",
3087
+ "title": "Tooltip",
3088
+ "summary": "Supplementary, non-interactive visual label for an already named action, shown on mouse or hover-capable pen and keyboard focus.",
3089
+ "intentStatus": "complete",
3090
+ "intent": {
3091
+ "audience": "general",
3092
+ "status": "stable",
3093
+ "summary": "Supplementary, non-interactive visual label for an already named action, shown on mouse or hover-capable pen and keyboard focus.",
3094
+ "useWhen": [
3095
+ "An icon-only or dense control benefits from a short visual label for sighted mouse, pen, and keyboard users.",
3096
+ "A non-essential keyboard shortcut should appear beside a concise visual label.",
3097
+ "Adjacent chrome actions need delayed first disclosure with instant warm handoff between tooltips."
3098
+ ],
3099
+ "avoidWhen": [
3100
+ "The tooltip would be the trigger's only accessible name or contain information required to complete the task.",
3101
+ "The popup needs links, buttons, rich content, a close action, click-to-open behavior, or touch access.",
3102
+ "The callout follows a chart cursor or data point rather than a slotted control."
3103
+ ],
3104
+ "alternatives": [
3105
+ {
3106
+ "when": "The popup contains a contextual list of actions or options.",
3107
+ "component": "component:ds-menu",
3108
+ "reason": "Menu provides interactive content, keyboard navigation, selection, and close behavior."
2960
3109
  },
2961
- "requiredMessage": {
2962
- "type": "string",
2963
- "required": false
3110
+ {
3111
+ "when": "The content requires focus management, substantial explanation, confirmation, or a form.",
3112
+ "component": "component:ds-modal",
3113
+ "reason": "Modal provides dialog semantics and focus containment."
2964
3114
  },
2965
- "value": {
2966
- "type": "string",
2967
- "required": false
3115
+ {
3116
+ "when": "A chart needs a cursor- or data-point-positioned value callout.",
3117
+ "component": "component:ds-tooltip-data-viz",
3118
+ "reason": "TooltipDataViz accepts chart coordinates and is designed for data visualization hover feedback."
2968
3119
  }
3120
+ ],
3121
+ "commonlyComposedWith": [
3122
+ "component:ds-button-filled",
3123
+ "component:ds-button-unfilled",
3124
+ "component:ds-panel-nav",
3125
+ "component:ds-panel-tools"
3126
+ ],
3127
+ "accessibility": [
3128
+ "The slotted trigger must have its own accessible name, usually an aria-label that closely matches the visual tooltip label.",
3129
+ "Tooltip content is supplementary and non-essential; touch input intentionally does not open it.",
3130
+ "While open, the trigger is linked to the role=tooltip popup with aria-describedby; the relationship is removed when the popup leaves the DOM without disturbing consumer description IDs.",
3131
+ "Keyboard focus opens the tooltip and Escape dismisses it without moving focus."
3132
+ ],
3133
+ "states": [
3134
+ "The first hover or keyboard focus waits for delay; moving to another tooltip shortly after dismissal opens it immediately.",
3135
+ "An empty or whitespace-only label suppresses the popup while preserving the wrapper.",
3136
+ "Only one tooltip remains active globally; warm handoff removes the previous popup before showing the next.",
3137
+ "The preferred side flips when it cannot fit, then alignment is clamped to viewport padding.",
3138
+ "Reduced motion removes enter and exit fades while retaining the final visible or hidden state."
3139
+ ],
3140
+ "responsiveBehavior": [
3141
+ "The portaled popup follows trigger and popup resize, viewport resize, and nested scrolling while open.",
3142
+ "Touch users rely on the trigger's accessible and visible context rather than tooltip disclosure.",
3143
+ "Keep labels concise and non-wrapping; use inline text or a larger disclosure component for essential explanation."
3144
+ ],
3145
+ "frameworkCaveats": {
3146
+ "customElements": [
3147
+ "Place exactly one trigger element as the component's light-DOM child.",
3148
+ "Replacing the slotted trigger rebinds pointer and focus behavior automatically.",
3149
+ "sideOffset, alignOffset, and delay accept numbers or TokoMo CSS values."
3150
+ ],
3151
+ "react": [
3152
+ "Wrap one focusable trigger with DsTooltip; keep the trigger's aria-label independent from the tooltip label."
3153
+ ],
3154
+ "angular": [
3155
+ "Wrap one focusable trigger with DsTooltip and use property binding when offset or delay values are not plain strings."
3156
+ ]
2969
3157
  },
2970
- "events": [
3158
+ "references": [
2971
3159
  {
2972
- "name": "dsChange",
2973
- "detail": "boolean"
3160
+ "label": "Storybook behavior examples",
3161
+ "path": "src/wc/components/Tooltip/Tooltip.stories.ts"
3162
+ },
3163
+ {
3164
+ "label": "Cross-browser behavior and accessibility coverage",
3165
+ "path": "tests/e2e/tooltip.spec.ts"
3166
+ },
3167
+ {
3168
+ "label": "Positioning unit coverage",
3169
+ "path": "tests/tooltip-position.test.ts"
2974
3170
  }
2975
- ],
2976
- "slots": []
2977
- },
2978
- "exports": {
2979
- "customElement": "ds-toggle",
2980
- "react": "DsToggle",
2981
- "angular": "DsToggle"
3171
+ ]
2982
3172
  },
2983
- "dependencies": [
2984
- "@ds-mo/ui",
2985
- "@ds-mo/tokens"
2986
- ],
2987
- "componentDependencies": []
2988
- },
2989
- {
2990
- "id": "component:ds-tooltip",
2991
- "tag": "ds-tooltip",
2992
- "name": "tooltip",
2993
- "title": "Tooltip",
2994
- "summary": "Positioned tooltip with control-density sizes, delay, keyboard shortcut display, and viewport clamping.",
2995
- "intentStatus": "migration-pending",
2996
- "intent": null,
2997
3173
  "api": {
2998
3174
  "props": {
2999
3175
  "align": {
@@ -5,5 +5,5 @@ export declare class BooleanValueAccessor extends ValueAccessor {
5
5
  constructor(el: ElementRef);
6
6
  writeValue(value: any): void;
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<BooleanValueAccessor, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<BooleanValueAccessor, "ds-checkbox, ds-toggle", never, {}, {}, never, never, true, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BooleanValueAccessor, "ds-checkbox, ds-switch", never, {}, {}, never, never, true, never>;
9
9
  }
@@ -10,7 +10,7 @@ export class BooleanValueAccessor extends ValueAccessor {
10
10
  this.el.nativeElement.checked = this.lastValue = value == null ? false : value;
11
11
  }
12
12
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: BooleanValueAccessor, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
13
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: BooleanValueAccessor, isStandalone: true, selector: "ds-checkbox, ds-toggle", host: { listeners: { "dsChange": "handleChangeEvent($event.target?.[\"checked\"])" } }, providers: [
13
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: BooleanValueAccessor, isStandalone: true, selector: "ds-checkbox, ds-switch", host: { listeners: { "dsChange": "handleChangeEvent($event.target?.[\"checked\"])" } }, providers: [
14
14
  {
15
15
  provide: NG_VALUE_ACCESSOR,
16
16
  useExisting: forwardRef(() => BooleanValueAccessor),
@@ -22,7 +22,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
22
22
  type: Directive,
23
23
  args: [{
24
24
  /* tslint:disable-next-line:directive-selector */
25
- selector: 'ds-checkbox, ds-toggle',
25
+ selector: 'ds-checkbox, ds-switch',
26
26
  host: {
27
27
  '(dsChange)': 'handleChangeEvent($event.target?.["checked"])'
28
28
  },
@@ -6,7 +6,7 @@ export declare class DsBadge {
6
6
  protected el: HTMLDsBadgeElement;
7
7
  constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<DsBadge, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<DsBadge, "ds-badge", never, { "background": { "alias": "background"; "required": false; }; "count": { "alias": "count"; "required": false; }; "gradientBackground": { "alias": "gradientBackground"; "required": false; }; "isSelected": { "alias": "isSelected"; "required": false; }; "label": { "alias": "label"; "required": false; }; "max": { "alias": "max"; "required": false; }; "surface": { "alias": "surface"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<DsBadge, "ds-badge", never, { "background": { "alias": "background"; "required": false; }; "count": { "alias": "count"; "required": false; }; "gradientBackground": { "alias": "gradientBackground"; "required": false; }; "label": { "alias": "label"; "required": false; }; "max": { "alias": "max"; "required": false; }; "surface": { "alias": "surface"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, {}, never, ["*"], true, never>;
10
10
  }
11
11
  export declare interface DsBadge extends Components.DsBadge {
12
12
  }
@@ -17,12 +17,12 @@ let DsBadge = class DsBadge {
17
17
  this.el = r.nativeElement;
18
18
  }
19
19
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DsBadge, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
20
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: DsBadge, isStandalone: true, selector: "ds-badge", inputs: { background: "background", count: "count", gradientBackground: "gradientBackground", isSelected: "isSelected", label: "label", max: "max", surface: "surface", variant: "variant" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: DsBadge, isStandalone: true, selector: "ds-badge", inputs: { background: "background", count: "count", gradientBackground: "gradientBackground", label: "label", max: "max", surface: "surface", variant: "variant" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
21
21
  };
22
22
  DsBadge = __decorate([
23
23
  ProxyCmp({
24
24
  defineCustomElementFn: defineDsBadge,
25
- inputs: ['background', 'count', 'gradientBackground', 'isSelected', 'label', 'max', 'surface', 'variant']
25
+ inputs: ['background', 'count', 'gradientBackground', 'label', 'max', 'surface', 'variant']
26
26
  })
27
27
  ], DsBadge);
28
28
  export { DsBadge };
@@ -33,6 +33,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImpor
33
33
  changeDetection: ChangeDetectionStrategy.OnPush,
34
34
  template: '<ng-content></ng-content>',
35
35
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
36
- inputs: ['background', 'count', 'gradientBackground', 'isSelected', 'label', 'max', 'surface', 'variant'],
36
+ inputs: ['background', 'count', 'gradientBackground', 'label', 'max', 'surface', 'variant'],
37
37
  }]
38
38
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }] });
@@ -0,0 +1,15 @@
1
+ import { ChangeDetectorRef, ElementRef, NgZone, EventEmitter } from '@angular/core';
2
+ import type { Components } from '@ds-mo/ui/components';
3
+ import type { DsSwitchCustomEvent } from '@ds-mo/ui/components';
4
+ import * as i0 from "@angular/core";
5
+ export declare class DsSwitch {
6
+ protected z: NgZone;
7
+ protected el: HTMLDsSwitchElement;
8
+ dsChange: EventEmitter<DsSwitchCustomEvent<boolean>>;
9
+ constructor(c: ChangeDetectorRef, r: ElementRef, z: NgZone);
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<DsSwitch, never>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<DsSwitch, "ds-switch", never, { "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isInactive": { "alias": "isInactive"; "required": false; }; "name": { "alias": "name"; "required": false; }; "presentation": { "alias": "presentation"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "required": { "alias": "required"; "required": false; }; "requiredMessage": { "alias": "requiredMessage"; "required": false; }; "size": { "alias": "size"; "required": false; }; "uncheckedValue": { "alias": "uncheckedValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "dsChange": "dsChange"; }, never, ["*"], true, never>;
12
+ }
13
+ export declare interface DsSwitch extends Components.DsSwitch {
14
+ dsChange: EventEmitter<DsSwitchCustomEvent<boolean>>;
15
+ }
@@ -8,33 +8,33 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  /* auto-generated angular directive proxies */
9
9
  import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';
10
10
  import { ProxyCmp } from './angular-component-lib/utils.js';
11
- import { defineCustomElement as defineDsToggle } from '@ds-mo/ui/components/ds-toggle.js';
11
+ import { defineCustomElement as defineDsSwitch } from '@ds-mo/ui/components/ds-switch.js';
12
12
  import * as i0 from "@angular/core";
13
- let DsToggle = class DsToggle {
13
+ let DsSwitch = class DsSwitch {
14
14
  constructor(c, r, z) {
15
15
  this.z = z;
16
16
  this.dsChange = new EventEmitter();
17
17
  c.detach();
18
18
  this.el = r.nativeElement;
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DsToggle, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: DsToggle, isStandalone: true, selector: "ds-toggle", inputs: { checked: "checked", disabled: "disabled", isInactive: "isInactive", name: "name", required: "required", requiredMessage: "requiredMessage", value: "value" }, outputs: { dsChange: "dsChange" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DsSwitch, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component }); }
21
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.0.6", type: DsSwitch, isStandalone: true, selector: "ds-switch", inputs: { checked: "checked", disabled: "disabled", form: "form", isInactive: "isInactive", name: "name", presentation: "presentation", readOnly: "readOnly", required: "required", requiredMessage: "requiredMessage", size: "size", uncheckedValue: "uncheckedValue", value: "value" }, outputs: { dsChange: "dsChange" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
22
22
  };
23
- DsToggle = __decorate([
23
+ DsSwitch = __decorate([
24
24
  ProxyCmp({
25
- defineCustomElementFn: defineDsToggle,
26
- inputs: ['checked', 'disabled', 'isInactive', 'name', 'required', 'requiredMessage', 'value']
25
+ defineCustomElementFn: defineDsSwitch,
26
+ inputs: ['checked', 'disabled', 'form', 'isInactive', 'name', 'presentation', 'readOnly', 'required', 'requiredMessage', 'size', 'uncheckedValue', 'value']
27
27
  })
28
- ], DsToggle);
29
- export { DsToggle };
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DsToggle, decorators: [{
28
+ ], DsSwitch);
29
+ export { DsSwitch };
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DsSwitch, decorators: [{
31
31
  type: Component,
32
32
  args: [{
33
- selector: 'ds-toggle',
33
+ selector: 'ds-switch',
34
34
  changeDetection: ChangeDetectionStrategy.OnPush,
35
35
  template: '<ng-content></ng-content>',
36
36
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
37
- inputs: ['checked', 'disabled', 'isInactive', 'name', 'required', 'requiredMessage', 'value'],
37
+ inputs: ['checked', 'disabled', 'form', 'isInactive', 'name', 'presentation', 'readOnly', 'required', 'requiredMessage', 'size', 'uncheckedValue', 'value'],
38
38
  outputs: ['dsChange'],
39
39
  }]
40
40
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { dsChange: [{
@@ -1,2 +1,2 @@
1
1
  import * as d from './proxies';
2
- export declare const DIRECTIVES: (typeof d.DsAppShell | typeof d.DsBadge | typeof d.DsBanner | typeof d.DsBarNav | typeof d.DsButtonFilled | typeof d.DsButtonUnfilled | typeof d.DsCardDataVizDonut | typeof d.DsCardSetting | typeof d.DsCard | typeof d.DsChartBar | typeof d.DsChartDonut | typeof d.DsChartLegend | typeof d.DsChartLine | typeof d.DsCheckbox | typeof d.DsChip | typeof d.DsDivider | typeof d.DsEmptyState | typeof d.DsField | typeof d.DsIcon | typeof d.DsInput | typeof d.DsLoader | typeof d.DsMenu | typeof d.DsModal | typeof d.DsPagination | typeof d.DsPanelNav | typeof d.DsPanelTools | typeof d.DsRadioGroup | typeof d.DsSelect | typeof d.DsShellGradientPicker | typeof d.DsShellGradientSwatch | typeof d.DsSkeleton | typeof d.DsSlider | typeof d.DsTabGroupNav | typeof d.DsTabGroup | typeof d.DsTable | typeof d.DsTag | typeof d.DsText | typeof d.DsToggle | typeof d.DsTooltipDataViz | typeof d.DsTooltip)[];
2
+ export declare const DIRECTIVES: (typeof d.DsAppShell | typeof d.DsBadge | typeof d.DsBanner | typeof d.DsBarNav | typeof d.DsButtonFilled | typeof d.DsButtonUnfilled | typeof d.DsCardDataVizDonut | typeof d.DsCardSetting | typeof d.DsCard | typeof d.DsChartBar | typeof d.DsChartDonut | typeof d.DsChartLegend | typeof d.DsChartLine | typeof d.DsCheckbox | typeof d.DsChip | typeof d.DsDivider | typeof d.DsEmptyState | typeof d.DsField | typeof d.DsIcon | typeof d.DsInput | typeof d.DsLoader | typeof d.DsMenu | typeof d.DsModal | typeof d.DsPagination | typeof d.DsPanelNav | typeof d.DsPanelTools | typeof d.DsRadioGroup | typeof d.DsSelect | typeof d.DsShellGradientPicker | typeof d.DsShellGradientSwatch | typeof d.DsSkeleton | typeof d.DsSlider | typeof d.DsSwitch | typeof d.DsTabGroupNav | typeof d.DsTabGroup | typeof d.DsTable | typeof d.DsTag | typeof d.DsText | typeof d.DsTooltipDataViz | typeof d.DsTooltip)[];
@@ -32,12 +32,12 @@ export const DIRECTIVES = [
32
32
  d.DsShellGradientSwatch,
33
33
  d.DsSkeleton,
34
34
  d.DsSlider,
35
+ d.DsSwitch,
35
36
  d.DsTabGroup,
36
37
  d.DsTabGroupNav,
37
38
  d.DsTable,
38
39
  d.DsTag,
39
40
  d.DsText,
40
- d.DsToggle,
41
41
  d.DsTooltip,
42
42
  d.DsTooltipDataViz
43
43
  ];
@@ -34,11 +34,11 @@ export { DsShellGradientPicker } from './ds-shell-gradient-picker';
34
34
  export { DsShellGradientSwatch } from './ds-shell-gradient-swatch';
35
35
  export { DsSkeleton } from './ds-skeleton';
36
36
  export { DsSlider } from './ds-slider';
37
+ export { DsSwitch } from './ds-switch';
37
38
  export { DsTabGroup } from './ds-tab-group';
38
39
  export { DsTabGroupNav } from './ds-tab-group-nav';
39
40
  export { DsTable } from './ds-table';
40
41
  export { DsTag } from './ds-tag';
41
42
  export { DsText } from './ds-text';
42
- export { DsToggle } from './ds-toggle';
43
43
  export { DsTooltip } from './ds-tooltip';
44
44
  export { DsTooltipDataViz } from './ds-tooltip-data-viz';
@@ -35,11 +35,11 @@ export { DsShellGradientPicker } from './ds-shell-gradient-picker.js';
35
35
  export { DsShellGradientSwatch } from './ds-shell-gradient-swatch.js';
36
36
  export { DsSkeleton } from './ds-skeleton.js';
37
37
  export { DsSlider } from './ds-slider.js';
38
+ export { DsSwitch } from './ds-switch.js';
38
39
  export { DsTabGroup } from './ds-tab-group.js';
39
40
  export { DsTabGroupNav } from './ds-tab-group-nav.js';
40
41
  export { DsTable } from './ds-table.js';
41
42
  export { DsTag } from './ds-tag.js';
42
43
  export { DsText } from './ds-text.js';
43
- export { DsToggle } from './ds-toggle.js';
44
44
  export { DsTooltip } from './ds-tooltip.js';
45
45
  export { DsTooltipDataViz } from './ds-tooltip-data-viz.js';
@@ -1,2 +1,2 @@
1
- import{p as e,t as s,H as t,h as n,a as i}from"./index.js";import{D as a,c as l,n as o,s as r}from"./p-D0B9uDTP.js";import{e as h,c,r as p,a as d,b as f}from"./p-BKhG2xrW.js";const u={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity"};function b(e){return!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function g(e){if(!e||typeof e!=="object")return false;if(!("closest"in e)||typeof e.closest!=="function")return false;const s=e;const t=s.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const n=s.getAttribute("role");if(n==="textbox"||n==="combobox"||n==="searchbox")return true;return Boolean(s.isContentEditable)}function m(e){if(e.key==="["||e.code==="BracketLeft")return"[";if(e.key==="]"||e.code==="BracketRight")return"]";return e.key.length===1?e.key.toLowerCase():e.key.toLowerCase()}function v(e){if((e.key==="?"||e.code==="Slash"&&e.shiftKey)&&!e.metaKey&&!e.ctrlKey&&!e.altKey){return"open-tool:help"}if(!b(e))return null;const s=m(e);if(s==="[")return"toggle-panel-nav";if(s==="]")return"close-panel-tools";const t=u[s];if(t)return`open-tool:${t}`;return null}const y="--ds-shell-gradient-image";const _="--ds-shell-gradient-size";const x="--ds-shell-gradient-position-panel";const w="--ds-shell-gradient-position-bar";const k="--ds-shell-gradient-opacity";function P(e=a){return l(e)}function z(e){const s=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!s)return{width:0,height:0};const t=s.visualViewport;return{width:Math.round(t?.width??s.innerWidth),height:Math.round(t?.height??s.innerHeight)}}function S(e){return`${Math.round(e.width)}px ${Math.round(e.height)}px`}function C(){return"0 0"}function D(e){return`${-Math.round(e)}px 0`}function L(e,s){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+s+");";e.appendChild(t);const n=t.getBoundingClientRect().width;e.removeChild(t);return n}function M(e){return{expandedPx:L(e,"--_nav-width"),collapsedPx:L(e,"--_nav-width-collapsed")}}function V(e,s){if(s?.classList.contains("panel-nav--collapsed"))return true;const t=e?.collapsed;return t===true}function j(e,s){return s?e.collapsedPx:e.expandedPx}const B=()=>`.sc-ds-app-shell-h{display:block;height:100%;min-height:0;box-sizing:border-box;--ds-shell-panel-tools-width:var(--dimension-panel-width-sm)}@media (min-width: 768px) and (max-width: 1199px){.sc-ds-app-shell-h{--ds-shell-panel-tools-width:var(--dimension-panel-width-xs)}}.app-shell.sc-ds-app-shell{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;font-family:var(--typography-font-family, system-ui)}.app-shell--gradient.sc-ds-app-shell-h{--_shell-chrome-bg:var(--color-background-secondary)}.app-shell__row.sc-ds-app-shell{display:flex;flex:1 1 auto;min-height:0;height:100%;position:relative}.app-shell__chrome.sc-ds-app-shell{position:absolute;inset:0;pointer-events:none;z-index:0}.app-shell--gradient.sc-ds-app-shell-h .app-shell__chrome.sc-ds-app-shell{background-color:var(--_shell-chrome-bg)}.app-shell--gradient.sc-ds-app-shell-h .app-shell__chrome.sc-ds-app-shell::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.app-shell__panel.sc-ds-app-shell{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.app-shell__panel.sc-ds-app-shell-s>ds-panel-nav,.app-shell__panel .sc-ds-app-shell-s>ds-panel-nav{display:block;height:100%}.app-shell__main.sc-ds-app-shell{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.app-shell__bar.sc-ds-app-shell{grid-area:bar;flex:0 0 auto;min-width:0}.app-shell__bar.sc-ds-app-shell-s>ds-bar-nav,.app-shell__bar .sc-ds-app-shell-s>ds-bar-nav{display:block}.app-shell__content.sc-ds-app-shell{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;contain:layout}.app-shell--gradient.sc-ds-app-shell-h .app-shell__content.sc-ds-app-shell{position:relative;z-index:1;background-color:var(--color-background-primary)}.app-shell__tools.sc-ds-app-shell{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.app-shell__tools.sc-ds-app-shell-s>ds-panel-tools,.app-shell__tools .sc-ds-app-shell-s>ds-panel-tools{display:block;height:100%;min-height:0}`;const W=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.navStyle="dashboard";this.gradientPreset=a;this.shortcutsEnabled=true;this.resizeObserver=null;this.panelNavTransition=new h;this.chromeSyncCoalescer=c((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=e=>{if(p(e)!=="panel-nav")return;this.panelNavTransition.enter();const s=z();this.cachedViewportWidth=s.width;this.cachedViewportHeight=s.height;this.syncChrome()};this.onChromeTransitionEnd=e=>{if(p(e)!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}}}componentDidLoad(){this.syncSlottedNavStyle();this.connectMetricsObserver();this.connectViewportListeners();this.el.addEventListener(d,this.onChromeTransitionStart);this.el.addEventListener(f,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}))}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(d,this.onChromeTransitionStart);this.el.removeEventListener(f,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const e=this.el.querySelector(".app-shell__panel");if(e)this.resizeObserver.observe(e)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const e=window.visualViewport;if(e){e.addEventListener("resize",this.onVisualViewportChange,{passive:true});e.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const e=window.visualViewport;if(e){e.removeEventListener("resize",this.onVisualViewportChange);e.removeEventListener("scroll",this.onVisualViewportChange)}}cachePanelWidthTokens(){const e=this.el.querySelector("ds-panel-nav .panel-nav");if(!e)return;this.panelWidthTokens=M(e)}applyGradientVars(e,s){const t=e.style;for(const[e,n]of Object.entries(s)){if(n===null)t.removeProperty(e);else t.setProperty(e,n)}}clearGradientPaintVars(e){const s=[y,_,k];for(const t of e){for(const e of s)t.style.removeProperty(e)}}syncChromeLayoutVars(e,s,t,n){if(e){e.style.setProperty(x,t)}if(s){s.style.setProperty(w,n)}}resolvePanelWidthPx(e){const s=e?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=V(e,s);return j(this.panelWidthTokens,t)}const t=this.el.querySelector(".app-shell__panel");const n=t?.getBoundingClientRect().width??0;if(n>0)return n;if(this.panelWidthTokens.expandedPx>0){const t=V(e,s);return j(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return z()}chromeLayerActive(){return o(this.gradientPreset)!=="none"}handleWindowKeyDown(e){if(!this.shortcutsEnabled)return;if(g(e.target))return;const s=v(e);if(!s)return;e.preventDefault();const t=this.el.querySelector("ds-panel-nav");const n=this.el.querySelector("ds-panel-tools");if(s==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(s==="close-panel-tools"){void n?.closeDrawer();return}if(s.startsWith("open-tool:")&&n){const e=s.slice("open-tool:".length);void n.activateTool(e)}}syncChrome(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");const t=[this.el,e,s].filter((e=>e!==null));const n=()=>{if(e)e.style.removeProperty(x);if(s)s.style.removeProperty(w)};const i=o(this.gradientPreset);if(i==="none"){this.clearGradientPaintVars(t);n();return}const a=this.resolveViewportDimensions();const l=this.resolvePanelWidthPx(e);const h=C();const c=D(l);this.syncChromeLayoutVars(e,s,h,c);const p=P(i);const d=S({width:a.width,height:a.height});const f=r(i);for(const e of t){if(e===this.el){this.applyGradientVars(e,{[y]:p,[_]:d,[x]:h,[w]:c,[k]:f});continue}const s=e.tagName.toLowerCase()==="ds-bar-nav";this.applyGradientVars(e,{[y]:p,[_]:d,[k]:f,[x]:s?null:h,[w]:s?c:null})}}render(){const e=this.chromeLayerActive();const s={"app-shell":true,"app-shell--gradient":e,[`app-shell--${this.navStyle}`]:true};return n(i,{key:"f4c00ba0d33ea376d4cf94ea6c245a930c35c6ec",class:s},n("div",{key:"7aa13e71e4a177c0d7692636f0592b97ab7ff596",class:"app-shell__row"},e?n("div",{class:"app-shell__chrome","aria-hidden":"true"}):null,n("div",{key:"c126aed0e69e4f52ee0852bf37023072e634aa73",class:"app-shell__panel"},n("slot",{key:"fa4eed941339f2f3f6d98633919264a0f353c072",name:"panel"})),n("div",{key:"e761916f289262c9b2819a19e0e05235cb2e70a7",class:"app-shell__main"},n("div",{key:"a969b368fce3d472433f3e5626a8799ff7c6b521",class:"app-shell__bar"},n("slot",{key:"c5ae19455feb7d6d14c66b96e6381f84ec3138d6",name:"bar"})),n("div",{key:"eeb5ce37f575a8e3ec6b6ccbe4d08dbd5aa37322",class:"app-shell__tools"},n("slot",{key:"5b86e6c7a81200934f5ae9b7f3b96828953690cd",name:"tools"})),n("div",{key:"6a008250756737a98be2ac5b3608687f3332d0e4",class:"app-shell__content"},n("slot",{key:"c50956447d5d741162c102c64974b8fa0f2df43a"})))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}]}}static get style(){return B()}},[262,"ds-app-shell",{navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],shortcutsEnabled:[4,"shortcuts-enabled"]},[[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}]}]);function $(){if(typeof customElements==="undefined"){return}const e=["ds-app-shell"];e.forEach((e=>{switch(e){case"ds-app-shell":if(!customElements.get(s(e))){customElements.define(s(e),W)}break}}))}$();const E=W;const T=$;export{E as DsAppShell,T as defineCustomElement};
1
+ import{p as e,t as s,H as t,h as n,a as i}from"./index.js";import{D as a,c as l,n as o,s as r}from"./p-D0B9uDTP.js";import{e as h,c as d,r as c,a as p,b as u}from"./p-BKhG2xrW.js";const f={k:"search",a:"agents",s:"stacks",m:"messages",n:"activity"};function b(e){return!e.metaKey&&!e.ctrlKey&&!e.altKey&&!e.shiftKey}function g(e){if(!e||typeof e!=="object")return false;if(!("closest"in e)||typeof e.closest!=="function")return false;const s=e;const t=s.closest('input, textarea, select, [contenteditable=""], [contenteditable="true"], [contenteditable="plaintext-only"]');if(t)return true;const n=s.getAttribute("role");if(n==="textbox"||n==="combobox"||n==="searchbox")return true;return Boolean(s.isContentEditable)}function m(e){if(e.key==="["||e.code==="BracketLeft")return"[";if(e.key==="]"||e.code==="BracketRight")return"]";return e.key.length===1?e.key.toLowerCase():e.key.toLowerCase()}function v(e){if((e.key==="?"||e.code==="Slash"&&e.shiftKey)&&!e.metaKey&&!e.ctrlKey&&!e.altKey){return"open-tool:help"}if(!b(e))return null;const s=m(e);if(s==="[")return"toggle-panel-nav";if(s==="]")return"close-panel-tools";const t=f[s];if(t)return`open-tool:${t}`;return null}const y="--ds-shell-gradient-image";const _="--ds-shell-gradient-size";const x="--ds-shell-gradient-position-panel";const w="--ds-shell-gradient-position-bar";const k="--ds-shell-gradient-opacity";function P(e=a){return l(e)}function z(e){const s=typeof globalThis.window!=="undefined"?globalThis.window:undefined;if(!s)return{width:0,height:0};const t=s.visualViewport;return{width:Math.round(t?.width??s.innerWidth),height:Math.round(t?.height??s.innerHeight)}}function S(e){return`${Math.round(e.width)}px ${Math.round(e.height)}px`}function C(){return"0 0"}function D(e){return`${-Math.round(e)}px 0`}function L(e,s){if(typeof document==="undefined")return 0;const t=document.createElement("div");t.style.cssText="position:absolute;visibility:hidden;pointer-events:none;height:0;width:var("+s+");";e.appendChild(t);const n=t.getBoundingClientRect().width;e.removeChild(t);return n}function M(e){return{expandedPx:L(e,"--_nav-width"),collapsedPx:L(e,"--_nav-width-collapsed")}}function V(e,s){if(s?.classList.contains("panel-nav--collapsed"))return true;const t=e?.collapsed;return t===true}function j(e,s){return s?e.collapsedPx:e.expandedPx}const B=()=>`.sc-ds-app-shell-h{display:block;height:100%;min-height:0;box-sizing:border-box;--ds-shell-panel-tools-width:var(--dimension-panel-width-sm)}@media (min-width: 768px) and (max-width: 1199px){.sc-ds-app-shell-h{--ds-shell-panel-tools-width:var(--dimension-panel-width-xs)}}.app-shell.sc-ds-app-shell{display:flex;flex-direction:column;height:100%;min-height:0;box-sizing:border-box;font-family:var(--typography-font-family, system-ui)}.app-shell--gradient.sc-ds-app-shell-h{--_shell-chrome-bg:var(--color-background-secondary)}.app-shell__row.sc-ds-app-shell{display:flex;flex:1 1 auto;min-height:0;height:100%;position:relative}.app-shell__chrome.sc-ds-app-shell{position:absolute;inset:0;pointer-events:none;z-index:0}.app-shell--gradient.sc-ds-app-shell-h .app-shell__chrome.sc-ds-app-shell{background-color:var(--_shell-chrome-bg)}.app-shell--gradient.sc-ds-app-shell-h .app-shell__chrome.sc-ds-app-shell::before{content:'';position:absolute;inset:0;pointer-events:none;background-position:0 0;background-attachment:fixed;z-index:1;opacity:var(--ds-shell-gradient-opacity, 1);background-image:var(--ds-shell-gradient-image, none);background-size:var(--ds-shell-gradient-size, auto);background-repeat:no-repeat}.app-shell__panel.sc-ds-app-shell{flex:0 0 auto;min-height:0;height:100%;position:relative;z-index:2}.app-shell__panel.sc-ds-app-shell-s>ds-panel-nav,.app-shell__panel .sc-ds-app-shell-s>ds-panel-nav{display:block;height:100%}.app-shell__main.sc-ds-app-shell{flex:1 1 auto;min-width:0;min-height:0;display:grid;grid-template-columns:minmax(0, 1fr) auto;grid-template-rows:auto minmax(0, 1fr);grid-template-areas:'bar tools' 'content tools';position:relative;z-index:1}.app-shell__bar.sc-ds-app-shell{grid-area:bar;flex:0 0 auto;min-width:0}.app-shell__bar.sc-ds-app-shell-s>ds-bar-nav,.app-shell__bar .sc-ds-app-shell-s>ds-bar-nav{display:block}.app-shell__content.sc-ds-app-shell{grid-area:content;flex:1 1 auto;min-width:0;min-height:0;overflow:auto;contain:layout}.app-shell--gradient.sc-ds-app-shell-h .app-shell__content.sc-ds-app-shell{position:relative;z-index:1;background-color:var(--color-background-primary)}.app-shell__tools.sc-ds-app-shell{grid-area:tools;flex:0 0 auto;min-width:0;min-height:0;height:100%;display:flex;position:relative;z-index:0;overflow:hidden}.app-shell__tools.sc-ds-app-shell-s>ds-panel-tools,.app-shell__tools .sc-ds-app-shell-s>ds-panel-tools{display:block;height:100%;min-height:0}`;const W=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.navStyle="dashboard";this.gradientPreset=a;this.shortcutsEnabled=true;this.resizeObserver=null;this.panelNavTransition=new h;this.chromeSyncCoalescer=d((()=>this.syncChrome()));this.panelWidthTokens={expandedPx:0,collapsedPx:0};this.cachedViewportWidth=0;this.cachedViewportHeight=0;this.onWindowResize=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onVisualViewportChange=()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()};this.onChromeTransitionStart=e=>{if(c(e)!=="panel-nav")return;this.panelNavTransition.enter();const s=z();this.cachedViewportWidth=s.width;this.cachedViewportHeight=s.height;this.syncChrome()};this.onChromeTransitionEnd=e=>{if(c(e)!=="panel-nav")return;this.panelNavTransition.exit();if(!this.panelNavTransition.isActive){this.scheduleChromeSync()}}}componentDidLoad(){this.syncSlottedNavStyle();this.connectMetricsObserver();this.connectViewportListeners();this.el.addEventListener(p,this.onChromeTransitionStart);this.el.addEventListener(u,this.onChromeTransitionEnd);requestAnimationFrame((()=>{this.cachePanelWidthTokens();this.scheduleChromeSync()}))}disconnectedCallback(){this.resizeObserver?.disconnect();this.resizeObserver=null;this.disconnectViewportListeners();this.chromeSyncCoalescer.cancel();this.el.removeEventListener(p,this.onChromeTransitionStart);this.el.removeEventListener(u,this.onChromeTransitionEnd)}onShellPropsChange(){this.syncSlottedNavStyle();this.scheduleChromeSync()}scheduleChromeSync(){this.chromeSyncCoalescer.schedule()}syncSlottedNavStyle(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");if(e){e.setAttribute("nav-style",this.navStyle);e.navStyle=this.navStyle}if(s){s.setAttribute("nav-style",this.navStyle);s.navStyle=this.navStyle}}connectMetricsObserver(){this.resizeObserver=new ResizeObserver((()=>{if(this.panelNavTransition.isActive)return;this.scheduleChromeSync()}));this.resizeObserver.observe(this.el);const e=this.el.querySelector(".app-shell__panel");if(e)this.resizeObserver.observe(e)}connectViewportListeners(){if(typeof window==="undefined")return;window.addEventListener("resize",this.onWindowResize,{passive:true});const e=window.visualViewport;if(e){e.addEventListener("resize",this.onVisualViewportChange,{passive:true});e.addEventListener("scroll",this.onVisualViewportChange,{passive:true})}}disconnectViewportListeners(){if(typeof window==="undefined")return;window.removeEventListener("resize",this.onWindowResize);const e=window.visualViewport;if(e){e.removeEventListener("resize",this.onVisualViewportChange);e.removeEventListener("scroll",this.onVisualViewportChange)}}cachePanelWidthTokens(){const e=this.el.querySelector("ds-panel-nav .panel-nav");if(!e)return;this.panelWidthTokens=M(e)}applyGradientVars(e,s){const t=e.style;for(const[e,n]of Object.entries(s)){if(n===null)t.removeProperty(e);else t.setProperty(e,n)}}clearGradientPaintVars(e){const s=[y,_,k];for(const t of e){for(const e of s)t.style.removeProperty(e)}}syncChromeLayoutVars(e,s,t,n){if(e){e.style.setProperty(x,t)}if(s){s.style.setProperty(w,n)}}resolvePanelWidthPx(e){const s=e?.querySelector(".panel-nav");if(this.panelNavTransition.isActive&&this.panelWidthTokens.expandedPx>0){const t=V(e,s);return j(this.panelWidthTokens,t)}const t=this.el.querySelector(".app-shell__panel");const n=t?.getBoundingClientRect().width??0;if(n>0)return n;if(this.panelWidthTokens.expandedPx>0){const t=V(e,s);return j(this.panelWidthTokens,t)}return 0}resolveViewportDimensions(){if(this.panelNavTransition.isActive&&this.cachedViewportWidth>0){return{width:this.cachedViewportWidth,height:this.cachedViewportHeight}}return z()}chromeLayerActive(){return o(this.gradientPreset)!=="none"}handleWindowKeyDown(e){if(!this.shortcutsEnabled)return;if(g(e.target))return;const s=v(e);if(!s)return;e.preventDefault();const t=this.el.querySelector("ds-panel-nav");const n=this.el.querySelector("ds-panel-tools");if(s==="toggle-panel-nav"){void t?.toggleCollapsed();return}if(s==="close-panel-tools"){void n?.closeDrawer();return}if(s.startsWith("open-tool:")&&n){const e=s.slice("open-tool:".length);void n.activateTool(e)}}syncChrome(){const e=this.el.querySelector("ds-panel-nav");const s=this.el.querySelector("ds-bar-nav");const t=[this.el,e,s].filter((e=>e!==null));const n=()=>{if(e)e.style.removeProperty(x);if(s)s.style.removeProperty(w)};const i=o(this.gradientPreset);if(i==="none"){this.clearGradientPaintVars(t);n();return}const a=this.resolveViewportDimensions();const l=this.resolvePanelWidthPx(e);const h=C();const d=D(l);this.syncChromeLayoutVars(e,s,h,d);const c=P(i);const p=S({width:a.width,height:a.height});const u=r(i);for(const e of t){if(e===this.el){this.applyGradientVars(e,{[y]:c,[_]:p,[x]:h,[w]:d,[k]:u});continue}const s=e.tagName.toLowerCase()==="ds-bar-nav";this.applyGradientVars(e,{[y]:c,[_]:p,[k]:u,[x]:s?null:h,[w]:s?d:null})}}render(){const e=this.chromeLayerActive();const s={"app-shell":true,"app-shell--gradient":e,[`app-shell--${this.navStyle}`]:true};return n(i,{key:"44f9aed7809c500fc5eeb6d760b1c8ef387fd693",class:s},n("div",{key:"933ce38b8edc171bd85eca64af407f4e403b8310",class:"app-shell__row"},e?n("div",{class:"app-shell__chrome","aria-hidden":"true"}):null,n("div",{key:"6d94a83308b10df7ef6f31c58c0e9243617dd959",class:"app-shell__panel"},n("slot",{key:"860d1763ed31251abae5ee2350f104b7af08ce57",name:"panel"})),n("div",{key:"5e1704d21df96812de03b7d0e388e654d3c487a9",class:"app-shell__main"},n("div",{key:"c5c0eb9099abd90a3e7d43d4f798fbbe94051438",class:"app-shell__bar"},n("slot",{key:"9c57201b210ee0f7d856c86806df9e31a838475f",name:"bar"})),n("div",{key:"6166885053a943b775185aa8e61591bc19aabb83",class:"app-shell__tools"},n("slot",{key:"dc446d5d9d9ff4cdcaa4c960dd1e156de26c287c",name:"tools"})),n("div",{key:"9a1dd8954e28ca8d1d69c5c716cfd453314b7edb",class:"app-shell__content"},n("slot",{key:"b58f371725b5dd628d53bae02e9a5ac2c4742d7c"})))))}get el(){return this}static get watchers(){return{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}]}}static get style(){return B()}},[262,"ds-app-shell",{navStyle:[513,"nav-style"],gradientPreset:[513,"gradient-preset"],shortcutsEnabled:[4,"shortcuts-enabled"]},[[10,"keydown","handleWindowKeyDown"]],{navStyle:[{onShellPropsChange:0}],gradientPreset:[{onShellPropsChange:0}]}]);function $(){if(typeof customElements==="undefined"){return}const e=["ds-app-shell"];e.forEach((e=>{switch(e){case"ds-app-shell":if(!customElements.get(s(e))){customElements.define(s(e),W)}break}}))}$();const E=W;const T=$;export{E as DsAppShell,T as defineCustomElement};
2
2
  //# sourceMappingURL=ds-app-shell.js.map