@ds-mo/ui 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +0 -1
  2. package/dist/components/ds-bar-nav.js +1 -1
  3. package/dist/components/ds-checkbox.js +1 -1
  4. package/dist/components/ds-divider.js +1 -1
  5. package/dist/components/ds-divider.js.map +1 -1
  6. package/dist/components/ds-field.js +1 -1
  7. package/dist/components/ds-modal.js +1 -1
  8. package/dist/components/ds-panel-nav.js +1 -1
  9. package/dist/components/ds-radio-group.js +1 -1
  10. package/dist/components/ds-radio-group.js.map +1 -1
  11. package/dist/components/ds-scrollbar.js +1 -1
  12. package/dist/components/ds-select.js +1 -1
  13. package/dist/components/ds-slider.js +1 -1
  14. package/dist/components/ds-slider.js.map +1 -1
  15. package/dist/components/ds-surface.js +1 -1
  16. package/dist/components/ds-tab-group-nav.js +1 -1
  17. package/dist/components/ds-tab-group.js +1 -1
  18. package/dist/components/ds-table.js +1 -1
  19. package/dist/components/ds-tag.js +1 -1
  20. package/dist/components/ds-text.js +1 -1
  21. package/dist/components/ds-toast-provider.js +1 -1
  22. package/dist/components/ds-toggle-button-group.js +1 -1
  23. package/dist/components/ds-toggle-button.js +1 -1
  24. package/dist/components/ds-toggle.js +1 -1
  25. package/dist/components/ds-tooltip.js +1 -1
  26. package/dist/components/{p-Dd0GrKaF.js → p-CE5zeV1w.js} +2 -2
  27. package/dist/components/{p-CMyQsk0K.js → p-CQQe6VNo.js} +2 -2
  28. package/dist/components/p-Cj00JkJb.js +2 -0
  29. package/dist/components/p-Cj00JkJb.js.map +1 -0
  30. package/dist/types/.stencil/Divider/Divider.d.ts +14 -0
  31. package/dist/types/.stencil/Text/Text.d.ts +2 -0
  32. package/dist/types/components.d.ts +57 -63
  33. package/package.json +1 -1
  34. package/src/angular/index.ts +0 -1
  35. package/src/angular/proxies.ts +4 -27
  36. package/src/react/components.ts +0 -1
  37. package/src/wc/components/Divider/Divider.tsx +88 -4
  38. package/src/wc/components/Text/Text.tsx +3 -0
  39. package/src/wc/components.d.ts +57 -63
  40. package/dist/components/ds-label-wrap.d.ts +0 -11
  41. package/dist/components/ds-label-wrap.js +0 -2
  42. package/dist/components/ds-label-wrap.js.map +0 -1
  43. package/dist/components/p-woooYulR.js +0 -2
  44. package/dist/components/p-woooYulR.js.map +0 -1
  45. package/dist/types/.stencil/LabelWrap/LabelWrap.d.ts +0 -15
  46. package/src/react/ds-label-wrap.ts +0 -26
  47. package/src/wc/components/LabelWrap/LabelWrap.tsx +0 -38
  48. /package/dist/components/{p-Dd0GrKaF.js.map → p-CE5zeV1w.js.map} +0 -0
  49. /package/dist/components/{p-CMyQsk0K.js.map → p-CQQe6VNo.js.map} +0 -0
@@ -13,13 +13,12 @@ import { BreadcrumbItem } from "./components/Breadcrumb/Breadcrumb";
13
13
  import { ButtonBackground, ButtonContrast, ButtonElevation, ButtonIntent, ButtonSize, ButtonVariant } from "./components/Button/Button";
14
14
  import { ButtonGroupElevation, ButtonGroupItem, ButtonGroupSize } from "./components/ButtonGroup/ButtonGroup";
15
15
  import { CardElevation, CardRadius } from "./components/Card/Card";
