@postenbring/hedwig-react 0.0.70 → 0.0.72
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 +89 -28
- package/dist/_tsup-dts-rollup.d.ts +89 -28
- package/dist/accordion/index.mjs +5 -5
- package/dist/{breadcrumb/index.js → breadcrumbs/breadcrumbs.js} +12 -11
- package/dist/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/{breadcrumb/breadcrumb.mjs → breadcrumbs/breadcrumbs.mjs} +2 -2
- package/dist/{breadcrumb/breadcrumb.js → breadcrumbs/index.js} +14 -9
- package/dist/breadcrumbs/index.js.map +1 -0
- package/dist/breadcrumbs/index.mjs +9 -0
- package/dist/button/button.js +1 -4
- package/dist/button/button.js.map +1 -1
- package/dist/button/button.mjs +1 -1
- package/dist/button/index.js +1 -4
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/{chunk-XYIY6FHW.mjs → chunk-3FRCJ3RH.mjs} +7 -7
- package/dist/chunk-3LYJRAOC.mjs +1 -0
- package/dist/{chunk-O32FZU7E.mjs → chunk-BFNITN5E.mjs} +5 -5
- package/dist/{chunk-OUHO4LGN.mjs → chunk-BWFFP6BB.mjs} +2 -5
- package/dist/chunk-BWFFP6BB.mjs.map +1 -0
- package/dist/chunk-CFAH2LID.mjs +1 -0
- package/dist/{chunk-ZRFDCZ62.mjs → chunk-CSFSJGLY.mjs} +5 -5
- package/dist/{chunk-K2HG7WRK.mjs → chunk-CU56G5WS.mjs} +2 -2
- package/dist/chunk-E5O6ID3L.mjs +54 -0
- package/dist/chunk-E5O6ID3L.mjs.map +1 -0
- package/dist/chunk-EMI7NAO2.mjs +45 -0
- package/dist/chunk-EMI7NAO2.mjs.map +1 -0
- package/dist/chunk-GGEQEVZ4.mjs +22 -0
- package/dist/chunk-GGEQEVZ4.mjs.map +1 -0
- package/dist/chunk-HSIL53A5.mjs +118 -0
- package/dist/chunk-HSIL53A5.mjs.map +1 -0
- package/dist/chunk-ISAHCU7C.mjs +1 -0
- package/dist/chunk-ISAHCU7C.mjs.map +1 -0
- package/dist/chunk-JBWAZQKM.mjs +1 -0
- package/dist/chunk-JBWAZQKM.mjs.map +1 -0
- package/dist/{chunk-FOZSX44S.mjs → chunk-VM345XBI.mjs} +6 -6
- package/dist/chunk-Z753E3XF.mjs +33 -0
- package/dist/chunk-Z753E3XF.mjs.map +1 -0
- package/dist/description-list/description-list.d.mts +1 -1
- package/dist/description-list/description-list.d.ts +1 -1
- package/dist/description-list/description-list.js +19 -21
- package/dist/description-list/description-list.js.map +1 -1
- package/dist/description-list/description-list.mjs +1 -1
- package/dist/description-list/index.js +19 -21
- package/dist/description-list/index.js.map +1 -1
- package/dist/description-list/index.mjs +1 -1
- package/dist/footer/footer.js +1 -4
- package/dist/footer/footer.js.map +1 -1
- package/dist/footer/footer.mjs +5 -5
- package/dist/footer/index.js +1 -4
- package/dist/footer/index.js.map +1 -1
- package/dist/footer/index.mjs +6 -6
- package/dist/form/index.mjs +14 -14
- package/dist/help-text/help-text.d.mts +1 -0
- package/dist/help-text/help-text.d.ts +1 -0
- package/dist/help-text/help-text.js +186 -0
- package/dist/help-text/help-text.js.map +1 -0
- package/dist/help-text/help-text.mjs +10 -0
- package/dist/help-text/help-text.mjs.map +1 -0
- package/dist/help-text/index.d.mts +1 -0
- package/dist/help-text/index.d.ts +1 -0
- package/dist/help-text/index.js +188 -0
- package/dist/help-text/index.js.map +1 -0
- package/dist/help-text/index.mjs +11 -0
- package/dist/help-text/index.mjs.map +1 -0
- package/dist/index-no-css.d.mts +2 -0
- package/dist/index-no-css.d.ts +2 -0
- package/dist/index-no-css.js +414 -316
- package/dist/index-no-css.js.map +1 -1
- package/dist/index-no-css.mjs +113 -103
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +414 -316
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +113 -103
- package/dist/index.mjs.map +1 -1
- package/dist/layout/index.mjs +6 -6
- package/dist/navbar/index.mjs +5 -5
- package/dist/show-more/index.js +91 -39
- package/dist/show-more/index.js.map +1 -1
- package/dist/show-more/index.mjs +2 -1
- package/dist/table/index.d.mts +1 -0
- package/dist/table/index.d.ts +1 -0
- package/dist/table/index.js +94 -0
- package/dist/table/index.js.map +1 -0
- package/dist/table/index.mjs +9 -0
- package/dist/table/index.mjs.map +1 -0
- package/dist/table/table.d.mts +1 -0
- package/dist/table/table.d.ts +1 -0
- package/dist/table/table.js +92 -0
- package/dist/table/table.js.map +1 -0
- package/dist/table/table.mjs +8 -0
- package/dist/table/table.mjs.map +1 -0
- package/dist/tabs/index.mjs +5 -5
- package/dist/utilities/auto-animate-height.js +89 -37
- package/dist/utilities/auto-animate-height.js.map +1 -1
- package/dist/utilities/auto-animate-height.mjs +2 -1
- package/dist/utilities/index.js +89 -37
- package/dist/utilities/index.js.map +1 -1
- package/dist/utilities/index.mjs +2 -1
- package/package.json +7 -6
- package/dist/breadcrumb/breadcrumb.js.map +0 -1
- package/dist/breadcrumb/index.js.map +0 -1
- package/dist/breadcrumb/index.mjs +0 -9
- package/dist/chunk-AKYK3XFN.mjs +0 -95
- package/dist/chunk-AKYK3XFN.mjs.map +0 -1
- package/dist/chunk-OUHO4LGN.mjs.map +0 -1
- package/dist/chunk-XMB45ILT.mjs +0 -35
- package/dist/chunk-XMB45ILT.mjs.map +0 -1
- package/dist/chunk-YKDKFWP2.mjs +0 -19
- package/dist/chunk-YKDKFWP2.mjs.map +0 -1
- package/dist/chunk-YWNVB7TY.mjs +0 -1
- package/dist/chunk-ZOCMUEOX.mjs +0 -1
- package/dist/{breadcrumb/breadcrumb.d.mts → breadcrumbs/breadcrumbs.d.mts} +1 -1
- package/dist/{breadcrumb/breadcrumb.d.ts → breadcrumbs/breadcrumbs.d.ts} +1 -1
- /package/dist/{breadcrumb/breadcrumb.mjs.map → breadcrumbs/breadcrumbs.mjs.map} +0 -0
- /package/dist/{breadcrumb → breadcrumbs}/index.d.mts +0 -0
- /package/dist/{breadcrumb → breadcrumbs}/index.d.ts +0 -0
- /package/dist/{breadcrumb → breadcrumbs}/index.mjs.map +0 -0
- /package/dist/{chunk-XYIY6FHW.mjs.map → chunk-3FRCJ3RH.mjs.map} +0 -0
- /package/dist/{chunk-YWNVB7TY.mjs.map → chunk-3LYJRAOC.mjs.map} +0 -0
- /package/dist/{chunk-O32FZU7E.mjs.map → chunk-BFNITN5E.mjs.map} +0 -0
- /package/dist/{chunk-ZOCMUEOX.mjs.map → chunk-CFAH2LID.mjs.map} +0 -0
- /package/dist/{chunk-ZRFDCZ62.mjs.map → chunk-CSFSJGLY.mjs.map} +0 -0
- /package/dist/{chunk-K2HG7WRK.mjs.map → chunk-CU56G5WS.mjs.map} +0 -0
- /package/dist/{chunk-FOZSX44S.mjs.map → chunk-VM345XBI.mjs.map} +0 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/help-text/index.ts
|
|
60
|
+
var help_text_exports = {};
|
|
61
|
+
__export(help_text_exports, {
|
|
62
|
+
HelpText: () => HelpText
|
|
63
|
+
});
|
|
64
|
+
module.exports = __toCommonJS(help_text_exports);
|
|
65
|
+
|
|
66
|
+
// src/help-text/help-text.tsx
|
|
67
|
+
var Popover = __toESM(require("@radix-ui/react-popover"));
|
|
68
|
+
var import_typed_classname2 = require("@postenbring/hedwig-css/typed-classname");
|
|
69
|
+
var import_react2 = require("react");
|
|
70
|
+
|
|
71
|
+
// src/box/box.tsx
|
|
72
|
+
var import_react = require("react");
|
|
73
|
+
var import_typed_classname = require("@postenbring/hedwig-css/typed-classname");
|
|
74
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
75
|
+
var Box = (0, import_react.forwardRef)(
|
|
76
|
+
(_a, ref) => {
|
|
77
|
+
var _b = _a, {
|
|
78
|
+
as: Component = "div",
|
|
79
|
+
variant,
|
|
80
|
+
closeable = false,
|
|
81
|
+
onClose: onCloseProp,
|
|
82
|
+
closed: closedProp,
|
|
83
|
+
closeButtonProps,
|
|
84
|
+
children,
|
|
85
|
+
className
|
|
86
|
+
} = _b, rest = __objRest(_b, [
|
|
87
|
+
"as",
|
|
88
|
+
"variant",
|
|
89
|
+
"closeable",
|
|
90
|
+
"onClose",
|
|
91
|
+
"closed",
|
|
92
|
+
"closeButtonProps",
|
|
93
|
+
"children",
|
|
94
|
+
"className"
|
|
95
|
+
]);
|
|
96
|
+
const [closedState, setClosedState] = (0, import_react.useState)(false);
|
|
97
|
+
const onClose = (0, import_react.useCallback)(() => {
|
|
98
|
+
if (onCloseProp) {
|
|
99
|
+
const result = onCloseProp();
|
|
100
|
+
if (result === true) {
|
|
101
|
+
setClosedState(true);
|
|
102
|
+
}
|
|
103
|
+
} else {
|
|
104
|
+
setClosedState(true);
|
|
105
|
+
}
|
|
106
|
+
}, []);
|
|
107
|
+
const closed = closedProp != null ? closedProp : closedState;
|
|
108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
109
|
+
Component,
|
|
110
|
+
__spreadProps(__spreadValues({
|
|
111
|
+
className: (0, import_typed_classname.clsx)(
|
|
112
|
+
"hds-box",
|
|
113
|
+
variant && `hds-box--${variant}`,
|
|
114
|
+
{ "hds-box--closed": closed },
|
|
115
|
+
className
|
|
116
|
+
),
|
|
117
|
+
ref
|
|
118
|
+
}, rest), {
|
|
119
|
+
children: [
|
|
120
|
+
closeable ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BoxCloseButton, __spreadValues({ onClick: onClose }, closeButtonProps)) : null,
|
|
121
|
+
children
|
|
122
|
+
]
|
|
123
|
+
})
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
Box.displayName = "Box";
|
|
128
|
+
var BoxCloseButton = (0, import_react.forwardRef)(
|
|
129
|
+
(_a, ref) => {
|
|
130
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
131
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
132
|
+
"button",
|
|
133
|
+
__spreadValues({
|
|
134
|
+
className: (0, import_typed_classname.clsx)("hds-box__close-button", className),
|
|
135
|
+
ref,
|
|
136
|
+
type: "button"
|
|
137
|
+
}, rest)
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
BoxCloseButton.displayName = "Box.CloseButton";
|
|
142
|
+
|
|
143
|
+
// src/box/index.tsx
|
|
144
|
+
var BoxComponent = Box;
|
|
145
|
+
BoxComponent.CloseButton = BoxCloseButton;
|
|
146
|
+
|
|
147
|
+
// src/help-text/help-text.tsx
|
|
148
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
149
|
+
var HelpText = (0, import_react2.forwardRef)(
|
|
150
|
+
(_a, ref) => {
|
|
151
|
+
var _b = _a, { children, className, word, title, side = "top", align = "start", boxProps } = _b, rest = __objRest(_b, ["children", "className", "word", "title", "side", "align", "boxProps"]);
|
|
152
|
+
return (
|
|
153
|
+
// NOTE: Using radix's [Popover component](https://www.radix-ui.com/primitives/docs/components/popover)
|
|
154
|
+
// In the future we can use the native popover api, but as of writing, though all browsers support it
|
|
155
|
+
// it's not far enough back to be used in production
|
|
156
|
+
// https://caniuse.com/mdn-html_elements_input_popovertarget
|
|
157
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Popover.Root, { children: [
|
|
158
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Popover.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
159
|
+
"button",
|
|
160
|
+
__spreadProps(__spreadValues({
|
|
161
|
+
ref,
|
|
162
|
+
className: (0, import_typed_classname2.clsx)("hds-help-text-button", className),
|
|
163
|
+
title,
|
|
164
|
+
type: "button"
|
|
165
|
+
}, rest), {
|
|
166
|
+
children: word
|
|
167
|
+
})
|
|
168
|
+
) }),
|
|
169
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Popover.Content, { asChild: true, side, align, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
170
|
+
BoxComponent,
|
|
171
|
+
__spreadProps(__spreadValues({}, boxProps), {
|
|
172
|
+
className: (0, import_typed_classname2.clsx)("hds-help-text-box", boxProps == null ? void 0 : boxProps.className),
|
|
173
|
+
children: [
|
|
174
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Popover.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BoxComponent.CloseButton, {}) }),
|
|
175
|
+
children
|
|
176
|
+
]
|
|
177
|
+
})
|
|
178
|
+
) }) })
|
|
179
|
+
] })
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
HelpText.displayName = "HelpText";
|
|
184
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
+
0 && (module.exports = {
|
|
186
|
+
HelpText
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/help-text/index.ts","../../src/help-text/help-text.tsx","../../src/box/box.tsx","../../src/box/index.tsx"],"sourcesContent":["export { HelpText } from \"./help-text\";\nexport type * from \"./help-text\";\n","import * as Popover from \"@radix-ui/react-popover\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { forwardRef } from \"react\";\nimport { Box } from \"../box\";\n\ninterface HelpTextProps extends React.HTMLAttributes<HTMLButtonElement> {\n className?: string;\n\n /**\n * The content of the help text\n */\n children: React.ReactNode;\n\n /**\n * The word that should be clickable to show the help text\n */\n word?: React.ReactNode;\n\n /**\n * The title of the help text. Used by screen readers and if the user hover over the help text\n */\n title?: string;\n\n /**\n * Props for the `Box` that contains the help text\n */\n boxProps?: React.ComponentProps<typeof Box>;\n\n /**\n * The side of the trigger the popover should be attached to\n *\n * default is `top`\n */\n side?: \"top\" | \"right\" | \"bottom\" | \"left\";\n\n /**\n * The alignment of the popover content\n *\n * default is `start`\n */\n align?: \"center\" | \"end\" | \"start\";\n}\n\n/**\n * Show a help text for a word or phrase when clicked\n *\n * Useful for providing explanations for domain-specific terms or acronyms\n */\nexport const HelpText = forwardRef<HTMLButtonElement, HelpTextProps>(\n ({ children, className, word, title, side = \"top\", align = \"start\", boxProps, ...rest }, ref) => {\n return (\n // NOTE: Using radix's [Popover component](https://www.radix-ui.com/primitives/docs/components/popover)\n // In the future we can use the native popover api, but as of writing, though all browsers support it\n // it's not far enough back to be used in production\n // https://caniuse.com/mdn-html_elements_input_popovertarget\n <Popover.Root>\n <Popover.Trigger asChild>\n <button\n ref={ref}\n className={clsx(\"hds-help-text-button\", className as undefined)}\n title={title}\n type=\"button\"\n {...rest}\n >\n {word}\n </button>\n </Popover.Trigger>\n <Popover.Portal>\n <Popover.Content asChild side={side} align={align}>\n <Box\n {...boxProps}\n className={clsx(\"hds-help-text-box\", boxProps?.className as undefined)}\n >\n <Popover.Close asChild>\n <Box.CloseButton />\n </Popover.Close>\n {children}\n </Box>\n </Popover.Content>\n </Popover.Portal>\n </Popover.Root>\n );\n },\n);\nHelpText.displayName = \"HelpText\";\n","import { forwardRef, useCallback, useState } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport type { OverridableComponent } from \"../utils\";\n\nexport interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {\n variant?: \"light-grey\" | \"lighter\" | \"white\" | \"warning\";\n children?: React.ReactNode;\n\n /**\n * If `true`, a close button will be shown.\n * Use when you want to control the close button using the BoxCloseButton component.\n */\n closeable?: boolean;\n\n /**\n * Callback fired when the component requests to be closed.\n * If not set, the component will be closed without any user interaction.\n *\n * If set, and the handler returns non-true value, the component will not be closed.\n * Use this if you want to control the closing of the component, using the `closed` prop\n *\n * If set, and the handler returns the true, the component will be closed.\n * Use this with `window.confirm()` to ask the user to confirm closing the component.\n */\n // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- It's fine, I want to have the boolean in the type\n onClose?: () => boolean | unknown;\n\n /**\n * If `true`, the box will be closed and hidden from view\n */\n closed?: boolean;\n\n /**\n * Props applied to the close button element.\n */\n closeButtonProps?: BoxCloseButtonProps;\n}\n\nexport const Box: OverridableComponent<BoxProps, HTMLDivElement> = forwardRef(\n (\n {\n as: Component = \"div\",\n variant,\n closeable = false,\n onClose: onCloseProp,\n closed: closedProp,\n closeButtonProps,\n children,\n className,\n ...rest\n },\n ref,\n ) => {\n const [closedState, setClosedState] = useState(false);\n const onClose = useCallback(() => {\n if (onCloseProp) {\n const result = onCloseProp();\n if (result === true) {\n setClosedState(true);\n }\n } else {\n setClosedState(true);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- I know better\n }, []);\n const closed = closedProp ?? closedState;\n\n return (\n <Component\n className={clsx(\n \"hds-box\",\n variant && `hds-box--${variant}`,\n { \"hds-box--closed\": closed },\n className as undefined,\n )}\n ref={ref}\n {...rest}\n >\n {closeable ? <BoxCloseButton onClick={onClose} {...closeButtonProps} /> : null}\n {children}\n </Component>\n );\n },\n);\nBox.displayName = \"Box\";\n\nexport type BoxCloseButtonProps = Omit<React.HTMLAttributes<HTMLButtonElement>, \"children\">;\nexport const BoxCloseButton = forwardRef<HTMLButtonElement, BoxCloseButtonProps>(\n ({ className, ...rest }, ref) => {\n return (\n <button\n className={clsx(\"hds-box__close-button\", className as undefined)}\n ref={ref}\n type=\"button\"\n {...rest}\n />\n );\n },\n);\nBoxCloseButton.displayName = \"Box.CloseButton\";\n","import { Box, BoxCloseButton } from \"./box\";\n\nconst BoxComponent = Box as typeof Box & {\n CloseButton: typeof BoxCloseButton;\n};\nBoxComponent.CloseButton = BoxCloseButton;\n\nexport { BoxComponent as Box, BoxCloseButton };\n\nexport type * from \"./box\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,cAAyB;AACzB,IAAAA,0BAAqB;AACrB,IAAAC,gBAA2B;;;ACF3B,mBAAkD;AAClD,6BAAqB;AAmEf;AA9BC,IAAM,UAAsD;AAAA,EACjE,CACE,IAWA,QACG;AAZH,iBACE;AAAA,UAAI,YAAY;AAAA,MAChB;AAAA,MACA,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,MACA;AAAA,IAhDN,IAwCI,IASK,iBATL,IASK;AAAA,MARH;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAKF,UAAM,CAAC,aAAa,cAAc,QAAI,uBAAS,KAAK;AACpD,UAAM,cAAU,0BAAY,MAAM;AAChC,UAAI,aAAa;AACf,cAAM,SAAS,YAAY;AAC3B,YAAI,WAAW,MAAM;AACnB,yBAAe,IAAI;AAAA,QACrB;AAAA,MACF,OAAO;AACL,uBAAe,IAAI;AAAA,MACrB;AAAA,IAEF,GAAG,CAAC,CAAC;AACL,UAAM,SAAS,kCAAc;AAE7B,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT;AAAA,UACA,WAAW,YAAY,OAAO;AAAA,UAC9B,EAAE,mBAAmB,OAAO;AAAA,UAC5B;AAAA,QACF;AAAA,QACA;AAAA,SACI,OARL;AAAA,QAUE;AAAA,sBAAY,4CAAC,iCAAe,SAAS,WAAa,iBAAkB,IAAK;AAAA,UACzE;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AACA,IAAI,cAAc;AAGX,IAAM,qBAAiB;AAAA,EAC5B,CAAC,IAAwB,QAAQ;AAAhC,iBAAE,YAxFL,IAwFG,IAAgB,iBAAhB,IAAgB,CAAd;AACD,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,6BAAK,yBAAyB,SAAsB;AAAA,QAC/D;AAAA,QACA,MAAK;AAAA,SACD;AAAA,IACN;AAAA,EAEJ;AACF;AACA,eAAe,cAAc;;;ACjG7B,IAAM,eAAe;AAGrB,aAAa,cAAc;;;AFoDjB,IAAAC,sBAAA;AATH,IAAM,eAAW;AAAA,EACtB,CAAC,IAAwF,QAAQ;AAAhG,iBAAE,YAAU,WAAW,MAAM,OAAO,OAAO,OAAO,QAAQ,SAAS,SAjDtE,IAiDG,IAAgF,iBAAhF,IAAgF,CAA9E,YAAU,aAAW,QAAM,SAAO,QAAc,SAAiB;AAClE;AAAA;AAAA;AAAA;AAAA;AAAA,MAKE,8CAAS,cAAR,EACC;AAAA,qDAAS,iBAAR,EAAgB,SAAO,MACtB;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,eAAW,8BAAK,wBAAwB,SAAsB;AAAA,YAC9D;AAAA,YACA,MAAK;AAAA,aACD,OALL;AAAA,YAOE;AAAA;AAAA,QACH,GACF;AAAA,QACA,6CAAS,gBAAR,EACC,uDAAS,iBAAR,EAAgB,SAAO,MAAC,MAAY,OACnC;AAAA,UAAC;AAAA,2CACK,WADL;AAAA,YAEC,eAAW,8BAAK,qBAAqB,qCAAU,SAAsB;AAAA,YAErE;AAAA,2DAAS,eAAR,EAAc,SAAO,MACpB,uDAAC,aAAI,aAAJ,EAAgB,GACnB;AAAA,cACC;AAAA;AAAA;AAAA,QACH,GACF,GACF;AAAA,SACF;AAAA;AAAA,EAEJ;AACF;AACA,SAAS,cAAc;","names":["import_typed_classname","import_react","import_jsx_runtime"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index-no-css.d.mts
CHANGED
|
@@ -63,6 +63,7 @@ export { FooterLinkSections } from './_tsup-dts-rollup';
|
|
|
63
63
|
export { FooterLinkSection } from './_tsup-dts-rollup';
|
|
64
64
|
export { FooterProps } from './_tsup-dts-rollup';
|
|
65
65
|
export { FooterButtonLinkProps } from './_tsup-dts-rollup';
|
|
66
|
+
export { HelpText } from './_tsup-dts-rollup';
|
|
66
67
|
export { ContainerProps } from './_tsup-dts-rollup';
|
|
67
68
|
export { Container } from './_tsup-dts-rollup';
|
|
68
69
|
export { Grid } from './_tsup-dts-rollup';
|
|
@@ -105,6 +106,7 @@ export { SkeletonProps } from './_tsup-dts-rollup';
|
|
|
105
106
|
export { StepIndicator } from './_tsup-dts-rollup';
|
|
106
107
|
export { StyledHtml } from './_tsup-dts-rollup';
|
|
107
108
|
export { StyledHtmlProps } from './_tsup-dts-rollup';
|
|
109
|
+
export { Table } from './_tsup-dts-rollup';
|
|
108
110
|
export { Tabs } from './_tsup-dts-rollup';
|
|
109
111
|
export { TabsList } from './_tsup-dts-rollup';
|
|
110
112
|
export { TabsTab } from './_tsup-dts-rollup';
|
package/dist/index-no-css.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export { FooterLinkSections } from './_tsup-dts-rollup';
|
|
|
63
63
|
export { FooterLinkSection } from './_tsup-dts-rollup';
|
|
64
64
|
export { FooterProps } from './_tsup-dts-rollup';
|
|
65
65
|
export { FooterButtonLinkProps } from './_tsup-dts-rollup';
|
|
66
|
+
export { HelpText } from './_tsup-dts-rollup';
|
|
66
67
|
export { ContainerProps } from './_tsup-dts-rollup';
|
|
67
68
|
export { Container } from './_tsup-dts-rollup';
|
|
68
69
|
export { Grid } from './_tsup-dts-rollup';
|
|
@@ -105,6 +106,7 @@ export { SkeletonProps } from './_tsup-dts-rollup';
|
|
|
105
106
|
export { StepIndicator } from './_tsup-dts-rollup';
|
|
106
107
|
export { StyledHtml } from './_tsup-dts-rollup';
|
|
107
108
|
export { StyledHtmlProps } from './_tsup-dts-rollup';
|
|
109
|
+
export { Table } from './_tsup-dts-rollup';
|
|
108
110
|
export { Tabs } from './_tsup-dts-rollup';
|
|
109
111
|
export { TabsList } from './_tsup-dts-rollup';
|
|
110
112
|
export { TabsTab } from './_tsup-dts-rollup';
|