@vonage/vivid 2.26.0 → 3.0.0-next.2

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 (60) hide show
  1. package/README.md +7 -0
  2. package/badge/index.js +55 -0
  3. package/breadcrumb-item/index.js +48 -0
  4. package/button/index.js +752 -0
  5. package/elevation/index.js +38 -0
  6. package/focus/index.js +3 -0
  7. package/icon/index.js +5 -0
  8. package/index.d.ts +1 -0
  9. package/index.js +16 -63
  10. package/layout/index.js +53 -0
  11. package/lib/badge/badge.d.ts +17 -0
  12. package/lib/badge/badge.template.d.ts +4 -0
  13. package/lib/badge/index.d.ts +3 -0
  14. package/lib/breadcrumb-item/breadcrumb-item.d.ts +5 -0
  15. package/lib/breadcrumb-item/breadcrumb-item.template.d.ts +5 -0
  16. package/lib/breadcrumb-item/index.d.ts +2 -0
  17. package/lib/button/button.d.ts +17 -0
  18. package/lib/button/button.template.d.ts +4 -0
  19. package/lib/button/index.d.ts +21 -0
  20. package/lib/components.d.ts +7 -0
  21. package/lib/elevation/elevation.d.ts +4 -0
  22. package/lib/elevation/elevation.template.d.ts +4 -0
  23. package/lib/elevation/index.d.ts +2 -0
  24. package/lib/enums.d.ts +44 -0
  25. package/lib/focus/focus.d.ts +3 -0
  26. package/lib/focus/focus.template.d.ts +4 -0
  27. package/lib/focus/index.d.ts +2 -0
  28. package/lib/icon/icon.d.ts +13 -0
  29. package/lib/icon/icon.placeholder.d.ts +1 -0
  30. package/lib/icon/icon.template.d.ts +4 -0
  31. package/lib/icon/index.d.ts +2 -0
  32. package/lib/layout/index.d.ts +2 -0
  33. package/lib/layout/layout.d.ts +16 -0
  34. package/lib/layout/layout.template.d.ts +4 -0
  35. package/lib/sidenav-item/index.d.ts +3 -0
  36. package/lib/sidenav-item/sidenav-item.d.ts +7 -0
  37. package/lib/sidenav-item/sidenav-item.template.d.ts +4 -0
  38. package/lib/text-anchor/index.d.ts +2 -0
  39. package/lib/text-anchor/text-anchor.d.ts +4 -0
  40. package/lib/text-anchor/text-anchor.template.d.ts +4 -0
  41. package/package.json +10 -317
  42. package/shared/affix.js +44 -0
  43. package/shared/anchor.js +78 -0
  44. package/shared/apply-mixins.js +22 -0
  45. package/shared/aria-global.js +156 -0
  46. package/shared/class-names.js +15 -0
  47. package/shared/design-system/index.d.ts +3 -0
  48. package/shared/index.js +1500 -0
  49. package/shared/index2.js +4911 -0
  50. package/shared/index3.js +21 -0
  51. package/shared/patterns/affix.d.ts +10 -0
  52. package/shared/patterns/index.d.ts +1 -0
  53. package/shared/style-inject.es.js +28 -0
  54. package/shared/text-anchor.template.js +59 -0
  55. package/shared/web.dom-collections.iterator.js +1479 -0
  56. package/sidenav-item/index.js +79 -0
  57. package/styles/fonts/spezia.css +23 -0
  58. package/styles/themes/dark.css +193 -0
  59. package/styles/themes/light.css +193 -0
  60. package/text-anchor/index.js +15 -0
