@youngonesworks/ui 1.0.6 → 1.0.8

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.
@@ -1,5 +1,5 @@
1
1
  interface IBadgeProps {
2
- styleVariant?: 'green-light' | 'red' | 'accent-blue' | 'warning' | 'gray' | 'black' | 'dark-gray' | 'purple' | 'secondary' | 'secondary-light' | 'gray' | 'white';
2
+ styleVariant?: 'primary' | 'green-light' | 'red' | 'accent-blue' | 'warning' | 'gray' | 'black' | 'dark-gray' | 'purple' | 'secondary' | 'secondary-light' | 'gray' | 'white';
3
3
  color?: 'dark' | 'gray' | 'red' | 'secondary' | 'grape' | 'violet' | 'indigo' | 'blue' | 'cyan' | 'green' | 'lime' | 'yellow' | 'orange' | 'teal';
4
4
  favorite?: boolean;
5
5
  children?: React.ReactNode;
@@ -1,2 +1,2 @@
1
- import { Ref, RefCallback } from 'react';
1
+ import { type Ref, type RefCallback } from 'react';
2
2
  export declare function useMergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
package/dist/index.cjs CHANGED
@@ -70,12 +70,12 @@ const AccordionItem = ({ controlContent, panelContent, style = "light", border =
70
70
  }, [active]);
71
71
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
72
72
  "data-testid": "accordion-item",
73
- className: cn("rounded-md hover:bg-gray-50", {
74
- "bg-light-blue hover:bg-light-blue/50": style === "dark",
73
+ className: cn("rounded-md hover:bg-ultra-light-blue-gray", {
74
+ "bg-light-blue hover:bg-ultra-light-blue-gray": style === "dark",
75
75
  "rounded-none border-b border-gray-200": border,
76
76
  "bg-ultra-light-blue border border-gray-200 hover:bg-transparent": style === "onboarding",
77
77
  "bg-white": style === "onboarding" && isActive,
78
- "hover:bg-ultra-light-blue cursor-not-allowed opacity-50": disabled
78
+ "hover:bg-ultra-light-blue-gray cursor-not-allowed opacity-50": disabled
79
79
  }, className),
80
80
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(UnstyledButton, {
81
81
  className: cn("relative flex w-full flex-row items-center justify-between gap-2 px-4 py-3", { "flex-row-reverse": chevronPosition === "right" }),
@@ -286,7 +286,7 @@ const ActionIcon = ({ ref, title, disabled = false, styleVariant = "default", ic
286
286
  "active:translate-y-[1px] content-center flex items-center justify-center rounded-[4px] border border-gray-200 hover:border-black text-black child:p-10 w-[36px] h-[36px] disabled:text-gray-500": styleVariant === ACTION_ICON_STYLE_VARIANT.DEFAULT,
287
287
  "active:translate-y-[1px] border-none content-center flex items-center justify-center rounded-[4px] border text-black child:p-10 w-[36px] h-[36px] disabled:text-gray-500": styleVariant === ACTION_ICON_STYLE_VARIANT.TRANSPARENT,
288
288
  "active:translate-y-[1px] content-center flex items-center justify-center rounded-[4px] child:p-10 w-[37px] h-[37px] text-black rounded-full bg-primary hover:bg-turquoise-700 disabled:turquoise-50 disabled:text-gray-800": styleVariant === ACTION_ICON_STYLE_VARIANT.ROUND,
289
- "w-7 h-7 active:translate-y-[1px] content-center flex items-center justify-center rounded-[4px] border border-gray-200 hover:border-black text-black hover:bg-gray-50 disabled:text-gray-500": styleVariant === ACTION_ICON_STYLE_VARIANT.SMALL
289
+ "w-7 h-7 active:translate-y-[1px] content-center flex items-center justify-center rounded-[4px] border border-gray-200 hover:border-black text-black hover:bg-ultra-light-blue-gray disabled:text-gray-500": styleVariant === ACTION_ICON_STYLE_VARIANT.SMALL
290
290
  });
291
291
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tooltip, {
292
292
  size: "sm",
@@ -752,19 +752,20 @@ const Badge = ({ styleVariant = COLOR.ACCENT_BLUE, className, favorite, children
752
752
  "bg-accent-blue-light text-accent-blue": styleVariant === COLOR.ACCENT_BLUE,
753
753
  "bg-green-light text-green": styleVariant === COLOR.GREEN_LIGHT,
754
754
  "bg-red-50 text-red-500": styleVariant === COLOR.RED,
755
- "bg-purple-light text-purple": styleVariant === COLOR.PURPLE,
755
+ "bg-purple-light text-black border border-purple": styleVariant === COLOR.PURPLE,
756
756
  "bg-warning-light text-warning": styleVariant === COLOR.WARNING,
757
757
  "bg-gray-50 text-black": styleVariant === COLOR.DARK_GRAY,
758
758
  "bg-black text-white": styleVariant === COLOR.BLACK,
759
759
  "bg-gray-50 text-gray-800": styleVariant === COLOR.GRAY,
760
760
  "bg-secondary-light text-secondary": styleVariant === COLOR.SECONDARY_LIGHT,
761
761
  "bg-secondary text-white": styleVariant === COLOR.SECONDARY,
762
- "bg-white text-black": styleVariant === COLOR.WHITE
762
+ "bg-white text-black": styleVariant === COLOR.WHITE,
763
+ "bg-turquoise-50 text-black border border-primary": styleVariant === COLOR.PRIMARY
763
764
  }, className),
764
765
  ...props,
765
766
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
766
767
  "data-testid": "badge-content",
767
- className: cn("block h-5 overflow-hidden text-ellipsis whitespace-nowrap text-inherit", { "flex items-center": favorite }),
768
+ className: cn("block h-[22px] overflow-hidden text-ellipsis whitespace-nowrap text-inherit", { "flex items-center": favorite }),
768
769
  children
769
770
  })
770
771
  });
@@ -806,7 +807,7 @@ const buttonVariants = {
806
807
  primary: (0, clsx.default)(defaultButtonStyling, "border-transparent bg-primary text-black hover:bg-turquoise-700 hover:fill-white disabled:bg-turquoise-100 disabled:text-gray-800 disabled:hover:bg-turquoise-100"),
807
808
  secondary: (0, clsx.default)(defaultButtonStyling, "border-solid border-gray-200 bg-white text-black hover:border-gray-800 hover:bg-gray-50 hover:fill-white disabled:text-gray-800 disabled:hover:border-gray-200 disabled:hover:bg-white"),
808
809
  danger: (0, clsx.default)(defaultButtonStyling, "border-transparent bg-red-500 text-white hover:bg-red-700 disabled:bg-red-100 disabled:hover:bg-red-100"),
809
- link: (0, clsx.default)(defaultButtonStyling, "border-transparent bg-transparent text-accent-blue hover:bg-gray-50 disabled:bg-transparent disabled:text-gray-800 disabled:hover:bg-transparent"),
810
+ link: (0, clsx.default)(defaultButtonStyling, "border-transparent bg-transparent text-accent-blue hover:bg-ultra-light-blue-gray disabled:bg-transparent disabled:text-gray-800 disabled:hover:bg-transparent"),
810
811
  outline: (0, clsx.default)(defaultButtonStyling, "border-solid border-gray-200 bg-transparent hover:border-gray-800 hover:bg-[rgba(255,255,255,0.1)] disabled:text-gray-800 disabled:hover:border-gray-200 disabled:hover:bg-white"),
811
812
  search: (0, clsx.default)(defaultButtonStyling, "absolute top-0 right-0 h-full w-[50px] border-0 bg-transparent bg-no-repeat"),
812
813
  icon__primary: (0, clsx.default)(defaultButtonStyling, "flex! items-center justify-center"),
@@ -1850,7 +1851,7 @@ const NavButtons = ({ onNext, onPrev }) => /* @__PURE__ */ (0, react_jsx_runtime
1850
1851
  children: [
1851
1852
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1852
1853
  "data-testid": "chevron-left",
1853
- className: `flex ${onPrev ? "cursor-pointer hover:bg-gray-50" : "cursor-not-allowed"} h-full items-center px-2`,
1854
+ className: `flex ${onPrev ? "cursor-pointer hover:bg-ultra-light-blue-gray" : "cursor-not-allowed"} h-full items-center px-2`,
1854
1855
  onClick: onPrev,
1855
1856
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tabler_icons_react.IconChevronLeft, {
1856
1857
  size: 20,
@@ -1860,7 +1861,7 @@ const NavButtons = ({ onNext, onPrev }) => /* @__PURE__ */ (0, react_jsx_runtime
1860
1861
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: "h-6 w-[0.8px] bg-gray-200" }),
1861
1862
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1862
1863
  "data-testid": "chevron-right",
1863
- className: `flex ${onNext ? "cursor-pointer hover:bg-gray-50" : "cursor-not-allowed"} h-full items-center px-2 hover:bg-gray-50`,
1864
+ className: `flex ${onNext ? "cursor-pointer hover:bg-ultra-light-blue-gray" : "cursor-not-allowed"} h-full items-center px-2 hover:bg-ultra-light-blue-gray`,
1864
1865
  onClick: onNext,
1865
1866
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_tabler_icons_react.IconChevronRight, {
1866
1867
  size: 20,
@@ -2752,7 +2753,7 @@ function TableRow({ children, className, header, ...props }) {
2752
2753
  const Tab = (0, react.forwardRef)(({ tabId, activeTab, tabContent, clickFnc, rightSection }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
2753
2754
  ref,
2754
2755
  "data-testid": `tab-${tabId}`,
2755
- className: `${activeTab && "text-light-blue bg-[#F0F0F6]"} bg-ultra-light-blue px-5 py-[10px] yo-text-caption whitespace-nowrap text-black transition-colors duration-100 hover:border-black hover:bg-[#F0F0F6] data-active:border-black data-active:bg-[#F0F0F6] data-active:font-medium data-active:text-black`,
2756
+ className: `${activeTab && "text-light-blue bg-accent-blue-grey font-semibold"} bg-ultra-light-blue px-5 py-[10px] yo-text-caption whitespace-nowrap transition-colors duration-100 hover:border-black hover:bg-accent-blue-grey`,
2756
2757
  onClick: () => clickFnc(tabId),
2757
2758
  children: [tabContent, rightSection && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
2758
2759
  className: "ml-2 inline-flex",
@@ -3441,28 +3442,28 @@ const WysiwygEditor = (0, react.forwardRef)(({ id, content, className, placehold
3441
3442
  type: "button",
3442
3443
  "data-testid": "bold-button",
3443
3444
  onClick: () => editor.chain().focus().toggleBold().run(),
3444
- className: `${editor.isActive("bold") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center rounded-l-md border-gray-400 yo-text-small hover:bg-gray-100 focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3445
+ className: `${editor.isActive("bold") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center rounded-l-md border-gray-400 yo-text-small hover:bg-accent-blue-grey focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3445
3446
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BoldIcon, {})
3446
3447
  }),
3447
3448
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3448
3449
  type: "button",
3449
3450
  "data-testid": "italic-button",
3450
3451
  onClick: () => editor.chain().focus().toggleItalic().run(),
3451
- className: `${editor.isActive("italic") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center border-gray-400 yo-text-small hover:bg-gray-100 focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3452
+ className: `${editor.isActive("italic") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center border-gray-400 yo-text-small hover:bg-accent-blue-grey focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3452
3453
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ItalicIcon, {})
3453
3454
  }),
3454
3455
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3455
3456
  type: "button",
3456
3457
  "data-testid": "underline-button",
3457
3458
  onClick: () => editor.chain().focus().toggleUnderline().run(),
3458
- className: `${editor.isActive("underline") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center border-gray-400 yo-text-small hover:bg-gray-100 focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3459
+ className: `${editor.isActive("underline") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center border-gray-400 yo-text-small hover:bg-accent-blue-grey focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3459
3460
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(UnderlineIcon, {})
3460
3461
  }),
3461
3462
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3462
3463
  type: "button",
3463
3464
  "data-testid": "clear-formatting-button",
3464
3465
  onClick: () => editor.chain().focus().clearNodes().unsetAllMarks().run(),
3465
- className: "flex size-[26px] items-center justify-center rounded-r-md border-gray-400 bg-white yo-text-small hover:bg-gray-100 focus:ring-2 focus:ring-teal-500 focus:outline-hidden",
3466
+ className: "flex size-[26px] items-center justify-center rounded-r-md border-gray-400 bg-white yo-text-small hover:bg-accent-blue-grey focus:ring-2 focus:ring-teal-500 focus:outline-hidden",
3466
3467
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClearFormattingIcon, {})
3467
3468
  })
3468
3469
  ]
@@ -3472,13 +3473,13 @@ const WysiwygEditor = (0, react.forwardRef)(({ id, content, className, placehold
3472
3473
  type: "button",
3473
3474
  "data-testid": "bullet-list-button",
3474
3475
  onClick: () => editor.chain().focus().toggleBulletList().run(),
3475
- className: `${editor.isActive("bulletList") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center rounded-l-md border-gray-400 yo-text-small hover:bg-gray-100 focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3476
+ className: `${editor.isActive("bulletList") ? "bg-primary/20" : "bg-white"} flex size-[26px] items-center justify-center rounded-l-md border-gray-400 yo-text-small hover:bg-accent-blue-grey focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3476
3477
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListIcon, {})
3477
3478
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
3478
3479
  type: "button",
3479
3480
  "data-testid": "ordered-list-button",
3480
3481
  onClick: () => editor.chain().focus().toggleOrderedList().run(),
3481
- className: `${editor.isActive("orderedList") ? "bg-primary/20 text-primary" : "bg-white"} flex size-[26px] items-center justify-center rounded-r-md border-gray-400 yo-text-small hover:bg-gray-100 focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3482
+ className: `${editor.isActive("orderedList") ? "bg-primary/20 text-primary" : "bg-white"} flex size-[26px] items-center justify-center rounded-r-md border-gray-400 yo-text-small hover:bg-accent-blue-grey focus:ring-2 focus:ring-teal-500 focus:outline-hidden`,
3482
3483
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListNumbersIcon, {})
3483
3484
  })]
3484
3485
  })]