@smudi/designsystem 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@smudi/assets/InterVariable.woff2 +0 -0
- package/@smudi/assets/UDI-red-logo.svg.js +4 -0
- package/@smudi/components/alert/alert.d.ts +6 -0
- package/@smudi/components/alert/alert.d.ts.map +1 -0
- package/@smudi/components/alert/alert.js +6 -0
- package/@smudi/components/avatar/avatar.d.ts +6 -0
- package/@smudi/components/avatar/avatar.d.ts.map +1 -0
- package/@smudi/components/avatar/avatar.js +6 -0
- package/@smudi/components/avatar-stack/avatar-stack.d.ts +6 -0
- package/@smudi/components/avatar-stack/avatar-stack.d.ts.map +1 -0
- package/@smudi/components/avatar-stack/avatar-stack.js +6 -0
- package/@smudi/components/badge/badge.d.ts +6 -0
- package/@smudi/components/badge/badge.d.ts.map +1 -0
- package/@smudi/components/badge/badge.js +6 -0
- package/@smudi/components/breadcrumbs/breadcrumbs.d.ts +6 -0
- package/@smudi/components/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/@smudi/components/breadcrumbs/breadcrumbs.js +6 -0
- package/@smudi/components/button/button.d.ts +8 -0
- package/@smudi/components/button/button.d.ts.map +1 -0
- package/@smudi/components/button/button.js +25 -0
- package/@smudi/components/card/card-icon-block.d.ts +6 -0
- package/@smudi/components/card/card-icon-block.d.ts.map +1 -0
- package/@smudi/components/card/card-icon-block.js +21 -0
- package/@smudi/components/card/card.d.ts +9 -0
- package/@smudi/components/card/card.d.ts.map +1 -0
- package/@smudi/components/card/card.js +8 -0
- package/@smudi/components/checkbox/checkbox.d.ts +6 -0
- package/@smudi/components/checkbox/checkbox.d.ts.map +1 -0
- package/@smudi/components/checkbox/checkbox.js +6 -0
- package/@smudi/components/chip/chip.d.ts +5 -0
- package/@smudi/components/chip/chip.d.ts.map +1 -0
- package/@smudi/components/chip/chip.js +9 -0
- package/@smudi/components/details/details.d.ts +6 -0
- package/@smudi/components/details/details.d.ts.map +1 -0
- package/@smudi/components/details/details.js +6 -0
- package/@smudi/components/dialog/dialog-section.d.ts +22 -0
- package/@smudi/components/dialog/dialog-section.d.ts.map +1 -0
- package/@smudi/components/dialog/dialog-section.js +20 -0
- package/@smudi/components/dialog/dialog.d.ts +9 -0
- package/@smudi/components/dialog/dialog.d.ts.map +1 -0
- package/@smudi/components/dialog/dialog.js +8 -0
- package/@smudi/components/divider/divider.d.ts +6 -0
- package/@smudi/components/divider/divider.d.ts.map +1 -0
- package/@smudi/components/divider/divider.js +6 -0
- package/@smudi/components/dropdown/dropdown-button.d.ts +30 -0
- package/@smudi/components/dropdown/dropdown-button.d.ts.map +1 -0
- package/@smudi/components/dropdown/dropdown-button.js +15 -0
- package/@smudi/components/dropdown/dropdown-context.d.ts +7 -0
- package/@smudi/components/dropdown/dropdown-context.d.ts.map +1 -0
- package/@smudi/components/dropdown/dropdown-context.js +12 -0
- package/@smudi/components/dropdown/dropdown-item.d.ts +10 -0
- package/@smudi/components/dropdown/dropdown-item.d.ts.map +1 -0
- package/@smudi/components/dropdown/dropdown-item.js +13 -0
- package/@smudi/components/dropdown/dropdown-list.d.ts +10 -0
- package/@smudi/components/dropdown/dropdown-list.d.ts.map +1 -0
- package/@smudi/components/dropdown/dropdown-list.js +13 -0
- package/@smudi/components/dropdown/dropdown.d.ts +20 -0
- package/@smudi/components/dropdown/dropdown.d.ts.map +1 -0
- package/@smudi/components/dropdown/dropdown.js +42 -0
- package/@smudi/components/error-summary/error-summary.d.ts +6 -0
- package/@smudi/components/error-summary/error-summary.d.ts.map +1 -0
- package/@smudi/components/error-summary/error-summary.js +6 -0
- package/@smudi/components/field/field.d.ts +6 -0
- package/@smudi/components/field/field.d.ts.map +1 -0
- package/@smudi/components/field/field.js +6 -0
- package/@smudi/components/fieldset/fieldset.d.ts +6 -0
- package/@smudi/components/fieldset/fieldset.d.ts.map +1 -0
- package/@smudi/components/fieldset/fieldset.js +6 -0
- package/@smudi/components/header/header-content.d.ts +4 -0
- package/@smudi/components/header/header-content.d.ts.map +1 -0
- package/@smudi/components/header/header-content.js +19 -0
- package/@smudi/components/header/header-divider.d.ts +4 -0
- package/@smudi/components/header/header-divider.d.ts.map +1 -0
- package/@smudi/components/header/header-divider.js +23 -0
- package/@smudi/components/header/header-menu/header-menu-button.d.ts +4 -0
- package/@smudi/components/header/header-menu/header-menu-button.d.ts.map +1 -0
- package/@smudi/components/header/header-menu/header-menu-button.js +39 -0
- package/@smudi/components/header/header-menu/header-menu-content.d.ts +4 -0
- package/@smudi/components/header/header-menu/header-menu-content.d.ts.map +1 -0
- package/@smudi/components/header/header-menu/header-menu-content.js +17 -0
- package/@smudi/components/header/header-menu/header-menu-group.d.ts +4 -0
- package/@smudi/components/header/header-menu/header-menu-group.d.ts.map +1 -0
- package/@smudi/components/header/header-menu/header-menu-group.js +19 -0
- package/@smudi/components/header/header-menu/header-menu-item.d.ts +12 -0
- package/@smudi/components/header/header-menu/header-menu-item.d.ts.map +1 -0
- package/@smudi/components/header/header-menu/header-menu-item.js +23 -0
- package/@smudi/components/header/header-menu/header-menu.d.ts +5 -0
- package/@smudi/components/header/header-menu/header-menu.d.ts.map +1 -0
- package/@smudi/components/header/header-menu/header-menu.js +69 -0
- package/@smudi/components/header/header-menu/index.d.ts +11 -0
- package/@smudi/components/header/header-menu/index.d.ts.map +1 -0
- package/@smudi/components/header/header-search/header-search-button.d.ts +9 -0
- package/@smudi/components/header/header-search/header-search-button.d.ts.map +1 -0
- package/@smudi/components/header/header-search/header-search-button.js +44 -0
- package/@smudi/components/header/header-search/header-search.d.ts +17 -0
- package/@smudi/components/header/header-search/header-search.d.ts.map +1 -0
- package/@smudi/components/header/header-search/header-search.js +69 -0
- package/@smudi/components/header/header-search/index.d.ts +5 -0
- package/@smudi/components/header/header-search/index.d.ts.map +1 -0
- package/@smudi/components/header/header.d.ts +55 -0
- package/@smudi/components/header/header.d.ts.map +1 -0
- package/@smudi/components/header/header.js +97 -0
- package/@smudi/components/header/index.d.ts +36 -0
- package/@smudi/components/header/index.d.ts.map +1 -0
- package/@smudi/components/header/index.js +34 -0
- package/@smudi/components/input/input.d.ts +6 -0
- package/@smudi/components/input/input.d.ts.map +1 -0
- package/@smudi/components/input/input.js +6 -0
- package/@smudi/components/layout-components/box-layouts/box-layout.d.ts +37 -0
- package/@smudi/components/layout-components/box-layouts/box-layout.d.ts.map +1 -0
- package/@smudi/components/layout-components/box-layouts/box-layout.js +70 -0
- package/@smudi/components/layout-components/box-layouts/box-layout.module.css.js +6 -0
- package/@smudi/components/layout-components/center-layouts/center-layout.d.ts +30 -0
- package/@smudi/components/layout-components/center-layouts/center-layout.d.ts.map +1 -0
- package/@smudi/components/layout-components/center-layouts/center-layout.js +31 -0
- package/@smudi/components/layout-components/center-layouts/center-layout.module.css.js +7 -0
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.d.ts +33 -0
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.d.ts.map +1 -0
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.js +35 -0
- package/@smudi/components/layout-components/cluster-layouts/cluster-layout.module.css.js +6 -0
- package/@smudi/components/layout-components/cluster-layouts/constants/cluster-align-css.d.ts +2 -0
- package/@smudi/components/layout-components/cluster-layouts/constants/cluster-align-css.d.ts.map +1 -0
- package/@smudi/components/layout-components/cluster-layouts/constants/cluster-justify-css.d.ts +2 -0
- package/@smudi/components/layout-components/cluster-layouts/constants/cluster-justify-css.d.ts.map +1 -0
- package/@smudi/components/layout-components/cluster-layouts/types/cluster-align.type.d.ts +2 -0
- package/@smudi/components/layout-components/cluster-layouts/types/cluster-align.type.d.ts.map +1 -0
- package/@smudi/components/layout-components/cluster-layouts/types/cluster-justify.type.d.ts +2 -0
- package/@smudi/components/layout-components/cluster-layouts/types/cluster-justify.type.d.ts.map +1 -0
- package/@smudi/components/layout-components/grid-layouts/grid-layout.d.ts +39 -0
- package/@smudi/components/layout-components/grid-layouts/grid-layout.d.ts.map +1 -0
- package/@smudi/components/layout-components/grid-layouts/grid-layout.js +40 -0
- package/@smudi/components/layout-components/grid-layouts/grid-layout.module.css.js +6 -0
- package/@smudi/components/layout-components/stack-layouts/stack-layout.d.ts +31 -0
- package/@smudi/components/layout-components/stack-layouts/stack-layout.d.ts.map +1 -0
- package/@smudi/components/layout-components/stack-layouts/stack-layout.js +46 -0
- package/@smudi/components/layout-components/stack-layouts/stack-layout.module.css.js +6 -0
- package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.d.ts +34 -0
- package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.d.ts.map +1 -0
- package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.js +41 -0
- package/@smudi/components/layout-components/wrapper-layouts/wrapper-layout.module.css.js +6 -0
- package/@smudi/components/link/link.d.ts +6 -0
- package/@smudi/components/link/link.d.ts.map +1 -0
- package/@smudi/components/link/link.js +6 -0
- package/@smudi/components/list/list.d.ts +5 -0
- package/@smudi/components/list/list.d.ts.map +1 -0
- package/@smudi/components/list/list.js +5 -0
- package/@smudi/components/pagination/pagination.d.ts +6 -0
- package/@smudi/components/pagination/pagination.d.ts.map +1 -0
- package/@smudi/components/pagination/pagination.js +6 -0
- package/@smudi/components/popover/popover.d.ts +6 -0
- package/@smudi/components/popover/popover.d.ts.map +1 -0
- package/@smudi/components/popover/popover.js +6 -0
- package/@smudi/components/radio/radio.d.ts +6 -0
- package/@smudi/components/radio/radio.d.ts.map +1 -0
- package/@smudi/components/radio/radio.js +6 -0
- package/@smudi/components/search/search.d.ts +6 -0
- package/@smudi/components/search/search.d.ts.map +1 -0
- package/@smudi/components/search/search.js +6 -0
- package/@smudi/components/select/select.d.ts +6 -0
- package/@smudi/components/select/select.d.ts.map +1 -0
- package/@smudi/components/select/select.js +9 -0
- package/@smudi/components/skeleton/skeleton.d.ts +6 -0
- package/@smudi/components/skeleton/skeleton.d.ts.map +1 -0
- package/@smudi/components/skeleton/skeleton.js +6 -0
- package/@smudi/components/skip-link/skip-link.d.ts +6 -0
- package/@smudi/components/skip-link/skip-link.d.ts.map +1 -0
- package/@smudi/components/skip-link/skip-link.js +6 -0
- package/@smudi/components/spinner/spinner.d.ts +6 -0
- package/@smudi/components/spinner/spinner.d.ts.map +1 -0
- package/@smudi/components/spinner/spinner.js +6 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-context.d.ts +9 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-context.d.ts.map +1 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-context.js +14 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts +4 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.d.ts.map +1 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion-list.js +33 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts +37 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.d.ts.map +1 -0
- package/@smudi/components/suggestion/smudi-suggestion/smudi-suggestion.js +102 -0
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts +21 -0
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.d.ts.map +1 -0
- package/@smudi/components/suggestion/suggestion-no-chips/suggestion-no-chips.js +126 -0
- package/@smudi/components/suggestion/suggestion.d.ts +16 -0
- package/@smudi/components/suggestion/suggestion.d.ts.map +1 -0
- package/@smudi/components/suggestion/suggestion.js +13 -0
- package/@smudi/components/switch/switch.d.ts +6 -0
- package/@smudi/components/switch/switch.d.ts.map +1 -0
- package/@smudi/components/table/table.d.ts +6 -0
- package/@smudi/components/table/table.d.ts.map +1 -0
- package/@smudi/components/table/table.js +6 -0
- package/@smudi/components/tabs/tabs-content.d.ts +6 -0
- package/@smudi/components/tabs/tabs-content.d.ts.map +1 -0
- package/@smudi/components/tabs/tabs-content.js +6 -0
- package/@smudi/components/tabs/tabs-list.d.ts +6 -0
- package/@smudi/components/tabs/tabs-list.d.ts.map +1 -0
- package/@smudi/components/tabs/tabs-list.js +6 -0
- package/@smudi/components/tabs/tabs-trigger.d.ts +6 -0
- package/@smudi/components/tabs/tabs-trigger.d.ts.map +1 -0
- package/@smudi/components/tabs/tabs-trigger.js +6 -0
- package/@smudi/components/tabs/tabs.d.ts +6 -0
- package/@smudi/components/tabs/tabs.d.ts.map +1 -0
- package/@smudi/components/tabs/tabs.js +6 -0
- package/@smudi/components/tag/tag.d.ts +6 -0
- package/@smudi/components/tag/tag.d.ts.map +1 -0
- package/@smudi/components/tag/tag.js +6 -0
- package/@smudi/components/textarea/text-area.d.ts +6 -0
- package/@smudi/components/textarea/text-area.d.ts.map +1 -0
- package/@smudi/components/textarea/text-area.js +6 -0
- package/@smudi/components/textfield/textfield.d.ts +6 -0
- package/@smudi/components/textfield/textfield.d.ts.map +1 -0
- package/@smudi/components/textfield/textfield.js +6 -0
- package/@smudi/components/toast/toast.d.ts +39 -0
- package/@smudi/components/toast/toast.d.ts.map +1 -0
- package/@smudi/components/toast/toast.js +285 -0
- package/@smudi/components/toggle-group/toggle-group.d.ts +6 -0
- package/@smudi/components/toggle-group/toggle-group.d.ts.map +1 -0
- package/@smudi/components/toggle-group/toggle-group.js +7 -0
- package/@smudi/components/tooltip/tooltip.d.ts +6 -0
- package/@smudi/components/tooltip/tooltip.d.ts.map +1 -0
- package/@smudi/components/tooltip/tooltip.js +6 -0
- package/@smudi/components/typography/heading/heading.d.ts +6 -0
- package/@smudi/components/typography/heading/heading.d.ts.map +1 -0
- package/@smudi/components/typography/heading/heading.js +6 -0
- package/@smudi/components/typography/paragraph/paragraph.d.ts +6 -0
- package/@smudi/components/typography/paragraph/paragraph.d.ts.map +1 -0
- package/@smudi/components/typography/paragraph/paragraph.js +6 -0
- package/@smudi/components/utils/apply-inert-outside.d.ts +17 -0
- package/@smudi/components/utils/apply-inert-outside.d.ts.map +1 -0
- package/@smudi/components/utils/apply-inert-outside.js +12 -0
- package/@smudi/components/utils/class-names.d.ts +2 -0
- package/@smudi/components/utils/class-names.d.ts.map +1 -0
- package/@smudi/components/utils/class-names.js +6 -0
- package/@smudi/icons/generated/SmudiBiometryIcon.js +32 -0
- package/@smudi/icons/generated/SmudiFingerprintIcon.js +62 -0
- package/@smudi/icons/generated/SmudiFlagIcon.js +30 -0
- package/@smudi/icons/generated/SmudiScanIcon.js +30 -0
- package/@smudi/react.js +198 -0
- package/@smudi/smudi/icons/generated/SmudiBiometryIcon.d.ts +8 -0
- package/@smudi/smudi/icons/generated/SmudiBiometryIcon.d.ts.map +1 -0
- package/@smudi/smudi/icons/generated/SmudiFingerprintIcon.d.ts +8 -0
- package/@smudi/smudi/icons/generated/SmudiFingerprintIcon.d.ts.map +1 -0
- package/@smudi/smudi/icons/generated/SmudiFlagIcon.d.ts +8 -0
- package/@smudi/smudi/icons/generated/SmudiFlagIcon.d.ts.map +1 -0
- package/@smudi/smudi/icons/generated/SmudiScanIcon.d.ts +8 -0
- package/@smudi/smudi/icons/generated/SmudiScanIcon.d.ts.map +1 -0
- package/@smudi/smudi/icons/generated/index.d.ts +5 -0
- package/@smudi/smudi/icons/generated/index.d.ts.map +1 -0
- package/@smudi/smudi/icons/metadata.d.ts +32 -0
- package/@smudi/smudi/icons/metadata.d.ts.map +1 -0
- package/@smudi/smudi/react.d.ts +55 -0
- package/@smudi/smudi/react.d.ts.map +1 -0
- package/@smudi/styles.css +1 -0
- package/@smudi/types/modular-scale.type.d.ts +18 -0
- package/@smudi/types/modular-scale.type.d.ts.map +1 -0
- package/@smudi/types/polymorphic-component.type.d.ts +35 -0
- package/@smudi/types/polymorphic-component.type.d.ts.map +1 -0
- package/@smudi/types/utils/coerce-string-to-number.d.ts +4 -0
- package/@smudi/types/utils/coerce-string-to-number.d.ts.map +1 -0
- package/@smudi/types/utils/exclude-strict.d.ts +2 -0
- package/@smudi/types/utils/exclude-strict.d.ts.map +1 -0
- package/@smudi/types/utils/omit-strict.d.ts +2 -0
- package/@smudi/types/utils/omit-strict.d.ts.map +1 -0
- package/@smudi/utils/append-class-name.js +10 -0
- package/@smudi/utils/combine-refs.js +10 -0
- package/README.md +83 -0
- package/package.json +80 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type HeaderContentProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare const HeaderContent: React.ForwardRefExoticComponent<HeaderContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
//# sourceMappingURL=header-content.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { classNames as a } from "../utils/class-names.js";
|
|
4
|
+
const m = n(
|
|
5
|
+
function({ className: e, ...r }, t) {
|
|
6
|
+
return /* @__PURE__ */ o(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
...r,
|
|
10
|
+
ref: t,
|
|
11
|
+
className: a("smudi-header__content", e)
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
m.displayName = "Header.Content";
|
|
17
|
+
export {
|
|
18
|
+
m as HeaderContent
|
|
19
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type HeaderDividerProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare const HeaderDivider: React.ForwardRefExoticComponent<HeaderDividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
//# sourceMappingURL=header-divider.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { classNames as m } from "../utils/class-names.js";
|
|
4
|
+
const s = n(
|
|
5
|
+
function({ className: a, role: i, "aria-hidden": e, ...r }, d) {
|
|
6
|
+
const o = i ? r["aria-orientation"] ?? "vertical" : void 0;
|
|
7
|
+
return /* @__PURE__ */ t(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
...r,
|
|
11
|
+
ref: d,
|
|
12
|
+
role: i,
|
|
13
|
+
"aria-orientation": o,
|
|
14
|
+
"aria-hidden": i ? void 0 : e ?? "true",
|
|
15
|
+
className: m("smudi-header__divider", a)
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
s.displayName = "Header.Divider";
|
|
21
|
+
export {
|
|
22
|
+
s as HeaderDivider
|
|
23
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ButtonProps } from '../../button/button';
|
|
2
|
+
export type HeaderMenuButtonProps = ButtonProps;
|
|
3
|
+
export declare const HeaderMenuButton: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
//# sourceMappingURL=header-menu-button.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i, useState as c, useEffect as f } from "react";
|
|
3
|
+
import { Button as l } from "../../button/button.js";
|
|
4
|
+
import { classNames as g } from "../../utils/class-names.js";
|
|
5
|
+
import { HEADER_MENU_ID as t } from "./header-menu.js";
|
|
6
|
+
const E = i(function({ className: s, children: r, ...d }, u) {
|
|
7
|
+
const [m, o] = c(!1);
|
|
8
|
+
return f(() => {
|
|
9
|
+
const e = document.getElementById(t);
|
|
10
|
+
if (!e) return;
|
|
11
|
+
const n = () => {
|
|
12
|
+
try {
|
|
13
|
+
return e.matches(":popover-open");
|
|
14
|
+
} catch {
|
|
15
|
+
return !1;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
o(n());
|
|
19
|
+
const a = () => o(n());
|
|
20
|
+
return e.addEventListener("toggle", a), () => e.removeEventListener("toggle", a);
|
|
21
|
+
}, []), /* @__PURE__ */ p(
|
|
22
|
+
l,
|
|
23
|
+
{
|
|
24
|
+
className: g("smudi-header__menu-button", s),
|
|
25
|
+
variant: "tertiary",
|
|
26
|
+
"aria-controls": t,
|
|
27
|
+
"aria-haspopup": "dialog",
|
|
28
|
+
"aria-expanded": m,
|
|
29
|
+
popovertarget: t,
|
|
30
|
+
ref: u,
|
|
31
|
+
...d,
|
|
32
|
+
children: r || "Meny"
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
E.displayName = "Header.Menu.Button";
|
|
37
|
+
export {
|
|
38
|
+
E as HeaderMenuButton
|
|
39
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type HeaderMenuContentProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare const HeaderMenuContent: React.ForwardRefExoticComponent<HeaderMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
//# sourceMappingURL=header-menu-content.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { classNames as a } from "../../utils/class-names.js";
|
|
4
|
+
const m = o(function({ className: e, ...n }, r) {
|
|
5
|
+
return /* @__PURE__ */ t(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
className: a("smudi-header__menu-content", e),
|
|
9
|
+
ref: r,
|
|
10
|
+
...n
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
});
|
|
14
|
+
m.displayName = "Header.Menu.Content";
|
|
15
|
+
export {
|
|
16
|
+
m as HeaderMenuContent
|
|
17
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export type HeaderMenuGroupProps = HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare const HeaderMenuGroup: React.ForwardRefExoticComponent<HeaderMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
//# sourceMappingURL=header-menu-group.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
|
+
import { classNames as u } from "../../utils/class-names.js";
|
|
4
|
+
const p = m(
|
|
5
|
+
function({ className: r, ...e }, o) {
|
|
6
|
+
return /* @__PURE__ */ a(
|
|
7
|
+
"div",
|
|
8
|
+
{
|
|
9
|
+
className: u("smudi-header__menu-group", r),
|
|
10
|
+
ref: o,
|
|
11
|
+
...e
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
p.displayName = "Header.Menu.Group";
|
|
17
|
+
export {
|
|
18
|
+
p as HeaderMenuGroup
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LinkProps } from '../../link/link';
|
|
3
|
+
export type HeaderMenuItemProps = LinkProps & {
|
|
4
|
+
icon?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare const HeaderMenuItem: React.ForwardRefExoticComponent<Omit<import('@digdir/designsystemet-react').DefaultProps & React.AnchorHTMLAttributes<HTMLAnchorElement>, "children" | "asChild"> & {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
} & React.RefAttributes<HTMLAnchorElement>>;
|
|
12
|
+
//# sourceMappingURL=header-menu-item.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronRightIcon as t } from "@navikt/aksel-icons";
|
|
3
|
+
import { forwardRef as o } from "react";
|
|
4
|
+
import { Link as d } from "../../link/link.js";
|
|
5
|
+
import { classNames as u } from "../../utils/class-names.js";
|
|
6
|
+
const c = o(function({ className: r, children: m, icon: a = /* @__PURE__ */ e(t, { "aria-hidden": !0 }), ...n }, i) {
|
|
7
|
+
return /* @__PURE__ */ s(
|
|
8
|
+
d,
|
|
9
|
+
{
|
|
10
|
+
className: u("smudi-header__menu-link", r),
|
|
11
|
+
ref: i,
|
|
12
|
+
...n,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ e("span", { className: "smudi-header__menu-item-icon", "aria-hidden": !0, children: a }),
|
|
15
|
+
/* @__PURE__ */ e("span", { className: "smudi-header__menu-item-text", children: m })
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
});
|
|
20
|
+
c.displayName = "Header.Menu.Item";
|
|
21
|
+
export {
|
|
22
|
+
c as HeaderMenuItem
|
|
23
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PopoverProps } from '../../popover/popover';
|
|
2
|
+
export declare const HEADER_MENU_ID = "smudi-header-menu";
|
|
3
|
+
export type HeaderMenuProps = Omit<PopoverProps, "id" | "placement" | "autoPlacement" | "variant">;
|
|
4
|
+
export declare const HeaderMenu: React.ForwardRefExoticComponent<HeaderMenuProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
//# sourceMappingURL=header-menu.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useRef as p, useState as N } from "react";
|
|
3
|
+
import { Popover as O } from "../../popover/popover.js";
|
|
4
|
+
import { classNames as _ } from "../../utils/class-names.js";
|
|
5
|
+
import { combineRefs as E } from "../../../utils/combine-refs.js";
|
|
6
|
+
import { applyInertOutside as T } from "../../utils/apply-inert-outside.js";
|
|
7
|
+
const $ = "smudi-header-menu", h = H(
|
|
8
|
+
function({
|
|
9
|
+
open: s,
|
|
10
|
+
onOpen: f,
|
|
11
|
+
onClose: m,
|
|
12
|
+
onBlurCapture: d,
|
|
13
|
+
children: g,
|
|
14
|
+
className: v,
|
|
15
|
+
"aria-label": b,
|
|
16
|
+
"aria-labelledby": u,
|
|
17
|
+
...I
|
|
18
|
+
}, R) {
|
|
19
|
+
const r = $, o = p(null), t = p(null), [y, i] = N(!1), n = s !== void 0, M = n ? !!s : y, a = () => {
|
|
20
|
+
t.current?.(), t.current = null;
|
|
21
|
+
}, c = () => {
|
|
22
|
+
n || i(!1), a();
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ C(
|
|
25
|
+
O,
|
|
26
|
+
{
|
|
27
|
+
id: r,
|
|
28
|
+
className: _("smudi-header__menu", v),
|
|
29
|
+
ref: E((e) => {
|
|
30
|
+
o.current = e, e || a();
|
|
31
|
+
}, R),
|
|
32
|
+
role: "dialog",
|
|
33
|
+
"aria-modal": "true",
|
|
34
|
+
"aria-label": b ?? (u ? void 0 : "Meny"),
|
|
35
|
+
"aria-labelledby": u,
|
|
36
|
+
popover: "auto",
|
|
37
|
+
placement: "none",
|
|
38
|
+
open: M,
|
|
39
|
+
onOpen: () => {
|
|
40
|
+
if (n || i(!0), o.current) {
|
|
41
|
+
a();
|
|
42
|
+
const e = document.querySelector(
|
|
43
|
+
`[popovertarget="${r}"], [popoverTarget="${r}"]`
|
|
44
|
+
);
|
|
45
|
+
t.current = T(o.current, {
|
|
46
|
+
exclude: e
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
f?.();
|
|
50
|
+
},
|
|
51
|
+
onClose: () => {
|
|
52
|
+
c(), m?.();
|
|
53
|
+
},
|
|
54
|
+
onBlurCapture: (e) => {
|
|
55
|
+
if (d?.(e), e.defaultPrevented) return;
|
|
56
|
+
const x = e.currentTarget, l = e.relatedTarget;
|
|
57
|
+
l?.closest(`[popovertarget="${r}"]`) || l && !x.contains(l) && c();
|
|
58
|
+
},
|
|
59
|
+
...I,
|
|
60
|
+
children: g
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
h.displayName = "Header.Menu";
|
|
66
|
+
export {
|
|
67
|
+
$ as HEADER_MENU_ID,
|
|
68
|
+
h as HeaderMenu
|
|
69
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { HeaderMenu } from './header-menu';
|
|
2
|
+
export type { HeaderMenuProps } from './header-menu';
|
|
3
|
+
export { HeaderMenuButton } from './header-menu-button';
|
|
4
|
+
export type { HeaderMenuButtonProps } from './header-menu-button';
|
|
5
|
+
export { HeaderMenuContent } from './header-menu-content';
|
|
6
|
+
export type { HeaderMenuContentProps } from './header-menu-content';
|
|
7
|
+
export { HeaderMenuGroup } from './header-menu-group';
|
|
8
|
+
export type { HeaderMenuGroupProps } from './header-menu-group';
|
|
9
|
+
export { HeaderMenuItem } from './header-menu-item';
|
|
10
|
+
export type { HeaderMenuItemProps } from './header-menu-item';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/header/header-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ButtonProps } from '../../button/button';
|
|
2
|
+
export declare const HEADER_SEARCH_ID = "smudi-header-search";
|
|
3
|
+
export type HeaderSearchButtonProps = Omit<ButtonProps, "variant" | "popovertarget" | "aria-controls" | "aria-haspopup"> & {
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const HeaderSearchButton: React.ForwardRefExoticComponent<Omit<ButtonProps, "aria-controls" | "aria-haspopup" | "popovertarget" | "variant"> & {
|
|
7
|
+
label?: string;
|
|
8
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
//# sourceMappingURL=header-search-button.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as p, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { MagnifyingGlassIcon as l } from "@navikt/aksel-icons";
|
|
3
|
+
import { forwardRef as f, useState as g, useEffect as h } from "react";
|
|
4
|
+
import { Button as E } from "../../button/button.js";
|
|
5
|
+
import { classNames as x } from "../../utils/class-names.js";
|
|
6
|
+
const t = "smudi-header-search", v = f(function({ className: s, label: r = "Søk", "aria-label": d = r, ...i }, c) {
|
|
7
|
+
const [m, a] = g(!1);
|
|
8
|
+
return h(() => {
|
|
9
|
+
const e = document.getElementById(t);
|
|
10
|
+
if (!e) return;
|
|
11
|
+
const o = () => {
|
|
12
|
+
try {
|
|
13
|
+
return e.matches(":popover-open");
|
|
14
|
+
} catch {
|
|
15
|
+
return !1;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
a(o());
|
|
19
|
+
const n = () => a(o());
|
|
20
|
+
return e.addEventListener("toggle", n), () => e.removeEventListener("toggle", n);
|
|
21
|
+
}, []), /* @__PURE__ */ p(
|
|
22
|
+
E,
|
|
23
|
+
{
|
|
24
|
+
className: x("smudi-header__search-button", s),
|
|
25
|
+
variant: "tertiary",
|
|
26
|
+
"aria-controls": t,
|
|
27
|
+
"aria-haspopup": "dialog",
|
|
28
|
+
"aria-expanded": m,
|
|
29
|
+
"aria-label": d,
|
|
30
|
+
popovertarget: t,
|
|
31
|
+
ref: c,
|
|
32
|
+
...i,
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ u(l, { "aria-hidden": !0 }),
|
|
35
|
+
r
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
v.displayName = "Header.Search.Button";
|
|
41
|
+
export {
|
|
42
|
+
t as HEADER_SEARCH_ID,
|
|
43
|
+
v as HeaderSearchButton
|
|
44
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PopoverProps } from '../../popover/popover';
|
|
3
|
+
export type HeaderSearchProps = Omit<PopoverProps, "id" | "placement" | "autoPlacement" | "variant"> & {
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
open?: boolean;
|
|
7
|
+
onOpen?: () => void;
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const HeaderSearch: React.ForwardRefExoticComponent<Omit<PopoverProps, "id" | "variant" | "placement" | "autoPlacement"> & {
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
open?: boolean;
|
|
14
|
+
onOpen?: () => void;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
//# sourceMappingURL=header-search.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useRef as f, useState as x } from "react";
|
|
3
|
+
import { Popover as y } from "../../popover/popover.js";
|
|
4
|
+
import { classNames as N } from "../../utils/class-names.js";
|
|
5
|
+
import { combineRefs as O } from "../../../utils/combine-refs.js";
|
|
6
|
+
import { applyInertOutside as E } from "../../utils/apply-inert-outside.js";
|
|
7
|
+
import { HEADER_SEARCH_ID as r } from "./header-search-button.js";
|
|
8
|
+
const T = H(
|
|
9
|
+
function({
|
|
10
|
+
open: s,
|
|
11
|
+
onOpen: m,
|
|
12
|
+
onClose: d,
|
|
13
|
+
onBlurCapture: g,
|
|
14
|
+
children: h,
|
|
15
|
+
className: v,
|
|
16
|
+
"aria-label": R,
|
|
17
|
+
"aria-labelledby": c,
|
|
18
|
+
...S
|
|
19
|
+
}, b) {
|
|
20
|
+
const o = f(null), t = f(null), [I, i] = x(!1), n = s !== void 0, _ = n ? !!s : I, a = () => {
|
|
21
|
+
t.current?.(), t.current = null;
|
|
22
|
+
}, p = () => {
|
|
23
|
+
n || i(!1), a();
|
|
24
|
+
};
|
|
25
|
+
return /* @__PURE__ */ u(
|
|
26
|
+
y,
|
|
27
|
+
{
|
|
28
|
+
id: r,
|
|
29
|
+
className: N("smudi-header__search", v),
|
|
30
|
+
ref: O((e) => {
|
|
31
|
+
o.current = e, e || a();
|
|
32
|
+
}, b),
|
|
33
|
+
role: "dialog",
|
|
34
|
+
"aria-modal": "true",
|
|
35
|
+
"aria-label": R ?? (c ? void 0 : "Søk"),
|
|
36
|
+
"aria-labelledby": c,
|
|
37
|
+
popover: "auto",
|
|
38
|
+
placement: "none",
|
|
39
|
+
open: _,
|
|
40
|
+
onOpen: () => {
|
|
41
|
+
if (n || i(!0), o.current) {
|
|
42
|
+
a();
|
|
43
|
+
const e = document.querySelector(
|
|
44
|
+
`[popovertarget="${r}"], [popoverTarget="${r}"]`
|
|
45
|
+
);
|
|
46
|
+
t.current = E(o.current, {
|
|
47
|
+
exclude: e
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
m?.();
|
|
51
|
+
},
|
|
52
|
+
onClose: () => {
|
|
53
|
+
p(), d?.();
|
|
54
|
+
},
|
|
55
|
+
onBlurCapture: (e) => {
|
|
56
|
+
if (g?.(e), e.defaultPrevented) return;
|
|
57
|
+
const C = e.currentTarget, l = e.relatedTarget;
|
|
58
|
+
l?.closest(`[popovertarget="${r}"]`) || l && !C.contains(l) && p();
|
|
59
|
+
},
|
|
60
|
+
...S,
|
|
61
|
+
children: /* @__PURE__ */ u("div", { className: "smudi-header__search-content", children: h })
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
T.displayName = "Header.Search";
|
|
67
|
+
export {
|
|
68
|
+
T as HeaderSearch
|
|
69
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { HeaderSearch } from './header-search';
|
|
2
|
+
export type { HeaderSearchProps } from './header-search';
|
|
3
|
+
export { HeaderSearchButton } from './header-search-button';
|
|
4
|
+
export type { HeaderSearchButtonProps } from './header-search-button';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../components/header/header-search/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CSSProperties, HTMLAttributes } from 'react';
|
|
2
|
+
export declare const UDILogo: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export type HeaderProps = HTMLAttributes<HTMLElement> & {
|
|
4
|
+
teamName?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Heading level brukt for `teamName`. Sett denne til nivået som passer inn
|
|
7
|
+
* i sidens overskriftshierarki, slik at du unngår flere `<h1>`-er på samme
|
|
8
|
+
* side.
|
|
9
|
+
* @default 1
|
|
10
|
+
*/
|
|
11
|
+
teamNameHeadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
12
|
+
/**
|
|
13
|
+
* Når satt, blir logo/teamnavn en lenke til forsiden. Sett til `true` for
|
|
14
|
+
* å lenke til `/`, eller oppgi en egen URL (nyttig for apper som ikke er
|
|
15
|
+
* hostet på rot, eller som skal lenke til et annet domene). Sett til
|
|
16
|
+
* `null` eller `false` for eksplisitt å skru av lenken.
|
|
17
|
+
*/
|
|
18
|
+
homeHref?: string | boolean | null;
|
|
19
|
+
/**
|
|
20
|
+
* `aria-label` for lenken satt av `homeHref`, brukt av skjermlesere.
|
|
21
|
+
* Endrer ikke det visuelle innholdet (logo/teamnavn vises som normalt).
|
|
22
|
+
* @default "Til forsiden"
|
|
23
|
+
*/
|
|
24
|
+
ariaLabel?: string;
|
|
25
|
+
maxWidth?: CSSProperties["maxWidth"];
|
|
26
|
+
variant?: "default" | "tinted";
|
|
27
|
+
"data-color"?: "neutral" | "accent";
|
|
28
|
+
};
|
|
29
|
+
export declare const Header: React.ForwardRefExoticComponent<HTMLAttributes<HTMLElement> & {
|
|
30
|
+
teamName?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Heading level brukt for `teamName`. Sett denne til nivået som passer inn
|
|
33
|
+
* i sidens overskriftshierarki, slik at du unngår flere `<h1>`-er på samme
|
|
34
|
+
* side.
|
|
35
|
+
* @default 1
|
|
36
|
+
*/
|
|
37
|
+
teamNameHeadingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
38
|
+
/**
|
|
39
|
+
* Når satt, blir logo/teamnavn en lenke til forsiden. Sett til `true` for
|
|
40
|
+
* å lenke til `/`, eller oppgi en egen URL (nyttig for apper som ikke er
|
|
41
|
+
* hostet på rot, eller som skal lenke til et annet domene). Sett til
|
|
42
|
+
* `null` eller `false` for eksplisitt å skru av lenken.
|
|
43
|
+
*/
|
|
44
|
+
homeHref?: string | boolean | null;
|
|
45
|
+
/**
|
|
46
|
+
* `aria-label` for lenken satt av `homeHref`, brukt av skjermlesere.
|
|
47
|
+
* Endrer ikke det visuelle innholdet (logo/teamnavn vises som normalt).
|
|
48
|
+
* @default "Til forsiden"
|
|
49
|
+
*/
|
|
50
|
+
ariaLabel?: string;
|
|
51
|
+
maxWidth?: CSSProperties["maxWidth"];
|
|
52
|
+
variant?: "default" | "tinted";
|
|
53
|
+
"data-color"?: "neutral" | "accent";
|
|
54
|
+
} & React.RefAttributes<HTMLElement>>;
|
|
55
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAM3D,eAAO,MAAM,OAAO,+CAOnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7C;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACrC,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IAC/B,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,MAAM;eA1BN,MAAM;IACjB;;;;;OAKG;2BACoB,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC;IAC5C;;;;;OAKG;eACQ,MAAM,GAAG,OAAO,GAAG,IAAI;IAClC;;;;OAIG;gBACS,MAAM;eACP,aAAa,CAAC,UAAU,CAAC;cAC1B,SAAS,GAAG,QAAQ;mBACf,SAAS,GAAG,QAAQ;qCA+HnC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { jsx as r, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as L, useRef as z, useEffect as E } from "react";
|
|
3
|
+
import N from "../../assets/UDI-red-logo.svg.js";
|
|
4
|
+
import { classNames as H } from "../utils/class-names.js";
|
|
5
|
+
import { Heading as C } from "../typography/heading/heading.js";
|
|
6
|
+
const P = () => /* @__PURE__ */ r(
|
|
7
|
+
"img",
|
|
8
|
+
{
|
|
9
|
+
src: N,
|
|
10
|
+
alt: "",
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
style: { display: "block", height: "50px" }
|
|
13
|
+
}
|
|
14
|
+
), j = L(function({
|
|
15
|
+
className: v,
|
|
16
|
+
children: p,
|
|
17
|
+
teamName: i,
|
|
18
|
+
teamNameHeadingLevel: h = 1,
|
|
19
|
+
homeHref: s,
|
|
20
|
+
ariaLabel: b,
|
|
21
|
+
maxWidth: o = "90rem",
|
|
22
|
+
variant: g = "default",
|
|
23
|
+
"data-color": y = "neutral",
|
|
24
|
+
style: w,
|
|
25
|
+
..._
|
|
26
|
+
}, a) {
|
|
27
|
+
const d = z(null);
|
|
28
|
+
E(() => {
|
|
29
|
+
const e = d.current;
|
|
30
|
+
if (!e || typeof ResizeObserver > "u")
|
|
31
|
+
return;
|
|
32
|
+
let n = null;
|
|
33
|
+
const u = () => {
|
|
34
|
+
n = null, e.style.setProperty(
|
|
35
|
+
"--smudi-header-bottom",
|
|
36
|
+
`${e.getBoundingClientRect().bottom}px`
|
|
37
|
+
);
|
|
38
|
+
}, t = () => {
|
|
39
|
+
n === null && (n = requestAnimationFrame(u));
|
|
40
|
+
};
|
|
41
|
+
u();
|
|
42
|
+
const f = new ResizeObserver(t);
|
|
43
|
+
return f.observe(e), window.addEventListener("scroll", t, { passive: !0 }), window.addEventListener("resize", t), () => {
|
|
44
|
+
f.disconnect(), window.removeEventListener("scroll", t), window.removeEventListener("resize", t), n !== null && cancelAnimationFrame(n), e.style.removeProperty("--smudi-header-bottom");
|
|
45
|
+
};
|
|
46
|
+
}, []);
|
|
47
|
+
const l = i ? /* @__PURE__ */ r(
|
|
48
|
+
C,
|
|
49
|
+
{
|
|
50
|
+
className: "smudi-header__team-name",
|
|
51
|
+
"data-size": "sm",
|
|
52
|
+
level: h,
|
|
53
|
+
children: i
|
|
54
|
+
}
|
|
55
|
+
) : /* @__PURE__ */ r(P, {}), c = s === !0 ? "/" : s === !1 || s === null ? void 0 : s, x = c ? /* @__PURE__ */ r(
|
|
56
|
+
"a",
|
|
57
|
+
{
|
|
58
|
+
className: "smudi-header__branding-link",
|
|
59
|
+
href: c,
|
|
60
|
+
"aria-label": b ?? (i ? void 0 : "Til forsiden"),
|
|
61
|
+
children: l
|
|
62
|
+
}
|
|
63
|
+
) : l, m = typeof o == "number" ? `${o}px` : o;
|
|
64
|
+
return /* @__PURE__ */ r(
|
|
65
|
+
"header",
|
|
66
|
+
{
|
|
67
|
+
..._,
|
|
68
|
+
ref: (e) => {
|
|
69
|
+
d.current = e, typeof a == "function" ? a(e) : a && (a.current = e);
|
|
70
|
+
},
|
|
71
|
+
className: H("smudi-header", v),
|
|
72
|
+
"data-branding": i ? "team-name" : "logo",
|
|
73
|
+
"data-color": y,
|
|
74
|
+
"data-variant": g,
|
|
75
|
+
style: {
|
|
76
|
+
...w,
|
|
77
|
+
"--smudi-header-max-width": m
|
|
78
|
+
},
|
|
79
|
+
children: /* @__PURE__ */ R(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: "smudi-header__inner",
|
|
83
|
+
style: { maxWidth: m },
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ r("div", { className: "smudi-header__logo-container", children: x }),
|
|
86
|
+
/* @__PURE__ */ r("div", { className: "smudi-header__content-container", children: p })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
});
|
|
93
|
+
j.displayName = "Header";
|
|
94
|
+
export {
|
|
95
|
+
j as Header,
|
|
96
|
+
P as UDILogo
|
|
97
|
+
};
|