@@ -0,0 +1,21 @@
1
+ import { F as FoundationElement, h as html, d as designSystem } from './index2.js';
2
+ import { s as styleInject } from './style-inject.es.js';
3
+
4
+ class Focus extends FoundationElement {}
5
+
6
+ var css_248z = ":host {\n display: contents;\n border-radius: inherit;\n}\n\n.control {\n position: absolute;\n box-sizing: border-box;\n border-radius: inherit;\n box-shadow: inset 0 0 0 2px var(--focus-stroke-color, var(--vvd-color-on-canvas)), inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);\n inset: 0;\n}";
7
+ styleInject(css_248z);
8
+
9
+ let _ = t => t,
10
+ _t;
11
+ const focusTemplate = () => html(_t || (_t = _`
12
+ <span class="control"></span>`));
13
+
14
+ const VIVIDFocus = Focus.compose({
15
+ baseName: 'focus',
16
+ template: focusTemplate,
17
+ styles: css_248z
18
+ });
19
+ designSystem.register(VIVIDFocus());
20
+
21
+ export { Focus as F, VIVIDFocus as V };
@@ -0,0 +1,10 @@
1
+ import type { ViewTemplate } from '@microsoft/fast-element';
2
+ import type { ElementDefinitionContext } from '@microsoft/fast-foundation';
3
+ export declare class Prefix {
4
+ icon?: string;
5
+ }
6
+ export declare class PrefixOrSuffix extends Prefix {
7
+ iconTrailing: boolean;
8
+ }
9
+ export declare const prefixTemplate: (context: ElementDefinitionContext) => ViewTemplate<Prefix>;
10
+ export declare const prefixOrSuffixTemplate: (context: ElementDefinitionContext) => ViewTemplate<PrefixOrSuffix>;
@@ -0,0 +1 @@
1
+ export * from './affix';
@@ -0,0 +1,28 @@
1
+ function styleInject(css, ref) {
2
+ if ( ref === void 0 ) ref = {};
3
+ var insertAt = ref.insertAt;
4
+
5
+ if (!css || typeof document === 'undefined') { return; }
6
+
7
+ var head = document.head || document.getElementsByTagName('head')[0];
8
+ var style = document.createElement('style');
9
+ style.type = 'text/css';
10
+
11
+ if (insertAt === 'top') {
12
+ if (head.firstChild) {
13
+ head.insertBefore(style, head.firstChild);
14
+ } else {
15
+ head.appendChild(style);
16
+ }
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+
21
+ if (style.styleSheet) {
22
+ style.styleSheet.cssText = css;
23
+ } else {
24
+ style.appendChild(document.createTextNode(css));
25
+ }
26
+ }
27
+
28
+ export { styleInject as s };
@@ -0,0 +1,59 @@
1
+ import './web.dom-collections.iterator.js';
2
+ import { _ as __decorate, a as attr, b as __metadata, h as html } from './index2.js';
3
+ import { A as Anchor } from './anchor.js';
4
+ import { r as ref } from './aria-global.js';
5
+ import { c as classNames } from './class-names.js';
6
+
7
+ class TextAnchor extends Anchor {
8
+ constructor() {
9
+ super(...arguments);
10
+ this.text = '';
11
+ }
12
+
13
+ }
14
+
15
+ __decorate([attr, __metadata("design:type", Object)], TextAnchor.prototype, "text", void 0);
16
+
17
+ let _2 = t => t,
18
+ _t;
19
+
20
+ const getClasses = _ => classNames('control');
21
+
22
+ const textAnchorTemplate = () => html(_t || (_t = _2`
23
+ <a
24
+ class="${0}"
25
+ download="${0}"
26
+ href="${0}"
27
+ hreflang="${0}"
28
+ ping="${0}"
29
+ referrerpolicy="${0}"
30
+ rel="${0}"
31
+ target="${0}"
32
+ type="${0}"
33
+ aria-atomic="${0}"
34
+ aria-busy="${0}"
35
+ aria-controls="${0}"
36
+ aria-current="${0}"
37
+ aria-describedby="${0}"
38
+ aria-details="${0}"
39
+ aria-disabled="${0}"
40
+ aria-errormessage="${0}"
41
+ aria-expanded="${0}"
42
+ aria-flowto="${0}"
43
+ aria-haspopup="${0}"
44
+ aria-hidden="${0}"
45
+ aria-invalid="${0}"
46
+ aria-keyshortcuts="${0}"
47
+ aria-label="${0}"
48
+ aria-labelledby="${0}"
49
+ aria-live="${0}"
50
+ aria-owns="${0}"
51
+ aria-relevant="${0}"
52
+ aria-roledescription="${0}"
53
+ ${0}
54
+ >
55
+ ${0}
56
+ </a>
57
+ `), getClasses, x => x.download, x => x.href, x => x.hreflang, x => x.ping, x => x.referrerpolicy, x => x.rel, x => x.target, x => x.type, x => x.ariaAtomic, x => x.ariaBusy, x => x.ariaControls, x => x.ariaCurrent, x => x.ariaDescribedby, x => x.ariaDetails, x => x.ariaDisabled, x => x.ariaErrormessage, x => x.ariaExpanded, x => x.ariaFlowto, x => x.ariaHaspopup, x => x.ariaHidden, x => x.ariaInvalid, x => x.ariaKeyshortcuts, x => x.ariaLabel, x => x.ariaLabelledby, x => x.ariaLive, x => x.ariaOwns, x => x.ariaRelevant, x => x.ariaRoledescription, ref('control'), x => x.text);
58
+
59
+ export { TextAnchor as T, textAnchorTemplate as t };