16
- import { DividerOrientation } from "./components/Divider/Divider";
16
+ import { DividerInset, DividerLength, DividerOrientation, DividerSurface } from "./components/Divider/Divider";
17
17
  import { EmptyStateType } from "./components/EmptyState/EmptyState";
18
18
  import { FadeSide } from "./components/Fade/Fade";
19
19
  import { HeaderBackground } from "./components/Header/Header";
20
20
  import { IconColor, IconSize } from "./components/Icon/Icon";
21
21
  import { InputType } from "./components/Input/Input";
22
- import { LabelWrapSize } from "./components/LabelWrap/LabelWrap";
23
22
  import { MenuAlign, MenuItemData, MenuSection, MenuSide } from "./components/Menu/Menu";
24
23
  import { ModalWidth } from "./components/Modal/Modal";
25
24
  import { PanelNavGroup, PanelNavRouterMode, PanelNavVariant } from "./components/PanelNav/PanelNav";
@@ -34,7 +33,7 @@ import { TabBackground } from "./components/TabGroup/TabGroup";
34
33
  import { TabGroupNavBackground } from "./components/TabGroupNav/TabGroupNav";
35
34
  import { SortState, TableColumn } from "./components/Table/Table";
36
35
  import { TagBackground, TagContrast, TagElevation, TagIntent, TagSize } from "./components/Tag/Tag";
37
- import { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextVariant, TextWrap } from "./components/Text/Text";
36
+ import { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextFontFeature, TextVariant, TextWrap } from "./components/Text/Text";
38
37
  import { ToastPosition } from "./components/Toast/Toast";
39
38
  import { ToggleButtonBackground, ToggleButtonElevation, ToggleButtonSize } from "./components/ToggleButton/ToggleButton";
40
39
  import { ToggleGroupBackground, ToggleGroupElevation, ToggleGroupItem, ToggleGroupSize } from "./components/ToggleButtonGroup/ToggleButtonGroup";
@@ -47,13 +46,12 @@ export { BreadcrumbItem } from "./components/Breadcrumb/Breadcrumb";
47
46
  export { ButtonBackground, ButtonContrast, ButtonElevation, ButtonIntent, ButtonSize, ButtonVariant } from "./components/Button/Button";
48
47
  export { ButtonGroupElevation, ButtonGroupItem, ButtonGroupSize } from "./components/ButtonGroup/ButtonGroup";
49
48
  export { CardElevation, CardRadius } from "./components/Card/Card";
50
- export { DividerOrientation } from "./components/Divider/Divider";
49
+ export { DividerInset, DividerLength, DividerOrientation, DividerSurface } from "./components/Divider/Divider";
51
50
  export { EmptyStateType } from "./components/EmptyState/EmptyState";
52
51
  export { FadeSide } from "./components/Fade/Fade";
53
52
  export { HeaderBackground } from "./components/Header/Header";
54
53
  export { IconColor, IconSize } from "./components/Icon/Icon";
55
54
  export { InputType } from "./components/Input/Input";
56
- export { LabelWrapSize } from "./components/LabelWrap/LabelWrap";
57
55
  export { MenuAlign, MenuItemData, MenuSection, MenuSide } from "./components/Menu/Menu";
58
56
  export { ModalWidth } from "./components/Modal/Modal";
59
57
  export { PanelNavGroup, PanelNavRouterMode, PanelNavVariant } from "./components/PanelNav/PanelNav";
@@ -68,7 +66,7 @@ export { TabBackground } from "./components/TabGroup/TabGroup";
68
66
  export { TabGroupNavBackground } from "./components/TabGroupNav/TabGroupNav";
69
67
  export { SortState, TableColumn } from "./components/Table/Table";
70
68
  export { TagBackground, TagContrast, TagElevation, TagIntent, TagSize } from "./components/Tag/Tag";
71
- export { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextVariant, TextWrap } from "./components/Text/Text";
69
+ export { LineTruncation, TextAlign, TextColor, TextDecoration, TextElement, TextFontFeature, TextVariant, TextWrap } from "./components/Text/Text";
72
70
  export { ToastPosition } from "./components/Toast/Toast";
