@digdir/designsystemet-react 0.0.0-next-20250227103607 → 0.0.0-next-20250228195802

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/cjs/components/Badge/Badge.js +1 -1
  2. package/dist/cjs/components/Card/Card.js +1 -1
  3. package/dist/cjs/components/Details/Details.js +1 -1
  4. package/dist/cjs/components/Popover/Popover.js +1 -1
  5. package/dist/cjs/components/Suggestion/Suggestion.js +1 -0
  6. package/dist/esm/components/Badge/Badge.js +1 -1
  7. package/dist/esm/components/Card/Card.js +1 -1
  8. package/dist/esm/components/Details/Details.js +1 -1
  9. package/dist/esm/components/Popover/Popover.js +1 -1
  10. package/dist/esm/components/Suggestion/Suggestion.js +1 -0
  11. package/dist/types/components/Badge/Badge.d.ts +3 -3
  12. package/dist/types/components/Badge/Badge.d.ts.map +1 -1
  13. package/dist/types/components/Badge/index.d.ts +2 -2
  14. package/dist/types/components/Card/Card.d.ts +3 -3
  15. package/dist/types/components/Card/Card.d.ts.map +1 -1
  16. package/dist/types/components/Card/index.d.ts +2 -2
  17. package/dist/types/components/Details/Details.d.ts +1 -1
  18. package/dist/types/components/Details/Details.d.ts.map +1 -1
  19. package/dist/types/components/MultiSuggestion/MultiSuggestion.d.ts +131 -0
  20. package/dist/types/components/MultiSuggestion/MultiSuggestion.d.ts.map +1 -0
  21. package/dist/types/components/MultiSuggestion/MultiSuggestionChips.d.ts +20 -0
  22. package/dist/types/components/MultiSuggestion/MultiSuggestionChips.d.ts.map +1 -0
  23. package/dist/types/components/MultiSuggestion/MultiSuggestionClear.d.ts +35 -0
  24. package/dist/types/components/MultiSuggestion/MultiSuggestionClear.d.ts.map +1 -0
  25. package/dist/types/components/MultiSuggestion/MultiSuggestionEmpty.d.ts +15 -0
  26. package/dist/types/components/MultiSuggestion/MultiSuggestionEmpty.d.ts.map +1 -0
  27. package/dist/types/components/MultiSuggestion/MultiSuggestionInput.d.ts +21 -0
  28. package/dist/types/components/MultiSuggestion/MultiSuggestionInput.d.ts.map +1 -0
  29. package/dist/types/components/MultiSuggestion/MultiSuggestionList.d.ts +40 -0
  30. package/dist/types/components/MultiSuggestion/MultiSuggestionList.d.ts.map +1 -0
  31. package/dist/types/components/MultiSuggestion/MultiSuggestionOption.d.ts +6 -0
  32. package/dist/types/components/MultiSuggestion/MultiSuggestionOption.d.ts.map +1 -0
  33. package/dist/types/components/MultiSuggestion/index.d.ts +50 -0
  34. package/dist/types/components/MultiSuggestion/index.d.ts.map +1 -0
  35. package/dist/types/components/Popover/Popover.d.ts +3 -3
  36. package/dist/types/components/Popover/Popover.d.ts.map +1 -1
  37. package/dist/types/components/Popover/index.d.ts +2 -2
  38. package/dist/types/components/Suggestion/Suggestion.d.ts.map +1 -1
  39. package/dist/types/components/ToggleGroup/ToggleGroupItem.d.ts +2 -2
  40. package/dist/types/components/ToggleGroup/ToggleGroupItem.d.ts.map +1 -1
  41. package/dist/types/components/ToggleGroup/index.d.ts +1 -1
  42. package/package.json +4 -3
@@ -16,7 +16,7 @@ var react = require('react');
16
16
  * <Icon />
17
17
  * </Badge>
18
18
  */
