@digdir/designsystemet-react 1.5.1 → 1.6.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/dist/cjs/components/button/button.js +1 -1
- package/dist/cjs/components/suggestion/suggestion.js +3 -3
- package/dist/cjs/components/textfield/textfield.js +1 -1
- package/dist/cjs/components/toggle-group/toggle-group-item.js +2 -2
- package/dist/cjs/components/toggle-group/toggle-group.js +3 -2
- package/dist/cjs/components/toggle-group/use-toggle-groupitem.js +2 -0
- package/dist/cjs/utilities/hooks/use-pagination/use-pagination.js +2 -2
- package/dist/esm/components/button/button.js +1 -1
- package/dist/esm/components/suggestion/suggestion.js +3 -3
- package/dist/esm/components/textfield/textfield.js +1 -1
- package/dist/esm/components/toggle-group/toggle-group-item.js +2 -2
- package/dist/esm/components/toggle-group/toggle-group.js +3 -2
- package/dist/esm/components/toggle-group/use-toggle-groupitem.js +2 -0
- package/dist/esm/utilities/hooks/use-pagination/use-pagination.js +2 -2
- package/dist/types/components/Combobox/Combobox.d.ts +4 -4
- package/dist/types/components/Combobox/Combobox.d.ts.map +1 -1
- package/dist/types/components/Combobox/ComboboxContext.d.ts +1 -1
- package/dist/types/components/Combobox/ComboboxContext.d.ts.map +1 -1
- package/dist/types/components/Combobox/ComboboxIdContext.d.ts +2 -2
- package/dist/types/components/Combobox/ComboboxIdContext.d.ts.map +1 -1
- package/dist/types/components/Combobox/Custom.d.ts +1 -1
- package/dist/types/components/Combobox/Custom.d.ts.map +1 -1
- package/dist/types/components/Combobox/Empty.d.ts +1 -1
- package/dist/types/components/Combobox/Empty.d.ts.map +1 -1
- package/dist/types/components/Combobox/Option/Description.d.ts +1 -1
- package/dist/types/components/Combobox/Option/Description.d.ts.map +1 -1
- package/dist/types/components/Combobox/Option/Option.d.ts +2 -2
- package/dist/types/components/Combobox/Option/Option.d.ts.map +1 -1
- package/dist/types/components/Combobox/internal/ComboboxClearButton.d.ts +1 -1
- package/dist/types/components/Combobox/internal/ComboboxClearButton.d.ts.map +1 -1
- package/dist/types/components/Combobox/useCombobox.d.ts +3 -3
- package/dist/types/components/Combobox/useFormField/FieldsetContext.d.ts +1 -1
- package/dist/types/components/Combobox/useFormField/FieldsetContext.d.ts.map +1 -1
- package/dist/types/components/alert/alert.d.ts +2 -2
- package/dist/types/components/alert/alert.d.ts.map +1 -1
- package/dist/types/components/avatar/avatar.d.ts +8 -27
- package/dist/types/components/avatar/avatar.d.ts.map +1 -1
- package/dist/types/components/badge/badge-position.d.ts +2 -2
- package/dist/types/components/badge/badge-position.d.ts.map +1 -1
- package/dist/types/components/badge/badge.d.ts +2 -2
- package/dist/types/components/badge/badge.d.ts.map +1 -1
- package/dist/types/components/badge/index.d.ts +4 -4
- package/dist/types/components/breadcrumbs/breadcrumbs-item.d.ts +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs-item.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs-link.d.ts +3 -3
- package/dist/types/components/breadcrumbs/breadcrumbs-link.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs-list.d.ts +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs-list.d.ts.map +1 -1
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +2 -2
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/types/components/button/button.d.ts +4 -2
- package/dist/types/components/button/button.d.ts.map +1 -1
- package/dist/types/components/card/card-block.d.ts +2 -2
- package/dist/types/components/card/card-block.d.ts.map +1 -1
- package/dist/types/components/card/card.d.ts +2 -2
- package/dist/types/components/card/card.d.ts.map +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/components/chip/chips.d.ts +4 -4
- package/dist/types/components/chip/chips.d.ts.map +1 -1
- package/dist/types/components/details/details-content.d.ts +1 -1
- package/dist/types/components/details/details-content.d.ts.map +1 -1
- package/dist/types/components/details/details-summary.d.ts +2 -2
- package/dist/types/components/details/details-summary.d.ts.map +1 -1
- package/dist/types/components/details/details.d.ts +1 -1
- package/dist/types/components/details/details.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-block.d.ts +2 -2
- package/dist/types/components/dialog/dialog-block.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger-context.d.ts +1 -1
- package/dist/types/components/dialog/dialog-trigger-context.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog-trigger.d.ts +4 -4
- package/dist/types/components/dialog/dialog-trigger.d.ts.map +1 -1
- package/dist/types/components/dialog/dialog.d.ts +2 -2
- package/dist/types/components/dialog/dialog.d.ts.map +1 -1
- package/dist/types/components/divider/divider.d.ts +1 -1
- package/dist/types/components/divider/divider.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-button.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown-button.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-heading.d.ts +2 -2
- package/dist/types/components/dropdown/dropdown-heading.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-item.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown-item.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-list.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown-list.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown-trigger.d.ts +1 -1
- package/dist/types/components/dropdown/dropdown-trigger.d.ts.map +1 -1
- package/dist/types/components/dropdown/dropdown.d.ts +2 -2
- package/dist/types/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-heading.d.ts +2 -2
- 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 +2 -2
- package/dist/types/components/error-summary/error-summary-item.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary-link.d.ts +3 -3
- 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 +2 -2
- package/dist/types/components/error-summary/error-summary-list.d.ts.map +1 -1
- package/dist/types/components/error-summary/error-summary.d.ts +3 -3
- package/dist/types/components/error-summary/error-summary.d.ts.map +1 -1
- package/dist/types/components/field/field-affix.d.ts +2 -2
- package/dist/types/components/field/field-affix.d.ts.map +1 -1
- package/dist/types/components/field/field-counter.d.ts +3 -3
- package/dist/types/components/field/field-counter.d.ts.map +1 -1
- package/dist/types/components/field/field-description.d.ts +1 -1
- package/dist/types/components/field/field-description.d.ts.map +1 -1
- package/dist/types/components/field/field.d.ts +2 -2
- package/dist/types/components/field/field.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset-description.d.ts +2 -2
- package/dist/types/components/fieldset/fieldset-description.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset-legend.d.ts +1 -1
- package/dist/types/components/fieldset/fieldset-legend.d.ts.map +1 -1
- package/dist/types/components/fieldset/fieldset.d.ts +1 -1
- package/dist/types/components/fieldset/fieldset.d.ts.map +1 -1
- package/dist/types/components/heading/heading.d.ts +2 -2
- package/dist/types/components/heading/heading.d.ts.map +1 -1
- package/dist/types/components/input/input.d.ts +2 -2
- package/dist/types/components/input/input.d.ts.map +1 -1
- package/dist/types/components/label/label.d.ts +2 -2
- package/dist/types/components/label/label.d.ts.map +1 -1
- package/dist/types/components/link/link.d.ts +2 -2
- package/dist/types/components/link/link.d.ts.map +1 -1
- package/dist/types/components/list/list-item.d.ts +2 -2
- package/dist/types/components/list/list-item.d.ts.map +1 -1
- package/dist/types/components/list/lists.d.ts +4 -4
- package/dist/types/components/list/lists.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-button.d.ts +2 -2
- package/dist/types/components/pagination/pagination-button.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-item.d.ts +2 -2
- package/dist/types/components/pagination/pagination-item.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination-list.d.ts +2 -2
- package/dist/types/components/pagination/pagination-list.d.ts.map +1 -1
- package/dist/types/components/pagination/pagination.d.ts +2 -2
- package/dist/types/components/pagination/pagination.d.ts.map +1 -1
- package/dist/types/components/paragraph/paragraph.d.ts +2 -2
- package/dist/types/components/paragraph/paragraph.d.ts.map +1 -1
- package/dist/types/components/popover/popover-trigger-context.d.ts +1 -1
- package/dist/types/components/popover/popover-trigger.d.ts +1 -1
- package/dist/types/components/popover/popover-trigger.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +2 -2
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/radio/radio.d.ts +1 -1
- package/dist/types/components/radio/radio.d.ts.map +1 -1
- package/dist/types/components/search/search-button.d.ts +3 -3
- package/dist/types/components/search/search-button.d.ts.map +1 -1
- package/dist/types/components/search/search-clear.d.ts +2 -2
- package/dist/types/components/search/search-clear.d.ts.map +1 -1
- package/dist/types/components/search/search-input.d.ts +1 -1
- package/dist/types/components/search/search-input.d.ts.map +1 -1
- package/dist/types/components/search/search.d.ts +1 -1
- package/dist/types/components/search/search.d.ts.map +1 -1
- package/dist/types/components/select/select-optgroup.d.ts +2 -2
- package/dist/types/components/select/select-optgroup.d.ts.map +1 -1
- package/dist/types/components/select/select-option.d.ts +2 -2
- package/dist/types/components/select/select-option.d.ts.map +1 -1
- package/dist/types/components/select/select.d.ts +2 -2
- package/dist/types/components/select/select.d.ts.map +1 -1
- package/dist/types/components/skeleton/skeleton.d.ts +2 -2
- package/dist/types/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/types/components/skip-link/skip-link.d.ts +2 -2
- package/dist/types/components/skip-link/skip-link.d.ts.map +1 -1
- package/dist/types/components/spinner/spinner.d.ts +1 -2
- package/dist/types/components/spinner/spinner.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-clear.d.ts +2 -2
- package/dist/types/components/suggestion/suggestion-clear.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-empty.d.ts +1 -1
- package/dist/types/components/suggestion/suggestion-empty.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-input.d.ts +3 -3
- package/dist/types/components/suggestion/suggestion-input.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-list.d.ts +2 -2
- package/dist/types/components/suggestion/suggestion-list.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion-option.d.ts +1 -1
- package/dist/types/components/suggestion/suggestion-option.d.ts.map +1 -1
- package/dist/types/components/suggestion/suggestion.d.ts +2 -2
- package/dist/types/components/suggestion/suggestion.d.ts.map +1 -1
- package/dist/types/components/switch/switch.d.ts +1 -1
- package/dist/types/components/switch/switch.d.ts.map +1 -1
- package/dist/types/components/table/table-body.d.ts +1 -1
- package/dist/types/components/table/table-body.d.ts.map +1 -1
- package/dist/types/components/table/table-cell.d.ts +1 -1
- package/dist/types/components/table/table-cell.d.ts.map +1 -1
- package/dist/types/components/table/table-foot.d.ts +1 -1
- package/dist/types/components/table/table-foot.d.ts.map +1 -1
- package/dist/types/components/table/table-head.d.ts +1 -1
- package/dist/types/components/table/table-head.d.ts.map +1 -1
- package/dist/types/components/table/table-header-cell.d.ts +2 -2
- package/dist/types/components/table/table-header-cell.d.ts.map +1 -1
- package/dist/types/components/table/table-row.d.ts +1 -1
- package/dist/types/components/table/table-row.d.ts.map +1 -1
- package/dist/types/components/table/table.d.ts +2 -2
- package/dist/types/components/table/table.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-list.d.ts +1 -1
- package/dist/types/components/tabs/tabs-list.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-panel.d.ts +2 -2
- package/dist/types/components/tabs/tabs-panel.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs-tab.d.ts +2 -2
- package/dist/types/components/tabs/tabs-tab.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs.d.ts +3 -3
- package/dist/types/components/tabs/tabs.d.ts.map +1 -1
- package/dist/types/components/tag/tag.d.ts +2 -2
- package/dist/types/components/tag/tag.d.ts.map +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts.map +1 -1
- package/dist/types/components/textfield/textfield.d.ts +1 -1
- package/dist/types/components/textfield/textfield.d.ts.map +1 -1
- package/dist/types/components/toggle-group/toggle-group-item.d.ts +2 -2
- package/dist/types/components/toggle-group/toggle-group-item.d.ts.map +1 -1
- package/dist/types/components/toggle-group/toggle-group.d.ts +14 -3
- package/dist/types/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/types/components/toggle-group/use-toggle-groupitem.d.ts +1 -0
- package/dist/types/components/toggle-group/use-toggle-groupitem.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/components/validation-message/validation-message.d.ts +2 -2
- package/dist/types/components/validation-message/validation-message.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-synchronized-animation/use-synchronized-animation.d.ts +1 -1
- package/dist/types/utilities/hooks/use-synchronized-animation/use-synchronized-animation.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/roving-focus-item.d.ts +2 -2
- package/dist/types/utilities/roving-focus/roving-focus-item.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/roving-focus-root.d.ts +3 -3
- package/dist/types/utilities/roving-focus/roving-focus-root.d.ts.map +1 -1
- package/dist/types/utilities/roving-focus/use-roving-focus.d.ts +170 -170
- package/package.json +18 -19
|
@@ -19,7 +19,7 @@ const Button = react.forwardRef(function Button({ asChild, className, children,
|
|
|
19
19
|
return (jsxRuntime.jsxs(Component, { "aria-busy": Boolean(loading) || undefined, "aria-disabled": Boolean(loading) || undefined, className: cl('ds-button', className), "data-icon": icon || undefined, "data-variant": variant, ref: ref,
|
|
20
20
|
/* don't set type when we use `asChild` */
|
|
21
21
|
type: asChild ? undefined : 'button', ...rest, children: [loading === true ? (jsxRuntime.jsx(spinner.Spinner, { "aria-hidden": 'true' })) : (loading // Allow custom loading spinner
|
|
22
|
-
), jsxRuntime.jsx(reactSlot.Slottable, { children: children })] }));
|
|
22
|
+
), jsxRuntime.jsx(reactSlot.Slottable, { children: icon && loading ? null : children })] }));
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.Button = Button;
|
|
@@ -8,9 +8,6 @@ var cl = require('clsx/lite');
|
|
|
8
8
|
var index = require('../chip/index.js');
|
|
9
9
|
var useMergeRefs = require('../../utilities/hooks/use-merge-refs/use-merge-refs.js');
|
|
10
10
|
|
|
11
|
-
const SuggestionContext = react.createContext({
|
|
12
|
-
handleFilter: () => undefined,
|
|
13
|
-
});
|
|
14
11
|
const text = (el) => el.textContent?.trim() || '';
|
|
15
12
|
const sanitizeItems = (values = []) => typeof values === 'string'
|
|
16
13
|
? [{ label: values, value: values }]
|
|
@@ -83,6 +80,9 @@ const Suggestion = react.forwardRef(function Suggestion({ children, className, c
|
|
|
83
80
|
}, [filter]);
|
|
84
81
|
return (jsxRuntime.jsx(SuggestionContext.Provider, { value: { isEmpty, handleFilter, uComboboxRef }, children: jsxRuntime.jsxs("u-combobox", { "data-multiple": multiple || undefined, "data-creatable": creatable || undefined, class: cl('ds-suggestion', className), ref: mergedRefs, ...rest, children: [selectedItems.map((item) => (jsxRuntime.jsx(index.Chip.Removable, { value: item.value, asChild: true, children: jsxRuntime.jsx("data", { children: renderSelected(item) }) }, item.value))), children, !!name && (jsxRuntime.jsx("select", { name: name, multiple: true, hidden: true, id: selectId }))] }) }));
|
|
85
82
|
});
|
|
83
|
+
const SuggestionContext = react.createContext({
|
|
84
|
+
handleFilter: () => undefined,
|
|
85
|
+
});
|
|
86
86
|
|
|
87
87
|
exports.Suggestion = Suggestion;
|
|
88
88
|
exports.SuggestionContext = SuggestionContext;
|
|
@@ -21,7 +21,7 @@ var fieldAffix = require('../field/field-affix.js');
|
|
|
21
21
|
* <Textfield label="Textfield label">
|
|
22
22
|
*/
|
|
23
23
|
const Textfield = react.forwardRef(function Textfield({ label: label$1, description, error, multiline, prefix, suffix, 'data-size': size, counter, style, className, ...rest }, ref) {
|
|
24
|
-
return (jsxRuntime.jsxs(index.Field, { className: className, "data-size": size, style: style, children: [!!label$1 && jsxRuntime.jsx(label.Label, { children: label$1 }), !!description && jsxRuntime.jsx(fieldDescription.FieldDescription, { children: description }), jsxRuntime.jsxs(fieldAffix.FieldAffixes, { children: [prefix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: prefix }), multiline === true ? (jsxRuntime.jsx(textarea.Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsxRuntime.jsx(input.Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: suffix })] }), !!
|
|
24
|
+
return (jsxRuntime.jsxs(index.Field, { className: className, "data-size": size, style: style, children: [!!label$1 && jsxRuntime.jsx(label.Label, { children: label$1 }), !!description && jsxRuntime.jsx(fieldDescription.FieldDescription, { children: description }), jsxRuntime.jsxs(fieldAffix.FieldAffixes, { children: [prefix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: prefix }), multiline === true ? (jsxRuntime.jsx(textarea.Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsxRuntime.jsx(input.Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsxRuntime.jsx(fieldAffix.FieldAffix, { children: suffix })] }), !!counter && (jsxRuntime.jsx(index.Field.Counter, { ...(typeof counter === 'number' ? { limit: counter } : counter) })), !!error && jsxRuntime.jsx(validationMessage.ValidationMessage, { children: error })] }));
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
exports.Textfield = Textfield;
|
|
@@ -13,8 +13,8 @@ var useToggleGroupitem = require('./use-toggle-groupitem.js');
|
|
|
13
13
|
* <ToggleGroupItem value='1'>Toggle 1</ToggleGroupItem>
|
|
14
14
|
*/
|
|
15
15
|
const ToggleGroupItem = react.forwardRef(function ToggleGroupItem(rest, ref) {
|
|
16
|
-
const { active, buttonProps, value } = useToggleGroupitem.useToggleGroupItem(rest);
|
|
17
|
-
return (jsxRuntime.jsx(rovingFocusItem.RovingFocusItem, { asChild: true, value: value, children: jsxRuntime.jsx(button.Button, { variant: active ?
|
|
16
|
+
const { active, buttonProps, value, variant } = useToggleGroupitem.useToggleGroupItem(rest);
|
|
17
|
+
return (jsxRuntime.jsx(rovingFocusItem.RovingFocusItem, { asChild: true, value: value, children: jsxRuntime.jsx(button.Button, { variant: active ? variant : 'tertiary', ref: ref, ...rest, ...buttonProps }) }));
|
|
18
18
|
});
|
|
19
19
|
|
|
20
20
|
exports.ToggleGroupItem = ToggleGroupItem;
|
|
@@ -17,7 +17,7 @@ const ToggleGroupContext = react.createContext({});
|
|
|
17
17
|
* <ToggleGroup.Item value='3'>Toggle 3</ToggleGroup.Item>
|
|
18
18
|
* </ToggleGroup>
|
|
19
19
|
*/
|
|
20
|
-
const ToggleGroup = react.forwardRef(function ToggleGroup({ children, value, defaultValue, onChange, name, className, ...rest }, ref) {
|
|
20
|
+
const ToggleGroup = react.forwardRef(function ToggleGroup({ children, variant = 'primary', value, defaultValue, onChange, name, className, ...rest }, ref) {
|
|
21
21
|
const nameId = react.useId();
|
|
22
22
|
const isControlled = value !== undefined;
|
|
23
23
|
const [uncontrolledValue, setUncontrolledValue] = react.useState(defaultValue);
|
|
@@ -30,11 +30,12 @@ const ToggleGroup = react.forwardRef(function ToggleGroup({ children, value, def
|
|
|
30
30
|
value = uncontrolledValue;
|
|
31
31
|
}
|
|
32
32
|
return (jsxRuntime.jsx(ToggleGroupContext.Provider, { value: {
|
|
33
|
+
variant,
|
|
33
34
|
value,
|
|
34
35
|
defaultValue,
|
|
35
36
|
name: name ?? `togglegroup-name-${nameId}`,
|
|
36
37
|
onChange: onValueChange,
|
|
37
|
-
}, children: jsxRuntime.jsx(rovingFocusRoot.RovingFocusRoot, { asChild: true, activeValue: value, orientation: 'ambiguous', children: jsxRuntime.jsxs("div", { className: cl('ds-toggle-group', className), role: 'radiogroup', ref: ref, ...rest, children: [name && jsxRuntime.jsx("input", { type: 'hidden', name: name, value: value }), children] }) }) }));
|
|
38
|
+
}, children: jsxRuntime.jsx(rovingFocusRoot.RovingFocusRoot, { asChild: true, activeValue: value, orientation: 'ambiguous', children: jsxRuntime.jsxs("div", { className: cl('ds-toggle-group', className), role: 'radiogroup', "data-variant": variant, ref: ref, ...rest, children: [name && jsxRuntime.jsx("input", { type: 'hidden', name: name, value: value }), children] }) }) }));
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
exports.ToggleGroup = ToggleGroup;
|
|
@@ -11,11 +11,13 @@ const useToggleGroupItem = (props) => {
|
|
|
11
11
|
const toggleGroup$1 = react.useContext(toggleGroup.ToggleGroupContext);
|
|
12
12
|
const value = props.value ?? genValue;
|
|
13
13
|
const active = toggleGroup$1.value === value;
|
|
14
|
+
const variant = toggleGroup$1.variant;
|
|
14
15
|
const buttonId = `togglegroup-item-${react.useId()}`;
|
|
15
16
|
return {
|
|
16
17
|
...rest,
|
|
17
18
|
active: active,
|
|
18
19
|
value,
|
|
20
|
+
variant,
|
|
19
21
|
buttonProps: {
|
|
20
22
|
id: buttonId,
|
|
21
23
|
'aria-checked': active,
|
|
@@ -77,13 +77,13 @@ const usePagination = ({ currentPage = 1, setCurrentPage, onChange, totalPages =
|
|
|
77
77
|
})),
|
|
78
78
|
/** Properties to spread on Pagination.Button used for previous naviagation */
|
|
79
79
|
prevButtonProps: {
|
|
80
|
-
'aria-
|
|
80
|
+
'aria-hidden': !hasPrev, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
81
81
|
onClick: handleClick(currentPage - 1),
|
|
82
82
|
variant: 'tertiary',
|
|
83
83
|
},
|
|
84
84
|
/** Properties to spread on Pagination.Button used for next naviagation */
|
|
85
85
|
nextButtonProps: {
|
|
86
|
-
'aria-
|
|
86
|
+
'aria-hidden': !hasNext, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
87
87
|
onClick: handleClick(currentPage + 1),
|
|
88
88
|
variant: 'tertiary',
|
|
89
89
|
},
|
|
@@ -17,7 +17,7 @@ const Button = forwardRef(function Button({ asChild, className, children, icon =
|
|
|
17
17
|
return (jsxs(Component, { "aria-busy": Boolean(loading) || undefined, "aria-disabled": Boolean(loading) || undefined, className: cl('ds-button', className), "data-icon": icon || undefined, "data-variant": variant, ref: ref,
|
|
18
18
|
/* don't set type when we use `asChild` */
|
|
19
19
|
type: asChild ? undefined : 'button', ...rest, children: [loading === true ? (jsx(Spinner, { "aria-hidden": 'true' })) : (loading // Allow custom loading spinner
|
|
20
|
-
), jsx(Slottable, { children: children })] }));
|
|
20
|
+
), jsx(Slottable, { children: icon && loading ? null : children })] }));
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
export { Button };
|
|
@@ -6,9 +6,6 @@ import cl from 'clsx/lite';
|
|
|
6
6
|
import { Chip as ChipComponent } from '../chip/index.js';
|
|
7
7
|
import { useMergeRefs } from '../../utilities/hooks/use-merge-refs/use-merge-refs.js';
|
|
8
8
|
|
|
9
|
-
const SuggestionContext = createContext({
|
|
10
|
-
handleFilter: () => undefined,
|
|
11
|
-
});
|
|
12
9
|
const text = (el) => el.textContent?.trim() || '';
|
|
13
10
|
const sanitizeItems = (values = []) => typeof values === 'string'
|
|
14
11
|
? [{ label: values, value: values }]
|
|
@@ -81,5 +78,8 @@ const Suggestion = forwardRef(function Suggestion({ children, className, creatab
|
|
|
81
78
|
}, [filter]);
|
|
82
79
|
return (jsx(SuggestionContext.Provider, { value: { isEmpty, handleFilter, uComboboxRef }, children: jsxs("u-combobox", { "data-multiple": multiple || undefined, "data-creatable": creatable || undefined, class: cl('ds-suggestion', className), ref: mergedRefs, ...rest, children: [selectedItems.map((item) => (jsx(ChipComponent.Removable, { value: item.value, asChild: true, children: jsx("data", { children: renderSelected(item) }) }, item.value))), children, !!name && (jsx("select", { name: name, multiple: true, hidden: true, id: selectId }))] }) }));
|
|
83
80
|
});
|
|
81
|
+
const SuggestionContext = createContext({
|
|
82
|
+
handleFilter: () => undefined,
|
|
83
|
+
});
|
|
84
84
|
|
|
85
85
|
export { Suggestion, SuggestionContext };
|
|
@@ -19,7 +19,7 @@ import { FieldAffixes, FieldAffix } from '../field/field-affix.js';
|
|
|
19
19
|
* <Textfield label="Textfield label">
|
|
20
20
|
*/
|
|
21
21
|
const Textfield = forwardRef(function Textfield({ label, description, error, multiline, prefix, suffix, 'data-size': size, counter, style, className, ...rest }, ref) {
|
|
22
|
-
return (jsxs(FieldComponent, { className: className, "data-size": size, style: style, children: [!!label && jsx(Label, { children: label }), !!description && jsx(FieldDescription, { children: description }), jsxs(FieldAffixes, { children: [prefix === undefined || jsx(FieldAffix, { children: prefix }), multiline === true ? (jsx(Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsx(Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsx(FieldAffix, { children: suffix })] }), !!
|
|
22
|
+
return (jsxs(FieldComponent, { className: className, "data-size": size, style: style, children: [!!label && jsx(Label, { children: label }), !!description && jsx(FieldDescription, { children: description }), jsxs(FieldAffixes, { children: [prefix === undefined || jsx(FieldAffix, { children: prefix }), multiline === true ? (jsx(Textarea, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })) : (jsx(Input, { ref: ref, "aria-invalid": Boolean(error) || undefined, ...rest })), suffix === undefined || jsx(FieldAffix, { children: suffix })] }), !!counter && (jsx(FieldComponent.Counter, { ...(typeof counter === 'number' ? { limit: counter } : counter) })), !!error && jsx(ValidationMessage, { children: error })] }));
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
export { Textfield };
|
|
@@ -11,8 +11,8 @@ import { useToggleGroupItem } from './use-toggle-groupitem.js';
|
|
|
11
11
|
* <ToggleGroupItem value='1'>Toggle 1</ToggleGroupItem>
|
|
12
12
|
*/
|
|
13
13
|
const ToggleGroupItem = forwardRef(function ToggleGroupItem(rest, ref) {
|
|
14
|
-
const { active, buttonProps, value } = useToggleGroupItem(rest);
|
|
15
|
-
return (jsx(RovingFocusItem, { asChild: true, value: value, children: jsx(Button, { variant: active ?
|
|
14
|
+
const { active, buttonProps, value, variant } = useToggleGroupItem(rest);
|
|
15
|
+
return (jsx(RovingFocusItem, { asChild: true, value: value, children: jsx(Button, { variant: active ? variant : 'tertiary', ref: ref, ...rest, ...buttonProps }) }));
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
export { ToggleGroupItem };
|
|
@@ -15,7 +15,7 @@ const ToggleGroupContext = createContext({});
|
|
|
15
15
|
* <ToggleGroup.Item value='3'>Toggle 3</ToggleGroup.Item>
|
|
16
16
|
* </ToggleGroup>
|
|
17
17
|
*/
|
|
18
|
-
const ToggleGroup = forwardRef(function ToggleGroup({ children, value, defaultValue, onChange, name, className, ...rest }, ref) {
|
|
18
|
+
const ToggleGroup = forwardRef(function ToggleGroup({ children, variant = 'primary', value, defaultValue, onChange, name, className, ...rest }, ref) {
|
|
19
19
|
const nameId = useId();
|
|
20
20
|
const isControlled = value !== undefined;
|
|
21
21
|
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
@@ -28,11 +28,12 @@ const ToggleGroup = forwardRef(function ToggleGroup({ children, value, defaultVa
|
|
|
28
28
|
value = uncontrolledValue;
|
|
29
29
|
}
|
|
30
30
|
return (jsx(ToggleGroupContext.Provider, { value: {
|
|
31
|
+
variant,
|
|
31
32
|
value,
|
|
32
33
|
defaultValue,
|
|
33
34
|
name: name ?? `togglegroup-name-${nameId}`,
|
|
34
35
|
onChange: onValueChange,
|
|
35
|
-
}, children: jsx(RovingFocusRoot, { asChild: true, activeValue: value, orientation: 'ambiguous', children: jsxs("div", { className: cl('ds-toggle-group', className), role: 'radiogroup', ref: ref, ...rest, children: [name && jsx("input", { type: 'hidden', name: name, value: value }), children] }) }) }));
|
|
36
|
+
}, children: jsx(RovingFocusRoot, { asChild: true, activeValue: value, orientation: 'ambiguous', children: jsxs("div", { className: cl('ds-toggle-group', className), role: 'radiogroup', "data-variant": variant, ref: ref, ...rest, children: [name && jsx("input", { type: 'hidden', name: name, value: value }), children] }) }) }));
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
export { ToggleGroup, ToggleGroupContext };
|
|
@@ -9,11 +9,13 @@ const useToggleGroupItem = (props) => {
|
|
|
9
9
|
const toggleGroup = useContext(ToggleGroupContext);
|
|
10
10
|
const value = props.value ?? genValue;
|
|
11
11
|
const active = toggleGroup.value === value;
|
|
12
|
+
const variant = toggleGroup.variant;
|
|
12
13
|
const buttonId = `togglegroup-item-${useId()}`;
|
|
13
14
|
return {
|
|
14
15
|
...rest,
|
|
15
16
|
active: active,
|
|
16
17
|
value,
|
|
18
|
+
variant,
|
|
17
19
|
buttonProps: {
|
|
18
20
|
id: buttonId,
|
|
19
21
|
'aria-checked': active,
|
|
@@ -75,13 +75,13 @@ const usePagination = ({ currentPage = 1, setCurrentPage, onChange, totalPages =
|
|
|
75
75
|
})),
|
|
76
76
|
/** Properties to spread on Pagination.Button used for previous naviagation */
|
|
77
77
|
prevButtonProps: {
|
|
78
|
-
'aria-
|
|
78
|
+
'aria-hidden': !hasPrev, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
79
79
|
onClick: handleClick(currentPage - 1),
|
|
80
80
|
variant: 'tertiary',
|
|
81
81
|
},
|
|
82
82
|
/** Properties to spread on Pagination.Button used for next naviagation */
|
|
83
83
|
nextButtonProps: {
|
|
84
|
-
'aria-
|
|
84
|
+
'aria-hidden': !hasNext, // Using aria-hidden to support all HTML elements because of potential asChild
|
|
85
85
|
onClick: handleClick(currentPage + 1),
|
|
86
86
|
variant: 'tertiary',
|
|
87
87
|
},
|
|
@@ -102,7 +102,7 @@ export type ComboboxProps = {
|
|
|
102
102
|
/**
|
|
103
103
|
* @deprecated Use `Suggestion` instead
|
|
104
104
|
*/
|
|
105
|
-
export declare const ComboboxComponent:
|
|
105
|
+
export declare const ComboboxComponent: import("react").ForwardRefExoticComponent<{
|
|
106
106
|
/**
|
|
107
107
|
* Label for the combobox.
|
|
108
108
|
*
|
|
@@ -207,8 +207,8 @@ export declare const ComboboxComponent: React.ForwardRefExoticComponent<{
|
|
|
207
207
|
id?: string;
|
|
208
208
|
readOnly?: boolean;
|
|
209
209
|
size?: import("packages/cli/dist/src/types").Size;
|
|
210
|
-
} & Pick<
|
|
211
|
-
export declare const Combobox:
|
|
210
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "aria-describedby"> & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
211
|
+
export declare const Combobox: import("react").ForwardRefExoticComponent<{
|
|
212
212
|
/**
|
|
213
213
|
* Label for the combobox.
|
|
214
214
|
*
|
|
@@ -313,5 +313,5 @@ export declare const Combobox: React.ForwardRefExoticComponent<{
|
|
|
313
313
|
id?: string;
|
|
314
314
|
readOnly?: boolean;
|
|
315
315
|
size?: import("packages/cli/dist/src/types").Size;
|
|
316
|
-
} & Pick<
|
|
316
|
+
} & Pick<import("react").HTMLAttributes<HTMLElement>, "aria-describedby"> & Omit<InputHTMLAttributes<HTMLInputElement>, "size"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
317
317
|
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAY5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG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OAGG;sBACe,OAAO;IACzB;;;OAGG;uBACgB,MAAM;IACzB;;;;OAIG;cACO,OAAO;IACjB;;OAEG;iBACU,MAAM;IACnB;;;;OAIG;cACO,OAAO;IACjB;;;OAGG;mBACY,MAAM;IACrB;;;;;;;OAOG;aACM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO;IACxD;;;;;;OAMG;kBACW,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IACxC;;;;OAIG;aACM,OAAO;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAY5D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAI5C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAIlE,MAAM,MAAM,aAAa,GAAG;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;I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/cnB;;;;OAIG;YACK,SAAS;IACjB;;;OAGG;gBACS,OAAO;IACnB;;OAEG;YACK,MAAM,EAAE;IAChB;;OAEG;mBACY,MAAM,EAAE;IACvB;;OAEG;oBACa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI;IACzC;;;OAGG;eACQ,OAAO;IAClB;;OAEG;WACI,MAAM;IACb;;;OAGG;eACQ,MAAM;IACjB;;;OAGG;gBACS,OAAO;IACnB;;;OAGG;sBACe,OAAO;IACzB;;;OAGG;uBACgB,MAAM;IACzB;;;;OAIG;cACO,OAAO;IACjB;;OAEG;iBACU,MAAM;IACnB;;;;OAIG;cACO,OAAO;IACjB;;;OAGG;mBACY,MAAM;IACrB;;;;;;;OAOG;aACM,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO;IACxD;;;;;;OAMG;kBACW,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM;IACxC;;;;OAIG;aACM,OAAO;;;;;;;;;kLAsXjB,CAAC"}
|
|
@@ -38,5 +38,5 @@ export type ComboboxContextType = {
|
|
|
38
38
|
forwareddRef: Ref<HTMLInputElement>;
|
|
39
39
|
setListRef: (index: number, ref: HTMLElement | null) => void;
|
|
40
40
|
};
|
|
41
|
-
export declare const ComboboxContext:
|
|
41
|
+
export declare const ComboboxContext: import("react").Context<ComboboxContextType | undefined>;
|
|
42
42
|
//# sourceMappingURL=ComboboxContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxContext.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/ComboboxContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtE,OAAO,KAAK,EAAE,aAAa,EAAE,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AE,WAAW,CAAC,aAAa,CAAC,aAAa,CAAC,CAAC,CAAC;IACvD,kBAAkB,EAAE,CAAC,IAAI,EAAE;QACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,KAAK,IAAI,CAAC;IACX,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;IAC3C,YAAY,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACpC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9D,CAAC;AAEF,eAAO,MAAM,eAAe,0DAE3B,CAAC"}
|
|
@@ -2,14 +2,14 @@ import type { Dispatch, ReactNode } from 'react';
|
|
|
2
2
|
type ComboboxIdContextType = {
|
|
3
3
|
activeIndex: number;
|
|
4
4
|
};
|
|
5
|
-
export declare const ComboboxIdContext:
|
|
5
|
+
export declare const ComboboxIdContext: import("react").Context<ComboboxIdContextType>;
|
|
6
6
|
type SetActiveIndexAction = {
|
|
7
7
|
type: 'SET_ACTIVE_INDEX';
|
|
8
8
|
payload: number;
|
|
9
9
|
};
|
|
10
10
|
type ComboboxIdReducerAction = SetActiveIndexAction;
|
|
11
11
|
export declare const ComboboxIdReducer: (state: ComboboxIdContextType, action: ComboboxIdReducerAction) => ComboboxIdContextType;
|
|
12
|
-
export declare const ComboboxIdDispatch:
|
|
12
|
+
export declare const ComboboxIdDispatch: import("react").Context<Dispatch<SetActiveIndexAction>>;
|
|
13
13
|
export declare const ComboboxIdProvider: ({ children }: {
|
|
14
14
|
children: ReactNode;
|
|
15
15
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxIdContext.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/ComboboxIdContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,KAAK,qBAAqB,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ComboboxIdContext.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/ComboboxIdContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjD,KAAK,qBAAqB,GAAG;IAC3B,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,gDAE5B,CAAC;AAEH,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,KAAK,uBAAuB,GAAG,oBAAoB,CAAC;AAEpD,eAAO,MAAM,iBAAiB,GAC5B,OAAO,qBAAqB,EAC5B,QAAQ,uBAAuB,0BAWhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,yDAI7B,CAAC;AAEH,eAAO,MAAM,kBAAkB,GAAI,cAAc;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,4CAYvE,CAAC;AAEF,wBAAgB,qBAAqB,mCAEpC;AAED,wBAAgB,aAAa,0BAE5B"}
|
|
@@ -28,6 +28,6 @@ export type ComboboxCustomProps = {
|
|
|
28
28
|
*/
|
|
29
29
|
asChild?: boolean;
|
|
30
30
|
} & HTMLAttributes<HTMLDivElement> & (InteractiveProps | NonInteractiveProps);
|
|
31
|
-
declare const ComboboxCustom:
|
|
31
|
+
declare const ComboboxCustom: import("react").ForwardRefExoticComponent<ComboboxCustomProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
32
|
export { ComboboxCustom };
|
|
33
33
|
//# sourceMappingURL=Custom.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Custom.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Custom.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAO5C,KAAK,gBAAgB,GAAG;IACtB,WAAW,EAAE,IAAI,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,cAAc,CAAC,GAChC,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;AAE3C,QAAA,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"Custom.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Custom.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAO5C,KAAK,gBAAgB,GAAG;IACtB,WAAW,EAAE,IAAI,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,cAAc,CAAC,GAChC,CAAC,gBAAgB,GAAG,mBAAmB,CAAC,CAAC;AAE3C,QAAA,MAAM,cAAc,gHA+CnB,CAAC;AAEF,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
export type ComboboxEmptyProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
-
declare const ComboboxEmpty:
|
|
3
|
+
declare const ComboboxEmpty: import("react").ForwardRefExoticComponent<ComboboxEmptyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
4
|
export { ComboboxEmpty };
|
|
5
5
|
//# sourceMappingURL=Empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Empty.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"Empty.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Empty.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAK5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,QAAA,MAAM,aAAa,+GAuBlB,CAAC;AAIF,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HTMLAttributes } from 'react';
|
|
2
2
|
type ComboboxOptionDescriptionProps = HTMLAttributes<HTMLSpanElement>;
|
|
3
|
-
declare const ComboboxOptionDescription:
|
|
3
|
+
declare const ComboboxOptionDescription: import("react").ForwardRefExoticComponent<ComboboxOptionDescriptionProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
4
4
|
export default ComboboxOptionDescription;
|
|
5
5
|
//# sourceMappingURL=Description.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/Option/Description.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,8BAA8B,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAEtE,QAAA,MAAM,yBAAyB,
|
|
1
|
+
{"version":3,"file":"Description.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/Option/Description.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,8BAA8B,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAEtE,QAAA,MAAM,yBAAyB,4HAa7B,CAAC;AAIH,eAAe,yBAAyB,CAAC"}
|
|
@@ -14,7 +14,7 @@ export type ComboboxOptionProps = {
|
|
|
14
14
|
*/
|
|
15
15
|
displayValue?: string;
|
|
16
16
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
17
|
-
declare const ComboboxOption:
|
|
17
|
+
declare const ComboboxOption: import("react").NamedExoticComponent<{
|
|
18
18
|
/**
|
|
19
19
|
* The value returned when the option is selected
|
|
20
20
|
*/
|
|
@@ -28,7 +28,7 @@ declare const ComboboxOption: React.NamedExoticComponent<{
|
|
|
28
28
|
* Required if children is not composed of strings only.
|
|
29
29
|
*/
|
|
30
30
|
displayValue?: string;
|
|
31
|
-
} & ButtonHTMLAttributes<HTMLButtonElement> &
|
|
31
|
+
} & ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
32
|
export { ComboboxOption };
|
|
33
33
|
export declare function isComboboxOption(child: ReactNode): child is ReactElement<ComboboxOptionProps>;
|
|
34
34
|
//# sourceMappingURL=Option.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/Option/Option.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAS3E,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE5C,QAAA,MAAM,cAAc;IAflB;;OAEG;WACI,MAAM;IACb;;OAEG;kBACW,MAAM;IACpB;;;OAGG;mBACY,MAAM
|
|
1
|
+
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/Option/Option.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAS3E,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE5C,QAAA,MAAM,cAAc;IAflB;;OAEG;WACI,MAAM;IACb;;OAEG;kBACW,MAAM;IACpB;;;OAGG;mBACY,MAAM;+FAmEtB,CAAC;AAIF,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,YAAY,CAAC,mBAAmB,CAAC,CAE5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
declare const ComboboxClearButton:
|
|
2
|
+
declare const ComboboxClearButton: import("react").ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
3
3
|
export default ComboboxClearButton;
|
|
4
4
|
//# sourceMappingURL=ComboboxClearButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboboxClearButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/internal/ComboboxClearButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAKlD,QAAA,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ComboboxClearButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/internal/ComboboxClearButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAKlD,QAAA,MAAM,mBAAmB,uIAqCvB,CAAC;AAIH,eAAe,mBAAmB,CAAC"}
|
|
@@ -16,7 +16,7 @@ export type Option = {
|
|
|
16
16
|
description?: string;
|
|
17
17
|
};
|
|
18
18
|
export declare function useCombobox({ children, inputValue, multiple, filter, initialValue, }: UseComboboxProps): {
|
|
19
|
-
filteredOptionsChildren: (ReactElement<ComboboxOptionProps, string |
|
|
19
|
+
filteredOptionsChildren: (ReactElement<ComboboxOptionProps, string | import("react").JSXElementConstructor<any>> | null)[];
|
|
20
20
|
filteredOptions: string[];
|
|
21
21
|
restChildren: ReactNode[];
|
|
22
22
|
options: {
|
|
@@ -26,8 +26,8 @@ export declare function useCombobox({ children, inputValue, multiple, filter, in
|
|
|
26
26
|
selectedOptions: {
|
|
27
27
|
[key: string]: Option;
|
|
28
28
|
};
|
|
29
|
-
interactiveChildren: ReactElement<ComboboxCustomProps, string |
|
|
30
|
-
setSelectedOptions:
|
|
29
|
+
interactiveChildren: ReactElement<ComboboxCustomProps, string | import("react").JSXElementConstructor<any>>[];
|
|
30
|
+
setSelectedOptions: import("react").Dispatch<import("react").SetStateAction<{
|
|
31
31
|
[key: string]: Option;
|
|
32
32
|
}>>;
|
|
33
33
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { FormFieldProps } from './useFormField';
|
|
2
2
|
export type FieldsetContextType = Pick<FormFieldProps, 'error' | 'errorId' | 'disabled' | 'size'>;
|
|
3
|
-
export declare const FieldsetContext:
|
|
3
|
+
export declare const FieldsetContext: import("react").Context<FieldsetContextType | null>;
|
|
4
4
|
//# sourceMappingURL=FieldsetContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FieldsetContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/useFormField/FieldsetContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,cAAc,EACd,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAC1C,CAAC;AAEF,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"FieldsetContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/useFormField/FieldsetContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CACpC,cAAc,EACd,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,CAC1C,CAAC;AAEF,eAAO,MAAM,eAAe,qDAAkD,CAAC"}
|
|
@@ -16,12 +16,12 @@ export type AlertProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivElement
|
|
|
16
16
|
* @example
|
|
17
17
|
* <Alert data-color='info'>Dette er en informasjonsmelding</Alert>
|
|
18
18
|
*/
|
|
19
|
-
export declare const Alert:
|
|
19
|
+
export declare const Alert: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "data-color"> & {
|
|
20
20
|
/**
|
|
21
21
|
* Sets color and icon.
|
|
22
22
|
*
|
|
23
23
|
* @default 'info'
|
|
24
24
|
*/
|
|
25
25
|
'data-color'?: SeverityColors;
|
|
26
|
-
} &
|
|
26
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
27
|
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;IAfd;;;;OAIG;mBACY,cAAc;
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/alert/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK;IAfd;;;;OAIG;mBACY,cAAc;kDAsB/B,CAAC"}
|
|
@@ -2,11 +2,16 @@ import type { Size } from '@digdir/designsystemet/types';
|
|
|
2
2
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
3
3
|
import type { DefaultProps } from '../../types';
|
|
4
4
|
import type { MergeRight } from '../../utilities';
|
|
5
|
-
|
|
5
|
+
type AriaLabel = {
|
|
6
6
|
/**
|
|
7
7
|
* The name of the person the avatar represents.
|
|
8
8
|
*/
|
|
9
9
|
'aria-label': string;
|
|
10
|
+
};
|
|
11
|
+
type AriaHidden = Partial<AriaLabel> & {
|
|
12
|
+
'aria-hidden': true | 'true';
|
|
13
|
+
};
|
|
14
|
+
export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>, (AriaLabel | AriaHidden) & {
|
|
10
15
|
/**
|
|
11
16
|
* The size of the avatar.
|
|
12
17
|
*/
|
|
@@ -44,30 +49,6 @@ export type AvatarProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanEleme
|
|
|
44
49
|
* <Icon />
|
|
45
50
|
* </Avatar>
|
|
46
51
|
*/
|
|
47
|
-
export declare const Avatar:
|
|
48
|
-
|
|
49
|
-
* The name of the person the avatar represents.
|
|
50
|
-
*/
|
|
51
|
-
'aria-label': string;
|
|
52
|
-
/**
|
|
53
|
-
* The size of the avatar.
|
|
54
|
-
*/
|
|
55
|
-
'data-size'?: "xs" | Size;
|
|
56
|
-
/**
|
|
57
|
-
* The shape of the avatar.
|
|
58
|
-
*
|
|
59
|
-
* @default 'circle'
|
|
60
|
-
*/
|
|
61
|
-
variant?: "circle" | "square";
|
|
62
|
-
/**
|
|
63
|
-
* Initials to display inside the avatar.
|
|
64
|
-
*/
|
|
65
|
-
initials?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Image, icon or initials to display inside the avatar.
|
|
68
|
-
*
|
|
69
|
-
* Gets `aria-hidden="true"`
|
|
70
|
-
*/
|
|
71
|
-
children?: ReactNode;
|
|
72
|
-
} & React.RefAttributes<HTMLSpanElement>>;
|
|
52
|
+
export declare const Avatar: import("react").ForwardRefExoticComponent<AvatarProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
53
|
+
export {};
|
|
73
54
|
//# sourceMappingURL=avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C
|
|
1
|
+
{"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,SAAS,GAAG;IACf;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AACF,KAAK,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG;IAAE,aAAa,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG,UAAU,CAClC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C,CAAC,SAAS,GAAG,UAAU,CAAC,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,MAAM,yGA8BjB,CAAC"}
|
|
@@ -24,7 +24,7 @@ export type BadgePositionProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSp
|
|
|
24
24
|
* <Element />
|
|
25
25
|
* </BadgePosition>
|
|
26
26
|
*/
|
|
27
|
-
export declare const BadgePosition:
|
|
27
|
+
export declare const BadgePosition: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLSpanElement>, "placement" | "overlap"> & {
|
|
28
28
|
/**
|
|
29
29
|
* The placement of the badge
|
|
30
30
|
*
|
|
@@ -37,5 +37,5 @@ export declare const BadgePosition: React.ForwardRefExoticComponent<Omit<Default
|
|
|
37
37
|
* @default rectangle
|
|
38
38
|
*/
|
|
39
39
|
overlap?: "circle" | "rectangle";
|
|
40
|
-
} &
|
|
40
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
41
41
|
//# sourceMappingURL=badge-position.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge-position.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge-position.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,MAAM,MAAM,kBAAkB,GAAG,UAAU,CACzC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;IACtE;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;CAClC,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;IAxBtB;;;;OAIG;gBACS,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa;IACrE;;;;OAIG;cACO,QAAQ,GAAG,WAAW;
|
|
1
|
+
{"version":3,"file":"badge-position.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge-position.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,MAAM,MAAM,kBAAkB,GAAG,UAAU,CACzC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;IACtE;;;;OAIG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,WAAW,CAAC;CAClC,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;IAxBtB;;;;OAIG;gBACS,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa;IACrE;;;;OAIG;cACO,QAAQ,GAAG,WAAW;mDA4BnC,CAAC"}
|
|
@@ -34,7 +34,7 @@ export type BadgeProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElemen
|
|
|
34
34
|
* <Icon />
|
|
35
35
|
* </Badge>
|
|
36
36
|
*/
|
|
37
|
-
export declare const Badge:
|
|
37
|
+
export declare const Badge: import("react").ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLSpanElement>, "data-color" | "children" | "variant" | "count" | "maxCount"> & {
|
|
38
38
|
/**
|
|
39
39
|
* The number to display in the badge
|
|
40
40
|
*/
|
|
@@ -54,5 +54,5 @@ export declare const Badge: React.ForwardRefExoticComponent<Omit<DefaultProps &
|
|
|
54
54
|
*/
|
|
55
55
|
'data-color'?: Color | SeverityColors;
|
|
56
56
|
children?: never;
|
|
57
|
-
} &
|
|
57
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
58
58
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;IAjCd;;OAEG;YACK,MAAM;IACd;;OAEG;eACQ,MAAM;IACjB;;;;OAIG;cACO,MAAM,GAAG,QAAQ;IAC3B;;OAEG;mBACY,KAAK,GAAG,cAAc;eAC1B,KAAK;
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/badge/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,UAAU,CACjC,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IAC5B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC,QAAQ,CAAC,EAAE,KAAK,CAAC;CAClB,CACF,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK;IAjCd;;OAEG;YACK,MAAM;IACd;;OAEG;eACQ,MAAM;IACjB;;;;OAIG;cACO,MAAM,GAAG,QAAQ;IAC3B;;OAEG;mBACY,KAAK,GAAG,cAAc;eAC1B,KAAK;mDA8BlB,CAAC"}
|
|
@@ -5,17 +5,17 @@ import { BadgePosition } from './badge-position';
|
|
|
5
5
|
* @example without children
|
|
6
6
|
* <Badge count={5} maxCount={10} />
|
|
7
7
|
*/
|
|
8
|
-
declare const Badge:
|
|
8
|
+
declare const Badge: import("react").ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & import("react").HTMLAttributes<HTMLSpanElement>, "data-color" | "children" | "variant" | "count" | "maxCount"> & {
|
|
9
9
|
count?: number;
|
|
10
10
|
maxCount?: number;
|
|
11
11
|
variant?: "base" | "tinted";
|
|
12
12
|
'data-color'?: import("packages/cli/dist/src/types").Color | import("packages/cli/dist/src/types").SeverityColors;
|
|
13
13
|
children?: never;
|
|
14
|
-
} &
|
|
15
|
-
Position:
|
|
14
|
+
} & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
15
|
+
Position: import("react").ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & import("react").HTMLAttributes<HTMLSpanElement>, "placement" | "overlap"> & {
|
|
16
16
|
placement?: "top-right" | "top-left" | "bottom-right" | "bottom-left";
|
|
17
17
|
overlap?: "circle" | "rectangle";
|
|
18
|
-
} &
|
|
18
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
19
19
|
};
|
|
20
20
|
export { Badge, BadgePosition };
|
|
21
21
|
export type { BadgeProps } from './badge';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'react';
|
|
2
2
|
export type BreadcrumbsItemProps = HTMLAttributes<HTMLLIElement>;
|
|
3
|
-
export declare const BreadcrumbsItem:
|
|
3
|
+
export declare const BreadcrumbsItem: import("react").ForwardRefExoticComponent<BreadcrumbsItemProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
4
4
|
//# sourceMappingURL=breadcrumbs-item.d.ts.map
|