73
71
  export { ToggleButtonBackground, ToggleButtonElevation, ToggleButtonSize } from "./components/ToggleButton/ToggleButton";
74
72
  export { ToggleGroupBackground, ToggleGroupElevation, ToggleGroupItem, ToggleGroupSize } from "./components/ToggleButtonGroup/ToggleButtonGroup";
@@ -321,11 +319,31 @@ export namespace Components {
321
319
  "label": string;
322
320
  }
323
321
  interface DsDivider {
322
+ /**
323
+ * Insets the divider from its start/end edges. Accepts spacing token names or any CSS length.
324
+ * @default 'none'
325
+ */
326
+ "inset": DividerInset;
327
+ /**
328
+ * Visual line length. Defaults to filling the available axis. Accepts any CSS length.
329
+ * @default 'auto'
330
+ */
331
+ "length": DividerLength;
324
332
  /**
325
333
  * Direction of the divider line. Defaults to 'horizontal'.
326
334
  * @default 'horizontal'
327
335
  */
328
336
  "orientation": DividerOrientation;
337
+ /**
338
+ * Expose the divider as a semantic separator. Visual-only dividers are hidden from assistive tech by default.
339
+ * @default false
340
+ */
341
+ "semantic": boolean;
342
+ /**
343
+ * Surface context so the divider uses the right TokoMo divider token.
344
+ * @default 'default'
345
+ */
346
+ "surface": DividerSurface;
329
347
  }
