@postenbring/hedwig-react 0.0.87 → 0.0.89
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/badge/badge.d.ts +7 -3
- package/dist/badge/badge.d.ts.map +1 -1
- package/dist/badge/badge.js.map +1 -1
- package/dist/badge/badge.mjs +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +1 -1
- package/dist/blockquote/blockquote.d.ts +29 -0
- package/dist/blockquote/blockquote.d.ts.map +1 -0
- package/dist/blockquote/blockquote.js +83 -0
- package/dist/blockquote/blockquote.js.map +1 -0
- package/dist/blockquote/blockquote.mjs +8 -0
- package/dist/blockquote/index.d.ts +3 -0
- package/dist/blockquote/index.d.ts.map +1 -0
- package/dist/blockquote/index.js +85 -0
- package/dist/blockquote/index.js.map +1 -0
- package/dist/blockquote/index.mjs +9 -0
- package/dist/chunk-3H7S7C3S.mjs +37 -0
- package/dist/chunk-3H7S7C3S.mjs.map +1 -0
- package/dist/{chunk-YIERXOCG.mjs → chunk-6ZO2TMOX.mjs} +2 -2
- package/dist/{chunk-F4EAUOJX.mjs → chunk-EAFQ3XQU.mjs} +2 -2
- package/dist/{chunk-OFY2FVXB.mjs → chunk-EGW3RCXD.mjs} +2 -2
- package/dist/chunk-EGW3RCXD.mjs.map +1 -0
- package/dist/{chunk-WEQIEPMT.mjs → chunk-JQGB77SS.mjs} +1 -1
- package/dist/chunk-JQGB77SS.mjs.map +1 -0
- package/dist/chunk-JYN2QSN2.mjs +36 -0
- package/dist/chunk-JYN2QSN2.mjs.map +1 -0
- package/dist/chunk-K2CB2NLY.mjs +1 -0
- package/dist/chunk-KFDS3IPB.mjs +1 -0
- package/dist/{chunk-YLBJMVIX.mjs → chunk-M7MG7ZQT.mjs} +2 -2
- package/dist/chunk-OE6RISJS.mjs +24 -0
- package/dist/chunk-OE6RISJS.mjs.map +1 -0
- package/dist/{chunk-TCO3ZAZW.mjs → chunk-OXZOGFNV.mjs} +1 -1
- package/dist/chunk-OXZOGFNV.mjs.map +1 -0
- package/dist/{chunk-GUNPGSAS.mjs → chunk-UL2V2Z5B.mjs} +12 -12
- package/dist/chunk-UL2V2Z5B.mjs.map +1 -0
- package/dist/chunk-XAFNJELJ.mjs +1 -0
- package/dist/chunk-XAFNJELJ.mjs.map +1 -0
- package/dist/{chunk-ZYTUK4B4.mjs → chunk-YS7HBWOI.mjs} +4 -3
- package/dist/chunk-YS7HBWOI.mjs.map +1 -0
- package/dist/figure/figure.d.ts +22 -0
- package/dist/figure/figure.d.ts.map +1 -0
- package/dist/figure/figure.js +71 -0
- package/dist/figure/figure.js.map +1 -0
- package/dist/figure/figure.mjs +8 -0
- package/dist/figure/figure.mjs.map +1 -0
- package/dist/figure/index.d.ts +3 -0
- package/dist/figure/index.d.ts.map +1 -0
- package/dist/figure/index.js +73 -0
- package/dist/figure/index.js.map +1 -0
- package/dist/figure/index.mjs +9 -0
- package/dist/figure/index.mjs.map +1 -0
- package/dist/form/checkbox/checkbox.js.map +1 -1
- package/dist/form/checkbox/checkbox.mjs +2 -2
- package/dist/form/checkbox/index.js.map +1 -1
- package/dist/form/checkbox/index.mjs +2 -2
- package/dist/form/fieldset/fieldset.d.ts +2 -2
- package/dist/form/fieldset/fieldset.js.map +1 -1
- package/dist/form/fieldset/fieldset.mjs +1 -1
- package/dist/form/fieldset/index.js.map +1 -1
- package/dist/form/fieldset/index.mjs +1 -1
- package/dist/form/index.d.ts +1 -1
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +13 -12
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +17 -17
- package/dist/form/radio-button/index.d.ts +5 -0
- package/dist/form/radio-button/index.d.ts.map +1 -0
- package/dist/form/{radiobutton → radio-button}/index.js +17 -16
- package/dist/form/radio-button/index.js.map +1 -0
- package/dist/form/{radiobutton → radio-button}/index.mjs +6 -6
- package/dist/form/radio-button/index.mjs.map +1 -0
- package/dist/form/{radiobutton/radiobutton.d.ts → radio-button/radio-button.d.ts} +6 -6
- package/dist/form/radio-button/radio-button.d.ts.map +1 -0
- package/dist/form/{radiobutton/radiobutton.js → radio-button/radio-button.js} +17 -16
- package/dist/form/radio-button/radio-button.js.map +1 -0
- package/dist/form/radio-button/radio-button.mjs +13 -0
- package/dist/form/radio-button/radio-button.mjs.map +1 -0
- package/dist/form/{radiobutton/radiogroup.d.ts → radio-button/radio-group.d.ts} +7 -7
- package/dist/form/radio-button/radio-group.d.ts.map +1 -0
- package/dist/form/{radiobutton/radiogroup.js → radio-button/radio-group.js} +7 -6
- package/dist/form/radio-button/radio-group.js.map +1 -0
- package/dist/form/{radiobutton/radiogroup.mjs → radio-button/radio-group.mjs} +3 -3
- package/dist/form/radio-button/radio-group.mjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +554 -498
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +76 -66
- package/dist/layout/index.mjs +6 -6
- package/dist/navbar/icons.d.ts.map +1 -1
- package/dist/navbar/icons.js +16 -5
- package/dist/navbar/icons.js.map +1 -1
- package/dist/navbar/icons.mjs +1 -1
- package/dist/navbar/index.js +16 -5
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +3 -3
- package/dist/navbar/navbar-expandable-menu.js +16 -5
- package/dist/navbar/navbar-expandable-menu.js.map +1 -1
- package/dist/navbar/navbar-expandable-menu.mjs +2 -2
- package/dist/navbar/navbar.js +16 -5
- package/dist/navbar/navbar.js.map +1 -1
- package/dist/navbar/navbar.mjs +3 -3
- package/dist/styled-html/index.js +1 -1
- package/dist/styled-html/index.js.map +1 -1
- package/dist/styled-html/index.mjs +1 -1
- package/dist/styled-html/styled-html.d.ts +9 -1
- package/dist/styled-html/styled-html.d.ts.map +1 -1
- package/dist/styled-html/styled-html.js +1 -1
- package/dist/styled-html/styled-html.js.map +1 -1
- package/dist/styled-html/styled-html.mjs +1 -1
- package/package.json +4 -4
- package/src/accordion/accordion.stories.tsx +8 -113
- package/src/badge/badge.stories.tsx +2 -30
- package/src/badge/badge.tsx +7 -3
- package/src/blockquote/blockquote.stories.tsx +22 -0
- package/src/blockquote/blockquote.tsx +52 -0
- package/src/blockquote/index.tsx +3 -0
- package/src/box/box.stories.tsx +14 -84
- package/src/breadcrumbs/breadcrumbs.stories.tsx +8 -22
- package/src/button/button.stories.tsx +2 -85
- package/src/card/card.stories.tsx +2 -42
- package/src/description-list/description-list.stories.tsx +6 -71
- package/src/figure/figure.stories.tsx +22 -0
- package/src/figure/figure.tsx +36 -0
- package/src/figure/index.tsx +3 -0
- package/src/form/checkbox/checkbox.stories.tsx +5 -80
- package/src/form/date-picker/date-picker.stories.tsx +8 -7
- package/src/form/error-message/error-message.stories.tsx +3 -2
- package/src/form/fieldset/fieldset.stories.tsx +2 -58
- package/src/form/fieldset/fieldset.tsx +2 -2
- package/src/form/index.tsx +1 -1
- package/src/form/input/input.stories.tsx +2 -142
- package/src/form/radio-button/index.tsx +4 -0
- package/src/form/radio-button/radio-button.stories.tsx +26 -0
- package/src/form/{radiobutton/radiobutton.tsx → radio-button/radio-button.tsx} +13 -13
- package/src/form/{radiobutton/radiogroup.stories.tsx → radio-button/radio-group.stories.tsx} +9 -9
- package/src/form/{radiobutton/radiogroup.tsx → radio-button/radio-group.tsx} +7 -6
- package/src/form/select/select.stories.tsx +2 -61
- package/src/form/textarea/textarea.stories.tsx +5 -85
- package/src/help-text/help-text.stories.tsx +20 -0
- package/src/index.ts +2 -0
- package/src/layout/container/container.stories.tsx +18 -14
- package/src/layout/grid/grid.stories.tsx +28 -0
- package/src/layout/stack/stack.stories.tsx +28 -0
- package/src/link/link.stories.tsx +8 -38
- package/src/list/link-list.stories.tsx +25 -27
- package/src/list/list.stories.tsx +11 -48
- package/src/message/message.stories.tsx +8 -65
- package/src/modal/modal.stories.tsx +2 -103
- package/src/navbar/icons.tsx +10 -3
- package/src/navbar/navbar.stories.tsx +23 -62
- package/src/show-more/show-more.stories.tsx +3 -98
- package/src/skeleton/skeleton.stories.tsx +3 -126
- package/src/step-indicator/step-indicator.stories.tsx +2 -31
- package/src/styled-html/styled-html.stories.tsx +22 -155
- package/src/styled-html/styled-html.tsx +12 -2
- package/src/table/table.stories.tsx +43 -0
- package/src/tabs/tabs.stories.tsx +8 -114
- package/src/text/text.stories.tsx +18 -83
- package/src/warning-banner/warning-banner.stories.tsx +2 -23
- package/dist/chunk-2KX7VFN2.mjs +0 -1
- package/dist/chunk-GUNPGSAS.mjs.map +0 -1
- package/dist/chunk-MOU6WBT2.mjs +0 -26
- package/dist/chunk-MOU6WBT2.mjs.map +0 -1
- package/dist/chunk-OFY2FVXB.mjs.map +0 -1
- package/dist/chunk-TCO3ZAZW.mjs.map +0 -1
- package/dist/chunk-WEQIEPMT.mjs.map +0 -1
- package/dist/chunk-ZYTUK4B4.mjs.map +0 -1
- package/dist/form/radiobutton/index.d.ts +0 -5
- package/dist/form/radiobutton/index.d.ts.map +0 -1
- package/dist/form/radiobutton/index.js.map +0 -1
- package/dist/form/radiobutton/radiobutton.d.ts.map +0 -1
- package/dist/form/radiobutton/radiobutton.js.map +0 -1
- package/dist/form/radiobutton/radiobutton.mjs +0 -13
- package/dist/form/radiobutton/radiogroup.d.ts.map +0 -1
- package/dist/form/radiobutton/radiogroup.js.map +0 -1
- package/src/form/radiobutton/index.tsx +0 -4
- package/src/form/radiobutton/radiobutton.stories.tsx +0 -93
- /package/dist/{chunk-2KX7VFN2.mjs.map → blockquote/blockquote.mjs.map} +0 -0
- /package/dist/{form/radiobutton → blockquote}/index.mjs.map +0 -0
- /package/dist/{chunk-YIERXOCG.mjs.map → chunk-6ZO2TMOX.mjs.map} +0 -0
- /package/dist/{chunk-F4EAUOJX.mjs.map → chunk-EAFQ3XQU.mjs.map} +0 -0
- /package/dist/{form/radiobutton/radiobutton.mjs.map → chunk-K2CB2NLY.mjs.map} +0 -0
- /package/dist/{form/radiobutton/radiogroup.mjs.map → chunk-KFDS3IPB.mjs.map} +0 -0
- /package/dist/{chunk-YLBJMVIX.mjs.map → chunk-M7MG7ZQT.mjs.map} +0 -0
package/dist/badge/badge.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export interface BadgeProps extends React.
|
|
2
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
/**
|
|
5
5
|
* Color of the badge
|
|
6
6
|
*
|
|
7
7
|
* @default "lighter"
|
|
8
8
|
*/
|
|
9
|
-
variant?: "lighter" | "
|
|
9
|
+
variant?: "lighter" | "darker" | "white" | "warning";
|
|
10
10
|
/**
|
|
11
11
|
* Font size of the badge
|
|
12
12
|
*
|
|
@@ -24,7 +24,11 @@ export interface BadgeProps extends React.AnchorHTMLAttributes<HTMLSpanElement>
|
|
|
24
24
|
* Badges are used to label, categorize or organize items using keywords to describe them.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
|
-
*
|
|
27
|
+
*
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Badge variant="darker">Darker</Badge>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
28
32
|
*/
|
|
29
33
|
export declare const Badge: import("react").ForwardRefExoticComponent<BadgeProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
30
34
|
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/badge/badge.tsx"],"names":[],"mappings":";AAIA,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/badge/badge.tsx"],"names":[],"mappings":";AAIA,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IAErD;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAE3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,KAAK,wGAkBjB,CAAC"}
|
package/dist/badge/badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/badge/badge.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.
|
|
1
|
+
{"version":3,"sources":["../../src/badge/badge.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n\n /**\n * Color of the badge\n *\n * @default \"lighter\"\n */\n variant?: \"lighter\" | \"darker\" | \"white\" | \"warning\";\n\n /**\n * Font size of the badge\n *\n * @default \"small\"\n */\n size?: \"small\" | \"smaller\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Badges are used to label, categorize or organize items using keywords to describe them.\n *\n * @example\n *\n * ```tsx\n * <Badge variant=\"darker\">Darker</Badge>\n * ```\n *\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n ({ children, asChild, variant = \"lighter\", size = \"small\", className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-badge\",\n `hds-badge--${size}`,\n `hds-badge--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBadge.displayName = \"Badge\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAqB;AACrB,wBAAqB;AACrB,mBAA2B;AAyCrB;AAJC,IAAM,YAAQ;AAAA,EACnB,CAAC,IAAgF,QAAQ;AAAxF,iBAAE,YAAU,SAAS,UAAU,WAAW,OAAO,SAAS,UAxC7D,IAwCG,IAAwE,iBAAxE,IAAwE,CAAtE,YAAU,WAAS,WAAqB,QAAgB;AACzD,UAAM,YAAY,UAAU,yBAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA,cAAc,IAAI;AAAA,UAClB,cAAc,OAAO;AAAA,UACrB;AAAA,QACF;AAAA,SACI,OARL;AAAA,QAUE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
package/dist/badge/badge.mjs
CHANGED
package/dist/badge/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/badge/index.tsx","../../src/badge/badge.tsx"],"sourcesContent":["export { Badge } from \"./badge\";\n\nexport type * from \"./badge\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.
|
|
1
|
+
{"version":3,"sources":["../../src/badge/index.tsx","../../src/badge/badge.tsx"],"sourcesContent":["export { Badge } from \"./badge\";\n\nexport type * from \"./badge\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n\n /**\n * Color of the badge\n *\n * @default \"lighter\"\n */\n variant?: \"lighter\" | \"darker\" | \"white\" | \"warning\";\n\n /**\n * Font size of the badge\n *\n * @default \"small\"\n */\n size?: \"small\" | \"smaller\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Badges are used to label, categorize or organize items using keywords to describe them.\n *\n * @example\n *\n * ```tsx\n * <Badge variant=\"darker\">Darker</Badge>\n * ```\n *\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n ({ children, asChild, variant = \"lighter\", size = \"small\", className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-badge\",\n `hds-badge--${size}`,\n `hds-badge--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBadge.displayName = \"Badge\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAqB;AACrB,wBAAqB;AACrB,mBAA2B;AAyCrB;AAJC,IAAM,YAAQ;AAAA,EACnB,CAAC,IAAgF,QAAQ;AAAxF,iBAAE,YAAU,SAAS,UAAU,WAAW,OAAO,SAAS,UAxC7D,IAwCG,IAAwE,iBAAxE,IAAwE,CAAtE,YAAU,WAAS,WAAqB,QAAgB;AACzD,UAAM,YAAY,UAAU,yBAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA,cAAc,IAAI;AAAA,UAClB,cAAc,OAAO;AAAA,UACrB;AAAA,QACF;AAAA,SACI,OARL;AAAA,QAUE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
package/dist/badge/index.mjs
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* The quote style
|
|
6
|
+
*
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
variant?: "default" | "norwegian";
|
|
10
|
+
/**
|
|
11
|
+
* Change the default rendered element for the one passed as a child, merging their props and behavior.
|
|
12
|
+
*
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @example
|
|
19
|
+
*
|
|
20
|
+
* ```tsx
|
|
21
|
+
* <Blockquote>
|
|
22
|
+
* <p>... but they’ll never take our freedom!</p>
|
|
23
|
+
* <footer>William Wallace</footer>
|
|
24
|
+
* </Blockquote>
|
|
25
|
+
* ```
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export declare const Blockquote: import("react").ForwardRefExoticComponent<BlockquoteProps & import("react").RefAttributes<HTMLQuoteElement>>;
|
|
29
|
+
//# sourceMappingURL=blockquote.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blockquote.d.ts","sourceRoot":"","sources":["../../src/blockquote/blockquote.tsx"],"names":[],"mappings":";AAIA,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC;IAC7E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAElC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,8GAiBtB,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/blockquote/blockquote.tsx
|
|
50
|
+
var blockquote_exports = {};
|
|
51
|
+
__export(blockquote_exports, {
|
|
52
|
+
Blockquote: () => Blockquote
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(blockquote_exports);
|
|
55
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
56
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
57
|
+
var import_react = require("react");
|
|
58
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
59
|
+
var Blockquote = (0, import_react.forwardRef)(
|
|
60
|
+
(_a, ref) => {
|
|
61
|
+
var _b = _a, { children, asChild, className, variant } = _b, rest = __objRest(_b, ["children", "asChild", "className", "variant"]);
|
|
62
|
+
const Component = asChild ? import_react_slot.Slot : "blockquote";
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
|
+
Component,
|
|
65
|
+
__spreadProps(__spreadValues({
|
|
66
|
+
ref,
|
|
67
|
+
className: (0, import_typed_classname.clsx)(
|
|
68
|
+
"hds-blockquote",
|
|
69
|
+
variant === "norwegian" && `hds-blockquote--norwegian`,
|
|
70
|
+
className
|
|
71
|
+
)
|
|
72
|
+
}, rest), {
|
|
73
|
+
children
|
|
74
|
+
})
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
Blockquote.displayName = "Blockquote";
|
|
79
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
+
0 && (module.exports = {
|
|
81
|
+
Blockquote
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=blockquote.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/blockquote/blockquote.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * The quote style\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"norwegian\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Blockquote>\n * <p>... but they’ll never take our freedom!</p>\n * <footer>William Wallace</footer>\n * </Blockquote>\n * ```\n *\n */\nexport const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(\n ({ children, asChild, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"blockquote\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-blockquote\",\n variant === \"norwegian\" && `hds-blockquote--norwegian`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBlockquote.displayName = \"Blockquote\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAqB;AACrB,wBAAqB;AACrB,mBAA2B;AAmCrB;AAJC,IAAM,iBAAa;AAAA,EACxB,CAAC,IAAoD,QAAQ;AAA5D,iBAAE,YAAU,SAAS,WAAW,QAlCnC,IAkCG,IAA4C,iBAA5C,IAA4C,CAA1C,YAAU,WAAS,aAAW;AAC/B,UAAM,YAAY,UAAU,yBAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA,YAAY,eAAe;AAAA,UAC3B;AAAA,QACF;AAAA,SACI,OAPL;AAAA,QASE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blockquote/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,mBAAmB,cAAc,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __objRest = (source, exclude) => {
|
|
24
|
+
var target = {};
|
|
25
|
+
for (var prop in source)
|
|
26
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
27
|
+
target[prop] = source[prop];
|
|
28
|
+
if (source != null && __getOwnPropSymbols)
|
|
29
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
30
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
var __export = (target, all) => {
|
|
36
|
+
for (var name in all)
|
|
37
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from, except, desc) => {
|
|
40
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
|
+
|
|
49
|
+
// src/blockquote/index.tsx
|
|
50
|
+
var blockquote_exports = {};
|
|
51
|
+
__export(blockquote_exports, {
|
|
52
|
+
Blockquote: () => Blockquote
|
|
53
|
+
});
|
|
54
|
+
module.exports = __toCommonJS(blockquote_exports);
|
|
55
|
+
|
|
56
|
+
// src/blockquote/blockquote.tsx
|
|
57
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
58
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
59
|
+
var import_react = require("react");
|
|
60
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
61
|
+
var Blockquote = (0, import_react.forwardRef)(
|
|
62
|
+
(_a, ref) => {
|
|
63
|
+
var _b = _a, { children, asChild, className, variant } = _b, rest = __objRest(_b, ["children", "asChild", "className", "variant"]);
|
|
64
|
+
const Component = asChild ? import_react_slot.Slot : "blockquote";
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
Component,
|
|
67
|
+
__spreadProps(__spreadValues({
|
|
68
|
+
ref,
|
|
69
|
+
className: (0, import_typed_classname.clsx)(
|
|
70
|
+
"hds-blockquote",
|
|
71
|
+
variant === "norwegian" && `hds-blockquote--norwegian`,
|
|
72
|
+
className
|
|
73
|
+
)
|
|
74
|
+
}, rest), {
|
|
75
|
+
children
|
|
76
|
+
})
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
Blockquote.displayName = "Blockquote";
|
|
81
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
82
|
+
0 && (module.exports = {
|
|
83
|
+
Blockquote
|
|
84
|
+
});
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/blockquote/index.tsx","../../src/blockquote/blockquote.tsx"],"sourcesContent":["export { Blockquote } from \"./blockquote\";\n\nexport type * from \"./blockquote\";\n","import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * The quote style\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"norwegian\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Blockquote>\n * <p>... but they’ll never take our freedom!</p>\n * <footer>William Wallace</footer>\n * </Blockquote>\n * ```\n *\n */\nexport const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(\n ({ children, asChild, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"blockquote\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-blockquote\",\n variant === \"norwegian\" && `hds-blockquote--norwegian`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBlockquote.displayName = \"Blockquote\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,6BAAqB;AACrB,wBAAqB;AACrB,mBAA2B;AAmCrB;AAJC,IAAM,iBAAa;AAAA,EACxB,CAAC,IAAoD,QAAQ;AAA5D,iBAAE,YAAU,SAAS,WAAW,QAlCnC,IAkCG,IAA4C,iBAA5C,IAA4C,CAA1C,YAAU,WAAS,aAAW;AAC/B,UAAM,YAAY,UAAU,yBAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA,YAAY,eAAe;AAAA,UAC3B;AAAA,QACF;AAAA,SACI,OAPL;AAAA,QASE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/navbar/icons.tsx
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
function CloseIcon() {
|
|
4
|
+
return /* @__PURE__ */ jsx(
|
|
5
|
+
"svg",
|
|
6
|
+
{
|
|
7
|
+
"aria-hidden": true,
|
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9
|
+
width: 32,
|
|
10
|
+
height: 32,
|
|
11
|
+
viewBox: "0 0 32 32",
|
|
12
|
+
fill: "none",
|
|
13
|
+
children: /* @__PURE__ */ jsx(
|
|
14
|
+
"path",
|
|
15
|
+
{
|
|
16
|
+
d: "M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z",
|
|
17
|
+
fill: "black"
|
|
18
|
+
}
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function MenuIcon() {
|
|
24
|
+
return /* @__PURE__ */ jsx("svg", { "aria-hidden": true, xmlns: "http://www.w3.org/2000/svg", width: 32, height: 32, children: /* @__PURE__ */ jsx(
|
|
25
|
+
"path",
|
|
26
|
+
{
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
d: "M25.938 10.146a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.562-.563-.562H6.063a.57.57 0 0 0-.562.562v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Z"
|
|
29
|
+
}
|
|
30
|
+
) });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
CloseIcon,
|
|
35
|
+
MenuIcon
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-3H7S7C3S.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/navbar/icons.tsx"],"sourcesContent":["export function CloseIcon() {\n return (\n <svg\n aria-hidden\n xmlns=\"http://www.w3.org/2000/svg\"\n width={32}\n height={32}\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n >\n <path\n d=\"M17.5469 16.3333L22.375 11.5521L23.3594 10.5677C23.5 10.4271 23.5 10.1927 23.3594 10.0052L22.3281 8.97394C22.1406 8.83331 21.9062 8.83331 21.7656 8.97394L16 14.7864L10.1875 8.97394C10.0469 8.83331 9.8125 8.83331 9.625 8.97394L8.59375 10.0052C8.45312 10.1927 8.45312 10.4271 8.59375 10.5677L14.4062 16.3333L8.59375 22.1458C8.45312 22.2864 8.45312 22.5208 8.59375 22.7083L9.625 23.7396C9.8125 23.8802 10.0469 23.8802 10.1875 23.7396L16 17.9271L20.7812 22.7552L21.7656 23.7396C21.9062 23.8802 22.1406 23.8802 22.3281 23.7396L23.3594 22.7083C23.5 22.5208 23.5 22.2864 23.3594 22.1458L17.5469 16.3333Z\"\n fill=\"black\"\n />\n </svg>\n );\n}\n\nexport function MenuIcon() {\n return (\n <svg aria-hidden xmlns=\"http://www.w3.org/2000/svg\" width={32} height={32}>\n <path\n fill=\"currentColor\"\n d=\"M25.938 10.146a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.562-.563-.562H6.063a.57.57 0 0 0-.562.562v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Zm0 7.5a.57.57 0 0 0 .562-.563v-1.5c0-.281-.281-.563-.563-.563H6.063a.57.57 0 0 0-.562.563v1.5c0 .328.234.563.563.563h19.875Z\"\n />\n </svg>\n );\n}\n"],"mappings":";AAUM;AAVC,SAAS,YAAY;AAC1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,MACX,OAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,SAAQ;AAAA,MACR,MAAK;AAAA,MAEL;AAAA,QAAC;AAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA,EACF;AAEJ;AAEO,SAAS,WAAW;AACzB,SACE,oBAAC,SAAI,eAAW,MAAC,OAAM,8BAA6B,OAAO,IAAI,QAAQ,IACrE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,GAAE;AAAA;AAAA,EACJ,GACF;AAEJ;","names":[]}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
NavbarExpandableMenu,
|
|
3
3
|
NavbarExpandableMenuContent,
|
|
4
4
|
NavbarExpandableMenuTrigger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M7MG7ZQT.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__objRest,
|
|
8
8
|
__spreadProps,
|
|
@@ -133,4 +133,4 @@ export {
|
|
|
133
133
|
NavbarNavigation,
|
|
134
134
|
Navbar
|
|
135
135
|
};
|
|
136
|
-
//# sourceMappingURL=chunk-
|
|
136
|
+
//# sourceMappingURL=chunk-6ZO2TMOX.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useFieldsetContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JQGB77SS.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ErrorMessage
|
|
6
6
|
} from "./chunk-CC5QWW52.mjs";
|
|
@@ -73,4 +73,4 @@ Checkbox.displayName = "Checkbox";
|
|
|
73
73
|
export {
|
|
74
74
|
Checkbox
|
|
75
75
|
};
|
|
76
|
-
//# sourceMappingURL=chunk-
|
|
76
|
+
//# sourceMappingURL=chunk-EAFQ3XQU.mjs.map
|
|
@@ -11,7 +11,7 @@ import { Slot } from "@radix-ui/react-slot";
|
|
|
11
11
|
import { jsx } from "react/jsx-runtime";
|
|
12
12
|
var StyledHtml = forwardRef(
|
|
13
13
|
(_a, ref) => {
|
|
14
|
-
var _b = _a, { asChild, children, size, darkmode = false, className } = _b, rest = __objRest(_b, ["asChild", "children", "size", "
|
|
14
|
+
var _b = _a, { asChild, children, size, unstable_darkmode: darkmode = false, className } = _b, rest = __objRest(_b, ["asChild", "children", "size", "unstable_darkmode", "className"]);
|
|
15
15
|
const Component = asChild ? Slot : "div";
|
|
16
16
|
return /* @__PURE__ */ jsx(
|
|
17
17
|
Component,
|
|
@@ -34,4 +34,4 @@ StyledHtml.displayName = "StyledHtml";
|
|
|
34
34
|
export {
|
|
35
35
|
StyledHtml
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-EGW3RCXD.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/styled-html/styled-html.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport interface StyledHtmlProps extends React.HTMLAttributes<HTMLDivElement> {\n children?: React.ReactNode;\n\n /**\n * Size of content inside. Setting this to `small` makes the font size be `body-small`.\n *\n * @default \"default\"\n */\n size?: \"default\" | \"small\";\n\n /**\n * 🚧 Work in progress darkmode support\n */\n unstable_darkmode?: boolean;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * A component for displaying dynamic content that you want to apply hedwig styling to.\n * the styling depends on the semantic html elements you use inside the component.\n *\n * Useful when you have dynamic content that you want styled with hedwig, like content from a CMS.\n *\n * Previously known as `hw-wysiwyg` in hedwig legacy. In tailwind this kind of component it is known as `prose`.\n *\n * @example\n * ```tsx\n * <StyledHtml>\n * <h1>Heading 1</h1>\n * <h2>Heading 2</h2>\n * <a href=\"https://www.postenbring.no\">Postenbring</a>\n * <ul>\n * <li>Hei</li>\n * <li>Hallo</li>\n * <li>Hello</li>\n * </ul>\n * </StyledHtml>\n * ```\n */\nexport const StyledHtml = forwardRef<HTMLDivElement, StyledHtmlProps>(\n ({ asChild, children, size, unstable_darkmode: darkmode = false, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"div\";\n return (\n <Component\n className={clsx(\n `hds-styled-html`,\n size === \"small\" && \"hds-styled-html--small\",\n darkmode && \"hds-styled-html--darkmode\",\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nStyledHtml.displayName = \"StyledHtml\";\n"],"mappings":";;;;;;;AAAA,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,YAAY;AAmDf;AAJC,IAAM,aAAa;AAAA,EACxB,CAAC,IAAsF,QAAQ;AAA9F,iBAAE,WAAS,UAAU,MAAM,mBAAmB,WAAW,OAAO,UAlDnE,IAkDG,IAA8E,iBAA9E,IAA8E,CAA5E,WAAS,YAAU,QAAM,qBAAqC;AAC/D,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,SAAS,WAAW;AAAA,UACpB,YAAY;AAAA,UACZ;AAAA,QACF;AAAA,QACA;AAAA,SACI,OARL;AAAA,QAUE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/fieldset/fieldset.tsx"],"sourcesContent":["import { useId, forwardRef, createContext, useContext } from \"react\";\nimport type { FieldsetHTMLAttributes, HTMLAttributes, ReactNode, CSSProperties } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { ErrorMessage } from \"../error-message\";\n\nexport interface FieldsetProps extends FieldsetHTMLAttributes<HTMLFieldSetElement> {\n className?: string;\n style?: CSSProperties;\n /**\n * Providing an errorMessage will also give contained Checkboxes or Radio buttons\n * error styling and aria to indicate invalid state.\n *\n * For Radio buttons you are even better off using RadioGroup.\n */\n errorMessage?: ReactNode;\n legendProps?: HTMLAttributes<HTMLElement> & { size: \"default\" | \"large\" };\n legend: ReactNode;\n children: ReactNode;\n}\n\nconst FieldsetContext = createContext<{ hasError: boolean }>({ hasError: false });\n\nexport const useFieldsetContext = () => useContext(FieldsetContext);\n\nexport const Fieldset = forwardRef<HTMLFieldSetElement, FieldsetProps>(function Fieldset(\n {\n className,\n style,\n errorMessage,\n legendProps: { size: legendSize = \"default\", className: legendClassName, ...legendProps } = {},\n legend,\n children,\n ...rest\n },\n ref,\n) {\n const errorMessageId = useId();\n\n return (\n <fieldset\n aria-describedby={errorMessage ? errorMessageId : undefined}\n aria-invalid={errorMessage ? true : undefined}\n className={clsx(\"hds-fieldset\", className as undefined)}\n ref={ref}\n style={style}\n {...rest}\n >\n <legend\n className={clsx(\n \"hds-fieldset__legend\",\n { [`hds-fieldset__legend--${legendSize}`]: legendSize },\n legendClassName as undefined,\n )}\n {...legendProps}\n >\n {legend}\n </legend>\n <FieldsetContext.Provider value={{ hasError: Boolean(errorMessage) }}>\n {children}\n </FieldsetContext.Provider>\n <ErrorMessage id={errorMessageId}>{errorMessage}</ErrorMessage>\n </fieldset>\n );\n});\n"],"mappings":";;;;;;;;;;AAAA,SAAS,OAAO,YAAY,eAAe,kBAAkB;AAE7D,SAAS,YAAY;AAqCjB,SAQE,KARF;AAnBJ,IAAM,kBAAkB,cAAqC,EAAE,UAAU,MAAM,CAAC;AAEzE,IAAM,qBAAqB,MAAM,WAAW,eAAe;AAE3D,IAAM,WAAW,WAA+C,SAASA,UAC9E,IASA,KACA;AAVA,eAIe;AAAA,IAHb;AAAA,IACA;AAAA,IACA;AAAA,IACA,aAAa,KAA+E,CAAC;AAAA,EA7BjG,IAyBE,IAIe,SAAE,QAAM,aAAa,WAAW,WAAW,gBA7B5D,IA6BiB,IAA+D,wBAA/D,IAA+D,CAA7D,QAA8B,eAJ/C,SAKE;AAAA;AAAA,IACA;AAAA,EA/BJ,IAyBE,IAOK,iBAPL,IAOK;AAAA,IANH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKF,QAAM,iBAAiB,MAAM;AAE7B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,oBAAkB,eAAe,iBAAiB;AAAA,MAClD,gBAAc,eAAe,OAAO;AAAA,MACpC,WAAW,KAAK,gBAAgB,SAAsB;AAAA,MACtD;AAAA,MACA;AAAA,OACI,OANL;AAAA,MAQC;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA,EAAE,CAAC,yBAAyB,UAAU,EAAE,GAAG,WAAW;AAAA,cACtD;AAAA,YACF;AAAA,aACI,cANL;AAAA,YAQE;AAAA;AAAA,QACH;AAAA,QACA,oBAAC,gBAAgB,UAAhB,EAAyB,OAAO,EAAE,UAAU,QAAQ,YAAY,EAAE,GAChE,UACH;AAAA,QACA,oBAAC,gBAAa,IAAI,gBAAiB,wBAAa;AAAA;AAAA;AAAA,EAClD;AAEJ,CAAC;","names":["Fieldset"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-YOSPWY5K.mjs";
|
|
6
|
+
|
|
7
|
+
// src/blockquote/blockquote.tsx
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
9
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
10
|
+
import { forwardRef } from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var Blockquote = forwardRef(
|
|
13
|
+
(_a, ref) => {
|
|
14
|
+
var _b = _a, { children, asChild, className, variant } = _b, rest = __objRest(_b, ["children", "asChild", "className", "variant"]);
|
|
15
|
+
const Component = asChild ? Slot : "blockquote";
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
Component,
|
|
18
|
+
__spreadProps(__spreadValues({
|
|
19
|
+
ref,
|
|
20
|
+
className: clsx(
|
|
21
|
+
"hds-blockquote",
|
|
22
|
+
variant === "norwegian" && `hds-blockquote--norwegian`,
|
|
23
|
+
className
|
|
24
|
+
)
|
|
25
|
+
}, rest), {
|
|
26
|
+
children
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
Blockquote.displayName = "Blockquote";
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
Blockquote
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=chunk-JYN2QSN2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/blockquote/blockquote.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BlockquoteProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * The quote style\n *\n * @default \"default\"\n */\n variant?: \"default\" | \"norwegian\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Blockquote>\n * <p>... but they’ll never take our freedom!</p>\n * <footer>William Wallace</footer>\n * </Blockquote>\n * ```\n *\n */\nexport const Blockquote = forwardRef<HTMLQuoteElement, BlockquoteProps>(\n ({ children, asChild, className, variant, ...rest }, ref) => {\n const Component = asChild ? Slot : \"blockquote\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-blockquote\",\n variant === \"norwegian\" && `hds-blockquote--norwegian`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBlockquote.displayName = \"Blockquote\";\n"],"mappings":";;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAmCrB;AAJC,IAAM,aAAa;AAAA,EACxB,CAAC,IAAoD,QAAQ;AAA5D,iBAAE,YAAU,SAAS,WAAW,QAlCnC,IAkCG,IAA4C,iBAA5C,IAA4C,CAA1C,YAAU,WAAS,aAAW;AAC/B,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,YAAY,eAAe;AAAA,UAC3B;AAAA,QACF;AAAA,SACI,OAPL;AAAA,QASE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,WAAW,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-K2CB2NLY.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-KFDS3IPB.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CloseIcon,
|
|
3
3
|
MenuIcon
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3H7S7C3S.mjs";
|
|
5
5
|
import {
|
|
6
6
|
focusTrap
|
|
7
7
|
} from "./chunk-ILFK3VKS.mjs";
|
|
@@ -153,4 +153,4 @@ export {
|
|
|
153
153
|
NavbarExpandableMenuTrigger,
|
|
154
154
|
NavbarExpandableMenuContent
|
|
155
155
|
};
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-M7MG7ZQT.mjs.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "./chunk-YOSPWY5K.mjs";
|
|
6
|
+
|
|
7
|
+
// src/figure/figure.tsx
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
9
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
10
|
+
import { forwardRef } from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
var Figure = forwardRef(
|
|
13
|
+
(_a, ref) => {
|
|
14
|
+
var _b = _a, { children, asChild, className } = _b, rest = __objRest(_b, ["children", "asChild", "className"]);
|
|
15
|
+
const Component = asChild ? Slot : "figure";
|
|
16
|
+
return /* @__PURE__ */ jsx(Component, __spreadProps(__spreadValues({ ref, className: clsx("hds-figure", className) }, rest), { children }));
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
Figure.displayName = "Figure";
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
Figure
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-OE6RISJS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/figure/figure.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface FigureProps extends React.HTMLAttributes<HTMLQuoteElement> {\n children?: React.ReactNode;\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * @example\n *\n * ```tsx\n * <Figure>\n * <img src=\"https://placedog.net/500/280\" alt=\"A very good dog\" />\n * <figcaption>Dogs are the best</figcaption>\n * </Figure>\n * ```\n */\nexport const Figure = forwardRef<HTMLQuoteElement, FigureProps>(\n ({ children, asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"figure\";\n return (\n <Component ref={ref} className={clsx(\"hds-figure\", className as undefined)} {...rest}>\n {children}\n </Component>\n );\n },\n);\nFigure.displayName = \"Figure\";\n"],"mappings":";;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AA2BrB;AAJC,IAAM,SAAS;AAAA,EACpB,CAAC,IAA2C,QAAQ;AAAnD,iBAAE,YAAU,SAAS,UA1BxB,IA0BG,IAAmC,iBAAnC,IAAmC,CAAjC,YAAU,WAAS;AACpB,UAAM,YAAY,UAAU,OAAO;AACnC,WACE,oBAAC,0CAAU,KAAU,WAAW,KAAK,cAAc,SAAsB,KAAO,OAA/E,EACE,WACH;AAAA,EAEJ;AACF;AACA,OAAO,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/badge/badge.tsx"],"sourcesContent":["import { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { forwardRef } from \"react\";\n\nexport interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {\n children: React.ReactNode;\n\n /**\n * Color of the badge\n *\n * @default \"lighter\"\n */\n variant?: \"lighter\" | \"darker\" | \"white\" | \"warning\";\n\n /**\n * Font size of the badge\n *\n * @default \"small\"\n */\n size?: \"small\" | \"smaller\";\n\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * Badges are used to label, categorize or organize items using keywords to describe them.\n *\n * @example\n *\n * ```tsx\n * <Badge variant=\"darker\">Darker</Badge>\n * ```\n *\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(\n ({ children, asChild, variant = \"lighter\", size = \"small\", className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"span\";\n return (\n <Component\n ref={ref}\n className={clsx(\n \"hds-badge\",\n `hds-badge--${size}`,\n `hds-badge--${variant}`,\n className as undefined,\n )}\n {...rest}\n >\n {children}\n </Component>\n );\n },\n);\nBadge.displayName = \"Badge\";\n"],"mappings":";;;;;;;AAAA,SAAS,YAAY;AACrB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAyCrB;AAJC,IAAM,QAAQ;AAAA,EACnB,CAAC,IAAgF,QAAQ;AAAxF,iBAAE,YAAU,SAAS,UAAU,WAAW,OAAO,SAAS,UAxC7D,IAwCG,IAAwE,iBAAxE,IAAwE,CAAtE,YAAU,WAAS,WAAqB,QAAgB;AACzD,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA,cAAc,IAAI;AAAA,UAClB,cAAc,OAAO;AAAA,UACrB;AAAA,QACF;AAAA,SACI,OARL;AAAA,QAUE;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":[]}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRadioGroupContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YS7HBWOI.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useFieldsetContext
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JQGB77SS.mjs";
|
|
7
7
|
import {
|
|
8
8
|
__objRest,
|
|
9
9
|
__spreadProps,
|
|
10
10
|
__spreadValues
|
|
11
11
|
} from "./chunk-YOSPWY5K.mjs";
|
|
12
12
|
|
|
13
|
-
// src/form/
|
|
13
|
+
// src/form/radio-button/radio-button.tsx
|
|
14
14
|
import { forwardRef } from "react";
|
|
15
15
|
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
16
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -23,7 +23,7 @@ var isChecked = ({
|
|
|
23
23
|
if (typeof selectedValue !== "undefined") return value === selectedValue;
|
|
24
24
|
return void 0;
|
|
25
25
|
};
|
|
26
|
-
var
|
|
26
|
+
var RadioButton = forwardRef(
|
|
27
27
|
(_a, ref) => {
|
|
28
28
|
var _b = _a, {
|
|
29
29
|
checked,
|
|
@@ -55,10 +55,10 @@ var Radiobutton = forwardRef(
|
|
|
55
55
|
"div",
|
|
56
56
|
{
|
|
57
57
|
className: clsx(
|
|
58
|
-
"hds-
|
|
58
|
+
"hds-radio-button",
|
|
59
59
|
{
|
|
60
|
-
[`hds-
|
|
61
|
-
"hds-
|
|
60
|
+
[`hds-radio-button--${variant}`]: variant === "bounding-box",
|
|
61
|
+
"hds-radio-button--error": hasError
|
|
62
62
|
},
|
|
63
63
|
className
|
|
64
64
|
),
|
|
@@ -73,8 +73,8 @@ var Radiobutton = forwardRef(
|
|
|
73
73
|
type: "radio"
|
|
74
74
|
})
|
|
75
75
|
),
|
|
76
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "hds-
|
|
77
|
-
title ? /* @__PURE__ */ jsx("p", { className: "hds-
|
|
76
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "hds-radio-button__checkmark" }),
|
|
77
|
+
title ? /* @__PURE__ */ jsx("p", { className: "hds-radio-button__title", children: title }) : children
|
|
78
78
|
] }),
|
|
79
79
|
title ? children : null
|
|
80
80
|
]
|
|
@@ -82,9 +82,9 @@ var Radiobutton = forwardRef(
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
);
|
|
85
|
-
|
|
85
|
+
RadioButton.displayName = "RadioButton";
|
|
86
86
|
|
|
87
87
|
export {
|
|
88
|
-
|
|
88
|
+
RadioButton
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=chunk-
|
|
90
|
+
//# sourceMappingURL=chunk-UL2V2Z5B.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/radio-button/radio-button.tsx"],"sourcesContent":["import { forwardRef, type InputHTMLAttributes, type ReactNode } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { useFieldsetContext } from \"../fieldset\";\nimport { type RadioGroupProps, useRadioGroupContext } from \"./radio-group\";\n\nexport interface RadioButtonProps\n extends Omit<InputHTMLAttributes<HTMLInputElement>, \"defaultValue\"> {\n children: ReactNode;\n variant?: \"plain\" | \"bounding-box\";\n /**\n * Set to `true` to add error styling. The component will take care of aria to indicate invalid state.\n *\n * Normally you don't need this, as you should wrap your Radio buttons in the RadioGroup component.\n * When providing an errorMessage to RadioGroup, all contained Radio buttons will get correct hasError state.\n *\n * You can use this when your Radio button is part of a non-HDS fieldset which shows an error message.\n */\n hasError?: boolean;\n title?: string;\n}\n\nconst isChecked = ({\n checked,\n selectedValue,\n value,\n}: Pick<RadioButtonProps, \"checked\" | \"value\"> & {\n selectedValue: RadioGroupProps[\"value\"];\n}) => {\n if (typeof checked !== \"undefined\") return checked;\n if (typeof selectedValue !== \"undefined\") return value === selectedValue;\n return undefined;\n};\n\nexport const RadioButton = forwardRef<HTMLInputElement, RadioButtonProps>(\n (\n {\n checked,\n value,\n variant = \"plain\",\n hasError: hasErrorProp,\n title,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const {\n value: selectedValue,\n hasError: hasRadioGroupError,\n ...context\n } = useRadioGroupContext();\n const { hasError: hasFieldsetError } = useFieldsetContext();\n const hasError = hasFieldsetError || hasRadioGroupError || hasErrorProp;\n\n return (\n <div\n className={clsx(\n \"hds-radio-button\",\n {\n [`hds-radio-button--${variant}`]: variant === \"bounding-box\",\n \"hds-radio-button--error\": hasError,\n },\n className as undefined,\n )}\n >\n <label>\n <input\n {...context}\n {...rest}\n checked={isChecked({ checked, selectedValue, value })}\n value={value}\n ref={ref}\n type=\"radio\"\n />\n <span aria-hidden className=\"hds-radio-button__checkmark\" />\n {title ? <p className=\"hds-radio-button__title\">{title}</p> : children}\n </label>\n {title ? children : null}\n </div>\n );\n },\n);\n\nRadioButton.displayName = \"RadioButton\";\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,kBAA4D;AACrE,SAAS,YAAY;AAiEb,SACE,KADF;AA7CR,IAAM,YAAY,CAAC;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AACF,MAEM;AACJ,MAAI,OAAO,YAAY,YAAa,QAAO;AAC3C,MAAI,OAAO,kBAAkB,YAAa,QAAO,UAAU;AAC3D,SAAO;AACT;AAEO,IAAM,cAAc;AAAA,EACzB,CACE,IAUA,QACG;AAXH,iBACE;AAAA;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,UAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA;AAAA,IA1CN,IAmCI,IAQK,iBARL,IAQK;AAAA,MAPH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAIIA,MAAA,qBAAqB,GAHvB;AAAA,aAAO;AAAA,MACP,UAAU;AAAA,IAjDhB,IAmDQA,KADC,oBACDA,KADC;AAAA,MAFH;AAAA,MACA;AAAA;AAGF,UAAM,EAAE,UAAU,iBAAiB,IAAI,mBAAmB;AAC1D,UAAM,WAAW,oBAAoB,sBAAsB;AAE3D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA;AAAA,YACE,CAAC,qBAAqB,OAAO,EAAE,GAAG,YAAY;AAAA,YAC9C,2BAA2B;AAAA,UAC7B;AAAA,UACA;AAAA,QACF;AAAA,QAEA;AAAA,+BAAC,WACC;AAAA;AAAA,cAAC;AAAA,8DACK,UACA,OAFL;AAAA,gBAGC,SAAS,UAAU,EAAE,SAAS,eAAe,MAAM,CAAC;AAAA,gBACpD;AAAA,gBACA;AAAA,gBACA,MAAK;AAAA;AAAA,YACP;AAAA,YACA,oBAAC,UAAK,eAAW,MAAC,WAAU,+BAA8B;AAAA,YACzD,QAAQ,oBAAC,OAAE,WAAU,2BAA2B,iBAAM,IAAO;AAAA,aAChE;AAAA,UACC,QAAQ,WAAW;AAAA;AAAA;AAAA,IACtB;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["_a"]}
|