vira 22.2.2 → 23.1.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 (107) hide show
  1. package/dist/elements/define-vira-element.d.ts +22 -1
  2. package/dist/elements/define-vira-element.js +18 -1
  3. package/dist/elements/dropdown/dropdown-helpers.d.ts +26 -3
  4. package/dist/elements/dropdown/dropdown-helpers.js +25 -3
  5. package/dist/elements/dropdown/vira-dropdown-item.element.d.ts +17 -6
  6. package/dist/elements/dropdown/vira-dropdown-item.element.js +12 -6
  7. package/dist/elements/dropdown/vira-dropdown-options.element.d.ts +14 -3
  8. package/dist/elements/dropdown/vira-dropdown-options.element.js +18 -7
  9. package/dist/elements/dropdown/vira-dropdown.element.d.ts +20 -8
  10. package/dist/elements/dropdown/vira-dropdown.element.js +28 -16
  11. package/dist/elements/index.d.ts +10 -10
  12. package/dist/elements/index.js +10 -10
  13. package/dist/elements/shared-text-input-logic.d.ts +20 -0
  14. package/dist/elements/shared-text-input-logic.js +13 -3
  15. package/dist/elements/vira-button.element.d.ts +17 -5
  16. package/dist/elements/vira-button.element.js +27 -15
  17. package/dist/elements/vira-collapsible-wrapper.element.d.ts +9 -2
  18. package/dist/elements/vira-collapsible-wrapper.element.js +10 -3
  19. package/dist/elements/vira-icon.element.d.ts +10 -3
  20. package/dist/elements/vira-icon.element.js +9 -2
  21. package/dist/elements/vira-image.element.d.ts +7 -7
  22. package/dist/elements/vira-image.element.js +20 -17
  23. package/dist/elements/vira-input.element.d.ts +20 -7
  24. package/dist/elements/vira-input.element.js +32 -16
  25. package/dist/elements/vira-link.element.d.ts +10 -2
  26. package/dist/elements/vira-link.element.js +11 -3
  27. package/dist/icons/icon-color.test-helper.d.ts +6 -0
  28. package/dist/icons/icon-color.test-helper.js +9 -0
  29. package/dist/icons/icon-css-vars.d.ts +10 -3
  30. package/dist/icons/icon-css-vars.js +7 -0
  31. package/dist/icons/icon-svg.d.ts +17 -1
  32. package/dist/icons/icon-svg.js +13 -2
  33. package/dist/icons/icon-svgs/chat-24.icon.d.ts +8 -0
  34. package/dist/icons/icon-svgs/chat-24.icon.js +23 -0
  35. package/dist/icons/icon-svgs/check-24.icon.d.ts +8 -1
  36. package/dist/icons/icon-svgs/check-24.icon.js +9 -2
  37. package/dist/icons/icon-svgs/chevron-up-24.icon.d.ts +8 -1
  38. package/dist/icons/icon-svgs/chevron-up-24.icon.js +9 -2
  39. package/dist/icons/icon-svgs/close-x-24.icon.d.ts +8 -1
  40. package/dist/icons/icon-svgs/close-x-24.icon.js +9 -2
  41. package/dist/icons/icon-svgs/commit-24.icon.d.ts +8 -0
  42. package/dist/icons/icon-svgs/commit-24.icon.js +37 -0
  43. package/dist/icons/icon-svgs/document-24.icon.d.ts +8 -0
  44. package/dist/icons/icon-svgs/document-24.icon.js +29 -0
  45. package/dist/icons/icon-svgs/element-16.icon.d.ts +8 -1
  46. package/dist/icons/icon-svgs/element-16.icon.js +9 -2
  47. package/dist/icons/icon-svgs/element-24.icon.d.ts +8 -1
  48. package/dist/icons/icon-svgs/element-24.icon.js +9 -2
  49. package/dist/icons/icon-svgs/eye-closed-24.icon.d.ts +8 -1
  50. package/dist/icons/icon-svgs/eye-closed-24.icon.js +9 -2
  51. package/dist/icons/icon-svgs/eye-open-24.icon.d.ts +8 -1
  52. package/dist/icons/icon-svgs/eye-open-24.icon.js +9 -3
  53. package/dist/icons/icon-svgs/loader-24.icon.d.ts +8 -1
  54. package/dist/icons/icon-svgs/loader-24.icon.js +9 -2
  55. package/dist/icons/icon-svgs/loader-animated-24.icon.d.ts +8 -1
  56. package/dist/icons/icon-svgs/loader-animated-24.icon.js +10 -3
  57. package/dist/icons/icon-svgs/options-24.icon.d.ts +8 -1
  58. package/dist/icons/icon-svgs/options-24.icon.js +10 -3
  59. package/dist/icons/icon-svgs/pencil-24.icon.d.ts +8 -0
  60. package/dist/icons/icon-svgs/pencil-24.icon.js +29 -0
  61. package/dist/icons/icon-svgs/shield-24.icon.d.ts +8 -0
  62. package/dist/icons/icon-svgs/shield-24.icon.js +23 -0
  63. package/dist/icons/icon-svgs/star-24.icon.d.ts +8 -0
  64. package/dist/icons/icon-svgs/star-24.icon.js +23 -0
  65. package/dist/icons/icon-svgs/status-failure-24.icon.d.ts +8 -1
  66. package/dist/icons/icon-svgs/status-failure-24.icon.js +9 -2
  67. package/dist/icons/icon-svgs/status-in-progress-24.icon.d.ts +8 -1
  68. package/dist/icons/icon-svgs/status-in-progress-24.icon.js +9 -2
  69. package/dist/icons/icon-svgs/status-success-24.icon.d.ts +8 -1
  70. package/dist/icons/icon-svgs/status-success-24.icon.js +9 -2
  71. package/dist/icons/index.d.ts +39 -28
  72. package/dist/icons/index.js +45 -28
  73. package/dist/index.d.ts +5 -5
  74. package/dist/index.js +5 -5
  75. package/dist/re-exports/colorjs-io.d.ts +12 -0
  76. package/dist/re-exports/colorjs-io.js +6 -0
  77. package/dist/re-exports/index.d.ts +1 -1
  78. package/dist/re-exports/index.js +1 -1
  79. package/dist/styles/border.d.ts +7 -1
  80. package/dist/styles/border.js +6 -0
  81. package/dist/styles/color.d.ts +12 -2
  82. package/dist/styles/color.js +14 -8
  83. package/dist/styles/disabled.d.ts +5 -0
  84. package/dist/styles/disabled.js +5 -0
  85. package/dist/styles/durations.d.ts +17 -7
  86. package/dist/styles/durations.js +14 -4
  87. package/dist/styles/focus.d.ts +12 -4
  88. package/dist/styles/focus.js +11 -3
  89. package/dist/styles/form-themes.d.ts +12 -6
  90. package/dist/styles/form-themes.js +7 -1
  91. package/dist/styles/index.d.ts +10 -10
  92. package/dist/styles/index.js +10 -10
  93. package/dist/styles/native-styles.d.ts +11 -0
  94. package/dist/styles/native-styles.js +11 -0
  95. package/dist/styles/scrollbar.d.ts +5 -0
  96. package/dist/styles/scrollbar.js +5 -0
  97. package/dist/styles/shadows.d.ts +5 -0
  98. package/dist/styles/shadows.js +5 -0
  99. package/dist/styles/user-select.d.ts +5 -0
  100. package/dist/styles/user-select.js +5 -0
  101. package/dist/util/index.d.ts +1 -1
  102. package/dist/util/index.js +1 -1
  103. package/dist/util/pop-up-manager.d.ts +61 -6
  104. package/dist/util/pop-up-manager.js +43 -33
  105. package/package.json +35 -31
  106. package/dist/elements/dropdown/dropdown.mock.d.ts +0 -13
  107. package/dist/elements/dropdown/dropdown.mock.js +0 -18
