odaptos_design_system 2.0.342 → 2.0.344

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.cjs CHANGED
@@ -312,12 +312,105 @@ var Title_modules_default = {
312
312
  };
313
313
  style_inject_es_default(css_248z$82);
314
314
 
315
+ //#endregion
316
+ //#region src/Atoms/Typography/renderInlineMarkdown.tsx
317
+ /**
318
+ * Minimal inline markdown renderer for typography components.
319
+ * Supports: **bold**, *italic*, __underline__ (or <u>underline</u>), `code`, line breaks, and simple lists.
320
+ */
321
+ const renderInlineMarkdown = (rawText) => {
322
+ if (!rawText) return rawText;
323
+ const renderCode = (text) => {
324
+ return text.split(/`([^`]+)`/g).map((part, index) => {
325
+ if (!(index % 2 === 1)) return part;
326
+ return /* @__PURE__ */ react.default.createElement("code", { key: `code-${index}` }, part);
327
+ });
328
+ };
329
+ const renderStrongAndEm = (nodes) => {
330
+ const renderHtmlUnderline = (text) => {
331
+ return text.split(/<u>(.*?)<\/u>/g).map((part, index) => {
332
+ if (!(index % 2 === 1)) return part;
333
+ return /* @__PURE__ */ react.default.createElement("u", { key: `u-html-${index}` }, part);
334
+ });
335
+ };
336
+ const renderUnderline = (text) => {
337
+ return text.split(/__([^_]+)__/g).map((part, index) => {
338
+ if (!(index % 2 === 1)) return part;
339
+ return /* @__PURE__ */ react.default.createElement("u", { key: `u-${index}` }, part);
340
+ });
341
+ };
342
+ const renderStrong = (text) => {
343
+ return text.split(/\*\*([^*]+)\*\*/g).map((part, index) => {
344
+ if (!(index % 2 === 1)) return part;
345
+ return /* @__PURE__ */ react.default.createElement("strong", { key: `strong-${index}` }, part);
346
+ });
347
+ };
348
+ const renderEm = (text) => {
349
+ return text.split(/\*([^*]+)\*/g).map((part, index) => {
350
+ if (!(index % 2 === 1)) return part;
351
+ return /* @__PURE__ */ react.default.createElement("em", { key: `em-${index}` }, part);
352
+ });
353
+ };
354
+ return nodes.flatMap((node) => {
355
+ if (typeof node !== "string") return [node];
356
+ return renderHtmlUnderline(node).flatMap((htmlUnderlineNode) => {
357
+ if (typeof htmlUnderlineNode !== "string") return [htmlUnderlineNode];
358
+ return renderUnderline(htmlUnderlineNode);
359
+ }).flatMap((underlineNode) => {
360
+ if (typeof underlineNode !== "string") return [underlineNode];
361
+ return renderStrong(underlineNode);
362
+ }).flatMap((strongNode) => {
363
+ if (typeof strongNode !== "string") return [strongNode];
364
+ return renderEm(strongNode);
365
+ });
366
+ });
367
+ };
368
+ const renderInline = (text) => {
369
+ const codeNodes = renderCode(text);
370
+ return renderStrongAndEm(codeNodes);
371
+ };
372
+ const lines = rawText.split("\n");
373
+ const blocks = [];
374
+ let i = 0;
375
+ while (i < lines.length) {
376
+ const line = lines[i] ?? "";
377
+ const unorderedMatch = line.match(/^\s*[-*]\s+(.*)$/);
378
+ const orderedMatch = line.match(/^\s*(\d+)\.\s+(.*)$/);
379
+ if (unorderedMatch) {
380
+ const items = [];
381
+ while (i < lines.length) {
382
+ const match = (lines[i] ?? "").match(/^\s*[-*]\s+(.*)$/);
383
+ if (!match) break;
384
+ items.push(match[1]);
385
+ i += 1;
386
+ }
387
+ blocks.push(/* @__PURE__ */ react.default.createElement("ul", { key: `ul-${blocks.length}` }, items.map((item, index) => /* @__PURE__ */ react.default.createElement("li", { key: `ul-li-${index}` }, renderInline(item)))));
388
+ continue;
389
+ }
390
+ if (orderedMatch) {
391
+ const items = [];
392
+ while (i < lines.length) {
393
+ const match = (lines[i] ?? "").match(/^\s*\d+\.\s+(.*)$/);
394
+ if (!match) break;
395
+ items.push(match[1]);
396
+ i += 1;
397
+ }
398
+ blocks.push(/* @__PURE__ */ react.default.createElement("ol", { key: `ol-${blocks.length}` }, items.map((item, index) => /* @__PURE__ */ react.default.createElement("li", { key: `ol-li-${index}` }, renderInline(item)))));
399
+ continue;
400
+ }
401
+ blocks.push(/* @__PURE__ */ react.default.createElement(react.default.Fragment, { key: `p-${blocks.length}` }, renderInline(line)));
402
+ if (i < lines.length - 1) blocks.push(/* @__PURE__ */ react.default.createElement("br", { key: `br-${blocks.length}` }));
403
+ i += 1;
404
+ }
405
+ return blocks;
406
+ };
407
+
315
408
  //#endregion
316
409
  //#region src/Atoms/Typography/Title.tsx
317
410
  /** This text should only be used to display titles
318
411
  * Figma link: https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-357&mode=dev
319
412
  */
320
- const Title = ({ id, text, color = "#26292E", size = "base", weight = "semi-bold", italic = false, className, type = "h2", required,...props$1 }) => {
413
+ const Title = ({ id, text, color = "#26292E", size = "base", weight = "semi-bold", italic = false, className, type = "h2", required, isMarkdown = false,...props$1 }) => {
321
414
  const getTextSize = () => {
322
415
  if (size === "xs") return Title_modules_default.title_xs;
323
416
  else if (size === "sm") return Title_modules_default.title_sm;
@@ -335,49 +428,50 @@ const Title = ({ id, text, color = "#26292E", size = "base", weight = "semi-bold
335
428
  else if (weight === "regular") return Title_modules_default.title_regular;
336
429
  else return Title_modules_default.title_regular;
337
430
  };
431
+ const content = isMarkdown ? renderInlineMarkdown(text) : text;
338
432
  switch (type) {
339
433
  case "h1": return /* @__PURE__ */ react.default.createElement("h1", {
340
434
  ...props$1,
341
435
  id,
342
436
  style: { color },
343
437
  className: (0, clsx.default)(Title_modules_default.title, italic && Title_modules_default.title_italic, getTextWeight(), className, getTextSize(), required && Title_modules_default.title_required)
344
- }, text);
438
+ }, content);
345
439
  case "h2": return /* @__PURE__ */ react.default.createElement("h2", {
346
440
  ...props$1,
347
441
  id,
348
442
  style: { color },
349
443
  className: `${Title_modules_default.title} ${italic ? Title_modules_default.title_italic : Title_modules_default.title_normal} ${getTextWeight()} ${className ?? ""} ${getTextSize()} ${required && Title_modules_default.title_required}`
350
- }, text);
444
+ }, content);
351
445
  case "h3": return /* @__PURE__ */ react.default.createElement("h3", {
352
446
  ...props$1,
353
447
  id,
354
448
  style: { color },
355
449
  className: `${Title_modules_default.title} ${italic ? Title_modules_default.title_italic : Title_modules_default.title_normal} ${getTextWeight()} ${className ?? ""} ${getTextSize()} ${required && Title_modules_default.title_required}`
356
- }, text);
450
+ }, content);
357
451
  case "h4": return /* @__PURE__ */ react.default.createElement("h4", {
358
452
  ...props$1,
359
453
  id,
360
454
  style: { color },
361
455
  className: `${Title_modules_default.title} ${italic ? Title_modules_default.title_italic : Title_modules_default.title_normal} ${getTextWeight()} ${className ?? ""} ${getTextSize()} ${required && Title_modules_default.title_required}`
362
- }, text);
456
+ }, content);
363
457
  case "h5": return /* @__PURE__ */ react.default.createElement("h5", {
364
458
  ...props$1,
365
459
  id,
366
460
  style: { color },
367
461
  className: `${Title_modules_default.title} ${italic ? Title_modules_default.title_italic : Title_modules_default.title_normal} ${getTextWeight()} ${className ?? ""} ${getTextSize()} ${required && Title_modules_default.title_required}`
368
- }, text);
462
+ }, content);
369
463
  case "h6": return /* @__PURE__ */ react.default.createElement("h6", {
370
464
  ...props$1,
371
465
  id,
372
466
  style: { color },
373
467
  className: `${Title_modules_default.title} ${italic ? Title_modules_default.title_italic : Title_modules_default.title_normal} ${getTextWeight()} ${className ?? ""} ${getTextSize()} ${required && Title_modules_default.title_required}`
374
- }, text);
468
+ }, content);
375
469
  default: return /* @__PURE__ */ react.default.createElement("h2", {
376
470
  ...props$1,
377
471
  id,
378
472
  style: { color },
379
473
  className: `${Title_modules_default.title} ${italic ? Title_modules_default.title_italic : Title_modules_default.title_normal} ${getTextWeight()} ${className ?? ""} ${getTextSize()} ${required && Title_modules_default.title_required}`
380
- }, text);
474
+ }, content);
381
475
  }
382
476
  };
383
477
 
@@ -409,7 +503,7 @@ style_inject_es_default(css_248z$81);
409
503
  /** This text should be use to display basic text
410
504
  * Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-751&mode=dev
411
505
  */
412
- const Text = ({ text, color = "#26292E", size = "base", weight = "regular", italic = false, textDecoration, className, required, id,...props$1 }) => {
506
+ const Text = ({ text, color = "#26292E", size = "base", weight = "regular", italic = false, textDecoration, className, required, id, isMarkdown = false,...props$1 }) => {
413
507
  const getTextSize = () => {
414
508
  if (size === "xs") return Text_modules_default.text_xs;
415
509
  else if (size === "sm") return Text_modules_default.text_sm;
@@ -432,12 +526,13 @@ const Text = ({ text, color = "#26292E", size = "base", weight = "regular", ital
432
526
  else if (textDecoration === "line-through") return Text_modules_default.text_line_through;
433
527
  else return "";
434
528
  };
529
+ const content = isMarkdown ? renderInlineMarkdown(text) : text;
435
530
  return /* @__PURE__ */ react.default.createElement("p", {
436
531
  ...props$1,
437
532
  id,
438
533
  style: { color },
439
534
  className: (0, clsx.default)(Text_modules_default.text, italic && Text_modules_default.text_italic, getTextWeight(), getTextDecoration(), className, required && Text_modules_default.text_required, getTextSize())
440
- }, text);
535
+ }, content);
441
536
  };
442
537
 
443
538
  //#endregion
@@ -11103,6 +11198,35 @@ function LanguageIcon({ stroke, strokeWidth, fill, size = "base",...rest }) {
11103
11198
  })))));
11104
11199
  }
11105
11200
 
11201
+ //#endregion
11202
+ //#region src/DesignTokens/Icons/Miscellaneous/ColorSample.tsx
11203
+ function ColorSample({ stroke, strokeWidth, fill = "#26292E", size = "base",...rest }) {
11204
+ return /* @__PURE__ */ react.default.createElement(__mui_material.SvgIcon, {
11205
+ strokeWidth: strokeWidth ?? .1,
11206
+ stroke: stroke ? stroke : "currentColor",
11207
+ sx: {
11208
+ height: getIconSize(size),
11209
+ width: getIconSize(size)
11210
+ },
11211
+ ...rest
11212
+ }, /* @__PURE__ */ react.default.createElement("svg", {
11213
+ xmlns: "http://www.w3.org/2000/svg",
11214
+ width: "20",
11215
+ height: "20",
11216
+ viewBox: "0 0 20 20",
11217
+ fill: "none"
11218
+ }, /* @__PURE__ */ react.default.createElement("g", { clipPath: "url(#clip0_18537_9750)" }, /* @__PURE__ */ react.default.createElement("path", {
11219
+ fillRule: "evenodd",
11220
+ clipRule: "evenodd",
11221
+ d: "M2.35175 0.00428385C1.85467 0.0528672 1.43783 0.260201 1.10308 0.625617C0.867583 0.8827 0.689833 1.26637 0.6415 1.62195C0.609083 1.85987 0.609083 18.14 0.6415 18.378C0.732417 19.0465 1.21008 19.6485 1.83175 19.8779C2.16575 20.001 2.06808 19.9959 4.21508 20.0043C5.48142 20.0093 6.278 20.0039 6.42025 19.9897C6.96092 19.9353 7.4645 19.6526 7.76075 19.2374C7.84083 19.1253 8.81883 18.2829 13.257 14.504C16.2264 11.9757 18.7124 9.85237 18.7814 9.78562C18.9334 9.63837 19.1021 9.39928 19.1888 9.20795C19.459 8.6122 19.3767 7.8507 18.986 7.33137C18.8119 7.10003 16.366 4.3992 16.258 4.31903C15.9413 4.0842 15.4874 4.21187 15.3237 4.5817C15.2589 4.7282 15.2643 4.93787 15.3367 5.0857C15.3772 5.16828 15.7572 5.60453 16.6829 6.63078C17.6034 7.6512 17.9897 8.09445 18.0318 8.17845C18.1476 8.4097 18.0935 8.70512 17.9018 8.8887C17.8518 8.93653 15.8658 10.6314 13.4884 12.655C11.111 14.6787 9.104 16.3884 9.02825 16.4543C8.89092 16.5739 8.89075 16.5739 8.92275 16.4991C8.94042 16.4579 10.2144 13.6308 11.7539 10.2166C13.2934 6.80253 14.5784 3.92628 14.6095 3.82495C14.6596 3.66145 14.6658 3.60428 14.6658 3.31578C14.6658 3.02387 14.6598 2.97095 14.6067 2.79578C14.4377 2.23862 14.0532 1.80703 13.5209 1.5767C12.7659 1.24995 9.971 0.112784 9.89267 0.100367C9.32483 0.0106172 8.95158 0.694201 9.33225 1.12662C9.38067 1.1817 9.45575 1.24462 9.499 1.26637C9.54217 1.28812 10.3744 1.6352 11.3483 2.03753C13.2642 2.82903 13.2421 2.81812 13.3532 3.03112C13.4018 3.12437 13.4114 3.1707 13.4119 3.31578L13.4126 3.48912L10.7801 9.32412L8.14758 15.1591L8.13608 8.39245C8.12558 2.20637 8.1215 1.61345 8.08892 1.48162C7.88733 0.667367 7.24825 0.0967839 6.44283 0.0119505C6.25983 -0.00729948 2.542 -0.0142995 2.35175 0.00428385ZM2.38083 1.26887C2.18067 1.3092 2.0235 1.43528 1.93575 1.62578L1.88592 1.73412L1.88 3.57037L1.87417 5.40662H4.37792H6.88167L6.8755 3.57037C6.86933 1.7557 6.86875 1.73295 6.82358 1.63553C6.75692 1.49137 6.65517 1.38637 6.51567 1.31787L6.39258 1.25745L4.43175 1.25403C3.35325 1.2522 2.43042 1.25887 2.38083 1.26887ZM1.87508 8.7432V10.8233H4.37767H6.88033L6.87475 8.7487L6.86925 6.67412L4.37217 6.66862L1.87508 6.66312V8.7432ZM1.88025 15.1728L1.88592 18.2658L1.93708 18.379C2.00017 18.5184 2.13525 18.6465 2.27717 18.7011C2.37975 18.7407 2.46917 18.7424 4.38842 18.7424H6.39258L6.51242 18.6836C6.6565 18.6129 6.72525 18.5433 6.80742 18.385L6.86925 18.2658V15.1783V12.0908L4.37192 12.0853L1.8745 12.0798L1.88025 15.1728ZM4.05142 15.6654C3.89508 15.7147 3.78442 15.7832 3.66008 15.9075C3.2015 16.3661 3.33817 17.1371 3.9275 17.4163C4.06625 17.4819 4.08792 17.4858 4.32342 17.4858C4.54933 17.4858 4.58433 17.4803 4.69842 17.4269C5.30117 17.1445 5.44525 16.3708 4.98142 15.9069C4.79217 15.7177 4.58208 15.6321 4.31458 15.6354C4.21817 15.6366 4.09975 15.65 4.05142 15.6654Z",
11222
+ fill
11223
+ })), /* @__PURE__ */ react.default.createElement("defs", null, /* @__PURE__ */ react.default.createElement("clipPath", { id: "clip0_18537_9750" }, /* @__PURE__ */ react.default.createElement("rect", {
11224
+ width: "20",
11225
+ height: "20",
11226
+ fill: "white"
11227
+ })))));
11228
+ }
11229
+
11106
11230
  //#endregion
11107
11231
  //#region src/DesignTokens/Icons/Miscellaneous/ArrowsIcon.tsx
11108
11232
  function ArrowsIcon({ stroke, strokeWidth, fill, size = "base",...rest }) {
@@ -17025,7 +17149,7 @@ const Switch = ({ id, label, labelWeight = "bold", rightLabel, checked, disabled
17025
17149
 
17026
17150
  //#endregion
17027
17151
  //#region src/Atoms/Tag/Tag.modules.scss
17028
- var css_248z$66 = ".Tag-modules_tag__sYiD6{align-items:center;border-radius:.25rem;display:flex;gap:.25rem;padding:0 .375rem;width:-moz-fit-content;width:fit-content}.Tag-modules_tag__sYiD6 p{padding:0!important;white-space:nowrap}.Tag-modules_tag_ellipsis__-WHk-{align-items:center;border-radius:.25rem;display:flex;gap:.25rem;padding:0 .375rem;width:-moz-fit-content;width:fit-content}.Tag-modules_tag_ellipsis__-WHk- p{max-width:95%;overflow:hidden;padding:0!important;text-overflow:ellipsis;white-space:nowrap!important;width:100%}.Tag-modules_tag_idle__ym-G7{background:var(--color-neutral-dark-shades-600,#717376)}.Tag-modules_tag_idle__ym-G7 svg{fill:#fff!important;stroke:#fff!important}.Tag-modules_tag_info__Q6-WL{background:var(--color-primary-100,#e5f1ff)}.Tag-modules_tag_info__Q6-WL svg{fill:#004799!important;stroke:#004799!important}.Tag-modules_tag_violet__CgNel{background:var(--Color-Extended-Purple-100,#e9d3fd)}.Tag-modules_tag_violet__CgNel svg{fill:#5c1994!important;stroke:#5c1994!important}.Tag-modules_tag_light__RqIr6{background:var(--Color-Neutral-Clear-Shades-150,#eee)}.Tag-modules_tag_light__RqIr6 svg{fill:#32353a!important;stroke:#32353a!important}.Tag-modules_tag_success__yANfh{background:var(--color-extended-green-100,#e8f5ea)}.Tag-modules_tag_success__yANfh svg{fill:#3c743d!important;stroke:#3c743d!important}.Tag-modules_tag_warning__C-O5t{background:var(--color-extended-yellow-100,#fff3d6)}.Tag-modules_tag_warning__C-O5t svg{fill:#6e4f00!important;stroke:#6e4f00!important}.Tag-modules_tag_critical__v79so{background:var(--color-extended-red-100,#fddbdb)}.Tag-modules_tag_critical__v79so svg{fill:#98312e!important;stroke:#98312e!important}.Tag-modules_tag_sm__KQwsr{height:1.25rem}.Tag-modules_tag_sm__KQwsr svg{height:.75rem;width:.75rem}.Tag-modules_tag_base__omYEM{height:1.75rem}.Tag-modules_tag_base__omYEM svg{height:1rem;width:1rem}.Tag-modules_tag_lg__E0lbY{height:2.25rem}.Tag-modules_tag_lg__E0lbY svg{height:1.5rem;width:1.5rem}.Tag-modules_canBeRemoved__ei-3U svg{cursor:pointer}";
17152
+ var css_248z$66 = ".Tag-modules_tag__sYiD6{align-items:center;border-radius:.25rem;display:flex;gap:.25rem;padding:0 .375rem;width:-moz-fit-content;width:fit-content}.Tag-modules_tag__sYiD6 p{padding:0!important;white-space:nowrap}.Tag-modules_tag_ellipsis__-WHk-{align-items:center;border-radius:.25rem;display:flex;gap:.25rem;padding:0 .375rem;width:-moz-fit-content;width:fit-content}.Tag-modules_tag_ellipsis__-WHk- p{max-width:95%;overflow:hidden;padding:0!important;text-overflow:ellipsis;white-space:nowrap!important;width:100%}.Tag-modules_tag_idle__ym-G7{background:var(--color-neutral-dark-shades-600,#717376)}.Tag-modules_tag_idle__ym-G7 svg{fill:#fff!important;stroke:#fff!important}.Tag-modules_tag_info__Q6-WL{background:var(--color-primary-100,#e5f1ff)}.Tag-modules_tag_info__Q6-WL svg{fill:#004799!important;stroke:#004799!important}.Tag-modules_tag_violet__CgNel{background:var(--Color-Extended-Purple-100,#e9d3fd)}.Tag-modules_tag_violet__CgNel svg{fill:#5c1994!important;stroke:#5c1994!important}.Tag-modules_tag_light__RqIr6{background:var(--Color-Neutral-Clear-Shades-150,#eee)}.Tag-modules_tag_light__RqIr6 svg{fill:#32353a!important;stroke:#32353a!important}.Tag-modules_tag_success__yANfh{background:var(--color-extended-green-100,#e8f5ea)}.Tag-modules_tag_success__yANfh svg{fill:#3c743d!important;stroke:#3c743d!important}.Tag-modules_tag_warning__C-O5t{background:var(--color-extended-yellow-100,#fff3d6)}.Tag-modules_tag_warning__C-O5t svg{fill:#6e4f00!important;stroke:#6e4f00!important}.Tag-modules_tag_critical__v79so{background:var(--color-extended-red-100,#fddbdb)}.Tag-modules_tag_critical__v79so svg{fill:#98312e!important;stroke:#98312e!important}.Tag-modules_tag_sm__KQwsr{height:1.25rem}.Tag-modules_tag_sm__KQwsr svg{height:.75rem;width:.75rem}.Tag-modules_tag_base__omYEM{height:1.75rem}.Tag-modules_tag_base__omYEM svg{height:1rem;width:1rem}.Tag-modules_tag_lg__E0lbY{height:2.25rem;padding:.25rem .75rem!important}.Tag-modules_tag_lg__E0lbY svg{height:1.5rem;width:1.5rem}.Tag-modules_canBeRemoved__ei-3U svg{cursor:pointer}";
17029
17153
  var Tag_modules_default = {
17030
17154
  "tag": "Tag-modules_tag__sYiD6",
17031
17155
  "tag_ellipsis": "Tag-modules_tag_ellipsis__-WHk-",
@@ -77895,6 +78019,7 @@ exports.CloudUpload = CloudUpload;
77895
78019
  exports.Cluster = Cluster;
77896
78020
  exports.CogIcon = CogIcon;
77897
78021
  exports.ColorPicker = ColorPicker;
78022
+ exports.ColorSample = ColorSample;
77898
78023
  exports.ConfusedInterviewee = ConfusedInterviewee;
77899
78024
  exports.ConfusedIntervieweeFemale = ConfusedIntervieweeFemale;
77900
78025
  exports.ContentPenWriteIcon = ContentPenWriteIcon;