@digdir/designsystemet-react 1.0.0-next.48 → 1.0.0-next.50

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 (119) hide show
  1. package/dist/cjs/components/Badge/Badge.js +2 -2
  2. package/dist/cjs/components/Button/Button.js +1 -1
  3. package/dist/cjs/components/Card/Card.js +2 -2
  4. package/dist/cjs/components/Combobox/Combobox.js +0 -2
  5. package/dist/cjs/components/Details/Details.js +2 -2
  6. package/dist/cjs/components/Dialog/Dialog.js +74 -0
  7. package/dist/cjs/components/Dialog/DialogBlock.js +30 -0
  8. package/dist/cjs/components/Dialog/DialogTrigger.js +27 -0
  9. package/dist/cjs/components/Dialog/DialogTriggerContext.js +28 -0
  10. package/dist/cjs/components/Dialog/index.js +34 -0
  11. package/dist/cjs/components/Popover/Popover.js +2 -2
  12. package/dist/cjs/components/Suggestion/Suggestion.js +2 -3
  13. package/dist/cjs/components/Suggestion/SuggestionEmpty.js +4 -4
  14. package/dist/cjs/index.js +10 -10
  15. package/dist/cjs/{components/Pagination → utilities/hooks/usePagination}/usePagination.js +10 -1
  16. package/dist/esm/components/Badge/Badge.js +2 -2
  17. package/dist/esm/components/Button/Button.js +2 -2
  18. package/dist/esm/components/Card/Card.js +2 -2
  19. package/dist/esm/components/Chip/Chips.js +1 -1
  20. package/dist/esm/components/Chip/index.js +1 -1
  21. package/dist/esm/components/Combobox/Combobox.js +1 -3
  22. package/dist/esm/components/Combobox/ComboboxIdContext.js +1 -1
  23. package/dist/esm/components/Combobox/useFloatingCombobox.js +1 -1
  24. package/dist/esm/components/Details/Details.js +2 -2
  25. package/dist/esm/components/Dialog/Dialog.js +72 -0
  26. package/dist/esm/components/Dialog/DialogBlock.js +28 -0
  27. package/dist/esm/components/{Modal/ModalTrigger.js → Dialog/DialogTrigger.js} +9 -9
  28. package/dist/esm/components/Dialog/DialogTriggerContext.js +25 -0
  29. package/dist/esm/components/Dialog/index.js +29 -0
  30. package/dist/esm/components/ErrorSummary/ErrorSummary.js +1 -1
  31. package/dist/esm/components/Field/index.js +1 -1
  32. package/dist/esm/components/List/index.js +1 -1
  33. package/dist/esm/components/Popover/Popover.js +2 -2
  34. package/dist/esm/components/Suggestion/Suggestion.js +3 -4
  35. package/dist/esm/components/Suggestion/SuggestionEmpty.js +4 -4
  36. package/dist/esm/components/Tabs/Tabs.js +1 -1
  37. package/dist/esm/components/ToggleGroup/ToggleGroup.js +1 -1
  38. package/dist/esm/index.js +5 -5
  39. package/dist/esm/utilities/RovingFocus/RovingFocusRoot.js +1 -1
  40. package/dist/esm/{components/Pagination → utilities/hooks/usePagination}/usePagination.js +10 -1
  41. package/dist/types/colors.d.ts +12 -2
  42. package/dist/types/colors.d.ts.map +1 -1
  43. package/dist/types/components/Badge/Badge.d.ts +13 -1
  44. package/dist/types/components/Badge/Badge.d.ts.map +1 -1
  45. package/dist/types/components/Badge/index.d.ts +2 -1
  46. package/dist/types/components/Badge/index.d.ts.map +1 -1
  47. package/dist/types/components/Button/Button.d.ts +10 -6
  48. package/dist/types/components/Button/Button.d.ts.map +1 -1
  49. package/dist/types/components/Card/Card.d.ts +9 -7
  50. package/dist/types/components/Card/Card.d.ts.map +1 -1
  51. package/dist/types/components/Card/index.d.ts +2 -2
  52. package/dist/types/components/Details/Details.d.ts +4 -4
  53. package/dist/types/components/Details/Details.d.ts.map +1 -1
  54. package/dist/types/components/{Modal/Modal.d.ts → Dialog/Dialog.d.ts} +17 -17
  55. package/dist/types/components/Dialog/Dialog.d.ts.map +1 -0
  56. package/dist/types/components/{Modal/ModalBlock.d.ts → Dialog/DialogBlock.d.ts} +12 -12
  57. package/dist/types/components/Dialog/DialogBlock.d.ts.map +1 -0
  58. package/dist/types/components/Dialog/DialogTrigger.d.ts +22 -0
  59. package/dist/types/components/Dialog/DialogTrigger.d.ts.map +1 -0
  60. package/dist/types/components/Dialog/DialogTriggerContext.d.ts +21 -0
  61. package/dist/types/components/Dialog/DialogTriggerContext.d.ts.map +1 -0
  62. package/dist/types/components/Dialog/index.d.ts +43 -0
  63. package/dist/types/components/Dialog/index.d.ts.map +1 -0
  64. package/dist/types/components/Dropdown/DropdownHeading.d.ts +1 -1
  65. package/dist/types/components/Dropdown/index.d.ts +1 -1
  66. package/dist/types/components/ErrorSummary/ErrorSummaryHeading.d.ts +1 -1
  67. package/dist/types/components/ErrorSummary/index.d.ts +1 -1
  68. package/dist/types/components/Fieldset/FieldsetDescription.d.ts +1 -1
  69. package/dist/types/components/Fieldset/index.d.ts +1 -1
  70. package/dist/types/components/Heading/Heading.d.ts +2 -2
  71. package/dist/types/components/Heading/Heading.d.ts.map +1 -1
  72. package/dist/types/components/Pagination/index.d.ts +0 -2
  73. package/dist/types/components/Pagination/index.d.ts.map +1 -1
  74. package/dist/types/components/Paragraph/Paragraph.d.ts +2 -2
  75. package/dist/types/components/Paragraph/Paragraph.d.ts.map +1 -1
  76. package/dist/types/components/Popover/Popover.d.ts +13 -1
  77. package/dist/types/components/Popover/Popover.d.ts.map +1 -1
  78. package/dist/types/components/Popover/index.d.ts +2 -1
  79. package/dist/types/components/Popover/index.d.ts.map +1 -1
  80. package/dist/types/components/Search/SearchButton.d.ts +2 -2
  81. package/dist/types/components/Search/index.d.ts +2 -2
  82. package/dist/types/components/Spinner/Spinner.d.ts +1 -1
  83. package/dist/types/components/Spinner/Spinner.d.ts.map +1 -1
  84. package/dist/types/components/Suggestion/Suggestion.d.ts.map +1 -1
  85. package/dist/types/components/Suggestion/SuggestionEmpty.d.ts +3 -16
  86. package/dist/types/components/Suggestion/SuggestionEmpty.d.ts.map +1 -1
  87. package/dist/types/components/Suggestion/index.d.ts +1 -3
  88. package/dist/types/components/Suggestion/index.d.ts.map +1 -1
  89. package/dist/types/components/index.d.ts +1 -1
  90. package/dist/types/components/index.d.ts.map +1 -1
  91. package/dist/types/types.d.ts +2 -2
  92. package/dist/types/types.d.ts.map +1 -1
  93. package/dist/types/utilities/hooks/index.d.ts +2 -0
  94. package/dist/types/utilities/hooks/index.d.ts.map +1 -1
  95. package/dist/types/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts +2 -1
  96. package/dist/types/utilities/hooks/useCheckboxGroup/useCheckboxGroup.d.ts.map +1 -1
  97. package/dist/types/{components/Pagination → utilities/hooks/usePagination}/usePagination.d.ts +19 -11
  98. package/dist/types/utilities/hooks/usePagination/usePagination.d.ts.map +1 -0
  99. package/dist/types/utilities/hooks/useRadioGroup/useRadioGroup.d.ts +1 -1
  100. package/dist/types/utilities/hooks/useRadioGroup/useRadioGroup.d.ts.map +1 -1
  101. package/package.json +7 -5
  102. package/dist/cjs/components/Modal/Modal.js +0 -74
  103. package/dist/cjs/components/Modal/ModalBlock.js +0 -30
  104. package/dist/cjs/components/Modal/ModalTrigger.js +0 -27
  105. package/dist/cjs/components/Modal/ModalTriggerContext.js +0 -28
  106. package/dist/cjs/components/Modal/index.js +0 -34
  107. package/dist/esm/components/Modal/Modal.js +0 -72
  108. package/dist/esm/components/Modal/ModalBlock.js +0 -28
  109. package/dist/esm/components/Modal/ModalTriggerContext.js +0 -25
  110. package/dist/esm/components/Modal/index.js +0 -29
  111. package/dist/types/components/Modal/Modal.d.ts.map +0 -1
  112. package/dist/types/components/Modal/ModalBlock.d.ts.map +0 -1
  113. package/dist/types/components/Modal/ModalTrigger.d.ts +0 -22
  114. package/dist/types/components/Modal/ModalTrigger.d.ts.map +0 -1
  115. package/dist/types/components/Modal/ModalTriggerContext.d.ts +0 -21
  116. package/dist/types/components/Modal/ModalTriggerContext.d.ts.map +0 -1
  117. package/dist/types/components/Modal/index.d.ts +0 -43
  118. package/dist/types/components/Modal/index.d.ts.map +0 -1
  119. package/dist/types/components/Pagination/usePagination.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes } from 'react';
