odaptos_design_system 2.0.342 → 2.0.343

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,87 @@ 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*, `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 renderStrong = (text) => {
331
+ return text.split(/\*\*([^*]+)\*\*/g).map((part, index) => {
332
+ if (!(index % 2 === 1)) return part;
333
+ return /* @__PURE__ */ react.default.createElement("strong", { key: `strong-${index}` }, part);
334
+ });
335
+ };
336
+ const renderEm = (text) => {
337
+ return text.split(/\*([^*]+)\*/g).map((part, index) => {
338
+ if (!(index % 2 === 1)) return part;
339
+ return /* @__PURE__ */ react.default.createElement("em", { key: `em-${index}` }, part);
340
+ });
341
+ };
342
+ return nodes.flatMap((node) => {
343
+ if (typeof node !== "string") return [node];
344
+ return renderStrong(node).flatMap((strongNode) => {
345
+ if (typeof strongNode !== "string") return [strongNode];
346
+ return renderEm(strongNode);
347
+ });
348
+ });
349
+ };
350
+ const renderInline = (text) => {
351
+ const codeNodes = renderCode(text);
352
+ return renderStrongAndEm(codeNodes);
353
+ };
354
+ const lines = rawText.split("\n");
355
+ const blocks = [];
356
+ let i = 0;
357
+ while (i < lines.length) {
358
+ const line = lines[i] ?? "";
359
+ const unorderedMatch = line.match(/^\s*[-*]\s+(.*)$/);
360
+ const orderedMatch = line.match(/^\s*(\d+)\.\s+(.*)$/);
361
+ if (unorderedMatch) {
362
+ const items = [];
363
+ while (i < lines.length) {
364
+ const match = (lines[i] ?? "").match(/^\s*[-*]\s+(.*)$/);
365
+ if (!match) break;
366
+ items.push(match[1]);
367
+ i += 1;
368
+ }
369
+ 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)))));
370
+ continue;
371
+ }
372
+ if (orderedMatch) {
373
+ const items = [];
374
+ while (i < lines.length) {
375
+ const match = (lines[i] ?? "").match(/^\s*\d+\.\s+(.*)$/);
376
+ if (!match) break;
377
+ items.push(match[1]);
378
+ i += 1;
379
+ }
380
+ 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)))));
381
+ continue;
382
+ }
383
+ blocks.push(/* @__PURE__ */ react.default.createElement(react.default.Fragment, { key: `p-${blocks.length}` }, renderInline(line)));
384
+ if (i < lines.length - 1) blocks.push(/* @__PURE__ */ react.default.createElement("br", { key: `br-${blocks.length}` }));
385
+ i += 1;
386
+ }
387
+ return blocks;
388
+ };
389
+
315
390
  //#endregion
316
391
  //#region src/Atoms/Typography/Title.tsx
317
392
  /** This text should only be used to display titles
318
393
  * Figma link: https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-357&mode=dev
319
394
  */
320
- const Title = ({ id, text, color = "#26292E", size = "base", weight = "semi-bold", italic = false, className, type = "h2", required,...props$1 }) => {
395
+ const Title = ({ id, text, color = "#26292E", size = "base", weight = "semi-bold", italic = false, className, type = "h2", required, isMarkdown = false,...props$1 }) => {
321
396
  const getTextSize = () => {
322
397
  if (size === "xs") return Title_modules_default.title_xs;
323
398
  else if (size === "sm") return Title_modules_default.title_sm;
@@ -335,49 +410,50 @@ const Title = ({ id, text, color = "#26292E", size = "base", weight = "semi-bold
335
410
  else if (weight === "regular") return Title_modules_default.title_regular;
336
411
  else return Title_modules_default.title_regular;
337
412
  };
413
+ const content = isMarkdown ? renderInlineMarkdown(text) : text;
338
414
  switch (type) {
339
415
  case "h1": return /* @__PURE__ */ react.default.createElement("h1", {
340
416
  ...props$1,
341
417
  id,
342
418
  style: { color },
343
419
  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);
420
+ }, content);
345
421
  case "h2": return /* @__PURE__ */ react.default.createElement("h2", {
346
422
  ...props$1,
347
423
  id,
348
424
  style: { color },
349
425
  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);
426
+ }, content);
351
427
  case "h3": return /* @__PURE__ */ react.default.createElement("h3", {
352
428
  ...props$1,
353
429
  id,
354
430
  style: { color },
355
431
  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);
432
+ }, content);
357
433
  case "h4": return /* @__PURE__ */ react.default.createElement("h4", {
358
434
  ...props$1,
359
435
  id,
360
436
  style: { color },
361
437
  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);
438
+ }, content);
363
439
  case "h5": return /* @__PURE__ */ react.default.createElement("h5", {
364
440
  ...props$1,
365
441
  id,
366
442
  style: { color },
367
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}`
368
- }, text);
444
+ }, content);
369
445
  case "h6": return /* @__PURE__ */ react.default.createElement("h6", {
370
446
  ...props$1,
371
447
  id,
372
448
  style: { color },
373
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}`
374
- }, text);
450
+ }, content);
375
451
  default: return /* @__PURE__ */ react.default.createElement("h2", {
376
452
  ...props$1,
377
453
  id,
378
454
  style: { color },
379
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}`
380
- }, text);
456
+ }, content);
381
457
  }
