@vonage/vivid 3.0.0-next.129 → 3.0.0-next.130

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 (83) hide show
  1. package/combobox/index.js +33 -0
  2. package/custom-elements.json +102 -0
  3. package/dialog/index.js +1 -1
  4. package/divider/index.js +1 -1
  5. package/fab/index.js +1 -1
  6. package/header/index.js +1 -1
  7. package/index.js +30 -26
  8. package/layout/index.js +1 -1
  9. package/lib/combobox/combobox.d.ts +14 -0
  10. package/lib/combobox/combobox.template.d.ts +4 -0
  11. package/lib/combobox/definition.d.ts +3 -0
  12. package/lib/combobox/index.d.ts +1 -0
  13. package/lib/components.d.ts +1 -0
  14. package/listbox/index.js +3 -2
  15. package/menu/index.js +3 -3
  16. package/menu-item/index.js +1 -1
  17. package/nav/index.js +1 -1
  18. package/nav-disclosure/index.js +1 -1
  19. package/nav-item/index.js +1 -1
  20. package/note/index.js +1 -1
  21. package/number-field/index.js +4 -3
  22. package/option/index.js +1 -1
  23. package/package.json +1 -1
  24. package/popup/index.js +1 -1
  25. package/progress/index.js +1 -1
  26. package/progress-ring/index.js +1 -1
  27. package/radio/index.js +1 -1
  28. package/radio-group/index.js +1 -1
  29. package/shared/definition.js +1 -1
  30. package/shared/definition11.js +1 -1
  31. package/shared/definition12.js +1 -1
  32. package/shared/definition13.js +1 -1
  33. package/shared/definition14.js +1 -1
  34. package/shared/definition16.js +1 -1
  35. package/shared/definition17.js +709 -198
  36. package/shared/definition18.js +1630 -64
  37. package/shared/definition19.js +242 -68
  38. package/shared/definition2.js +1 -1
  39. package/shared/definition20.js +205 -40
  40. package/shared/definition21.js +67 -33
  41. package/shared/definition22.js +70 -1038
  42. package/shared/definition23.js +44 -247
  43. package/shared/definition24.js +35 -339
  44. package/shared/definition25.js +46 -1632
  45. package/shared/definition26.js +268 -271
  46. package/shared/definition27.js +344 -14
  47. package/shared/definition28.js +13 -67
  48. package/shared/definition29.js +65 -21
  49. package/shared/definition30.js +20 -45
  50. package/shared/definition31.js +40 -78
  51. package/shared/definition32.js +76 -59
  52. package/shared/definition33.js +67 -35
  53. package/shared/definition34.js +31 -421
  54. package/shared/definition35.js +418 -69
  55. package/shared/definition36.js +66 -572
  56. package/shared/definition37.js +526 -81
  57. package/shared/definition38.js +85 -217
  58. package/shared/definition39.js +246 -85
  59. package/shared/definition4.js +1 -1
  60. package/shared/definition40.js +110 -68
  61. package/shared/definition41.js +77 -0
  62. package/shared/definition5.js +1 -1
  63. package/shared/definition6.js +1 -1
  64. package/shared/definition7.js +1 -1
  65. package/shared/definition8.js +1 -1
  66. package/shared/definition9.js +1 -1
  67. package/shared/form-elements.js +3 -225
  68. package/shared/listbox.js +1002 -0
  69. package/shared/patterns/form-elements/form-elements.d.ts +2 -2
  70. package/shared/text-field.js +3 -0
  71. package/shared/text-field2.js +225 -0
  72. package/side-drawer/index.js +1 -1
  73. package/slider/index.js +1 -1
  74. package/styles/core/all.css +1 -1
  75. package/styles/core/theme.css +1 -1
  76. package/styles/core/typography.css +1 -1
  77. package/styles/tokens/theme-dark.css +4 -4
  78. package/styles/tokens/theme-light.css +4 -4
  79. package/switch/index.js +1 -1
  80. package/text-area/index.js +2 -1
  81. package/text-field/index.js +3 -1
  82. package/tooltip/index.js +2 -2
  83. package/vivid.api.json +123 -0
