@ds-mo/ui 1.2.0 → 1.3.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 (93) hide show
  1. package/README.md +82 -2
  2. package/dist/components/ds-badge.js +1 -1
  3. package/dist/components/ds-badge.js.map +1 -1
  4. package/dist/components/ds-banner.js +1 -1
  5. package/dist/components/ds-banner.js.map +1 -1
  6. package/dist/components/ds-bar-nav-action.js +1 -1
  7. package/dist/components/ds-bar-nav.js +1 -1
  8. package/dist/components/ds-bar-nav.js.map +1 -1
  9. package/dist/components/ds-button-group.js +1 -1
  10. package/dist/components/ds-checkbox.js +1 -1
  11. package/dist/components/ds-chip.d.ts +11 -0
  12. package/dist/components/ds-chip.js +2 -0
  13. package/dist/components/ds-chip.js.map +1 -0
  14. package/dist/components/ds-divider.js +1 -1
  15. package/dist/components/ds-empty-state.js +1 -1
  16. package/dist/components/ds-fade.js +1 -1
  17. package/dist/components/ds-fade.js.map +1 -1
  18. package/dist/components/ds-field.js +1 -1
  19. package/dist/components/ds-header.js +1 -1
  20. package/dist/components/ds-icon.js +1 -1
  21. package/dist/components/ds-input.js +1 -1
  22. package/dist/components/ds-modal.js +1 -1
  23. package/dist/components/ds-modal.js.map +1 -1
  24. package/dist/components/ds-panel-nav.js +1 -1
  25. package/dist/components/ds-panel-nav.js.map +1 -1
  26. package/dist/components/ds-radio-group.js +1 -1
  27. package/dist/components/ds-scrollbar.js +1 -1
  28. package/dist/components/ds-select.js +1 -1
  29. package/dist/components/ds-sidebar.js +1 -1
  30. package/dist/components/ds-sidebar.js.map +1 -1
  31. package/dist/components/ds-slider.js +1 -1
  32. package/dist/components/ds-surface.js +1 -1
  33. package/dist/components/ds-tab-group-nav.js +1 -1
  34. package/dist/components/ds-tab-group.js +1 -1
  35. package/dist/components/ds-tab-group.js.map +1 -1
  36. package/dist/components/ds-table.js +1 -1
  37. package/dist/components/ds-table.js.map +1 -1
  38. package/dist/components/ds-tag.js +1 -1
  39. package/dist/components/ds-tag.js.map +1 -1
  40. package/dist/components/ds-text.js +1 -1
  41. package/dist/components/ds-toast-provider.js +1 -1
  42. package/dist/components/ds-toggle-button-group.js +1 -1
  43. package/dist/components/ds-toggle-button.js +1 -1
  44. package/dist/components/ds-toggle.js +1 -1
  45. package/dist/components/ds-tooltip.js +1 -1
  46. package/dist/components/p-B_enucPQ.js +2 -0
  47. package/dist/components/p-B_enucPQ.js.map +1 -0
  48. package/dist/components/p-DOtcc9UU.js +2 -0
  49. package/dist/components/p-DOtcc9UU.js.map +1 -0
  50. package/dist/components/{p-H89PzqGU.js → p-DrDrPeVV.js} +2 -2
  51. package/dist/components/{p-Cj00JkJb.js → p-OT-Q-NxH.js} +2 -2
  52. package/dist/components/{p-CE5zeV1w.js → p-U1A-rprN.js} +2 -2
  53. package/dist/components/p-X1N_ggsY.js +2 -0
  54. package/dist/components/p-X1N_ggsY.js.map +1 -0
  55. package/dist/components/p-qfvbc9w-.js +2 -0
  56. package/dist/components/p-qfvbc9w-.js.map +1 -0
  57. package/dist/types/.stencil/Badge/Badge.d.ts +12 -0
  58. package/dist/types/.stencil/Badge/index.d.ts +1 -1
  59. package/dist/types/.stencil/Chip/Chip.d.ts +30 -0
  60. package/dist/types/.stencil/Chip/index.d.ts +2 -0
  61. package/dist/types/.stencil/Fade/Fade.d.ts +17 -2
  62. package/dist/types/.stencil/Fade/index.d.ts +1 -1
  63. package/dist/types/.stencil/Tag/Tag.d.ts +0 -17
  64. package/dist/types/.stencil/Tag/index.d.ts +1 -1
  65. package/dist/types/components.d.ts +226 -80
  66. package/package.json +12 -5
  67. package/src/angular/index.ts +1 -0
  68. package/src/angular/proxies.ts +47 -24
  69. package/src/react/components.ts +1 -0
  70. package/src/react/ds-chip.ts +35 -0
  71. package/src/react/ds-tag.ts +3 -12
  72. package/src/wc/components/Badge/Badge.tsx +58 -8
  73. package/src/wc/components/Badge/index.ts +1 -1
  74. package/src/wc/components/Banner/Banner.tsx +2 -2
  75. package/src/wc/components/BarNav/BarNav.tsx +7 -1
  76. package/src/wc/components/BarNavAction/BarNavAction.tsx +9 -1
  77. package/src/wc/components/Chip/Chip.tsx +127 -0
  78. package/src/wc/components/Chip/index.ts +1 -0
  79. package/src/wc/components/Fade/Fade.tsx +86 -6
  80. package/src/wc/components/Fade/index.ts +1 -1
  81. package/src/wc/components/PanelNav/PanelNav.tsx +17 -1
  82. package/src/wc/components/TabGroup/TabGroup.tsx +9 -1
  83. package/src/wc/components/TabGroupNav/TabGroupNav.tsx +9 -1
  84. package/src/wc/components/Tag/Tag.tsx +3 -70
  85. package/src/wc/components/Tag/index.ts +1 -1
  86. package/src/wc/components.d.ts +226 -80
  87. package/dist/components/p-CQQe6VNo.js +0 -2
  88. package/dist/components/p-CQQe6VNo.js.map +0 -1
  89. package/dist/components/p-Vwlmhl4E.js +0 -2
  90. package/dist/components/p-Vwlmhl4E.js.map +0 -1
  91. /package/dist/components/{p-H89PzqGU.js.map → p-DrDrPeVV.js.map} +0 -0
  92. /package/dist/components/{p-Cj00JkJb.js.map → p-OT-Q-NxH.js.map} +0 -0
  93. /package/dist/components/{p-CE5zeV1w.js.map → p-U1A-rprN.js.map} +0 -0
