@f-ewald/components 1.46.0 → 1.47.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.
- package/README.md +1 -0
- package/custom-elements.json +4589 -2400
- package/dist/address-autocomplete.d.ts +9 -44
- package/dist/address-autocomplete.d.ts.map +1 -1
- package/dist/address-autocomplete.js +16 -597
- package/dist/address-autocomplete.js.map +1 -1
- package/dist/app-shell.d.ts.map +1 -1
- package/dist/app-shell.js +12 -5
- package/dist/app-shell.js.map +1 -1
- package/dist/autocomplete-base.d.ts +79 -0
- package/dist/autocomplete-base.d.ts.map +1 -0
- package/dist/autocomplete-base.js +679 -0
- package/dist/autocomplete-base.js.map +1 -0
- package/dist/autocomplete-input.d.ts +9 -44
- package/dist/autocomplete-input.d.ts.map +1 -1
- package/dist/autocomplete-input.js +18 -647
- package/dist/autocomplete-input.js.map +1 -1
- package/dist/calendar-day.d.ts +0 -2
- package/dist/calendar-day.d.ts.map +1 -1
- package/dist/calendar-day.js +3 -30
- package/dist/calendar-day.js.map +1 -1
- package/dist/calendar-month.d.ts +3 -2
- package/dist/calendar-month.d.ts.map +1 -1
- package/dist/calendar-month.js +5 -3
- package/dist/calendar-month.js.map +1 -1
- package/dist/calendar-timeline-base.d.ts +7 -2
- package/dist/calendar-timeline-base.d.ts.map +1 -1
- package/dist/calendar-timeline-base.js +35 -4
- package/dist/calendar-timeline-base.js.map +1 -1
- package/dist/calendar-week.d.ts +0 -2
- package/dist/calendar-week.d.ts.map +1 -1
- package/dist/calendar-week.js +5 -32
- package/dist/calendar-week.js.map +1 -1
- package/dist/cron-schedule.d.ts.map +1 -1
- package/dist/cron-schedule.js +4 -2
- package/dist/cron-schedule.js.map +1 -1
- package/dist/distribution-chart.d.ts +1 -0
- package/dist/distribution-chart.d.ts.map +1 -1
- package/dist/distribution-chart.js +23 -2
- package/dist/distribution-chart.js.map +1 -1
- package/dist/drop-zone.d.ts +78 -0
- package/dist/drop-zone.d.ts.map +1 -0
- package/dist/drop-zone.js +479 -0
- package/dist/drop-zone.js.map +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +2 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.js +13 -10
- package/dist/mcp-server.js.map +1 -1
- package/dist/multi-select.d.ts.map +1 -1
- package/dist/multi-select.js +1 -1
- package/dist/multi-select.js.map +1 -1
- package/dist/price-history-chart.d.ts.map +1 -1
- package/dist/price-history-chart.js +12 -7
- package/dist/price-history-chart.js.map +1 -1
- package/dist/range-slider.d.ts.map +1 -1
- package/dist/range-slider.js +1 -1
- package/dist/range-slider.js.map +1 -1
- package/dist/ui-checkbox.d.ts.map +1 -1
- package/dist/ui-checkbox.js +1 -1
- package/dist/ui-checkbox.js.map +1 -1
- package/dist/utils/calendar.d.ts +19 -1
- package/dist/utils/calendar.d.ts.map +1 -1
- package/dist/utils/calendar.js +34 -2
- package/dist/utils/calendar.js.map +1 -1
- package/dist/utils/cron.d.ts.map +1 -1
- package/dist/utils/cron.js +19 -10
- package/dist/utils/cron.js.map +1 -1
- package/dist/utils/layer-stack.d.ts +2 -0
- package/dist/utils/layer-stack.d.ts.map +1 -1
- package/dist/utils/layer-stack.js +4 -0
- package/dist/utils/layer-stack.js.map +1 -1
- package/docs/address-autocomplete.md +7 -7
- package/docs/autocomplete-input.md +5 -5
- package/docs/drop-zone.md +87 -0
- package/docs/icons.md +1 -0
- package/llms.txt +42 -2
- package/package.json +1 -1
|
@@ -59,18 +59,18 @@ import "@f-ewald/components/autocomplete-input.js";
|
|
|
59
59
|
|
|
60
60
|
| Property | Attribute | Type | Default | Description |
|
|
61
61
|
| --- | --- | --- | --- | --- |
|
|
62
|
+
| `endpoint` | `endpoint` | `string` | `""` | API endpoint queried in API mode. Ignored when `options` is set. |
|
|
63
|
+
| `queryParam` | `query-param` | `string` | `"q"` | Query string parameter name the current input text is sent under. |
|
|
64
|
+
| `options` | _(JS property only)_ | `AutocompleteOption[] | null` | `null` | Fixed candidate list to filter locally instead of fetching from `endpoint`. When set (non-null), no network request is ever made — this takes priority over the API mode. |
|
|
65
|
+
| `selectedKey` | `selected-key` | `string | null` | `null` | Key of the selected option: set by picking one, or by the caller together with `value`. |
|
|
66
|
+
| `selectedOption` | _(JS property only)_ | `AutocompleteOption | null` | `—` | Selected option (picked, or matching `selectedKey`), or null once the input diverges from it. _(read-only)_ |
|
|
62
67
|
| `value` | `value` | `string` | `""` | Current input value; also the form-associated value submitted with the form. |
|
|
63
68
|
| `placeholder` | `placeholder` | `string` | `""` | Placeholder text shown when the input is empty. |
|
|
64
69
|
| `required` | `required` | `boolean` | `false` | Marks the input as required for native form validation. |
|
|
65
70
|
| `disabled` | `disabled` | `boolean` | `false` | Disables the input and closes its suggestion popup. |
|
|
66
71
|
| `clearable` | `clearable` | `boolean` | `false` | Shows an in-field clear action while the control has a value. |
|
|
67
|
-
| `endpoint` | `endpoint` | `string` | `""` | API endpoint queried in API mode. Ignored when `options` is set. |
|
|
68
|
-
| `queryParam` | `query-param` | `string` | `"q"` | Query string parameter name the current input text is sent under. |
|
|
69
72
|
| `debounce` | `debounce` | `number` | `300` | Debounce delay (ms) before firing a request/filter after typing. |
|
|
70
73
|
| `minLength` | `min-length` | `number` | `3` | Minimum query length before suggestions are shown. |
|
|
71
|
-
| `options` | _(JS property only)_ | `AutocompleteOption[] | null` | `null` | Fixed candidate list to filter locally instead of fetching from `endpoint`. When set (non-null), no network request is ever made — this takes priority over the API mode. |
|
|
72
|
-
| `selectedKey` | `selected-key` | `string | null` | `null` | Key of the selected option: set by picking one, or by the caller together with `value`. |
|
|
73
|
-
| `selectedOption` | _(JS property only)_ | `AutocompleteOption | null` | `—` | Selected option (picked, or matching `selectedKey`), or null once the input diverges from it. _(read-only)_ |
|
|
74
74
|
|
|
75
75
|
## Events
|
|
76
76
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# `<drop-zone>`
|
|
2
|
+
|
|
3
|
+
A form-associated area for choosing files by dragging them onto it or by
|
|
4
|
+
browsing. It only collects files — uploading them is up to the consumer.
|
|
5
|
+
Inside a native `<form>`, the chosen files are submitted under `name`,
|
|
6
|
+
just like `<input type="file">`, and `form.reset()` clears them.
|
|
7
|
+
|
|
8
|
+
Files are checked against `accept`, `max-size`, and `max-files` as they
|
|
9
|
+
arrive; files that don't fit are listed under the zone with the reason and
|
|
10
|
+
reported through `files-reject`. Without `multiple`, a new file replaces
|
|
11
|
+
the current one. Chosen files are listed with their size and a remove
|
|
12
|
+
button. The "Choose" button is the keyboard path; clicking anywhere on the
|
|
13
|
+
zone also opens the file picker.
|
|
14
|
+
|
|
15
|
+
## Install
|
|
16
|
+
|
|
17
|
+
```js
|
|
18
|
+
import "@f-ewald/components/drop-zone.js";
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```html
|
|
24
|
+
<form>
|
|
25
|
+
<drop-zone
|
|
26
|
+
name="attachments"
|
|
27
|
+
accept="image/*,.pdf"
|
|
28
|
+
multiple
|
|
29
|
+
max-size="5242880"
|
|
30
|
+
max-files="3"
|
|
31
|
+
hint="Images or PDF, up to 5 MB each"
|
|
32
|
+
></drop-zone>
|
|
33
|
+
</form>
|
|
34
|
+
<script>
|
|
35
|
+
const zone = document.querySelector("drop-zone");
|
|
36
|
+
zone.addEventListener("change", (e) => console.log(e.detail.files));
|
|
37
|
+
zone.addEventListener("files-reject", (e) => console.log(e.detail.rejected));
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Attributes / properties
|
|
42
|
+
|
|
43
|
+
| Property | Attribute | Type | Default | Description |
|
|
44
|
+
| --- | --- | --- | --- | --- |
|
|
45
|
+
| `name` | `name` | `string` | `""` | Form field name the chosen files are submitted under. |
|
|
46
|
+
| `accept` | `accept` | `string` | `""` | Allowed files in native `accept` syntax, e.g. `"image/*,.pdf"`. Empty allows any file. |
|
|
47
|
+
| `multiple` | `multiple` | `boolean` | `false` | Allows choosing more than one file; otherwise a new file replaces the current one. |
|
|
48
|
+
| `maxSize` | `max-size` | `number` | `0` | Largest allowed file size in bytes; `0` means no limit. |
|
|
49
|
+
| `maxFiles` | `max-files` | `number` | `0` | Most files allowed with `multiple`; `0` means no limit. |
|
|
50
|
+
| `required` | `required` | `boolean` | `false` | Requires at least one file for native form validation. |
|
|
51
|
+
| `disabled` | `disabled` | `boolean` | `false` | Disables dropping, browsing, and removing. |
|
|
52
|
+
| `label` | `label` | `string` | `"Drag and drop files here"` | Main prompt text inside the zone. |
|
|
53
|
+
| `hint` | `hint` | `string` | `""` | Optional smaller line under the prompt, e.g. `"PNG or JPG, up to 5 MB"`. |
|
|
54
|
+
| `files` | _(JS property only)_ | `File[]` | `[]` | The chosen files. Setting it replaces the selection without firing `change`. |
|
|
55
|
+
|
|
56
|
+
## Events
|
|
57
|
+
|
|
58
|
+
| Event | Description |
|
|
59
|
+
| --- | --- |
|
|
60
|
+
| `files-reject` | Some dropped or picked files were not added; detail: `{ rejected: DropZoneRejection[] }`. |
|
|
61
|
+
| `change` | The chosen files changed through a drop, the picker, or a remove button; detail: `{ files: File[] }`. Setting `files` does not fire it. |
|
|
62
|
+
|
|
63
|
+
## Slots
|
|
64
|
+
|
|
65
|
+
_None._
|
|
66
|
+
|
|
67
|
+
## CSS custom properties
|
|
68
|
+
|
|
69
|
+
| Custom property |
|
|
70
|
+
| --- |
|
|
71
|
+
| `--ui-border` |
|
|
72
|
+
| `--ui-border-width` |
|
|
73
|
+
| `--ui-danger` |
|
|
74
|
+
| `--ui-font` |
|
|
75
|
+
| `--ui-font-size` |
|
|
76
|
+
| `--ui-font-size-sm` |
|
|
77
|
+
| `--ui-font-size-xs` |
|
|
78
|
+
| `--ui-font-weight-medium` |
|
|
79
|
+
| `--ui-line-height-tight` |
|
|
80
|
+
| `--ui-numeric` |
|
|
81
|
+
| `--ui-primary` |
|
|
82
|
+
| `--ui-radius` |
|
|
83
|
+
| `--ui-radius-sm` |
|
|
84
|
+
| `--ui-surface` |
|
|
85
|
+
| `--ui-surface-muted` |
|
|
86
|
+
| `--ui-text` |
|
|
87
|
+
| `--ui-text-muted` |
|
package/docs/icons.md
CHANGED
|
@@ -25,6 +25,7 @@ const icon = iconPencil(16); // 16px, defaults shown below if omitted
|
|
|
25
25
|
| `iconArrowsPointingOut` | 16px | "Expand" or "view fullscreen" actions. |
|
|
26
26
|
| `iconArrowsRightLeft` | 16px | Swap, exchange, or compare actions between two items. |
|
|
27
27
|
| `iconArrowTopRightOnSquare` | 16px | Links that open in a new tab/window, or navigate to an external site. |
|
|
28
|
+
| `iconArrowUpTray` | 18px | Upload or import actions, e.g. drop-zone's file prompt. |
|
|
28
29
|
| `iconBars3` | 18px | A hamburger menu toggle, e.g. collapsing or opening a sidebar/nav drawer. |
|
|
29
30
|
| `iconBookOpen` | 20px | A library, documentation, or reading content, e.g. a library node in dag-graph. |
|
|
30
31
|
| `iconCalendar` | 16px | Dates, due dates, or calendar-related metadata. |
|
package/llms.txt
CHANGED
|
@@ -42,6 +42,7 @@ table to pick the icon matching a use case, for consistency across apps:
|
|
|
42
42
|
| `iconArrowsPointingOut` | 16px | "Expand" or "view fullscreen" actions. |
|
|
43
43
|
| `iconArrowsRightLeft` | 16px | Swap, exchange, or compare actions between two items. |
|
|
44
44
|
| `iconArrowTopRightOnSquare` | 16px | Links that open in a new tab/window, or navigate to an external site. |
|
|
45
|
+
| `iconArrowUpTray` | 18px | Upload or import actions, e.g. drop-zone's file prompt. |
|
|
45
46
|
| `iconBars3` | 18px | A hamburger menu toggle, e.g. collapsing or opening a sidebar/nav drawer. |
|
|
46
47
|
| `iconBookOpen` | 20px | A library, documentation, or reading content, e.g. a library node in dag-graph. |
|
|
47
48
|
| `iconCalendar` | 16px | Dates, due dates, or calendar-related metadata. |
|
|
@@ -151,7 +152,7 @@ present.
|
|
|
151
152
|
|
|
152
153
|
Import: `import "@f-ewald/components/address-autocomplete.js";`
|
|
153
154
|
|
|
154
|
-
Properties: `
|
|
155
|
+
Properties: `types` (attribute `types`) : string, default "address"; `endpoint` (attribute `endpoint`) : string, default "https://api.mapbox.com/search/geocode/v6/forward"; `accessToken` (attribute `access-token`) : string, default ""; `bbox` (attribute `bbox`) : string, default ""; `proximity` (attribute `proximity`) : string, default ""; `suggestions` (JS property only) : AddressSuggestion[] | null, default null; `selectedSuggestion` (JS property only) : AddressSuggestion | null, default —; `value` (attribute `value`) : string, default ""; `placeholder` (attribute `placeholder`) : string, default ""; `required` (attribute `required`) : boolean, default false; `disabled` (attribute `disabled`) : boolean, default false; `clearable` (attribute `clearable`) : boolean, default false; `debounce` (attribute `debounce`) : number, default 300; `minLength` (attribute `min-length`) : number, default 3
|
|
155
156
|
Events: `address-select`, `input`
|
|
156
157
|
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-regular`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
157
158
|
|
|
@@ -381,7 +382,7 @@ present.
|
|
|
381
382
|
|
|
382
383
|
Import: `import "@f-ewald/components/autocomplete-input.js";`
|
|
383
384
|
|
|
384
|
-
Properties: `
|
|
385
|
+
Properties: `endpoint` (attribute `endpoint`) : string, default ""; `queryParam` (attribute `query-param`) : string, default "q"; `options` (JS property only) : AutocompleteOption[] | null, default null; `selectedKey` (attribute `selected-key`) : string | null, default null; `selectedOption` (JS property only) : AutocompleteOption | null, default —; `value` (attribute `value`) : string, default ""; `placeholder` (attribute `placeholder`) : string, default ""; `required` (attribute `required`) : boolean, default false; `disabled` (attribute `disabled`) : boolean, default false; `clearable` (attribute `clearable`) : boolean, default false; `debounce` (attribute `debounce`) : number, default 300; `minLength` (attribute `min-length`) : number, default 3
|
|
385
386
|
Events: `option-select`, `input`
|
|
386
387
|
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-regular`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
387
388
|
|
|
@@ -1112,6 +1113,45 @@ Example:
|
|
|
1112
1113
|
</script>
|
|
1113
1114
|
```
|
|
1114
1115
|
|
|
1116
|
+
## <drop-zone>
|
|
1117
|
+
|
|
1118
|
+
A form-associated area for choosing files by dragging them onto it or by
|
|
1119
|
+
browsing. It only collects files — uploading them is up to the consumer.
|
|
1120
|
+
Inside a native `<form>`, the chosen files are submitted under `name`,
|
|
1121
|
+
just like `<input type="file">`, and `form.reset()` clears them.
|
|
1122
|
+
|
|
1123
|
+
Files are checked against `accept`, `max-size`, and `max-files` as they
|
|
1124
|
+
arrive; files that don't fit are listed under the zone with the reason and
|
|
1125
|
+
reported through `files-reject`. Without `multiple`, a new file replaces
|
|
1126
|
+
the current one. Chosen files are listed with their size and a remove
|
|
1127
|
+
button. The "Choose" button is the keyboard path; clicking anywhere on the
|
|
1128
|
+
zone also opens the file picker.
|
|
1129
|
+
|
|
1130
|
+
Import: `import "@f-ewald/components/drop-zone.js";`
|
|
1131
|
+
|
|
1132
|
+
Properties: `name` (attribute `name`) : string, default ""; `accept` (attribute `accept`) : string, default ""; `multiple` (attribute `multiple`) : boolean, default false; `maxSize` (attribute `max-size`) : number, default 0; `maxFiles` (attribute `max-files`) : number, default 0; `required` (attribute `required`) : boolean, default false; `disabled` (attribute `disabled`) : boolean, default false; `label` (attribute `label`) : string, default "Drag and drop files here"; `hint` (attribute `hint`) : string, default ""; `files` (JS property only) : File[], default []
|
|
1133
|
+
Events: `files-reject`, `change`
|
|
1134
|
+
CSS custom properties: `--ui-border`, `--ui-border-width`, `--ui-danger`, `--ui-font`, `--ui-font-size`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-numeric`, `--ui-primary`, `--ui-radius`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1135
|
+
|
|
1136
|
+
Example:
|
|
1137
|
+
```html
|
|
1138
|
+
<form>
|
|
1139
|
+
<drop-zone
|
|
1140
|
+
name="attachments"
|
|
1141
|
+
accept="image/*,.pdf"
|
|
1142
|
+
multiple
|
|
1143
|
+
max-size="5242880"
|
|
1144
|
+
max-files="3"
|
|
1145
|
+
hint="Images or PDF, up to 5 MB each"
|
|
1146
|
+
></drop-zone>
|
|
1147
|
+
</form>
|
|
1148
|
+
<script>
|
|
1149
|
+
const zone = document.querySelector("drop-zone");
|
|
1150
|
+
zone.addEventListener("change", (e) => console.log(e.detail.files));
|
|
1151
|
+
zone.addEventListener("files-reject", (e) => console.log(e.detail.rejected));
|
|
1152
|
+
</script>
|
|
1153
|
+
```
|
|
1154
|
+
|
|
1115
1155
|
## <dropdown-button>
|
|
1116
1156
|
|
|
1117
1157
|
A button that opens an anchored menu of actions — essentially `form-select`
|