@@ -1,44 +1,78 @@
1
- import { F as FoundationElement, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
1
+ import { F as FoundationElement, _ as __decorate, a as attr, h as html, r as registerFactory } from './index.js';
2
+ import { O as Orientation } from './aria.js';
2
3
  import { c as classNames } from './class-names.js';
3
4
 
4
- var AUTO_SIZING;
5
- (function (AUTO_SIZING) {
6
- AUTO_SIZING["Fit"] = "fit";
7
- AUTO_SIZING["Fill"] = "fill";
8
- })(AUTO_SIZING || (AUTO_SIZING = {}));
9
- class Layout extends FoundationElement {}
10
- __decorate([attr, __metadata("design:type", String)], Layout.prototype, "gutters", void 0);
11
- __decorate([attr({
12
- attribute: 'column-basis'
13
- }), __metadata("design:type", String)], Layout.prototype, "columnBasis", void 0);
14
- __decorate([attr({
15
- attribute: 'column-spacing'
16
- }), __metadata("design:type", String)], Layout.prototype, "columnSpacing", void 0);
17
- __decorate([attr({
18
- attribute: 'auto-sizing'
19
- }), __metadata("design:type", String)], Layout.prototype, "autoSizing", void 0);
5
+ /**
6
+ * Divider roles
7
+ * @public
8
+ */
9
+ const DividerRole = {
10
+ /**
11
+ * The divider semantically separates content
12
+ */
13
+ separator: "separator",
14
+ /**
15
+ * The divider has no semantic value and is for visual presentation only.
16
+ */
17
+ presentation: "presentation",
18
+ };
20
19
 
21
- var css_248z = "/* #region SIZEs */\n/* #region BASES */\n/* #region SPACES */\n.control {\n display: grid;\n grid-auto-rows: min-content;\n}\n.control.column-basis-small {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(160px, 1fr)));\n}\n.control:not(.column-basis-small):not(.column-basis-medium):not(.column-basis-large):not(.column-basis-block), .control.column-basis-medium {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(320px, 1fr)));\n}\n.control.column-basis-large {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(380px, 1fr)));\n}\n.control.column-basis-block {\n grid-template-columns: var(--layout-grid-template-columns, repeat(var(--_auto-sizing), minmax(1fr, 1fr)));\n}\n.control.column-spacing-small {\n gap: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-small-inline {\n gap: 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.column-spacing-small-block {\n gap: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0;\n}\n.control:not(.column-spacing-small):not(.column-spacing-small-inline):not(.column-spacing-small-block):not(.column-spacing-medium):not(.column-spacing-medium-inline):not(.column-spacing-medium-block):not(.column-spacing-large):not(.column-spacing-large-inline):not(.column-spacing-large-block), .control.column-spacing-medium {\n gap: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.column-spacing-medium-inline {\n gap: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.column-spacing-medium-block {\n gap: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0;\n}\n.control.column-spacing-large {\n gap: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.column-spacing-large-inline {\n gap: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.column-spacing-large-block {\n gap: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0;\n}\n.control.gutters-small {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-inline {\n margin: 0 calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)));\n}\n.control.gutters-small-block {\n margin: calc(calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2))) - calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16))) 0;\n}\n.control.gutters-medium {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.control.gutters-medium-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16)) 0;\n}\n.control.gutters-large {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-inline {\n margin: 0 calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.control.gutters-large-block {\n margin: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8)) 0;\n}\n.control.auto-sizing-fill {\n --_auto-sizing: auto-fill;\n}\n.control:not(.auto-sizing-fill):not(.auto-sizing-fit), .control.auto-sizing-fit {\n --_auto-sizing: auto-fit;\n}";
20
+ /**
21
+ * A Divider Custom HTML Element.
22
+ * Implements the {@link https://www.w3.org/TR/wai-aria-1.1/#separator | ARIA separator } or {@link https://www.w3.org/TR/wai-aria-1.1/#presentation | ARIA presentation}.
23
+ *
24
+ * @public
25
+ */
26
+ class Divider$1 extends FoundationElement {
27
+ constructor() {
28
+ super(...arguments);
29
+ /**
30
+ * The role of the element.
31
+ *
32
+ * @public
33
+ * @remarks
34
+ * HTML Attribute: role
35
+ */
36
+ this.role = DividerRole.separator;
37
+ /**
38
+ * The orientation of the divider.
39
+ *
40
+ * @public
41
+ * @remarks
42
+ * HTML Attribute: orientation
43
+ */
44
+ this.orientation = Orientation.horizontal;
45
+ }
46
+ }
47
+ __decorate([
48
+ attr
49
+ ], Divider$1.prototype, "role", void 0);
50
+ __decorate([
51
+ attr
52
+ ], Divider$1.prototype, "orientation", void 0);
53
+
54
+ var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 05 Jan 2023 11:33:10 GMT\n */\n:host {\n display: block;\n}\n\n.base {\n display: block;\n background-color: var(--vvd-color-neutral-200);\n}\n.base:not(.vertical) {\n block-size: 1px;\n inline-size: 100%;\n}\n.base.vertical {\n block-size: 100%;\n inline-size: 1px;\n}";
55
+
56
+ class Divider extends Divider$1 {}
22
57
 
23
58
  let _ = t => t,
24
59
  _t;
25
60
  const getClasses = ({
26
- columnBasis,
27
- gutters,
28
- columnSpacing,
29
- autoSizing
30
- }) => classNames('control', [`column-basis-${columnBasis}`, Boolean(columnBasis)], [`gutters-${gutters}`, Boolean(gutters)], [`column-spacing-${columnSpacing}`, Boolean(columnSpacing)], [`auto-sizing-${autoSizing}`, Boolean(autoSizing)]);
31
- const layoutTemplate = () => html(_t || (_t = _`
32
- <div class="${0}">
33
- <slot></slot>
34
- </div>`), getClasses);
61
+ orientation
62
+ }) => classNames('base', [`${orientation}`, Boolean(orientation)]);
63
+ const DividerTemplate = () => html(_t || (_t = _`
64
+ <span
65
+ class="${0}"
66
+ orientation="${0}"
67
+ role="${0}"
68
+ ></span>`), getClasses, x => x.orientation, x => x.role);
35
69
 
36
- const layoutDefinition = Layout.compose({
37
- baseName: 'layout',
38
- template: layoutTemplate,
70
+ const dividerDefinition = Divider.compose({
71
+ baseName: 'divider',
72
+ template: DividerTemplate,
39
73
  styles: css_248z
40
74
  });
41
- const layoutRegistries = [layoutDefinition()];
42
- const registerLayout = registerFactory(layoutRegistries);
75
+ const dividerRegistries = [dividerDefinition()];
76
+ const registerDivider = registerFactory(dividerRegistries);
43
77
 
44
- export { layoutRegistries as a, layoutDefinition as l, registerLayout as r };
78
+ export { Divider as D, dividerDefinition as a, dividerRegistries as d, registerDivider as r };