@fusion.dev/helix 0.12.3 → 0.13.1
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.
- package/custom-elements.json +1553 -142
- package/dist/element-events.generated.js +2 -0
- package/dist/filter-input/index.d.ts +1 -0
- package/dist/filter-input/index.js +1 -0
- package/dist/filter-input/root/filter-input-root.css.d.ts +1 -0
- package/dist/filter-input/root/filter-input-root.css.js +119 -0
- package/dist/filter-input/root/filter-input-root.d.ts +37 -0
- package/dist/filter-input/root/filter-input-root.js +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +6 -6
- package/types/jsx.d.ts +546 -0
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +103 -0
|
@@ -32,6 +32,7 @@ registerElementEvents({
|
|
|
32
32
|
'helix-before-close',
|
|
33
33
|
'helix-before-open',
|
|
34
34
|
'helix-create',
|
|
35
|
+
'helix-filter',
|
|
35
36
|
'input',
|
|
36
37
|
'toggle',
|
|
37
38
|
],
|
|
@@ -52,6 +53,7 @@ registerElementEvents({
|
|
|
52
53
|
'helix-drilldown': ['helix-select'],
|
|
53
54
|
'helix-drilldown-item': ['helix-select'],
|
|
54
55
|
'helix-file-input': ['change', 'helix-before-change', 'input'],
|
|
56
|
+
'helix-filter-input': ['change', 'helix-before-change', 'input'],
|
|
55
57
|
'helix-heatmap': ['helix-resize'],
|
|
56
58
|
'helix-image': ['error', 'load'],
|
|
57
59
|
'helix-input': ['change', 'helix-before-change', 'input'],
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/filter-input-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './root/filter-input-root.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { createSheet } from '@fusion.dev/helix-core';
|
|
2
|
+
export const styles = createSheet(`:host {
|
|
3
|
+
--_filter-input-size: var(--filter-input-size, var(--helix-size-control));
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: var(--helix-space-2xs);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
[part="field"] {
|
|
10
|
+
align-items: center;
|
|
11
|
+
background-color: var(--filter-input-background-color, var(--helix-color-well));
|
|
12
|
+
border: var(--helix-border-thin) solid var(--helix-color-border);
|
|
13
|
+
border-radius: var(--helix-radii-sm);
|
|
14
|
+
color: var(--helix-color-foreground-subtle);
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-wrap: wrap;
|
|
17
|
+
gap: var(--helix-space-2xs);
|
|
18
|
+
min-block-size: var(--_filter-input-size);
|
|
19
|
+
|
|
20
|
+
padding-block: var(--helix-space-2xs);
|
|
21
|
+
padding-inline: var(--helix-space-xs);
|
|
22
|
+
transition:
|
|
23
|
+
border-color var(--helix-duration-fast) var(--helix-easing-standard),
|
|
24
|
+
background-color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:host(:not(:disabled)) [part="field"]:hover {
|
|
28
|
+
border-color: var(--helix-color-primary);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:host(:focus-within) [part="field"],
|
|
32
|
+
:host(:focus-within) [part="field"]:hover {
|
|
33
|
+
border-color: var(--helix-color-primary);
|
|
34
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
35
|
+
outline-offset: 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host(:state(invalid)) [part="field"],
|
|
39
|
+
:host(:state(invalid)) [part="field"]:hover,
|
|
40
|
+
:host(:state(invalid):focus-within) [part="field"],
|
|
41
|
+
:host(:state(invalid):focus-within) [part="field"]:hover {
|
|
42
|
+
border-color: var(--helix-color-danger);
|
|
43
|
+
outline-color: var(--helix-color-danger);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
[part="tags"] {
|
|
47
|
+
display: contents;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
::slotted([slot="tags"]) {
|
|
51
|
+
flex: 0 0 auto;
|
|
52
|
+
max-inline-size: 100%;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
[part="rest"] {
|
|
56
|
+
align-self: center;
|
|
57
|
+
color: var(--helix-color-foreground-subtle);
|
|
58
|
+
flex: 0 0 auto;
|
|
59
|
+
font-family: var(--helix-font-sans);
|
|
60
|
+
font-size: var(--helix-text-xs);
|
|
61
|
+
font-weight: var(--helix-weight-medium);
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[part="control"] {
|
|
66
|
+
all: unset;
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
color: var(--helix-color-foreground);
|
|
69
|
+
flex: 1 1 var(--filter-input-control-size, 6ch);
|
|
70
|
+
font-family: var(--helix-font-sans);
|
|
71
|
+
font-size: var(--helix-text-sm);
|
|
72
|
+
font-weight: var(--helix-weight-medium);
|
|
73
|
+
min-inline-size: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
slot[name="start"]::slotted(*),
|
|
77
|
+
slot[name="end"]::slotted(*) {
|
|
78
|
+
color: var(--helix-color-foreground-subtle);
|
|
79
|
+
flex: 0 0 auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
[part="clear"] {
|
|
83
|
+
--icon-size: var(--helix-size-icon-tight);
|
|
84
|
+
all: unset;
|
|
85
|
+
|
|
86
|
+
align-items: center;
|
|
87
|
+
align-self: center;
|
|
88
|
+
border-radius: var(--helix-radii-sm);
|
|
89
|
+
box-sizing: border-box;
|
|
90
|
+
color: var(--helix-color-foreground-muted);
|
|
91
|
+
cursor: pointer;
|
|
92
|
+
display: flex;
|
|
93
|
+
flex: 0 0 auto;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
min-block-size: var(--helix-size-icon-loose);
|
|
96
|
+
min-inline-size: var(--helix-size-icon-loose);
|
|
97
|
+
transition: color var(--helix-duration-fast) var(--helix-easing-standard);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[part="clear"]:hover {
|
|
101
|
+
color: var(--helix-color-foreground);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[part="clear"]:focus-visible {
|
|
105
|
+
outline: var(--helix-size-focus-ring) solid var(--helix-color-focus-ring);
|
|
106
|
+
outline-offset: var(--helix-size-focus-offset);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:host(:disabled) [part="field"] {
|
|
110
|
+
cursor: not-allowed;
|
|
111
|
+
opacity: 0.5;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@media print {
|
|
115
|
+
:host {
|
|
116
|
+
box-shadow: none;
|
|
117
|
+
print-color-adjust: exact;
|
|
118
|
+
}
|
|
119
|
+
}`);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HelixHeadlessFilterInput } from '@fusion.dev/helix-headless/filter-input';
|
|
2
|
+
import type { CSSResultGroup } from 'lit';
|
|
3
|
+
import '../../icon/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @summary A field that narrows something else, beside what is already narrowing it.
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* The frame is the field rather than the input, so the tokens sit inside the
|
|
9
|
+
* same box as the text and the focus ring is drawn once around the whole
|
|
10
|
+
* control. It grows down a line at a time as tokens are added, which is the
|
|
11
|
+
* arrangement Combobox takes when it is holding a selection.
|
|
12
|
+
*
|
|
13
|
+
* **The tokens are the consumer's own elements**, so the only thing said about
|
|
14
|
+
* them here is to keep their size and not run past the field. A `Tag` slotted
|
|
15
|
+
* into `tags` already looks like one; anything else looks like whatever it is.
|
|
16
|
+
*
|
|
17
|
+
* Height comes from the region, like every other control: `data-density` on
|
|
18
|
+
* whatever holds it, not a `size` here.
|
|
19
|
+
*
|
|
20
|
+
* @since 0.1.0
|
|
21
|
+
* @status experimental
|
|
22
|
+
* @category forms
|
|
23
|
+
* @aliases SearchField, FacetInput, TokenInput
|
|
24
|
+
* @documentation https://helix.fusion.dev/components/filter-input
|
|
25
|
+
*
|
|
26
|
+
* @cssproperty --filter-input-background-color - Fill behind the field.
|
|
27
|
+
* @cssproperty --filter-input-control-size - Smallest the text keeps as tokens fill the line, before it wraps to its own.
|
|
28
|
+
* @cssproperty --filter-input-size - Height of the field with nothing in it, which it grows from.
|
|
29
|
+
*/
|
|
30
|
+
export declare class HelixFilterInput extends HelixHeadlessFilterInput {
|
|
31
|
+
static styles: CSSResultGroup;
|
|
32
|
+
}
|
|
33
|
+
declare global {
|
|
34
|
+
interface HTMLElementTagNameMap {
|
|
35
|
+
'helix-filter-input': HelixFilterInput;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { customElement } from '@fusion.dev/helix-core';
|
|
8
|
+
import { HelixHeadlessFilterInput } from '@fusion.dev/helix-headless/filter-input';
|
|
9
|
+
import '../../icon/index.js';
|
|
10
|
+
import { styles as glyphStyles } from '../../icon/glyph.css.js';
|
|
11
|
+
import { styles as fieldStyles } from '../../shared/field/field.css.js';
|
|
12
|
+
import { styles as fieldStackedStyles } from '../../shared/field/field-stacked.css.js';
|
|
13
|
+
import { styles } from './filter-input-root.css.js';
|
|
14
|
+
let HelixFilterInput = class HelixFilterInput extends HelixHeadlessFilterInput {
|
|
15
|
+
static { this.styles = [glyphStyles, fieldStyles, fieldStackedStyles, styles]; }
|
|
16
|
+
};
|
|
17
|
+
HelixFilterInput = __decorate([
|
|
18
|
+
customElement('helix-filter-input')
|
|
19
|
+
], HelixFilterInput);
|
|
20
|
+
export { HelixFilterInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export * from './drawer/index.js';
|
|
|
39
39
|
export * from './drilldown/index.js';
|
|
40
40
|
export * from './empty/index.js';
|
|
41
41
|
export * from './file-input/index.js';
|
|
42
|
+
export * from './filter-input/index.js';
|
|
42
43
|
export * from './flex/index.js';
|
|
43
44
|
export * from './format-date/index.js';
|
|
44
45
|
export * from './grid/index.js';
|
package/dist/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export * from './drawer/index.js';
|
|
|
34
34
|
export * from './drilldown/index.js';
|
|
35
35
|
export * from './empty/index.js';
|
|
36
36
|
export * from './file-input/index.js';
|
|
37
|
+
export * from './filter-input/index.js';
|
|
37
38
|
export * from './flex/index.js';
|
|
38
39
|
export * from './format-date/index.js';
|
|
39
40
|
export * from './grid/index.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix",
|
|
3
3
|
"description": "Styled component tier. Extends the headless tier with token-driven presentation.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.13.1",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-headless": "0.
|
|
51
|
-
"@fusion.dev/helix-styles": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.13.1",
|
|
50
|
+
"@fusion.dev/helix-headless": "0.13.1",
|
|
51
|
+
"@fusion.dev/helix-styles": "0.13.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.13.1",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.13.1",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^3.3.0",
|