19
- const Badge = react.forwardRef(function Badge({ className, count, maxCount, 'data-variant': variant = 'base', ...rest }, ref) {
19
+ const Badge = react.forwardRef(function Badge({ className, count, maxCount, variant = 'base', ...rest }, ref) {
20
20
  return (jsxRuntime.jsx("span", { className: cl('ds-badge', className), "data-count": count && maxCount && count > maxCount ? `${maxCount}+` : count, "data-variant": variant, ref: ref, ...rest }));
21
21
  });
22
22
 
@@ -17,7 +17,7 @@ var react = require('react');
17
17
  * <Card.Block>Footer</Card.Block>
18
18
  * </Card>
19
19
  */
20
- const Card = react.forwardRef(function Card({ asChild = false, 'data-variant': variant = 'default', className, ...rest }, ref) {
20
+ const Card = react.forwardRef(function Card({ asChild = false, variant = 'default', className, ...rest }, ref) {
21
21
  const Component = asChild ? reactSlot.Slot : 'div';
22
22
  const cardRef = react.useRef(null);
23
23
  const mergedRefs = react$1.useMergeRefs([cardRef, ref]);
@@ -16,7 +16,7 @@ require('@u-elements/u-details');
16
16
  * <Details.Content>Content</Details.Content>
17
17
  * </Details>
18
18
  */
19
- const Details = react.forwardRef(function Details({ className, open, defaultOpen = false, 'data-variant': variant = 'default', onToggle, ...rest }, ref) {
19
+ const Details = react.forwardRef(function Details({ className, open, defaultOpen = false, variant = 'default', onToggle, ...rest }, ref) {
20
20
  const detailsRef = react.useRef(null);
21
21
  const initialOpen = react.useRef(defaultOpen); // Allow rendering defaultOpen on server, but only render once on client
22
22
  const mergedRefs = react$1.useMergeRefs([detailsRef, ref]);
@@ -26,7 +26,7 @@ var PopoverTriggerContext = require('./PopoverTriggerContext.js');
26
26
  * Content
27
27
  * </Popover>
28
28
  */
29
- const Popover = react.forwardRef(function Popover({ id, className, onClose, onOpen, open, 'data-variant': variant = 'default', placement = 'top', autoPlacement = true, asChild = false, ...rest }, ref) {
29
+ const Popover = react.forwardRef(function Popover({ id, className, onClose, onOpen, open, variant = 'default', placement = 'top', autoPlacement = true, asChild = false, ...rest }, ref) {
30
30
  const Component = asChild ? reactSlot.Slot : 'div';
31
31
  const popoverRef = react.useRef(null);
32
32
  const mergedRefs = react$1.useMergeRefs([popoverRef, ref]);
@@ -31,6 +31,7 @@ const Suggestion = react.forwardRef(function Suggestion({ className, filter = tr
31
31
  // Let <datalist> handle filtering if filter is true
32
32
  if (filter === true || !list)
33
33
  return;
34
+ console.log(list);
34
35
  // Handle custom filter
35
36
  if (filter !== false) {
36
37
  let index = 0;
@@ -14,7 +14,7 @@ import { forwardRef } from 'react';
14
14
  * <Icon />
15
15
  * </Badge>
16
16
  */
17
- const Badge = forwardRef(function Badge({ className, count, maxCount, 'data-variant': variant = 'base', ...rest }, ref) {
17
+ const Badge = forwardRef(function Badge({ className, count, maxCount, variant = 'base', ...rest }, ref) {
18
18
  return (jsx("span", { className: cl('ds-badge', className), "data-count": count && maxCount && count > maxCount ? `${maxCount}+` : count, "data-variant": variant, ref: ref, ...rest }));
19
19
  });
20
20
 
@@ -15,7 +15,7 @@ import { forwardRef, useRef, useEffect } from 'react';
15
15
  * <Card.Block>Footer</Card.Block>
16
16
  * </Card>
17
17
  */
18
- const Card = forwardRef(function Card({ asChild = false, 'data-variant': variant = 'default', className, ...rest }, ref) {
18
+ const Card = forwardRef(function Card({ asChild = false, variant = 'default', className, ...rest }, ref) {
19
19
  const Component = asChild ? Slot : 'div';
20
20
  const cardRef = useRef(null);
21
21
  const mergedRefs = useMergeRefs([cardRef, ref]);
@@ -14,7 +14,7 @@ import '@u-elements/u-details';
14
14
  * <Details.Content>Content</Details.Content>
15
15
  * </Details>
16
16
  */
17
- const Details = forwardRef(function Details({ className, open, defaultOpen = false, 'data-variant': variant = 'default', onToggle, ...rest }, ref) {
17
+ const Details = forwardRef(function Details({ className, open, defaultOpen = false, variant = 'default', onToggle, ...rest }, ref) {
18
18
  const detailsRef = useRef(null);
19
19
  const initialOpen = useRef(defaultOpen); // Allow rendering defaultOpen on server, but only render once on client
20
20
  const mergedRefs = useMergeRefs([detailsRef, ref]);
@@ -24,7 +24,7 @@ import { Context } from './PopoverTriggerContext.js';
24
24
  * Content
25
25
  * </Popover>
26
26
  */
27
- const Popover = forwardRef(function Popover({ id, className, onClose, onOpen, open, 'data-variant': variant = 'default', placement = 'top', autoPlacement = true, asChild = false, ...rest }, ref) {
27
+ const Popover = forwardRef(function Popover({ id, className, onClose, onOpen, open, variant = 'default', placement = 'top', autoPlacement = true, asChild = false, ...rest }, ref) {
28
28
  const Component = asChild ? Slot : 'div';
29
29
  const popoverRef = useRef(null);
30
30
  const mergedRefs = useMergeRefs([popoverRef, ref]);
@@ -29,6 +29,7 @@ const Suggestion = forwardRef(function Suggestion({ className, filter = true, as
29
29
  // Let <datalist> handle filtering if filter is true
30
30
  if (filter === true || !list)
31
31
  return;
32
+ console.log(list);
32
33
  // Handle custom filter
33
34
  if (filter !== false) {
34
35
  let index = 0;
@@ -16,7 +16,7 @@ export type BadgeProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElemen
16
16
  *
17
17
  * @default 'base'
18
18
  */
19
- 'data-variant'?: 'base' | 'tinted';
19
+ variant?: 'base' | 'tinted';
20
20
  /**
21
21
  * Change the color scheme of the badge
22
22
  */
@@ -34,7 +34,7 @@ export type BadgeProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElemen
34
34
  * <Icon />
35
35
  * </Badge>
36
36
  */
37
- export declare const Badge: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLSpanElement>, "data-color" | "children" | "data-variant" | "count" | "maxCount"> & {
37
+ export declare const Badge: 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
  */
@@ -48,7 +48,7 @@ export declare const Badge: React.ForwardRefExoticComponent<Omit<DefaultProps &
48
48
  *
49
49
  * @default 'base'
50
50
  */
51
- 'data-variant'?: "base" | "tinted";
51
+ variant?: "base" | "tinted";
52
52
  /**
53
53
  * Change the color scheme of the badge
54
54
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,KAAK,cAAc,EAAc,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,cAAc,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@@ -5,10 +5,10 @@ import { BadgePosition } from './BadgePosition';
5
5
  * @example without children
6
6
  * <Badge count={5} maxCount={10} />
7
7
  */
8
- declare const Badge: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLSpanElement>, "data-color" | "children" | "data-variant" | "count" | "maxCount"> & {
8
+ declare const Badge: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLSpanElement>, "data-color" | "children" | "variant" | "count" | "maxCount"> & {
9
9
  count?: number;
10
10
  maxCount?: number;
11
- 'data-variant'?: "base" | "tinted";
11
+ variant?: "base" | "tinted";
12
12
  'data-color'?: import("../../colors").Color | import("../../colors").SeverityColors;
13
13
  children?: never;
14
14
  } & React.RefAttributes<HTMLSpanElement>> & {
@@ -7,7 +7,7 @@ export type CardProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivElement>
7
7
  *
8
8
  * @default 'default'
9
9
  */
10
- 'data-variant'?: 'default' | 'tinted';
10
+ variant?: 'default' | 'tinted';
11
11
  /**
12
12
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
13
13
  * @default false
@@ -26,13 +26,13 @@ export type CardProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivElement>
26
26
  * <Card.Block>Footer</Card.Block>
27
27
  * </Card>
28
28
  */
29
- export declare const Card: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "children" | "asChild" | "data-variant"> & {
29
+ export declare const Card: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "children" | "variant" | "asChild"> & {
30
30
  /**
31
31
  * Change the background color of the card.
32
32
  *
33
33
  * @default 'default'
34
34
  */
35
- 'data-variant'?: "default" | "tinted";
35
+ variant?: "default" | "tinted";
36
36
  /**
37
37
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
38
38
  * @default false
@@ -1 +1 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAGA,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,SAAS,GAAG,UAAU,CAChC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACtC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;CACrB,CACF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI;IA1Bb;;;;OAIG;qBACc,SAAS,GAAG,QAAQ;IACrC;;;OAGG;cACO,OAAO;IACjB,gEAAgE;cACtD,SAAS;wCAgDrB,CAAC"}
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/Card/Card.tsx"],"names":[],"mappings":"AAGA,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,SAAS,GAAG,UAAU,CAChC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,QAAQ,EAAE,SAAS,CAAC;CACrB,CACF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI;IA1Bb;;;;OAIG;cACO,SAAS,GAAG,QAAQ;IAC9B;;;OAGG;cACO,OAAO;IACjB,gEAAgE;cACtD,SAAS;wCAgDrB,CAAC"}
@@ -9,8 +9,8 @@ import { CardBlock } from './CardBlock';
9
9
  * <Card.Block>Footer</Card.Block>
10
10
  * </Card>
11
11
  */
12
- declare const Card: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "children" | "asChild" | "data-variant"> & {
13
- 'data-variant'?: "default" | "tinted";
12
+ declare const Card: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "children" | "variant" | "asChild"> & {
13
+ variant?: "default" | "tinted";
14
14
  asChild?: boolean;
15
15
  children: React.ReactNode;
16
16
  } & React.RefAttributes<HTMLDivElement>> & {
@@ -8,7 +8,7 @@ export type DetailsProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDetailsE
8
8
  *
9
9
  * @default 'default'
10
10
  */
11
- 'data-variant'?: 'default' | 'tinted';
11
+ variant?: 'default' | 'tinted';
12
12
  /**
13
13
  * Controls open-state.
14
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../../src/components/Details/Details.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,kBAAkB,CAAC,EACjD;IACE;;;;OAIG;IACH,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACtC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,C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;IAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,CACtD,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,OAAO,yFA2CnB,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { type HTMLAttributes, type RefObject } from 'react';
2
+ import '@u-elements/u-tags';
3
+ import type { UHTMLTagsElement } from '@u-elements/u-tags';
4
+ type MultiSuggestionContextType = {
5
+ selectedItems?: {
6
+ [key: string]: HTMLDataElement;
7
+ };
8
+ listId?: string;
9
+ inputRef?: RefObject<HTMLInputElement | null>;
10
+ setListId?: (id: string) => void;
11
+ handleFilter?: (input?: HTMLInputElement | null) => void;
12
+ };
13
+ export declare const MultiSuggestionContext: React.Context<MultiSuggestionContextType>;
14
+ export type MultiSuggestionProps = {
15
+ /**
16
+ * Filter options, either true, false or a custom callback () => boolean
17
+ *
18
+ * If true, the <datalist> will handle filtering.
19
+ * If false, the <datalist> will not handle filtering.
20
+ * If a custom callback, the callback will be used to filter the <option> elements.
21
+ *
22
+ * @default true
23
+ */
24
+ filter?: boolean | ((args: {
25
+ /**
26
+ * Index of the `option`
27
+ */
28
+ index: number;
29
+ /**
30
+ * Text content of the `option`
31
+ */
32
+ text: string;
33
+ /**
34
+ * Value of the `option`
35
+ */
36
+ value: string;
37
+ /**
38
+ * The DOM element of the `option`
39
+ */
40
+ optionElement: HTMLOptionElement;
41
+ /**
42
+ * The DOM element of the `input`
43
+ */
44
+ input: HTMLInputElement;
45
+ }) => boolean);
46
+ /**
47
+ * Allows the user to create new items
48
+ *
49
+ * @default false
50
+ */
51
+ allowCreate?: boolean;
52
+ /**
53
+ * The selected items of the multi-select.
54
+ * Using this makes the component controlled and it must be used in combination with onValueChange
55
+ */
56
+ value?: string[];
57
+ /**
58
+ * Default selected items when uncontrolled
59
+ */
60
+ defaultValue?: string[];
61
+ /**
62
+ * Callback when selected items changes
63
+ */
64
+ onValueChange?: (value: string[]) => void;
65
+ /**
66
+ * The name of the associated form control
67
+ *
68
+ * @default undefined
69
+ */
70
+ name?: string;
71
+ } & HTMLAttributes<UHTMLTagsElement>;
72
+ export declare const MultiSuggestion: React.ForwardRefExoticComponent<{
73
+ /**
74
+ * Filter options, either true, false or a custom callback () => boolean
75
+ *
76
+ * If true, the <datalist> will handle filtering.
77
+ * If false, the <datalist> will not handle filtering.
78
+ * If a custom callback, the callback will be used to filter the <option> elements.
79
+ *
80
+ * @default true
81
+ */
82
+ filter?: boolean | ((args: {
83
+ /**
84
+ * Index of the `option`
85
+ */
86
+ index: number;
87
+ /**
88
+ * Text content of the `option`
89
+ */
90
+ text: string;
91
+ /**
92
+ * Value of the `option`
93
+ */
94
+ value: string;
95
+ /**
96
+ * The DOM element of the `option`
97
+ */
98
+ optionElement: HTMLOptionElement;
99
+ /**
100
+ * The DOM element of the `input`
101
+ */
102
+ input: HTMLInputElement;
103
+ }) => boolean);
104
+ /**
105
+ * Allows the user to create new items
106
+ *
107
+ * @default false
108
+ */
109
+ allowCreate?: boolean;
110
+ /**
111
+ * The selected items of the multi-select.
112
+ * Using this makes the component controlled and it must be used in combination with onValueChange
113
+ */
114
+ value?: string[];
115
+ /**
116
+ * Default selected items when uncontrolled
117
+ */
118
+ defaultValue?: string[];
119
+ /**
120
+ * Callback when selected items changes
121
+ */
122
+ onValueChange?: (value: string[]) => void;
123
+ /**
124
+ * The name of the associated form control
125
+ *
126
+ * @default undefined
127
+ */
128
+ name?: string;
129
+ } & HTMLAttributes<UHTMLTagsElement> & React.RefAttributes<UHTMLTagsElement>>;
130
+ export {};
131
+ //# sourceMappingURL=MultiSuggestion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestion.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestion.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AACf,OAAO,oBAAoB,CAAC;AAG5B,O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AC,CAAC,IAAI,EAAE;QACN;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,aAAa,EAAE,iBAAiB,CAAC;QACjC;;WAEG;QACH,KAAK,EAAE,gBAAgB,CAAC;KACzB,KAAK,OAAO,CAAC;IAClB;;;;OAIG;kBACW,OAAO;IACrB;;;OAGG;YACK,MAAM,EAAE;IAChB;;OAEG;mBACY,MAAM,EAAE;IACvB;;OAEG;oBACa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI;IACzC;;;;OAIG;WACI,MAAM;6EA0Nb,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import type { DefaultProps } from '../../types';
3
+ import type { MergeRight } from '../../utilities';
4
+ export type MultiSuggestionChipsProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivElement>, {
5
+ /**
6
+ * Change the rendered content of the chip.
7
+ *
8
+ * @default ({ value }) => value
9
+ */
10
+ render?: (args: {
11
+ text: string;
12
+ value: string;
13
+ element: HTMLDataElement;
14
+ }) => ReactNode;
15
+ }>;
16
+ export declare const MultiSuggestionChips: {
17
+ ({ render, }: MultiSuggestionChipsProps): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ //# sourceMappingURL=MultiSuggestionChips.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestionChips.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestionChips.tsx"],"names":[],"mappings":"AAAA,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;AAIlD,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAChD,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE;QACd,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,EAAE,eAAe,CAAC;KAC1B,KAAK,SAAS,CAAC;CACjB,CACF,CAAC;AAEF,eAAO,MAAM,oBAAoB;kBAE9B,yBAAyB;;CAmB3B,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { type ButtonProps } from '../Button';
2
+ export type MultiSuggestionClearProps = Omit<ButtonProps, 'variant' | 'children'> & {
3
+ /**
4
+ * Aria label for the clear button
5
+ * @default 'Tøm'
6
+ */
7
+ 'aria-label'?: string;
8
+ };
9
+ /**
10
+ * Component that provides a clear button for the MultiSuggestion input.
11
+ *
12
+ * Place as a descendant of `MultiSuggestion`
13
+ *
14
+ * @example
15
+ * <MultiSuggestion>
16
+ * <MultiSuggestion.Input />
17
+ * <MultiSuggestion.Clear />
18
+ * <MultiSuggestion.List />
19
+ * </MultiSuggestion>
20
+ */
21
+ export declare const MultiSuggestionClear: React.ForwardRefExoticComponent<Omit<ButtonProps, "children" | "variant"> & {
22
+ /**
23
+ * Aria label for the clear button
24
+ * @default 'Tøm'
25
+ */
26
+ 'aria-label'?: string;
27
+ } & React.RefAttributes<HTMLButtonElement>>;
28
+ type ReactInternalHack = {
29
+ _valueTracker?: {
30
+ setValue: (a: string) => void;
31
+ };
32
+ };
33
+ export declare const setReactInputValue: (input: HTMLInputElement & ReactInternalHack, value: string) => void;
34
+ export {};
35
+ //# sourceMappingURL=MultiSuggestionClear.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestionClear.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestionClear.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAIrD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,WAAW,EACX,SAAS,GAAG,UAAU,CACvB,GAAG;IACF;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,oBAAoB;IAnB/B;;;OAGG;mBACY,MAAM;2CAiDrB,CAAC;AAIH,KAAK,iBAAiB,GAAG;IAAE,aAAa,CAAC,EAAE;QAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAA;CAAE,CAAC;AAG/E,eAAO,MAAM,kBAAkB,UACtB,gBAAgB,GAAG,iBAAiB,SACpC,MAAM,KACZ,IAcF,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { OptionHTMLAttributes } from 'react';
2
+ import type { DefaultProps } from '../../types';
3
+ export type MultiSuggestionEmptyProps = DefaultProps & OptionHTMLAttributes<HTMLOptionElement>;
4
+ /**
5
+ * Component that provides an empty MultiSuggestion list.
6
+ *
7
+ * Place as a descendant of `MultiSuggestion.List`
8
+ *
9
+ * @example
10
+ * <MultiSuggestion.List>
11
+ * <MultiSuggestion.Empty>Tomt</MultiSuggestion.Empty>
12
+ * </MultiSuggestion.List>
13
+ */
14
+ export declare const MultiSuggestionEmpty: React.ForwardRefExoticComponent<DefaultProps & OptionHTMLAttributes<HTMLOptionElement> & React.RefAttributes<HTMLOptionElement>>;
15
+ //# sourceMappingURL=MultiSuggestionEmpty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestionEmpty.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestionEmpty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,yBAAyB,GAAG,YAAY,GAClD,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE1C;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,kIAQ/B,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { type InputProps } from '../Input';
2
+ export type MultiSuggestionInputProps = InputProps;
3
+ /**
4
+ * Component that provides an input field for the MultiSuggestion list.
5
+ *
6
+ * Place as a descendant of `MultiSuggestion`
7
+ *
8
+ * @example
9
+ * <MultiSuggestion>
10
+ * <MultiSuggestion.Input />
11
+ * <MultiSuggestion.List />
12
+ * </MultiSuggestion>
13
+ */
14
+ export declare const MultiSuggestionInput: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "type">, "type" | "disabled" | "readOnly" | "size" | "role"> & {
15
+ type?: "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "month" | "number" | "password" | "radio" | "search" | "tel" | "text" | "time" | "url" | "week";
16
+ size?: number;
17
+ disabled?: boolean;
18
+ readOnly?: boolean;
19
+ role?: React.AriaRole | undefined;
20
+ } & React.RefAttributes<HTMLInputElement>>;
21
+ //# sourceMappingURL=MultiSuggestionInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestionInput.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestionInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAS,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAGlD,MAAM,MAAM,yBAAyB,GAAG,UAAU,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;;;;;;0CA2B/B,CAAC"}
@@ -0,0 +1,40 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ import '@u-elements/u-datalist';
3
+ import type { DefaultProps } from '../../types';
4
+ import type { MergeRight } from '../../utilities';
5
+ export type MultiSuggestionListProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDataListElement>, {
6
+ /**
7
+ * The screen reader announcement for singular MultiSuggestion, where %d is the number of MultiSuggestions
8
+ * @default '%d forslag'
9
+ */
10
+ singular?: string;
11
+ /**
12
+ * The screen reader announcement for plural MultiSuggestions, where %d is the number of MultiSuggestions
13
+ * @default '%d forslag'
14
+ */
15
+ plural?: string;
16
+ }>;
17
+ /**
18
+ * Component that provides a MultiSuggestion list.
19
+ *
20
+ * Place as a descendant of `MultiSuggestion`
21
+ *
22
+ * @example
23
+ * <MultiSuggestion>
24
+ * <MultiSuggestion.Input />
25
+ * <MultiSuggestion.List />
26
+ * </MultiSuggestion>
27
+ */
28
+ export declare const MultiSuggestionList: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDataListElement>, "singular" | "plural"> & {
29
+ /**
30
+ * The screen reader announcement for singular MultiSuggestion, where %d is the number of MultiSuggestions
31
+ * @default '%d forslag'
32
+ */
33
+ singular?: string;
34
+ /**
35
+ * The screen reader announcement for plural MultiSuggestions, where %d is the number of MultiSuggestions
36
+ * @default '%d forslag'
37
+ */
38
+ plural?: string;
39
+ } & React.RefAttributes<HTMLDataListElement>>;
40
+ //# sourceMappingURL=MultiSuggestionList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestionList.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestionList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAGlD,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAC/C,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,mBAAmB;IAxB5B;;;OAGG;eACQ,MAAM;IACjB;;;OAGG;aACM,MAAM;6CAyCjB,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { OptionHTMLAttributes } from 'react';
2
+ import type { DefaultProps } from '../../types';
3
+ import '@u-elements/u-datalist';
4
+ export type MultiSuggestionOptionProps = OptionHTMLAttributes<HTMLOptionElement> & DefaultProps;
5
+ export declare const MultiSuggestionOption: React.ForwardRefExoticComponent<OptionHTMLAttributes<HTMLOptionElement> & DefaultProps & React.RefAttributes<HTMLOptionElement>>;
6
+ //# sourceMappingURL=MultiSuggestionOption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSuggestionOption.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/MultiSuggestionOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,MAAM,0BAA0B,GACpC,oBAAoB,CAAC,iBAAiB,CAAC,GAAG,YAAY,CAAC;AAEzD,eAAO,MAAM,qBAAqB,kIAWhC,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { MultiSuggestionChips } from './MultiSuggestionChips';
2
+ import { MultiSuggestionClear } from './MultiSuggestionClear';
3
+ import { MultiSuggestionEmpty } from './MultiSuggestionEmpty';
4
+ import { MultiSuggestionInput } from './MultiSuggestionInput';
5
+ import { MultiSuggestionList } from './MultiSuggestionList';
6
+ import { MultiSuggestionOption } from './MultiSuggestionOption';
7
+ declare const MultiSuggestion: React.ForwardRefExoticComponent<{
8
+ filter?: boolean | ((args: {
9
+ index: number;
10
+ text: string;
11
+ value: string;
12
+ optionElement: HTMLOptionElement;
13
+ input: HTMLInputElement;
14
+ }) => boolean);
15
+ allowCreate?: boolean;
16
+ value?: string[];
17
+ defaultValue?: string[];
18
+ onValueChange?: (value: string[]) => void;
19
+ name?: string;
20
+ } & React.HTMLAttributes<import("@u-elements/u-tags").UHTMLTagsElement> & React.RefAttributes<import("@u-elements/u-tags").UHTMLTagsElement>> & {
21
+ Input: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & Omit<React.InputHTMLAttributes<HTMLInputElement>, "prefix" | "type">, "type" | "disabled" | "readOnly" | "size" | "role"> & {
22
+ type?: "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "month" | "number" | "password" | "radio" | "search" | "tel" | "text" | "time" | "url" | "week";
23
+ size?: number;
24
+ disabled?: boolean;
25
+ readOnly?: boolean;
26
+ role?: React.AriaRole | undefined;
27
+ } & React.RefAttributes<HTMLInputElement>>;
28
+ List: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDataListElement>, "singular" | "plural"> & {
29
+ singular?: string;
30
+ plural?: string;
31
+ } & React.RefAttributes<HTMLDataListElement>>;
32
+ Option: React.ForwardRefExoticComponent<React.OptionHTMLAttributes<HTMLOptionElement> & import("../../types").DefaultProps & React.RefAttributes<HTMLOptionElement>>;
33
+ Chips: {
34
+ ({ render, }: import("./MultiSuggestionChips").MultiSuggestionChipsProps): import("react/jsx-runtime").JSX.Element;
35
+ displayName: string;
36
+ };
37
+ Empty: React.ForwardRefExoticComponent<import("../../types").DefaultProps & React.OptionHTMLAttributes<HTMLOptionElement> & React.RefAttributes<HTMLOptionElement>>;
38
+ Clear: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "children" | "variant"> & {
39
+ 'aria-label'?: string;
40
+ } & React.RefAttributes<HTMLButtonElement>>;
41
+ };
42
+ export { MultiSuggestion as EXPERIMENTAL_MultiSuggestion, MultiSuggestionInput as EXPERIMENTAL_MultiSuggestionInput, MultiSuggestionList as EXPERIMENTAL_MultiSuggestionList, MultiSuggestionOption as EXPERIMENTAL_MultiSuggestionOption, MultiSuggestionChips as EXPERIMENTAL_MultiSuggestionChips, MultiSuggestionEmpty as EXPERIMENTAL_MultiSuggestionEmpty, MultiSuggestionClear as EXPERIMENTAL_MultiSuggestionClear, };
43
+ export type { MultiSuggestionProps } from './MultiSuggestion';
44
+ export type { MultiSuggestionInputProps } from './MultiSuggestionInput';
45
+ export type { MultiSuggestionListProps } from './MultiSuggestionList';
46
+ export type { MultiSuggestionOptionProps } from './MultiSuggestionOption';
47
+ export type { MultiSuggestionChipsProps } from './MultiSuggestionChips';
48
+ export type { MultiSuggestionEmptyProps } from './MultiSuggestionEmpty';
49
+ export type { MultiSuggestionClearProps } from './MultiSuggestionClear';
50
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSuggestion/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOnB,CAAC;AAUH,OAAO,EACL,eAAe,IAAI,4BAA4B,EAC/C,oBAAoB,IAAI,iCAAiC,EACzD,mBAAmB,IAAI,gCAAgC,EACvD,qBAAqB,IAAI,kCAAkC,EAC3D,oBAAoB,IAAI,iCAAiC,EACzD,oBAAoB,IAAI,iCAAiC,EACzD,oBAAoB,IAAI,iCAAiC,GAC1D,CAAC;AAEF,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -35,7 +35,7 @@ export type PopoverProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivEleme
35
35
  *
36
36
  * @default 'default'
37
37
  */
38
- 'data-variant'?: 'default' | 'tinted';
38
+ variant?: 'default' | 'tinted';
39
39
  /**
40
40
  * Change the color scheme of the popover
41
41
  */
@@ -76,7 +76,7 @@ export type PopoverProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivEleme
76
76
  * Content
77
77
  * </Popover>
78
78
  */
79
- export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "id" | "data-color" | "asChild" | "open" | "data-variant" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
79
+ export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "id" | "data-color" | "variant" | "asChild" | "open" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
80
80
  /**
81
81
  * id to connect the trigger with the popover - required when not using Popover.Context.
82
82
  */
@@ -96,7 +96,7 @@ export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps
96
96
  *
97
97
  * @default 'default'
98
98
  */
99
- 'data-variant'?: "default" | "tinted";
99
+ variant?: "default" | "tinted";
100
100
  /**
101
101
  * Change the color scheme of the popover
102
102
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAA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Y,KAAK,GAAG,cAAc;IACrC;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;wCAiIpB,CAAC"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAQ7C,OAAO,KAAK,EAAmB,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKnE,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;AAKlD,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;QACd,UAAU,cAAc,CAAC,CAAC;YACxB,aAAa,CAAC,EAAE,MAAM,CAAC;SACxB;KACF;CACF;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CACnC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;IACtC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,OAAO;IA9DhB;;OAEG;SACE,MAAM;IACX;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;WACI,OAAO;IACd;;;;OAIG;cACO,SAAS,GAAG,QAAQ;IAC9B;;OAEG;mBACY,KAAK,GAAG,cAAc;IACrC;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;wCAiIpB,CAAC"}
@@ -11,11 +11,11 @@ import { PopoverTriggerContext } from './PopoverTriggerContext';
11
11
  * </Popover>
12
12
  * </Popover.TriggerContext>
13
13
  */
14
- declare const Popover: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "id" | "data-color" | "asChild" | "open" | "data-variant" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
14
+ declare const Popover: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "id" | "data-color" | "variant" | "asChild" | "open" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
15
15
  id?: string;
16
16
  placement?: import("@floating-ui/utils").Placement;
17
17
  open?: boolean;
18
- 'data-variant'?: "default" | "tinted";
18
+ variant?: "default" | "tinted";
19
19
  'data-color'?: import("../../colors").Color | import("../../colors").SeverityColors;
20
20
  onOpen?: () => void;
21
21
  onClose?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"Suggestion.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/Suggestion.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACh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QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,aAAa,EAAE,iBAAiB,CAAC;QACjC;;WAEG;QACH,KAAK,EAAE,gBAAgB,CAAC;KACzB,KAAK,OAAO,CAAC;IAClB;;;OAGG;cACO,OAAO;wCAiEpB,CAAC"}
@@ -5,7 +5,7 @@ export type ToggleGroupItemProps = {
5
5
  * Generates a random value if not set.
6
6
  **/
7
7
  value?: string;
8
- } & Omit<ButtonProps, 'loading' | 'value'>;
8
+ } & Omit<ButtonProps, 'loading' | 'value' | 'variant'>;
9
9
  /**
10
10
  * A single item in a ToggleGroup.
11
11
  * @example
@@ -17,5 +17,5 @@ export declare const ToggleGroupItem: React.ForwardRefExoticComponent<{
17
17
  * Generates a random value if not set.
18
18
  **/
19
19
  value?: string;
20
- } & Omit<ButtonProps, "value" | "loading"> & React.RefAttributes<HTMLButtonElement>>;
20
+ } & Omit<ButtonProps, "value" | "variant" | "loading"> & React.RefAttributes<HTMLButtonElement>>;
21
21
  //# sourceMappingURL=ToggleGroupItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroupItem.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleGroup/ToggleGroupItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI5D,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;QAGI;IACJ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,CAAC,CAAC;AAE3C;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAZ1B;;;QAGI;YACI,MAAM;oFAwBd,CAAC"}
1
+ {"version":3,"file":"ToggleGroupItem.d.ts","sourceRoot":"","sources":["../../../src/components/ToggleGroup/ToggleGroupItem.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAI5D,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;QAGI;IACJ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAEvD;;;;GAIG;AACH,eAAO,MAAM,eAAe;IAZ1B;;;QAGI;YACI,MAAM;gGAwBd,CAAC"}
@@ -17,7 +17,7 @@ declare const ToggleGroup: React.ForwardRefExoticComponent<Omit<import("../../ty
17
17
  } & React.RefAttributes<HTMLDivElement>> & {
18
18
  Item: React.ForwardRefExoticComponent<{
19
19
  value?: string;
20
- } & Omit<import("..").ButtonProps, "value" | "loading"> & React.RefAttributes<HTMLButtonElement>>;
20
+ } & Omit<import("..").ButtonProps, "value" | "variant" | "loading"> & React.RefAttributes<HTMLButtonElement>>;
21
21
  };
22
22
  export type { ToggleGroupProps } from './ToggleGroup';
23
23
  export type { ToggleGroupItemProps } from './ToggleGroupItem';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digdir/designsystemet-react",
3
3
  "type": "module",
4
- "version": "0.0.0-next-20250227103607",
4
+ "version": "0.0.0-next-20250228195802",
5
5
  "description": "React components for Designsystemet",
6
6
  "author": "Designsystemet team",
7
7
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "types": "tsc --noEmit"
36
36
  },
37
37
  "peerDependencies": {
38
- "react": ">=18.3.1",
39
- "react-dom": ">=18.3.1"
38
+ "react": ">=18.3.1 || ^19.0.0",
39
+ "react-dom": ">=18.3.1 || ^19.0.0"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -49,6 +49,7 @@
49
49
  "@tanstack/react-virtual": "^3.11.2",
50
50
  "@u-elements/u-datalist": "^0.1.3",
51
51
  "@u-elements/u-details": "^0.1.0",
52
+ "@u-elements/u-tags": "^0.1.2",
52
53
  "clsx": "^2.1.1"
53
54
  },
54
55
  "devDependencies": {