@@ -1,36 +1,50 @@
1
1
  /** This file is automatically updated by update-icon-exports.ts */
2
- import { Check24Icon } from './icon-svgs/check-24.icon';
3
- import { ChevronUp24Icon } from './icon-svgs/chevron-up-24.icon';
4
- import { CloseX24Icon } from './icon-svgs/close-x-24.icon';
5
- import { Element16Icon } from './icon-svgs/element-16.icon';
6
- import { Element24Icon } from './icon-svgs/element-24.icon';
7
- import { EyeClosed24Icon } from './icon-svgs/eye-closed-24.icon';
8
- import { EyeOpen24Icon } from './icon-svgs/eye-open-24.icon';
9
- import { Loader24Icon } from './icon-svgs/loader-24.icon';
10
- import { LoaderAnimated24Icon } from './icon-svgs/loader-animated-24.icon';
11
- import { Options24Icon } from './icon-svgs/options-24.icon';
12
- import { StatusFailure24Icon } from './icon-svgs/status-failure-24.icon';
13
- import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon';
14
- import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon';
15
- export * from './icon-css-vars';
16
- export * from './icon-svg';
17
- export * from './icon-svgs/check-24.icon';
18
- export * from './icon-svgs/chevron-up-24.icon';
19
- export * from './icon-svgs/close-x-24.icon';
20
- export * from './icon-svgs/element-16.icon';
21
- export * from './icon-svgs/element-24.icon';
22
- export * from './icon-svgs/eye-closed-24.icon';
23
- export * from './icon-svgs/eye-open-24.icon';
24
- export * from './icon-svgs/loader-24.icon';
25
- export * from './icon-svgs/loader-animated-24.icon';
26
- export * from './icon-svgs/options-24.icon';
27
- export * from './icon-svgs/status-failure-24.icon';
28
- export * from './icon-svgs/status-in-progress-24.icon';
29
- export * from './icon-svgs/status-success-24.icon';
2
+ import { Chat24Icon } from './icon-svgs/chat-24.icon.js';
3
+ import { Check24Icon } from './icon-svgs/check-24.icon.js';
4
+ import { ChevronUp24Icon } from './icon-svgs/chevron-up-24.icon.js';
5
+ import { CloseX24Icon } from './icon-svgs/close-x-24.icon.js';
6
+ import { Commit24Icon } from './icon-svgs/commit-24.icon.js';
7
+ import { Document24Icon } from './icon-svgs/document-24.icon.js';
8
+ import { Element16Icon } from './icon-svgs/element-16.icon.js';
9
+ import { Element24Icon } from './icon-svgs/element-24.icon.js';
10
+ import { EyeClosed24Icon } from './icon-svgs/eye-closed-24.icon.js';
11
+ import { EyeOpen24Icon } from './icon-svgs/eye-open-24.icon.js';
12
+ import { Loader24Icon } from './icon-svgs/loader-24.icon.js';
13
+ import { LoaderAnimated24Icon } from './icon-svgs/loader-animated-24.icon.js';
14
+ import { Options24Icon } from './icon-svgs/options-24.icon.js';
15
+ import { Pencil24Icon } from './icon-svgs/pencil-24.icon.js';
16
+ import { Shield24Icon } from './icon-svgs/shield-24.icon.js';
17
+ import { Star24Icon } from './icon-svgs/star-24.icon.js';
18
+ import { StatusFailure24Icon } from './icon-svgs/status-failure-24.icon.js';
19
+ import { StatusInProgress24Icon } from './icon-svgs/status-in-progress-24.icon.js';
20
+ import { StatusSuccess24Icon } from './icon-svgs/status-success-24.icon.js';
21
+ export * from './icon-css-vars.js';
22
+ export * from './icon-svg.js';
23
+ export * from './icon-svgs/check-24.icon.js';
24
+ export * from './icon-svgs/chevron-up-24.icon.js';
25
+ export * from './icon-svgs/close-x-24.icon.js';
26
+ export * from './icon-svgs/element-16.icon.js';
27
+ export * from './icon-svgs/element-24.icon.js';
28
+ export * from './icon-svgs/eye-closed-24.icon.js';
29
+ export * from './icon-svgs/eye-open-24.icon.js';
30
+ export * from './icon-svgs/loader-24.icon.js';
31
+ export * from './icon-svgs/loader-animated-24.icon.js';
32
+ export * from './icon-svgs/options-24.icon.js';
33
+ export * from './icon-svgs/status-failure-24.icon.js';
34
+ export * from './icon-svgs/status-in-progress-24.icon.js';
35
+ export * from './icon-svgs/status-success-24.icon.js';
36
+ /**
37
+ * All Vira icons in an object mapped by their icon name.
38
+ *
39
+ * @category Icon
40
+ */
30
41
  export const allIconsByName = {
42
+ Chat24Icon,
31
43
  Check24Icon,
32
44
  ChevronUp24Icon,
33
45
  CloseX24Icon,
46
+ Commit24Icon,
47
+ Document24Icon,
34
48
  Element16Icon,
35
49
  Element24Icon,
36
50
  EyeClosed24Icon,
@@ -38,6 +52,9 @@ export const allIconsByName = {
38
52
  Loader24Icon,
39
53
  LoaderAnimated24Icon,
40
54
  Options24Icon,
55
+ Pencil24Icon,
56
+ Shield24Icon,
57
+ Star24Icon,
41
58
  StatusFailure24Icon,
42
59
  StatusInProgress24Icon,
43
60
  StatusSuccess24Icon,
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /** This file is automatically updated by update-root-index-exports.ts */
2
- export * from './elements';
3
- export * from './icons';
4
- export * from './re-exports';
5
- export * from './styles';
6
- export * from './util';
2
+ export * from './elements/index.js';
3
+ export * from './icons/index.js';
4
+ export * from './re-exports/index.js';
5
+ export * from './styles/index.js';
6
+ export * from './util/index.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /** This file is automatically updated by update-root-index-exports.ts */
2
- export * from './elements';
3
- export * from './icons';
4
- export * from './re-exports';
5
- export * from './styles';
6
- export * from './util';
2
+ export * from './elements/index.js';
3
+ export * from './icons/index.js';
4
+ export * from './re-exports/index.js';
5
+ export * from './styles/index.js';
6
+ export * from './util/index.js';
@@ -1,5 +1,17 @@
1
1
  import ColorImport from 'colorjs.io';
2
2
  export type { ColorTypes } from 'colorjs.io/types/src/color';
3
3
  export type { Format } from 'colorjs.io/types/src/space';
4
+ /**
5
+ * An individual color represented as a class. This is from the
6
+ * [colorjs.io](https://www.npmjs.com/package/colorjs.io) package.
7
+ *
8
+ * @category Internal
9
+ */
4
10
  export type Color = typeof ColorImport;
11
+ /**
12
+ * An individual color represented as a class. This is from the
13
+ * [colorjs.io](https://www.npmjs.com/package/colorjs.io) package.
14
+ *
15
+ * @category Internal
16
+ */
5
17
  export declare const Color: Color;
@@ -1,2 +1,8 @@
1
1
  import ColorImport from 'colorjs.io';
2
+ /**
3
+ * An individual color represented as a class. This is from the
4
+ * [colorjs.io](https://www.npmjs.com/package/colorjs.io) package.
5
+ *
6
+ * @category Internal
7
+ */
2
8
  export const Color = ColorImport;
@@ -1,2 +1,2 @@
1
1
  /** This file is automatically updated by update-index-exports.ts */
2
- export * from './colorjs-io';
2
+ export * from './colorjs-io.js';
@@ -1,2 +1,2 @@
1
1
  /** This file is automatically updated by update-index-exports.ts */
2
- export * from './colorjs-io';
2
+ export * from './colorjs-io.js';
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Border CSS vars used by Vira elements.
3
+ *
4
+ * @category CSS Vars
5
+ * @category Styles
6
+ */
1
7
  export declare const viraBorders: import("lit-css-vars").CssVarDefinitions<{
2
- 'vira-form-input-radius': string;
8
+ readonly 'vira-form-input-radius': "8px";
3
9
  }>;
@@ -1,4 +1,10 @@
1
1
  import { defineCssVars } from 'lit-css-vars';
2
+ /**
3
+ * Border CSS vars used by Vira elements.
4
+ *
5
+ * @category CSS Vars
6
+ * @category Styles
7
+ */
2
8
  export const viraBorders = defineCssVars({
3
9
  'vira-form-input-radius': '8px',
4
10
  });
@@ -1,4 +1,14 @@
1
1
  import { Format } from 'colorjs.io/types/src/space';
2
- import { ColorTypes } from '../re-exports/colorjs-io';
3
- export declare function getAssertedValidColor(input: ColorTypes | undefined): import("colorjs.io/types").default;
2
+ import { ColorTypes } from '../re-exports/colorjs-io.js';
3
+ /**
4
+ * Asserts that the given color type is valid.
5
+ *
6
+ * @category Internal
7
+ */
8
+ export declare function getAssertedValidColor(input: ColorTypes | undefined): import("colorjs.io/types/index.js").default;
9
+ /**
10
+ * The colorjs format for CSS RGB colors.
11
+ *
12
+ * @category Internal
13
+ */
4
14
  export declare const rgbCssColorFormat: Format;
@@ -1,5 +1,10 @@
1
- import { wrapInTry } from '@augment-vir/common';
2
- import { Color } from '../re-exports/colorjs-io';
1
+ import { stringify } from '@augment-vir/common';
2
+ import { Color } from '../re-exports/colorjs-io.js';
3
+ /**
4
+ * Asserts that the given color type is valid.
5
+ *
6
+ * @category Internal
7
+ */
3
8
  export function getAssertedValidColor(input) {
4
9
  try {
5
10
  if (!input) {
@@ -7,14 +12,15 @@ export function getAssertedValidColor(input) {
7
12
  }
8
13
  return new Color(input);
9
14
  }
10
- catch (caught) {
11
- const stringInput = String(input);
12
- const inputForMessage = stringInput.toLowerCase().match(/\[\s*object\s+object\s*\]/)
13
- ? wrapInTry(() => JSON.stringify(input), { fallbackValue: stringInput })
14
- : stringInput;
15
- throw new Error(`Invalid color: ${inputForMessage}`);
15
+ catch {
16
+ throw new Error(`Invalid color: ${stringify(input)}`);
16
17
  }
17
18
  }
19
+ /**
20
+ * The colorjs format for CSS RGB colors.
21
+ *
22
+ * @category Internal
23
+ */
18
24
  export const rgbCssColorFormat = {
19
25
  name: 'rgb',
20
26
  coords: [
@@ -1 +1,6 @@
1
+ /**
2
+ * A chunk of CSS that styles an element with Vira's default disabled styles.
3
+ *
4
+ * @category Styles
5
+ */
1
6
  export declare const viraDisabledStyles: import("element-vir").CSSResult;
@@ -1,4 +1,9 @@
1
1
  import { css } from 'element-vir';
2
+ /**
3
+ * A chunk of CSS that styles an element with Vira's default disabled styles.
4
+ *
5
+ * @category Styles
6
+ */
2
7
  export const viraDisabledStyles = css `
3
8
  pointer-events: none;
4
9
  opacity: 0.3;
@@ -1,12 +1,22 @@
1
+ /**
2
+ * CSS vars for animation or transition durations from Vira.
3
+ *
4
+ * @category Styles
5
+ * @category CSS Vars
6
+ */
1
7
  export declare const viraAnimationDurations: import("lit-css-vars").CssVarDefinitions<{
2
- /** A longer duration show a full animation. */
3
- 'vira-extended-animation-duration': string;
4
- /** A longer duration to emphasize the animation. */
5
- 'vira-pretty-animation-duration': string;
6
8
  /**
7
- * This duration is very short to ensure snappy responses to user interactions.
9
+ * A longer duration used to show a full animation. Use this sparingly; make sure to not block
10
+ * any user input with this animation.
11
+ */
12
+ readonly 'vira-extended-animation-duration': "1.2s";
13
+ /** A longer duration used to emphasize the animation without totally aggravating a user. */
14
+ readonly 'vira-pretty-animation-duration': "300ms";
15
+ /**
16
+ * A short duration used for user interactions. This duration is very short to ensure snappy
17
+ * responses to user interactions.
8
18
  *
9
- * A duration of 84ms gives us 5 frames on a 60Hz screen.
19
+ * The default duration of 84ms gives us 5 frames on a 60Hz screen.
10
20
  */
11
- 'vira-interaction-animation-duration': string;
21
+ readonly 'vira-interaction-animation-duration': "84ms";
12
22
  }>;
@@ -1,13 +1,23 @@
1
1
  import { defineCssVars } from 'lit-css-vars';
2
+ /**
3
+ * CSS vars for animation or transition durations from Vira.
4
+ *
5
+ * @category Styles
6
+ * @category CSS Vars
7
+ */
2
8
  export const viraAnimationDurations = defineCssVars({
3
- /** A longer duration show a full animation. */
9
+ /**
10
+ * A longer duration used to show a full animation. Use this sparingly; make sure to not block
11
+ * any user input with this animation.
12
+ */
4
13
  'vira-extended-animation-duration': '1.2s',
5
- /** A longer duration to emphasize the animation. */
14
+ /** A longer duration used to emphasize the animation without totally aggravating a user. */
6
15
  'vira-pretty-animation-duration': '300ms',
7
16
  /**
8
- * This duration is very short to ensure snappy responses to user interactions.
17
+ * A short duration used for user interactions. This duration is very short to ensure snappy
18
+ * responses to user interactions.
9
19
  *
10
- * A duration of 84ms gives us 5 frames on a 60Hz screen.
20
+ * The default duration of 84ms gives us 5 frames on a 60Hz screen.
11
21
  */
12
22
  'vira-interaction-animation-duration': '84ms',
13
23
  });
@@ -1,12 +1,20 @@
1
+ /**
2
+ * CSS vars for Vira focus colors.
3
+ *
4
+ * @category CSS Vars
5
+ * @category Styles
6
+ */
1
7
  export declare const viraFocusCssVars: import("lit-css-vars").CssVarDefinitions<{
2
- 'vira-focus-outline-color': string;
3
- 'vira-focus-outline-border-radius': import("element-vir").CSSResult;
8
+ readonly 'vira-focus-outline-color': "#59b1ff";
9
+ readonly 'vira-focus-outline-border-radius': import("element-vir").CSSResult;
4
10
  }>;
5
11
  /**
6
12
  * Create styles that look like an outline for the given selector.
7
13
  *
8
- * It is recommended to use the pseudo selectors ":focus:focus-visible:not(:active)" to preventing
9
- * clicking from creating focus styles in Chrome.
14
+ * It is recommended to use the pseudo selector chain ":focus:focus-visible:not(:active)" to
15
+ * preventing clicking an element from creating focus styles in Chrome.
16
+ *
17
+ * @category Styles
10
18
  */
11
19
  export declare function createFocusStyles({ selector, elementBorderSize, outlineGap, outlineWidth, }: {
12
20
  selector: string;
@@ -1,7 +1,13 @@
1
1
  import { addPx } from '@augment-vir/common';
2
2
  import { css, unsafeCSS } from 'element-vir';
3
3
  import { defineCssVars } from 'lit-css-vars';
4
- import { viraBorders } from './border';
4
+ import { viraBorders } from './border.js';
5
+ /**
6
+ * CSS vars for Vira focus colors.
7
+ *
8
+ * @category CSS Vars
9
+ * @category Styles
10
+ */
5
11
  export const viraFocusCssVars = defineCssVars({
6
12
  'vira-focus-outline-color': '#59b1ff',
7
13
  'vira-focus-outline-border-radius': css `calc(${viraBorders['vira-form-input-radius'].value} + 4px)`,
@@ -9,8 +15,10 @@ export const viraFocusCssVars = defineCssVars({
9
15
  /**
10
16
  * Create styles that look like an outline for the given selector.
11
17
  *
12
- * It is recommended to use the pseudo selectors ":focus:focus-visible:not(:active)" to preventing
13
- * clicking from creating focus styles in Chrome.
18
+ * It is recommended to use the pseudo selector chain ":focus:focus-visible:not(:active)" to
19
+ * preventing clicking an element from creating focus styles in Chrome.
20
+ *
21
+ * @category Styles
14
22
  */
15
23
  export function createFocusStyles({ selector, elementBorderSize, outlineGap = 2, outlineWidth = 2, }) {
16
24
  const outlineSpacing = unsafeCSS(addPx(outlineWidth + outlineGap + elementBorderSize));
@@ -1,8 +1,14 @@
1
+ /**
2
+ * CSS vars for vira form elements.
3
+ *
4
+ * @category CSS Vars
5
+ * @category Styles
6
+ */
1
7
  export declare const viraFormCssVars: import("lit-css-vars").CssVarDefinitions<{
2
- 'vira-form-border-color': string;
3
- 'vira-form-background-color': string;
4
- 'vira-form-foreground-color': string;
5
- 'vira-form-focus-color': import("lit").CSSResult;
6
- 'vira-form-selection-hover-background-color': string;
7
- 'vira-form-selection-hover-foreground-color': string;
8
+ readonly 'vira-form-border-color': "#cccccc";
9
+ readonly 'vira-form-background-color': "white";
10
+ readonly 'vira-form-foreground-color': "black";
11
+ readonly 'vira-form-focus-color': import("lit").CSSResult;
12
+ readonly 'vira-form-selection-hover-background-color': "#d2eaff";
13
+ readonly 'vira-form-selection-hover-foreground-color': "black";
8
14
  }>;
@@ -1,5 +1,11 @@
1
1
  import { defineCssVars } from 'lit-css-vars';
2
- import { viraFocusCssVars } from './focus';
2
+ import { viraFocusCssVars } from './focus.js';
3
+ /**
4
+ * CSS vars for vira form elements.
5
+ *
6
+ * @category CSS Vars
7
+ * @category Styles
8
+ */
3
9
  export const viraFormCssVars = defineCssVars({
4
10
  'vira-form-border-color': '#cccccc',
5
11
  'vira-form-background-color': 'white',
@@ -1,11 +1,11 @@
1
1
  /** This file is automatically updated by update-index-exports.ts */
2
- export * from './border';
3
- export * from './color';
4
- export * from './disabled';
5
- export * from './durations';
6
- export * from './focus';
7
- export * from './form-themes';
8
- export * from './native-styles';
9
- export * from './scrollbar';
10
- export * from './shadows';
11
- export * from './user-select';
2
+ export * from './border.js';
3
+ export * from './color.js';
4
+ export * from './disabled.js';
5
+ export * from './durations.js';
6
+ export * from './focus.js';
7
+ export * from './form-themes.js';
8
+ export * from './native-styles.js';
9
+ export * from './scrollbar.js';
10
+ export * from './shadows.js';
11
+ export * from './user-select.js';
@@ -1,11 +1,11 @@
1
1
  /** This file is automatically updated by update-index-exports.ts */
2
- export * from './border';
3
- export * from './color';
4
- export * from './disabled';
5
- export * from './durations';
6
- export * from './focus';
7
- export * from './form-themes';
8
- export * from './native-styles';
9
- export * from './scrollbar';
10
- export * from './shadows';
11
- export * from './user-select';
2
+ export * from './border.js';
3
+ export * from './color.js';
4
+ export * from './disabled.js';
5
+ export * from './durations.js';
6
+ export * from './focus.js';
7
+ export * from './form-themes.js';
8
+ export * from './native-styles.js';
9
+ export * from './scrollbar.js';
10
+ export * from './shadows.js';
11
+ export * from './user-select.js';
@@ -1,2 +1,13 @@
1
+ /**
2
+ * A chunk of CSS that succinctly removes all padding and margin from an element.
3
+ *
4
+ * @category Styles
5
+ */
1
6
  export declare const noNativeSpacing: import("element-vir").CSSResult;
7
+ /**
8
+ * A chunk of CSS that succinctly removes all default built-in form element styles. This is
9
+ * particularly useful for `<button>` elements.
10
+ *
11
+ * @category Styles
12
+ */
2
13
  export declare const noNativeFormStyles: import("element-vir").CSSResult;
@@ -1,8 +1,19 @@
1
1
  import { css } from 'element-vir';
2
+ /**
3
+ * A chunk of CSS that succinctly removes all padding and margin from an element.
4
+ *
5
+ * @category Styles
6
+ */
2
7
  export const noNativeSpacing = css `
3
8
  padding: 0;
4
9
  margin: 0;
5
10
  `;
11
+ /**
12
+ * A chunk of CSS that succinctly removes all default built-in form element styles. This is
13
+ * particularly useful for `<button>` elements.
14
+ *
15
+ * @category Styles
16
+ */
6
17
  export const noNativeFormStyles = css `
7
18
  ${noNativeSpacing};
8
19
  cursor: unset;
@@ -1 +1,6 @@
1
+ /**
2
+ * A function that generates CSS to hide scrollbars for the given CSS selector.
3
+ *
4
+ * @category Styles
5
+ */
1
6
  export declare function hideScrollbars(selector: string): import("element-vir").CSSResult;
@@ -1,4 +1,9 @@
1
1
  import { css, unsafeCSS } from 'element-vir';
2
+ /**
3
+ * A function that generates CSS to hide scrollbars for the given CSS selector.
4
+ *
5
+ * @category Styles
6
+ */
2
7
  export function hideScrollbars(selector) {
3
8
  return css `
4
9
  ${unsafeCSS(selector)} {
@@ -1,4 +1,9 @@
1
1
  import { CSSResult } from 'element-vir';
2
+ /**
3
+ * CSS chunks for default Vira shadow styles.
4
+ *
5
+ * @category Styles
6
+ */
2
7
  export declare const viraShadows: {
3
8
  readonly menuShadow: CSSResult;
4
9
  readonly menuShadowReversed: CSSResult;
@@ -1,5 +1,10 @@
1
1
  import { css } from 'element-vir';
2
2
  const shadowColor = css `#e2e2e2`;
3
+ /**
4
+ * CSS chunks for default Vira shadow styles.
5
+ *
6
+ * @category Styles
7
+ */
3
8
  export const viraShadows = {
4
9
  menuShadow: css `
5
10
  filter: drop-shadow(0px 5px 5px ${shadowColor});
@@ -1 +1,6 @@
1
+ /**
2
+ * A chunk of CSS that disables user selection.
3
+ *
4
+ * @category Styles
5
+ */
1
6
  export declare const noUserSelect: import("element-vir").CSSResult;
@@ -1,4 +1,9 @@
1
1
  import { css } from 'element-vir';
2
+ /**
3
+ * A chunk of CSS that disables user selection.
4
+ *
5
+ * @category Styles
6
+ */
2
7
  export const noUserSelect = css `
3
8
  /* iOS Safari */
4
9
  -webkit-touch-callout: none;
@@ -1 +1 @@
1
- export * from './pop-up-manager';
1
+ export * from './pop-up-manager.js';
@@ -1 +1 @@
1
- export * from './pop-up-manager';
1
+ export * from './pop-up-manager.js';