@smudi/designsystem 1.5.3 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/@smudi/components/button/button.d.ts +19 -1
  2. package/@smudi/components/button/button.d.ts.map +1 -1
  3. package/@smudi/components/button/button.js +16 -15
  4. package/@smudi/components/card/card-icon-block.d.ts +18 -0
  5. package/@smudi/components/card/card-icon-block.d.ts.map +1 -1
  6. package/@smudi/components/card/card.d.ts +13 -0
  7. package/@smudi/components/card/card.d.ts.map +1 -1
  8. package/@smudi/components/dialog/dialog.d.ts +12 -0
  9. package/@smudi/components/dialog/dialog.d.ts.map +1 -1
  10. package/@smudi/components/dropdown/dropdown-button.d.ts +15 -6
  11. package/@smudi/components/dropdown/dropdown-button.d.ts.map +1 -1
  12. package/@smudi/components/dropdown/dropdown-item.d.ts +11 -1
  13. package/@smudi/components/dropdown/dropdown-item.d.ts.map +1 -1
  14. package/@smudi/components/dropdown/dropdown-list.d.ts +11 -1
  15. package/@smudi/components/dropdown/dropdown-list.d.ts.map +1 -1
  16. package/@smudi/components/dropdown/dropdown.d.ts +16 -1
  17. package/@smudi/components/dropdown/dropdown.d.ts.map +1 -1
  18. package/@smudi/components/file-upload/file-upload.d.ts +6 -0
  19. package/@smudi/components/file-upload/file-upload.d.ts.map +1 -0
  20. package/@smudi/components/file-upload/file-upload.js +7 -0
  21. package/@smudi/components/header/header-content.d.ts +11 -0
  22. package/@smudi/components/header/header-content.d.ts.map +1 -1
  23. package/@smudi/components/header/header-divider.d.ts +14 -0
  24. package/@smudi/components/header/header-divider.d.ts.map +1 -1
  25. package/@smudi/components/header/header-menu/header-menu-button.d.ts +9 -0
  26. package/@smudi/components/header/header-menu/header-menu-button.d.ts.map +1 -1
  27. package/@smudi/components/header/header-menu/header-menu-content.d.ts +13 -0
  28. package/@smudi/components/header/header-menu/header-menu-content.d.ts.map +1 -1
  29. package/@smudi/components/header/header-menu/header-menu-group.d.ts +10 -0
  30. package/@smudi/components/header/header-menu/header-menu-group.d.ts.map +1 -1
  31. package/@smudi/components/header/header-menu/header-menu-item.d.ts +16 -0
  32. package/@smudi/components/header/header-menu/header-menu-item.d.ts.map +1 -1
  33. package/@smudi/components/header/header-menu/header-menu.d.ts +15 -0
  34. package/@smudi/components/header/header-menu/header-menu.d.ts.map +1 -1
  35. package/@smudi/components/header/header-search/header-search-button.d.ts +17 -0
  36. package/@smudi/components/header/header-search/header-search-button.d.ts.map +1 -1
  37. package/@smudi/components/header/header-search/header-search.d.ts +18 -0
  38. package/@smudi/components/header/header-search/header-search.d.ts.map +1 -1
  39. package/@smudi/components/header/header.d.ts +65 -23
  40. package/@smudi/components/header/header.d.ts.map +1 -1
  41. package/@smudi/components/layout-components/cluster-layouts/cluster-layout.module.css.js +1 -1
  42. package/@smudi/components/layout-components/split-view/index.d.ts +8 -0
  43. package/@smudi/components/layout-components/split-view/index.d.ts.map +1 -0
  44. package/@smudi/components/layout-components/split-view/index.js +10 -0
  45. package/@smudi/components/layout-components/split-view/split-view-divider.d.ts +8 -0
  46. package/@smudi/components/layout-components/split-view/split-view-divider.d.ts.map +1 -0
  47. package/@smudi/components/layout-components/split-view/split-view-divider.js +44 -0
  48. package/@smudi/components/layout-components/split-view/split-view-divider.module.css.js +9 -0
  49. package/@smudi/components/layout-components/split-view/split-view-panel.d.ts +23 -0
  50. package/@smudi/components/layout-components/split-view/split-view-panel.d.ts.map +1 -0
  51. package/@smudi/components/layout-components/split-view/split-view-panel.js +8 -0
  52. package/@smudi/components/layout-components/split-view/split-view.d.ts +14 -0
  53. package/@smudi/components/layout-components/split-view/split-view.d.ts.map +1 -0
  54. package/@smudi/components/layout-components/split-view/split-view.js +67 -0
  55. package/@smudi/components/layout-components/split-view/split-view.module.css.js +8 -0
  56. package/@smudi/components/layout-components/split-view/use-resize.d.ts +34 -0
  57. package/@smudi/components/layout-components/split-view/use-resize.d.ts.map +1 -0
  58. package/@smudi/components/layout-components/split-view/use-resize.js +67 -0
  59. package/@smudi/components/select/select.d.ts +7 -0
  60. package/@smudi/components/select/select.d.ts.map +1 -1
  61. package/@smudi/components/select/select.js +13 -6
  62. package/@smudi/components/stepper/step/step.module.css.js +4 -4
  63. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts +4 -0
  64. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts.map +1 -1
  65. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts +17 -0
  66. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts.map +1 -1
  67. package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.js +43 -82
  68. package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts +10 -0
  69. package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts.map +1 -1
  70. package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.js +44 -33
  71. package/@smudi/components/suggestion/suggestion.d.ts +1 -0
  72. package/@smudi/components/suggestion/suggestion.d.ts.map +1 -1
  73. package/@smudi/components/switch/switch.js +7 -0
  74. package/@smudi/components/table/table.d.ts +25 -3
  75. package/@smudi/components/table/table.d.ts.map +1 -1
  76. package/@smudi/components/table/table.js +21 -3
  77. package/@smudi/components/toast/toast.d.ts +45 -0
  78. package/@smudi/components/toast/toast.d.ts.map +1 -1
  79. package/@smudi/components/toast/toast.js +144 -141
  80. package/@smudi/react.js +114 -108
  81. package/@smudi/smudi/icons/metadata.d.ts +9 -9
  82. package/@smudi/smudi/react.d.ts +4 -1
  83. package/@smudi/smudi/react.d.ts.map +1 -1
  84. package/@smudi/styles.css +1 -1
  85. package/@smudi/types/modular-scale.type.d.ts +1 -1
  86. package/README.md +33 -0
  87. package/package.json +11 -10
