@postenbring/hedwig-react 0.0.63 → 0.0.64
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/dist/_tsup-dts-rollup.d.mts +57 -0
- package/dist/_tsup-dts-rollup.d.ts +57 -0
- package/dist/{chunk-JMDXW2ML.mjs → chunk-625SVQEP.mjs} +33 -3
- package/dist/chunk-625SVQEP.mjs.map +1 -0
- package/dist/{chunk-Q6REETZD.mjs → chunk-AKYK3XFN.mjs} +2 -1
- package/dist/{chunk-Q6REETZD.mjs.map → chunk-AKYK3XFN.mjs.map} +1 -1
- package/dist/{chunk-OYJQ5MAS.mjs → chunk-BYDSISQZ.mjs} +26 -3
- package/dist/chunk-BYDSISQZ.mjs.map +1 -0
- package/dist/{chunk-VKRPPQ6F.mjs → chunk-H3VGHTDC.mjs} +4 -2
- package/dist/chunk-H3VGHTDC.mjs.map +1 -0
- package/dist/index-no-css.d.mts +1 -0
- package/dist/index-no-css.d.ts +1 -0
- package/dist/index-no-css.js +58 -4
- package/dist/index-no-css.js.map +1 -1
- package/dist/index-no-css.mjs +4 -4
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +58 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/navbar/index.d.mts +1 -0
- package/dist/navbar/index.d.ts +1 -0
- package/dist/navbar/index.js +32 -2
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +2 -2
- package/dist/navbar/navbar.d.mts +1 -0
- package/dist/navbar/navbar.d.ts +1 -0
- package/dist/navbar/navbar.js +33 -2
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/navbar/navbar.mjs +3 -1
- package/dist/show-more/index.js +1 -0
- package/dist/show-more/index.js.map +1 -1
- package/dist/show-more/index.mjs +1 -1
- package/dist/skeleton/index.js +25 -2
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/skeleton/skeleton.js +25 -2
- package/dist/skeleton/skeleton.js.map +1 -1
- package/dist/skeleton/skeleton.mjs +1 -1
- package/dist/utilities/auto-animate-height.js +1 -0
- package/dist/utilities/auto-animate-height.js.map +1 -1
- package/dist/utilities/auto-animate-height.mjs +1 -1
- package/dist/utilities/index.js +1 -0
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/index.mjs +1 -1
- package/package.json +5 -4
- package/dist/chunk-JMDXW2ML.mjs.map +0 -1
- package/dist/chunk-OYJQ5MAS.mjs.map +0 -1
- package/dist/chunk-VKRPPQ6F.mjs.map +0 -1
|
@@ -1051,6 +1051,7 @@ declare interface NavbarButtonProps {
|
|
|
1051
1051
|
|
|
1052
1052
|
declare const NavbarComponent: ForwardRefExoticComponent<NavbarProps & RefAttributes<HTMLElement>> & {
|
|
1053
1053
|
Logo: typeof NavbarLogo;
|
|
1054
|
+
LogoAndServiceText: typeof NavbarLogoAndServiceText;
|
|
1054
1055
|
ExpandableMenu: typeof NavbarExpandableMenuComponent;
|
|
1055
1056
|
Button: typeof NavbarButton;
|
|
1056
1057
|
Navigation: typeof NavbarNavigation;
|
|
@@ -1104,12 +1105,53 @@ export declare interface NavbarExpandableMenuTriggerProps extends Omit<React_3.H
|
|
|
1104
1105
|
whenOpenHelperTitle?: string;
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
1108
|
+
/**
|
|
1109
|
+
* A fixed Posten or Bring logo.
|
|
1110
|
+
*
|
|
1111
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
1112
|
+
*/
|
|
1107
1113
|
declare const NavbarLogo: OverridableComponent<NavbarLogoProps, HTMLDivElement>;
|
|
1108
1114
|
export { NavbarLogo }
|
|
1109
1115
|
export { NavbarLogo as NavbarLogo_alias_1 }
|
|
1110
1116
|
export { NavbarLogo as NavbarLogo_alias_2 }
|
|
1111
1117
|
export { NavbarLogo as NavbarLogo_alias_3 }
|
|
1112
1118
|
|
|
1119
|
+
/**
|
|
1120
|
+
* Internal service or flagship text next to either the Posten or Bring logo
|
|
1121
|
+
*
|
|
1122
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
1123
|
+
*/
|
|
1124
|
+
declare const NavbarLogoAndServiceText: React_3.ForwardRefExoticComponent<NavbarLogoAndServiceText_2 & React_3.RefAttributes<HTMLDivElement>>;
|
|
1125
|
+
export { NavbarLogoAndServiceText }
|
|
1126
|
+
export { NavbarLogoAndServiceText as NavbarLogoAndServiceText_alias_1 }
|
|
1127
|
+
export { NavbarLogoAndServiceText as NavbarLogoAndServiceText_alias_2 }
|
|
1128
|
+
export { NavbarLogoAndServiceText as NavbarLogoAndServiceText_alias_3 }
|
|
1129
|
+
|
|
1130
|
+
declare interface NavbarLogoAndServiceText_2 extends HTMLAttributes<HTMLDivElement> {
|
|
1131
|
+
/**
|
|
1132
|
+
* The text display next to the logo
|
|
1133
|
+
*/
|
|
1134
|
+
children: React_3.ReactNode;
|
|
1135
|
+
/**
|
|
1136
|
+
* The text variant
|
|
1137
|
+
*
|
|
1138
|
+
* Use `service` for internal applications
|
|
1139
|
+
* Use `flagship` for public facing applications
|
|
1140
|
+
*/
|
|
1141
|
+
variant: "service" | "flagship";
|
|
1142
|
+
/**
|
|
1143
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
1144
|
+
*/
|
|
1145
|
+
asChild?: boolean;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Internal service or flagship text next to either the Posten or Bring logo
|
|
1150
|
+
*
|
|
1151
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
1152
|
+
*/
|
|
1153
|
+
declare const NavbarLogoAndServiceText: React_3.ForwardRefExoticComponent<NavbarLogoAndServiceText_2 & React_3.RefAttributes<HTMLDivElement>>;
|
|
1154
|
+
|
|
1113
1155
|
declare interface NavbarLogoProps {
|
|
1114
1156
|
children?: never;
|
|
1115
1157
|
}
|
|
@@ -1125,6 +1167,14 @@ declare interface NavbarNavigationProps {
|
|
|
1125
1167
|
}
|
|
1126
1168
|
|
|
1127
1169
|
declare interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
1170
|
+
/**
|
|
1171
|
+
* Navbar variant
|
|
1172
|
+
*
|
|
1173
|
+
* By default the `posten.no` variant is used which has a fixed logo and a fixed height of 112px
|
|
1174
|
+
*
|
|
1175
|
+
* For internal services or flagship services use the `service` should be used
|
|
1176
|
+
*/
|
|
1177
|
+
variant?: "default" | "service";
|
|
1128
1178
|
children: React_3.ReactNode;
|
|
1129
1179
|
}
|
|
1130
1180
|
export { NavbarProps }
|
|
@@ -1396,6 +1446,13 @@ declare interface SkeletonPropsInner extends React_2.AnchorHTMLAttributes<HTMLDi
|
|
|
1396
1446
|
* The visual style of the Skeleton
|
|
1397
1447
|
*/
|
|
1398
1448
|
variant?: "text" | "circle" | "rectangle" | "rounded";
|
|
1449
|
+
/**
|
|
1450
|
+
* Whether to show animation or not
|
|
1451
|
+
* In the future the animation effect might become configurable
|
|
1452
|
+
*
|
|
1453
|
+
* default true
|
|
1454
|
+
*/
|
|
1455
|
+
animation?: boolean;
|
|
1399
1456
|
children?: React_2.ReactNode;
|
|
1400
1457
|
}
|
|
1401
1458
|
|
|
@@ -1051,6 +1051,7 @@ declare interface NavbarButtonProps {
|
|
|
1051
1051
|
|
|
1052
1052
|
declare const NavbarComponent: ForwardRefExoticComponent<NavbarProps & RefAttributes<HTMLElement>> & {
|
|
1053
1053
|
Logo: typeof NavbarLogo;
|
|
1054
|
+
LogoAndServiceText: typeof NavbarLogoAndServiceText;
|
|
1054
1055
|
ExpandableMenu: typeof NavbarExpandableMenuComponent;
|
|
1055
1056
|
Button: typeof NavbarButton;
|
|
1056
1057
|
Navigation: typeof NavbarNavigation;
|
|
@@ -1104,12 +1105,53 @@ export declare interface NavbarExpandableMenuTriggerProps extends Omit<React_3.H
|
|
|
1104
1105
|
whenOpenHelperTitle?: string;
|
|
1105
1106
|
}
|
|
1106
1107
|
|
|
1108
|
+
/**
|
|
1109
|
+
* A fixed Posten or Bring logo.
|
|
1110
|
+
*
|
|
1111
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
1112
|
+
*/
|
|
1107
1113
|
declare const NavbarLogo: OverridableComponent<NavbarLogoProps, HTMLDivElement>;
|
|
1108
1114
|
export { NavbarLogo }
|
|
1109
1115
|
export { NavbarLogo as NavbarLogo_alias_1 }
|
|
1110
1116
|
export { NavbarLogo as NavbarLogo_alias_2 }
|
|
1111
1117
|
export { NavbarLogo as NavbarLogo_alias_3 }
|
|
1112
1118
|
|
|
1119
|
+
/**
|
|
1120
|
+
* Internal service or flagship text next to either the Posten or Bring logo
|
|
1121
|
+
*
|
|
1122
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
1123
|
+
*/
|
|
1124
|
+
declare const NavbarLogoAndServiceText: React_3.ForwardRefExoticComponent<NavbarLogoAndServiceText_2 & React_3.RefAttributes<HTMLDivElement>>;
|
|
1125
|
+
export { NavbarLogoAndServiceText }
|
|
1126
|
+
export { NavbarLogoAndServiceText as NavbarLogoAndServiceText_alias_1 }
|
|
1127
|
+
export { NavbarLogoAndServiceText as NavbarLogoAndServiceText_alias_2 }
|
|
1128
|
+
export { NavbarLogoAndServiceText as NavbarLogoAndServiceText_alias_3 }
|
|
1129
|
+
|
|
1130
|
+
declare interface NavbarLogoAndServiceText_2 extends HTMLAttributes<HTMLDivElement> {
|
|
1131
|
+
/**
|
|
1132
|
+
* The text display next to the logo
|
|
1133
|
+
*/
|
|
1134
|
+
children: React_3.ReactNode;
|
|
1135
|
+
/**
|
|
1136
|
+
* The text variant
|
|
1137
|
+
*
|
|
1138
|
+
* Use `service` for internal applications
|
|
1139
|
+
* Use `flagship` for public facing applications
|
|
1140
|
+
*/
|
|
1141
|
+
variant: "service" | "flagship";
|
|
1142
|
+
/**
|
|
1143
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
1144
|
+
*/
|
|
1145
|
+
asChild?: boolean;
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Internal service or flagship text next to either the Posten or Bring logo
|
|
1150
|
+
*
|
|
1151
|
+
* The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo
|
|
1152
|
+
*/
|
|
1153
|
+
declare const NavbarLogoAndServiceText: React_3.ForwardRefExoticComponent<NavbarLogoAndServiceText_2 & React_3.RefAttributes<HTMLDivElement>>;
|
|
1154
|
+
|
|
1113
1155
|
declare interface NavbarLogoProps {
|
|
1114
1156
|
children?: never;
|
|
1115
1157
|
}
|
|
@@ -1125,6 +1167,14 @@ declare interface NavbarNavigationProps {
|
|
|
1125
1167
|
}
|
|
1126
1168
|
|
|
1127
1169
|
declare interface NavbarProps extends HTMLAttributes<HTMLElement> {
|
|
1170
|
+
/**
|
|
1171
|
+
* Navbar variant
|
|
1172
|
+
*
|
|
1173
|
+
* By default the `posten.no` variant is used which has a fixed logo and a fixed height of 112px
|
|
1174
|
+
*
|
|
1175
|
+
* For internal services or flagship services use the `service` should be used
|
|
1176
|
+
*/
|
|
1177
|
+
variant?: "default" | "service";
|
|
1128
1178
|
children: React_3.ReactNode;
|
|
1129
1179
|
}
|
|
1130
1180
|
export { NavbarProps }
|
|
@@ -1396,6 +1446,13 @@ declare interface SkeletonPropsInner extends React_2.AnchorHTMLAttributes<HTMLDi
|
|
|
1396
1446
|
* The visual style of the Skeleton
|
|
1397
1447
|
*/
|
|
1398
1448
|
variant?: "text" | "circle" | "rectangle" | "rounded";
|
|
1449
|
+
/**
|
|
1450
|
+
* Whether to show animation or not
|
|
1451
|
+
* In the future the animation effect might become configurable
|
|
1452
|
+
*
|
|
1453
|
+
* default true
|
|
1454
|
+
*/
|
|
1455
|
+
animation?: boolean;
|
|
1399
1456
|
children?: React_2.ReactNode;
|
|
1400
1457
|
}
|
|
1401
1458
|
|
|
@@ -7,11 +7,20 @@ import {
|
|
|
7
7
|
// src/navbar/navbar.tsx
|
|
8
8
|
import { forwardRef } from "react";
|
|
9
9
|
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
10
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
10
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
12
|
var Navbar = forwardRef(
|
|
12
13
|
(_a, ref) => {
|
|
13
|
-
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
14
|
-
return /* @__PURE__ */ jsx(
|
|
14
|
+
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
"header",
|
|
17
|
+
__spreadProps(__spreadValues({
|
|
18
|
+
className: clsx("hds-navbar", variant && `hds-navbar--${variant}`, className),
|
|
19
|
+
ref
|
|
20
|
+
}, rest), {
|
|
21
|
+
children
|
|
22
|
+
})
|
|
23
|
+
);
|
|
15
24
|
}
|
|
16
25
|
);
|
|
17
26
|
Navbar.displayName = "Navbar";
|
|
@@ -22,6 +31,26 @@ var NavbarLogo = forwardRef(
|
|
|
22
31
|
}
|
|
23
32
|
);
|
|
24
33
|
NavbarLogo.displayName = "Navbar.Logo";
|
|
34
|
+
var NavbarLogoAndServiceText = forwardRef(
|
|
35
|
+
(_a, ref) => {
|
|
36
|
+
var _b = _a, { children, asChild, variant, className } = _b, rest = __objRest(_b, ["children", "asChild", "variant", "className"]);
|
|
37
|
+
const Component = asChild ? Slot : "div";
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
Component,
|
|
40
|
+
__spreadProps(__spreadValues({
|
|
41
|
+
ref,
|
|
42
|
+
className: clsx(
|
|
43
|
+
"hds-navbar__logo-and-service-text",
|
|
44
|
+
`hds-navbar__logo-and-service-text--${variant}`,
|
|
45
|
+
className
|
|
46
|
+
)
|
|
47
|
+
}, rest), {
|
|
48
|
+
children
|
|
49
|
+
})
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
NavbarLogoAndServiceText.displayName = "Navbar.NavbarLogoAndText";
|
|
25
54
|
var NavbarButton = forwardRef(
|
|
26
55
|
(_a, ref) => {
|
|
27
56
|
var _b = _a, { as: Component = "button", children, icon, className } = _b, rest = __objRest(_b, ["as", "children", "icon", "className"]);
|
|
@@ -48,7 +77,8 @@ NavbarNavigation.displayName = "Navbar.Navigation";
|
|
|
48
77
|
export {
|
|
49
78
|
Navbar,
|
|
50
79
|
NavbarLogo,
|
|
80
|
+
NavbarLogoAndServiceText,
|
|
51
81
|
NavbarButton,
|
|
52
82
|
NavbarNavigation
|
|
53
83
|
};
|
|
54
|
-
//# sourceMappingURL=chunk-
|
|
84
|
+
//# sourceMappingURL=chunk-625SVQEP.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/navbar/navbar.tsx"],"sourcesContent":["import React, { forwardRef, type HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface NavbarProps extends HTMLAttributes<HTMLElement> {\n /**\n * Navbar variant\n *\n * By default the `posten.no` variant is used which has a fixed logo and a fixed height of 112px\n *\n * For internal services or flagship services use the `service` should be used\n */\n variant?: \"default\" | \"service\";\n children: React.ReactNode;\n}\n\n/**\n * 🚨 WORK IN PROGRESS 🚨\n */\nexport const Navbar = forwardRef<HTMLElement, NavbarProps>(\n ({ children, className, variant, ...rest }, ref) => {\n return (\n <header\n className={clsx(\"hds-navbar\", variant && `hds-navbar--${variant}`, className as undefined)}\n ref={ref}\n {...rest}\n >\n {children}\n </header>\n );\n },\n);\nNavbar.displayName = \"Navbar\";\n\ninterface NavbarLogoProps {\n children?: never;\n}\n\n/**\n * A fixed Posten or Bring logo.\n *\n * The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo\n */\nexport const NavbarLogo: OverridableComponent<NavbarLogoProps, HTMLDivElement> = forwardRef(\n ({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component className={clsx(\"hds-navbar__logo\", className as undefined)} ref={ref} {...rest} />\n );\n },\n);\nNavbarLogo.displayName = \"Navbar.Logo\";\n\ninterface NavbarLogoAndServiceText extends HTMLAttributes<HTMLDivElement> {\n /**\n * The text display next to the logo\n */\n children: React.ReactNode;\n\n /**\n * The text variant\n *\n * Use `service` for internal applications\n * Use `flagship` for public facing applications\n */\n variant: \"service\" | \"flagship\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean;\n}\n/**\n * Internal service or flagship text next to either the Posten or Bring logo\n *\n * The logo follows the brand theme, so if the class `hds-theme-bring` is set the Bring logo will be shown instead of the Posten logo\n */\nexport const NavbarLogoAndServiceText = forwardRef<HTMLDivElement, NavbarLogoAndServiceText>(\n ({ children, asChild, variant, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-navbar__logo-and-service-text\",\n `hds-navbar__logo-and-service-text--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nNavbarLogoAndServiceText.displayName = \"Navbar.NavbarLogoAndText\";\n\n// Navbar button\ninterface NavbarButtonProps {\n icon?: React.ReactNode;\n children: React.ReactNode;\n}\nexport const NavbarButton: OverridableComponent<NavbarButtonProps, HTMLElement> = forwardRef(\n ({ as: Component = \"button\", children, icon, className, ...rest }, ref) => {\n return (\n <Component className={clsx(\"hds-navbar__button\", className as undefined)} ref={ref} {...rest}>\n {children} {icon}\n </Component>\n );\n },\n);\nNavbarButton.displayName = \"Navbar.Button\";\n\ninterface NavbarNavigationProps {\n children: React.ReactNode;\n}\nexport const NavbarNavigation: OverridableComponent<NavbarNavigationProps, HTMLElement> =\n forwardRef(({ as: Component = \"div\", className, ...rest }, ref) => {\n return (\n <Component\n className={clsx(\"hds-navbar__navigation\", className as undefined)}\n ref={ref}\n {...rest}\n />\n );\n });\nNavbarNavigation.displayName = \"Navbar.Navigation\";\n"],"mappings":";;;;;;;AAAA,SAAgB,kBAAuC;AACvD,SAAS,YAAY;AACrB,SAAS,YAAY;AAqBf,cAkFA,YAlFA;AAHC,IAAM,SAAS;AAAA,EACpB,CAAC,IAA2C,QAAQ;AAAnD,iBAAE,YAAU,WAAW,QArB1B,IAqBG,IAAmC,iBAAnC,IAAmC,CAAjC,YAAU,aAAW;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,cAAc,WAAW,eAAe,OAAO,IAAI,SAAsB;AAAA,QACzF;AAAA,SACI,OAHL;AAAA,QAKE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;AAWd,IAAM,aAAoE;AAAA,EAC/E,CAAC,IAA+C,QAAQ;AAAvD,iBAAE,MAAI,YAAY,OAAO,UA7C5B,IA6CG,IAAuC,iBAAvC,IAAuC,CAArC,MAAuB;AACxB,WACE,oBAAC,4BAAU,WAAW,KAAK,oBAAoB,SAAsB,GAAG,OAAc,KAAM;AAAA,EAEhG;AACF;AACA,WAAW,cAAc;AA0BlB,IAAM,2BAA2B;AAAA,EACtC,CAAC,IAAoD,QAAQ;AAA5D,iBAAE,YAAU,SAAS,SAAS,UA9EjC,IA8EG,IAA4C,iBAA5C,IAA4C,CAA1C,YAAU,WAAS,WAAS;AAC7B,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,sCAAsC,OAAO;AAAA,UAC7C;AAAA,QACF;AAAA,SACI,OAPL;AAAA,QASE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,yBAAyB,cAAc;AAOhC,IAAM,eAAqE;AAAA,EAChF,CAAC,IAAkE,QAAQ;AAA1E,iBAAE,MAAI,YAAY,UAAU,UAAU,MAAM,UAvG/C,IAuGG,IAA0D,iBAA1D,IAA0D,CAAxD,MAA0B,YAAU,QAAM;AAC3C,WACE,qBAAC,0CAAU,WAAW,KAAK,sBAAsB,SAAsB,GAAG,OAAc,OAAvF,EACE;AAAA;AAAA,MAAS;AAAA,MAAE;AAAA,QACd;AAAA,EAEJ;AACF;AACA,aAAa,cAAc;AAKpB,IAAM,mBACX,WAAW,CAAC,IAA+C,QAAQ;AAAvD,eAAE,MAAI,YAAY,OAAO,UArHvC,IAqHc,IAAuC,iBAAvC,IAAuC,CAArC,MAAuB;AACnC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,0BAA0B,SAAsB;AAAA,MAChE;AAAA,OACI;AAAA,EACN;AAEJ,CAAC;AACH,iBAAiB,cAAc;","names":[]}
|
|
@@ -60,6 +60,7 @@ var AutoAnimateHeight = forwardRef(
|
|
|
60
60
|
__spreadProps(__spreadValues({
|
|
61
61
|
ref,
|
|
62
62
|
style: __spreadValues({
|
|
63
|
+
position: "relative",
|
|
63
64
|
overflow: "hidden",
|
|
64
65
|
height,
|
|
65
66
|
transitionProperty: "height",
|
|
@@ -91,4 +92,4 @@ AutoAnimateHeight.displayName = "AutoAnimateHeight";
|
|
|
91
92
|
export {
|
|
92
93
|
AutoAnimateHeight
|
|
93
94
|
};
|
|
94
|
-
//# sourceMappingURL=chunk-
|
|
95
|
+
//# sourceMappingURL=chunk-AKYK3XFN.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utilities/auto-animate-height.tsx"],"sourcesContent":["import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport type { OverridableComponent } from \"../utils\";\n\nconst animationDurationToValue = {\n quick: 100,\n normal: 300,\n slow: 700,\n};\n\nexport interface AutoAnimateHeightProps {\n /**\n * Time of the animation, using the hedwig animation tokens\n * quick: 0.1s\n * normal: 0.3s\n * slow: 0.7s\n *\n * default is \"quick\"\n */\n animationDuration?: \"quick\" | \"normal\" | \"slow\";\n\n /**\n * Which hedwig easing function to use, default is \"normal\"\n */\n animationEasing?: \"in\" | \"out\" | \"normal\";\n children: React.ReactNode;\n style?: React.CSSProperties;\n}\n\n/**\n * Helper component to animate the height of the children when they change\n * It's done by rendering two versions of the passed children,\n * one hidden to measure the height and one visible to only changes after the height is measured.\n *\n * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.\n */\nexport const AutoAnimateHeight: OverridableComponent<AutoAnimateHeightProps, HTMLDivElement> =\n forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n ...rest\n },\n ref,\n ) => {\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<number | undefined>(undefined);\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n useEffect(() => {\n if (measurementRef.current) {\n const { height: newHeight } = measurementRef.current.getBoundingClientRect();\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n if (newHeight < (height ?? 0)) {\n // If the children are shrinking, hold off on replacing until the animation is done\n // This way we don't get a sudden flash of empty content\n setTimeout(() => {\n flushSync(() => {\n setHeight(newHeight);\n });\n timeoutRef.current = setTimeout(() => {\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }, animationDurationToValue[animationDuration]);\n });\n } else {\n setHeight(newHeight);\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <Component\n ref={ref}\n style={{\n overflow: \"hidden\",\n height,\n transitionProperty: \"height\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </Component>\n );\n },\n );\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n"],"mappings":";;;;;;;AAAA,SAAS,cAAc,YAAY,WAAW,QAAQ,gBAAgB;AACtE,SAAS,iBAAiB;AAoDL,wBA6Bb,YA7Ba;AAjDrB,IAAM,2BAA2B;AAAA,EAC/B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR;AA4BO,IAAM,oBACX;AAAA,EACE,CACE,IAQA,QACG;AATH,iBACE;AAAA,UAAI,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,MACA,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,IA5C1B,IAuCM,IAMK,iBANL,IAMK;AAAA,MALH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,aAAa,OAA8B,IAAI;AACrD,UAAM,iBAAiB,OAAuB,IAAI;AAClD,UAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B,MAAS;AAClE,UAAM,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,MAA0B,MACpE,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC;AAAA,IAClC;AACA,cAAU,MAAM;AACd,UAAI,eAAe,SAAS;AAC1B,cAAM,EAAE,QAAQ,UAAU,IAAI,eAAe,QAAQ,sBAAsB;AAE3E,YAAI,WAAW,SAAS;AACtB,uBAAa,WAAW,OAAO;AAAA,QACjC;AACA,YAAI,aAAa,0BAAU,IAAI;AAG7B,qBAAW,MAAM;AACf,sBAAU,MAAM;AACd,wBAAU,SAAS;AAAA,YACrB,CAAC;AACD,uBAAW,UAAU,WAAW,MAAM;AACpC,gCAAkB,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC,CAAC;AAAA,YACrD,GAAG,yBAAyB,iBAAiB,CAAC;AAAA,UAChD,CAAC;AAAA,QACH,OAAO;AACL,oBAAU,SAAS;AACnB,4BAAkB,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC,CAAC;AAAA,QACrD;AAAA,MACF;AAAA,IAEF,GAAG,CAAC,QAAQ,CAAC;AAEb,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO;AAAA,UACL,UAAU;AAAA,UACV;AAAA,UACA,oBAAoB;AAAA,UACpB,oBAAoB,sCAAsC,iBAAiB;AAAA,UAC3E,0BAA0B,oCAAoC,eAAe;AAAA,WAC1E;AAAA,SAED,
|
|
1
|
+
{"version":3,"sources":["../src/utilities/auto-animate-height.tsx"],"sourcesContent":["import { cloneElement, forwardRef, useEffect, useRef, useState } from \"react\";\nimport { flushSync } from \"react-dom\";\nimport type { OverridableComponent } from \"../utils\";\n\nconst animationDurationToValue = {\n quick: 100,\n normal: 300,\n slow: 700,\n};\n\nexport interface AutoAnimateHeightProps {\n /**\n * Time of the animation, using the hedwig animation tokens\n * quick: 0.1s\n * normal: 0.3s\n * slow: 0.7s\n *\n * default is \"quick\"\n */\n animationDuration?: \"quick\" | \"normal\" | \"slow\";\n\n /**\n * Which hedwig easing function to use, default is \"normal\"\n */\n animationEasing?: \"in\" | \"out\" | \"normal\";\n children: React.ReactNode;\n style?: React.CSSProperties;\n}\n\n/**\n * Helper component to animate the height of the children when they change\n * It's done by rendering two versions of the passed children,\n * one hidden to measure the height and one visible to only changes after the height is measured.\n *\n * **IMPORTANT** Do not pass any components with effects (like data fetching), as they will trigger twice.\n */\nexport const AutoAnimateHeight: OverridableComponent<AutoAnimateHeightProps, HTMLDivElement> =\n forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n style,\n animationDuration = \"quick\",\n animationEasing = \"normal\",\n ...rest\n },\n ref,\n ) => {\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const measurementRef = useRef<HTMLDivElement>(null);\n const [height, setHeight] = useState<number | undefined>(undefined);\n const [clonedChildren, setClonedChildren] = useState<React.ReactNode>(() =>\n cloneElement(<>{children}</>, {}),\n );\n useEffect(() => {\n if (measurementRef.current) {\n const { height: newHeight } = measurementRef.current.getBoundingClientRect();\n\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n if (newHeight < (height ?? 0)) {\n // If the children are shrinking, hold off on replacing until the animation is done\n // This way we don't get a sudden flash of empty content\n setTimeout(() => {\n flushSync(() => {\n setHeight(newHeight);\n });\n timeoutRef.current = setTimeout(() => {\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }, animationDurationToValue[animationDuration]);\n });\n } else {\n setHeight(newHeight);\n setClonedChildren(cloneElement(<>{children}</>, {}));\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, [children]);\n\n return (\n <Component\n ref={ref}\n style={{\n position: \"relative\",\n overflow: \"hidden\",\n height,\n transitionProperty: \"height\",\n transitionDuration: `var(--hds-micro-animation-duration-${animationDuration})`,\n transitionTimingFunction: `var(--hds-micro-animation-easing-${animationEasing})`,\n ...style,\n }}\n {...rest}\n >\n <div\n aria-hidden\n ref={measurementRef}\n style={{\n position: \"absolute\",\n visibility: \"hidden\",\n }}\n >\n {children}\n </div>\n {clonedChildren}\n </Component>\n );\n },\n );\nAutoAnimateHeight.displayName = \"AutoAnimateHeight\";\n"],"mappings":";;;;;;;AAAA,SAAS,cAAc,YAAY,WAAW,QAAQ,gBAAgB;AACtE,SAAS,iBAAiB;AAoDL,wBA6Bb,YA7Ba;AAjDrB,IAAM,2BAA2B;AAAA,EAC/B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AACR;AA4BO,IAAM,oBACX;AAAA,EACE,CACE,IAQA,QACG;AATH,iBACE;AAAA,UAAI,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,MACA,oBAAoB;AAAA,MACpB,kBAAkB;AAAA,IA5C1B,IAuCM,IAMK,iBANL,IAMK;AAAA,MALH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,aAAa,OAA8B,IAAI;AACrD,UAAM,iBAAiB,OAAuB,IAAI;AAClD,UAAM,CAAC,QAAQ,SAAS,IAAI,SAA6B,MAAS;AAClE,UAAM,CAAC,gBAAgB,iBAAiB,IAAI;AAAA,MAA0B,MACpE,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC;AAAA,IAClC;AACA,cAAU,MAAM;AACd,UAAI,eAAe,SAAS;AAC1B,cAAM,EAAE,QAAQ,UAAU,IAAI,eAAe,QAAQ,sBAAsB;AAE3E,YAAI,WAAW,SAAS;AACtB,uBAAa,WAAW,OAAO;AAAA,QACjC;AACA,YAAI,aAAa,0BAAU,IAAI;AAG7B,qBAAW,MAAM;AACf,sBAAU,MAAM;AACd,wBAAU,SAAS;AAAA,YACrB,CAAC;AACD,uBAAW,UAAU,WAAW,MAAM;AACpC,gCAAkB,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC,CAAC;AAAA,YACrD,GAAG,yBAAyB,iBAAiB,CAAC;AAAA,UAChD,CAAC;AAAA,QACH,OAAO;AACL,oBAAU,SAAS;AACnB,4BAAkB,aAAa,gCAAG,UAAS,GAAK,CAAC,CAAC,CAAC;AAAA,QACrD;AAAA,MACF;AAAA,IAEF,GAAG,CAAC,QAAQ,CAAC;AAEb,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,OAAO;AAAA,UACL,UAAU;AAAA,UACV,UAAU;AAAA,UACV;AAAA,UACA,oBAAoB;AAAA,UACpB,oBAAoB,sCAAsC,iBAAiB;AAAA,UAC3E,0BAA0B,oCAAoC,eAAe;AAAA,WAC1E;AAAA,SAED,OAXL;AAAA,QAaC;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,eAAW;AAAA,cACX,KAAK;AAAA,cACL,OAAO;AAAA,gBACL,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACC;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACF,kBAAkB,cAAc;","names":[]}
|
|
@@ -11,11 +11,34 @@ import { forwardRef } from "react";
|
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
var Skeleton = forwardRef(
|
|
13
13
|
(_a, ref) => {
|
|
14
|
-
var _b = _a, {
|
|
14
|
+
var _b = _a, {
|
|
15
|
+
as: Component = "div",
|
|
16
|
+
children,
|
|
17
|
+
animation,
|
|
18
|
+
variant = "text",
|
|
19
|
+
width,
|
|
20
|
+
height,
|
|
21
|
+
className,
|
|
22
|
+
style
|
|
23
|
+
} = _b, rest = __objRest(_b, [
|
|
24
|
+
"as",
|
|
25
|
+
"children",
|
|
26
|
+
"animation",
|
|
27
|
+
"variant",
|
|
28
|
+
"width",
|
|
29
|
+
"height",
|
|
30
|
+
"className",
|
|
31
|
+
"style"
|
|
32
|
+
]);
|
|
15
33
|
return /* @__PURE__ */ jsx(
|
|
16
34
|
Component,
|
|
17
35
|
__spreadProps(__spreadValues({
|
|
18
|
-
className: clsx(
|
|
36
|
+
className: clsx(
|
|
37
|
+
"hds-skeleton",
|
|
38
|
+
`hds-skeleton--${variant}`,
|
|
39
|
+
!animation && `hds-skeleton--no-animation`,
|
|
40
|
+
className
|
|
41
|
+
),
|
|
19
42
|
style: __spreadProps(__spreadValues({}, style), { width, height }),
|
|
20
43
|
ref,
|
|
21
44
|
"aria-hidden": true
|
|
@@ -30,4 +53,4 @@ Skeleton.displayName = "Skeleton";
|
|
|
30
53
|
export {
|
|
31
54
|
Skeleton
|
|
32
55
|
};
|
|
33
|
-
//# sourceMappingURL=chunk-
|
|
56
|
+
//# sourceMappingURL=chunk-BYDSISQZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/skeleton/skeleton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport type { OverridableComponent } from \"../utils\";\n\ninterface DimensionsFromWidthAndHeight {\n height?: number | string;\n width?: number | string;\n}\n\ninterface SkeletonPropsInner extends React.AnchorHTMLAttributes<HTMLDivElement> {\n /**\n * The visual style of the Skeleton\n */\n variant?: \"text\" | \"circle\" | \"rectangle\" | \"rounded\";\n\n /**\n * Whether to show animation or not\n * In the future the animation effect might become configurable\n *\n * default true\n */\n animation?: boolean;\n\n children?: React.ReactNode;\n}\n\nexport type SkeletonProps = SkeletonPropsInner & DimensionsFromWidthAndHeight;\n\n/**\n * Make skeleton loading states as placeholders for your content while waiting for data to load.\n *\n * **Note**\n *\n * Consider if this is really needed. The best experience is to avoid loading states altogether.\n * If your loading takes under 1 second, it better to not show anything at all.\n *\n * - Make your backend faster\n * - Preload/prefetch data\n * - Avoid data loading waterfalls\n * - Use optimistic ui when doing mutations\n *\n * **Usage**\n *\n * ```tsx\n * <Skeleton variant=\"circle\" width=\"2rem\" height=\"2rem\" />\n * <Skeleton variant=\"text\" />\n * <Skeleton variant=\"text\" width=\"80%\" />\n * <Skeleton variant=\"text\">Uses content to determine width</Skeleton>\n * <Skeleton variant=\"rectangle\" width=\"300px\" height=\"400px\" />\n * ```\n *\n * Remember to set `aria-hidden` on top level components you use that are not the `Skeleton` component.\n *\n * The `Skeleton` component does this for it self, but if you are using other components higher up in the tree, it might cause problems with screen readers\n *\n * **References**\n * - https://aksel.nav.no/komponenter/core/skeleton\n * - https://chakra-ui.com/docs/components/skeleton\n * - https://mui.com/material-ui/react-skeleton/\n */\nexport const Skeleton: OverridableComponent<SkeletonProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\n children,\n animation,\n variant = \"text\",\n width,\n height,\n className,\n style,\n ...rest\n },\n ref,\n ) => {\n return (\n <Component\n className={clsx(\n \"hds-skeleton\",\n `hds-skeleton--${variant}`,\n !animation && `hds-skeleton--no-animation`,\n className as undefined,\n )}\n style={{ ...style, width, height }}\n ref={ref}\n aria-hidden\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nSkeleton.displayName = \"Skeleton\";\n"],"mappings":";;;;;;;AAAA,OAAuB;AACvB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AA2ErB;AAhBC,IAAM,WAAgE;AAAA,EAC3E,CACE,IAWA,QACG;AAZH,iBACE;AAAA,UAAI,YAAY;AAAA,MAChB;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IAvEN,IA+DI,IASK,iBATL,IASK;AAAA,MARH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,iBAAiB,OAAO;AAAA,UACxB,CAAC,aAAa;AAAA,UACd;AAAA,QACF;AAAA,QACA,OAAO,iCAAK,QAAL,EAAY,OAAO,OAAO;AAAA,QACjC;AAAA,QACA,eAAW;AAAA,SACP,OAVL;AAAA,QAYE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":[]}
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
Navbar,
|
|
8
8
|
NavbarButton,
|
|
9
9
|
NavbarLogo,
|
|
10
|
+
NavbarLogoAndServiceText,
|
|
10
11
|
NavbarNavigation
|
|
11
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-625SVQEP.mjs";
|
|
12
13
|
|
|
13
14
|
// src/navbar/index.tsx
|
|
14
15
|
var NavbarExpandableMenuComponent = NavbarExpandableMenu;
|
|
@@ -16,6 +17,7 @@ NavbarExpandableMenuComponent.Trigger = NavbarExpandableMenuTrigger;
|
|
|
16
17
|
NavbarExpandableMenuComponent.Content = NavbarExpandableMenuContent;
|
|
17
18
|
var NavbarComponent = Navbar;
|
|
18
19
|
NavbarComponent.Logo = NavbarLogo;
|
|
20
|
+
NavbarComponent.LogoAndServiceText = NavbarLogoAndServiceText;
|
|
19
21
|
NavbarComponent.ExpandableMenu = NavbarExpandableMenuComponent;
|
|
20
22
|
NavbarComponent.Button = NavbarButton;
|
|
21
23
|
NavbarComponent.Navigation = NavbarNavigation;
|
|
@@ -23,4 +25,4 @@ NavbarComponent.Navigation = NavbarNavigation;
|
|
|
23
25
|
export {
|
|
24
26
|
NavbarComponent
|
|
25
27
|
};
|
|
26
|
-
//# sourceMappingURL=chunk-
|
|
28
|
+
//# sourceMappingURL=chunk-H3VGHTDC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/navbar/index.tsx"],"sourcesContent":["import {\n Navbar,\n NavbarLogo,\n NavbarButton,\n NavbarNavigation,\n NavbarLogoAndServiceText,\n} from \"./navbar\";\nimport {\n NavbarExpandableMenu,\n NavbarExpandableMenuTrigger,\n NavbarExpandableMenuContent,\n} from \"./navbar-expandable-menu\";\n\nconst NavbarExpandableMenuComponent = NavbarExpandableMenu as typeof NavbarExpandableMenu & {\n Trigger: typeof NavbarExpandableMenuTrigger;\n Content: typeof NavbarExpandableMenuContent;\n};\nNavbarExpandableMenuComponent.Trigger = NavbarExpandableMenuTrigger;\nNavbarExpandableMenuComponent.Content = NavbarExpandableMenuContent;\n\nconst NavbarComponent = Navbar as typeof Navbar & {\n Logo: typeof NavbarLogo;\n LogoAndServiceText: typeof NavbarLogoAndServiceText;\n ExpandableMenu: typeof NavbarExpandableMenuComponent;\n Button: typeof NavbarButton;\n Navigation: typeof NavbarNavigation;\n};\nNavbarComponent.Logo = NavbarLogo;\nNavbarComponent.LogoAndServiceText = NavbarLogoAndServiceText;\nNavbarComponent.ExpandableMenu = NavbarExpandableMenuComponent;\nNavbarComponent.Button = NavbarButton;\nNavbarComponent.Navigation = NavbarNavigation;\n\nexport { NavbarComponent as Navbar };\nexport type * from \"./navbar\";\n"],"mappings":";;;;;;;;;;;;;;AAaA,IAAM,gCAAgC;AAItC,8BAA8B,UAAU;AACxC,8BAA8B,UAAU;AAExC,IAAM,kBAAkB;AAOxB,gBAAgB,OAAO;AACvB,gBAAgB,qBAAqB;AACrC,gBAAgB,iBAAiB;AACjC,gBAAgB,SAAS;AACzB,gBAAgB,aAAa;","names":[]}
|
package/dist/index-no-css.d.mts
CHANGED
|
@@ -72,6 +72,7 @@ export { ModalFooter } from './_tsup-dts-rollup';
|
|
|
72
72
|
export { Navbar } from './_tsup-dts-rollup';
|
|
73
73
|
export { NavbarProps } from './_tsup-dts-rollup';
|
|
74
74
|
export { NavbarLogo } from './_tsup-dts-rollup';
|
|
75
|
+
export { NavbarLogoAndServiceText } from './_tsup-dts-rollup';
|
|
75
76
|
export { NavbarButton } from './_tsup-dts-rollup';
|
|
76
77
|
export { NavbarNavigation } from './_tsup-dts-rollup';
|
|
77
78
|
export { AutoAnimateHeight } from './_tsup-dts-rollup';
|
package/dist/index-no-css.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ export { ModalFooter } from './_tsup-dts-rollup';
|
|
|
72
72
|
export { Navbar } from './_tsup-dts-rollup';
|
|
73
73
|
export { NavbarProps } from './_tsup-dts-rollup';
|
|
74
74
|
export { NavbarLogo } from './_tsup-dts-rollup';
|
|
75
|
+
export { NavbarLogoAndServiceText } from './_tsup-dts-rollup';
|
|
75
76
|
export { NavbarButton } from './_tsup-dts-rollup';
|
|
76
77
|
export { NavbarNavigation } from './_tsup-dts-rollup';
|
|
77
78
|
export { AutoAnimateHeight } from './_tsup-dts-rollup';
|
package/dist/index-no-css.js
CHANGED
|
@@ -1256,11 +1256,20 @@ ModalComponent.Footer = ModalFooter;
|
|
|
1256
1256
|
// src/navbar/navbar.tsx
|
|
1257
1257
|
var import_react22 = require("react");
|
|
1258
1258
|
var import_typed_classname25 = require("@postenbring/hedwig-css/typed-classname");
|
|
1259
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
1259
1260
|
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1260
1261
|
var Navbar = (0, import_react22.forwardRef)(
|
|
1261
1262
|
(_a, ref) => {
|
|
1262
|
-
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
1263
|
-
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1263
|
+
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
1264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1265
|
+
"header",
|
|
1266
|
+
__spreadProps(__spreadValues({
|
|
1267
|
+
className: (0, import_typed_classname25.clsx)("hds-navbar", variant && `hds-navbar--${variant}`, className),
|
|
1268
|
+
ref
|
|
1269
|
+
}, rest), {
|
|
1270
|
+
children
|
|
1271
|
+
})
|
|
1272
|
+
);
|
|
1264
1273
|
}
|
|
1265
1274
|
);
|
|
1266
1275
|
Navbar.displayName = "Navbar";
|
|
@@ -1271,6 +1280,26 @@ var NavbarLogo = (0, import_react22.forwardRef)(
|
|
|
1271
1280
|
}
|
|
1272
1281
|
);
|
|
1273
1282
|
NavbarLogo.displayName = "Navbar.Logo";
|
|
1283
|
+
var NavbarLogoAndServiceText = (0, import_react22.forwardRef)(
|
|
1284
|
+
(_a, ref) => {
|
|
1285
|
+
var _b = _a, { children, asChild, variant, className } = _b, rest = __objRest(_b, ["children", "asChild", "variant", "className"]);
|
|
1286
|
+
const Component = asChild ? import_react_slot.Slot : "div";
|
|
1287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
1288
|
+
Component,
|
|
1289
|
+
__spreadProps(__spreadValues({
|
|
1290
|
+
ref,
|
|
1291
|
+
className: (0, import_typed_classname25.clsx)(
|
|
1292
|
+
"hds-navbar__logo-and-service-text",
|
|
1293
|
+
`hds-navbar__logo-and-service-text--${variant}`,
|
|
1294
|
+
className
|
|
1295
|
+
)
|
|
1296
|
+
}, rest), {
|
|
1297
|
+
children
|
|
1298
|
+
})
|
|
1299
|
+
);
|
|
1300
|
+
}
|
|
1301
|
+
);
|
|
1302
|
+
NavbarLogoAndServiceText.displayName = "Navbar.NavbarLogoAndText";
|
|
1274
1303
|
var NavbarButton = (0, import_react22.forwardRef)(
|
|
1275
1304
|
(_a, ref) => {
|
|
1276
1305
|
var _b = _a, { as: Component = "button", children, icon, className } = _b, rest = __objRest(_b, ["as", "children", "icon", "className"]);
|
|
@@ -1488,6 +1517,7 @@ NavbarExpandableMenuComponent.Trigger = NavbarExpandableMenuTrigger;
|
|
|
1488
1517
|
NavbarExpandableMenuComponent.Content = NavbarExpandableMenuContent;
|
|
1489
1518
|
var NavbarComponent = Navbar;
|
|
1490
1519
|
NavbarComponent.Logo = NavbarLogo;
|
|
1520
|
+
NavbarComponent.LogoAndServiceText = NavbarLogoAndServiceText;
|
|
1491
1521
|
NavbarComponent.ExpandableMenu = NavbarExpandableMenuComponent;
|
|
1492
1522
|
NavbarComponent.Button = NavbarButton;
|
|
1493
1523
|
NavbarComponent.Navigation = NavbarNavigation;
|
|
@@ -1548,6 +1578,7 @@ var AutoAnimateHeight = (0, import_react24.forwardRef)(
|
|
|
1548
1578
|
__spreadProps(__spreadValues({
|
|
1549
1579
|
ref,
|
|
1550
1580
|
style: __spreadValues({
|
|
1581
|
+
position: "relative",
|
|
1551
1582
|
overflow: "hidden",
|
|
1552
1583
|
height,
|
|
1553
1584
|
transitionProperty: "height",
|
|
@@ -1612,11 +1643,34 @@ var import_react26 = require("react");
|
|
|
1612
1643
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
1613
1644
|
var Skeleton = (0, import_react26.forwardRef)(
|
|
1614
1645
|
(_a, ref) => {
|
|
1615
|
-
var _b = _a, {
|
|
1646
|
+
var _b = _a, {
|
|
1647
|
+
as: Component = "div",
|
|
1648
|
+
children,
|
|
1649
|
+
animation,
|
|
1650
|
+
variant = "text",
|
|
1651
|
+
width,
|
|
1652
|
+
height,
|
|
1653
|
+
className,
|
|
1654
|
+
style
|
|
1655
|
+
} = _b, rest = __objRest(_b, [
|
|
1656
|
+
"as",
|
|
1657
|
+
"children",
|
|
1658
|
+
"animation",
|
|
1659
|
+
"variant",
|
|
1660
|
+
"width",
|
|
1661
|
+
"height",
|
|
1662
|
+
"className",
|
|
1663
|
+
"style"
|
|
1664
|
+
]);
|
|
1616
1665
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
1617
1666
|
Component,
|
|
1618
1667
|
__spreadProps(__spreadValues({
|
|
1619
|
-
className: (0, import_typed_classname28.clsx)(
|
|
1668
|
+
className: (0, import_typed_classname28.clsx)(
|
|
1669
|
+
"hds-skeleton",
|
|
1670
|
+
`hds-skeleton--${variant}`,
|
|
1671
|
+
!animation && `hds-skeleton--no-animation`,
|
|
1672
|
+
className
|
|
1673
|
+
),
|
|
1620
1674
|
style: __spreadProps(__spreadValues({}, style), { width, height }),
|
|
1621
1675
|
ref,
|
|
1622
1676
|
"aria-hidden": true
|