@digdir/designsystemet-react 1.1.4 → 1.1.6
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/dist/cjs/components/breadcrumbs/index.js +6 -6
- package/dist/cjs/components/card/index.js +3 -3
- package/dist/cjs/components/chip/index.js +6 -6
- package/dist/cjs/components/details/index.js +4 -4
- package/dist/cjs/components/dialog/dialog.js +3 -2
- package/dist/cjs/components/dialog/index.js +5 -5
- package/dist/cjs/components/dropdown/dropdown-button.js +12 -0
- package/dist/cjs/components/dropdown/dropdown-heading.js +8 -0
- package/dist/cjs/components/dropdown/dropdown-item.js +12 -0
- package/dist/cjs/components/dropdown/dropdown-list.js +12 -0
- package/dist/cjs/components/dropdown/dropdown-trigger-context.js +9 -9
- package/dist/cjs/components/dropdown/dropdown-trigger.js +16 -0
- package/dist/cjs/components/dropdown/index.js +20 -9
- package/dist/cjs/components/error-summary/error-summary-heading.js +8 -0
- package/dist/cjs/components/error-summary/error-summary-item.js +4 -4
- package/dist/cjs/components/error-summary/error-summary-link.js +8 -1
- package/dist/cjs/components/error-summary/error-summary-list.js +15 -0
- package/dist/cjs/components/error-summary/index.js +6 -6
- package/dist/cjs/components/field/field-description.js +6 -0
- package/dist/cjs/components/field/field-observer.js +7 -5
- package/dist/cjs/components/field/index.js +6 -6
- package/dist/cjs/components/fieldset/fieldset-description.js +2 -2
- package/dist/cjs/components/fieldset/fieldset-legend.js +1 -1
- package/dist/cjs/components/fieldset/index.js +4 -4
- package/dist/cjs/components/list/index.js +5 -5
- package/dist/cjs/components/list/list-item.js +6 -0
- package/dist/cjs/components/list/lists.js +8 -8
- package/dist/cjs/components/pagination/index.js +5 -5
- package/dist/cjs/components/pagination/pagination-button.js +3 -3
- package/dist/cjs/components/pagination/pagination-item.js +5 -5
- package/dist/cjs/components/pagination/pagination-list.js +5 -5
- package/dist/cjs/components/popover/index.js +4 -4
- package/dist/cjs/components/popover/popover-trigger-context.js +3 -3
- package/dist/cjs/components/popover/popover-trigger.js +6 -6
- package/dist/cjs/components/search/index.js +5 -5
- package/dist/cjs/components/search/search-button.js +2 -2
- package/dist/cjs/components/search/search-clear.js +2 -2
- package/dist/cjs/components/search/search-input.js +1 -1
- package/dist/cjs/components/select/index.js +4 -4
- package/dist/cjs/components/select/select-optgroup.js +4 -4
- package/dist/cjs/components/select/select-option.js +2 -2
- package/dist/cjs/components/suggestion/suggestion-chips.js +6 -8
- package/dist/cjs/components/suggestion/suggestion-input.js +2 -5
- package/dist/cjs/components/suggestion/suggestion-list.js +5 -11
- package/dist/cjs/components/suggestion/suggestion-option.js +12 -0
- package/dist/cjs/components/suggestion/suggestion.js +28 -16
- package/dist/cjs/components/table/index.js +9 -9
- package/dist/cjs/components/table/table-body.js +6 -6
- package/dist/cjs/components/table/table-cell.js +1 -1
- package/dist/cjs/components/table/table-foot.js +6 -6
- package/dist/cjs/components/table/table-head.js +6 -6
- package/dist/cjs/components/table/table-header-cell.js +1 -1
- package/dist/cjs/components/table/table-row.js +4 -4
- package/dist/cjs/components/tabs/index.js +5 -5
- package/dist/cjs/components/tabs/tabs-list.js +4 -4
- package/dist/cjs/components/tabs/tabs-panel.js +1 -1
- package/dist/cjs/components/tabs/tabs-tab.js +1 -1
- package/dist/cjs/components/toggle-group/index.js +3 -3
- package/dist/cjs/components/toggle-group/toggle-group-item.js +1 -1
- package/dist/esm/components/breadcrumbs/index.js +7 -7
- package/dist/esm/components/card/index.js +4 -4
- package/dist/esm/components/checkbox/checkbox.js +2 -2
- package/dist/esm/components/chip/index.js +6 -6
- package/dist/esm/components/details/index.js +5 -5
- package/dist/esm/components/dialog/dialog.js +3 -2
- package/dist/esm/components/dialog/index.js +6 -6
- package/dist/esm/components/dropdown/dropdown-button.js +12 -0
- package/dist/esm/components/dropdown/dropdown-heading.js +8 -0
- package/dist/esm/components/dropdown/dropdown-item.js +12 -0
- package/dist/esm/components/dropdown/dropdown-list.js +12 -0
- package/dist/esm/components/dropdown/dropdown-trigger-context.js +9 -9
- package/dist/esm/components/dropdown/dropdown-trigger.js +16 -0
- package/dist/esm/components/dropdown/index.js +21 -10
- package/dist/esm/components/error-summary/error-summary-heading.js +8 -0
- package/dist/esm/components/error-summary/error-summary-item.js +4 -4
- package/dist/esm/components/error-summary/error-summary-link.js +8 -1
- package/dist/esm/components/error-summary/error-summary-list.js +17 -2
- package/dist/esm/components/error-summary/index.js +7 -7
- package/dist/esm/components/field/field-description.js +6 -0
- package/dist/esm/components/field/field-observer.js +7 -5
- package/dist/esm/components/field/index.js +7 -7
- package/dist/esm/components/fieldset/fieldset-description.js +2 -2
- package/dist/esm/components/fieldset/fieldset-legend.js +1 -1
- package/dist/esm/components/fieldset/index.js +5 -5
- package/dist/esm/components/list/index.js +5 -5
- package/dist/esm/components/list/list-item.js +6 -0
- package/dist/esm/components/list/lists.js +8 -8
- package/dist/esm/components/pagination/index.js +6 -6
- package/dist/esm/components/pagination/pagination-button.js +3 -3
- package/dist/esm/components/pagination/pagination-item.js +5 -5
- package/dist/esm/components/pagination/pagination-list.js +5 -5
- package/dist/esm/components/popover/index.js +5 -5
- package/dist/esm/components/popover/popover-trigger-context.js +3 -3
- package/dist/esm/components/popover/popover-trigger.js +6 -6
- package/dist/esm/components/radio/radio.js +2 -2
- package/dist/esm/components/search/index.js +6 -6
- package/dist/esm/components/search/search-button.js +2 -2
- package/dist/esm/components/search/search-clear.js +2 -2
- package/dist/esm/components/search/search-input.js +1 -1
- package/dist/esm/components/select/index.js +5 -5
- package/dist/esm/components/select/select-optgroup.js +4 -4
- package/dist/esm/components/select/select-option.js +2 -2
- package/dist/esm/components/suggestion/suggestion-chips.js +6 -8
- package/dist/esm/components/suggestion/suggestion-input.js +3 -6
- package/dist/esm/components/suggestion/suggestion-list.js +6 -12
- package/dist/esm/components/suggestion/suggestion-option.js +12 -0
- package/dist/esm/components/suggestion/suggestion.js +28 -16
- package/dist/esm/components/switch/switch.js +2 -2
- package/dist/esm/components/table/index.js +10 -10
- package/dist/esm/components/table/table-body.js +6 -6
- package/dist/esm/components/table/table-cell.js +1 -1
- package/dist/esm/components/table/table-foot.js +6 -6
- package/dist/esm/components/table/table-head.js +6 -6
- package/dist/esm/components/table/table-header-cell.js +1 -1
- package/dist/esm/components/table/table-row.js +4 -4
- package/dist/esm/components/tabs/index.js +6 -6
- package/dist/esm/components/tabs/tabs-list.js +4 -4
- package/dist/esm/components/tabs/tabs-panel.js +1 -1
- package/dist/esm/components/tabs/tabs-tab.js +1 -1
- package/dist/esm/components/textfield/textfield.js +2 -2
- package/dist/esm/components/toggle-group/index.js +4 -4
- package/dist/esm/components/toggle-group/toggle-group-item.js +1 -1
- package/dist/react-types.d.ts +1 -2
- package/dist/types/colors.d.ts +1 -23
- package/dist/types/colors.d.ts.map +1 -1
- package/dist/types/components/Combobox/Combobox.d.ts +2 -2
- package/dist/types/components/Combobox/useFormField/useFormField.d.ts +1 -1
- package/dist/types/components/Combobox/useFormField/useFormField.d.ts.map +1 -1
- package/dist/types/components/alert/alert.d.ts +1 -1
- package/dist/types/components/alert/alert.d.ts.map +1 -1
- package/dist/types/components/avatar/avatar.d.ts +2 -1
- package/dist/types/components/avatar/avatar.d.ts.map +1 -1
- package/dist/types/components/badge/badge.d.ts +1 -1
- package/dist/types/components/badge/badge.d.ts.map +1 -1
- package/dist/types/components/badge/index.d.ts +1 -1
- package/dist/types/components/breadcrumbs/index.d.ts +48 -12
- package/dist/types/components/breadcrumbs/index.d.ts.map +1 -1
- package/dist/types/components/button/button.d.ts +3 -3
- package/dist/types/components/button/button.d.ts.map +1 -1
- package/dist/types/components/card/index.d.ts +18 -10
- package/dist/types/components/card/index.d.ts.map +1 -1
- package/dist/types/components/chip/index.d.ts +33 -14
- package/dist/types/components/chip/index.d.ts.map +1 -1
- package/dist/types/components/details/index.d.ts +19 -7
- package/dist/types/components/details/index.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +1 -1
- package/dist/types/components/dialog/dialog.d.ts.map +1 -1
- package/dist/types/components/dialog/index.d.ts +46 -25
- package/dist/types/components/dialog/index.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-button.d.ts +12 -0
- package/dist/types/components/dropdown/dropdown-button.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-heading.d.ts +8 -0
- package/dist/types/components/dropdown/dropdown-heading.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-item.d.ts +12 -0
- package/dist/types/components/dropdown/dropdown-item.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-list.d.ts +12 -0
- package/dist/types/components/dropdown/dropdown-list.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-trigger-context.d.ts +9 -9
- package/dist/types/components/dropdown/dropdown-trigger.d.ts +16 -0
- package/dist/types/components/dropdown/dropdown-trigger.d.ts.map +1 -1
- package/dist/types/components/dropdown/index.d.ts +99 -19
- package/dist/types/components/dropdown/index.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-heading.d.ts +8 -0
- package/dist/types/components/error-summary/error-summary-heading.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-item.d.ts +4 -4
- package/dist/types/components/error-summary/error-summary-link.d.ts +8 -1
- package/dist/types/components/error-summary/error-summary-link.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-list.d.ts +15 -0
- package/dist/types/components/error-summary/error-summary-list.d.ts.map +1 -1
- package/dist/types/components/error-summary/index.d.ts +52 -20
- package/dist/types/components/error-summary/index.d.ts.map +1 -1
- package/dist/types/components/field/field-counter.d.ts +1 -1
- package/dist/types/components/field/field-description.d.ts +6 -0
- package/dist/types/components/field/field-description.d.ts.map +1 -1
- package/dist/types/components/field/field-observer.d.ts.map +1 -1
- package/dist/types/components/field/index.d.ts +45 -17
- package/dist/types/components/field/index.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset-description.d.ts +2 -2
- package/dist/types/components/fieldset/fieldset-legend.d.ts +1 -1
- package/dist/types/components/fieldset/index.d.ts +21 -9
- package/dist/types/components/fieldset/index.d.ts.map +1 -1
- package/dist/types/components/list/index.d.ts +32 -11
- package/dist/types/components/list/index.d.ts.map +1 -1
- package/dist/types/components/list/list-item.d.ts +6 -0
- package/dist/types/components/list/list-item.d.ts.map +1 -1
- package/dist/types/components/list/lists.d.ts +8 -8
- package/dist/types/components/pagination/index.d.ts +38 -15
- package/dist/types/components/pagination/index.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-button.d.ts +3 -3
- package/dist/types/components/pagination/pagination-item.d.ts +5 -5
- package/dist/types/components/pagination/pagination-list.d.ts +5 -5
- package/dist/types/components/popover/index.d.ts +39 -18
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover-trigger-context.d.ts +3 -3
- package/dist/types/components/popover/popover-trigger.d.ts +6 -6
- package/dist/types/components/popover/popover.d.ts +1 -1
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/search/index.d.ts +34 -15
- package/dist/types/components/search/index.d.ts.map +1 -1
- package/dist/types/components/search/search-button.d.ts +3 -3
- package/dist/types/components/search/search-clear.d.ts +2 -2
- package/dist/types/components/search/search-input.d.ts +1 -1
- package/dist/types/components/select/index.d.ts +27 -12
- package/dist/types/components/select/index.d.ts.map +1 -1
- package/dist/types/components/select/select-optgroup.d.ts +4 -4
- package/dist/types/components/select/select-option.d.ts +2 -2
- package/dist/types/components/suggestion/index.d.ts +71 -41
- package/dist/types/components/suggestion/index.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-chips.d.ts +6 -14
- package/dist/types/components/suggestion/suggestion-chips.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-input.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-list.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-option.d.ts +12 -0
- package/dist/types/components/suggestion/suggestion-option.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion.d.ts +79 -22
- package/dist/types/components/suggestion/suggestion.d.ts.map +1 -1
- package/dist/types/components/table/index.d.ts +65 -16
- package/dist/types/components/table/index.d.ts.map +1 -1
- package/dist/types/components/table/table-body.d.ts +6 -6
- package/dist/types/components/table/table-cell.d.ts +1 -1
- package/dist/types/components/table/table-foot.d.ts +6 -6
- package/dist/types/components/table/table-head.d.ts +6 -6
- package/dist/types/components/table/table-header-cell.d.ts +1 -1
- package/dist/types/components/table/table-row.d.ts +4 -4
- package/dist/types/components/tabs/index.d.ts +29 -14
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-list.d.ts +4 -4
- package/dist/types/components/tabs/tabs-panel.d.ts +1 -1
- package/dist/types/components/tabs/tabs-tab.d.ts +1 -1
- package/dist/types/components/tag/tag.d.ts +1 -1
- package/dist/types/components/tag/tag.d.ts.map +1 -1
- package/dist/types/components/toggle-group/index.d.ts +11 -11
- package/dist/types/components/toggle-group/index.d.ts.map +1 -1
- package/dist/types/components/toggle-group/toggle-group-item.d.ts +1 -1
- package/dist/types/components/validation-message/validation-message.d.ts +1 -1
- package/dist/types/components/validation-message/validation-message.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +2 -2
- package/package.json +9 -8
|
@@ -1,9 +1,77 @@
|
|
|
1
|
+
import { Suggestion as SuggestionRoot } from './suggestion';
|
|
1
2
|
import { SuggestionChips } from './suggestion-chips';
|
|
2
3
|
import { SuggestionClear } from './suggestion-clear';
|
|
3
4
|
import { SuggestionEmpty } from './suggestion-empty';
|
|
4
5
|
import { SuggestionInput } from './suggestion-input';
|
|
5
6
|
import { SuggestionList } from './suggestion-list';
|
|
6
7
|
import { SuggestionOption } from './suggestion-option';
|
|
8
|
+
type Suggestion = typeof SuggestionRoot & {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Suggestion.Chips is deprecated, use `renderSelected` on `Suggestion` instead
|
|
11
|
+
*/
|
|
12
|
+
Chips: typeof SuggestionChips;
|
|
13
|
+
/**
|
|
14
|
+
* Component that provides a Suggestion list.
|
|
15
|
+
*
|
|
16
|
+
* Place as a descendant of `Suggestion`
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <Suggestion>
|
|
20
|
+
* <Suggestion.Input />
|
|
21
|
+
* <Suggestion.List />
|
|
22
|
+
* </Suggestion>
|
|
23
|
+
*/
|
|
24
|
+
List: typeof SuggestionList;
|
|
25
|
+
/**
|
|
26
|
+
* Component that provides an input field for the Suggestion list.
|
|
27
|
+
*
|
|
28
|
+
* Place as a descendant of `Suggestion`
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* <Suggestion>
|
|
32
|
+
* <Suggestion.Input />
|
|
33
|
+
* <Suggestion.List />
|
|
34
|
+
* </Suggestion>
|
|
35
|
+
*/
|
|
36
|
+
Input: typeof SuggestionInput;
|
|
37
|
+
/**
|
|
38
|
+
* Component that provides an empty Suggestion list.
|
|
39
|
+
*
|
|
40
|
+
* Place as a descendant of `Suggestion.List`
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* <Suggestion.List>
|
|
44
|
+
* <Suggestion.Empty>Tomt</Suggestion.Empty>
|
|
45
|
+
* </Suggestion.List>
|
|
46
|
+
*/
|
|
47
|
+
Empty: typeof SuggestionEmpty;
|
|
48
|
+
/**
|
|
49
|
+
* A component for rendering individual options in the Suggestion list.
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* <Suggestion>
|
|
53
|
+
* <Suggestion.Input />
|
|
54
|
+
* <Suggestion.List>
|
|
55
|
+
* <Suggestion.Option value='Option 1'>Option 1</Suggestion.Option>
|
|
56
|
+
* <Suggestion.Option value='Option 2'>Option 2</Suggestion.Option>
|
|
57
|
+
* </Suggestion.List>
|
|
58
|
+
* </Suggestion>
|
|
59
|
+
*/
|
|
60
|
+
Option: typeof SuggestionOption;
|
|
61
|
+
/**
|
|
62
|
+
* Component that provides a clear button for the Suggestion input.
|
|
63
|
+
*
|
|
64
|
+
* Place as a descendant of `Suggestion`
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* <Suggestion>
|
|
68
|
+
* <Suggestion.Input />
|
|
69
|
+
* <Suggestion.Clear />
|
|
70
|
+
* <Suggestion.List />
|
|
71
|
+
* </Suggestion>
|
|
72
|
+
*/
|
|
73
|
+
Clear: typeof SuggestionClear;
|
|
74
|
+
};
|
|
7
75
|
/**
|
|
8
76
|
* A component that provides a suggestion list for an input field.
|
|
9
77
|
*
|
|
@@ -18,48 +86,10 @@ import { SuggestionOption } from './suggestion-option';
|
|
|
18
86
|
* </Suggestion.List>
|
|
19
87
|
* </Suggestion>
|
|
20
88
|
*/
|
|
21
|
-
declare const EXPERIMENTAL_Suggestion:
|
|
22
|
-
filter?: boolean | ((args: {
|
|
23
|
-
index: number;
|
|
24
|
-
label: string;
|
|
25
|
-
text: string;
|
|
26
|
-
value: string;
|
|
27
|
-
optionElement: HTMLOptionElement;
|
|
28
|
-
input: HTMLInputElement;
|
|
29
|
-
}) => boolean);
|
|
30
|
-
creatable?: boolean;
|
|
31
|
-
multiple?: boolean;
|
|
32
|
-
value?: import("./suggestion").SuggestionValues;
|
|
33
|
-
defaultValue?: import("./suggestion").SuggestionValues;
|
|
34
|
-
onValueChange?: (value: {
|
|
35
|
-
label: string;
|
|
36
|
-
value: string;
|
|
37
|
-
}[]) => void;
|
|
38
|
-
name?: string;
|
|
39
|
-
} & React.HTMLAttributes<import("@u-elements/u-combobox").UHTMLComboboxElement> & React.RefAttributes<import("@u-elements/u-combobox").UHTMLComboboxElement>> & {
|
|
40
|
-
Chips: {
|
|
41
|
-
({ render, }: import("./suggestion-chips").SuggestionChipsProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
displayName: string;
|
|
43
|
-
};
|
|
44
|
-
List: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDataListElement>, "singular" | "plural"> & {
|
|
45
|
-
singular?: string;
|
|
46
|
-
plural?: string;
|
|
47
|
-
} & React.RefAttributes<HTMLDataListElement>>;
|
|
48
|
-
Input: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "type">, "type" | "disabled" | "readOnly" | "size" | "role"> & {
|
|
49
|
-
type?: "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "month" | "number" | "password" | "radio" | "search" | "tel" | "text" | "time" | "url" | "week";
|
|
50
|
-
size?: number;
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
readOnly?: boolean;
|
|
53
|
-
role?: React.AriaRole | undefined;
|
|
54
|
-
} & React.RefAttributes<HTMLInputElement>>;
|
|
55
|
-
Empty: React.ForwardRefExoticComponent<import("../../types").DefaultProps & React.OptionHTMLAttributes<HTMLOptionElement> & React.RefAttributes<HTMLOptionElement>>;
|
|
56
|
-
Option: React.ForwardRefExoticComponent<React.OptionHTMLAttributes<HTMLOptionElement> & import("../../types").DefaultProps & React.RefAttributes<HTMLOptionElement>>;
|
|
57
|
-
Clear: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "children" | "variant"> & {
|
|
58
|
-
'aria-label'?: string;
|
|
59
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
60
|
-
};
|
|
89
|
+
declare const EXPERIMENTAL_Suggestion: Suggestion;
|
|
61
90
|
export { EXPERIMENTAL_Suggestion, SuggestionChips as EXPERIMENTAL_SuggestionChips, SuggestionList as EXPERIMENTAL_SuggestionList, SuggestionInput as EXPERIMENTAL_SuggestionInput, SuggestionEmpty as EXPERIMENTAL_SuggestionEmpty, SuggestionOption as EXPERIMENTAL_SuggestionOption, SuggestionClear as EXPERIMENTAL_SuggestionClear, };
|
|
62
|
-
export type { SuggestionProps, SuggestionValues
|
|
91
|
+
export type { SuggestionProps, SuggestionSelected, // Export SuggestionValues for easier useState
|
|
92
|
+
SuggestionSelected as SuggestionValues, } from './suggestion';
|
|
63
93
|
export type { SuggestionChipsProps } from './suggestion-chips';
|
|
64
94
|
export type { SuggestionClearProps } from './suggestion-clear';
|
|
65
95
|
export type { SuggestionEmptyProps } from './suggestion-empty';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,KAAK,UAAU,GAAG,OAAO,cAAc,GAAG;IACxC;;OAEG;IACH,KAAK,EAAE,OAAO,eAAe,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,IAAI,EAAE,OAAO,cAAc,CAAC;IAC5B;;;;;;;;;;OAUG;IACH,KAAK,EAAE,OAAO,eAAe,CAAC;IAC9B;;;;;;;;;OASG;IACH,KAAK,EAAE,OAAO,eAAe,CAAC;IAC9B;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,OAAO,gBAAgB,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,KAAK,EAAE,OAAO,eAAe,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,uBAAuB,EAAE,UAO7B,CAAC;AAUH,OAAO,EACL,uBAAuB,EACvB,eAAe,IAAI,4BAA4B,EAC/C,cAAc,IAAI,2BAA2B,EAC7C,eAAe,IAAI,4BAA4B,EAC/C,eAAe,IAAI,4BAA4B,EAC/C,gBAAgB,IAAI,6BAA6B,EACjD,eAAe,IAAI,4BAA4B,GAChD,CAAC;AACF,YAAY,EACV,eAAe,EACf,kBAAkB,EAAE,8CAA8C;AAClE,kBAAkB,IAAI,gBAAgB,GACvC,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
import type { HTMLAttributes
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
2
|
import type { DefaultProps } from '../../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
* @default ({ label }) => label
|
|
9
|
-
*/
|
|
10
|
-
render?: (args: {
|
|
11
|
-
label: string;
|
|
12
|
-
value: string;
|
|
13
|
-
}) => ReactNode;
|
|
14
|
-
}>;
|
|
3
|
+
export type SuggestionChipsProps = DefaultProps & HTMLAttributes<HTMLDivElement>;
|
|
4
|
+
/**
|
|
5
|
+
* @deprecated Suggestion.Chips is deprecated, use `renderSelected` on `Suggestion` instead
|
|
6
|
+
*/
|
|
15
7
|
export declare const SuggestionChips: {
|
|
16
|
-
(
|
|
8
|
+
(): null;
|
|
17
9
|
displayName: string;
|
|
18
10
|
};
|
|
19
11
|
//# sourceMappingURL=suggestion-chips.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-chips.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-chips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"suggestion-chips.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-chips.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAC7C,cAAc,CAAC,cAAc,CAAC,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,eAAe;;;CAK3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-input.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAI9C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QAEd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;;;;;;
|
|
1
|
+
{"version":3,"file":"suggestion-input.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-input.tsx"],"names":[],"mappings":"AACA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGxD,MAAM,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAI9C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,KAAK,CAAC,GAAG,CAAC;QAClB,UAAU,mBAAmB;YAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;IACD,UAAU,KAAK,CAAC;QAEd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,eAAe;;;;;;0CA2B1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-list.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,wBAAwB,CAAC;AAMhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"suggestion-list.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,wBAAwB,CAAC;AAMhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,YAAY,GAAG,cAAc,CAAC,mBAAmB,CAAC,EAClD;IACE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc;IAxBvB;;;OAGG;eACQ,MAAM;IACjB;;;OAGG;aACM,MAAM;6CAuDjB,CAAC"}
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { OptionHTMLAttributes } from 'react';
|
|
2
2
|
import type { DefaultProps } from '../../types';
|
|
3
3
|
export type SuggestionOptionProps = OptionHTMLAttributes<HTMLOptionElement> & DefaultProps;
|
|
4
|
+
/**
|
|
5
|
+
* A component for rendering individual options in the Suggestion list.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <Suggestion>
|
|
9
|
+
* <Suggestion.Input />
|
|
10
|
+
* <Suggestion.List>
|
|
11
|
+
* <Suggestion.Option value='Option 1'>Option 1</Suggestion.Option>
|
|
12
|
+
* <Suggestion.Option value='Option 2'>Option 2</Suggestion.Option>
|
|
13
|
+
* </Suggestion.List>
|
|
14
|
+
* </Suggestion>
|
|
15
|
+
*/
|
|
4
16
|
export declare const SuggestionOption: React.ForwardRefExoticComponent<OptionHTMLAttributes<HTMLOptionElement> & DefaultProps & React.RefAttributes<HTMLOptionElement>>;
|
|
5
17
|
//# sourceMappingURL=suggestion-option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion-option.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-option.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GACzE,YAAY,CAAC;AAEf,eAAO,MAAM,gBAAgB,kIAW3B,CAAC"}
|
|
1
|
+
{"version":3,"file":"suggestion-option.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion-option.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GACzE,YAAY,CAAC;AAEf;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,gBAAgB,kIAW3B,CAAC"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { type HTMLAttributes } from 'react';
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import '@u-elements/u-combobox';
|
|
3
3
|
import type { UHTMLComboboxElement } from '@u-elements/u-combobox';
|
|
4
|
-
export type
|
|
4
|
+
export type SuggestionSelected = Array<string | Partial<Item>> | string;
|
|
5
5
|
type Item = {
|
|
6
6
|
label: string;
|
|
7
7
|
value: string;
|
|
8
8
|
};
|
|
9
|
+
type EventBeforeMatch = Omit<CustomEvent<HTMLOptionElement | undefined>, 'currentTarget'> & {
|
|
10
|
+
currentTarget: UHTMLComboboxElement;
|
|
11
|
+
};
|
|
9
12
|
type Filter = (args: {
|
|
10
13
|
/**
|
|
11
14
|
* Index of the `option`
|
|
@@ -33,20 +36,16 @@ type Filter = (args: {
|
|
|
33
36
|
input: HTMLInputElement;
|
|
34
37
|
}) => boolean;
|
|
35
38
|
type SuggestionContextType = {
|
|
36
|
-
isEmpty?: boolean;
|
|
37
|
-
selectedItems?: Item[];
|
|
38
|
-
listId?: string;
|
|
39
|
-
setListId: (id: string) => void;
|
|
40
39
|
handleFilter: (input?: HTMLInputElement | null) => void;
|
|
40
|
+
isEmpty?: boolean;
|
|
41
|
+
uComboboxRef?: React.RefObject<UHTMLComboboxElement | null>;
|
|
41
42
|
};
|
|
42
43
|
export declare const SuggestionContext: React.Context<SuggestionContextType>;
|
|
43
44
|
export type SuggestionProps = {
|
|
44
45
|
/**
|
|
45
|
-
* Filter options
|
|
46
|
+
* Filter options; boolean or a custom callback.
|
|
46
47
|
*
|
|
47
|
-
*
|
|
48
|
-
* If false, the <datalist> will not handle filtering.
|
|
49
|
-
* If a custom callback, the callback will be used to filter the <option> elements.
|
|
48
|
+
* See {@link Filter} for the callback signature.
|
|
50
49
|
*
|
|
51
50
|
* @default true
|
|
52
51
|
*/
|
|
@@ -64,32 +63,60 @@ export type SuggestionProps = {
|
|
|
64
63
|
*/
|
|
65
64
|
multiple?: boolean;
|
|
66
65
|
/**
|
|
67
|
-
* The selected items of the
|
|
68
|
-
*
|
|
66
|
+
* The selected items of the Suggestion.
|
|
67
|
+
*
|
|
68
|
+
* If `label` and `value` is the same, you can use `string[]`.
|
|
69
|
+
*
|
|
70
|
+
* If `label` and `value` is different, you must use `{ value: string; label: string}[]`.
|
|
71
|
+
*
|
|
72
|
+
* Using this makes the component controlled and it must be used in combination with `onSelectedChange`.
|
|
73
|
+
*/
|
|
74
|
+
selected?: SuggestionSelected;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated Use `selected` instead
|
|
69
77
|
*/
|
|
70
|
-
value?:
|
|
78
|
+
value?: SuggestionSelected;
|
|
71
79
|
/**
|
|
72
80
|
* Default selected items when uncontrolled
|
|
73
81
|
*/
|
|
74
|
-
|
|
82
|
+
defaultSelected?: SuggestionSelected;
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated Use `defaultSelected` instead
|
|
85
|
+
*/
|
|
86
|
+
defaultValue?: SuggestionSelected;
|
|
75
87
|
/**
|
|
76
88
|
* Callback when selected items changes
|
|
77
89
|
*/
|
|
90
|
+
onSelectedChange?: (value: Item[]) => void;
|
|
91
|
+
/**
|
|
92
|
+
* @deprecated Use `onSelectedChange` instead
|
|
93
|
+
*/
|
|
78
94
|
onValueChange?: (value: Item[]) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Callback when matching input value against options
|
|
97
|
+
*/
|
|
98
|
+
onBeforeMatch?: (event: EventBeforeMatch) => void;
|
|
79
99
|
/**
|
|
80
100
|
* The name of the associated form control
|
|
81
101
|
*
|
|
82
102
|
* @default undefined
|
|
83
103
|
*/
|
|
84
104
|
name?: string;
|
|
105
|
+
/**
|
|
106
|
+
* Change how the selected options are rendered inside the `Chip`.
|
|
107
|
+
*
|
|
108
|
+
* @default ({ label }) => label
|
|
109
|
+
*/
|
|
110
|
+
renderSelected?: (args: {
|
|
111
|
+
label: string;
|
|
112
|
+
value: string;
|
|
113
|
+
}) => ReactNode;
|
|
85
114
|
} & HTMLAttributes<UHTMLComboboxElement>;
|
|
86
115
|
export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
87
116
|
/**
|
|
88
|
-
* Filter options
|
|
117
|
+
* Filter options; boolean or a custom callback.
|
|
89
118
|
*
|
|
90
|
-
*
|
|
91
|
-
* If false, the <datalist> will not handle filtering.
|
|
92
|
-
* If a custom callback, the callback will be used to filter the <option> elements.
|
|
119
|
+
* See {@link Filter} for the callback signature.
|
|
93
120
|
*
|
|
94
121
|
* @default true
|
|
95
122
|
*/
|
|
@@ -107,24 +134,54 @@ export declare const Suggestion: React.ForwardRefExoticComponent<{
|
|
|
107
134
|
*/
|
|
108
135
|
multiple?: boolean;
|
|
109
136
|
/**
|
|
110
|
-
* The selected items of the
|
|
111
|
-
*
|
|
137
|
+
* The selected items of the Suggestion.
|
|
138
|
+
*
|
|
139
|
+
* If `label` and `value` is the same, you can use `string[]`.
|
|
140
|
+
*
|
|
141
|
+
* If `label` and `value` is different, you must use `{ value: string; label: string}[]`.
|
|
142
|
+
*
|
|
143
|
+
* Using this makes the component controlled and it must be used in combination with `onSelectedChange`.
|
|
144
|
+
*/
|
|
145
|
+
selected?: SuggestionSelected;
|
|
146
|
+
/**
|
|
147
|
+
* @deprecated Use `selected` instead
|
|
112
148
|
*/
|
|
113
|
-
value?:
|
|
149
|
+
value?: SuggestionSelected;
|
|
114
150
|
/**
|
|
115
151
|
* Default selected items when uncontrolled
|
|
116
152
|
*/
|
|
117
|
-
|
|
153
|
+
defaultSelected?: SuggestionSelected;
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated Use `defaultSelected` instead
|
|
156
|
+
*/
|
|
157
|
+
defaultValue?: SuggestionSelected;
|
|
118
158
|
/**
|
|
119
159
|
* Callback when selected items changes
|
|
120
160
|
*/
|
|
161
|
+
onSelectedChange?: (value: Item[]) => void;
|
|
162
|
+
/**
|
|
163
|
+
* @deprecated Use `onSelectedChange` instead
|
|
164
|
+
*/
|
|
121
165
|
onValueChange?: (value: Item[]) => void;
|
|
166
|
+
/**
|
|
167
|
+
* Callback when matching input value against options
|
|
168
|
+
*/
|
|
169
|
+
onBeforeMatch?: (event: EventBeforeMatch) => void;
|
|
122
170
|
/**
|
|
123
171
|
* The name of the associated form control
|
|
124
172
|
*
|
|
125
173
|
* @default undefined
|
|
126
174
|
*/
|
|
127
175
|
name?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Change how the selected options are rendered inside the `Chip`.
|
|
178
|
+
*
|
|
179
|
+
* @default ({ label }) => label
|
|
180
|
+
*/
|
|
181
|
+
renderSelected?: (args: {
|
|
182
|
+
label: string;
|
|
183
|
+
value: string;
|
|
184
|
+
}) => ReactNode;
|
|
128
185
|
} & HTMLAttributes<UHTMLComboboxElement> & React.RefAttributes<UHTMLComboboxElement>>;
|
|
129
186
|
export {};
|
|
130
187
|
//# sourceMappingURL=suggestion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/suggestion/suggestion.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TableProps } from './table';
|
|
2
|
+
import { Table as TableRoot } from './table';
|
|
2
3
|
import type { TableBodyProps } from './table-body';
|
|
3
4
|
import { TableBody } from './table-body';
|
|
4
5
|
import type { TableCellProps } from './table-cell';
|
|
@@ -11,6 +12,68 @@ import type { TableHeaderCellProps } from './table-header-cell';
|
|
|
11
12
|
import { TableHeaderCell } from './table-header-cell';
|
|
12
13
|
import type { TableRowProps } from './table-row';
|
|
13
14
|
import { TableRow } from './table-row';
|
|
15
|
+
type Table = typeof TableRoot & {
|
|
16
|
+
/**
|
|
17
|
+
* TableHead component, used to display the header of a table. Renders a native HTML thead element.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <Table.Head>
|
|
21
|
+
* <Table.Row>
|
|
22
|
+
* <Table.HeaderCell>Name</Table.HeaderCell>
|
|
23
|
+
* <Table.HeaderCell>Age</Table.HeaderCell>
|
|
24
|
+
* </Table.Row>
|
|
25
|
+
* </Table.Head>
|
|
26
|
+
*/
|
|
27
|
+
Head: typeof TableHead;
|
|
28
|
+
/**
|
|
29
|
+
* Table.Body component, used to display the body of a table. Renders a native HTML tbody element.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <Table.Body>
|
|
33
|
+
* <Table.Row>
|
|
34
|
+
* <Table.Cell>John</Table.Cell>
|
|
35
|
+
* <Table.Cell>25</Table.Cell>
|
|
36
|
+
* </Table.Row>
|
|
37
|
+
* </Table.Body>
|
|
38
|
+
*/
|
|
39
|
+
Body: typeof TableBody;
|
|
40
|
+
/**
|
|
41
|
+
* Table.Row component, used to display the rows of a table. Renders a native HTML tr element.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* <Table.Row>
|
|
45
|
+
* <Table.Cell>John</Table.Cell>
|
|
46
|
+
* <Table.Cell>25</Table.Cell>
|
|
47
|
+
* </Table.Row>
|
|
48
|
+
*/
|
|
49
|
+
Row: typeof TableRow;
|
|
50
|
+
/**
|
|
51
|
+
* Table.Cell component, used to display the cells of a table. Renders a native HTML td element.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* <Table.Cell>John</Table.Cell>
|
|
55
|
+
*/
|
|
56
|
+
Cell: typeof TableCell;
|
|
57
|
+
/**
|
|
58
|
+
* Table.HeaderCell component, used to display the header cells of a table. Renders a native HTML th element.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* <Table.HeaderCell>Name</Table.HeaderCell>
|
|
62
|
+
*/
|
|
63
|
+
HeaderCell: typeof TableHeaderCell;
|
|
64
|
+
/**
|
|
65
|
+
* Table.Foot component, used to display the footer of a table. Renders a native HTML tfoot element.
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* <Table.Foot>
|
|
69
|
+
* <Table.Row>
|
|
70
|
+
* <Table.Cell>Total</Table.Cell>
|
|
71
|
+
* <Table.Cell>2</Table.Cell>
|
|
72
|
+
* </Table.Row>
|
|
73
|
+
* </Table.Foot>
|
|
74
|
+
*/
|
|
75
|
+
Foot: typeof TableFoot;
|
|
76
|
+
};
|
|
14
77
|
/**
|
|
15
78
|
* Table component, used to display tabular data. Renders a native HTML table element.
|
|
16
79
|
*
|
|
@@ -36,21 +99,7 @@ import { TableRow } from './table-row';
|
|
|
36
99
|
* </Table.Foot>
|
|
37
100
|
* </Table>
|
|
38
101
|
*/
|
|
39
|
-
declare const
|
|
40
|
-
|
|
41
|
-
stickyHeader?: boolean;
|
|
42
|
-
border?: boolean;
|
|
43
|
-
hover?: boolean;
|
|
44
|
-
} & Omit<React.TableHTMLAttributes<HTMLTableElement>, "border"> & import("../../types").DefaultProps & React.RefAttributes<HTMLTableElement>> & {
|
|
45
|
-
Head: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
46
|
-
Body: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
47
|
-
Row: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
48
|
-
Cell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
49
|
-
HeaderCell: React.ForwardRefExoticComponent<{
|
|
50
|
-
sort?: React.AriaAttributes["aria-sort"];
|
|
51
|
-
} & React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
52
|
-
Foot: React.ForwardRefExoticComponent<TableFootProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
53
|
-
};
|
|
54
|
-
export { Table, TableHead, TableBody, TableRow, TableCell, TableHeaderCell, TableFoot, };
|
|
102
|
+
declare const TableComponent: Table;
|
|
103
|
+
export { TableComponent as Table, TableHead, TableBody, TableRow, TableCell, TableHeaderCell, TableFoot, };
|
|
55
104
|
export type { TableProps, TableHeadProps, TableBodyProps, TableRowProps, TableCellProps, TableHeaderCellProps, TableFootProps, };
|
|
56
105
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,KAAK,KAAK,GAAG,OAAO,SAAS,GAAG;IAC9B;;;;;;;;;;OAUG;IACH,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB;;;;;;;;;;OAUG;IACH,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB;;;;;;;;OAQG;IACH,GAAG,EAAE,OAAO,QAAQ,CAAC;IACrB;;;;;OAKG;IACH,IAAI,EAAE,OAAO,SAAS,CAAC;IACvB;;;;;OAKG;IACH,UAAU,EAAE,OAAO,eAAe,CAAC;IACnC;;;;;;;;;;OAUG;IACH,IAAI,EAAE,OAAO,SAAS,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,QAAA,MAAM,cAAc,EAAE,KAOpB,CAAC;AAUH,OAAO,EACL,cAAc,IAAI,KAAK,EACvB,SAAS,EACT,SAAS,EACT,QAAQ,EACR,SAAS,EACT,eAAe,EACf,SAAS,GACV,CAAC;AACF,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,cAAc,GACf,CAAC"}
|
|
@@ -4,12 +4,12 @@ export type TableBodyProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
|
4
4
|
* TableBody component, used to display the body of a table. Renders a native HTML tbody element.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
-
* <
|
|
8
|
-
* <
|
|
9
|
-
* <
|
|
10
|
-
* <
|
|
11
|
-
* </
|
|
12
|
-
* </
|
|
7
|
+
* <TableBody>
|
|
8
|
+
* <TableRow>
|
|
9
|
+
* <TableCell>John</TableCell>
|
|
10
|
+
* <TableCell>25</TableCell>
|
|
11
|
+
* </TableRow>
|
|
12
|
+
* </TableBody>
|
|
13
13
|
*/
|
|
14
14
|
export declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
15
15
|
//# sourceMappingURL=table-body.d.ts.map
|
|
@@ -4,7 +4,7 @@ export type TableCellProps = TdHTMLAttributes<HTMLTableCellElement>;
|
|
|
4
4
|
* TableCell component, used to display the cells of a table. Renders a native HTML td element.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
-
* <
|
|
7
|
+
* <TableCell>John</TableCell>
|
|
8
8
|
*/
|
|
9
9
|
export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
10
10
|
//# sourceMappingURL=table-cell.d.ts.map
|
|
@@ -4,12 +4,12 @@ export type TableFootProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
|
4
4
|
* TableFoot component, used to display the footer of a table. Renders a native HTML tfoot element.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
-
* <
|
|
8
|
-
* <
|
|
9
|
-
* <
|
|
10
|
-
* <
|
|
11
|
-
* </
|
|
12
|
-
* </
|
|
7
|
+
* <TableFoot>
|
|
8
|
+
* <TableRow>
|
|
9
|
+
* <TableCell>Total</TableCell>
|
|
10
|
+
* <TableCell>2</TableCell>
|
|
11
|
+
* </TableRow>
|
|
12
|
+
* </TableFoot>
|
|
13
13
|
*/
|
|
14
14
|
export declare const TableFoot: React.ForwardRefExoticComponent<TableFootProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
15
15
|
//# sourceMappingURL=table-foot.d.ts.map
|
|
@@ -4,12 +4,12 @@ export type TableHeadProps = HTMLAttributes<HTMLTableSectionElement>;
|
|
|
4
4
|
* TableHead component, used to display the header of a table. Renders a native HTML thead element.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
-
* <
|
|
8
|
-
* <
|
|
9
|
-
* <
|
|
10
|
-
* <
|
|
11
|
-
* </
|
|
12
|
-
* </
|
|
7
|
+
* <TableHead>
|
|
8
|
+
* <TableRow>
|
|
9
|
+
* <TableHeaderCell>Name</TableHeaderCell>
|
|
10
|
+
* <TableHeaderCell>Age</TableHeaderCell>
|
|
11
|
+
* </TableRow>
|
|
12
|
+
* </TableHead>
|
|
13
13
|
*/
|
|
14
14
|
export declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableSectionElement>>;
|
|
15
15
|
//# sourceMappingURL=table-head.d.ts.map
|
|
@@ -11,7 +11,7 @@ export type TableHeaderCellProps = {
|
|
|
11
11
|
* TableHeaderCell component, used to display the header cells of a table. Renders a native HTML th element.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
|
-
* <
|
|
14
|
+
* <TableHeaderCell>Name</TableHeaderCell>
|
|
15
15
|
*/
|
|
16
16
|
export declare const TableHeaderCell: React.ForwardRefExoticComponent<{
|
|
17
17
|
/**
|
|
@@ -4,10 +4,10 @@ export type TableRowProps = HTMLAttributes<HTMLTableRowElement>;
|
|
|
4
4
|
* TableRow component, used to display the rows of a table. Renders a native HTML tr element.
|
|
5
5
|
*
|
|
6
6
|
* @example
|
|
7
|
-
* <
|
|
8
|
-
* <
|
|
9
|
-
* <
|
|
10
|
-
* </
|
|
7
|
+
* <TableRow>
|
|
8
|
+
* <TableCell>John</TableCell>
|
|
9
|
+
* <TableCell>25</TableCell>
|
|
10
|
+
* </TableRow>
|
|
11
11
|
*/
|
|
12
12
|
export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
13
13
|
//# sourceMappingURL=table-row.d.ts.map
|