@nualang/nualang-ui-components 0.1.1385 → 0.1.1386

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.
@@ -168,10 +168,11 @@ function PhraseGroupGame({
168
168
  const theme = useTheme();
169
169
  const hasKeyboard = gameId === "translation";
170
170
  const hasWordBank = gameId === "translation" || gameId === "listening";
171
- const isDefinitionsDisabled = gameId === "meaning" && isDefinitionsEmpty && !isPhrasesEmpty;
171
+ const isDefinitionsDisabled = gameId.includes("meaning") && isDefinitionsEmpty && !isPhrasesEmpty;
172
+ const isDefinitionsHidden = gameId.includes("meaning") && isDefinitionsEmpty && !isPhrasesEmpty && !isCreator;
172
173
  const isDisabled = isPhrasesEmpty || isDefinitionsDisabled || isGameHidden && !isCreator;
173
174
  const disabledTooltip = isPhrasesEmpty ? t("topic_no_phrases") : isDefinitionsDisabled ? t("meaning_no_definitions") : "";
174
- return /*#__PURE__*/_jsx(Tooltip, {
175
+ return !isDefinitionsHidden && /*#__PURE__*/_jsx(Tooltip, {
175
176
  title: disabledTooltip,
176
177
  placement: "top",
177
178
  children: /*#__PURE__*/_jsx("span", {
@@ -179,7 +180,7 @@ function PhraseGroupGame({
179
180
  alignItems: "center",
180
181
  disabled: isDisabled,
181
182
  onClick: () => {
182
- const canPlay = !isPhrasesEmpty && !isDefinitionsDisabled && (!isGameHidden || isCreator);
183
+ const canPlay = !isDisabled;
183
184
  if (canPlay) {
184
185
  handleSelectPhraseGroupGame(gameId);
185
186
  }
@@ -163,7 +163,6 @@ export default function UpdatePhraseList({
163
163
  variant: "outlined",
164
164
  multiline: true,
165
165
  fullWidth: true,
166
- required: true,
167
166
  maxLength: 1000
168
167
  })
169
168
  }), /*#__PURE__*/_jsx(Grid, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nualang/nualang-ui-components",
3
- "version": "0.1.1385",
3
+ "version": "0.1.1386",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "files": [