@lokalise/harmony 1.40.3-exp-epic2x.4 → 1.40.3-exp-epic2x.5

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.
Files changed (209) hide show
  1. package/dist/harmony100.cjs +13 -10
  2. package/dist/harmony100.cjs.map +1 -1
  3. package/dist/harmony100.mjs +12 -9
  4. package/dist/harmony100.mjs.map +1 -1
  5. package/dist/harmony101.cjs +9 -45
  6. package/dist/harmony101.cjs.map +1 -1
  7. package/dist/harmony101.mjs +11 -47
  8. package/dist/harmony101.mjs.map +1 -1
  9. package/dist/harmony102.cjs +20 -8
  10. package/dist/harmony102.cjs.map +1 -1
  11. package/dist/harmony102.mjs +20 -8
  12. package/dist/harmony102.mjs.map +1 -1
  13. package/dist/harmony103.cjs +96 -11
  14. package/dist/harmony103.cjs.map +1 -1
  15. package/dist/harmony103.mjs +79 -11
  16. package/dist/harmony103.mjs.map +1 -1
  17. package/dist/harmony104.cjs +87 -20
  18. package/dist/harmony104.cjs.map +1 -1
  19. package/dist/harmony104.mjs +87 -20
  20. package/dist/harmony104.mjs.map +1 -1
  21. package/dist/harmony105.cjs +30 -87
  22. package/dist/harmony105.cjs.map +1 -1
  23. package/dist/harmony105.mjs +30 -87
  24. package/dist/harmony105.mjs.map +1 -1
  25. package/dist/harmony106.cjs +13 -29
  26. package/dist/harmony106.cjs.map +1 -1
  27. package/dist/harmony106.mjs +13 -29
  28. package/dist/harmony106.mjs.map +1 -1
  29. package/dist/harmony107.cjs +21 -10
  30. package/dist/harmony107.cjs.map +1 -1
  31. package/dist/harmony107.mjs +20 -9
  32. package/dist/harmony107.mjs.map +1 -1
  33. package/dist/harmony108.cjs +9 -12
  34. package/dist/harmony108.cjs.map +1 -1
  35. package/dist/harmony108.mjs +8 -11
  36. package/dist/harmony108.mjs.map +1 -1
  37. package/dist/harmony109.cjs +6 -9
  38. package/dist/harmony109.cjs.map +1 -1
  39. package/dist/harmony109.mjs +8 -11
  40. package/dist/harmony109.mjs.map +1 -1
  41. package/dist/harmony110.cjs +5 -9
  42. package/dist/harmony110.cjs.map +1 -1
  43. package/dist/harmony110.mjs +5 -9
  44. package/dist/harmony110.mjs.map +1 -1
  45. package/dist/harmony111.cjs +16 -7
  46. package/dist/harmony111.cjs.map +1 -1
  47. package/dist/harmony111.mjs +18 -9
  48. package/dist/harmony111.mjs.map +1 -1
  49. package/dist/harmony112.cjs +7 -23
  50. package/dist/harmony112.cjs.map +1 -1
  51. package/dist/harmony112.mjs +8 -24
  52. package/dist/harmony112.mjs.map +1 -1
  53. package/dist/harmony113.cjs +20 -6
  54. package/dist/harmony113.cjs.map +1 -1
  55. package/dist/harmony113.mjs +21 -7
  56. package/dist/harmony113.mjs.map +1 -1
  57. package/dist/harmony114.cjs +7 -32
  58. package/dist/harmony114.cjs.map +1 -1
  59. package/dist/harmony114.mjs +9 -34
  60. package/dist/harmony114.mjs.map +1 -1
  61. package/dist/harmony115.cjs +32 -7
  62. package/dist/harmony115.cjs.map +1 -1
  63. package/dist/harmony115.mjs +34 -9
  64. package/dist/harmony115.mjs.map +1 -1
  65. package/dist/harmony116.cjs +8 -18
  66. package/dist/harmony116.cjs.map +1 -1
  67. package/dist/harmony116.mjs +8 -18
  68. package/dist/harmony116.mjs.map +1 -1
  69. package/dist/harmony117.cjs +13 -27
  70. package/dist/harmony117.cjs.map +1 -1
  71. package/dist/harmony117.mjs +14 -28
  72. package/dist/harmony117.mjs.map +1 -1
  73. package/dist/harmony118.cjs +36 -21
  74. package/dist/harmony118.cjs.map +1 -1
  75. package/dist/harmony118.mjs +35 -20
  76. package/dist/harmony118.mjs.map +1 -1
  77. package/dist/harmony119.cjs +21 -21
  78. package/dist/harmony119.cjs.map +1 -1
  79. package/dist/harmony119.mjs +20 -20
  80. package/dist/harmony119.mjs.map +1 -1
  81. package/dist/harmony120.cjs +21 -6
  82. package/dist/harmony120.cjs.map +1 -1
  83. package/dist/harmony120.mjs +20 -5
  84. package/dist/harmony120.mjs.map +1 -1
  85. package/dist/harmony121.cjs +3 -12
  86. package/dist/harmony121.cjs.map +1 -1
  87. package/dist/harmony121.mjs +3 -12
  88. package/dist/harmony121.mjs.map +1 -1
  89. package/dist/harmony122.cjs +15 -99
  90. package/dist/harmony122.cjs.map +1 -1
  91. package/dist/harmony122.mjs +14 -81
  92. package/dist/harmony122.mjs.map +1 -1
  93. package/dist/harmony123.cjs +6 -11
  94. package/dist/harmony123.cjs.map +1 -1
  95. package/dist/harmony123.mjs +5 -10
  96. package/dist/harmony123.mjs.map +1 -1
  97. package/dist/harmony124.cjs +4 -4
  98. package/dist/harmony124.mjs +4 -4
  99. package/dist/harmony125.cjs +11 -6
  100. package/dist/harmony125.cjs.map +1 -1
  101. package/dist/harmony125.mjs +10 -5
  102. package/dist/harmony125.mjs.map +1 -1
  103. package/dist/harmony126.cjs +97 -10
  104. package/dist/harmony126.cjs.map +1 -1
  105. package/dist/harmony126.mjs +96 -9
  106. package/dist/harmony126.mjs.map +1 -1
  107. package/dist/harmony127.cjs +14 -7
  108. package/dist/harmony127.cjs.map +1 -1
  109. package/dist/harmony127.mjs +13 -6
  110. package/dist/harmony127.mjs.map +1 -1
  111. package/dist/harmony128.cjs +15 -10
  112. package/dist/harmony128.cjs.map +1 -1
  113. package/dist/harmony128.mjs +14 -9
  114. package/dist/harmony128.mjs.map +1 -1
  115. package/dist/harmony129.cjs +37 -25
  116. package/dist/harmony129.cjs.map +1 -1
  117. package/dist/harmony129.mjs +36 -24
  118. package/dist/harmony129.mjs.map +1 -1
  119. package/dist/harmony130.cjs +29 -7
  120. package/dist/harmony130.cjs.map +1 -1
  121. package/dist/harmony130.mjs +28 -6
  122. package/dist/harmony130.mjs.map +1 -1
  123. package/dist/harmony131.cjs +6 -9
  124. package/dist/harmony131.cjs.map +1 -1
  125. package/dist/harmony131.mjs +6 -9
  126. package/dist/harmony131.mjs.map +1 -1
  127. package/dist/harmony132.cjs +3 -3
  128. package/dist/harmony132.mjs +3 -3
  129. package/dist/harmony133.cjs +10 -97
  130. package/dist/harmony133.cjs.map +1 -1
  131. package/dist/harmony133.mjs +9 -96
  132. package/dist/harmony133.mjs.map +1 -1
  133. package/dist/harmony134.cjs +25 -14
  134. package/dist/harmony134.cjs.map +1 -1
  135. package/dist/harmony134.mjs +24 -13
  136. package/dist/harmony134.mjs.map +1 -1
  137. package/dist/harmony135.cjs +7 -15
  138. package/dist/harmony135.cjs.map +1 -1
  139. package/dist/harmony135.mjs +6 -14
  140. package/dist/harmony135.mjs.map +1 -1
  141. package/dist/harmony136.cjs +13 -37
  142. package/dist/harmony136.cjs.map +1 -1
  143. package/dist/harmony136.mjs +12 -36
  144. package/dist/harmony136.mjs.map +1 -1
  145. package/dist/harmony137.cjs +7 -29
  146. package/dist/harmony137.cjs.map +1 -1
  147. package/dist/harmony137.mjs +6 -28
  148. package/dist/harmony137.mjs.map +1 -1
  149. package/dist/harmony15.cjs +1 -1
  150. package/dist/harmony15.mjs +1 -1
  151. package/dist/harmony18.cjs +1 -1
  152. package/dist/harmony18.mjs +1 -1
  153. package/dist/harmony26.cjs +1 -1
  154. package/dist/harmony26.mjs +1 -1
  155. package/dist/harmony27.cjs +1 -1
  156. package/dist/harmony27.mjs +1 -1
  157. package/dist/harmony76.cjs +1 -1
  158. package/dist/harmony76.mjs +1 -1
  159. package/dist/harmony77.cjs +1 -1
  160. package/dist/harmony77.mjs +1 -1
  161. package/dist/harmony78.cjs +10 -10
  162. package/dist/harmony78.cjs.map +1 -1
  163. package/dist/harmony78.mjs +10 -10
  164. package/dist/harmony78.mjs.map +1 -1
  165. package/dist/harmony81.cjs +2 -2
  166. package/dist/harmony81.mjs +2 -2
  167. package/dist/harmony83.cjs +2 -2
  168. package/dist/harmony83.mjs +2 -2
  169. package/dist/harmony89.cjs +1 -1
  170. package/dist/harmony89.mjs +1 -1
  171. package/dist/harmony90.cjs +1 -1
  172. package/dist/harmony90.mjs +1 -1
  173. package/dist/harmony91.cjs +3 -11
  174. package/dist/harmony91.cjs.map +1 -1
  175. package/dist/harmony91.mjs +3 -11
  176. package/dist/harmony91.mjs.map +1 -1
  177. package/dist/harmony92.cjs +18 -21
  178. package/dist/harmony92.cjs.map +1 -1
  179. package/dist/harmony92.mjs +17 -20
  180. package/dist/harmony92.mjs.map +1 -1
  181. package/dist/harmony93.cjs +73 -9
  182. package/dist/harmony93.cjs.map +1 -1
  183. package/dist/harmony93.mjs +75 -11
  184. package/dist/harmony93.mjs.map +1 -1
  185. package/dist/harmony94.cjs +12 -12
  186. package/dist/harmony94.cjs.map +1 -1
  187. package/dist/harmony94.mjs +11 -11
  188. package/dist/harmony94.mjs.map +1 -1
  189. package/dist/harmony95.cjs +30 -3
  190. package/dist/harmony95.cjs.map +1 -1
  191. package/dist/harmony95.mjs +30 -3
  192. package/dist/harmony95.mjs.map +1 -1
  193. package/dist/harmony96.cjs +8 -17
  194. package/dist/harmony96.cjs.map +1 -1
  195. package/dist/harmony96.mjs +8 -17
  196. package/dist/harmony96.mjs.map +1 -1
  197. package/dist/harmony97.cjs +36 -65
  198. package/dist/harmony97.cjs.map +1 -1
  199. package/dist/harmony97.mjs +37 -66
  200. package/dist/harmony97.mjs.map +1 -1
  201. package/dist/harmony98.cjs +9 -12
  202. package/dist/harmony98.cjs.map +1 -1
  203. package/dist/harmony98.mjs +8 -11
  204. package/dist/harmony98.mjs.map +1 -1
  205. package/dist/harmony99.cjs +12 -30
  206. package/dist/harmony99.cjs.map +1 -1
  207. package/dist/harmony99.mjs +12 -30
  208. package/dist/harmony99.mjs.map +1 -1
  209. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"harmony117.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { isFreePlan } from '@utils'\nimport { canUpgradePlan } from '@utils/user/permissions'\nimport { UpgradeIcon } from '../UpgradeIcon/UpgradeIcon'\nimport styles from './UpgradeMenuItem.module.css'\n\n/**\n * A menu item component that displays upgrade call-to-action information.\n * Only renders when upgrade options should be shown (determined by context).\n *\n * The component displays different messages based on the team's current plan:\n * - For free plans: \"Your team is currently on the Free plan\"\n * - For trial plans: \"Free trial ends in X days\"\n *\n * Includes an upgrade icon and \"See upgrade options\" text, styled to draw attention\n * to the upgrade opportunity.\n *\n * @example\n * ```tsx\n * <UpgradeMenuItem href=\"/pricing\" />\n * ```\n *\n * @note This component must be used within a Sidebar Context\n */\n\ntype UpgradeMenuItemProps = {\n\thref: string\n}\n\nexport const UpgradeMenuItem = ({ href }: UpgradeMenuItemProps) => {\n\tconst {\n\t\tjwt,\n\t\tdata: { currentTeam },\n\t} = useSidebar()\n\n\tif (!jwt || !canUpgradePlan(jwt) || !currentTeam.result) {\n\t\treturn null\n\t}\n\n\tconst isOnFreePlan = isFreePlan(jwt.planId)\n\n\tconst trialDaysLeft = currentTeam.result.trialDaysLeft\n\n\tconst daysNoun = trialDaysLeft === 1 ? 'day' : 'days'\n\tconst ctaMessage = isOnFreePlan\n\t\t? 'Your team is currently on the Free plan'\n\t\t: `Free trial ends in ${trialDaysLeft} ${daysNoun}`\n\n\treturn (\n\t\t<MenuItem\n\t\t\tdata-testid=\"sidebar-upgrade-menu-item\"\n\t\t\thref={href}\n\t\t\tclassName={`flex-col gap-1 items-start ${styles.container}`}\n\t\t>\n\t\t\t<span className={styles.planCta}>{ctaMessage}</span>\n\t\t\t<div className={`flex-row items-center gap-1 ${styles.upgradeIconWrapper}`}>\n\t\t\t\t<UpgradeIcon />\n\t\t\t\t<span>See upgrade options</span>\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;AA8BO,MAAM,kBAAkB,CAAC,EAAE,WAAiC;AAC5D,QAAA;AAAA,IACL;AAAA,IACA,MAAM,EAAE,YAAY;AAAA,MACjB,WAAW;AAEX,MAAA,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC,YAAY,QAAQ;AACjD,WAAA;AAAA,EAAA;AAGF,QAAA,eAAe,WAAW,IAAI,MAAM;AAEpC,QAAA,gBAAgB,YAAY,OAAO;AAEnC,QAAA,WAAW,kBAAkB,IAAI,QAAQ;AAC/C,QAAM,aAAa,eAChB,4CACA,sBAAsB,aAAa,IAAI,QAAQ;AAGjD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ;AAAA,MACA,WAAW,8BAA8B,OAAO,SAAS;AAAA,MAEzD,UAAA;AAAA,QAAA,oBAAC,QAAK,EAAA,WAAW,OAAO,SAAU,UAAW,YAAA;AAAA,6BAC5C,OAAI,EAAA,WAAW,+BAA+B,OAAO,kBAAkB,IACvE,UAAA;AAAA,UAAA,oBAAC,aAAY,EAAA;AAAA,UACb,oBAAC,UAAK,UAAmB,sBAAA,CAAA;AAAA,QAAA,EAC1B,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