2
- export type ModalBlockProps = {
2
+ export type DialogBlockProps = {
3
3
  /**
4
4
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
5
5
  * @default false
@@ -7,26 +7,26 @@ export type ModalBlockProps = {
7
7
  asChild?: boolean;
8
8
  } & HTMLAttributes<HTMLDivElement>;
9
9
  /**
10
- * ModalBlock component, used to separate content in a modal.
10
+ * DialogBlock component, used to separate content in a Dialog.
11
11
  *
12
12
  * @example
13
- * <Modal>
14
- * <Modal.Block>
13
+ * <Dialog>
14
+ * <Dialog.Block>
15
15
  * Header
16
- * </Modal.Block>
17
- * <Modal.Block>
16
+ * </Dialog.Block>
17
+ * <Dialog.Block>
18
18
  * Content
19
- * </Modal.Block>
20
- * <Modal.Block>
19
+ * </Dialog.Block>
20
+ * <Dialog.Block>
21
21
  * Footer
22
- * </Modal.Block>
23
- * </Modal>
22
+ * </Dialog.Block>
23
+ * </Dialog>
24
24
  */
25
- export declare const ModalBlock: React.ForwardRefExoticComponent<{
25
+ export declare const DialogBlock: React.ForwardRefExoticComponent<{
26
26
  /**
27
27
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
28
28
  * @default false
29
29
  */
30
30
  asChild?: boolean;
31
31
  } & HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
32
- //# sourceMappingURL=ModalBlock.d.ts.map
32
+ //# sourceMappingURL=DialogBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogBlock.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/DialogBlock.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEnC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW;IAvBtB;;;OAGG;cACO,OAAO;yEA+BlB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ import { Button } from '../Button/Button';
3
+ export type DialogTriggerProps = ComponentPropsWithRef<typeof Button>;
4
+ /**
5
+ * DialogTrigger component, used within a Dialog.TriggerContext to open a dialog.
6
+ *
7
+ * @example
8
+ * <Dialog.TriggerContext>
9
+ * <Dialog.Trigger>Open Dialog</Dialog.Trigger>
10
+ * <Dialog>
11
+ * Content
12
+ * </Dialog>
13
+ * </Dialog.TriggerContext>
14
+ */
15
+ export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
16
+ variant?: "primary" | "secondary" | "tertiary";
17
+ icon?: boolean;
18
+ loading?: boolean | React.ReactNode;
19
+ asChild?: boolean;
20
+ type?: React.ButtonHTMLAttributes<HTMLButtonElement>["type"];
21
+ } & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
22
+ //# sourceMappingURL=DialogTrigger.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,21 @@
1
+ import type { ReactNode, RefObject } from 'react';
2
+ export declare const Context: React.Context<RefObject<HTMLDialogElement | null>>;
3
+ export type DialogTriggerContextProps = {
4
+ children: ReactNode;
5
+ };
6
+ /**
7
+ * DialogTriggerContext component, used to provide a context for a dialog trigger.
8
+ *
9
+ * @example
10
+ * <Dialog.TriggerContext>
11
+ * <Dialog.Trigger>Open Dialog</Dialog.Trigger>
12
+ * <Dialog>
13
+ * Content
14
+ * </Dialog>
15
+ * </Dialog.TriggerContext>
16
+ */
17
+ export declare const DialogTriggerContext: {
18
+ ({ children, }: DialogTriggerContextProps): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
21
+ //# sourceMappingURL=DialogTriggerContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DialogTriggerContext.d.ts","sourceRoot":"","sources":["../../../src/components/Dialog/DialogTriggerContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,OAAO,oDAElB,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB;oBAE9B,yBAAyB;;CAI3B,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { DialogBlock } from './DialogBlock';
2
+ import { DialogTrigger } from './DialogTrigger';
3
+ import { DialogTriggerContext } from './DialogTriggerContext';
4
+ /**
5
+ * Dialog component, used to display a Dialog dialog.
6
+ *
7
+ * @example
8
+ * <Dialog.TriggerContext>
9
+ * <Dialog.Trigger>Open Dialog</Dialog.Trigger>
10
+ * <Dialog>
11
+ * <Dialog.Block>
12
+ * Content
13
+ * </Dialog.Block>
14
+ * </Dialog>
15
+ * </Dialog.TriggerContext>
16
+ */
17
+ declare const Dialog: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.DialogHTMLAttributes<HTMLDialogElement>, "asChild" | "onClose" | "closeButton" | "backdropClose"> & {
18
+ closeButton?: string | false;
19
+ backdropClose?: boolean;
20
+ onClose?: (event: Event) => void;
21
+ asChild?: boolean;
22
+ } & React.RefAttributes<HTMLDialogElement>> & {
23
+ Block: React.ForwardRefExoticComponent<{
24
+ asChild?: boolean;
25
+ } & React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
26
+ TriggerContext: {
27
+ ({ children, }: import("./DialogTriggerContext").DialogTriggerContextProps): import("react/jsx-runtime").JSX.Element;
28
+ displayName: string;
29
+ };
30
+ Trigger: React.ForwardRefExoticComponent<Omit<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
31
+ variant?: "primary" | "secondary" | "tertiary";
32
+ icon?: boolean;
33
+ loading?: boolean | React.ReactNode;
34
+ asChild?: boolean;
35
+ type?: React.ButtonHTMLAttributes<HTMLButtonElement>["type"];
36
+ } & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
37
+ };
38
+ export type { DialogBlockProps } from './DialogBlock';
39
+ export type { DialogTriggerContextProps } from './DialogTriggerContext';
40
+ export type { DialogProps } from './Dialog';
41
+ export type { DialogTriggerProps } from './DialogTrigger';
42
+ export { Dialog, DialogBlock, DialogTriggerContext, DialogTrigger };
43
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -2,7 +2,7 @@ import { type HeadingProps } from '../Heading';
2
2
  export type DropdownHeadingProps = HeadingProps;
3
3
  export declare const DropdownHeading: React.ForwardRefExoticComponent<{
4
4
  level?: 1 | 2 | 3 | 4 | 5 | 6;
5
- 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | (string & {});
5
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
6
6
  asChild?: boolean;
7
7
  } & React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
8
8
  //# sourceMappingURL=DropdownHeading.d.ts.map
@@ -29,7 +29,7 @@ declare const Dropdown: React.ForwardRefExoticComponent<Omit<import("../../types
29
29
  };
30
30
  Heading: React.ForwardRefExoticComponent<{
31
31
  level?: 1 | 2 | 3 | 4 | 5 | 6;
32
- 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | (string & {});
32
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
33
33
  asChild?: boolean;
34
34
  } & React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
35
35
  List: React.ForwardRefExoticComponent<import("./DropdownList").DropdownListProps & React.RefAttributes<HTMLUListElement>>;
@@ -2,7 +2,7 @@ import { type HeadingProps } from '../Heading';
2
2
  export type ErrorSummaryHeadingProps = HeadingProps;
3
3
  export declare const ErrorSummaryHeading: React.ForwardRefExoticComponent<{
4
4
  level?: 1 | 2 | 3 | 4 | 5 | 6;
5
- 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | (string & {});
5
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
6
6
  asChild?: boolean;
7
7
  } & React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
8
8
  //# sourceMappingURL=ErrorSummaryHeading.d.ts.map
@@ -23,7 +23,7 @@ declare const ErrorSummary: React.ForwardRefExoticComponent<{
23
23
  } & Omit<React.HTMLAttributes<HTMLDivElement> & import("../../types").DefaultProps, "data-color"> & React.RefAttributes<HTMLDivElement>> & {
24
24
  Heading: React.ForwardRefExoticComponent<{
25
25
  level?: 1 | 2 | 3 | 4 | 5 | 6;
26
- 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | (string & {});
26
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
27
27
  asChild?: boolean;
28
28
  } & React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
29
29
  Item: React.ForwardRefExoticComponent<{
@@ -9,7 +9,7 @@ export type FieldsetDescriptionProps = ParagraphProps;
9
9
  * </Fieldset.Description>
10
10
  */
11
11
  export declare const FieldsetDescription: React.ForwardRefExoticComponent<{
12
- 'data-size'?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
12
+ 'data-size'?: "xs" | "sm" | "md" | "lg" | "xl";
13
13
  variant?: "long" | "default" | "short";
14
14
  asChild?: boolean;
15
15
  } & React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLLegendElement>>;
@@ -18,7 +18,7 @@ import { FieldsetLegend } from './FieldsetLegend';
18
18
  declare const Fieldset: React.ForwardRefExoticComponent<import("../../types").DefaultProps & React.FieldsetHTMLAttributes<HTMLFieldSetElement> & React.RefAttributes<HTMLFieldSetElement>> & {
19
19
  Legend: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLLegendElement> & import("../../types").DefaultProps & React.RefAttributes<HTMLLegendElement>>;
20
20
  Description: React.ForwardRefExoticComponent<{
21
- 'data-size'?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
21
+ 'data-size'?: "xs" | "sm" | "md" | "lg" | "xl";
22
22
  variant?: "long" | "default" | "short";
23
23
  asChild?: boolean;
24
24
  } & React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLLegendElement>>;
@@ -9,7 +9,7 @@ export type HeadingProps = {
9
9
  * Changes text sizing
10
10
  * @default 'md'
11
11
  */
12
- 'data-size'?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | (string & {});
12
+ 'data-size'?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
13
13
  /**
14
14
  * Change the default rendered element for the one passed as a child, merging their props and behavior.
15
15
  * @default false
@@ -32,7 +32,7 @@ export declare const Heading: React.ForwardRefExoticComponent<{
32
32
  * Changes text sizing
33
33
  * @default 'md'
34
34
  */
35
- 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | (string & {});
35
+ 'data-size'?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
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":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EACR,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO;IA/BlB;;;OAGG;YACK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;IAC7B;;;OAGG;kBAEC,KAAK,GACL,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,CAAC,MAAM,GAAG,EAAE,CAAC;IACjB;;;OAGG;cACO,OAAO;iFAiBlB,CAAC"}
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../src/components/Heading/Heading.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,OAAO,CAAC;AAGzD,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAEvC;;;;;GAKG;AACH,eAAO,MAAM,OAAO;IAvBlB;;;OAGG;YACK,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;IAC7B;;;OAGG;kBACW,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK;IAC9D;;;OAGG;cACO,OAAO;iFAiBlB,CAAC"}
@@ -37,7 +37,5 @@ export type { PaginationProps } from './Pagination';
37
37
  export type { PaginationButtonProps } from './PaginationButton';
38
38
  export type { PaginationListProps } from './PaginationList';
39
39
  export type { PaginationItemProps } from './PaginationItem';
40
- export type { UsePaginationProps } from './usePagination';
41
40
  export { Pagination, PaginationList, PaginationItem, PaginationButton };
42
- export { usePagination } from './usePagination';
43
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;CAId,CAAC;AAMH,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAE1D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;;;;;;;;;;GAiBG;AACH,QAAA,MAAM,UAAU;;;;;;;;;;;;;CAId,CAAC;AAMH,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAC"}
@@ -3,7 +3,7 @@ export type ParagraphProps = {
3
3
  /**
4
4
  * Changes text sizing
5
5
  */
6
- 'data-size'?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {});
6
+ 'data-size'?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
7
7
  /**
8
8
  * Adjusts styling for paragraph length
9
9
  * @default 'default'
@@ -26,7 +26,7 @@ export declare const Paragraph: React.ForwardRefExoticComponent<{
26
26
  /**
27
27
  * Changes text sizing
28
28
  */
29
- 'data-size'?: "xs" | "sm" | "md" | "lg" | "xl" | (string & {});
29
+ 'data-size'?: "xs" | "sm" | "md" | "lg" | "xl";
30
30
  /**
31
31
  * Adjusts styling for paragraph length
32
32
  * @default 'default'
@@ -1 +1 @@
1
- {"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../src/components/Paragraph/Paragraph.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAC/D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IAvBpB;;OAEG;kBACW,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC;IAC9D;;;OAGG;cACO,MAAM,GAAG,SAAS,GAAG,OAAO;IACtC;;;OAGG;cACO,OAAO;qFA0BlB,CAAC"}
1
+ {"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../src/components/Paragraph/Paragraph.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC/C;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IAvBpB;;OAEG;kBACW,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;IAC9C;;;OAGG;cACO,MAAM,GAAG,SAAS,GAAG,OAAO;IACtC;;;OAGG;cACO,OAAO;qFA0BlB,CAAC"}
@@ -29,6 +29,12 @@ export type PopoverProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivEleme
29
29
  * @default undefined
30
30
  */
31
31
  open?: boolean;
32
+ /**
33
+ * Change the background color of the popover.
34
+ *
35
+ * @default 'default'
36
+ */
37
+ 'data-variant'?: 'default' | 'tinted';
32
38
  /**
33
39
  * Callback when the popover wants to open.
34
40
  */
@@ -65,7 +71,7 @@ export type PopoverProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivEleme
65
71
  * Content
66
72
  * </Popover>
67
73
  */
68
- export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "id" | "asChild" | "open" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
74
+ export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "id" | "asChild" | "open" | "data-variant" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
69
75
  /**
70
76
  * id to connect the trigger with the popover - required when not using Popover.Context.
71
77
  */
@@ -80,6 +86,12 @@ export declare const Popover: React.ForwardRefExoticComponent<Omit<DefaultProps
80
86
  * @default undefined
81
87
  */
82
88
  open?: boolean;
89
+ /**
90
+ * Change the background color of the popover.
91
+ *
92
+ * @default 'default'
93
+ */
94
+ 'data-variant'?: "default" | "tinted";
83
95
  /**
84
96
  * Callback when the popover wants to open.
85
97
  */
@@ -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;;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;IApDhB;;OAEG;SACE,MAAM;IACX;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;WACI,OAAO;IACd;;OAEG;aACM,MAAM,IAAI;IACnB;;OAEG;cACO,MAAM,IAAI;IACpB;;;OAGG;oBACa,OAAO;IACvB;;;OAGG;cACO,OAAO;wCA+HpB,CAAC"}
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"}
@@ -11,10 +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" | "asChild" | "open" | "placement" | "onClose" | "onOpen" | "autoPlacement"> & {
14
+ declare const Popover: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "id" | "asChild" | "open" | "data-variant" | "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
19
  onOpen?: () => void;
19
20
  onClose?: () => void;
20
21
  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,10 +22,10 @@ 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" | "asChild" | "variant" | "icon" | "loading"> & {
25
+ export declare const SearchButton: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
26
26
  variant?: "primary" | "secondary" | "tertiary";
27
27
  icon?: boolean;
28
- loading?: boolean;
28
+ loading?: boolean | ReactNode;
29
29
  asChild?: boolean;
30
30
  type?: React.ButtonHTMLAttributes<HTMLButtonElement>["type"];
31
31
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -21,10 +21,10 @@ 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" | "asChild" | "variant" | "icon" | "loading"> & {
24
+ Button: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "variant" | "icon" | "loading" | "asChild"> & {
25
25
  variant?: "primary" | "secondary" | "tertiary";
26
26
  icon?: boolean;
27
- loading?: boolean;
27
+ loading?: boolean | React.ReactNode;
28
28
  asChild?: boolean;
29
29
  type?: React.ButtonHTMLAttributes<HTMLButtonElement>["type"];
30
30
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -7,7 +7,7 @@ export type SpinnerProps = {
7
7
  /**
8
8
  * Spinner size
9
9
  */
10
- 'data-size'?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | (string & {});
10
+ 'data-size'?: '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
11
11
  } & ComponentPropsWithoutRef<'svg'> & ({
12
12
  'aria-label': string;
13
13
  'aria-hidden'?: never;
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAGlE,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACxE,GAAG,wBAAwB,CAAC,KAAK,CAAC,GACjC,CACI;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/C;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,CAC1D,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,OAAO,oFA0ClB,CAAC"}
1
+ {"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,wBAAwB,EAAc,MAAM,OAAO,CAAC;AAGlE,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CACxD,GAAG,wBAAwB,CAAC,KAAK,CAAC,GACjC,CACI;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,KAAK,CAAA;CAAE,GAC/C;IAAE,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,IAAI,GAAG,MAAM,CAAA;CAAE,CAC1D,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,OAAO,oFA0ClB,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;wCAiEpB,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;wCAgEpB,CAAC"}
@@ -1,13 +1,6 @@
1
- import type { HTMLAttributes } from 'react';
1
+ import type { OptionHTMLAttributes } from 'react';
2
2
  import type { DefaultProps } from '../../types';
3
- import type { MergeRight } from '../../utilities';
4
- export type SuggestionEmptyProps = MergeRight<DefaultProps & HTMLAttributes<HTMLDivElement>, {
5
- /**
6
- * Change the default rendered element for the one passed as a child, merging their props and behavior.
7
- * @default false
8
- */
9
- asChild?: boolean;
10
- }>;
3
+ export type SuggestionEmptyProps = DefaultProps & OptionHTMLAttributes<HTMLOptionElement>;
11
4
  /**
12
5
  * Component that provides an empty suggestion list.
13
6
  *
@@ -18,11 +11,5 @@ export type SuggestionEmptyProps = MergeRight<DefaultProps & HTMLAttributes<HTML
18
11
  * <Suggestion.Empty>Tomt</Suggestion.Empty>
19
12
  * </Suggestion.List>
20
13
  */
21
- export declare const SuggestionEmpty: React.ForwardRefExoticComponent<Omit<DefaultProps & HTMLAttributes<HTMLDivElement>, "asChild"> & {
22
- /**
23
- * Change the default rendered element for the one passed as a child, merging their props and behavior.
24
- * @default false
25
- */
26
- asChild?: boolean;
27
- } & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const SuggestionEmpty: React.ForwardRefExoticComponent<DefaultProps & OptionHTMLAttributes<HTMLOptionElement> & React.RefAttributes<HTMLOptionElement>>;
28
15
  //# sourceMappingURL=SuggestionEmpty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SuggestionEmpty.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/SuggestionEmpty.tsx"],"names":[],"mappings":"AACA,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,oBAAoB,GAAG,UAAU,CAC3C,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,EAC7C;IACE;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CACF,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe;IAlBxB;;;OAGG;cACO,OAAO;wCA4BpB,CAAC"}
1
+ {"version":3,"file":"SuggestionEmpty.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/SuggestionEmpty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAC7C,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAE1C;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,kIAQ1B,CAAC"}
@@ -38,9 +38,7 @@ declare const EXPERIMENTAL_Suggestion: React.ForwardRefExoticComponent<Omit<impo
38
38
  readOnly?: boolean;
39
39
  role?: React.AriaRole | undefined;
40
40
  } & React.RefAttributes<HTMLInputElement>>;
41
- Empty: React.ForwardRefExoticComponent<Omit<import("../../types").DefaultProps & React.HTMLAttributes<HTMLDivElement>, "asChild"> & {
42
- asChild?: boolean;
43
- } & React.RefAttributes<HTMLDivElement>>;
41
+ Empty: React.ForwardRefExoticComponent<import("../../types").DefaultProps & React.OptionHTMLAttributes<HTMLOptionElement> & React.RefAttributes<HTMLOptionElement>>;
44
42
  Option: React.ForwardRefExoticComponent<React.OptionHTMLAttributes<HTMLOptionElement> & import("../../types").DefaultProps & React.RefAttributes<HTMLOptionElement>>;
45
43
  Clear: React.ForwardRefExoticComponent<Omit<import("..").ButtonProps, "children" | "variant"> & {
46
44
  'aria-label'?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3B,CAAC;AASH,OAAO,EACL,uBAAuB,EACvB,cAAc,IAAI,2BAA2B,EAC7C,eAAe,IAAI,4BAA4B,EAC/C,eAAe,IAAI,4BAA4B,EAC/C,gBAAgB,IAAI,6BAA6B,EACjD,eAAe,IAAI,4BAA4B,GAChD,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Suggestion/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;CAM3B,CAAC;AASH,OAAO,EACL,uBAAuB,EACvB,cAAc,IAAI,2BAA2B,EAC7C,eAAe,IAAI,4BAA4B,EAC/C,eAAe,IAAI,4BAA4B,EAC/C,gBAAgB,IAAI,6BAA6B,EACjD,eAAe,IAAI,4BAA4B,GAChD,CAAC;AACF,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -30,7 +30,7 @@ export * from './Tabs';
30
30
  export * from './ToggleGroup';
31
31
  export * from './Popover';
32
32
  export * from './Divider';
33
- export * from './Modal';
33
+ export * from './Dialog';
34
34
  export * from './Dropdown';
35
35
  export * from './Search';
36
36
  export * from './Card';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
@@ -5,12 +5,12 @@ export type DefaultProps = {
5
5
  /**
6
6
  * Changes size for descendant Designsystemet components. Select from predefined sizes.
7
7
  */
8
- 'data-size'?: Size | (string & {});
8
+ 'data-size'?: Size;
9
9
  /**
10
10
  * Changes color for descendant Designsystemet components.
11
11
  * Select from predefined colors and colors defined using theme.designsystemet.no.
12
12
  */
13
- 'data-color'?: Color | (string & {});
13
+ 'data-color'?: Color;
14
14
  };
15
15
  export type LabelRequired = {
16
16
  'aria-label': string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,aAAa,GACrB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAClE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACrE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,MAAM,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEtC,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,aAAa,GACrB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,GAClE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,CAAC,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,GACrE;IAAE,YAAY,CAAC,EAAE,KAAK,CAAC;IAAC,iBAAiB,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC"}
@@ -4,6 +4,8 @@ export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect/useIsomor
4
4
  export { useMediaQuery } from './useMediaQuery/useMediaQuery';
5
5
  export { useRadioGroup } from './useRadioGroup/useRadioGroup';
6
6
  export { useSynchronizedAnimation } from './useSynchronizedAnimation/useSynchronizedAnimation';
7
+ export { usePagination } from './usePagination/usePagination';
7
8
  export type { UseRadioGroupProps } from './useRadioGroup/useRadioGroup';
8
9
  export type { UseCheckboxGroupProps } from './useCheckboxGroup/useCheckboxGroup';
10
+ export type { UsePaginationProps } from './usePagination/usePagination';
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAE/F,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,YAAY,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,YAAY,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC"}
@@ -45,7 +45,8 @@ export type UseCheckboxGroupProps = {
45
45
  export type GetCheckboxProps = Omit<CheckboxProps, 'prefix' | 'role' | 'type' | 'size' | 'aria-label' | 'aria-labelledby' | 'label' | 'checked' | 'value'> & {
46
46
  /** Enables indeterminate handling for this `Checkbox` and `CheckboxGroup` */
47
47
  allowIndeterminate?: boolean;
48
- ref?: React.Ref<HTMLInputElement | null>;
48
+ ref?: React.ForwardedRef<HTMLInputElement>;
49
+ checked?: boolean;
49
50
  value?: string;
50
51
  };
51
52
  type useCheckboxGroupReturn = {
@@ -1 +1 @@
1
- {"version":3,"file":"useCheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,aAAa,EACX,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,SAAS,GACT,OAAO,CACV,GAAG;IACF,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAgBF,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACzD,gBAAgB,EAAE,CAChB,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB,KACrC,gBAAgB,CAAC;IACtB,sBAAsB,EAAE;QACtB,QAAQ,EAAE,SAAS,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,qBAAqB,GAC5B,sBAAsB,CAwIxB"}
1
+ {"version":3,"file":"useCheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/useCheckboxGroup/useCheckboxGroup.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAe,SAAS,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,aAAa,EACX,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,YAAY,GACZ,iBAAiB,GACjB,OAAO,GACP,SAAS,GACT,OAAO,CACV,GAAG;IACF,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAgBF,KAAK,sBAAsB,GAAG;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IACzD,gBAAgB,EAAE,CAChB,YAAY,CAAC,EAAE,MAAM,GAAG,gBAAgB,KACrC,gBAAgB,CAAC;IACtB,sBAAsB,EAAE;QACtB,QAAQ,EAAE,SAAS,CAAC;QACpB,MAAM,EAAE,OAAO,CAAC;QAChB,EAAE,EAAE,MAAM,CAAC;KACZ,CAAC;CACH,CAAC;AAEF,wBAAgB,gBAAgB,CAC9B,KAAK,CAAC,EAAE,qBAAqB,GAC5B,sBAAsB,CAwIxB"}
@@ -1,20 +1,11 @@
1
1
  import type { MouseEvent } from 'react';
2
- import type { PaginationButtonProps } from './PaginationButton';
2
+ import type { PaginationButtonProps } from '../../../components';
3
3
  export type UsePaginationProps = {
4
4
  /**
5
5
  * The current page number
6
6
  * @default 1
7
7
  */
8
8
  currentPage: number;
9
- /**
10
- * Function to change currentPage - typically returned from useState
11
- */
12
- setCurrentPage?: (page: number) => void;
13
- /**
14
- * Callback when the page changes
15
- * (event: MouseEvent<HTMLElement>, page: number) => void
16
- */
17
- onChange?: (event: MouseEvent<HTMLElement>, page: number) => void;
18
9
  /**
19
10
  * The total number of pages
20
11
  * @default 1
@@ -22,9 +13,17 @@ export type UsePaginationProps = {
22
13
  totalPages: number;
23
14
  /**
24
15
  * The maximum number of pages to show
25
- * @default 1
16
+ * @default 7
26
17
  */
27
18
  showPages?: number;
19
+ /**
20
+ * Callback to set the current page
21
+ */
22
+ setCurrentPage?: (page: number) => void;
23
+ /**
24
+ * Callback when the page changes
25
+ */
26
+ onChange?: (event: MouseEvent<HTMLElement>, page: number) => void;
28
27
  };
29
28
  /**
30
29
  * Hook to help manage pagination state
@@ -58,8 +57,17 @@ export type UsePaginationProps = {
58
57
  export declare const usePagination: ({ currentPage, setCurrentPage, onChange, totalPages, showPages, }: UsePaginationProps) => {
59
58
  /** Number of steps */
60
59
  pages: {
60
+ /**
61
+ * Page number or "ellipsis" for the ellipsis item
62
+ */
61
63
  page: string | number;
64
+ /**
65
+ * Unique key for the item
66
+ */
62
67
  itemKey: string;
68
+ /**
69
+ * Properties to spread on Pagination.Button
70
+ */
63
71
  buttonProps: PaginationButtonProps | null;
64
72
  }[];
65
73
  /** Properties to spread on Pagination.Button used for previous naviagation */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePagination.d.ts","sourceRoot":"","sources":["../../../../src/utilities/hooks/usePagination/usePagination.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAcjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4BI;AACJ,eAAO,MAAM,aAAa,sEAMvB,kBAAkB;IAWf,sBAAsB;;QAGlB;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;qBAOU,qBAAqB,GAAG,IAAI;;IAG7C,8EAA8E;qBAKzE,qBAAqB;IAC1B,0EAA0E;qBAKrE,qBAAqB;IAC1B,gEAAgE;;IAEhE,4DAA4D;;CAGxB,CAAC"}