@gem-sdk/plugin-sticky-add-to-cart 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.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ # GemX Plugin
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var components = require('@gem-sdk/components');
7
+
8
+ const StickyAddToCart = () => {
9
+ return (jsxRuntime.jsxs("div", { className: "fixed inset-x-0 bottom-0 z-90 flex items-center gap-4 bg-white p-4", children: [jsxRuntime.jsx("div", { className: "w-20", children: jsxRuntime.jsx(components.ProductImages, {}) }), jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [jsxRuntime.jsx(components.ProductTitle, {}), jsxRuntime.jsx(components.ProductPrice, {})] }), jsxRuntime.jsxs("div", { className: "ml-auto flex gap-4", children: [jsxRuntime.jsx(components.ProductQuantity, {}), jsxRuntime.jsx(components.ProductButton, { setting: { actionEffect: 'open-cart-drawer' } })] })] }));
10
+ };
11
+ StickyAddToCart.defaultProps = {};
12
+
13
+ exports.default = StickyAddToCart;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var StickyAddToCart = require('./components/StickyAddToCart.js');
6
+ var index = require('./setting/index.js');
7
+
8
+
9
+
10
+ exports.default = StickyAddToCart.default;
11
+ exports.builderSetting = index.default;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const config = {
6
+ tag: 'StickyAddToCart',
7
+ label: 'Sticky Add To Cart',
8
+ };
9
+
10
+ exports.default = config;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var StickyAddToCart = require('./StickyAddToCart.js');
6
+
7
+ var index = { StickyAddToCart: StickyAddToCart.default };
8
+
9
+ exports.default = index;
@@ -0,0 +1,9 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { ProductImages, ProductTitle, ProductPrice, ProductQuantity, ProductButton } from '@gem-sdk/components';
3
+
4
+ const StickyAddToCart = () => {
5
+ return (jsxs("div", { className: "fixed inset-x-0 bottom-0 z-90 flex items-center gap-4 bg-white p-4", children: [jsx("div", { className: "w-20", children: jsx(ProductImages, {}) }), jsxs("div", { className: "flex flex-col gap-2", children: [jsx(ProductTitle, {}), jsx(ProductPrice, {})] }), jsxs("div", { className: "ml-auto flex gap-4", children: [jsx(ProductQuantity, {}), jsx(ProductButton, { setting: { actionEffect: 'open-cart-drawer' } })] })] }));
6
+ };
7
+ StickyAddToCart.defaultProps = {};
8
+
9
+ export { StickyAddToCart as default };
@@ -0,0 +1,3 @@
1
+ import StickyAddToCart from './components/StickyAddToCart.js';
2
+ export { default } from './components/StickyAddToCart.js';
3
+ export { default as builderSetting } from './setting/index.js';
@@ -0,0 +1,6 @@
1
+ const config = {
2
+ tag: 'StickyAddToCart',
3
+ label: 'Sticky Add To Cart',
4
+ };
5
+
6
+ export { config as default };
@@ -0,0 +1,5 @@
1
+ import config from './StickyAddToCart.js';
2
+
3
+ var index = { StickyAddToCart: config };
4
+
5
+ export { index as default };
@@ -0,0 +1,11 @@
1
+ import * as _gem_sdk_core from '@gem-sdk/core';
2
+ import { BaseProps } from '@gem-sdk/core';
3
+
4
+ type StickyAddToCartProps = BaseProps;
5
+ declare const StickyAddToCart: React.FC<StickyAddToCartProps>;
6
+
7
+ declare const _default: {
8
+ StickyAddToCart: _gem_sdk_core.ComponentSetting<StickyAddToCartProps>;
9
+ };
10
+
11
+ export { _default as builderSetting, StickyAddToCart as default };
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@gem-sdk/plugin-sticky-add-to-cart",
3
+ "version": "1.0.0",
4
+ "license": "MIT",
5
+ "sideEffects": false,
6
+ "main": "dist/cjs/index.js",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "scripts": {
11
+ "cleanup": "rimraf es dist lib",
12
+ "prebuild": "yarn cleanup",
13
+ "pre:publish": "node ./../../helpers/convert-publish.js -p",
14
+ "post:publish": "node ./../../helpers/convert-publish.js",
15
+ "watch": "rollup -c ./../../helpers/rollup.config.mjs -w",
16
+ "build": "rollup -c ./../../helpers/rollup.config.mjs --environment NODE_ENV:production",
17
+ "lint": "eslint ./src --ext .tsx,.ts",
18
+ "type-check": "yarn tsc --noEmit",
19
+ "test": "jest -c ./../../helpers/jest.config.ts"
20
+ },
21
+ "devDependencies": {
22
+ "@gem-sdk/components": "*",
23
+ "@gem-sdk/core": "*",
24
+ "@gem-sdk/styles": "*"
25
+ },
26
+ "peerDependencies": {
27
+ "react": "^17 || ^18",
28
+ "react-dom": "^17 || ^18"
29
+ },
30
+ "module": "dist/esm/index.js",
31
+ "types": "dist/types/index.d.ts",
32
+ "exports": {
33
+ "./package.json": "./package.json",
34
+ ".": {
35
+ "import": "./dist/esm/index.js",
36
+ "require": "./dist/cjs/index.js",
37
+ "types": "./dist/types/index.d.ts"
38
+ }
39
+ }
40
+ }