@@ -517,7 +517,15 @@ export class PanelNav {
517
517
  </ds-text>
518
518
  </span>
519
519
  </span>,
520
- item.dot && <span class="panel-nav__item-dot" aria-hidden="true" />,
520
+ item.dot && (
521
+ <ds-badge
522
+ class="panel-nav__item-dot"
523
+ variant="dot"
524
+ background="var(--_nav-bg)"
525
+ label=""
526
+ aria-hidden="true"
527
+ />
528
+ ),
521
529
  ];
522
530
 
523
531
  const sharedProps = {
@@ -604,6 +612,14 @@ export class PanelNav {
604
612
 
605
613
  {/* ── Footer ── */}
606
614
  <div class="panel-nav__footer">
615
+ <ds-fade
616
+ class="panel-nav__footer-fade"
617
+ side="bottom"
618
+ size="size-600"
619
+ background="var(--_nav-bg)"
620
+ visible={!this.atBottom}
621
+ />
622
+
607
623
  {/* Left icon button — Gear in dashboard, Dashboard in settings */}
608
624
  <button
609
625
  type="button"
@@ -176,7 +176,15 @@ export class TabGroup {
176
176
  [isSelected ? 'text-body-small-emphasis' : 'text-body-small']: true,
177
177
  }}>
178
178
  {tab.label}
179
- {tab.dot && <span class="tab__dot" aria-hidden="true" />}
179
+ {tab.dot && (
180
+ <ds-badge
181
+ class="tab__dot"
182
+ variant="dot"
183
+ background="var(--_dot-ring)"
184
+ label=""
185
+ aria-hidden="true"
186
+ />
187
+ )}
180
188
  </span>
181
189
  </button>
182
190
  );
@@ -176,7 +176,15 @@ export class TabGroupNav {
176
176
  [isSelected ? 'text-body-medium-emphasis' : 'text-body-medium']: true,
177
177
  }}>
178
178
  {tab.label}
179
- {tab.dot && <span class="tab__dot" aria-hidden="true" />}
179
+ {tab.dot && (
180
+ <ds-badge
181
+ class="tab__dot"
182
+ variant="dot"
183
+ background="var(--_dot-ring)"
184
+ label=""
185
+ aria-hidden="true"
186
+ />
187
+ )}
180
188
  </span>
181
189
  </button>
182
190
  );
@@ -1,10 +1,9 @@
1
- import { Component, Prop, Event, EventEmitter, h, Host } from '@stencil/core';
1
+ import { Component, Prop, h, Host } from '@stencil/core';
2
2
 
3
3
  export type TagIntent = 'neutral' | 'brand' | 'ai' | 'negative' | 'warning' | 'caution' | 'positive';
4
4
  export type TagContrast = 'strong' | 'bold' | 'medium' | 'faint';
5
5
  export type TagElevation = 'none' | 'flat' | 'elevated';
6
6
  export type TagSize = 'md' | 'sm' | 'xs';
7
- export type TagBackground = 'faint' | 'medium' | 'bold' | 'strong' | 'always-dark';
8
7
 
