@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.
Files changed (83) hide show
  1. package/README.md +1 -0
  2. package/custom-elements.json +4589 -2400
  3. package/dist/address-autocomplete.d.ts +9 -44
  4. package/dist/address-autocomplete.d.ts.map +1 -1
  5. package/dist/address-autocomplete.js +16 -597
  6. package/dist/address-autocomplete.js.map +1 -1
  7. package/dist/app-shell.d.ts.map +1 -1
  8. package/dist/app-shell.js +12 -5
  9. package/dist/app-shell.js.map +1 -1
  10. package/dist/autocomplete-base.d.ts +79 -0
  11. package/dist/autocomplete-base.d.ts.map +1 -0
  12. package/dist/autocomplete-base.js +679 -0
  13. package/dist/autocomplete-base.js.map +1 -0
  14. package/dist/autocomplete-input.d.ts +9 -44
  15. package/dist/autocomplete-input.d.ts.map +1 -1
  16. package/dist/autocomplete-input.js +18 -647
  17. package/dist/autocomplete-input.js.map +1 -1
  18. package/dist/calendar-day.d.ts +0 -2
  19. package/dist/calendar-day.d.ts.map +1 -1
  20. package/dist/calendar-day.js +3 -30
  21. package/dist/calendar-day.js.map +1 -1
  22. package/dist/calendar-month.d.ts +3 -2
  23. package/dist/calendar-month.d.ts.map +1 -1
  24. package/dist/calendar-month.js +5 -3
  25. package/dist/calendar-month.js.map +1 -1
  26. package/dist/calendar-timeline-base.d.ts +7 -2
  27. package/dist/calendar-timeline-base.d.ts.map +1 -1
  28. package/dist/calendar-timeline-base.js +35 -4
  29. package/dist/calendar-timeline-base.js.map +1 -1
  30. package/dist/calendar-week.d.ts +0 -2
  31. package/dist/calendar-week.d.ts.map +1 -1
  32. package/dist/calendar-week.js +5 -32
  33. package/dist/calendar-week.js.map +1 -1
  34. package/dist/cron-schedule.d.ts.map +1 -1
  35. package/dist/cron-schedule.js +4 -2
  36. package/dist/cron-schedule.js.map +1 -1
  37. package/dist/distribution-chart.d.ts +1 -0
  38. package/dist/distribution-chart.d.ts.map +1 -1
  39. package/dist/distribution-chart.js +23 -2
  40. package/dist/distribution-chart.js.map +1 -1
  41. package/dist/drop-zone.d.ts +78 -0
  42. package/dist/drop-zone.d.ts.map +1 -0
  43. package/dist/drop-zone.js +479 -0
  44. package/dist/drop-zone.js.map +1 -0
  45. package/dist/icons.d.ts +2 -0
  46. package/dist/icons.d.ts.map +1 -1
  47. package/dist/icons.js +2 -0
  48. package/dist/icons.js.map +1 -1
  49. package/dist/index.d.ts +1 -0
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +1 -0
  52. package/dist/index.js.map +1 -1
  53. package/dist/mcp-server.js +13 -10
  54. package/dist/mcp-server.js.map +1 -1
  55. package/dist/multi-select.d.ts.map +1 -1
  56. package/dist/multi-select.js +1 -1
  57. package/dist/multi-select.js.map +1 -1
  58. package/dist/price-history-chart.d.ts.map +1 -1
  59. package/dist/price-history-chart.js +12 -7
  60. package/dist/price-history-chart.js.map +1 -1
  61. package/dist/range-slider.d.ts.map +1 -1
  62. package/dist/range-slider.js +1 -1
  63. package/dist/range-slider.js.map +1 -1
  64. package/dist/ui-checkbox.d.ts.map +1 -1
  65. package/dist/ui-checkbox.js +1 -1
  66. package/dist/ui-checkbox.js.map +1 -1
  67. package/dist/utils/calendar.d.ts +19 -1
  68. package/dist/utils/calendar.d.ts.map +1 -1
  69. package/dist/utils/calendar.js +34 -2
  70. package/dist/utils/calendar.js.map +1 -1
  71. package/dist/utils/cron.d.ts.map +1 -1
  72. package/dist/utils/cron.js +19 -10
  73. package/dist/utils/cron.js.map +1 -1
  74. package/dist/utils/layer-stack.d.ts +2 -0
  75. package/dist/utils/layer-stack.d.ts.map +1 -1
  76. package/dist/utils/layer-stack.js +4 -0
  77. package/dist/utils/layer-stack.js.map +1 -1
  78. package/docs/address-autocomplete.md +7 -7
  79. package/docs/autocomplete-input.md +5 -5
  80. package/docs/drop-zone.md +87 -0
  81. package/docs/icons.md +1 -0
  82. package/llms.txt +42 -2
  83. 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: `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; `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 ""; `debounce` (attribute `debounce`) : number, default 300; `minLength` (attribute `min-length`) : number, default 3; `suggestions` (JS property only) : AddressSuggestion[] | null, default null; `selectedSuggestion` (JS property only) : AddressSuggestion | null, default —
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: `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; `endpoint` (attribute `endpoint`) : string, default ""; `queryParam` (attribute `query-param`) : string, default "q"; `debounce` (attribute `debounce`) : number, default 300; `minLength` (attribute `min-length`) : number, default 3; `options` (JS property only) : AutocompleteOption[] | null, default null; `selectedKey` (attribute `selected-key`) : string | null, default null; `selectedOption` (JS property only) : AutocompleteOption | null, default —
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`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@f-ewald/components",
3
3
  "private": false,
4
- "version": "1.46.0",
4
+ "version": "1.47.0",
5
5
  "description": "A collection of universally usable web components for various tasks.",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",