@digdir/designsystemet-react 0.100.52-next.0 → 0.101.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/cjs/components/Badge/Badge.js +1 -1
  2. package/dist/cjs/components/Button/Button.js +1 -1
  3. package/dist/cjs/components/Card/Card.js +1 -1
  4. package/dist/cjs/components/Details/Details.js +1 -1
  5. package/dist/cjs/components/Dialog/Dialog.js +17 -9
  6. package/dist/cjs/components/Dialog/DialogTrigger.js +7 -1
  7. package/dist/cjs/components/Popover/Popover.js +1 -1
  8. package/dist/cjs/components/Suggestion/Suggestion.js +1 -0
  9. package/dist/cjs/components/Suggestion/SuggestionClear.js +11 -7
  10. package/dist/esm/components/Badge/Badge.js +1 -1
  11. package/dist/esm/components/Button/Button.js +1 -1
  12. package/dist/esm/components/Card/Card.js +1 -1
  13. package/dist/esm/components/Details/Details.js +1 -1
  14. package/dist/esm/components/Dialog/Dialog.js +17 -9
  15. package/dist/esm/components/Dialog/DialogTrigger.js +7 -1
  16. package/dist/esm/components/Popover/Popover.js +1 -1
  17. package/dist/esm/components/Suggestion/Suggestion.js +1 -0
  18. package/dist/esm/components/Suggestion/SuggestionClear.js +11 -7
  19. package/dist/types/colors.d.ts +7 -4
  20. package/dist/types/colors.d.ts.map +1 -1
  21. package/dist/types/components/Badge/Badge.d.ts +12 -3
  22. package/dist/types/components/Badge/Badge.d.ts.map +1 -1
  23. package/dist/types/components/Badge/index.d.ts +3 -2
  24. package/dist/types/components/Badge/index.d.ts.map +1 -1
  25. package/dist/types/components/Button/Button.d.ts +10 -1
  26. package/dist/types/components/Button/Button.d.ts.map +1 -1
  27. package/dist/types/components/Card/Card.d.ts +3 -3
  28. package/dist/types/components/Card/Card.d.ts.map +1 -1
  29. package/dist/types/components/Card/index.d.ts +2 -2
  30. package/dist/types/components/Details/Details.d.ts +1 -1
  31. package/dist/types/components/Details/Details.d.ts.map +1 -1
  32. package/dist/types/components/Dialog/Dialog.d.ts +34 -8
  33. package/dist/types/components/Dialog/Dialog.d.ts.map +1 -1
  34. package/dist/types/components/Dialog/DialogTrigger.d.ts +2 -1
  35. package/dist/types/components/Dialog/DialogTrigger.d.ts.map +1 -1
  36. package/dist/types/components/Dialog/index.d.ts +6 -3
  37. package/dist/types/components/Dialog/index.d.ts.map +1 -1
  38. package/dist/types/components/MultiSuggestion/MultiSuggestion.d.ts +131 -0
  39. package/dist/types/components/MultiSuggestion/MultiSuggestion.d.ts.map +1 -0
  40. package/dist/types/components/MultiSuggestion/MultiSuggestionChips.d.ts +20 -0
  41. package/dist/types/components/MultiSuggestion/MultiSuggestionChips.d.ts.map +1 -0
  42. package/dist/types/components/MultiSuggestion/MultiSuggestionClear.d.ts +35 -0
  43. package/dist/types/components/MultiSuggestion/MultiSuggestionClear.d.ts.map +1 -0
  44. package/dist/types/components/MultiSuggestion/MultiSuggestionEmpty.d.ts +15 -0
  45. package/dist/types/components/MultiSuggestion/MultiSuggestionEmpty.d.ts.map +1 -0
  46. package/dist/types/components/MultiSuggestion/MultiSuggestionInput.d.ts +21 -0
  47. package/dist/types/components/MultiSuggestion/MultiSuggestionInput.d.ts.map +1 -0
  48. package/dist/types/components/MultiSuggestion/MultiSuggestionList.d.ts +40 -0
  49. package/dist/types/components/MultiSuggestion/MultiSuggestionList.d.ts.map +1 -0
  50. package/dist/types/components/MultiSuggestion/MultiSuggestionOption.d.ts +6 -0
  51. package/dist/types/components/MultiSuggestion/MultiSuggestionOption.d.ts.map +1 -0
  52. package/dist/types/components/MultiSuggestion/index.d.ts +50 -0
  53. package/dist/types/components/MultiSuggestion/index.d.ts.map +1 -0
  54. package/dist/types/components/Popover/Popover.d.ts +12 -3
  55. package/dist/types/components/Popover/Popover.d.ts.map +1 -1
  56. package/dist/types/components/Popover/index.d.ts +3 -2
  57. package/dist/types/components/Popover/index.d.ts.map +1 -1
  58. package/dist/types/components/Search/SearchButton.d.ts +2 -1
  59. package/dist/types/components/Search/SearchButton.d.ts.map +1 -1
  60. package/dist/types/components/Search/index.d.ts +2 -1
  61. package/dist/types/components/Search/index.d.ts.map +1 -1
  62. package/dist/types/components/Suggestion/Suggestion.d.ts.map +1 -1
  63. package/dist/types/components/Suggestion/SuggestionClear.d.ts.map +1 -1
  64. package/dist/types/components/Tag/Tag.d.ts +14 -2
  65. package/dist/types/components/Tag/Tag.d.ts.map +1 -1
  66. package/dist/types/components/ToggleGroup/ToggleGroupItem.d.ts +2 -2
  67. package/dist/types/components/ToggleGroup/ToggleGroupItem.d.ts.map +1 -1
  68. package/dist/types/components/ToggleGroup/index.d.ts +1 -1
  69. package/package.json +4 -3