382
458
  };
383
459
 
@@ -409,7 +485,7 @@ style_inject_es_default(css_248z$81);
409
485
  /** This text should be use to display basic text
410
486
  * Figma link : https://www.figma.com/file/fjnhhbL12HvKccPmJchVnr/Atomic-Library?type=design&node-id=52-751&mode=dev
411
487
  */
412
- const Text = ({ text, color = "#26292E", size = "base", weight = "regular", italic = false, textDecoration, className, required, id,...props$1 }) => {
488
+ const Text = ({ text, color = "#26292E", size = "base", weight = "regular", italic = false, textDecoration, className, required, id, isMarkdown = false,...props$1 }) => {
413
489
  const getTextSize = () => {
414
490
  if (size === "xs") return Text_modules_default.text_xs;
415
491
  else if (size === "sm") return Text_modules_default.text_sm;
@@ -432,12 +508,13 @@ const Text = ({ text, color = "#26292E", size = "base", weight = "regular", ital
432
508
  else if (textDecoration === "line-through") return Text_modules_default.text_line_through;
433
509
  else return "";
434
510
  };
511
+ const content = isMarkdown ? renderInlineMarkdown(text) : text;
435
512
  return /* @__PURE__ */ react.default.createElement("p", {
436
513
  ...props$1,
437
514
  id,
438
515
  style: { color },
439
516
  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);
517
+ }, content);
441
518
  };
442
519
 
443
520
  //#endregion
@@ -11103,6 +11180,35 @@ function LanguageIcon({ stroke, strokeWidth, fill, size = "base",...rest }) {
11103
11180
  })))));
11104
11181
  }
11105
11182
 
11183
+ //#endregion
11184
+ //#region src/DesignTokens/Icons/Miscellaneous/ColorSample.tsx
11185
+ function ColorSample({ stroke, strokeWidth, fill = "#26292E", size = "base",...rest }) {
11186
+ return /* @__PURE__ */ react.default.createElement(__mui_material.SvgIcon, {
11187
+ strokeWidth: strokeWidth ?? .1,
11188
+ stroke: stroke ? stroke : "currentColor",
11189
+ sx: {
11190
+ height: getIconSize(size),
11191
+ width: getIconSize(size)
11192
+ },
11193
+ ...rest
11194
+ }, /* @__PURE__ */ react.default.createElement("svg", {
11195
+ xmlns: "http://www.w3.org/2000/svg",
11196
+ width: "20",
11197
+ height: "20",
11198
+ viewBox: "0 0 20 20",
11199
+ fill: "none"
11200
+ }, /* @__PURE__ */ react.default.createElement("g", { clipPath: "url(#clip0_18537_9750)" }, /* @__PURE__ */ react.default.createElement("path", {
11201
+ fillRule: "evenodd",
11202
+ clipRule: "evenodd",
11203
+ 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",
11204
+ fill
11205
+ })), /* @__PURE__ */ react.default.createElement("defs", null, /* @__PURE__ */ react.default.createElement("clipPath", { id: "clip0_18537_9750" }, /* @__PURE__ */ react.default.createElement("rect", {
11206
+ width: "20",
11207
+ height: "20",
11208
+ fill: "white"
11209
+ })))));
11210
+ }
11211
+
11106
11212
  //#endregion
11107
11213
  //#region src/DesignTokens/Icons/Miscellaneous/ArrowsIcon.tsx
11108
11214
  function ArrowsIcon({ stroke, strokeWidth, fill, size = "base",...rest }) {
@@ -17025,7 +17131,7 @@ const Switch = ({ id, label, labelWeight = "bold", rightLabel, checked, disabled
17025
17131
 
17026
17132
  //#endregion
17027
17133
  //#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}";
17134
+ 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
17135
  var Tag_modules_default = {
17030
17136
  "tag": "Tag-modules_tag__sYiD6",
17031
17137
  "tag_ellipsis": "Tag-modules_tag_ellipsis__-WHk-",
@@ -77895,6 +78001,7 @@ exports.CloudUpload = CloudUpload;
77895
78001
  exports.Cluster = Cluster;
77896
78002
  exports.CogIcon = CogIcon;
77897
78003
  exports.ColorPicker = ColorPicker;
78004
+ exports.ColorSample = ColorSample;
77898
78005
  exports.ConfusedInterviewee = ConfusedInterviewee;
77899
78006
  exports.ConfusedIntervieweeFemale = ConfusedIntervieweeFemale;
77900
78007
  exports.ContentPenWriteIcon = ContentPenWriteIcon;