@bonprix-ds/react-removed-item-placeholder 1.0.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.
@@ -0,0 +1,15 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ declare const RemovedItemPlaceholder: ({ children, actionLabel, onClick }: RemovedItemPlaceholderProps) => default_2.JSX.Element;
4
+ export default RemovedItemPlaceholder;
5
+
6
+ export declare interface RemovedItemPlaceholderProps {
7
+ /** A short text to be display in the placeholder. */
8
+ children: string;
9
+ /** The label for the action button. */
10
+ actionLabel: string;
11
+ /** Callback function, that is triggered when the action button is clicked. */
12
+ onClick: () => void;
13
+ }
14
+
15
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ import e from "./src/RemovedItemPlaceholder.js";
2
+ export { e as default };
@@ -0,0 +1,29 @@
1
+ "use client";
2
+ import e from "@bonprix-ds/react-button";
3
+ import "react";
4
+ import { tv as t } from "tailwind-variants";
5
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
6
+ //#region src/RemovedItemPlaceholder.tsx
7
+ var i = t({ slots: {
8
+ root: "preflight w-full h-full flex flex-col px-8 py-19 items-center justify-center",
9
+ label: "pb-3 typography-body1 text-clr-primary text-center"
10
+ } }), a = ({ children: t, actionLabel: a, onClick: o }) => {
11
+ let { root: s, label: c } = i();
12
+ return /* @__PURE__ */ r("div", {
13
+ className: s(),
14
+ children: [/* @__PURE__ */ n("div", {
15
+ className: c(),
16
+ children: t
17
+ }), /* @__PURE__ */ n(e, {
18
+ type: "button",
19
+ variant: "secondary",
20
+ onClick: o,
21
+ contentWidth: !0,
22
+ children: a
23
+ })]
24
+ });
25
+ };
26
+ //#endregion
27
+ export { a as default };
28
+
29
+ //# sourceMappingURL=RemovedItemPlaceholder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemovedItemPlaceholder.js","names":[],"sources":["../../src/RemovedItemPlaceholder.tsx"],"sourcesContent":["\"use client\";\n\nimport Button from \"@bonprix-ds/react-button\";\nimport React from \"react\";\nimport { tv } from \"tailwind-variants\";\n\nconst generateClasses = tv({\n slots: {\n root: \"preflight w-full h-full flex flex-col px-8 py-19 items-center justify-center\",\n label: \"pb-3 typography-body1 text-clr-primary text-center\",\n },\n});\n\nexport interface Props {\n /** A short text to be display in the placeholder. */\n children: string;\n /** The label for the action button. */\n actionLabel: string;\n /** Callback function, that is triggered when the action button is clicked. */\n onClick: () => void;\n}\n\nconst RemovedItemPlaceholder = ({ children, actionLabel, onClick }: Props) => {\n const { root, label } = generateClasses();\n\n return (\n <div className={root()}>\n <div className={label()}>{children}</div>\n <Button type=\"button\" variant=\"secondary\" onClick={onClick} contentWidth>\n {actionLabel}\n </Button>\n </div>\n );\n};\n\nexport default RemovedItemPlaceholder;\n"],"mappings":";;;;;;AAMA,IAAM,IAAkB,EAAG,EACzB,OAAO;CACL,MAAM;CACN,OAAO;AACT,EACF,CAAC,GAWK,KAA0B,EAAE,aAAU,gBAAa,iBAAqB;CAC5E,IAAM,EAAE,SAAM,aAAU,EAAgB;CAExC,OACE,kBAAC,OAAD;EAAK,WAAW,EAAK;EAArB,UAAA,CACE,kBAAC,OAAD;GAAK,WAAW,EAAM;GAAI;EAAc,CAAA,GACxC,kBAAC,GAAD;GAAQ,MAAK;GAAS,SAAQ;GAAqB;GAAS,cAAA;GACzD,UAAA;EACK,CAAA,CACL;;AAET"}
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@bonprix-ds/react-removed-item-placeholder",
3
+ "version": "1.0.0",
4
+ "description": "RemovedItemPlaceholder component, implemented in React, for the Bonprix Design System.",
5
+ "type": "module",
6
+ "publishConfig": {
7
+ "access": "public",
8
+ "provenance": true
9
+ },
10
+ "module": "./dist/index.js",
11
+ "sideEffects": false,
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
+ "default": "./dist/index.js"
17
+ }
18
+ },
19
+ "types": "./dist/index.d.ts",
20
+ "files": [
21
+ "dist"
22
+ ],
23
+ "keywords": [],
24
+ "author": "",
25
+ "license": "UNLICENSED",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/bonprix/design-system.git",
29
+ "directory": "packages/react/removed-item-placeholder"
30
+ },
31
+ "dependencies": {
32
+ "@bonprix-ds/react-button": "1.0.0",
33
+ "@bonprix-ds/utils": "0.2.1"
34
+ },
35
+ "peerDependencies": {
36
+ "react": "^19.0.0",
37
+ "react-dom": "^19.0.0",
38
+ "tailwind-variants": "0.3.1"
39
+ },
40
+ "devDependencies": {
41
+ "vite": "8.2.2",
42
+ "@types/react": "19.2.18",
43
+ "@vitejs/plugin-react": "6.1.1",
44
+ "rollup-preserve-directives": "1.1.3",
45
+ "unplugin-dts": "1.0.3",
46
+ "@microsoft/api-extractor": "7.59.0"
47
+ },
48
+ "scripts": {
49
+ "build": "vite build"
50
+ }
51
+ }