@spectric/ui 0.0.4

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 (88) hide show
  1. package/.gitlab-ci.yml +28 -0
  2. package/.nvmrc +1 -0
  3. package/.storybook/analyze.sh +4 -0
  4. package/.storybook/main.ts +55 -0
  5. package/.storybook/preview.ts +42 -0
  6. package/.vscode/extensions.json +5 -0
  7. package/.vscode/settings.json +41 -0
  8. package/README.MD +50 -0
  9. package/html-include.png +0 -0
  10. package/package.json +33 -0
  11. package/src/classes/BitArray.ts +48 -0
  12. package/src/classes/DisposibleElement.ts +108 -0
  13. package/src/components/Banner.ts +102 -0
  14. package/src/components/Bitdisplay.ts +383 -0
  15. package/src/components/Button.ts +121 -0
  16. package/src/components/Header.ts +125 -0
  17. package/src/components/Page.ts +157 -0
  18. package/src/components/Panel.ts +56 -0
  19. package/src/components/ThemeProvider.ts +251 -0
  20. package/src/components/button.css.ts +160 -0
  21. package/src/components/configurations/classifications.ts +194 -0
  22. package/src/components/dialog/dialog.css.ts +50 -0
  23. package/src/components/dialog/dialog.ts +163 -0
  24. package/src/components/dialog/index.ts +1 -0
  25. package/src/components/header.css.ts +38 -0
  26. package/src/components/index.ts +10 -0
  27. package/src/components/input.css +75 -0
  28. package/src/components/input.ts +312 -0
  29. package/src/components/page.css.ts +158 -0
  30. package/src/components/panel.css.ts +44 -0
  31. package/src/components/query_bar/QueryBar.css +48 -0
  32. package/src/components/query_bar/QueryBar.ts +378 -0
  33. package/src/components/query_bar/index.ts +2 -0
  34. package/src/components/query_bar/querylanguage/kuery/ast/_generated_/kuery.js +3186 -0
  35. package/src/components/query_bar/querylanguage/kuery/ast/ast.ts +113 -0
  36. package/src/components/query_bar/querylanguage/kuery/ast/index.ts +31 -0
  37. package/src/components/query_bar/querylanguage/kuery/ast/kuery.peg +417 -0
  38. package/src/components/query_bar/querylanguage/kuery/functions/and.ts +55 -0
  39. package/src/components/query_bar/querylanguage/kuery/functions/exists.ts +62 -0
  40. package/src/components/query_bar/querylanguage/kuery/functions/index.ts +47 -0
  41. package/src/components/query_bar/querylanguage/kuery/functions/is.ts +211 -0
  42. package/src/components/query_bar/querylanguage/kuery/functions/nested.ts +63 -0
  43. package/src/components/query_bar/querylanguage/kuery/functions/not.ts +53 -0
  44. package/src/components/query_bar/querylanguage/kuery/functions/or.ts +56 -0
  45. package/src/components/query_bar/querylanguage/kuery/functions/range.ts +163 -0
  46. package/src/components/query_bar/querylanguage/kuery/functions/utils/get_fields.ts +49 -0
  47. package/src/components/query_bar/querylanguage/kuery/functions/utils/get_full_field_name_node.ts +87 -0
  48. package/src/components/query_bar/querylanguage/kuery/index.ts +38 -0
  49. package/src/components/query_bar/querylanguage/kuery/kuery_syntax_error.ts +76 -0
  50. package/src/components/query_bar/querylanguage/kuery/node_types/function.ts +75 -0
  51. package/src/components/query_bar/querylanguage/kuery/node_types/index.ts +46 -0
  52. package/src/components/query_bar/querylanguage/kuery/node_types/literal.ts +42 -0
  53. package/src/components/query_bar/querylanguage/kuery/node_types/named_arg.ts +47 -0
  54. package/src/components/query_bar/querylanguage/kuery/node_types/types.ts +108 -0
  55. package/src/components/query_bar/querylanguage/kuery/node_types/wildcard.ts +80 -0
  56. package/src/components/query_bar/querylanguage/kuery/types.ts +52 -0
  57. package/src/components/query_bar/querylanguage/outputTypes/toCQL.ts +122 -0
  58. package/src/components/query_bar/querylanguage/outputTypes/toMongo.ts +103 -0
  59. package/src/components/query_bar/querylanguage/utils.ts +35 -0
  60. package/src/components/query_bar/types.ts +59 -0
  61. package/src/components/splitview/index.ts +1 -0
  62. package/src/components/splitview/splitview.css.ts +66 -0
  63. package/src/components/splitview/splitview.ts +183 -0
  64. package/src/components/types.ts +35 -0
  65. package/src/index.ts +1 -0
  66. package/src/stories/Banner.stories.ts +46 -0
  67. package/src/stories/BitDisplay.stories.ts +68 -0
  68. package/src/stories/Button.stories.ts +138 -0
  69. package/src/stories/Header.stories.ts +55 -0
  70. package/src/stories/Page.stories.ts +108 -0
  71. package/src/stories/QueryBar.stories.ts +63 -0
  72. package/src/stories/Splitview.stories.ts +52 -0
  73. package/src/stories/fixtures/Bits.ts +15 -0
  74. package/src/stories/fixtures/ExampleContent.ts +102 -0
  75. package/src/stories/fixtures/data.ts +30 -0
  76. package/src/stories/fixtures/lorumipsum.ts +19 -0
  77. package/src/stories/input.stories.ts +77 -0
  78. package/src/stories/tsconfig.json +35 -0
  79. package/src/utils/debounce.ts +18 -0
  80. package/src/utils/spread.ts +71 -0
  81. package/src/vite-env.d.ts +1 -0
  82. package/test/__init__.py +9 -0
  83. package/test/elastic.py +9 -0
  84. package/test/interface.py +16 -0
  85. package/tsconfig.json +29 -0
  86. package/vite.config.js +34 -0
  87. package/vue-example.png +0 -0
  88. package/vue-include.png +0 -0