@@ -12,8 +12,9 @@ export type DialogTriggerProps = ComponentPropsWithRef<typeof Button>;
12
12
  * </Dialog>
13
13
  * </Dialog.TriggerContext>
14
14
  */
15
- export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
15
+ export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
16
16
  variant?: "primary" | "secondary" | "tertiary";
17
+ 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
17
18
  icon?: boolean;
18
19
  loading?: boolean | React.ReactNode;
19
20
  asChild?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/DialogTrigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;;4FAczB,CAAC"}
1
+ {"version":3,"file":"DialogTrigger.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/DialogTrigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa;;;;;;;4FAqBzB,CAAC"}
@@ -14,9 +14,11 @@ import { DialogTriggerContext } from './DialogTriggerContext';
14
14
  * </Dialog>
15
15
  * </Dialog.TriggerContext>
16
16
  */
17
- declare const Dialog: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "onClose" | "closeButton" | "backdropClose"> & {
17
+ declare const Dialog: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "open" | "onClose" | "closeButton" | "closedby" | "modal"> & {
18
18
  closeButton?: string | false;
19
- backdropClose?: boolean;
19
+ closedby?: "none" | "closerequest" | "any";
20
+ modal?: boolean;
21
+ open?: boolean;
20
22
  onClose?: (event: Event) => void;
21
23
  asChild?: boolean;
22
24
  } & React.RefAttributes<HTMLDialogElement>> & {
@@ -27,8 +29,9 @@ declare const Dialog: React.ForwardRefExoticComponent<Omit<import("../../types")
27
29
  ({ children, }: import("./DialogTriggerContext").DialogTriggerContextProps): import("react/jsx-runtime").JSX.Element;
28
30
  displayName: string;
29
31
  };
30
- Trigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
32
+ Trigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
31
33
  variant?: "primary" | "secondary" | "tertiary";
34
+ 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
32
35
  icon?: boolean;
33
36
  loading?: boolean | React.ReactNode;
34
37
  asChild?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CAIV,CAAC;AAMH,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAIV,CAAC;AAMH,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,EAAE,aAAa,EAAE,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,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,KAAK,0BAA0B,GAAG;IAChC,aAAa,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;KAAE,CAAC;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,sBAAsB,2CAElC,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC;;;;;;;;OAQG;IACH,MAAM,CAAC,EACH,OAAO,GACP,CAAC,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,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;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;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,cAAc,CAAC,gBAAgB,CAAC,CAAC;AAErC,eAAO,MAAM,eAAe;IA5D1B;;;;;;;;OAQG;aAEC,OAAO,GACP,CAAC,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"}
@@ -1,3 +1,4 @@
1
+ import type { Color, SeverityColors } from '@digdir/designsystemet-react/colors';
1
2
  import type { Placement } from '@floating-ui/dom';
2
3
  import type { HTMLAttributes } from 'react';
3
4
  import type { DefaultProps } from '../../types';
@@ -34,7 +35,11 @@ export type PopoverProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivEleme
34
35
  *
35
36
  * @default 'default'
36
37
  */
37
- 'data-variant'?: 'default' | 'tinted';
38
+ variant?: 'default' | 'tinted';
39
+ /**
40
+ * Change the color scheme of the popover
41
+ */
42
+ 'data-color'?: Color | SeverityColors;
38
43
  /**
39
44
  * Callback when the popover wants to open.
40
45
  */
@@ -71,7 +76,7 @@ export type PopoverProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivEleme
71
76
  * Content
72
77
  * </Popover>
73
78
  */
74
- export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "id" | "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"> & {
75
80
  /**
76
81
  * id to connect the trigger with the popover - required when not using Popover.Context.
77
82
  */
@@ -91,7 +96,11 @@ export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps
91
96
  *
92
97
  * @default 'default'
93
98
  */
94
- 'data-variant'?: "default" | "tinted";
99
+ variant?: "default" | "tinted";
100
+ /**
101
+ * Change the color scheme of the popover
102
+ */
103
+ 'data-color'?: Color | SeverityColors;
95
104
  /**
96
105
  * Callback when the popover wants to open.
97
106
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAOA,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,cAAc,CAAC,EAAE,SAAS,GAAG,QAAQ,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;IA1DhB;;OAEG;SACE,MAAM;IACX;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;WACI,OAAO;IACd;;;;OAIG;qBACc,SAAS,GAAG,QAAQ;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,12 @@ 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" | "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
+ 'data-color'?: import("../../colors").Color | import("../../colors").SeverityColors;
19
20
  onOpen?: () => void;
20
21
  onClose?: () => void;
21
22
  autoPlacement?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;CAGX,CAAC;AAKH,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;CAGX,CAAC;AAKH,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,YAAY,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC"}
@@ -22,8 +22,9 @@ export type SearchButtonProps = MergeRight<ButtonProps, {
22
22
  * <Search.Button>Søk</Search.Button>
23
23
  * </Search>
24
24
  */
25
- export declare const SearchButton: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
25
+ export declare const SearchButton: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
26
26
  variant?: "primary" | "secondary" | "tertiary";
27
+ 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
27
28
  icon?: boolean;
28
29
  loading?: boolean | ReactNode;
29
30
  asChild?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"SearchButton.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CACxC,WAAW,EACX;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;;;;;;2CAQxB,CAAC"}
1
+ {"version":3,"file":"SearchButton.d.ts","sourceRoot":"","sources":["../../../src/components/Search/SearchButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CACxC,WAAW,EACX;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CACF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY;;;;;;;2CAQxB,CAAC"}
@@ -21,8 +21,9 @@ declare const Search: React.ForwardRefExoticComponent<import("../../types").Defa
21
21
  Clear: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "children" | "variant"> & {
22
22
  'aria-label'?: string;
23
23
  } & React.RefAttributes<HTMLButtonElement>>;
24
- Button: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
24
+ Button: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "data-color" | "variant" | "icon" | "loading" | "asChild"> & {
25
25
  variant?: "primary" | "secondary" | "tertiary";
26
+ 'data-color'?: import("../../colors").Color | import("../../colors").SeverityDanger;
26
27
  icon?: boolean;
27
28
  loading?: boolean | React.ReactNode;
28
29
  asChild?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Search/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;CAIV,CAAC;AAMH,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Search/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;CAIV,CAAC;AAMH,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC"}
@@ -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;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,qBAAqB,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,sCAA2C,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,UAAU,CACtC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;;;;;OAQG;IACH,MAAM,CAAC,EACH,OAAO,GACP,CAAC,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,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU;IAvDnB;;;;;;;;OAQG;aAEC,OAAO,GACP,CAAC,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;;;OAGG;cACO,OAAO;wCAgEpB,CAAC"}
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;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAElD,KAAK,qBAAqB,GAAG;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACpD,SAAS,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,CAAC;CAC1D,CAAC;AAEF,eAAO,MAAM,iBAAiB,sCAA2C,CAAC;AAE1E,MAAM,MAAM,eAAe,GAAG,UAAU,CACtC,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;;;;;;OAQG;IACH,MAAM,CAAC,EACH,OAAO,GACP,CAAC,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,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,UAAU;IAvDnB;;;;;;;;OAQG;aAEC,OAAO,GACP,CAAC,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;;;OAGG;cACO,OAAO;wCAiEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SuggestionClear.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/SuggestionClear.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAIrD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,CAAC,GAAG;IAC7E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;IAnB1B;;;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;AAE/E,eAAO,MAAM,kBAAkB,UACtB,gBAAgB,GAAG,iBAAiB,SACpC,MAAM,KACZ,IAaF,CAAC"}
1
+ {"version":3,"file":"SuggestionClear.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/SuggestionClear.tsx"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAIrD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,GAAG,UAAU,CAAC,GAAG;IAC7E;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,eAAe;IAnB1B;;;OAGG;mBACY,MAAM;2CAkDrB,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"}
@@ -1,11 +1,23 @@
1
+ import type { Color, SeverityColors } from '@digdir/designsystemet-react/colors';
1
2
  import type { HTMLAttributes } from 'react';
2
3
  import type { DefaultProps } from '../../types';
3
- export type TagProps = DefaultProps & HTMLAttributes<HTMLSpanElement>;
4
+ import type { MergeRight } from '../../utilities';
5
+ export type TagProps = MergeRight<DefaultProps & HTMLAttributes<HTMLSpanElement>, {
6
+ /**
7
+ * Change the color scheme of the tag
8
+ */
9
+ 'data-color'?: Color | SeverityColors;
10
+ }>;
4
11
  /**
5
12
  * Use `Tag` to display categories or statuses.
6
13
  *
7
14
  * @example
8
15
  * <Tag>Melk</Tag>
9
16
  */
10
- export declare const Tag: React.ForwardRefExoticComponent<DefaultProps & HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
17
+ export declare const Tag: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLSpanElement>, "data-color"> & {
18
+ /**
19
+ * Change the color scheme of the tag
20
+ */
21
+ 'data-color'?: Color | SeverityColors;
22
+ } & React.RefAttributes<HTMLSpanElement>>;
11
23
  //# sourceMappingURL=Tag.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,QAAQ,GAAG,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AAEtE;;;;;GAKG;AACH,eAAO,MAAM,GAAG,wHAKd,CAAC"}
1
+ {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../src/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,cAAc,EACf,MAAM,qCAAqC,CAAC;AAE7C,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,QAAQ,GAAG,UAAU,CAC/B,YAAY,GAAG,cAAc,CAAC,eAAe,CAAC,EAC9C;IACE;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,cAAc,CAAC;CACvC,CACF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,GAAG;IAbZ;;OAEG;mBACY,KAAK,GAAG,cAAc;yCAevC,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';