@apexcura/ui-components 0.0.8-Beta6 → 0.0.8-Beta7

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/dist/index.d.mts CHANGED
@@ -61,7 +61,7 @@ declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
61
61
 
62
62
  declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
63
63
 
64
- declare const MultipleSelectElement: () => React$1.JSX.Element;
64
+ declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
65
65
 
66
66
  declare const ButtonElement: () => React$1.JSX.Element;
67
67
 
package/dist/index.d.ts CHANGED
@@ -61,7 +61,7 @@ declare const CkEditor: (props: ElementExecuterProps) => React$1.JSX.Element;
61
61
 
62
62
  declare const SingleSelectElement: (props: ElementType) => React$1.JSX.Element;
63
63
 
64
- declare const MultipleSelectElement: () => React$1.JSX.Element;
64
+ declare const MultipleSelectElement: (props: ElementType) => React$1.JSX.Element;
65
65
 
66
66
  declare const ButtonElement: () => React$1.JSX.Element;
67
67
 
package/dist/index.js CHANGED
@@ -327,46 +327,17 @@ var import_antd9 = require("antd");
327
327
  var handleChange = (value) => {
328
328
  console.log(`selected ${value}`);
329
329
  };
330
- var options = [
330
+ var MultipleSelectElement = (props) => /* @__PURE__ */ import_react11.default.createElement(
331
+ import_antd9.Select,
331
332
  {
332
- label: "China",
333
- value: "china",
334
- emoji: "\u{1F1E8}\u{1F1F3}",
335
- desc: "China (\u4E2D\u56FD)"
336
- },
337
- {
338
- label: "USA",
339
- value: "usa",
340
- emoji: "\u{1F1FA}\u{1F1F8}",
341
- desc: "USA (\u7F8E\u56FD)"
342
- },
343
- {
344
- label: "Japan",
345
- value: "japan",
346
- emoji: "\u{1F1EF}\u{1F1F5}",
347
- desc: "Japan (\u65E5\u672C)"
348
- },
349
- {
350
- label: "Korea",
351
- value: "korea",
352
- emoji: "\u{1F1F0}\u{1F1F7}",
353
- desc: "Korea (\u97E9\u56FD)"
333
+ mode: "multiple",
334
+ style: { width: "100%" },
335
+ placeholder: "select one country",
336
+ defaultValue: ["china"],
337
+ onChange: handleChange,
338
+ options: props.options.map((eachOption) => ({ label: String(eachOption.title), value: String(eachOption.title) }))
354
339
  }
355
- ];
356
- var MultipleSelectElement = () => {
357
- return /* @__PURE__ */ import_react11.default.createElement(
358
- import_antd9.Select,
359
- {
360
- mode: "multiple",
361
- style: { width: "100%" },
362
- placeholder: "select one country",
363
- defaultValue: ["china"],
364
- onChange: handleChange,
365
- options,
366
- optionRender: (option) => /* @__PURE__ */ import_react11.default.createElement(import_antd9.Space, null, /* @__PURE__ */ import_react11.default.createElement("span", { role: "img", "aria-label": option.data.label }, option.data.emoji), option.data.desc)
367
- }
368
- );
369
- };
340
+ );
370
341
 
371
342
  // src/Components/Button.tsx
372
343
  var import_react12 = __toESM(require("react"));
package/dist/index.mjs CHANGED
@@ -277,50 +277,21 @@ var SingleSelectElement = (props) => {
277
277
 
278
278
  // src/Components/Select/MultipleSelectElement.tsx
279
279
  import React10 from "react";
280
- import { Select as Select3, Space as Space2 } from "antd";
280
+ import { Select as Select3 } from "antd";
281
281
  var handleChange = (value) => {
282
282
  console.log(`selected ${value}`);
283
283
  };
284
- var options = [
284
+ var MultipleSelectElement = (props) => /* @__PURE__ */ React10.createElement(
285
+ Select3,
285
286
  {
286
- label: "China",
287
- value: "china",
288
- emoji: "\u{1F1E8}\u{1F1F3}",
289
- desc: "China (\u4E2D\u56FD)"
290
- },
291
- {
292
- label: "USA",
293
- value: "usa",
294
- emoji: "\u{1F1FA}\u{1F1F8}",
295
- desc: "USA (\u7F8E\u56FD)"
296
- },
297
- {
298
- label: "Japan",
299
- value: "japan",
300
- emoji: "\u{1F1EF}\u{1F1F5}",
301
- desc: "Japan (\u65E5\u672C)"
302
- },
303
- {
304
- label: "Korea",
305
- value: "korea",
306
- emoji: "\u{1F1F0}\u{1F1F7}",
307
- desc: "Korea (\u97E9\u56FD)"
287
+ mode: "multiple",
288
+ style: { width: "100%" },
289
+ placeholder: "select one country",
290
+ defaultValue: ["china"],
291
+ onChange: handleChange,
292
+ options: props.options.map((eachOption) => ({ label: String(eachOption.title), value: String(eachOption.title) }))
308
293
  }
309
- ];
310
- var MultipleSelectElement = () => {
311
- return /* @__PURE__ */ React10.createElement(
312
- Select3,
313
- {
314
- mode: "multiple",
315
- style: { width: "100%" },
316
- placeholder: "select one country",
317
- defaultValue: ["china"],
318
- onChange: handleChange,
319
- options,
320
- optionRender: (option) => /* @__PURE__ */ React10.createElement(Space2, null, /* @__PURE__ */ React10.createElement("span", { role: "img", "aria-label": option.data.label }, option.data.emoji), option.data.desc)
321
- }
322
- );
323
- };
294
+ );
324
295
 
325
296
  // src/Components/Button.tsx
326
297
  import React11 from "react";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.8-Beta6",
3
+ "version": "0.0.8-Beta7",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",