@@ -0,0 +1,312 @@
1
+ import { html, LitElement, TemplateResult } from 'lit';
2
+ import "./input.css"
3
+ import { customElement, property, query } from 'lit/decorators.js';
4
+ import { ifDefined } from 'lit/directives/if-defined.js';
5
+ import { ReactElementWithPropsAndEvents } from './types';
6
+
7
+ export enum InputVariants {
8
+ Text = 'text',
9
+ TextArea = 'text-area',
10
+ number = 'number',
11
+ //checkbox = "checkbox",
12
+ color = "color",
13
+ date = "date",//replace default eventually with custom
14
+ datetime = "datetime-local",//replace default eventually with custom
15
+ email = "email",
16
+ file = "file",//display drop area
17
+ hidden = "hidden",//display drop area
18
+ password = "password",
19
+
20
+ }
21
+ type InputVariantsTypes = `${InputVariants}`
22
+ export interface InputProps {
23
+ /** Input type */
24
+ variant: InputVariantsTypes;
25
+ /**Label to display above the input */
26
+ label: string,
27
+ /**placeholder text to display*/
28
+ placeholder: string,
29
+ /* should be disabled?*/
30
+ disabled: boolean,
31
+ /* should be readonly*/
32
+ readonly: boolean,
33
+ /**
34
+ * The helper text.
35
+ */
36
+
37
+ helperText: string,
38
+ /**
39
+ * Specify if the currently value is invalid.
40
+ */
41
+ invalid: boolean,
42
+ /**
43
+ * Message which is displayed if the value is invalid.
44
+ */
45
+ invalidText: string | TemplateResult<1>,
46
+ /**
47
+ * Max character count allowed for input. This is needed in order for enableCounter to display
48
+ */
49
+ maxCount: number,
50
+ /**
51
+ * Boolean property to set the required status
52
+ */
53
+ required?: boolean,
54
+ /**
55
+ * Shows a button to display the password
56
+ */
57
+ showPasswordVisibilityToggle?: boolean;
58
+
59
+ /**
60
+ * Name for the input used for form data events //TODO make sure this works
61
+ */
62
+ name?: string;
63
+
64
+ /**
65
+ * Pattern to validate the input against for HTML validity checking
66
+ */
67
+
68
+ pattern?: string;
69
+ /**
70
+ * The sets the autocomplete for the input.
71
+ */
72
+ autocomplete: HTMLInputElement['autocomplete'];
73
+ }
74
+ @customElement('spectric-input')
75
+ export class SpectricInput extends LitElement implements InputProps {
76
+ //static styles?: CSSResultGroup | undefined = style;
77
+ protected createRenderRoot(): HTMLElement | DocumentFragment {
78
+ return this
79
+ }
80
+ @property({ type: String, reflect: true })
81
+ placeholder: string = "";
82
+ @property({ type: Boolean, reflect: true })
83
+ readonly: boolean = false;
84
+ @property({ type: String, reflect: true })
85
+ variant: InputVariantsTypes = "text";
86
+ @property({ type: Boolean, reflect: true })
87
+ disabled: boolean = false;
88
+ @property({ type: String, reflect: true })
89
+ label: string = "";
90
+
91
+ /**
92
+ * "Hide password" tooltip text on password visibility toggle
93
+ */
94
+ @property()
95
+ hidePasswordLabel = 'Hide';
96
+
97
+ /**
98
+ * "Show password" tooltip text on password visibility toggle
99
+ */
100
+ @property()
101
+ showPasswordLabel = 'Show';
102
+
103
+ /**
104
+ * Boolean property to render password visibility toggle
105
+ */
106
+ @property({
107
+ type: Boolean,
108
+ reflect: true,
109
+ })
110
+ showPasswordVisibilityToggle = true;
111
+
112
+ /**
113
+ * The helper text.
114
+ */
115
+ @property({ type: String, reflect: true })
116
+ helperText = '';
117
+
118
+ /**
119
+ * Specify if the currently value is invalid.
120
+ */
121
+ @property({ type: Boolean, reflect: true })
122
+ invalid = false;
123
+
124
+ /**
125
+ * Boolean property to set the required status
126
+ */
127
+ @property({ type: Boolean, reflect: true })
128
+ required = false;
129
+ /**
130
+ * Message which is displayed if the value is invalid.
131
+ */
132
+ @property({ type: String, reflect: true })
133
+ invalidText: InputProps["invalidText"] = '';
134
+ /**
135
+ * Name for the input used for form data events //TODO make sure this works
136
+ */
137
+ @property()
138
+ name = '';
139
+
140
+ /**
141
+ * Pattern to validate the input against for HTML validity checking
142
+ */
143
+ @property()
144
+ pattern = '';
145
+ @property({ type: Number, reflect: true })
146
+ maxCount: InputProps['maxCount'] = 0;
147
+ /**
148
+ * The internal value.
149
+ */
150
+ protected _value: string | boolean | number = '';
151
+ private _showPassword: boolean = false;
152
+ /**
153
+ * The sets the autocomplete for the input.
154
+ */
155
+ @property({ reflect: true })
156
+ autocomplete: HTMLInputElement['autocomplete'] = "";
157
+ get selectionStart() {
158
+ return this._input.selectionStart
159
+ }
160
+ /**
161
+ * The value of the input.
162
+ */
163
+ @property({ reflect: true })
164
+ get value() {
165
+ //pull directly from the input
166
+ if (this._input) {
167
+ if (this.variant == InputVariants.number) {
168
+ return parseFloat(this._input.value)
169
+ }
170
+ return this._input.value;
171
+ }
172
+ // but before then _value will work fine
173
+ return this._value;
174
+ }
175
+
176
+ set value(value) {
177
+ const oldValue = this._value;
178
+ this._value = value;
179
+ this.requestUpdate('value', oldValue);
180
+ // we set the value directly on the input (when available)
181
+ // so that programatic manipulation updates the UI correctly
182
+ if (this._input) {
183
+ this._input.value = String(value);
184
+ }
185
+ }
186
+
187
+ setSelectionRange(start: number, end: number, direction: "forward" | "backward" | "none" = "none") {
188
+ this._input.setSelectionRange(start, end, direction)
189
+ }
190
+ /**
191
+ * Handles `oninput` event on the `<input>`.
192
+ */
193
+ protected _handleInput = ({ target }: Event) => {
194
+ const input = (target as HTMLInputElement)
195
+ this.value = input.value;
196
+ this.invalid = !input.validity.valid
197
+ }
198
+ /**
199
+ * The underlying input element
200
+ */
201
+ @query('input')
202
+ protected _input!: HTMLInputElement;
203
+
204
+ private handleTogglePasswordVisibility = () => {
205
+ this._showPassword = !this._showPassword;
206
+ this.requestUpdate()
207
+ }
208
+ protected render(): unknown {
209
+ switch (this.variant) {
210
+ case InputVariants.Text:
211
+ case InputVariants.password:
212
+ case InputVariants.number:
213
+ //case InputVariants.checkbox:
214
+ case InputVariants.email:
215
+ //cases below should be replaces with a custom input for uniformity across browsers
216
+ case InputVariants.date://replace with custom date picker
217
+ case InputVariants.datetime://replace with custom date picker
218
+ case InputVariants.file://replace with drag and drop location and custom select file button
219
+ case InputVariants.color: //replace with custom color picker
220
+ return html`
221
+ <div class="inputWrapper">
222
+ <div class="text-input__label-helper-wrapper">
223
+ <div class="--text-input__label-wrapper">
224
+ ${this.label} ${this.maxCount > 0 && this._value ? `${(this._value as String).length}/${this.maxCount}` : null}
225
+ </div>
226
+ </div>
227
+ <div class="fieldwrapper">
228
+ <div ?data-invalid="${this.invalid}" class="inputContainer">
229
+ <input
230
+ ?data-invalid="${this.invalid}"
231
+ ?disabled="${this.disabled}"
232
+ aria-describedby="helper-text"
233
+ id="input"
234
+ name="${ifNonEmpty(this.name)}"
235
+ pattern="${ifNonEmpty(this.pattern)}"
236
+ placeholder="${ifNonEmpty(this.placeholder)}"
237
+ autocomplete="${ifNonEmpty(this.autocomplete)}"
238
+ ?readonly="${this.readonly}"
239
+ ?required="${this.required}"
240
+ type="${ifNonEmpty(
241
+ this.variant !== InputVariants.password ?
242
+ this.variant :
243
+ this._showPassword ? InputVariants.Text : InputVariants.password)}"
244
+ .value="${this._value as string}"
245
+ maxlength="${ifNonEmpty(this.maxCount > 0 ? this.maxCount : undefined)}"
246
+ @input="${this._handleInput}"
247
+ @change=${() => {
248
+ this.dispatchEvent(new Event("change", { bubbles: true }))
249
+ }}
250
+ />
251
+
252
+ ${this.variant === String(InputVariants.password) && this.showPasswordVisibilityToggle
253
+ ? html`
254
+ <spectric-button
255
+ size="small"
256
+ type="button"
257
+ ?disabled="${this.disabled}"
258
+ @click=${this.handleTogglePasswordVisibility}>
259
+ ${this._showPassword ? this.hidePasswordLabel : this.showPasswordLabel}
260
+ </spectric-button>
261
+ `
262
+ : null}
263
+ </div>
264
+ <div
265
+ id="helper-text"
266
+ >
267
+ <slot name="helper-text"> ${this.invalid ? this.invalidText : this.helperText} </slot>
268
+ </div>
269
+
270
+ </div>
271
+ </div>
272
+ `;
273
+
274
+ case InputVariants.hidden:
275
+ return html`<input type="hidden"></input>`
276
+ default:
277
+ break;
278
+ }
279
+ return `Not yet implemented ${this.variant}`
280
+ }
281
+ }
282
+
283
+
284
+
285
+
286
+ declare global {
287
+ interface HTMLElementTagNameMap {
288
+ "spectric-input": SpectricInput
289
+ }
290
+ namespace JSX {
291
+ interface IntrinsicElements {
292
+ /**
293
+ * {@link SpectricInput}
294
+ */
295
+ "spectric-input": ReactElementWithPropsAndEvents<SpectricInput, InputProps>
296
+ }
297
+ }
298
+ namespace React {
299
+ namespace JSX {
300
+ interface IntrinsicElements {
301
+ /**
302
+ * {@link SpectricInput}
303
+ */
304
+ "spectric-input": ReactElementWithPropsAndEvents<SpectricInput, InputProps>;
305
+ }
306
+ }
307
+ }
308
+ }
309
+
310
+
311
+ const ifNonEmpty = (value: any) =>
312
+ ifDefined(value === '' ? undefined : (value ?? undefined));
@@ -0,0 +1,158 @@
1
+ import { css } from "lit";
2
+ export default css`
3
+
4
+ :host {
5
+ height:100vh;
6
+ width: 100%;
7
+ display: flex;
8
+ flex-direction: column;
9
+ font-size: 14px;
10
+ line-height: 24px;
11
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
12
+ --spectric-background: var(--background,#ffffff);
13
+ --spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
14
+ --spectric-background-inverse: var(--background-inverse,#f4f4f4);
15
+ --spectric-background-inverse-hover: var(--background-inverse-hover,#474747);
16
+ --spectric-border-radius: var(--border-radius,.4em);
17
+ --spectric-primary:var(--primary,#1ea7fd);
18
+ --spectric-secondary: var(--secondary,#77878b);
19
+ --spectric-tertiary: var(--tertiary,#0f62fe);
20
+ --spectric-disabled: var(--disabled,#c6c6c6);
21
+
22
+ /* panel */
23
+ --panel-color:var(--spectric-background-inverse);
24
+ --panel-color-inverse:var(--spectric-background);
25
+ --spectric-border-disabled: var(--disabled);
26
+
27
+ /*inputs*/
28
+ --spectric-input-color: var(--panel-color-inverse);
29
+ --spectric-input-bottom: var(--panel-color);
30
+
31
+ --spectric-text-on-color: var(--text-on-color,#ffffff);
32
+ --spectric-text-on-color-disabled: var(--text-on-color-disabled,#8d8d8d);
33
+ --spectric-text-placeholder: var(--text-placeholder,rgba(22, 22, 22, 0.4));
34
+ --spectric-text-primary: var(--text-primary,#161616);
35
+ --spectric-text-secondary: var(--text-secondary,#525252);
36
+ /* Buttons */
37
+ --spectric-button-separator: #e0e0e0;
38
+ --spectric-button-primary: var(--primary,#1ea7fd);
39
+ --spectric-button-secondary: var(--secondary,#77878b);
40
+ --spectric-button-tertiary: var(--tertiary);
41
+ --spectric-button-danger-primary: #da1e28;
42
+ --spectric-button-danger-secondary: #da1e28;
43
+ --spectric-button-danger-active: #750e13;
44
+ --spectric-button-primary-active: #002d9c;
45
+ --spectric-button-secondary-active: #6f6f6f;
46
+ --spectric-button-tertiary-active: #002d9c;
47
+ --spectric-button-danger-hover: #b81921;
48
+ --spectric-button-primary-hover: #0050e6;
49
+ --spectric-button-secondary-hover: #474747;
50
+ --spectric-button-tertiary-hover: #0050e6;
51
+ --spectric-text-on-color-disabled: var(--disabled,#c6c6c6)
52
+ --spectric-button-disabled: #c6c6c6;
53
+ }
54
+ *{
55
+ color: var(--spectric-text-primary);
56
+ background-color: var(--spectric-background,rgb(255 255 255 / 60%));
57
+ }
58
+ article{
59
+ flex-grow:1;
60
+ overflow-y:auto;
61
+ padding-left: calc(var(--spectric-border-radius, 0.4em) + 2px);
62
+ padding-right: calc(var(--spectric-border-radius, 0.4em) + 2px);
63
+ }
64
+ h2 {
65
+ display: inline-block;
66
+ vertical-align: middle;
67
+ margin: 0 0 4px;
68
+ font-weight: 700;
69
+ font-size: 32px;
70
+ line-height: 1;
71
+ }
72
+
73
+ p {
74
+ margin: 1em 0;
75
+ }
76
+
77
+ a {
78
+ color: var(--primary);
79
+ text-decoration: var(--primary);
80
+ }
81
+
82
+ ul {
83
+ margin: 1em 0;
84
+ padding-left: 30px;
85
+ }
86
+
87
+ li {
88
+ margin-bottom: 8px;
89
+ }
90
+ ::-webkit-scrollbar {
91
+ width: 10px;
92
+ }
93
+
94
+ ::-webkit-scrollbar-thumb {
95
+ background: var(--spectric-background-inverse,#393939);
96
+ border-radius: var(--spectric-border-radius,4em);
97
+ -webkit-border-radius: var(--spectric-border-radius,4em);
98
+ padding-top: 1px;
99
+ padding-bottom: 1px;
100
+ box-shadow: 0 0 1px var(--spectric-primary,#242424) inset;
101
+ }
102
+ ::-webkit-scrollbar-thumb:hover {
103
+ background: var(--spectric-primary,#009eb3);
104
+ }
105
+
106
+
107
+ ::-webkit-scrollbar-button:single-button {
108
+ background-color: transparent;
109
+ display: block;
110
+ border-style: solid;
111
+ }
112
+ /* Up */
113
+ ::-webkit-scrollbar-button:single-button:vertical:decrement {
114
+ border-width: 0 5px 5px 5px;
115
+ border-color: var(--spectric-background, #ffffff) var(--spectric-background, #ffffff) var(--spectric-background-inverse,#393939) var(--spectric-background, #ffffff);
116
+ }
117
+ ::-webkit-scrollbar-button:single-button:vertical:decrement:hover {
118
+ border-color: var(--spectric-background, #ffffff) var(--spectric-background, #ffffff) var(--spectric-primary,#009eb3) var(--spectric-background, #ffffff);
119
+ }
120
+ /* Down */
121
+ ::-webkit-scrollbar-button:single-button:vertical:increment {
122
+ border-width: 5px 5px 0 5px;
123
+ border-color: var(--spectric-background-inverse,#393939) var(--spectric-background, #ffffff) transparent var(--spectric-background, #ffffff);
124
+ }
125
+
126
+ ::-webkit-scrollbar-button:vertical:single-button:increment:hover {
127
+ border-color: var(--spectric-primary,#009eb3) var(--spectric-background, #ffffff) transparent var(--spectric-background, #ffffff);
128
+ }
129
+
130
+ /* Left */
131
+ ::-webkit-scrollbar-button:single-button:horizontal:decrement {
132
+ border-width: 5px 5px 5px 0;
133
+ border-color:var(--spectric-background, #ffffff) var(--spectric-background-inverse,#393939) var(--spectric-background, #ffffff) var(--spectric-background, #ffffff);
134
+
135
+ }
136
+
137
+ ::-webkit-scrollbar-button:single-button:horizontal:decrement:hover {
138
+ border-width: 5px 5px 5px 0;
139
+ border-color:var(--spectric-background, #ffffff) var(--spectric-primary,#009eb3) var(--spectric-background, #ffffff) var(--spectric-background, #ffffff);
140
+
141
+ }
142
+
143
+
144
+
145
+ /* Right */
146
+ ::-webkit-scrollbar-button:single-button:horizontal:increment {
147
+ border-width: 5px 0 5px 5px;
148
+ border-color:var(--spectric-background, #ffffff) var(--spectric-background, #ffffff) var(--spectric-background, #ffffff) var(--spectric-primary,#009eb3);
149
+
150
+ }
151
+
152
+ ::-webkit-scrollbar-button:single-button:horizontal:increment:hover {
153
+ border-width: 5px 0 5px 5px;
154
+ border-color:var(--spectric-background, #ffffff) var(--spectric-background, #ffffff) var(--spectric-background, #ffffff) var(--spectric-background-inverse-hover,#474747);
155
+
156
+ }
157
+
158
+ `;
@@ -0,0 +1,44 @@
1
+ import { css } from "lit";
2
+
3
+ const even = css`
4
+ border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
5
+ background-color: var(--panel-color,#0b0b0b);
6
+ --spectric-input-color: var(--spectric-background);
7
+ color:var(--text-secondary,#3c4c5b);
8
+ --spectric-text-primary:var(--text-primary);
9
+ --spectric-text-secondary:var(--text-secondary);
10
+ filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
11
+ `
12
+ const odd = css`
13
+ border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
14
+ background-color: var(--panel-color-inverse,#0b0b0b);
15
+ color:var(--text-primary,#3c4c5b);
16
+ --spectric-input-color: var(--panel-color);
17
+ --spectric-text-primary:var(--text-secondary);
18
+ --spectric-text-secondary:var(--text-primary);
19
+ filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
20
+ `
21
+ export default css`
22
+ :host{
23
+ display:block;
24
+ border:2px solid black;
25
+ margin: 5px;
26
+ border-radius:var(--spectric-border-radius,0.4em);
27
+ padding: calc(var(--spectric-border-radius,0.4em) + 2px);
28
+
29
+ }
30
+ :host(spectric-panel[level='0']) {
31
+ ${even};
32
+ }
33
+
34
+ :host(spectric-panel[level='1']) {
35
+ ${odd};
36
+ }
37
+
38
+ :host(spectric-panel[level='2']) {
39
+ ${even};
40
+ }
41
+ :host(spectric-panel[level='3']) {
42
+ ${odd};
43
+ }
44
+ `
@@ -0,0 +1,48 @@
1
+ spectric-query {
2
+ font-family: monospace
3
+ }
4
+
5
+
6
+
7
+ spectric-query .autocomplete {
8
+ color: var(--spectric-text-primary, #161616);
9
+ border-radius: .0em 0em var(--spectric-border-radius, .4em) var(--spectric-border-radius, .4em);
10
+ background-color: var(--spectric-background, #ffffff);
11
+ border: 1px solid var(--spectric-background-hover, rgba(141, 141, 141, 0.12));
12
+ max-height: 300px;
13
+ border-top: 0px;
14
+ margin: 0px;
15
+ margin-top: -18px;
16
+ /*Input helper text is 18px we can cover that with the popover*/
17
+ position: fixed;
18
+ top: anchor(bottom);
19
+ justify-self: anchor-center;
20
+ text-align: center;
21
+ }
22
+
23
+ spectric-query .autocomplete .optiontype {
24
+ float: left;
25
+ max-width: 10px;
26
+ /*todo should we display an icon instead of text?*/
27
+ }
28
+
29
+ spectric-query .autocomplete .label {
30
+ position: absolute;
31
+ right: 0;
32
+ }
33
+
34
+ spectric-query .autocomplete .option.active,
35
+ spectric-query .autocomplete .option:hover {
36
+ background-color: var(--spectric-background-hover, rgba(141, 141, 141, 0.12));
37
+ border-bottom: 1px solid var(--primary, #1ea7fd);
38
+ }
39
+
40
+ spectric-query .autocomplete .option {
41
+ border-bottom: 1px solid transparent;
42
+ padding: 8px;
43
+ }
44
+
45
+ .query-bar-date-quick-select {
46
+ display: flex;
47
+ justify-content: space-evenly;
48
+ }