@spectric/ui 0.0.5 → 0.0.7

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 (85) hide show
  1. package/dist/components/input.d.ts +3 -1
  2. package/dist/components/query_bar/QueryBar.d.ts +7 -3
  3. package/dist/custom-elements.json +7 -3
  4. package/dist/index.es.js +130 -126
  5. package/dist/index.es.js.map +1 -1
  6. package/dist/index.umd.js +22 -22
  7. package/dist/index.umd.js.map +1 -1
  8. package/package.json +2 -2
  9. package/src/components/input.ts +19 -2
  10. package/src/components/query_bar/QueryBar.ts +21 -22
  11. package/src/stories/QueryBar.stories.ts +7 -0
  12. package/src/stories/fixtures/data.ts +3 -0
  13. package/dist/assets/Banner-CZ3qKIQC.js +0 -172
  14. package/dist/assets/Banner.stories-BMf4MBpI.js +0 -19
  15. package/dist/assets/BitDisplay.stories-wztXxpxe.js +0 -18
  16. package/dist/assets/Bits-C_TSTjST.js +0 -1
  17. package/dist/assets/Button.stories-gHxjWwVf.js +0 -142
  18. package/dist/assets/Color-F6OSRLHC-AjFOL-zN.js +0 -1
  19. package/dist/assets/DocsRenderer-CFRXHY34-CvW79YxE.js +0 -761
  20. package/dist/assets/Header.stories-Bc09U6g1.js +0 -25
  21. package/dist/assets/Page.stories-DNJKhAFs.js +0 -114
  22. package/dist/assets/QueryBar.stories-Da5C-SV4.js +0 -17
  23. package/dist/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
  24. package/dist/assets/chunk-L4EGOTBX-AI5g0G5Z.js +0 -2
  25. package/dist/assets/data-CwENMT7L.js +0 -3
  26. package/dist/assets/dialog-CFHXbUTQ.js +0 -611
  27. package/dist/assets/directive-helpers-IbK5tOA8.js +0 -5
  28. package/dist/assets/entry-preview-Di-j0SPB.js +0 -4
  29. package/dist/assets/entry-preview-docs-CUBRpM7y.js +0 -1
  30. package/dist/assets/iframe-BQFuVTVZ.js +0 -2
  31. package/dist/assets/index-BCiKWbv6.js +0 -1
  32. package/dist/assets/index-BHYIh-Xd.js +0 -8
  33. package/dist/assets/index-DBGhiA-l.js +0 -1
  34. package/dist/assets/index-DrFu-skq.js +0 -6
  35. package/dist/assets/index-oFsFREWh.js +0 -9
  36. package/dist/assets/input.stories-Cgdv-5bN.js +0 -58
  37. package/dist/assets/lit-element-UdLzEcH-.js +0 -19
  38. package/dist/assets/preview-BWzBA1C2.js +0 -396
  39. package/dist/assets/preview-CGiTbRot.js +0 -2
  40. package/dist/assets/preview-D77C14du.js +0 -34
  41. package/dist/assets/preview-DEMzn_yN.js +0 -1
  42. package/dist/assets/preview-DFmD0pui.js +0 -1
  43. package/dist/assets/preview-DGUiP6tS.js +0 -7
  44. package/dist/assets/preview-DQVTHjv1.js +0 -182
  45. package/dist/assets/preview-aVwhiz9X.js +0 -1
  46. package/dist/assets/tiny-invariant-CopsF_GD.js +0 -1
  47. package/dist/components/input.css.d.ts +0 -2
  48. package/dist/favicon.svg +0 -1
  49. package/dist/iframe.html +0 -639
  50. package/dist/index.html +0 -190
  51. package/dist/index.json +0 -1
  52. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  53. package/dist/nunito-sans-bold.woff2 +0 -0
  54. package/dist/nunito-sans-italic.woff2 +0 -0
  55. package/dist/nunito-sans-regular.woff2 +0 -0
  56. package/dist/project.json +0 -1
  57. package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js +0 -333
  58. package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js.LEGAL.txt +0 -40
  59. package/dist/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  60. package/dist/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  61. package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
  62. package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  63. package/dist/sb-addons/essentials-controls-1/manager-bundle.js +0 -391
  64. package/dist/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -0
  65. package/dist/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
  66. package/dist/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  67. package/dist/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
  68. package/dist/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  69. package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
  70. package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  71. package/dist/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
  72. package/dist/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  73. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  74. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  75. package/dist/sb-common-assets/favicon.svg +0 -1
  76. package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  77. package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  78. package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  79. package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  80. package/dist/sb-manager/globals-module-info.js +0 -1028
  81. package/dist/sb-manager/globals-runtime.js +0 -40861
  82. package/dist/sb-manager/globals.js +0 -48
  83. package/dist/sb-manager/runtime.js +0 -13338
  84. package/dist/sb-preview/globals.js +0 -33
  85. package/dist/sb-preview/runtime.js +0 -7174
