@florid-kit/components 2.1.6 → 2.3.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.
@@ -0,0 +1,37 @@
1
+ import { LitElement } from 'lit';
2
+ import { IconName } from '../assets/icons/icons';
3
+
4
+ declare const inputBaseClass: import('../behaviors/mixin').MixinReturn<typeof LitElement, import('../behaviors/element-internals.js').WithElementInternals>;
5
+ export declare class OccitaneInput extends inputBaseClass {
6
+ static readonly formAssociated = true;
7
+ label: string;
8
+ value: string;
9
+ placeholder: string;
10
+ helperText: string;
11
+ state: "default" | "error" | "success";
12
+ disabled: boolean;
13
+ leadingIcon: IconName | "";
14
+ trailingIcon: IconName | "";
15
+ name: string;
16
+ required: boolean;
17
+ clearLabel: string;
18
+ inputId: string;
19
+ private inputEl;
20
+ static shadowRootOptions: ShadowRootInit;
21
+ constructor();
22
+ static styles: import('lit').CSSResult;
23
+ updated(changed: Map<string, unknown>): void;
24
+ formResetCallback(): void;
25
+ private handleInput;
26
+ private handleChange;
27
+ private handleClear;
28
+ private renderHelperIcon;
29
+ private renderTrailingIcon;
30
+ render(): import('lit').TemplateResult<1>;
31
+ }
32
+ declare global {
33
+ interface HTMLElementTagNameMap {
34
+ "o-input": OccitaneInput;
35
+ }
36
+ }
37
+ export {};
@@ -0,0 +1,65 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ export interface SearchDropdownOption {
4
+ id: string;
5
+ value: string;
6
+ }
7
+ export declare class OccitaneSearchInputDropdown extends LitElement {
8
+ label: string;
9
+ value: string;
10
+ placeholder: string;
11
+ helperText: string;
12
+ state: "default" | "error" | "success";
13
+ disabled: boolean;
14
+ theme: "default" | "light";
15
+ options: SearchDropdownOption[];
16
+ searchBy: "id" | "value" | "both";
17
+ noResultsText: string;
18
+ onSelect?: (option: SearchDropdownOption) => void;
19
+ private open;
20
+ private filteredOptions;
21
+ private activeIndex;
22
+ private searchInputEl;
23
+ private readonly _listboxId;
24
+ static shadowRootOptions: ShadowRootInit;
25
+ static styles: import('lit').CSSResult;
26
+ connectedCallback(): void;
27
+ disconnectedCallback(): void;
28
+ private _handleOutsideClick;
29
+ /**
30
+ * Close the dropdown when focus has left the component entirely.
31
+ * We defer by one frame so focus can settle on the next element before we check.
32
+ */
33
+ private _handleFocusOut;
34
+ private filterOptions;
35
+ private handleSearch;
36
+ private selectOption;
37
+ private scrollActiveIntoView;
38
+ /**
39
+ * Keyboard handler while focus is in the search input.
40
+ *
41
+ * Arrow ↓/↑ — highlight options (active-descendant, focus stays in input)
42
+ * Enter — select highlighted option
43
+ * Escape — close dropdown
44
+ * Tab — browser handles naturally:
45
+ * input → clear button (×) → li[0] → … → li[n] → li[0] (loop)
46
+ */
47
+ private handleKeyDown;
48
+ /**
49
+ * Keyboard handler while focus is on a list item.
50
+ *
51
+ * Arrow ↓ — next item (wraps to first)
52
+ * Arrow ↑ — previous item; ArrowUp on first item returns to input
53
+ * Enter/Space — select the focused item
54
+ * Escape — close dropdown and return focus to input
55
+ * Tab — loop: last item → li[0], otherwise move to next item naturally
56
+ * Shift+Tab — browser handles naturally (previous li, or back to clear button / input)
57
+ */
58
+ private handleListKeyDown;
59
+ render(): import('lit').TemplateResult<1>;
60
+ }
61
+ declare global {
62
+ interface HTMLElementTagNameMap {
63
+ "o-search-input-dropdown": OccitaneSearchInputDropdown;
64
+ }
65
+ }
@@ -0,0 +1,25 @@
1
+ import { LitElement } from 'lit';
2
+
3
+ export declare class OccitaneSearchInput extends LitElement {
4
+ label: string;
5
+ value: string;
6
+ placeholder: string;
7
+ helperText: string;
8
+ state: "default" | "error" | "success";
9
+ disabled: boolean;
10
+ theme: "default" | "light";
11
+ trigger: "input" | "enter" | "change";
12
+ onSearch?: (value: string) => void;
13
+ static shadowRootOptions: ShadowRootInit;
14
+ static styles: import('lit').CSSResult;
15
+ private dispatchSearch;
16
+ private handleInput;
17
+ private handleKeyDown;
18
+ private handleChange;
19
+ render(): import('lit').TemplateResult<1>;
20
+ }
21
+ declare global {
22
+ interface HTMLElementTagNameMap {
23
+ "o-search-input": OccitaneSearchInput;
24
+ }
25
+ }
@@ -4,6 +4,8 @@ type Status = "empty" | "filled";
4
4
  export declare class OccitaneWishlistButton extends LitElement {
5
5
  static styles: import('lit').CSSResult;
6
6
  status: Status;
7
+ icon: string;
8
+ bgstyle: string;
7
9
  ariaDescribedBy: string;
8
10
  label: string;
9
11
  connectedCallback(): void;