9
8
  const TEXT_VARIANT: Record<TagSize, string> = {
10
9
  md: 'text-body-medium',
@@ -26,45 +25,10 @@ export class Tag {
26
25
  @Prop() elevation: TagElevation = 'none';
27
26
  @Prop() size: TagSize = 'md';
28
27
  @Prop() rounded: boolean = false;
29
- @Prop() removable: boolean = false;
30
28
  @Prop() maxWidth: string | number | undefined;
31
- @Prop() inactive: boolean = false;
32
- @Prop() background: TagBackground | undefined;
33
- @Prop({ mutable: true }) pressed: boolean = false;
34
- /** Whether the tag has a click/toggle behavior. */
35
- @Prop() interactive: boolean = false;
36
-
37
- /** Fired when the remove button is clicked. */
38
- @Event() dsRemove!: EventEmitter<void>;
39
- /** Fired when an interactive tag is clicked. */
40
- @Event() dsClick!: EventEmitter<void>;
41
- /** Fired when the pressed state toggles. */
42
- @Event() dsPressedChange!: EventEmitter<boolean>;
43
-
44
- private handleClick = () => {
45
- if (this.inactive) return;
46
- this.pressed = !this.pressed;
47
- this.dsPressedChange.emit(this.pressed);
48
- this.dsClick.emit();
49
- };
50
-
51
- private handleKeyDown = (e: KeyboardEvent) => {
52
- if (this.inactive) return;
53
- if (e.key === 'Enter' || e.key === ' ') {
54
- e.preventDefault();
55
- this.handleClick();
56
- }
57
- };
58
-
59
- private handleRemove = (e: MouseEvent) => {
60
- e.stopPropagation();
61
- this.dsRemove.emit();
62
- };
63
29
 
64
30
  render() {
65
- const cap = (s: string) => s.charAt(0).toUpperCase() + s.slice(1);
66
31
  const sz = this.size.toUpperCase() as 'MD' | 'SM' | 'XS';
67
- const hasIconSlot = true; // always render slot, consumer decides whether to fill it
68
32
  const textVariant = TEXT_VARIANT[this.size];
69
33
  const iconSize = ICON_SIZE[this.size];
70
34
 
@@ -80,29 +44,15 @@ export class Tag {
80
44
  [`tag--size-${this.size}`]: true,
81
45
  'tag--rounded': this.rounded,
82
46
  'tag--rounded-no-icon-left': this.rounded, // consumer overrides via slot presence hack
83
- 'tag--rounded-no-remove-right': this.rounded && !this.removable,
47
+ 'tag--rounded-no-remove-right': this.rounded,
84
48
  [`tag--icon-left-${sz}`]: false, // toggled by slotchange
85
- [`tag--icon-right-${sz}`]: this.removable,
86
- 'tag--removable': this.removable,
87
- 'tag--interactive': this.interactive,
88
- 'tag--inactive': this.inactive,
89
- 'tag--pressed': this.pressed,
90
- 'tag--on-medium': this.background === 'medium',
91
- 'tag--on-bold': this.background === 'bold',
92
- 'tag--on-strong': this.background === 'strong',
93
- 'tag--on-always-dark': this.background === 'always-dark',
49
+ [`tag--icon-right-${sz}`]: false,
94
50
  };
95
51
 
96
52
  return (
97
53
  <Host
98
54
  class={hostCls}
99
55
  style={maxWidthStyle}
100
- onClick={this.interactive ? this.handleClick : undefined}
101
- onKeyDown={this.interactive ? this.handleKeyDown : undefined}
102
- role={this.interactive ? 'button' : undefined}
103
- tabIndex={this.interactive ? (this.inactive ? -1 : 0) : undefined}
104
- aria-pressed={this.interactive && this.pressed !== undefined ? String(this.pressed) : undefined}
105
- aria-disabled={this.inactive || undefined}
106
56
  >
107
57
  {/* Leading icon slot — consumer provides an icon element */}
108
58
  <span class="tag__icon-slot" style={{ fontSize: `${iconSize}px`, lineHeight: '0' }}>
@@ -112,23 +62,6 @@ export class Tag {
112
62
  <span class={{ 'tag__label': true, [textVariant]: true }}>
113
63
  {this.label}
114
64
  </span>
115
- {/* Remove button */}
116
- {this.removable && (
117
- <button
118
- type="button"
119
- class="tag__remove"
120
- onClick={this.handleRemove}
121
- aria-label={`Remove ${this.label}`}
122
- tabIndex={-1}
123
- >
124
- {/* Remove icon slot — defaults to × glyph */}
125
- <slot name="remove-icon">
126
- <span class="tag__remove-x" style={{ fontSize: `${iconSize}px`, lineHeight: '0' }}>
127
-
128
- </span>
129
- </slot>
130
- </button>
131
- )}
132
65
  </Host>
133
66
  );
134
67
  }
@@ -1 +1 @@
1
- export type { TagIntent, TagContrast, TagElevation, TagSize, TagBackground } from './Tag';
1
+ export type { TagIntent, TagContrast, TagElevation, TagSize } from './Tag';