1
+ {"version":3,"file":"harmony117.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/TeamSwitch/TeamSwitch.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport type { SidebarTeam } from '@components/Sidebar/types'\nimport { TeamMenuItem } from '../TeamMenuItem/TeamMenuItem'\nimport styles from './TeamSwitch.module.css'\n\n/**\n * A component that displays a list of available teams for switching.\n * It automatically excludes the current team from the list and renders\n * nothing if there are no other teams available.\n *\n * Uses the Sidebar context to access the list of other teams and\n * renders each team as a TeamMenuItem with click functionality.\n *\n * @example\n * ```tsx\n * <TeamSwitch\n * onSwitchTeam={(team) => {\n * console.log(`Switching to team: ${team.name}`);\n * // Handle team switch logic\n * }}\n * />\n * ```\n *\n * @note This component must be used within a Sidebar Context\n */\n\ntype TeamSwitchProps = {\n\tonSwitchTeam: (team: SidebarTeam) => void\n}\n\nexport const TeamSwitch = ({ onSwitchTeam }: TeamSwitchProps) => {\n\tconst {\n\t\tdata: { otherTeams },\n\t} = useSidebar()\n\n\tif (otherTeams.result?.length === 0) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tdata-testid=\"sidebar-team-switch\"\n\t\t\tclassName={`flex-col items-stretch ${styles.teamsContainer}`}\n\t\t>\n\t\t\t{otherTeams.result?.map((team) => (\n\t\t\t\t<TeamMenuItem team={team} key={team.id} onClick={onSwitchTeam} hidePlanLabel />\n\t\t\t))}\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;;;AA8BO,MAAM,aAAa,CAAC,EAAE,mBAAoC;;AAC1D,QAAA;AAAA,IACL,MAAM,EAAE,WAAW;AAAA,MAChB,WAAW;AAEX,QAAA,gBAAW,WAAX,mBAAmB,YAAW,GAAG;AAC7B,WAAA;AAAA,EAAA;AAIP,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ,WAAW,0BAA0B,OAAO,cAAc;AAAA,MAEzD,WAAW,gBAAA,WAAA,mBAAQ,IAAI,CAAC,SACvB,oBAAA,cAAA,EAAa,MAA0B,SAAS,cAAc,eAAa,KAA7C,GAAA,KAAK,EAAyC;AAAA,IAC7E;AAAA,EACF;AAEF;"}
@@ -1,24 +1,39 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const menuContainer = "_menuContainer_1phdw_10";
4
- const profileButton = "_profileButton_1phdw_20";
5
- const profileImage = "_profileImage_1phdw_33";
6
- const profileImageHighlight = "_profileImageHighlight_1phdw_41";
7
- const profileImageUpgradeIcon = "_profileImageUpgradeIcon_1phdw_45";
8
- const userIconWrapper = "_userIconWrapper_1phdw_51";
9
- const styles = {
10
- menuContainer,
11
- profileButton,
12
- profileImage,
13
- profileImageHighlight,
14
- profileImageUpgradeIcon,
15
- userIconWrapper
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const useSidebar = require("./harmony94.cjs");
5
+ const louis = require("@lokalise/louis");
6
+ const plan = require("./harmony10.cjs");
7
+ const permissions = require("./harmony95.cjs");
8
+ const UpgradeIcon = require("./harmony120.cjs");
9
+ const UpgradeMenuItem_module = require("./harmony136.cjs");
10
+ const UpgradeMenuItem = ({ href }) => {
11
+ const {
12
+ jwt,
13
+ data: { currentTeam }
14
+ } = useSidebar.useSidebar();
15
+ if (!jwt || !permissions.canUpgradePlan(jwt) || !currentTeam.result) {
16
+ return null;
17
+ }
18
+ const isOnFreePlan = plan.isFreePlan(jwt.planId);
19
+ const trialDaysLeft = currentTeam.result.trialDaysLeft;
20
+ const daysNoun = trialDaysLeft === 1 ? "day" : "days";
21
+ const ctaMessage = isOnFreePlan ? "Your team is currently on the Free plan" : `Free trial ends in ${trialDaysLeft} ${daysNoun}`;
22
+ return /* @__PURE__ */ jsxRuntime.jsxs(
23
+ louis.MenuItem,
24
+ {
25
+ "data-testid": "sidebar-upgrade-menu-item",
26
+ href,
27
+ className: `flex-col gap-1 items-start ${UpgradeMenuItem_module.default.container}`,
28
+ children: [
29
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: UpgradeMenuItem_module.default.planCta, children: ctaMessage }),
30
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-row items-center gap-1 ${UpgradeMenuItem_module.default.upgradeIconWrapper}`, children: [
31
+ /* @__PURE__ */ jsxRuntime.jsx(UpgradeIcon.UpgradeIcon, {}),
32
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "See upgrade options" })
33
+ ] })
34
+ ]
35
+ }
36
+ );
16
37
  };
17
- exports.default = styles;
18
- exports.menuContainer = menuContainer;
19
- exports.profileButton = profileButton;
20
- exports.profileImage = profileImage;
21
- exports.profileImageHighlight = profileImageHighlight;
22
- exports.profileImageUpgradeIcon = profileImageUpgradeIcon;
23
- exports.userIconWrapper = userIconWrapper;
38
+ exports.UpgradeMenuItem = UpgradeMenuItem;
24
39
  //# sourceMappingURL=harmony118.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony118.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony118.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { isFreePlan } from '@utils'\nimport { canUpgradePlan } from '@utils/user/permissions'\nimport { UpgradeIcon } from '../UpgradeIcon/UpgradeIcon'\nimport styles from './UpgradeMenuItem.module.css'\n\n/**\n * A menu item component that displays upgrade call-to-action information.\n * Only renders when upgrade options should be shown (determined by context).\n *\n * The component displays different messages based on the team's current plan:\n * - For free plans: \"Your team is currently on the Free plan\"\n * - For trial plans: \"Free trial ends in X days\"\n *\n * Includes an upgrade icon and \"See upgrade options\" text, styled to draw attention\n * to the upgrade opportunity.\n *\n * @example\n * ```tsx\n * <UpgradeMenuItem href=\"/pricing\" />\n * ```\n *\n * @note This component must be used within a Sidebar Context\n */\n\ntype UpgradeMenuItemProps = {\n\thref: string\n}\n\nexport const UpgradeMenuItem = ({ href }: UpgradeMenuItemProps) => {\n\tconst {\n\t\tjwt,\n\t\tdata: { currentTeam },\n\t} = useSidebar()\n\n\tif (!jwt || !canUpgradePlan(jwt) || !currentTeam.result) {\n\t\treturn null\n\t}\n\n\tconst isOnFreePlan = isFreePlan(jwt.planId)\n\n\tconst trialDaysLeft = currentTeam.result.trialDaysLeft\n\n\tconst daysNoun = trialDaysLeft === 1 ? 'day' : 'days'\n\tconst ctaMessage = isOnFreePlan\n\t\t? 'Your team is currently on the Free plan'\n\t\t: `Free trial ends in ${trialDaysLeft} ${daysNoun}`\n\n\treturn (\n\t\t<MenuItem\n\t\t\tdata-testid=\"sidebar-upgrade-menu-item\"\n\t\t\thref={href}\n\t\t\tclassName={`flex-col gap-1 items-start ${styles.container}`}\n\t\t>\n\t\t\t<span className={styles.planCta}>{ctaMessage}</span>\n\t\t\t<div className={`flex-row items-center gap-1 ${styles.upgradeIconWrapper}`}>\n\t\t\t\t<UpgradeIcon />\n\t\t\t\t<span>See upgrade options</span>\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":["useSidebar","canUpgradePlan","isFreePlan","jsxs","MenuItem","styles","jsx","UpgradeIcon"],"mappings":";;;;;;;;;AA8BO,MAAM,kBAAkB,CAAC,EAAE,WAAiC;AAC5D,QAAA;AAAA,IACL;AAAA,IACA,MAAM,EAAE,YAAY;AAAA,MACjBA,sBAAW;AAEX,MAAA,CAAC,OAAO,CAACC,YAAA,eAAe,GAAG,KAAK,CAAC,YAAY,QAAQ;AACjD,WAAA;AAAA,EAAA;AAGF,QAAA,eAAeC,KAAAA,WAAW,IAAI,MAAM;AAEpC,QAAA,gBAAgB,YAAY,OAAO;AAEnC,QAAA,WAAW,kBAAkB,IAAI,QAAQ;AAC/C,QAAM,aAAa,eAChB,4CACA,sBAAsB,aAAa,IAAI,QAAQ;AAGjD,SAAAC,2BAAA;AAAA,IAACC,MAAA;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ;AAAA,MACA,WAAW,8BAA8BC,uBAAA,QAAO,SAAS;AAAA,MAEzD,UAAA;AAAA,QAAAC,2BAAA,IAAC,QAAK,EAAA,WAAWD,uBAAO,QAAA,SAAU,UAAW,YAAA;AAAA,wCAC5C,OAAI,EAAA,WAAW,+BAA+BA,+BAAO,kBAAkB,IACvE,UAAA;AAAA,UAAAC,2BAAA,IAACC,YAAY,aAAA,EAAA;AAAA,UACbD,2BAAAA,IAAC,UAAK,UAAmB,sBAAA,CAAA;AAAA,QAAA,EAC1B,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
@@ -1,24 +1,39 @@
1
- const menuContainer = "_menuContainer_1phdw_10";
2
- const profileButton = "_profileButton_1phdw_20";
3
- const profileImage = "_profileImage_1phdw_33";
4
- const profileImageHighlight = "_profileImageHighlight_1phdw_41";
5
- const profileImageUpgradeIcon = "_profileImageUpgradeIcon_1phdw_45";
6
- const userIconWrapper = "_userIconWrapper_1phdw_51";
7
- const styles = {
8
- menuContainer,
9
- profileButton,
10
- profileImage,
11
- profileImageHighlight,
12
- profileImageUpgradeIcon,
13
- userIconWrapper
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useSidebar } from "./harmony94.mjs";
3
+ import { MenuItem } from "@lokalise/louis";
4
+ import { isFreePlan } from "./harmony10.mjs";
5
+ import { canUpgradePlan } from "./harmony95.mjs";
6
+ import { UpgradeIcon } from "./harmony120.mjs";
7
+ import styles from "./harmony136.mjs";
8
+ const UpgradeMenuItem = ({ href }) => {
9
+ const {
10
+ jwt,
11
+ data: { currentTeam }
12
+ } = useSidebar();
13
+ if (!jwt || !canUpgradePlan(jwt) || !currentTeam.result) {
14
+ return null;
15
+ }
16
+ const isOnFreePlan = isFreePlan(jwt.planId);
17
+ const trialDaysLeft = currentTeam.result.trialDaysLeft;
18
+ const daysNoun = trialDaysLeft === 1 ? "day" : "days";
19
+ const ctaMessage = isOnFreePlan ? "Your team is currently on the Free plan" : `Free trial ends in ${trialDaysLeft} ${daysNoun}`;
20
+ return /* @__PURE__ */ jsxs(
21
+ MenuItem,
22
+ {
23
+ "data-testid": "sidebar-upgrade-menu-item",
24
+ href,
25
+ className: `flex-col gap-1 items-start ${styles.container}`,
26
+ children: [
27
+ /* @__PURE__ */ jsx("span", { className: styles.planCta, children: ctaMessage }),
28
+ /* @__PURE__ */ jsxs("div", { className: `flex-row items-center gap-1 ${styles.upgradeIconWrapper}`, children: [
29
+ /* @__PURE__ */ jsx(UpgradeIcon, {}),
30
+ /* @__PURE__ */ jsx("span", { children: "See upgrade options" })
31
+ ] })
32
+ ]
33
+ }
34
+ );
14
35
  };
15
36
  export {
16
- styles as default,
17
- menuContainer,
18
- profileButton,
19
- profileImage,
20
- profileImageHighlight,
21
- profileImageUpgradeIcon,
22
- userIconWrapper
37
+ UpgradeMenuItem
23
38
  };
24
39
  //# sourceMappingURL=harmony118.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony118.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony118.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeMenuItem/UpgradeMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { isFreePlan } from '@utils'\nimport { canUpgradePlan } from '@utils/user/permissions'\nimport { UpgradeIcon } from '../UpgradeIcon/UpgradeIcon'\nimport styles from './UpgradeMenuItem.module.css'\n\n/**\n * A menu item component that displays upgrade call-to-action information.\n * Only renders when upgrade options should be shown (determined by context).\n *\n * The component displays different messages based on the team's current plan:\n * - For free plans: \"Your team is currently on the Free plan\"\n * - For trial plans: \"Free trial ends in X days\"\n *\n * Includes an upgrade icon and \"See upgrade options\" text, styled to draw attention\n * to the upgrade opportunity.\n *\n * @example\n * ```tsx\n * <UpgradeMenuItem href=\"/pricing\" />\n * ```\n *\n * @note This component must be used within a Sidebar Context\n */\n\ntype UpgradeMenuItemProps = {\n\thref: string\n}\n\nexport const UpgradeMenuItem = ({ href }: UpgradeMenuItemProps) => {\n\tconst {\n\t\tjwt,\n\t\tdata: { currentTeam },\n\t} = useSidebar()\n\n\tif (!jwt || !canUpgradePlan(jwt) || !currentTeam.result) {\n\t\treturn null\n\t}\n\n\tconst isOnFreePlan = isFreePlan(jwt.planId)\n\n\tconst trialDaysLeft = currentTeam.result.trialDaysLeft\n\n\tconst daysNoun = trialDaysLeft === 1 ? 'day' : 'days'\n\tconst ctaMessage = isOnFreePlan\n\t\t? 'Your team is currently on the Free plan'\n\t\t: `Free trial ends in ${trialDaysLeft} ${daysNoun}`\n\n\treturn (\n\t\t<MenuItem\n\t\t\tdata-testid=\"sidebar-upgrade-menu-item\"\n\t\t\thref={href}\n\t\t\tclassName={`flex-col gap-1 items-start ${styles.container}`}\n\t\t>\n\t\t\t<span className={styles.planCta}>{ctaMessage}</span>\n\t\t\t<div className={`flex-row items-center gap-1 ${styles.upgradeIconWrapper}`}>\n\t\t\t\t<UpgradeIcon />\n\t\t\t\t<span>See upgrade options</span>\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;AA8BO,MAAM,kBAAkB,CAAC,EAAE,WAAiC;AAC5D,QAAA;AAAA,IACL;AAAA,IACA,MAAM,EAAE,YAAY;AAAA,MACjB,WAAW;AAEX,MAAA,CAAC,OAAO,CAAC,eAAe,GAAG,KAAK,CAAC,YAAY,QAAQ;AACjD,WAAA;AAAA,EAAA;AAGF,QAAA,eAAe,WAAW,IAAI,MAAM;AAEpC,QAAA,gBAAgB,YAAY,OAAO;AAEnC,QAAA,WAAW,kBAAkB,IAAI,QAAQ;AAC/C,QAAM,aAAa,eAChB,4CACA,sBAAsB,aAAa,IAAI,QAAQ;AAGjD,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,eAAY;AAAA,MACZ;AAAA,MACA,WAAW,8BAA8B,OAAO,SAAS;AAAA,MAEzD,UAAA;AAAA,QAAA,oBAAC,QAAK,EAAA,WAAW,OAAO,SAAU,UAAW,YAAA;AAAA,6BAC5C,OAAI,EAAA,WAAW,+BAA+B,OAAO,kBAAkB,IACvE,UAAA;AAAA,UAAA,oBAAC,aAAY,EAAA;AAAA,UACb,oBAAC,UAAK,UAAmB,sBAAA,CAAA;AAAA,QAAA,EAC1B,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
@@ -1,24 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const louis = require("@lokalise/louis");
5
- const clsx = require("./harmony74.cjs");
6
- const UpgradeIcon_module = require("./harmony132.cjs");
7
- const UpgradeIcon = ({ className = "" }) => {
8
- return /* @__PURE__ */ jsxRuntime.jsx(
9
- "div",
10
- {
11
- "aria-label": "Upgrade Icon",
12
- className: clsx.clsx(
13
- UpgradeIcon_module.default.iconContainer,
14
- "flex-row",
15
- "items-center",
16
- "justify-center",
17
- className
18
- ),
19
- children: /* @__PURE__ */ jsxRuntime.jsx(louis.CaretUpIcon, {})
20
- }
21
- );
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const menuContainer = "_menuContainer_1phdw_10";
4
+ const profileButton = "_profileButton_1phdw_20";
5
+ const profileImage = "_profileImage_1phdw_33";
6
+ const profileImageHighlight = "_profileImageHighlight_1phdw_41";
7
+ const profileImageUpgradeIcon = "_profileImageUpgradeIcon_1phdw_45";
8
+ const userIconWrapper = "_userIconWrapper_1phdw_51";
9
+ const styles = {
10
+ menuContainer,
11
+ profileButton,
12
+ profileImage,
13
+ profileImageHighlight,
14
+ profileImageUpgradeIcon,
15
+ userIconWrapper
22
16
  };
23
- exports.UpgradeIcon = UpgradeIcon;
17
+ exports.default = styles;
18
+ exports.menuContainer = menuContainer;
19
+ exports.profileButton = profileButton;
20
+ exports.profileImage = profileImage;
21
+ exports.profileImageHighlight = profileImageHighlight;
22
+ exports.profileImageUpgradeIcon = profileImageUpgradeIcon;
23
+ exports.userIconWrapper = userIconWrapper;
24
24
  //# sourceMappingURL=harmony119.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony119.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeIcon/UpgradeIcon.tsx"],"sourcesContent":["import { CaretUpIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './UpgradeIcon.module.css'\n\ntype UpgradeIconProps = {\n\tclassName?: string\n}\n\nexport const UpgradeIcon = ({ className = '' }: UpgradeIconProps) => {\n\treturn (\n\t\t<div\n\t\t\taria-label={'Upgrade Icon'}\n\t\t\tclassName={clsx(\n\t\t\t\tstyles.iconContainer,\n\t\t\t\t'flex-row',\n\t\t\t\t'items-center',\n\t\t\t\t'justify-center',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<CaretUpIcon />\n\t\t</div>\n\t)\n}\n"],"names":["jsx","clsx","styles","CaretUpIcon"],"mappings":";;;;;;AAQO,MAAM,cAAc,CAAC,EAAE,YAAY,SAA2B;AAEnE,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAWC,KAAA;AAAA,QACVC,mBAAAA,QAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MAEA,yCAACC,MAAAA,aAAY,CAAA,CAAA;AAAA,IAAA;AAAA,EACd;AAEF;;"}
1
+ {"version":3,"file":"harmony119.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,24 +1,24 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { CaretUpIcon } from "@lokalise/louis";
3
- import { clsx } from "./harmony74.mjs";
4
- import styles from "./harmony132.mjs";
5
- const UpgradeIcon = ({ className = "" }) => {
6
- return /* @__PURE__ */ jsx(
7
- "div",
8
- {
9
- "aria-label": "Upgrade Icon",
10
- className: clsx(
11
- styles.iconContainer,
12
- "flex-row",
13
- "items-center",
14
- "justify-center",
15
- className
16
- ),
17
- children: /* @__PURE__ */ jsx(CaretUpIcon, {})
18
- }
19
- );
1
+ const menuContainer = "_menuContainer_1phdw_10";
2
+ const profileButton = "_profileButton_1phdw_20";
3
+ const profileImage = "_profileImage_1phdw_33";
4
+ const profileImageHighlight = "_profileImageHighlight_1phdw_41";
5
+ const profileImageUpgradeIcon = "_profileImageUpgradeIcon_1phdw_45";
6
+ const userIconWrapper = "_userIconWrapper_1phdw_51";
7
+ const styles = {
8
+ menuContainer,
9
+ profileButton,
10
+ profileImage,
11
+ profileImageHighlight,
12
+ profileImageUpgradeIcon,
13
+ userIconWrapper
20
14
  };
21
15
  export {
22
- UpgradeIcon
16
+ styles as default,
17
+ menuContainer,
18
+ profileButton,
19
+ profileImage,
20
+ profileImageHighlight,
21
+ profileImageUpgradeIcon,
22
+ userIconWrapper
23
23
  };
24
24
  //# sourceMappingURL=harmony119.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony119.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeIcon/UpgradeIcon.tsx"],"sourcesContent":["import { CaretUpIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './UpgradeIcon.module.css'\n\ntype UpgradeIconProps = {\n\tclassName?: string\n}\n\nexport const UpgradeIcon = ({ className = '' }: UpgradeIconProps) => {\n\treturn (\n\t\t<div\n\t\t\taria-label={'Upgrade Icon'}\n\t\t\tclassName={clsx(\n\t\t\t\tstyles.iconContainer,\n\t\t\t\t'flex-row',\n\t\t\t\t'items-center',\n\t\t\t\t'justify-center',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<CaretUpIcon />\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,cAAc,CAAC,EAAE,YAAY,SAA2B;AAEnE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAW;AAAA,QACV,OAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MAEA,8BAAC,aAAY,CAAA,CAAA;AAAA,IAAA;AAAA,EACd;AAEF;"}
1
+ {"version":3,"file":"harmony119.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,9 +1,24 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const logoLink = "_logoLink_1baxb_1";
4
- const styles = {
5
- logoLink
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const louis = require("@lokalise/louis");
5
+ const clsx = require("./harmony74.cjs");
6
+ const UpgradeIcon_module = require("./harmony137.cjs");
7
+ const UpgradeIcon = ({ className = "" }) => {
8
+ return /* @__PURE__ */ jsxRuntime.jsx(
9
+ "div",
10
+ {
11
+ "aria-label": "Upgrade Icon",
12
+ className: clsx.clsx(
13
+ UpgradeIcon_module.default.iconContainer,
14
+ "flex-row",
15
+ "items-center",
16
+ "justify-center",
17
+ className
18
+ ),
19
+ children: /* @__PURE__ */ jsxRuntime.jsx(louis.CaretUpIcon, {})
20
+ }
21
+ );
6
22
  };
7
- exports.default = styles;
8
- exports.logoLink = logoLink;
23
+ exports.UpgradeIcon = UpgradeIcon;
9
24
  //# sourceMappingURL=harmony120.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony120.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"harmony120.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeIcon/UpgradeIcon.tsx"],"sourcesContent":["import { CaretUpIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './UpgradeIcon.module.css'\n\ntype UpgradeIconProps = {\n\tclassName?: string\n}\n\nexport const UpgradeIcon = ({ className = '' }: UpgradeIconProps) => {\n\treturn (\n\t\t<div\n\t\t\taria-label={'Upgrade Icon'}\n\t\t\tclassName={clsx(\n\t\t\t\tstyles.iconContainer,\n\t\t\t\t'flex-row',\n\t\t\t\t'items-center',\n\t\t\t\t'justify-center',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<CaretUpIcon />\n\t\t</div>\n\t)\n}\n"],"names":["jsx","clsx","styles","CaretUpIcon"],"mappings":";;;;;;AAQO,MAAM,cAAc,CAAC,EAAE,YAAY,SAA2B;AAEnE,SAAAA,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAWC,KAAA;AAAA,QACVC,mBAAAA,QAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MAEA,yCAACC,MAAAA,aAAY,CAAA,CAAA;AAAA,IAAA;AAAA,EACd;AAEF;;"}
@@ -1,9 +1,24 @@
1
- const logoLink = "_logoLink_1baxb_1";
2
- const styles = {
3
- logoLink
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { CaretUpIcon } from "@lokalise/louis";
3
+ import { clsx } from "./harmony74.mjs";
4
+ import styles from "./harmony137.mjs";
5
+ const UpgradeIcon = ({ className = "" }) => {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "aria-label": "Upgrade Icon",
10
+ className: clsx(
11
+ styles.iconContainer,
12
+ "flex-row",
13
+ "items-center",
14
+ "justify-center",
15
+ className
16
+ ),
17
+ children: /* @__PURE__ */ jsx(CaretUpIcon, {})
18
+ }
19
+ );
4
20
  };
5
21
  export {
6
- styles as default,
7
- logoLink
22
+ UpgradeIcon
8
23
  };
9
24
  //# sourceMappingURL=harmony120.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony120.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"harmony120.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/UpgradeIcon/UpgradeIcon.tsx"],"sourcesContent":["import { CaretUpIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport styles from './UpgradeIcon.module.css'\n\ntype UpgradeIconProps = {\n\tclassName?: string\n}\n\nexport const UpgradeIcon = ({ className = '' }: UpgradeIconProps) => {\n\treturn (\n\t\t<div\n\t\t\taria-label={'Upgrade Icon'}\n\t\t\tclassName={clsx(\n\t\t\t\tstyles.iconContainer,\n\t\t\t\t'flex-row',\n\t\t\t\t'items-center',\n\t\t\t\t'justify-center',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<CaretUpIcon />\n\t\t</div>\n\t)\n}\n"],"names":[],"mappings":";;;;AAQO,MAAM,cAAc,CAAC,EAAE,YAAY,SAA2B;AAEnE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,cAAY;AAAA,MACZ,WAAW;AAAA,QACV,OAAO;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACD;AAAA,MAEA,8BAAC,aAAY,CAAA,CAAA;AAAA,IAAA;AAAA,EACd;AAEF;"}
@@ -1,18 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const shortcutMenu = "_shortcutMenu_ujdmb_1";
4
- const shortcutLabel = "_shortcutLabel_ujdmb_5";
5
- const dropdownButton = "_dropdownButton_ujdmb_12";
6
- const dropdownButtonActive = "_dropdownButtonActive_ujdmb_30";
3
+ const logoLink = "_logoLink_1baxb_1";
7
4
  const styles = {
8
- shortcutMenu,
9
- shortcutLabel,
10
- dropdownButton,
11
- dropdownButtonActive
5
+ logoLink
12
6
  };
13
7
  exports.default = styles;
14
- exports.dropdownButton = dropdownButton;
15
- exports.dropdownButtonActive = dropdownButtonActive;
16
- exports.shortcutLabel = shortcutLabel;
17
- exports.shortcutMenu = shortcutMenu;
8
+ exports.logoLink = logoLink;
18
9
  //# sourceMappingURL=harmony121.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony121.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony121.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,18 +1,9 @@
1
- const shortcutMenu = "_shortcutMenu_ujdmb_1";
2
- const shortcutLabel = "_shortcutLabel_ujdmb_5";
3
- const dropdownButton = "_dropdownButton_ujdmb_12";
4
- const dropdownButtonActive = "_dropdownButtonActive_ujdmb_30";
1
+ const logoLink = "_logoLink_1baxb_1";
5
2
  const styles = {
6
- shortcutMenu,
7
- shortcutLabel,
8
- dropdownButton,
9
- dropdownButtonActive
3
+ logoLink
10
4
  };
11
5
  export {
12
6
  styles as default,
13
- dropdownButton,
14
- dropdownButtonActive,
15
- shortcutLabel,
16
- shortcutMenu
7
+ logoLink
17
8
  };
18
9
  //# sourceMappingURL=harmony121.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony121.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"harmony121.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,102 +1,18 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const debounce = require("./harmony124.cjs");
5
- const throttle = require("./harmony125.cjs");
6
- function _interopNamespaceDefault(e) {
7
- const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
8
- if (e) {
9
- for (const k in e) {
10
- if (k !== "default") {
11
- const d = Object.getOwnPropertyDescriptor(e, k);
12
- Object.defineProperty(n, k, d.get ? d : {
13
- enumerable: true,
14
- get: () => e[k]
15
- });
16
- }
17
- }
18
- }
19
- n.default = e;
20
- return Object.freeze(n);
21
- }
22
- const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
23
- const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
24
- switch (refreshMode) {
25
- case "debounce":
26
- return debounce.default(resizeCallback, refreshRate, refreshOptions);
27
- case "throttle":
28
- return throttle.default(resizeCallback, refreshRate, refreshOptions);
29
- default:
30
- return resizeCallback;
31
- }
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const shortcutMenu = "_shortcutMenu_ujdmb_1";
4
+ const shortcutLabel = "_shortcutLabel_ujdmb_5";
5
+ const dropdownButton = "_dropdownButton_ujdmb_12";
6
+ const dropdownButtonActive = "_dropdownButtonActive_ujdmb_30";
7
+ const styles = {
8
+ shortcutMenu,
9
+ shortcutLabel,
10
+ dropdownButton,
11
+ dropdownButtonActive
32
12
  };
33
- const useCallbackRef = (
34
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
35
- (callback) => {
36
- const callbackRef = React__namespace.useRef(callback);
37
- React__namespace.useEffect(() => {
38
- callbackRef.current = callback;
39
- });
40
- return React__namespace.useMemo(() => (...args) => {
41
- var _a;
42
- return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
43
- }, []);
44
- }
45
- );
46
- const useRefProxy = (
47
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
- (targetRef) => {
49
- const [refElement, setRefElement] = React__namespace.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
50
- if (targetRef) {
51
- setTimeout(() => {
52
- if (targetRef.current !== refElement) {
53
- setRefElement(targetRef.current);
54
- }
55
- }, 0);
56
- }
57
- const refProxy = React__namespace.useMemo(() => new Proxy((node) => {
58
- if (node !== refElement) {
59
- setRefElement(node);
60
- }
61
- }, {
62
- get(target, prop) {
63
- if (prop === "current") {
64
- return refElement;
65
- }
66
- return target[prop];
67
- },
68
- set(target, prop, value) {
69
- if (prop === "current") {
70
- setRefElement(value);
71
- } else {
72
- target[prop] = value;
73
- }
74
- return true;
75
- }
76
- }), [refElement]);
77
- return { refProxy, refElement, setRefElement };
78
- }
79
- );
80
- const getDimensions = (entry, box) => {
81
- if (box === "border-box") {
82
- return {
83
- width: entry.borderBoxSize[0].inlineSize,
84
- height: entry.borderBoxSize[0].blockSize
85
- };
86
- }
87
- if (box === "content-box") {
88
- return {
89
- width: entry.contentBoxSize[0].inlineSize,
90
- height: entry.contentBoxSize[0].blockSize
91
- };
92
- }
93
- return {
94
- width: entry.contentRect.width,
95
- height: entry.contentRect.height
96
- };
97
- };
98
- exports.getDimensions = getDimensions;
99
- exports.patchResizeCallback = patchResizeCallback;
100
- exports.useCallbackRef = useCallbackRef;
101
- exports.useRefProxy = useRefProxy;
13
+ exports.default = styles;
14
+ exports.dropdownButton = dropdownButton;
15
+ exports.dropdownButtonActive = dropdownButtonActive;
16
+ exports.shortcutLabel = shortcutLabel;
17
+ exports.shortcutMenu = shortcutMenu;
102
18
  //# sourceMappingURL=harmony122.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony122.cjs","sources":["../node_modules/react-resize-detector/build/utils.js"],"sourcesContent":["import * as React from 'react';\nimport debounce from 'lodash/debounce.js';\nimport throttle from 'lodash/throttle.js';\n\n/**\n * Wraps the resize callback with a lodash debounce / throttle based on the refresh mode\n */\nconst patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {\n switch (refreshMode) {\n case 'debounce':\n return debounce(resizeCallback, refreshRate, refreshOptions);\n case 'throttle':\n return throttle(resizeCallback, refreshRate, refreshOptions);\n default:\n return resizeCallback;\n }\n};\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */\nconst useCallbackRef = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(callback) => {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => ((...args) => { var _a; return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args); }), []);\n};\n/** `useRef` hook doesn't handle conditional rendering or dynamic ref changes.\n * This hook creates a proxy that ensures that `refElement` is updated whenever the ref is changed. */\nconst useRefProxy = \n// eslint-disable-next-line @typescript-eslint/no-explicit-any\n(targetRef) => {\n // we are going to use this ref to store the last element that was passed to the hook\n const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);\n // if targetRef is passed, we need to update the refElement\n // we have to use setTimeout because ref get assigned after the hook is called\n // in the future releases we are going to remove targetRef and force users to use ref returned by the hook\n if (targetRef) {\n setTimeout(() => {\n if (targetRef.current !== refElement) {\n setRefElement(targetRef.current);\n }\n }, 0);\n }\n // this is a memo that will be called every time the ref is changed\n // This proxy will properly call setState either when the ref is called as a function or when `.current` is set\n // we call setState inside to trigger rerender\n const refProxy = React.useMemo(() => new Proxy((node) => {\n if (node !== refElement) {\n setRefElement(node);\n }\n }, {\n get(target, prop) {\n if (prop === 'current') {\n return refElement;\n }\n return target[prop];\n },\n set(target, prop, value) {\n if (prop === 'current') {\n setRefElement(value);\n }\n else {\n target[prop] = value;\n }\n return true;\n },\n }), [refElement]);\n return { refProxy, refElement, setRefElement };\n};\n/** Calculates the dimensions of the element based on the current box model.\n * @see https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/The_box_model\n */\nconst getDimensions = (entry, box) => {\n // Value\t Border\t Padding\t Inner Content\n // ---------------------------------------------------\n // 'border-box'\t Yes\t Yes\t Yes\n // 'content-box'\t No\t No\t Yes\n // undefined No\t No?\t Yes\n if (box === 'border-box') {\n return {\n width: entry.borderBoxSize[0].inlineSize,\n height: entry.borderBoxSize[0].blockSize,\n };\n }\n if (box === 'content-box') {\n return {\n width: entry.contentBoxSize[0].inlineSize,\n height: entry.contentBoxSize[0].blockSize,\n };\n }\n return {\n width: entry.contentRect.width,\n height: entry.contentRect.height,\n };\n};\n\nexport { getDimensions, patchResizeCallback, useCallbackRef, useRefProxy };\n//# sourceMappingURL=utils.js.map\n"],"names":["debounce","throttle","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAOK,MAAC,sBAAsB,CAAC,gBAAgB,aAAa,aAAa,mBAAmB;AACtF,UAAQ,aAAW;AAAA,IACf,KAAK;AACD,aAAOA,iBAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D,KAAK;AACD,aAAOC,iBAAS,gBAAgB,aAAa,cAAc;AAAA,IAC/D;AACI,aAAO;AAAA,EACnB;AACA;AAKK,MAAC;AAAA;AAAA,EAEN,CAAC,aAAa;AACV,UAAM,cAAcC,iBAAM,OAAO,QAAQ;AACzCA,qBAAM,UAAU,MAAM;AAClB,kBAAY,UAAU;AAAA,IAC9B,CAAK;AACD,WAAOA,iBAAM,QAAQ,MAAO,IAAI,SAAS;AAAE,UAAI;AAAI,cAAQ,KAAK,YAAY,aAAa,QAAQ,OAAO,SAAS,SAAS,GAAG,KAAK,aAAa,GAAG,IAAI;AAAA,IAAI,GAAG,CAAA,CAAE;AAAA,EACnK;AAAA;AAGK,MAAC;AAAA;AAAA,EAEN,CAAC,cAAc;AAEX,UAAM,CAAC,YAAY,aAAa,IAAIA,iBAAM,UAAU,cAAc,QAAQ,cAAc,SAAS,SAAS,UAAU,YAAY,IAAI;AAIpI,QAAI,WAAW;AACX,iBAAW,MAAM;AACb,YAAI,UAAU,YAAY,YAAY;AAClC,wBAAc,UAAU,OAAO;AAAA,QAC/C;AAAA,MACS,GAAE,CAAC;AAAA,IACZ;AAII,UAAM,WAAWA,iBAAM,QAAQ,MAAM,IAAI,MAAM,CAAC,SAAS;AACrD,UAAI,SAAS,YAAY;AACrB,sBAAc,IAAI;AAAA,MAC9B;AAAA,IACA,GAAO;AAAA,MACC,IAAI,QAAQ,MAAM;AACd,YAAI,SAAS,WAAW;AACpB,iBAAO;AAAA,QACvB;AACY,eAAO,OAAO,IAAI;AAAA,MACrB;AAAA,MACD,IAAI,QAAQ,MAAM,OAAO;AACrB,YAAI,SAAS,WAAW;AACpB,wBAAc,KAAK;AAAA,QACnC,OACiB;AACD,iBAAO,IAAI,IAAI;AAAA,QAC/B;AACY,eAAO;AAAA,MACV;AAAA,IACT,CAAK,GAAG,CAAC,UAAU,CAAC;AAChB,WAAO,EAAE,UAAU,YAAY,cAAe;AAAA,EAClD;AAAA;AAIK,MAAC,gBAAgB,CAAC,OAAO,QAAQ;AAMlC,MAAI,QAAQ,cAAc;AACtB,WAAO;AAAA,MACH,OAAO,MAAM,cAAc,CAAC,EAAE;AAAA,MAC9B,QAAQ,MAAM,cAAc,CAAC,EAAE;AAAA,IAClC;AAAA,EACT;AACI,MAAI,QAAQ,eAAe;AACvB,WAAO;AAAA,MACH,OAAO,MAAM,eAAe,CAAC,EAAE;AAAA,MAC/B,QAAQ,MAAM,eAAe,CAAC,EAAE;AAAA,IACnC;AAAA,EACT;AACI,SAAO;AAAA,IACH,OAAO,MAAM,YAAY;AAAA,IACzB,QAAQ,MAAM,YAAY;AAAA,EAC7B;AACL;;;;;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"harmony122.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1,85 +1,18 @@
1
- import * as React from "react";
2
- import debounce from "./harmony124.mjs";
3
- import throttle from "./harmony125.mjs";
4
- const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
5
- switch (refreshMode) {
6
- case "debounce":
7
- return debounce(resizeCallback, refreshRate, refreshOptions);
8
- case "throttle":
9
- return throttle(resizeCallback, refreshRate, refreshOptions);
10
- default:
11
- return resizeCallback;
12
- }
13
- };
14
- const useCallbackRef = (
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- (callback) => {
17
- const callbackRef = React.useRef(callback);
18
- React.useEffect(() => {
19
- callbackRef.current = callback;
20
- });
21
- return React.useMemo(() => (...args) => {
22
- var _a;
23
- return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
24
- }, []);
25
- }
26
- );
27
- const useRefProxy = (
28
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
29
- (targetRef) => {
30
- const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
31
- if (targetRef) {
32
- setTimeout(() => {
33
- if (targetRef.current !== refElement) {
34
- setRefElement(targetRef.current);
35
- }
36
- }, 0);
37
- }
38
- const refProxy = React.useMemo(() => new Proxy((node) => {
39
- if (node !== refElement) {
40
- setRefElement(node);
41
- }
42
- }, {
43
- get(target, prop) {
44
- if (prop === "current") {
45
- return refElement;
46
- }
47
- return target[prop];
48
- },
49
- set(target, prop, value) {
50
- if (prop === "current") {
51
- setRefElement(value);
52
- } else {
53
- target[prop] = value;
54
- }
55
- return true;
56
- }
57
- }), [refElement]);
58
- return { refProxy, refElement, setRefElement };
59
- }
60
- );
61
- const getDimensions = (entry, box) => {
62
- if (box === "border-box") {
63
- return {
64
- width: entry.borderBoxSize[0].inlineSize,
65
- height: entry.borderBoxSize[0].blockSize
66
- };
67
- }
68
- if (box === "content-box") {
69
- return {
70
- width: entry.contentBoxSize[0].inlineSize,
71
- height: entry.contentBoxSize[0].blockSize
72
- };
73
- }
74
- return {
75
- width: entry.contentRect.width,
76
- height: entry.contentRect.height
77
- };
1
+ const shortcutMenu = "_shortcutMenu_ujdmb_1";
2
+ const shortcutLabel = "_shortcutLabel_ujdmb_5";
3
+ const dropdownButton = "_dropdownButton_ujdmb_12";
4
+ const dropdownButtonActive = "_dropdownButtonActive_ujdmb_30";
5
+ const styles = {
6
+ shortcutMenu,
7
+ shortcutLabel,
8
+ dropdownButton,
9
+ dropdownButtonActive
78
10
  };
79
11
  export {
80
- getDimensions,
81
- patchResizeCallback,
82
- useCallbackRef,
83
- useRefProxy
12
+ styles as default,
13
+ dropdownButton,
14
+ dropdownButtonActive,
15
+ shortcutLabel,
16
+ shortcutMenu
84
17
  };
85
18
  //# sourceMappingURL=harmony122.mjs.map