@postenbring/hedwig-react 4.2.2 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-5J5LYE6Z.mjs +1 -0
- package/dist/chunk-6D5VE3DW.mjs +44 -0
- package/dist/chunk-6D5VE3DW.mjs.map +1 -0
- package/dist/chunk-FTVKPZCX.mjs +37 -0
- package/dist/chunk-FTVKPZCX.mjs.map +1 -0
- package/dist/chunk-HA3LRSDK.mjs +21 -0
- package/dist/chunk-HA3LRSDK.mjs.map +1 -0
- package/dist/chunk-XSID7YR7.mjs +1 -0
- package/dist/chunk-XSID7YR7.mjs.map +1 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.d.ts.map +1 -1
- package/dist/form/index.js +82 -5
- package/dist/form/index.js.map +1 -1
- package/dist/form/index.mjs +26 -11
- package/dist/form/suggestions/index.d.ts +7 -0
- package/dist/form/suggestions/index.d.ts.map +1 -0
- package/dist/form/suggestions/index.js +131 -0
- package/dist/form/suggestions/index.js.map +1 -0
- package/dist/form/suggestions/index.mjs +19 -0
- package/dist/form/suggestions/index.mjs.map +1 -0
- package/dist/form/suggestions/suggestions-item.d.ts +45 -0
- package/dist/form/suggestions/suggestions-item.d.ts.map +1 -0
- package/dist/form/suggestions/suggestions-item.js +83 -0
- package/dist/form/suggestions/suggestions-item.js.map +1 -0
- package/dist/form/suggestions/suggestions-item.mjs +10 -0
- package/dist/form/suggestions/suggestions-item.mjs.map +1 -0
- package/dist/form/suggestions/suggestions-wrapper.d.ts +41 -0
- package/dist/form/suggestions/suggestions-wrapper.d.ts.map +1 -0
- package/dist/form/suggestions/suggestions-wrapper.js +66 -0
- package/dist/form/suggestions/suggestions-wrapper.js.map +1 -0
- package/dist/form/suggestions/suggestions-wrapper.mjs +8 -0
- package/dist/form/suggestions/suggestions-wrapper.mjs.map +1 -0
- package/dist/form/suggestions/suggestions.d.ts +57 -0
- package/dist/form/suggestions/suggestions.d.ts.map +1 -0
- package/dist/form/suggestions/suggestions.js +123 -0
- package/dist/form/suggestions/suggestions.js.map +1 -0
- package/dist/form/suggestions/suggestions.mjs +10 -0
- package/dist/form/suggestions/suggestions.mjs.map +1 -0
- package/dist/index.js +356 -279
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -15
- package/package.json +5 -5
- package/src/form/index.tsx +1 -0
- package/src/form/suggestions/index.tsx +6 -0
- package/src/form/suggestions/suggestions-item.tsx +70 -0
- package/src/form/suggestions/suggestions-wrapper.tsx +50 -0
- package/src/form/suggestions/suggestions.tsx +89 -0
- package/dist/chunk-CVE23PMJ.mjs +0 -1
- /package/dist/{chunk-CVE23PMJ.mjs.map → chunk-5J5LYE6Z.mjs.map} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-5J5LYE6Z.mjs.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SuggestionsItem,
|
|
3
|
+
SuggestionsItemAction
|
|
4
|
+
} from "./chunk-FTVKPZCX.mjs";
|
|
5
|
+
import {
|
|
6
|
+
SuggestionsWrapper
|
|
7
|
+
} from "./chunk-HA3LRSDK.mjs";
|
|
8
|
+
import {
|
|
9
|
+
__objRest,
|
|
10
|
+
__spreadValues
|
|
11
|
+
} from "./chunk-YOSPWY5K.mjs";
|
|
12
|
+
|
|
13
|
+
// src/form/suggestions/suggestions.tsx
|
|
14
|
+
import { forwardRef } from "react";
|
|
15
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
16
|
+
import { jsx } from "react/jsx-runtime";
|
|
17
|
+
var Suggestions = forwardRef(
|
|
18
|
+
(_a, ref) => {
|
|
19
|
+
var _b = _a, { as = "ul", size = "default", className } = _b, rest = __objRest(_b, ["as", "size", "className"]);
|
|
20
|
+
const classes = clsx(
|
|
21
|
+
"hds-suggestions",
|
|
22
|
+
size !== "default" && `hds-suggestions--${size}`,
|
|
23
|
+
className
|
|
24
|
+
);
|
|
25
|
+
return as === "ol" ? /* @__PURE__ */ jsx(
|
|
26
|
+
"ol",
|
|
27
|
+
__spreadValues({
|
|
28
|
+
className: classes,
|
|
29
|
+
ref
|
|
30
|
+
}, rest)
|
|
31
|
+
) : /* @__PURE__ */ jsx("ul", __spreadValues({ className: classes, ref }, rest));
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
Suggestions.displayName = "Suggestions";
|
|
35
|
+
SuggestionsItem.displayName = "Suggestions.Item";
|
|
36
|
+
SuggestionsItemAction.displayName = "Suggestions.ItemAction";
|
|
37
|
+
Suggestions.Item = SuggestionsItem;
|
|
38
|
+
Suggestions.ItemAction = SuggestionsItemAction;
|
|
39
|
+
Suggestions.Wrapper = SuggestionsWrapper;
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
Suggestions
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=chunk-6D5VE3DW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/suggestions/suggestions.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { HTMLAttributes, Ref } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { SuggestionsWrapper } from \"./suggestions-wrapper\";\nimport { SuggestionsItem, SuggestionsItemAction } from \"./suggestions-item\";\n\nexport type { SuggestionsItemActionProps, SuggestionsItemProps } from \"./suggestions-item\";\n\nexport interface SuggestionsProps extends HTMLAttributes<HTMLUListElement | HTMLOListElement> {\n /**\n * Change the rendered list element.\n *\n * @default \"ul\"\n */\n as?: \"ul\" | \"ol\";\n /**\n * Sets the size of the items\n *\n * @default \"default\"\n */\n size?: \"default\" | \"small\";\n}\n\nexport type SuggestionProps = SuggestionsProps;\n\n/**\n * A list of suggestions for the user while searching\n *\n * @example\n * ```tsx\n * <Suggestions>\n * <Suggestions.Item>\n * <Suggestions.ItemAction href=\"/\">\n * Albania\n * </Suggestions.ItemAction>\n * </Suggestions.Item>\n * <Suggestions.Item>\n * <Suggestions.ItemAction asChild>\n * <button type=\"button\">Select Albania</button>\n * </Suggestions.ItemAction>\n * </Suggestions.Item>\n * </Suggestions>\n * ```\n *\n * Use `as=\"ol\"` for ordered suggestions:\n * ```tsx\n * <Suggestions as=\"ol\">\n * <Suggestions.Item>\n* <Suggestions.ItemAction href=\"/\">\n* First result\n* </Suggestions.ItemAction>\n * </Suggestions.Item>\n * </Suggestions>\n * ```\n */\nexport const Suggestions = forwardRef<HTMLUListElement | HTMLOListElement, SuggestionProps>(\n ({ as = \"ul\", size = \"default\", className, ...rest }, ref) => {\n const classes = clsx(\n \"hds-suggestions\",\n size !== \"default\" && `hds-suggestions--${size}`,\n className as undefined,\n );\n\n return as === \"ol\" ? (\n <ol\n className={classes}\n ref={ref as Ref<HTMLOListElement>}\n {...(rest as HTMLAttributes<HTMLOListElement>)}\n />\n ) : (\n <ul className={classes} ref={ref as Ref<HTMLUListElement>} {...rest} />\n );\n },\n) as SuggestionsType;\n\ntype SuggestionsType = ReturnType<\n typeof forwardRef<HTMLUListElement | HTMLOListElement, SuggestionProps>\n> & {\n Item: typeof SuggestionsItem;\n ItemAction: typeof SuggestionsItemAction;\n Wrapper: typeof SuggestionsWrapper;\n};\n\nSuggestions.displayName = \"Suggestions\";\nSuggestionsItem.displayName = \"Suggestions.Item\";\nSuggestionsItemAction.displayName = \"Suggestions.ItemAction\";\nSuggestions.Item = SuggestionsItem;\nSuggestions.ItemAction = SuggestionsItemAction;\nSuggestions.Wrapper = SuggestionsWrapper;\n"],"mappings":";;;;;;;;;;;;;AAAA,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AA8Df;AATC,IAAM,cAAc;AAAA,EACzB,CAAC,IAAqD,QAAQ;AAA7D,iBAAE,OAAK,MAAM,OAAO,WAAW,UAxDlC,IAwDG,IAA6C,iBAA7C,IAA6C,CAA3C,MAAW,QAAkB;AAC9B,UAAM,UAAU;AAAA,MACd;AAAA,MACA,SAAS,aAAa,oBAAoB,IAAI;AAAA,MAC9C;AAAA,IACF;AAEA,WAAO,OAAO,OACZ;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,QACX;AAAA,SACK;AAAA,IACP,IAEA,oBAAC,uBAAG,WAAW,SAAS,OAAuC,KAAM;AAAA,EAEzE;AACF;AAUA,YAAY,cAAc;AAC1B,gBAAgB,cAAc;AAC9B,sBAAsB,cAAc;AACpC,YAAY,OAAO;AACnB,YAAY,aAAa;AACzB,YAAY,UAAU;","names":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "./chunk-YOSPWY5K.mjs";
|
|
5
|
+
|
|
6
|
+
// src/form/suggestions/suggestions-item.tsx
|
|
7
|
+
import { forwardRef } from "react";
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
9
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
var SuggestionsItem = forwardRef(
|
|
12
|
+
(_a, ref) => {
|
|
13
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
14
|
+
return /* @__PURE__ */ jsx("li", __spreadValues({ className: clsx("hds-suggestions-item", className), ref }, rest));
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
SuggestionsItem.displayName = "Suggestions.Item";
|
|
18
|
+
var SuggestionsItemAction = forwardRef(
|
|
19
|
+
(_a, ref) => {
|
|
20
|
+
var _b = _a, { asChild, className } = _b, rest = __objRest(_b, ["asChild", "className"]);
|
|
21
|
+
const Component = asChild ? Slot : "a";
|
|
22
|
+
return /* @__PURE__ */ jsx(
|
|
23
|
+
Component,
|
|
24
|
+
__spreadValues({
|
|
25
|
+
className: clsx("hds-suggestions-item__action", className),
|
|
26
|
+
ref
|
|
27
|
+
}, rest)
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
SuggestionsItemAction.displayName = "Suggestions.ItemAction";
|
|
32
|
+
|
|
33
|
+
export {
|
|
34
|
+
SuggestionsItem,
|
|
35
|
+
SuggestionsItemAction
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=chunk-FTVKPZCX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/suggestions/suggestions-item.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { AnchorHTMLAttributes, HTMLAttributes, Ref } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nexport type SuggestionsItemProps = HTMLAttributes<HTMLLIElement>;\n\nexport interface SuggestionsItemActionProps extends AnchorHTMLAttributes<HTMLAnchorElement> {\n /**\n * Use the element passed as a child, merging its props and behavior.\n *\n * @default false\n */\n asChild?: boolean;\n}\n\n/**\n * A single structural item in a suggestions list.\n *\n * Use `Suggestions.ItemAction` as the interactive child of each item.\n *\n * @example\n * ```tsx\n * <Suggestions.Item>\n * <Suggestions.ItemAction href=\"/results\">\n * View results\n * </Suggestions.ItemAction>\n * </Suggestions.Item>\n * ```\n */\nexport const SuggestionsItem = forwardRef<HTMLLIElement, SuggestionsItemProps>(\n ({ className, ...rest }, ref) => (\n <li className={clsx(\"hds-suggestions-item\", className as undefined)} ref={ref} {...rest} />\n ),\n);\n\nSuggestionsItem.displayName = \"Suggestions.Item\";\n\n/**\n * The interactive action within a suggestions item.\n *\n * Renders an anchor by default and applies the `hds-suggestions-item__action`\n * class. Use `asChild` to render another interactive element, such as a button\n * or router link, while preserving the action styling.\n *\n * @example\n * ```tsx\n * <Suggestions.ItemAction href=\"/results\">\n * View results\n * </Suggestions.ItemAction>\n *\n * <Suggestions.ItemAction asChild>\n * <button type=\"button\">Select result</button>\n * </Suggestions.ItemAction>\n * ```\n */\nexport const SuggestionsItemAction = forwardRef<HTMLAnchorElement, SuggestionsItemActionProps>(\n ({ asChild, className, ...rest }, ref) => {\n const Component = asChild ? Slot : \"a\";\n return (\n <Component\n className={clsx(\"hds-suggestions-item__action\", className as undefined)}\n ref={ref as Ref<HTMLAnchorElement>}\n {...rest}\n />\n );\n },\n);\n\nSuggestionsItemAction.displayName = \"Suggestions.ItemAction\";\n"],"mappings":";;;;;;AAAA,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AACrB,SAAS,YAAY;AA6BjB;AAFG,IAAM,kBAAkB;AAAA,EAC7B,CAAC,IAAwB,QAAK;AAA7B,iBAAE,YA/BL,IA+BG,IAAgB,iBAAhB,IAAgB,CAAd;AACD,+BAAC,uBAAG,WAAW,KAAK,wBAAwB,SAAsB,GAAG,OAAc,KAAM;AAAA;AAE7F;AAEA,gBAAgB,cAAc;AAoBvB,IAAM,wBAAwB;AAAA,EACnC,CAAC,IAAiC,QAAQ;AAAzC,iBAAE,WAAS,UAzDd,IAyDG,IAAyB,iBAAzB,IAAyB,CAAvB,WAAS;AACV,UAAM,YAAY,UAAU,OAAO;AACnC,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,gCAAgC,SAAsB;AAAA,QACtE;AAAA,SACI;AAAA,IACN;AAAA,EAEJ;AACF;AAEA,sBAAsB,cAAc;","names":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__objRest,
|
|
3
|
+
__spreadValues
|
|
4
|
+
} from "./chunk-YOSPWY5K.mjs";
|
|
5
|
+
|
|
6
|
+
// src/form/suggestions/suggestions-wrapper.tsx
|
|
7
|
+
import { forwardRef } from "react";
|
|
8
|
+
import { clsx } from "@postenbring/hedwig-css/typed-classname";
|
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
|
10
|
+
var SuggestionsWrapper = forwardRef(
|
|
11
|
+
(_a, ref) => {
|
|
12
|
+
var _b = _a, { as: Tag = "div", className } = _b, rest = __objRest(_b, ["as", "className"]);
|
|
13
|
+
return /* @__PURE__ */ jsx(Tag, __spreadValues({ className: clsx("hds-suggestions-wrapper", className), ref }, rest));
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
SuggestionsWrapper.displayName = "Suggestions.Wrapper";
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
SuggestionsWrapper
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=chunk-HA3LRSDK.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/form/suggestions/suggestions-wrapper.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { HTMLAttributes } from \"react\";\nimport { clsx } from \"@postenbring/hedwig-css/typed-classname\";\n\nexport interface SuggestionsWrapperProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Change the rendered element for the suggestions wrapper.\n *\n * @default \"div\"\n */\n as?: \"section\" | \"div\";\n}\n\n/**\n * A wrapper for search suggestions.\n * Intended to contain a SearchWrapper and Suggestions.\n *\n * @example\n * ```tsx\n * <Suggestions.Wrapper>\n * <SearchWrapper>\n * <Input type=\"search\" aria-label=\"Search content\" />\n * <Button>Search</Button>\n * <Button icon aria-label=\"Clear search\">\n * <XmarkIcon />\n * </Button>\n * </SearchWrapper>\n * <Suggestions>\n * <Suggestions.Item>\n * <Suggestions.ItemAction href=\"/\">Albania</Suggestions.ItemAction>\n * </Suggestions.Item>\n * </Suggestions>\n * </Suggestions.Wrapper>\n * ```\n *\n * Use `as` when the wrapper needs a different semantic element:\n * ```tsx\n * <Suggestions.Wrapper as=\"section\">\n * <SearchWrapper>...</SearchWrapper>\n * <Suggestions>...</Suggestions>\n * </Suggestions.Wrapper>\n * ```\n */\nexport const SuggestionsWrapper = forwardRef<HTMLDivElement, SuggestionsWrapperProps>(\n ({ as: Tag = \"div\", className, ...rest }, ref) => (\n <Tag className={clsx(\"hds-suggestions-wrapper\", className as undefined)} ref={ref} {...rest} />\n ),\n);\n\nSuggestionsWrapper.displayName = \"Suggestions.Wrapper\";\n"],"mappings":";;;;;;AAAA,SAAS,kBAAkB;AAE3B,SAAS,YAAY;AA2CjB;AAFG,IAAM,qBAAqB;AAAA,EAChC,CAAC,IAAyC,QAAK;AAA9C,iBAAE,MAAI,MAAM,OAAO,UA5CtB,IA4CG,IAAiC,iBAAjC,IAAiC,CAA/B,MAAiB;AAClB,+BAAC,sBAAI,WAAW,KAAK,2BAA2B,SAAsB,GAAG,OAAc,KAAM;AAAA;AAEjG;AAEA,mBAAmB,cAAc;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=chunk-XSID7YR7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/form/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./input";
|
|
|
7
7
|
export * from "./radio-button";
|
|
8
8
|
export * from "./search-wrapper";
|
|
9
9
|
export * from "./select";
|
|
10
|
+
export * from "./suggestions";
|
|
10
11
|
export * from "./textarea";
|
|
11
12
|
export * from "./validation-message";
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/form/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/form/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC"}
|
package/dist/form/index.js
CHANGED
|
@@ -71,6 +71,10 @@ __export(form_exports, {
|
|
|
71
71
|
RadioGroup: () => RadioGroup,
|
|
72
72
|
SearchWrapper: () => SearchWrapper,
|
|
73
73
|
Select: () => Select,
|
|
74
|
+
Suggestions: () => Suggestions,
|
|
75
|
+
SuggestionsItem: () => SuggestionsItem,
|
|
76
|
+
SuggestionsItemAction: () => SuggestionsItemAction,
|
|
77
|
+
SuggestionsWrapper: () => SuggestionsWrapper,
|
|
74
78
|
Textarea: () => Textarea,
|
|
75
79
|
ValidationMessage: () => ValidationMessage,
|
|
76
80
|
useFieldsetContext: () => useFieldsetContext,
|
|
@@ -986,11 +990,80 @@ var Select = (0, import_react18.forwardRef)(
|
|
|
986
990
|
);
|
|
987
991
|
Select.displayName = "Select";
|
|
988
992
|
|
|
989
|
-
// src/form/
|
|
993
|
+
// src/form/suggestions/suggestions.tsx
|
|
994
|
+
var import_react21 = require("react");
|
|
995
|
+
var import_typed_classname17 = require("@postenbring/hedwig-css/typed-classname");
|
|
996
|
+
|
|
997
|
+
// src/form/suggestions/suggestions-wrapper.tsx
|
|
990
998
|
var import_react19 = require("react");
|
|
991
999
|
var import_typed_classname15 = require("@postenbring/hedwig-css/typed-classname");
|
|
992
1000
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
993
|
-
var
|
|
1001
|
+
var SuggestionsWrapper = (0, import_react19.forwardRef)(
|
|
1002
|
+
(_a, ref) => {
|
|
1003
|
+
var _b = _a, { as: Tag = "div", className } = _b, rest = __objRest(_b, ["as", "className"]);
|
|
1004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Tag, __spreadValues({ className: (0, import_typed_classname15.clsx)("hds-suggestions-wrapper", className), ref }, rest));
|
|
1005
|
+
}
|
|
1006
|
+
);
|
|
1007
|
+
SuggestionsWrapper.displayName = "Suggestions.Wrapper";
|
|
1008
|
+
|
|
1009
|
+
// src/form/suggestions/suggestions-item.tsx
|
|
1010
|
+
var import_react20 = require("react");
|
|
1011
|
+
var import_typed_classname16 = require("@postenbring/hedwig-css/typed-classname");
|
|
1012
|
+
var import_react_slot4 = require("@radix-ui/react-slot");
|
|
1013
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1014
|
+
var SuggestionsItem = (0, import_react20.forwardRef)(
|
|
1015
|
+
(_a, ref) => {
|
|
1016
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
1017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("li", __spreadValues({ className: (0, import_typed_classname16.clsx)("hds-suggestions-item", className), ref }, rest));
|
|
1018
|
+
}
|
|
1019
|
+
);
|
|
1020
|
+
SuggestionsItem.displayName = "Suggestions.Item";
|
|
1021
|
+
var SuggestionsItemAction = (0, import_react20.forwardRef)(
|
|
1022
|
+
(_a, ref) => {
|
|
1023
|
+
var _b = _a, { asChild, className } = _b, rest = __objRest(_b, ["asChild", "className"]);
|
|
1024
|
+
const Component = asChild ? import_react_slot4.Slot : "a";
|
|
1025
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1026
|
+
Component,
|
|
1027
|
+
__spreadValues({
|
|
1028
|
+
className: (0, import_typed_classname16.clsx)("hds-suggestions-item__action", className),
|
|
1029
|
+
ref
|
|
1030
|
+
}, rest)
|
|
1031
|
+
);
|
|
1032
|
+
}
|
|
1033
|
+
);
|
|
1034
|
+
SuggestionsItemAction.displayName = "Suggestions.ItemAction";
|
|
1035
|
+
|
|
1036
|
+
// src/form/suggestions/suggestions.tsx
|
|
1037
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1038
|
+
var Suggestions = (0, import_react21.forwardRef)(
|
|
1039
|
+
(_a, ref) => {
|
|
1040
|
+
var _b = _a, { as = "ul", size = "default", className } = _b, rest = __objRest(_b, ["as", "size", "className"]);
|
|
1041
|
+
const classes = (0, import_typed_classname17.clsx)(
|
|
1042
|
+
"hds-suggestions",
|
|
1043
|
+
size !== "default" && `hds-suggestions--${size}`,
|
|
1044
|
+
className
|
|
1045
|
+
);
|
|
1046
|
+
return as === "ol" ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1047
|
+
"ol",
|
|
1048
|
+
__spreadValues({
|
|
1049
|
+
className: classes,
|
|
1050
|
+
ref
|
|
1051
|
+
}, rest)
|
|
1052
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("ul", __spreadValues({ className: classes, ref }, rest));
|
|
1053
|
+
}
|
|
1054
|
+
);
|
|
1055
|
+
Suggestions.displayName = "Suggestions";
|
|
1056
|
+
SuggestionsItem.displayName = "Suggestions.Item";
|
|
1057
|
+
SuggestionsItemAction.displayName = "Suggestions.ItemAction";
|
|
1058
|
+
Suggestions.Item = SuggestionsItem;
|
|
1059
|
+
Suggestions.ItemAction = SuggestionsItemAction;
|
|
1060
|
+
Suggestions.Wrapper = SuggestionsWrapper;
|
|
1061
|
+
|
|
1062
|
+
// src/form/textarea/textarea.tsx
|
|
1063
|
+
var import_react22 = require("react");
|
|
1064
|
+
var import_typed_classname18 = require("@postenbring/hedwig-css/typed-classname");
|
|
1065
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1066
|
+
var Textarea = (0, import_react22.forwardRef)(function Textarea2(_a, ref) {
|
|
994
1067
|
var _b = _a, {
|
|
995
1068
|
className,
|
|
996
1069
|
size,
|
|
@@ -1018,10 +1091,10 @@ var Textarea = (0, import_react19.forwardRef)(function Textarea2(_a, ref) {
|
|
|
1018
1091
|
"readOnly",
|
|
1019
1092
|
"data-color"
|
|
1020
1093
|
]);
|
|
1021
|
-
return /* @__PURE__ */ (0,
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1022
1095
|
InputGroup,
|
|
1023
1096
|
{
|
|
1024
|
-
className: (0,
|
|
1097
|
+
className: (0, import_typed_classname18.clsx)("hds-textarea", className),
|
|
1025
1098
|
disabled,
|
|
1026
1099
|
validationMessage,
|
|
1027
1100
|
validationMessageProps,
|
|
@@ -1033,7 +1106,7 @@ var Textarea = (0, import_react19.forwardRef)(function Textarea2(_a, ref) {
|
|
|
1033
1106
|
style,
|
|
1034
1107
|
size,
|
|
1035
1108
|
"data-color": dataColor,
|
|
1036
|
-
children: /* @__PURE__ */ (0,
|
|
1109
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("textarea", __spreadValues({ disabled, readOnly, ref }, rest))
|
|
1037
1110
|
}
|
|
1038
1111
|
);
|
|
1039
1112
|
});
|
|
@@ -1052,6 +1125,10 @@ Textarea.displayName = "Textarea";
|
|
|
1052
1125
|
RadioGroup,
|
|
1053
1126
|
SearchWrapper,
|
|
1054
1127
|
Select,
|
|
1128
|
+
Suggestions,
|
|
1129
|
+
SuggestionsItem,
|
|
1130
|
+
SuggestionsItemAction,
|
|
1131
|
+
SuggestionsWrapper,
|
|
1055
1132
|
Textarea,
|
|
1056
1133
|
ValidationMessage,
|
|
1057
1134
|
useFieldsetContext,
|