330
348
  interface DsEmptyState {
331
349
  "message": string | undefined;
@@ -417,23 +435,6 @@ export namespace Components {
417
435
  */
418
436
  "value": string;
419
437
  }
420
- /**
421
- * Internal utility wrapper that kills line-height struts and adds optical
422
- * horizontal padding. Used inside interactive components (Button, Tag, etc.)
423
- * Not intended as a standalone consumer-facing component — internal use only.
424
- */
425
- interface DsLabelWrap {
426
- /**
427
- * Typography size — controls optical horizontal padding.
428
- * @default 'md'
429
- */
430
- "size": LabelWrapSize;
431
- /**
432
- * Enable truncation with ellipsis — use inside full-width containers.
433
- * @default false
434
- */
435
- "truncate": boolean;
436
- }
437
438
  interface DsLoader {
438
439
  /**
439
440
  * Accessible label for standalone usage. Wraps the spinner in a live region and renders the label visually-hidden. Omit when the host element already conveys busy state via aria-busy.
@@ -849,6 +850,10 @@ export namespace Components {
849
850
  "as": TextElement;
850
851
  "color": TextColor | undefined;
851
852
  "decoration": TextDecoration | undefined;
853
+ /**
854
+ * @default 'normal'
855
+ */
856
+ "fontFeature": TextFontFeature;
852
857
  /**
853
858
  * Maps to `for` attribute on <label> elements.
854
859
  */
@@ -1287,17 +1292,6 @@ declare global {
1287
1292
  prototype: HTMLDsInputElement;
1288
1293
  new (): HTMLDsInputElement;
1289
1294
  };
1290
- /**
1291
- * Internal utility wrapper that kills line-height struts and adds optical
1292
- * horizontal padding. Used inside interactive components (Button, Tag, etc.)
1293
- * Not intended as a standalone consumer-facing component — internal use only.
1294
- */
1295
- interface HTMLDsLabelWrapElement extends Components.DsLabelWrap, HTMLStencilElement {
1296
- }
1297
- var HTMLDsLabelWrapElement: {
1298
- prototype: HTMLDsLabelWrapElement;
1299
- new (): HTMLDsLabelWrapElement;
1300
- };
1301
1295
  interface HTMLDsLoaderElement extends Components.DsLoader, HTMLStencilElement {
1302
1296
  }
1303
1297
  var HTMLDsLoaderElement: {
@@ -1622,7 +1616,6 @@ declare global {
1622
1616
  "ds-header": HTMLDsHeaderElement;
1623
1617
  "ds-icon": HTMLDsIconElement;
1624
1618
  "ds-input": HTMLDsInputElement;
1625
- "ds-label-wrap": HTMLDsLabelWrapElement;
1626
1619
  "ds-loader": HTMLDsLoaderElement;
1627
1620
  "ds-menu": HTMLDsMenuElement;
1628
1621
  "ds-modal": HTMLDsModalElement;
@@ -1920,11 +1913,31 @@ declare namespace LocalJSX {
1920
1913
  "onDsChange"?: (event: DsCheckboxCustomEvent<boolean>) => void;
1921
1914
  }
1922
1915
  interface DsDivider {
1916
+ /**
1917
+ * Insets the divider from its start/end edges. Accepts spacing token names or any CSS length.
1918
+ * @default 'none'
1919
+ */
1920
+ "inset"?: DividerInset;
1921
+ /**
1922
+ * Visual line length. Defaults to filling the available axis. Accepts any CSS length.
1923
+ * @default 'auto'
1924
+ */
1925
+ "length"?: DividerLength;
1923
1926
  /**
1924
1927
  * Direction of the divider line. Defaults to 'horizontal'.
1925
1928
  * @default 'horizontal'
1926
1929
  */
1927
1930
  "orientation"?: DividerOrientation;
1931
+ /**
1932
+ * Expose the divider as a semantic separator. Visual-only dividers are hidden from assistive tech by default.
1933
+ * @default false
1934
+ */
1935
+ "semantic"?: boolean;
1936
+ /**
1937
+ * Surface context so the divider uses the right TokoMo divider token.
1938
+ * @default 'default'
1939
+ */
1940
+ "surface"?: DividerSurface;
1928
1941
  }
1929
1942
  interface DsEmptyState {
1930
1943
  "message"?: string | undefined;
@@ -2017,23 +2030,6 @@ declare namespace LocalJSX {
2017
2030
  */
2018
2031
  "value"?: string;
2019
2032
  }
2020
- /**
2021
- * Internal utility wrapper that kills line-height struts and adds optical
2022
- * horizontal padding. Used inside interactive components (Button, Tag, etc.)
2023
- * Not intended as a standalone consumer-facing component — internal use only.
2024
- */
2025
- interface DsLabelWrap {
2026
- /**
2027
- * Typography size — controls optical horizontal padding.
2028
- * @default 'md'
2029
- */
2030
- "size"?: LabelWrapSize;
2031
- /**
2032
- * Enable truncation with ellipsis — use inside full-width containers.
2033
- * @default false
2034
- */
2035
- "truncate"?: boolean;
2036
- }
2037
2033
  interface DsLoader {
2038
2034
  /**
2039
2035
  * Accessible label for standalone usage. Wraps the spinner in a live region and renders the label visually-hidden. Omit when the host element already conveys busy state via aria-busy.
@@ -2494,6 +2490,10 @@ declare namespace LocalJSX {
2494
2490
  "as"?: TextElement;
2495
2491
  "color"?: TextColor | undefined;
2496
2492
  "decoration"?: TextDecoration | undefined;
2493
+ /**
2494
+ * @default 'normal'
2495
+ */
2496
+ "fontFeature"?: TextFontFeature;
2497
2497
  /**
2498
2498
  * Maps to `for` attribute on <label> elements.
2499
2499
  */
@@ -2715,6 +2715,10 @@ declare namespace LocalJSX {
2715
2715
  }
2716
2716
  interface DsDividerAttributes {
2717
2717
  "orientation": DividerOrientation;
2718
+ "surface": DividerSurface;
2719
+ "inset": DividerInset;
2720
+ "length": DividerLength;
2721
+ "semantic": boolean;
2718
2722
  }
2719
2723
  interface DsEmptyStateAttributes {
2720
2724
  "type": EmptyStateType;
@@ -2753,10 +2757,6 @@ declare namespace LocalJSX {
2753
2757
  "ariaLabelledby": string | undefined;
2754
2758
  "ariaDescribedby": string | undefined;
2755
2759
  }
2756
- interface DsLabelWrapAttributes {
2757
- "size": LabelWrapSize;
2758
- "truncate": boolean;
2759
- }
2760
2760
  interface DsLoaderAttributes {
2761
2761
  "size": number;
2762
2762
  "label": string | undefined;
@@ -2892,6 +2892,7 @@ declare namespace LocalJSX {
2892
2892
  "align": TextAlign | undefined;
2893
2893
  "lineTruncation": string;
2894
2894
  "wrap": TextWrap | undefined;
2895
+ "fontFeature": TextFontFeature;
2895
2896
  "as": TextElement;
2896
2897
  "for": string | undefined;
2897
2898
  }
@@ -2949,7 +2950,6 @@ declare namespace LocalJSX {
2949
2950
  "ds-header": Omit<DsHeader, keyof DsHeaderAttributes> & { [K in keyof DsHeader & keyof DsHeaderAttributes]?: DsHeader[K] } & { [K in keyof DsHeader & keyof DsHeaderAttributes as `attr:${K}`]?: DsHeaderAttributes[K] } & { [K in keyof DsHeader & keyof DsHeaderAttributes as `prop:${K}`]?: DsHeader[K] };
2950
2951
  "ds-icon": Omit<DsIcon, keyof DsIconAttributes> & { [K in keyof DsIcon & keyof DsIconAttributes]?: DsIcon[K] } & { [K in keyof DsIcon & keyof DsIconAttributes as `attr:${K}`]?: DsIconAttributes[K] } & { [K in keyof DsIcon & keyof DsIconAttributes as `prop:${K}`]?: DsIcon[K] };
2951
2952
  "ds-input": Omit<DsInput, keyof DsInputAttributes> & { [K in keyof DsInput & keyof DsInputAttributes]?: DsInput[K] } & { [K in keyof DsInput & keyof DsInputAttributes as `attr:${K}`]?: DsInputAttributes[K] } & { [K in keyof DsInput & keyof DsInputAttributes as `prop:${K}`]?: DsInput[K] };
2952
- "ds-label-wrap": Omit<DsLabelWrap, keyof DsLabelWrapAttributes> & { [K in keyof DsLabelWrap & keyof DsLabelWrapAttributes]?: DsLabelWrap[K] } & { [K in keyof DsLabelWrap & keyof DsLabelWrapAttributes as `attr:${K}`]?: DsLabelWrapAttributes[K] } & { [K in keyof DsLabelWrap & keyof DsLabelWrapAttributes as `prop:${K}`]?: DsLabelWrap[K] };
2953
2953
  "ds-loader": Omit<DsLoader, keyof DsLoaderAttributes> & { [K in keyof DsLoader & keyof DsLoaderAttributes]?: DsLoader[K] } & { [K in keyof DsLoader & keyof DsLoaderAttributes as `attr:${K}`]?: DsLoaderAttributes[K] } & { [K in keyof DsLoader & keyof DsLoaderAttributes as `prop:${K}`]?: DsLoader[K] };
2954
2954
  "ds-menu": Omit<DsMenu, keyof DsMenuAttributes> & { [K in keyof DsMenu & keyof DsMenuAttributes]?: DsMenu[K] } & { [K in keyof DsMenu & keyof DsMenuAttributes as `attr:${K}`]?: DsMenuAttributes[K] } & { [K in keyof DsMenu & keyof DsMenuAttributes as `prop:${K}`]?: DsMenu[K] };
2955
2955
  "ds-modal": Omit<DsModal, keyof DsModalAttributes> & { [K in keyof DsModal & keyof DsModalAttributes]?: DsModal[K] } & { [K in keyof DsModal & keyof DsModalAttributes as `attr:${K}`]?: DsModalAttributes[K] } & { [K in keyof DsModal & keyof DsModalAttributes as `prop:${K}`]?: DsModal[K] } & OneOf<"heading", DsModal["heading"], DsModalAttributes["heading"]>;
@@ -2995,12 +2995,6 @@ declare module "@stencil/core" {
2995
2995
  "ds-header": LocalJSX.IntrinsicElements["ds-header"] & JSXBase.HTMLAttributes<HTMLDsHeaderElement>;
2996
2996
  "ds-icon": LocalJSX.IntrinsicElements["ds-icon"] & JSXBase.HTMLAttributes<HTMLDsIconElement>;
2997
2997
  "ds-input": LocalJSX.IntrinsicElements["ds-input"] & JSXBase.HTMLAttributes<HTMLDsInputElement>;
2998
- /**
2999
- * Internal utility wrapper that kills line-height struts and adds optical
3000
- * horizontal padding. Used inside interactive components (Button, Tag, etc.)
3001
- * Not intended as a standalone consumer-facing component — internal use only.
3002
- */
3003
- "ds-label-wrap": LocalJSX.IntrinsicElements["ds-label-wrap"] & JSXBase.HTMLAttributes<HTMLDsLabelWrapElement>;
3004
2998
  "ds-loader": LocalJSX.IntrinsicElements["ds-loader"] & JSXBase.HTMLAttributes<HTMLDsLoaderElement>;
3005
2999
  "ds-menu": LocalJSX.IntrinsicElements["ds-menu"] & JSXBase.HTMLAttributes<HTMLDsMenuElement>;
3006
3000
  "ds-modal": LocalJSX.IntrinsicElements["ds-modal"] & JSXBase.HTMLAttributes<HTMLDsModalElement>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ds-mo/ui",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "CompoMo — composable web components styled with TokoMo design tokens",
5
5
  "keywords": [
6
6
  "web-components",
@@ -19,7 +19,6 @@ export const DIRECTIVES = [
19
19
  d.DsHeader,
20
20
  d.DsIcon,
21
21
  d.DsInput,
22
- d.DsLabelWrap,
23
22
  d.DsLoader,
24
23
  d.DsMenu,
25
24
  d.DsModal,
@@ -297,14 +297,14 @@ export declare interface DsCheckbox extends Components.DsCheckbox {
297
297
 
298
298
 
299
299
  @ProxyCmp({
300
- inputs: ['orientation']
300
+ inputs: ['inset', 'length', 'orientation', 'semantic', 'surface']
301
301
  })
302
302
  @Component({
303
303
  selector: 'ds-divider',
304
304
  changeDetection: ChangeDetectionStrategy.OnPush,
305
305
  template: '<ng-content></ng-content>',
306
306
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
307
- inputs: ['orientation'],
307
+ inputs: ['inset', 'length', 'orientation', 'semantic', 'surface'],
308
308
  standalone: false
309
309
  })
310
310
  export class DsDivider {
@@ -466,29 +466,6 @@ export declare interface DsInput extends Components.DsInput {
466
466
  }
467
467
 
468
468
 
469
- @ProxyCmp({
470
- inputs: ['size', 'truncate']
471
- })
472
- @Component({
473
- selector: 'ds-label-wrap',
474
- changeDetection: ChangeDetectionStrategy.OnPush,
475
- template: '<ng-content></ng-content>',
476
- // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
477
- inputs: ['size', 'truncate'],
478
- standalone: false
479
- })
480
- export class DsLabelWrap {
481
- protected el: HTMLDsLabelWrapElement;
482
- constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
483
- c.detach();
484
- this.el = r.nativeElement;
485
- }
486
- }
487
-
488
-
489
- export declare interface DsLabelWrap extends Components.DsLabelWrap {}
490
-
491
-
492
469
  @ProxyCmp({
493
470
  inputs: ['label', 'size']
494
471
  })
@@ -965,14 +942,14 @@ export declare interface DsTag extends Components.DsTag {
965
942
 
966
943
 
967
944
  @ProxyCmp({
968
- inputs: ['align', 'as', 'color', 'decoration', 'for', 'italic', 'lineTruncation', 'variant', 'wrap']
945
+ inputs: ['align', 'as', 'color', 'decoration', 'fontFeature', 'for', 'italic', 'lineTruncation', 'variant', 'wrap']
969
946
  })
970
947
  @Component({
971
948
  selector: 'ds-text',
972
949
  changeDetection: ChangeDetectionStrategy.OnPush,
973
950
  template: '<ng-content></ng-content>',
974
951
  // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
975
- inputs: ['align', 'as', 'color', 'decoration', 'for', 'italic', 'lineTruncation', 'variant', 'wrap'],
952
+ inputs: ['align', 'as', 'color', 'decoration', 'fontFeature', 'for', 'italic', 'lineTruncation', 'variant', 'wrap'],
976
953
  standalone: false
977
954
  })
978
955
  export class DsText {
@@ -21,7 +21,6 @@ export { DsField } from "./ds-field.js";
21
21
  export { DsHeader } from "./ds-header.js";
22
22
  export { DsIcon } from "./ds-icon.js";
23
23
  export { DsInput } from "./ds-input.js";
24
- export { DsLabelWrap } from "./ds-label-wrap.js";
25
24
  export { DsLoader } from "./ds-loader.js";
26
25
  export { DsMenu } from "./ds-menu.js";
27
26
  export { DsModal } from "./ds-modal.js";
@@ -1,22 +1,106 @@
1
1
  import { Component, Prop, h, Host } from '@stencil/core';
2
2
 
3
3
  export type DividerOrientation = 'horizontal' | 'vertical';
4
+ export type DividerSurface =
5
+ | 'default'
6
+ | 'on-bold-background'
7
+ | 'on-strong-background'
8
+ | 'on-medium-background'
9
+ | 'on-translucent-background'
10
+ | 'navigation'
11
+ | 'media'
12
+ | 'always-dark'
13
+ | 'inverted';
14
+ export type DividerInsetToken =
15
+ | 'space-000'
16
+ | 'space-012'
17
+ | 'space-025'
18
+ | 'space-050'
19
+ | 'space-075'
20
+ | 'space-100'
21
+ | 'space-125'
22
+ | 'space-150'
23
+ | 'space-175'
24
+ | 'space-200'
25
+ | 'space-250'
26
+ | 'space-300'
27
+ | 'space-400'
28
+ | 'space-600'
29
+ | 'space-800';
30
+ export type DividerInset = 'none' | DividerInsetToken | (string & {});
31
+ export type DividerLength = 'auto' | 'full' | (string & {});
32
+
33
+ const INSET_VALUE: Record<'none' | DividerInsetToken, string> = {
34
+ none: '0',
35
+ 'space-000': 'var(--dimension-space-000)',
36
+ 'space-012': 'var(--dimension-space-012)',
37
+ 'space-025': 'var(--dimension-space-025)',
38
+ 'space-050': 'var(--dimension-space-050)',
39
+ 'space-075': 'var(--dimension-space-075)',
40
+ 'space-100': 'var(--dimension-space-100)',
41
+ 'space-125': 'var(--dimension-space-125)',
42
+ 'space-150': 'var(--dimension-space-150)',
43
+ 'space-175': 'var(--dimension-space-175)',
44
+ 'space-200': 'var(--dimension-space-200)',
45
+ 'space-250': 'var(--dimension-space-250)',
46
+ 'space-300': 'var(--dimension-space-300)',
47
+ 'space-400': 'var(--dimension-space-400)',
48
+ 'space-600': 'var(--dimension-space-600)',
49
+ 'space-800': 'var(--dimension-space-800)',
50
+ };
4
51
 
5
52
  @Component({
6
53
  tag: 'ds-divider',
7
54
  styleUrl: 'Divider.css',
8
- shadow: true,
55
+ scoped: true,
9
56
  })
10
57
  export class Divider {
11
58
  /** Direction of the divider line. Defaults to 'horizontal'. */
12
59
  @Prop() orientation: DividerOrientation = 'horizontal';
13
60
 
61
+ /** Surface context so the divider uses the right TokoMo divider token. */
62
+ @Prop() surface: DividerSurface = 'default';
63
+
64
+ /** Insets the divider from its start/end edges. Accepts spacing token names or any CSS length. */
65
+ @Prop() inset: DividerInset = 'none';
66
+
67
+ /** Visual line length. Defaults to filling the available axis. Accepts any CSS length. */
68
+ @Prop() length: DividerLength = 'auto';
69
+
70
+ /** Expose the divider as a semantic separator. Visual-only dividers are hidden from assistive tech by default. */
71
+ @Prop() semantic: boolean = false;
72
+
73
+ private resolveInset(): string {
74
+ return Object.prototype.hasOwnProperty.call(INSET_VALUE, this.inset)
75
+ ? INSET_VALUE[this.inset as keyof typeof INSET_VALUE]
76
+ : this.inset;
77
+ }
78
+
79
+ private resolveLength(): string {
80
+ return this.length === 'auto' || this.length === 'full'
81
+ ? '100%'
82
+ : this.length;
83
+ }
84
+
14
85
  render() {
86
+ const isVertical = this.orientation === 'vertical';
87
+ const hasCustomLength = this.length !== 'auto' && this.length !== 'full';
88
+
15
89
  return (
16
90
  <Host
17
- role="separator"
18
- aria-orientation={this.orientation}
19
- class={{ vertical: this.orientation === 'vertical' }}
91
+ role={this.semantic ? 'separator' : undefined}
92
+ aria-orientation={this.semantic ? this.orientation : undefined}
93
+ aria-hidden={this.semantic ? undefined : 'true'}
94
+ class={{
95
+ divider: true,
96
+ 'divider--vertical': isVertical,
97
+ 'divider--custom-length': hasCustomLength,
98
+ [`divider--surface-${this.surface}`]: true,
99
+ }}
100
+ style={{
101
+ '--_divider-inset': this.resolveInset(),
102
+ '--_divider-length': this.resolveLength(),
103
+ }}
20
104
  />
21
105
  );
22
106
  }
@@ -26,6 +26,7 @@ export type TextAlign = 'left' | 'center' | 'right';
26
26
  export type LineTruncation = 1 | 2 | 3 | 4 | 5 | 'none';
27
27
  export type TextWrap = 'wrap' | 'nowrap' | 'balance' | 'pretty';
28
28
  export type TextElement = 'p' | 'span' | 'div' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
29
+ export type TextFontFeature = 'normal' | 'tabular-nums';
29
30
 
30
31
  @Component({
31
32
  tag: 'ds-text',
@@ -40,6 +41,7 @@ export class Text {
40
41
  @Prop() align: TextAlign | undefined;
41
42
  @Prop() lineTruncation: LineTruncation = 'none';
42
43
  @Prop() wrap: TextWrap | undefined;
44
+ @Prop() fontFeature: TextFontFeature = 'normal';
43
45
  @Prop() as: TextElement = 'p';
44
46
  /** Maps to `for` attribute on <label> elements. */
45
47
  @Prop() for: string | undefined;
@@ -80,6 +82,7 @@ export class Text {
80
82
  'text--align-left': this.align === 'left',
81
83
  'text--align-center': this.align === 'center',
82
84
  'text--align-right': this.align === 'right',
85
+ 'text--font-feature-tabular-nums': this.fontFeature === 'tabular-nums',
83
86
  };
84
87
 
85
88
  const style = this.color && isCustomColor(this.color)