@@ -118,6 +118,8 @@ export declare class SpectricInput extends LitElement implements InputProps {
118
118
  */
119
119
  get value(): string | number | boolean;
120
120
  set value(value: string | number | boolean);
121
+ blur(): void;
122
+ focus(options?: FocusOptions): void;
121
123
  setSelectionRange(start: number, end: number, direction?: "forward" | "backward" | "none"): void;
122
124
  /**
123
125
  * Handles `oninput` event on the `<input>`.
@@ -126,7 +128,7 @@ export declare class SpectricInput extends LitElement implements InputProps {
126
128
  /**
127
129
  * The underlying input element
128
130
  */
129
- protected _input: HTMLInputElement;
131
+ protected _input?: HTMLInputElement;
130
132
  private handleTogglePasswordVisibility;
131
133
  protected render(): unknown;
132
134
  }
@@ -37,7 +37,7 @@ export interface IQueryProps {
37
37
  /**
38
38
  * The output of the query
39
39
  */
40
- value: string;
40
+ value?: string;
41
41
  /**
42
42
  * Fields that are used for the auto complete
43
43
  */
@@ -46,12 +46,17 @@ export interface IQueryProps {
46
46
  * Callback that will provide values for specific fields
47
47
  */
48
48
  getValuesForField: (field: string, text: string) => Promise<string[]>;
49
+ /**
50
+ * Input placeholder
51
+ */
52
+ placeholder: string;
49
53
  }
50
54
  /**
51
55
  * The Query component will take Opensearch Dashboard Query language and transform it into various outputs
52
56
  */
53
57
  export declare class SpectricQuery extends LitElement implements IQueryProps {
54
58
  private uuid;
59
+ placeholder: string;
55
60
  constructor();
56
61
  protected createRenderRoot(): HTMLElement | DocumentFragment;
57
62
  /**
@@ -62,8 +67,7 @@ export declare class SpectricQuery extends LitElement implements IQueryProps {
62
67
  /**
63
68
  * The value of the input.
64
69
  */
65
- get value(): string;
66
- set value(value: string);
70
+ value: string;
67
71
  outputLanguage: SupportedLanguagesTypes;
68
72
  private completions;
69
73
  private completionIndex;
@@ -392,7 +392,7 @@
392
392
  },
393
393
  {
394
394
  "name": "spectric-input",
395
- "description": "Events:\n\n * `change` {`Event`} - \n\nAttributes:\n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1>`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\nProperties:\n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `_value` {`string | number | boolean`} - The internal value.\n\n * `_showPassword` {`boolean`} - \n\n * `selectionStart` {`number | null`} - \n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `_handleInput` - Handles `oninput` event on the `<input>`.\n\n * `_input` {`HTMLInputElement`} - The underlying input element\n\n * `handleTogglePasswordVisibility` - \n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1>`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.",
395
+ "description": "Events:\n\n * `change` {`Event`} - \n\nAttributes:\n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1>`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.\n\nProperties:\n\n * `hidePasswordLabel` {`string`} - \"Hide password\" tooltip text on password visibility toggle\n\n * `showPasswordLabel` {`string`} - \"Show password\" tooltip text on password visibility toggle\n\n * `_value` {`string | number | boolean`} - The internal value.\n\n * `_showPassword` {`boolean`} - \n\n * `selectionStart` {`number | null`} - \n\n * `value` {`string | number | boolean`} - The value of the input.\n\n * `_handleInput` - Handles `oninput` event on the `<input>`.\n\n * `_input` {`HTMLInputElement | undefined`} - The underlying input element\n\n * `handleTogglePasswordVisibility` - \n\n * `variant` {`\"number\" | \"text\" | \"text-area\" | \"color\" | \"date\" | \"datetime-local\" | \"email\" | \"file\" | \"hidden\" | \"password\"`} - Input type\n\n * `label` {`string`} - Label to display above the input\n\n * `placeholder` {`string`} - placeholder text to display\n\n * `disabled` {`boolean`} - \n\n * `readonly` {`boolean`} - \n\n * `helperText` {`string`} - The helper text.\n\n * `invalid` {`boolean`} - Specify if the currently value is invalid.\n\n * `invalidText` {`string | TemplateResult<1>`} - Message which is displayed if the value is invalid.\n\n * `maxCount` {`number`} - Max character count allowed for input. This is needed in order for enableCounter to display\n\n * `required` {`boolean`} - Boolean property to set the required status\n\n * `showPasswordVisibilityToggle` {`boolean`} - Boolean property to render password visibility toggle\n\n * `name` {`string`} - Name for the input used for form data events //TODO make sure this works\n\n * `pattern` {`string`} - Pattern to validate the input against for HTML validity checking\n\n * `autocomplete` {`AutoFill`} - The sets the autocomplete for the input.",
396
396
  "attributes": [
397
397
  {
398
398
  "name": "hidePasswordLabel",
@@ -1816,7 +1816,7 @@
1816
1816
  },
1817
1817
  {
1818
1818
  "name": "spectric-query",
1819
- "description": "The Query component will take Opensearch Dashboard Query language and transform it into various outputs\n\nEvents:\n\n * `change` {`CustomEvent<any>`} - \n\nAttributes:\n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\nProperties:\n\n * `_value` {`string`} - The internal value.\n\n * `suggestion` {`Suggestion | undefined`} - \n\n * `completions` {`Completion[]`} - \n\n * `completionIndex` {`number`} - \n\n * `_autocomplete` {`HTMLDivElement | undefined`} - \n\n * `_asyncAutocomplete` {`Promise<HTMLDivElement>`} - \n\n * `_input` {`SpectricInput`} - The underlying input element\n\n * `_parseQuery` - \n\n * `_selectCompletion` - \n\n * `_handleArrows` - \n\n * `uuid` {`string`} - \n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `getValuesForField` - Callback that will provide values for specific fields",
1819
+ "description": "The Query component will take Opensearch Dashboard Query language and transform it into various outputs\n\nEvents:\n\n * `change` {`CustomEvent<any>`} - \n\nAttributes:\n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `placeholder` {`string`} - Input placeholder\n\nProperties:\n\n * `_value` {`string`} - The internal value.\n\n * `suggestion` {`Suggestion | undefined`} - \n\n * `completions` {`Completion[]`} - \n\n * `completionIndex` {`number`} - \n\n * `_autocomplete` {`HTMLDivElement | undefined`} - \n\n * `_asyncAutocomplete` {`Promise<HTMLDivElement>`} - \n\n * `_input` {`SpectricInput`} - The underlying input element\n\n * `_parseQuery` - \n\n * `_selectCompletion` - \n\n * `_handleArrows` - \n\n * `uuid` {`string`} - \n\n * `outputLanguage` {`\"toMongo\" | \"toCql\" | \"toDSL\" | \"AST\"`} - The output of the query in a specific format\n\n * `value` {`string`} - The value of the input.\n\n * `fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\n * `getValuesForField` - Callback that will provide values for specific fields\n\n * `placeholder` {`string`} - Input placeholder",
1820
1820
  "attributes": [
1821
1821
  {
1822
1822
  "name": "outputLanguage",
@@ -1838,12 +1838,16 @@
1838
1838
  },
1839
1839
  {
1840
1840
  "name": "value",
1841
- "description": "`value` {`string`} - The value of the input.\n\nProperty: value"
1841
+ "description": "`value` {`string`} - The value of the input.\n\nProperty: value\n\nDefault: "
1842
1842
  },
1843
1843
  {
1844
1844
  "name": "fields",
1845
1845
  "description": "`fields` {`FieldTypes[]`} - Fields that are used for the auto complete\n\nProperty: fields\n\nDefault: "
1846
1846
  },
1847
+ {
1848
+ "name": "placeholder",
1849
+ "description": "`placeholder` {`string`} - Input placeholder\n\nProperty: placeholder\n\nDefault: "
1850
+ },
1847
1851
  {
1848
1852
  "name": "onchange",
1849
1853
  "description": "`change` {`CustomEvent<any>`} - "