@f-ewald/components 1.22.2 → 1.23.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/README.md +4 -1
- package/custom-elements.json +760 -96
- package/dist/address-autocomplete.d.ts +14 -0
- package/dist/address-autocomplete.d.ts.map +1 -1
- package/dist/address-autocomplete.js +205 -3
- package/dist/address-autocomplete.js.map +1 -1
- package/dist/autocomplete-input.d.ts +14 -0
- package/dist/autocomplete-input.d.ts.map +1 -1
- package/dist/autocomplete-input.js +205 -3
- package/dist/autocomplete-input.js.map +1 -1
- package/dist/form-field.d.ts +29 -1
- package/dist/form-field.d.ts.map +1 -1
- package/dist/form-field.js +376 -4
- package/dist/form-field.js.map +1 -1
- package/dist/icons.d.ts +55 -0
- package/dist/icons.d.ts.map +1 -1
- package/dist/icons.js +55 -0
- package/dist/icons.js.map +1 -1
- package/dist/mcp-server.js +39 -0
- package/dist/mcp-server.js.map +1 -1
- package/dist/text-area.d.ts +9 -0
- package/dist/text-area.d.ts.map +1 -1
- package/dist/text-area.js +123 -11
- package/dist/text-area.js.map +1 -1
- package/dist/utils/form-field-control.d.ts +15 -0
- package/dist/utils/form-field-control.d.ts.map +1 -0
- package/dist/utils/form-field-control.js +7 -0
- package/dist/utils/form-field-control.js.map +1 -0
- package/docs/address-autocomplete.md +9 -0
- package/docs/autocomplete-input.md +9 -1
- package/docs/design-language.md +11 -0
- package/docs/form-field.md +18 -0
- package/docs/icons.md +70 -0
- package/docs/text-area.md +9 -1
- package/llms.txt +94 -11
- package/package.json +1 -1
package/llms.txt
CHANGED
|
@@ -16,6 +16,68 @@ render correctly with zero external CSS. Override any `--ui-*` property on
|
|
|
16
16
|
`:root` (or an ancestor) to retheme, or import the optional
|
|
17
17
|
`@f-ewald/components/tokens.css` stylesheet as a starting point.
|
|
18
18
|
|
|
19
|
+
## Icons
|
|
20
|
+
|
|
21
|
+
Import from `@f-ewald/components/icons.js`, e.g. `iconPencil(16)`. Use this
|
|
22
|
+
table to pick the icon matching a use case, for consistency across apps:
|
|
23
|
+
|
|
24
|
+
| Icon | Default size | Use for |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `iconAcademicCap` | 18px | Education, learning, or certification-related content. |
|
|
27
|
+
| `iconArrowDownTray` | 16px | Download or export actions. |
|
|
28
|
+
| `iconArrowPath` | 12px | Refresh actions, or an animated busy/loading spinner. |
|
|
29
|
+
| `iconArrowRight` | 12px | "Continue" or forward-progressing actions, e.g. a compact next-step arrow. |
|
|
30
|
+
| `iconArrowRightOnRectangle` | 16px | Logout/sign-out actions. |
|
|
31
|
+
| `iconArrowsPointingOut` | 16px | "Expand" or "view fullscreen" actions. |
|
|
32
|
+
| `iconArrowsRightLeft` | 16px | Swap, exchange, or compare actions between two items. |
|
|
33
|
+
| `iconArrowTopRightOnSquare` | 16px | Links that open in a new tab/window, or navigate to an external site. |
|
|
34
|
+
| `iconBars3` | 18px | A hamburger menu toggle, e.g. collapsing or opening a sidebar/nav drawer. |
|
|
35
|
+
| `iconCalendar` | 16px | Dates, due dates, or calendar-related metadata. |
|
|
36
|
+
| `iconChatBubbleLeftRight` | 18px | Messaging, comments, or conversation-related content. |
|
|
37
|
+
| `iconCheckCircle` | 16px | Success states, confirmations, or a selected-item checkmark. |
|
|
38
|
+
| `iconChevronDown` | 16px | "Scroll to bottom", a downward disclosure, or an expanded tree/accordion indicator. |
|
|
39
|
+
| `iconChevronLeft` | 16px | "Previous" navigation, e.g. pagination or carousel back controls. |
|
|
40
|
+
| `iconChevronRight` | 16px | "Next" navigation, or a collapsed disclosure/submenu indicator. |
|
|
41
|
+
| `iconChevronUp` | 16px | "Scroll to top", or an expanded/upward disclosure control. |
|
|
42
|
+
| `iconClipboardDocumentList` | 18px | Task lists, checklists, or clipboard/notes content. |
|
|
43
|
+
| `iconClock` | 16px | Timestamps, durations, or time-related metadata. |
|
|
44
|
+
| `iconCodeBracketSquare` | 16px | Code snippets, developer tools, or technical/API content. |
|
|
45
|
+
| `iconCog` | 20px | Settings, preferences, or configuration entry points. |
|
|
46
|
+
| `iconComputerDesktop` | 16px | A "system/auto" theme option, or to represent a desktop device. |
|
|
47
|
+
| `iconCpuChip` | 18px | System, hardware, or technical/processing content. |
|
|
48
|
+
| `iconCurrencyDollar` | 16px | Monetary values, pricing, or billing-related content. |
|
|
49
|
+
| `iconDocument` | 18px | A generic file/document icon, e.g. tile-grid's default file icon. |
|
|
50
|
+
| `iconEllipsisVertical` | 16px | An overflow ("kebab") menu trigger, e.g. dropdown-button's icon variant. |
|
|
51
|
+
| `iconExclamationCircle` | 16px | Error states, e.g. the error variant of toast-notification. |
|
|
52
|
+
| `iconExclamationTriangle` | 16px | Warning states, e.g. the warning variant of toast-notification. |
|
|
53
|
+
| `iconEye` | 16px | "Show"/"preview" actions or a visible/reviewed state, e.g. password visibility or a review status. |
|
|
54
|
+
| `iconEyeSlash` | 16px | "Hide" actions or a hidden/masked state; pair with iconEye for the visible state. |
|
|
55
|
+
| `iconFolder` | 18px | Folders, directories, or grouped file content. |
|
|
56
|
+
| `iconHeart` | 16px | "Like"/"favorite" actions in their unselected state. |
|
|
57
|
+
| `iconHeartSolid` | 16px | "Like"/"favorite" actions in their selected/active state; pair with iconHeart for the unselected state. |
|
|
58
|
+
| `iconHome` | 16px | A primary navigation link to the app's home or dashboard. |
|
|
59
|
+
| `iconInfo` | 20px | Neutral informational messages, e.g. an info toast or status banner. |
|
|
60
|
+
| `iconLink` | 16px | Copy-link or hyperlink-related actions, e.g. copy-link-button. |
|
|
61
|
+
| `iconListBullet` | 18px | A list-view toggle, or to represent list-type content. |
|
|
62
|
+
| `iconMap` | 16px | A map-view toggle, or to represent map/geographic content. |
|
|
63
|
+
| `iconMapPin` | 16px | A location, address, or map marker. |
|
|
64
|
+
| `iconMoon` | 16px | A dark-theme toggle, or to represent night/dark mode. |
|
|
65
|
+
| `iconPencil` | 16px | Edit actions, e.g. an edit icon-button or inline edit toggle. |
|
|
66
|
+
| `iconPlus` | 16px | "Add new" actions, e.g. creating a new item or row. |
|
|
67
|
+
| `iconPuzzlePiece` | 18px | Plugins, integrations, or extensible/add-on features. |
|
|
68
|
+
| `iconQuestionMarkCircle` | 20px | Help, tooltips, or "learn more" affordances. |
|
|
69
|
+
| `iconQueueList` | 16px | Queues, backlogs, or ordered work-item lists. |
|
|
70
|
+
| `iconShieldCheck` | 16px | Verified, secure, or trusted states. |
|
|
71
|
+
| `iconShieldExclamation` | 16px | Security warnings, or at-risk/compromised states. |
|
|
72
|
+
| `iconSquares2x2` | 18px | A grid or kanban-view toggle, or to represent card/tile layouts. |
|
|
73
|
+
| `iconSun` | 16px | A light-theme toggle, or to represent daytime/light mode. |
|
|
74
|
+
| `iconTag` | 16px | Tags, labels, or categorical metadata. |
|
|
75
|
+
| `iconTrash` | 16px | Delete/remove actions, typically paired with a destructive/danger style. |
|
|
76
|
+
| `iconUserCircle` | 20px | A generic user/person fallback, e.g. user-avatar's icon fallback. |
|
|
77
|
+
| `iconUsers` | 18px | Teams, groups, or multi-user/collaboration content. |
|
|
78
|
+
| `iconWrenchScrewdriver` | 18px | Tools, maintenance, or build/configuration actions. |
|
|
79
|
+
| `iconX` | 18px | Close, dismiss, or clear (e.g. a modal, toast, or clearable input). |
|
|
80
|
+
|
|
19
81
|
## <action-bar>
|
|
20
82
|
|
|
21
83
|
Toolbar that sits directly above a list or table: a left cluster for
|
|
@@ -56,15 +118,19 @@ Supports two suggestion sources:
|
|
|
56
118
|
request. Useful for small/fixed address lists, offline use, or tests.
|
|
57
119
|
Takes priority over `endpoint` whenever it's non-null.
|
|
58
120
|
|
|
121
|
+
Set `clearable` to show an in-field clear action whenever a value is
|
|
122
|
+
present.
|
|
123
|
+
|
|
59
124
|
Import: `import "@f-ewald/components/address-autocomplete.js";`
|
|
60
125
|
|
|
61
|
-
Properties: `value` (attribute `value`) : string, default ""; `placeholder` (attribute `placeholder`) : string, default ""; `required` (attribute `required`) : boolean, default false; `disabled` (attribute `disabled`) : 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 —
|
|
62
|
-
Events: `address-select`
|
|
63
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
126
|
+
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 —
|
|
127
|
+
Events: `address-select`, `input`
|
|
128
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--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`
|
|
64
129
|
|
|
65
130
|
Example:
|
|
66
131
|
```html
|
|
67
132
|
<address-autocomplete
|
|
133
|
+
clearable
|
|
68
134
|
placeholder="Start typing an address…"
|
|
69
135
|
access-token="pk.your-mapbox-token"
|
|
70
136
|
></address-autocomplete>
|
|
@@ -220,16 +286,19 @@ Supports two suggestion sources:
|
|
|
220
286
|
request. Useful for small/fixed lists, offline use, or tests. Takes
|
|
221
287
|
priority over `endpoint` whenever it's non-null.
|
|
222
288
|
|
|
289
|
+
Set `clearable` to show an in-field clear action whenever a value is
|
|
290
|
+
present.
|
|
291
|
+
|
|
223
292
|
Import: `import "@f-ewald/components/autocomplete-input.js";`
|
|
224
293
|
|
|
225
|
-
Properties: `value` (attribute `value`) : string, default ""; `placeholder` (attribute `placeholder`) : string, default ""; `required` (attribute `required`) : boolean, default false; `disabled` (attribute `disabled`) : 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; `selectedOption` (JS property only) : AutocompleteOption | null, default —
|
|
226
|
-
Events: `option-select`
|
|
227
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-shadow`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
294
|
+
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; `selectedOption` (JS property only) : AutocompleteOption | null, default —
|
|
295
|
+
Events: `option-select`, `input`
|
|
296
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--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`
|
|
228
297
|
|
|
229
298
|
Example:
|
|
230
299
|
```html
|
|
231
300
|
<form>
|
|
232
|
-
<autocomplete-input name="language" placeholder="Start typing a language…"></autocomplete-input>
|
|
301
|
+
<autocomplete-input clearable name="language" placeholder="Start typing a language…"></autocomplete-input>
|
|
233
302
|
</form>
|
|
234
303
|
<script type="module">
|
|
235
304
|
// Local mode: filters client-side, no network request.
|
|
@@ -662,6 +731,11 @@ form. Purely presentational — composes whatever control is slotted
|
|
|
662
731
|
(`form-select`, `multi-select`, `autocomplete-input`, `ui-checkbox`, etc.)
|
|
663
732
|
without intercepting its events or value.
|
|
664
733
|
|
|
734
|
+
Set `floating-label` for supported text controls (`input`, `textarea`,
|
|
735
|
+
`autocomplete-input`, `address-autocomplete`, and `text-area`). The label
|
|
736
|
+
then rests inside an empty field and moves to a smaller top-left position
|
|
737
|
+
while focused or non-empty. Other controls keep the external label.
|
|
738
|
+
|
|
665
739
|
The label wraps the default slot for a best-effort visual/click
|
|
666
740
|
association only: every existing value-entry control encapsulates its
|
|
667
741
|
real `<input>` inside its own shadow DOM, so there is no light-DOM `id` a
|
|
@@ -673,9 +747,9 @@ shadow-encapsulated input for the same reason. The error message uses
|
|
|
673
747
|
|
|
674
748
|
Import: `import "@f-ewald/components/form-field.js";`
|
|
675
749
|
|
|
676
|
-
Properties: `label` (attribute `label`) : string, default ""; `hint` (attribute `hint`) : string, default ""; `error` (attribute `error`) : string, default ""; `required` (attribute `required`) : boolean, default false
|
|
750
|
+
Properties: `label` (attribute `label`) : string, default ""; `hint` (attribute `hint`) : string, default ""; `error` (attribute `error`) : string, default ""; `required` (attribute `required`) : boolean, default false; `floatingLabel` (attribute `floating-label`) : boolean, default false
|
|
677
751
|
Events: none
|
|
678
|
-
CSS custom properties: `--ui-danger`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-line-height-tight`, `--ui-text`, `--ui-text-muted`
|
|
752
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-medium`, `--ui-font-weight-regular`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface`, `--ui-text`, `--ui-text-muted`
|
|
679
753
|
|
|
680
754
|
Example:
|
|
681
755
|
```html
|
|
@@ -685,6 +759,12 @@ Example:
|
|
|
685
759
|
<form-field label="Terms" required error="You must accept to continue">
|
|
686
760
|
<ui-checkbox label="I agree to the terms"></ui-checkbox>
|
|
687
761
|
</form-field>
|
|
762
|
+
<form-field floating-label label="Email">
|
|
763
|
+
<input type="email" placeholder="name@example.com" />
|
|
764
|
+
</form-field>
|
|
765
|
+
<form-field floating-label label="Language">
|
|
766
|
+
<autocomplete-input clearable placeholder="Start typing…"></autocomplete-input>
|
|
767
|
+
</form-field>
|
|
688
768
|
```
|
|
689
769
|
|
|
690
770
|
## <form-select>
|
|
@@ -1810,16 +1890,19 @@ Plain multi-line text field — a thin, tokenized wrapper around a native
|
|
|
1810
1890
|
(autocomplete-input, form-select, ...). Not a rich editor; use `readonly`
|
|
1811
1891
|
to display pre-formatted text (e.g. an error message) that the user can
|
|
1812
1892
|
still select and copy, typically paired with `<copy-link-button>`.
|
|
1893
|
+
Supports `form-field`'s opt-in floating-label mode when slotted inside it.
|
|
1813
1894
|
|
|
1814
1895
|
Import: `import "@f-ewald/components/text-area.js";`
|
|
1815
1896
|
|
|
1816
1897
|
Properties: `value` (attribute `value`) : string, default ""; `rows` (attribute `rows`) : number, default 4; `placeholder` (attribute `placeholder`) : string, default ""; `readonly` (attribute `readonly`) : boolean, default false; `disabled` (attribute `disabled`) : boolean, default false
|
|
1817
1898
|
Events: `input`, `change`
|
|
1818
|
-
CSS custom properties: `--ui-border`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-line-height-normal`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`
|
|
1899
|
+
CSS custom properties: `--ui-border`, `--ui-danger`, `--ui-focus-ring`, `--ui-font`, `--ui-font-size-sm`, `--ui-font-size-xs`, `--ui-font-weight-regular`, `--ui-line-height-normal`, `--ui-line-height-tight`, `--ui-primary`, `--ui-radius-sm`, `--ui-surface`, `--ui-surface-muted`, `--ui-text`, `--ui-text-muted`
|
|
1819
1900
|
|
|
1820
1901
|
Example:
|
|
1821
1902
|
```html
|
|
1822
|
-
<
|
|
1903
|
+
<form-field floating-label label="Description">
|
|
1904
|
+
<text-area placeholder="Describe the issue…" rows="4"></text-area>
|
|
1905
|
+
</form-field>
|
|
1823
1906
|
<text-area readonly value="Error code: 429 - No deployments available for selected model."></text-area>
|
|
1824
1907
|
```
|
|
1825
1908
|
|