aq-fe-framework 0.1.434 → 0.1.436

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.
@@ -599,7 +599,14 @@ function MyRichTextEditor(props) {
599
599
 
600
600
  // src/core/input/MySelect.tsx
601
601
  import { Loader, Select } from "@mantine/core";
602
+ import React from "react";
602
603
  import { jsx as jsx11 } from "react/jsx-runtime";
604
+ function extractTextFromReactNode(node) {
605
+ if (typeof node === "string" || typeof node === "number") return String(node);
606
+ if (Array.isArray(node)) return node.map(extractTextFromReactNode).join(" ");
607
+ if (React.isValidElement(node)) return extractTextFromReactNode(node.props.children);
608
+ return "";
609
+ }
603
610
  function MySelect(_a) {
604
611
  var _b = _a, { label, data, isLoading, isError } = _b, rest = __objRest(_b, ["label", "data", "isLoading", "isError"]);
605
612
  let placeholder = "";
@@ -608,7 +615,8 @@ function MySelect(_a) {
608
615
  } else if (isLoading) {
609
616
  placeholder = "\u0110ang t\u1EA3i...";
610
617
  } else if (label) {
611
- placeholder = `Ch\u1ECDn ${label.toLowerCase()}`;
618
+ const plainTextLabel = extractTextFromReactNode(label).toLowerCase();
619
+ placeholder = `Ch\u1ECDn ${plainTextLabel}`;
612
620
  }
613
621
  return /* @__PURE__ */ jsx11(
614
622
  Select,
@@ -95,7 +95,7 @@ interface MyRichTextEditorProps {
95
95
  declare function MyRichTextEditor(props: MyRichTextEditorProps): react_jsx_runtime.JSX.Element;
96
96
 
97
97
  interface MySelectProps extends SelectProps {
98
- label?: string;
98
+ label?: ReactNode;
99
99
  data?: Array<string | {
100
100
  value: string;
101
101
  label: string;
@@ -13,7 +13,7 @@ import {
13
13
  MyStatsCard,
14
14
  MyTextInput,
15
15
  MyWeeklySessionSchedulerPicker
16
- } from "../chunk-A7TLL23K.mjs";
16
+ } from "../chunk-QK34DK3N.mjs";
17
17
  import "../chunk-RZBHPPQT.mjs";
18
18
  import "../chunk-GFEMKKFH.mjs";
19
19
  import "../chunk-OMJJAHOC.mjs";
@@ -42,7 +42,7 @@ import {
42
42
  MyButton as MyButton2,
43
43
  MyDataTableSelectOne,
44
44
  MyTextInput as MyTextInput2
45
- } from "../chunk-A7TLL23K.mjs";
45
+ } from "../chunk-QK34DK3N.mjs";
46
46
  import {
47
47
  MyDataTable,
48
48
  MyFlexColumn,
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "types": "./dist/columns/index.d.mts"
43
43
  }
44
44
  },
45
- "version": "0.1.434",
45
+ "version": "0.1.436",
46
46
  "private": false,
47
47
  "files": [
48
48
  "dist"