@@ -1,7 +1,25 @@
1
1
  import { ButtonProps as DigdirButtonProps } from '@digdir/designsystemet-react';
2
- interface ButtonProps extends Omit<DigdirButtonProps, "variant"> {
2
+ interface ButtonProps extends Omit<DigdirButtonProps, "variant" | "data-size"> {
3
+ /**
4
+ * Size of the button. Extends Digdir's sizes with an additional `"xs"` option
5
+ * for more compact UIs.
6
+ */
7
+ ["data-size"]?: DigdirButtonProps["data-size"] | "xs";
8
+ /**
9
+ * Visual style of the button. Extends Digdir's variants with an additional
10
+ * `"secondary-tinted"` option, a secondary button on a tinted background meant for icons only.
11
+ */
3
12
  variant?: DigdirButtonProps["variant"] | "secondary-tinted";
4
13
  }
14
+ /**
15
+ * Button used to trigger an action. Wraps Digdir's `Button` with an extra
16
+ * `"xs"` size and a `"secondary-tinted"` variant.
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * <Button data-size="md">Click me</Button>
21
+ * ```
22
+ */
5
23
  declare const ButtonComponent: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
6
24
  export type { ButtonProps };
7
25
  export { ButtonComponent as Button };
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,IAAI,iBAAiB,EACtC,MAAM,8BAA8B,CAAC;AAGtC,UAAU,WAAY,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,CAAC;IAC9D,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,kBAAkB,CAAC;CAC7D;AAED,QAAA,MAAM,eAAe,uFAsBpB,CAAC;AAIF,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../components/button/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,WAAW,IAAI,iBAAiB,EACtC,MAAM,8BAA8B,CAAC;AAGtC,UAAU,WAAY,SAAQ,IAAI,CAAC,iBAAiB,EAAE,SAAS,GAAG,WAAW,CAAC;IAC5E;;;OAGG;IACH,CAAC,WAAW,CAAC,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC;IACtD;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,GAAG,kBAAkB,CAAC;CAC7D;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,eAAe,uFA4BpB,CAAC;AAIF,YAAY,EAAE,WAAW,EAAE,CAAC;AAC5B,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
@@ -1,26 +1,27 @@
1
1
  "use client";
2
- import { jsx as a } from "react/jsx-runtime";
3
- import { Button as d } from "@digdir/designsystemet-react";
4
- import { forwardRef as m } from "react";
5
- const u = m(
6
- function({ variant: o, className: n, ...e }, s) {
7
- const t = o === "secondary-tinted", r = t ? "secondary" : o, i = [
2
+ import { jsx as d } from "react/jsx-runtime";
3
+ import { Button as m } from "@digdir/designsystemet-react";
4
+ import { forwardRef as u } from "react";
5
+ const c = u(
6
+ function({ variant: t, className: n, "data-size": e, ...s }, a) {
7
+ const o = t === "secondary-tinted", i = o ? "secondary" : t, r = [
8
8
  n,
9
9
  "smudi-button",
10
- t ? "smudi-button--secondary-tinted" : void 0
10
+ o ? "smudi-button--secondary-tinted" : void 0
11
11
  ].filter(Boolean).join(" ");
12
- return /* @__PURE__ */ a(
13
- d,
12
+ return /* @__PURE__ */ d(
13
+ m,
14
14
  {
15
- ...e,
16
- ref: s,
17
- variant: r,
18
- className: i || void 0
15
+ ...s,
16
+ "data-size": e,
17
+ ref: a,
18
+ variant: i,
19
+ className: r || void 0
19
20
  }
20
21
  );
21
22
  }
22
23
  );
23
- u.displayName = "Button";
24
+ c.displayName = "Button";
24
25
  export {
25
- u as Button
26
+ c as Button
26
27
  };
@@ -1,6 +1,24 @@
1
1
  export interface CardIconBlockProps extends React.HTMLAttributes<HTMLDivElement> {
2
2
  children?: React.ReactNode;
3
+ /**
4
+ * Direction the icon and its content are stacked in.
5
+ * @default "vertical"
6
+ */
3
7
  orientation?: "vertical" | "horizontal";
4
8
  }
9
+ /**
10
+ * Block for showing an icon together with content (e.g. a heading and text)
11
+ * inside a `Card`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Card>
16
+ * <Card.IconBlock>
17
+ * <SomeIcon aria-hidden />
18
+ * <Heading level={3}>Title</Heading>
19
+ * </Card.IconBlock>
20
+ * </Card>
21
+ * ```
22
+ */
5
23
  export declare const CardIconBlock: React.ForwardRefExoticComponent<CardIconBlockProps & React.RefAttributes<HTMLDivElement>>;
6
24
  //# sourceMappingURL=card-icon-block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"card-icon-block.d.ts","sourceRoot":"","sources":["../../../components/card/card-icon-block.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACzC;AAED,eAAO,MAAM,aAAa,2FAgBzB,CAAC"}
1
+ {"version":3,"file":"card-icon-block.d.ts","sourceRoot":"","sources":["../../../components/card/card-icon-block.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC9E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACzC;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,2FAgBzB,CAAC"}
@@ -3,6 +3,19 @@ import { CardIconBlock, CardIconBlockProps } from './card-icon-block';
3
3
  type Card = typeof CardRoot & {
4
4
  IconBlock: typeof CardIconBlock;
5
5
  };
6
+ /**
7
+ * Container used to group related content and actions. Wraps Digdir's
8
+ * `Card` and adds a `Card.IconBlock` subcomponent.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Card>
13
+ * <Card.IconBlock>
14
+ * <Heading level={3}>Title</Heading>
15
+ * </Card.IconBlock>
16
+ * </Card>
17
+ * ```
18
+ */
6
19
  declare const CardComponent: Card;
7
20
  export type { CardProps, CardIconBlockProps };
8
21
  export { CardComponent as Card };
@@ -1 +1 @@
1
- {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,KAAK,IAAI,GAAG,OAAO,QAAQ,GAAG;IAC5B,SAAS,EAAE,OAAO,aAAa,CAAC;CACjC,CAAC;AAEF,QAAA,MAAM,aAAa,EAAe,IAAI,CAAC;AAIvC,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AAC9C,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../components/card/card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE3E,KAAK,IAAI,GAAG,OAAO,QAAQ,GAAG;IAC5B,SAAS,EAAE,OAAO,aAAa,CAAC;CACjC,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,aAAa,EAAe,IAAI,CAAC;AAIvC,YAAY,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AAC9C,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE,CAAC"}
@@ -3,6 +3,18 @@ import { DialogSection, DialogSectionProps } from './dialog-section';
3
3
  type Dialog = typeof DialogRoot & {
4
4
  Section: typeof DialogSection;
5
5
  };
6
+ /**
7
+ * Modal dialog for content that requires the user's attention or a
8
+ * decision before they can continue. Wraps Digdir's `Dialog` and adds a
9
+ * `Dialog.Section` subcomponent.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <Dialog>
14
+ * <Dialog.Section>Content</Dialog.Section>
15
+ * </Dialog>
16
+ * ```
17
+ */
6
18
  declare const DialogComponent: Dialog;
7
19
  export type { DialogProps, DialogSectionProps };
8
20
  export { DialogComponent as Dialog };
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAErE,KAAK,MAAM,GAAG,OAAO,UAAU,GAAG;IAChC,OAAO,EAAE,OAAO,aAAa,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,eAAe,EAAiB,MAAM,CAAC;AAK7C,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAChD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,IAAI,UAAU,EACpB,KAAK,WAAW,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAErE,KAAK,MAAM,GAAG,OAAO,UAAU,GAAG;IAChC,OAAO,EAAE,OAAO,aAAa,CAAC;CAC/B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,eAAe,EAAiB,MAAM,CAAC;AAK7C,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC;AAChD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,CAAC"}
@@ -1,21 +1,21 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import { DropdownButtonProps as DropdownButtonRootProps } from '@digdir/designsystemet-react';
3
3
  export interface DropdownButtonClickEvent {
4
- /** Det originale click-eventet */
4
+ /** The original click event */
5
5
  event: MouseEvent<HTMLButtonElement>;
6
- /** Funksjon for å lukke Dropdown */
6
+ /** Function to close the Dropdown */
7
7
  close: () => void;
8
8
  }
9
9
  /** @expand */
10
10
  export interface DropdownButtonProps extends Omit<DropdownButtonRootProps, "onClick" | "type"> {
11
11
  /**
12
- * Når den er true, lukkes ikke Dropdown automatisk ved klikk. For å lukke den
13
- * kan du bruke close-funksjonen fra onClick-handleren.
12
+ * When true, the Dropdown is not closed automatically on click. To close it
13
+ * you can use the close function from the onClick handler.
14
14
  */
15
15
  preventAutoClose?: boolean;
16
16
  /**
17
- * Egendefinert click-event som inneholder originalt event og en
18
- * close-funksjon som lukker Dropdown.
17
+ * Custom click event that contains the original event and a
18
+ * close function that closes the Dropdown.
19
19
  *
20
20
  * {
21
21
  * event: MouseEvent<HTMLButtonElement>;
@@ -26,5 +26,14 @@ export interface DropdownButtonProps extends Omit<DropdownButtonRootProps, "onCl
26
26
  */
27
27
  onClick?: (event: DropdownButtonClickEvent) => void;
28
28
  }
29
+ /**
30
+ * Button that triggers an action inside a Dropdown menu. Closes the Dropdown
31
+ * automatically after being clicked, unless `preventAutoClose` is set.
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <Dropdown.Button onClick={({ close }) => close()}>Log out</Dropdown.Button>
36
+ * ```
37
+ */
29
38
  export declare const DropdownButton: React.ForwardRefExoticComponent<DropdownButtonProps & React.RefAttributes<HTMLButtonElement>>;
30
39
  //# sourceMappingURL=dropdown-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-button.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAEL,KAAK,mBAAmB,IAAI,uBAAuB,EACpD,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,wBAAwB;IACvC,kCAAkC;IAClC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IACrC,oCAAoC;IACpC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,cAAc;AACd,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,uBAAuB,EACvB,SAAS,GAAG,MAAM,CACnB;IACC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACrD;AAED,eAAO,MAAM,cAAc,+FAkBzB,CAAC"}
1
+ {"version":3,"file":"dropdown-button.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,EAEL,KAAK,mBAAmB,IAAI,uBAAuB,EACpD,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,wBAAwB;IACvC,+BAA+B;IAC/B,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,CAAC;IACrC,qCAAqC;IACrC,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,cAAc;AACd,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,uBAAuB,EACvB,SAAS,GAAG,MAAM,CACnB;IACC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,+FAkBzB,CAAC"}
@@ -2,9 +2,19 @@ import { DropdownItemProps as DropdownItemRootProps } from '@digdir/designsystem
2
2
  /** @expand */
3
3
  export interface DropdownItemProps extends DropdownItemRootProps {
4
4
  /**
5
- * Viser en skillelinje under elementet. Skjules hvis dette elementet er det siste.
5
+ * Shows a divider below the item. Hidden if this is the last item.
6
6
  */
7
7
  divider?: boolean;
8
8
  }
9
+ /**
10
+ * A single choice inside a `Dropdown.List`.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Dropdown.List>
15
+ * <Dropdown.Item>Item 1</Dropdown.Item>
16
+ * </Dropdown.List>
17
+ * ```
18
+ */
9
19
  export declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLLIElement>>;
10
20
  //# sourceMappingURL=dropdown-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-item.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,IAAI,qBAAqB,EAChD,MAAM,8BAA8B,CAAC;AAEtC,cAAc;AACd,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,yFAWxB,CAAC"}
1
+ {"version":3,"file":"dropdown-item.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,iBAAiB,IAAI,qBAAqB,EAChD,MAAM,8BAA8B,CAAC;AAEtC,cAAc;AACd,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,yFAWxB,CAAC"}
@@ -2,9 +2,19 @@ import { DropdownListProps as DropdownListRootProps } from '@digdir/designsystem
2
2
  /** @expand */
3
3
  export interface DropdownListProps extends DropdownListRootProps {
4
4
  /**
5
- * Viser en skillelinje under listen. Skjules hvis dette elementet er det siste.
5
+ * Shows a divider below the list. Hidden if this is the last item.
6
6
  */
7
7
  divider?: boolean;
8
8
  }
9
+ /**
10
+ * A list of `Dropdown.Item`s shown inside a `Dropdown`.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <Dropdown.List>
15
+ * <Dropdown.Item>Item 1</Dropdown.Item>
16
+ * </Dropdown.List>
17
+ * ```
18
+ */
9
19
  export declare const DropdownList: React.ForwardRefExoticComponent<DropdownListProps & React.RefAttributes<HTMLUListElement>>;
10
20
  //# sourceMappingURL=dropdown-list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown-list.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,IAAI,qBAAqB,EAChD,MAAM,8BAA8B,CAAC;AAGtC,cAAc;AACd,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,YAAY,4FAWxB,CAAC"}
1
+ {"version":3,"file":"dropdown-list.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,IAAI,qBAAqB,EAChD,MAAM,8BAA8B,CAAC;AAGtC,cAAc;AACd,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,4FAWxB,CAAC"}
@@ -6,9 +6,24 @@ import { DropdownList } from './dropdown-list';
6
6
  type ForwardedDropdown = ForwardRefExoticComponent<DropdownProps & RefAttributes<HTMLElement>>;
7
7
  /** @expand */
8
8
  type DropdownProps = Omit<DropdownRootProps, "open"> & {
9
- /** Gir siste åpningstilstand */
9
+ /** Called with the latest open state whenever the Dropdown opens or closes. */
10
10
  onOpenChange?: (open: boolean) => void;
11
11
  };
12
+ /**
13
+ * A menu that shows a list of choices on temporary overlay, triggered by a
14
+ * `Dropdown.Button`. Use `Dropdown.Item`/`Dropdown.List` to compose the menu
15
+ * content.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <Dropdown>
20
+ * <Dropdown.Button>Open menu</Dropdown.Button>
21
+ * <Dropdown.List>
22
+ * <Dropdown.Item>Item 1</Dropdown.Item>
23
+ * </Dropdown.List>
24
+ * </Dropdown>
25
+ * ```
26
+ */
12
27
  declare const DropdownMenu: ForwardedDropdown;
13
28
  declare const Dropdown: typeof DropdownMenu & Omit<typeof DropdownRoot, "Item" | "Button"> & {
14
29
  Item: typeof DropdownItem;
@@ -1 +1 @@
1
- {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,YAAY,EACxB,KAAK,aAAa,IAAI,iBAAiB,EACxC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,yBAAyB,EACzB,aAAa,EAGd,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,KAAK,iBAAiB,GAAG,yBAAyB,CAChD,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAC3C,CAAC;AAEF,cAAc;AACd,KAAK,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,GAAG;IACrD,gCAAgC;IAChC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF,QAAA,MAAM,YAAY,EAAE,iBAuCnB,CAAC;AAKF,QAAA,MAAM,QAAQ,EAKR,OAAO,YAAY,GACvB,IAAI,CAAC,OAAO,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAC7C,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,IAAI,EAAE,OAAO,YAAY,CAAC;CAC3B,CAAC;AAIJ,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,YAAY,EACxB,KAAK,aAAa,IAAI,iBAAiB,EACxC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAEL,yBAAyB,EACzB,aAAa,EAGd,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,KAAK,iBAAiB,GAAG,yBAAyB,CAChD,aAAa,GAAG,aAAa,CAAC,WAAW,CAAC,CAC3C,CAAC;AAEF,cAAc;AACd,KAAK,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC,GAAG;IACrD,+EAA+E;IAC/E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,YAAY,EAAE,iBAuCnB,CAAC;AAKF,QAAA,MAAM,QAAQ,EAKR,OAAO,YAAY,GACvB,IAAI,CAAC,OAAO,YAAY,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAC7C,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,MAAM,EAAE,OAAO,cAAc,CAAC;IAC9B,IAAI,EAAE,OAAO,YAAY,CAAC;CAC3B,CAAC;AAIJ,YAAY,EAAE,aAAa,EAAE,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { EXPERIMENTAL_FileUpload as FileUploadRoot, FileUploadProps } from '@digdir/designsystemet-react';
2
+ type FileUpload = typeof FileUploadRoot;
3
+ declare const FileUploadComponent: FileUpload;
4
+ export type { FileUploadProps };
5
+ export { FileUploadComponent as EXPERIMENTAL_FileUpload };
6
+ //# sourceMappingURL=file-upload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload.d.ts","sourceRoot":"","sources":["../../../components/file-upload/file-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,IAAI,cAAc,EACzC,KAAK,eAAe,EACrB,MAAM,8BAA8B,CAAC;AAEtC,KAAK,UAAU,GAAG,OAAO,cAAc,CAAC;AAExC,QAAA,MAAM,mBAAmB,EAAE,UAA2B,CAAC;AAIvD,YAAY,EAAE,eAAe,EAAE,CAAC;AAChC,OAAO,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import { EXPERIMENTAL_FileUpload as l } from "@digdir/designsystemet-react";
3
+ const o = l;
4
+ o.displayName = "EXPERIMENTAL_FileUpload";
5
+ export {
6
+ o as EXPERIMENTAL_FileUpload
7
+ };
@@ -1,4 +1,15 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export type HeaderContentProps = HTMLAttributes<HTMLDivElement>;
3
+ /**
4
+ * Container for a group of items inside a `Header` (e.g. navigation links,
5
+ * buttons), typically aligned together on one side of the header.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Header.Content>
10
+ * <Button variant="tertiary">Home</Button>
11
+ * </Header.Content>
12
+ * ```
13
+ */
3
14
  export declare const HeaderContent: React.ForwardRefExoticComponent<HeaderContentProps & React.RefAttributes<HTMLDivElement>>;
4
15
  //# sourceMappingURL=header-content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-content.d.ts","sourceRoot":"","sources":["../../../components/header/header-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,2FAUzB,CAAC"}
1
+ {"version":3,"file":"header-content.d.ts","sourceRoot":"","sources":["../../../components/header/header-content.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,aAAa,2FAUzB,CAAC"}
@@ -1,4 +1,18 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export type HeaderDividerProps = HTMLAttributes<HTMLDivElement>;
3
+ /**
4
+ * Visual divider used to separate groups of content inside a `Header`.
5
+ * Hidden from assistive technology by default; pass `role="separator"` if
6
+ * the divider conveys real structure.
7
+ *
8
+ * @example
9
+ * ```tsx
10
+ * <Header.Content>
11
+ * <Button variant="tertiary">Home</Button>
12
+ * <Header.Divider />
13
+ * <Button variant="tertiary">Services</Button>
14
+ * </Header.Content>
15
+ * ```
16
+ */
3
17
  export declare const HeaderDivider: React.ForwardRefExoticComponent<HeaderDividerProps & React.RefAttributes<HTMLDivElement>>;
4
18
  //# sourceMappingURL=header-divider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-divider.d.ts","sourceRoot":"","sources":["../../../components/header/header-divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,2FAuBzB,CAAC"}
1
+ {"version":3,"file":"header-divider.d.ts","sourceRoot":"","sources":["../../../components/header/header-divider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEhE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,aAAa,2FAuBzB,CAAC"}
@@ -1,4 +1,13 @@
1
1
  import { ButtonProps } from '../../button/button';
2
2
  export type HeaderMenuButtonProps = ButtonProps;
3
+ /**
4
+ * Button that opens/closes the `Header.Menu` popover. Renders as a Smudi
5
+ * `Button` and keeps its `aria-expanded` state in sync with the popover.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Header.Menu.Button />
10
+ * ```
11
+ */
3
12
  export declare const HeaderMenuButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
4
13
  //# sourceMappingURL=header-menu-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-menu-button.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEhD,eAAO,MAAM,gBAAgB,uFAwC3B,CAAC"}
1
+ {"version":3,"file":"header-menu-button.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEhD;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,uFAwC3B,CAAC"}
@@ -1,4 +1,17 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export type HeaderMenuContentProps = HTMLAttributes<HTMLDivElement>;
3
+ /**
4
+ * Scrollable content wrapper inside `Header.Menu`, used to hold one or more
5
+ * `Header.Menu.Group`s.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * <Header.Menu>
10
+ * <Header.Menu.Content>
11
+ * <Header.Menu.Group>...</Header.Menu.Group>
12
+ * </Header.Menu.Content>
13
+ * </Header.Menu>
14
+ * ```
15
+ */
3
16
  export declare const HeaderMenuContent: React.ForwardRefExoticComponent<HeaderMenuContentProps & React.RefAttributes<HTMLDivElement>>;
4
17
  //# sourceMappingURL=header-menu-content.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-menu-content.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEpE,eAAO,MAAM,iBAAiB,+FAW5B,CAAC"}
1
+ {"version":3,"file":"header-menu-content.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,sBAAsB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAEpE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,+FAW5B,CAAC"}
@@ -1,4 +1,14 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  export type HeaderMenuGroupProps = HTMLAttributes<HTMLDivElement>;
3
+ /**
4
+ * Groups related `Header.Menu.Item`s together inside a `Header.Menu`.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * <Header.Menu.Group>
9
+ * <Header.Menu.Item href="#">Home</Header.Menu.Item>
10
+ * </Header.Menu.Group>
11
+ * ```
12
+ */
3
13
  export declare const HeaderMenuGroup: React.ForwardRefExoticComponent<HeaderMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
4
14
  //# sourceMappingURL=header-menu-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-menu-group.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-group.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE,eAAO,MAAM,eAAe,6FAU3B,CAAC"}
1
+ {"version":3,"file":"header-menu-group.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-group.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,eAAe,6FAU3B,CAAC"}
@@ -1,12 +1,28 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { LinkProps } from '../../link/link';
3
3
  export type HeaderMenuItemProps = LinkProps & {
4
+ /**
5
+ * Icon shown at the end of the item.
6
+ * @default <ChevronRightIcon aria-hidden />
7
+ */
4
8
  icon?: ReactNode;
5
9
  };
10
+ /**
11
+ * A single navigation link inside `Header.Menu`.
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <Header.Menu.Item href="#">Home</Header.Menu.Item>
16
+ * ```
17
+ */
6
18
  export declare const HeaderMenuItem: React.ForwardRefExoticComponent<Omit<import('@digdir/designsystemet-react').DefaultProps & React.AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "asChild"> & {
7
19
  children: ReactNode;
8
20
  asChild?: boolean;
9
21
  } & {
22
+ /**
23
+ * Icon shown at the end of the item.
24
+ * @default <ChevronRightIcon aria-hidden />
25
+ */
10
26
  icon?: ReactNode;
11
27
  } & React.RefAttributes<HTMLAnchorElement>>;
12
28
  //# sourceMappingURL=header-menu-item.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-menu-item.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;WAHlB,SAAS;2CAsBhB,CAAC"}
1
+ {"version":3,"file":"header-menu-item.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG;IAC5C;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;IAfzB;;;OAGG;WACI,SAAS;2CA8BhB,CAAC"}
@@ -1,5 +1,20 @@
1
1
  import { PopoverProps } from '../../popover/popover';
2
2
  export declare const HEADER_MENU_ID = "smudi-header-menu";
3
3
  export type HeaderMenuProps = Omit<PopoverProps, "id" | "placement" | "autoPlacement" | "variant">;
4
+ /**
5
+ * Popover menu opened from a `Header.Menu.Button`, used for site navigation
6
+ * on smaller viewports. Compose its contents with `Header.Menu.Group` and
7
+ * `Header.Menu.Item`.
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * <Header.Menu.Button />
12
+ * <Header.Menu>
13
+ * <Header.Menu.Group>
14
+ * <Header.Menu.Item href="#">Home</Header.Menu.Item>
15
+ * </Header.Menu.Group>
16
+ * </Header.Menu>
17
+ * ```
18
+ */
4
19
  export declare const HeaderMenu: React.ForwardRefExoticComponent<HeaderMenuProps & React.RefAttributes<HTMLDivElement>>;
5
20
  //# sourceMappingURL=header-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-menu.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,YAAY,EACZ,IAAI,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,CACjD,CAAC;AAEF,eAAO,MAAM,UAAU,wFAuFtB,CAAC"}
1
+ {"version":3,"file":"header-menu.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/header-menu.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAM1D,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG,IAAI,CAChC,YAAY,EACZ,IAAI,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,CACjD,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,UAAU,wFAuFtB,CAAC"}
@@ -1,9 +1,26 @@
1
1
  import { ButtonProps } from '../../button/button';
2
2
  export declare const HEADER_SEARCH_ID = "smudi-header-search";
3
3
  export type HeaderSearchButtonProps = Omit<ButtonProps, "variant" | "popovertarget" | "aria-controls" | "aria-haspopup"> & {
4
+ /**
5
+ * Visible label and default `aria-label` for the button.
6
+ * @default "Søk"
7
+ */
4
8
  label?: string;
5
9
  };
10
+ /**
11
+ * Button that opens/closes the `Header.Search` popover. Renders as a Smudi
12
+ * `Button` and keeps its `aria-expanded` state in sync with the popover.
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <Header.Search.Button />
17
+ * ```
18
+ */
6
19
  export declare const HeaderSearchButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "aria-controls" | "aria-haspopup" | "popovertarget" | "variant"> & {
20
+ /**
21
+ * Visible label and default `aria-label` for the button.
22
+ * @default "Søk"
23
+ */
7
24
  label?: string;
8
25
  } & React.RefAttributes<HTMLButtonElement>>;
9
26
  //# sourceMappingURL=header-search-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-search-button.d.ts","sourceRoot":"","sources":["../../../../components/header/header-search/header-search-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,WAAW,EACX,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,CAChE,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,kBAAkB;YAHrB,MAAM;2CAgDd,CAAC"}
1
+ {"version":3,"file":"header-search-button.d.ts","sourceRoot":"","sources":["../../../../components/header/header-search/header-search-button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,eAAO,MAAM,gBAAgB,wBAAwB,CAAC;AAEtD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,WAAW,EACX,SAAS,GAAG,eAAe,GAAG,eAAe,GAAG,eAAe,CAChE,GAAG;IACF;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB;IAhB7B;;;OAGG;YACK,MAAM;2CAyDd,CAAC"}
@@ -3,15 +3,33 @@ import { PopoverProps } from '../../popover/popover';
3
3
  export type HeaderSearchProps = Omit<PopoverProps, "id" | "placement" | "autoPlacement" | "variant"> & {
4
4
  children?: ReactNode;
5
5
  className?: string;
6
+ /** Controls whether the search popover is open. */
6
7
  open?: boolean;
8
+ /** Called when the search popover opens. */
7
9
  onOpen?: () => void;
10
+ /** Called when the search popover closes. */
8
11
  onClose?: () => void;
9
12
  };
13
+ /**
14
+ * Popover containing search functionality, opened from a
15
+ * `Header.Search.Button`.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * <Header.Search.Button />
20
+ * <Header.Search>
21
+ * <Search>...</Search>
22
+ * </Header.Search>
23
+ * ```
24
+ */
10
25
  export declare const HeaderSearch: React.ForwardRefExoticComponent<Omit<PopoverProps, "id" | "variant" | "placement" | "autoPlacement"> & {
11
26
  children?: ReactNode;
12
27
  className?: string;
28
+ /** Controls whether the search popover is open. */
13
29
  open?: boolean;
30
+ /** Called when the search popover opens. */
14
31
  onOpen?: () => void;
32
+ /** Called when the search popover closes. */
15
33
  onClose?: () => void;
16
34
  } & React.RefAttributes<HTMLDivElement>>;
17
35
  //# sourceMappingURL=header-search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header-search.d.ts","sourceRoot":"","sources":["../../../../components/header/header-search/header-search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAO1D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACZ,IAAI,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,CACjD,GAAG;IACF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,YAAY;eAPZ,SAAS;gBACR,MAAM;WACX,OAAO;aACL,MAAM,IAAI;cACT,MAAM,IAAI;wCAmFrB,CAAC"}
1
+ {"version":3,"file":"header-search.d.ts","sourceRoot":"","sources":["../../../../components/header/header-search/header-search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAoB,MAAM,OAAO,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAO1D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,YAAY,EACZ,IAAI,GAAG,WAAW,GAAG,eAAe,GAAG,SAAS,CACjD,GAAG;IACF,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY;eAtBZ,SAAS;gBACR,MAAM;IAClB,mDAAmD;WAC5C,OAAO;IACd,4CAA4C;aACnC,MAAM,IAAI;IACnB,6CAA6C;cACnC,MAAM,IAAI;wCA+FrB,CAAC"}