@datlv-trustshop/shopify-inapp-components 0.1.27 → 0.1.28

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.
@@ -1,7 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { Card, BlockStack, InlineStack, Text, Badge, Button, Box, } from "@shopify/polaris";
4
- import { XIcon } from "@shopify/polaris-icons";
5
4
  import { useCampaignTracking } from "../hooks/useCampaignTracking";
6
5
  import { DashboardContext } from "../provider/DashboardProvider";
7
6
  export const FloatingCard = ({ data, shopId: propsShopId, onDismiss, onPrimaryAction, onSecondaryAction, position = 'bottom-right', showCloseButton = true, }) => {
@@ -96,7 +95,7 @@ export const FloatingCard = ({ data, shopId: propsShopId, onDismiss, onPrimaryAc
96
95
  right: '7px',
97
96
  top: '7px',
98
97
  borderRadius: '8px',
99
- background: 'rgba(255, 255, 255, 0.20)',
98
+ background: 'rgba(255, 255, 255, 0.10)',
100
99
  border: 'none',
101
100
  cursor: 'pointer',
102
101
  transition: 'background 0.2s ease',
@@ -139,11 +138,10 @@ export const FloatingCard = ({ data, shopId: propsShopId, onDismiss, onPrimaryAc
139
138
  document.head.appendChild(style);
140
139
  }
141
140
  }, []);
142
- return (_jsx("div", { ref: tracking?.elementRef, style: floatingCardStyles, children: _jsxs(Card, { padding: "0", roundedAbove: "sm", children: [(showCloseButton && data.dismissible !== false) && (_jsx("button", { style: closeButtonStyles, onMouseEnter: (e) => {
143
- e.currentTarget.style.background = 'rgba(255, 255, 255, 0.30)';
144
- }, onMouseLeave: (e) => {
145
- e.currentTarget.style.background = 'rgba(255, 255, 255, 0.20)';
146
- }, onClick: handleDismiss, "aria-label": "Close", children: _jsx(XIcon, { style: { width: '20px', height: '20px', color: 'rgba(255, 255, 255, 0.9)' } }) })), _jsxs(BlockStack, { gap: "0", children: [data.img_url && (_jsx("div", { style: imageContainerStyles, children: _jsx("img", { src: data.img_url, alt: data.image_alt || data.title, style: {
141
+ return (_jsx("div", { ref: tracking?.elementRef, style: floatingCardStyles, children: _jsxs(Card, { padding: "0", roundedAbove: "sm", children: [(showCloseButton && data.dismissible !== false) && (_jsx("button", { style: closeButtonStyles, onClick: handleDismiss, "aria-label": "Close", children: _jsx("div", { style: {
142
+ width: "20px",
143
+ height: "20ox"
144
+ }, children: _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "8", height: "8", viewBox: "0 0 8 8", fill: "none", children: _jsx("path", { d: "M6.71967 7.78033C7.01256 8.07322 7.48744 8.07322 7.78033 7.78033C8.07322 7.48744 8.07322 7.01256 7.78033 6.71967L5.06066 4L7.78033 1.28033C8.07322 0.987437 8.07322 0.512563 7.78033 0.21967C7.48744 -0.073223 7.01256 -0.073223 6.71967 0.21967L4 2.93934L1.28033 0.21967C0.987437 -0.0732233 0.512564 -0.0732233 0.21967 0.21967C-0.0732225 0.512563 -0.0732226 0.987437 0.21967 1.28033L2.93934 4L0.21967 6.71967C-0.0732233 7.01256 -0.0732233 7.48744 0.21967 7.78033C0.512563 8.07322 0.987437 8.07322 1.28033 7.78033L4 5.06066L6.71967 7.78033Z", fill: "white", "fill-opacity": "0.6" }) }) }) })), _jsxs(BlockStack, { gap: "0", children: [data.img_url && (_jsx("div", { style: imageContainerStyles, children: _jsx("img", { src: data.img_url, alt: data.image_alt || data.title, style: {
147
145
  width: "100%",
148
146
  height: "100%",
149
147
  objectFit: "cover",
@@ -113,7 +113,9 @@ export const PartnerIntegration = ({ className = "", onManage, onInstall, onOpen
113
113
  }, title: status.upgradeBadgeTooltip, children: [status.upgradeBadgeIcon && (_jsx("span", { style: {
114
114
  display: "inline-flex",
115
115
  alignItems: "center",
116
- }, children: status.upgradeBadgeIcon })), _jsx("span", { children: status.upgradeBadgeText || translations.partnerIntegration?.upgradeBadge?.upgrade || "Upgrade" })] }))] }), item.content && (_jsx(Text, { as: "p", variant: "bodyMd", children: item.content }))] }), _jsx(InlineStack, { gap: "200", children: status ? (_jsxs(_Fragment, { children: [item.button_install_text && (_jsx(Button, { icon: ExternalIcon, onClick: () => handleInstall(item), children: item.button_install_text })), item.button_manage_text && (_jsx(Button, { onClick: () => handleManage(item), disabled: item.key === "after_ship" ? (status.showUpgradeBadge === true) : status.showUpgradeBadge === true, children: item.button_manage_text }))] })) : (_jsxs(_Fragment, { children: [item.button_manage_text && (_jsx(Button, { onClick: () => handleManage(item), children: item.button_manage_text })), item.button_install_text && (_jsx(Button, { icon: ExternalIcon, onClick: () => handleInstall(item), children: item.button_install_text }))] })) })] }) })] }) }) }, `integration--${item.id || item.key}`));
116
+ }, children: status.upgradeBadgeIcon })), _jsx("span", { style: {
117
+ fontSize: "13px",
118
+ }, children: status.upgradeBadgeText || translations.partnerIntegration?.upgradeBadge?.upgrade || "Upgrade" })] }))] }), item.content && (_jsx(Text, { as: "p", variant: "bodyMd", children: item.content }))] }), _jsx(InlineStack, { gap: "200", children: status ? (_jsxs(_Fragment, { children: [item.button_install_text && (_jsx(Button, { icon: ExternalIcon, onClick: () => handleInstall(item), children: item.button_install_text })), item.button_manage_text && (_jsx(Button, { onClick: () => handleManage(item), disabled: item.key === "after_ship" ? (status.showUpgradeBadge === true) : status.showUpgradeBadge === true, children: item.button_manage_text }))] })) : (_jsxs(_Fragment, { children: [item.button_manage_text && (_jsx(Button, { onClick: () => handleManage(item), children: item.button_manage_text })), item.button_install_text && (_jsx(Button, { icon: ExternalIcon, onClick: () => handleInstall(item), children: item.button_install_text }))] })) })] }) })] }) }) }, `integration--${item.id || item.key}`));
117
119
  };
118
120
  // Loading state
119
121
  if (loading) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datlv-trustshop/shopify-inapp-components",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "private": false,
5
5
  "description": "React TypeScript components for Shopify in-app dashboard content",
6
6
  "main": "dist/index.js",