@lmnto/h-mall-shared 1.0.24 → 1.0.26

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmnto/h-mall-shared",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "private": false,
5
5
  "sideEffects": false,
6
6
  "scripts": {
@@ -25,19 +25,30 @@ export default function SubscriptionBanner({
25
25
  return (
26
26
  <div className="justify-between rounded-xl h-[200px] sm:h-[150px] p-[5%] lg:p-[2%] subscriptionBanner">
27
27
  <div className="w-full md:w-5/6 lg:w-3/4 xl:w-2/3">
28
- <Typography
29
- variant="h6"
30
- className="font-medium text-sm text-black-500 mb-1"
31
- >
32
- {scopeT("welcomeBack")}
33
- </Typography>
28
+ {isMembershipFeatureEnabled ? (
29
+ <>
30
+ <Typography
31
+ variant="h6"
32
+ className="font-medium text-sm text-black-500 mb-1"
33
+ >
34
+ {scopeT("welcomeBack")}
35
+ </Typography>
34
36
 
35
- <Typography
36
- variant="h3"
37
- className="font-semibold text-sm md:text-base text-black-500"
38
- >
39
- {scopeT("activeSubscription")}
40
- </Typography>
37
+ <Typography
38
+ variant="h3"
39
+ className="font-semibold text-sm md:text-base text-black-500"
40
+ >
41
+ {scopeT("activeSubscription")}
42
+ </Typography>
43
+ </>
44
+ ) : (
45
+ <Typography
46
+ variant="h3"
47
+ className="font-semibold text-sm md:text-base text-black-500"
48
+ >
49
+ {scopeT("membershipFeatureUnavailableWelcome")}
50
+ </Typography>
51
+ )}
41
52
  </div>
42
53
  </div>
43
54
  );
@@ -61,6 +61,8 @@ export default {
61
61
  "Subscription activation still in progress. Please check back later or contact support.",
62
62
  membershipFeatureUnavailableWelcome:
63
63
  "Welcome to H Mall! Explore our products and discover what we have to offer.",
64
+ exploreFeaturesOnly:
65
+ "Dive in and explore new features and updates now!",
64
66
  },
65
67
  quantityComponent: {
66
68
  quantity: "Quantity",
@@ -60,6 +60,8 @@ export default {
60
60
  "Attivazione dell'abbonamento ancora in corso. Riprova più tardi o contatta l'assistenza.",
61
61
  membershipFeatureUnavailableWelcome:
62
62
  "Benvenuto su H Mall! Esplora i nostri prodotti e scopri cosa abbiamo da offrire.",
63
+ exploreFeaturesOnly:
64
+ "Immergiti ed esplora nuove funzionalità e aggiornamenti ora!",
63
65
  },
64
66
  quantityComponent: {
65
67
  quantity: "Quantità",
@@ -0,0 +1,51 @@
1
+ import plugin from "tailwindcss/plugin";
2
+
3
+ /**
4
+ * Material Tailwind Checkbox/Radio/Switch rely on `peer-checked:*` and `group-hover:*`
5
+ * utilities (e.g. icon spans use `opacity-0 peer-checked:opacity-100`). In this
6
+ * project's Tailwind build those matchVariant rules were not emitted, leaving
7
+ * controls permanently invisible (`appearance-none` + `opacity-0`).
8
+ */
9
+ const peerGroupVariantValues: Record<string, string> = {
10
+ first: ":first-child",
11
+ last: ":last-child",
12
+ only: ":only-child",
13
+ odd: ":nth-child(odd)",
14
+ even: ":nth-child(even)",
15
+ "first-of-type": ":first-of-type",
16
+ "last-of-type": ":last-of-type",
17
+ "only-of-type": ":only-of-type",
18
+ visited: ":visited",
19
+ target: ":target",
20
+ open: ":open",
21
+ default: ":default",
22
+ checked: ":checked",
23
+ indeterminate: ":indeterminate",
24
+ "placeholder-shown": ":placeholder-shown",
25
+ autofill: ":autofill",
26
+ optional: ":optional",
27
+ required: ":required",
28
+ valid: ":valid",
29
+ invalid: ":invalid",
30
+ "in-range": ":in-range",
31
+ "out-of-range": ":out-of-range",
32
+ "read-only": ":read-only",
33
+ empty: ":empty",
34
+ "focus-within": ":focus-within",
35
+ hover: ":hover",
36
+ focus: ":focus",
37
+ "focus-visible": ":focus-visible",
38
+ active: ":active",
39
+ enabled: ":enabled",
40
+ disabled: ":disabled",
41
+ };
42
+
43
+ export const peerGroupVariantsPlugin = plugin(({ matchVariant }) => {
44
+ matchVariant("peer", (value) => `.peer${value} ~ &`, {
45
+ values: peerGroupVariantValues,
46
+ });
47
+
48
+ matchVariant("group", (value) => `.group${value} &`, {
49
+ values: peerGroupVariantValues,
50
+ });
51
+ });
@@ -3,6 +3,8 @@ import path from "node:path";
3
3
  import withMT from "@material-tailwind/react/utils/withMT";
4
4
  import type { Config } from "tailwindcss";
5
5
 
6
+ import { peerGroupVariantsPlugin } from "./tailwind-peer-group-variants.plugin";
7
+
6
8
  export const sharedConfig: Config = {
7
9
  // Absolute glob so when web-app imports this config, paths are not resolved from web-app/.
8
10
  content: [path.join(__dirname, "shared/**/*.{js,ts,jsx,tsx,mdx}")],
@@ -231,7 +233,7 @@ export const sharedConfig: Config = {
231
233
  },
232
234
  },
233
235
  },
234
- plugins: [require("@material-tailwind/react/utils/withMT")],
236
+ plugins: [peerGroupVariantsPlugin],
235
237
  };
236
238
 
237
239
  export const sharedWithMT = withMT;