diff --git a/ui/components/src/ui/components/tailwind/Color.scala b/ui/components/src/ui/components/tailwind/Color.scala index bcbed88..1af2cdf 100644 --- a/ui/components/src/ui/components/tailwind/Color.scala +++ b/ui/components/src/ui/components/tailwind/Color.scala @@ -21,16 +21,17 @@ inline def toCSSNoColorWeight(prefix: String): String = s"${prefix}-${name}" + inline def toCSSWithColorWeight( prefix: String, weight: ColorWeight ): String = s"${prefix}-${name}-${weight.toCSS}" + inline def toCSS(prefix: String)(weight: ColorWeight): String = - weight match { - case `w__` => toCSSNoColorWeight(prefix) - case _ => toCSSWithColorWeight(prefix, weight) - } + if weight == ColorWeight.w__ then toCSSNoColorWeight(prefix) + else toCSSWithColorWeight(prefix, weight) + inline def bg: ColorWeight => String = toCSS("bg")(_) inline def text: ColorWeight => String = toCSS("text")(_) inline def decoration: ColorWeight => String = toCSS("decoration")(_) diff --git a/ui/components/src/ui/components/tailwind/Color.scala b/ui/components/src/ui/components/tailwind/Color.scala index bcbed88..1af2cdf 100644 --- a/ui/components/src/ui/components/tailwind/Color.scala +++ b/ui/components/src/ui/components/tailwind/Color.scala @@ -21,16 +21,17 @@ inline def toCSSNoColorWeight(prefix: String): String = s"${prefix}-${name}" + inline def toCSSWithColorWeight( prefix: String, weight: ColorWeight ): String = s"${prefix}-${name}-${weight.toCSS}" + inline def toCSS(prefix: String)(weight: ColorWeight): String = - weight match { - case `w__` => toCSSNoColorWeight(prefix) - case _ => toCSSWithColorWeight(prefix, weight) - } + if weight == ColorWeight.w__ then toCSSNoColorWeight(prefix) + else toCSSWithColorWeight(prefix, weight) + inline def bg: ColorWeight => String = toCSS("bg")(_) inline def text: ColorWeight => String = toCSS("text")(_) inline def decoration: ColorWeight => String = toCSS("decoration")(_) diff --git a/ui/components/src/ui/components/tailwind/Icons.scala b/ui/components/src/ui/components/tailwind/Icons.scala index 7a53cd0..4da092a 100644 --- a/ui/components/src/ui/components/tailwind/Icons.scala +++ b/ui/components/src/ui/components/tailwind/Icons.scala @@ -215,6 +215,20 @@ ) ) + inline def exclamation(extraClasses: String): SvgElement = + svg( + cls := extraClasses, + xmlns := "http://www.w3.org/2000/svg", + viewBox := "0 0 20 20", + fill := "currentColor", + aria.hidden(true), + path( + fillRule := "evenodd", + d := "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", + clipRule := "evenodd" + ) + ) + inline def users(extraClasses: String): SvgElement = svg( cls(extraClasses), @@ -368,5 +382,33 @@ ) ) + inline def `x-circle`(extraClasses: String): SvgElement = + svg( + cls := extraClasses, + xmlns := "http://www.w3.org/2000/svg", + viewBox := "0 0 20 20", + fill := "currentColor", + aria.hidden := true, + path( + fillRule := "evenodd", + d := "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", + clipRule := "evenodd" + ) + ) + + inline def `check-circle`(extraClasses: String): SvgElement = + svg( + cls := extraClasses, + xmlns := "http://www.w3.org/2000/svg", + viewBox := "0 0 20 20", + fill := "currentColor", + aria.hidden := true, + path( + fillRule := "evenodd", + d := "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", + clipRule := "evenodd" + ) + ) + end solid end Icons diff --git a/ui/components/src/ui/components/tailwind/Color.scala b/ui/components/src/ui/components/tailwind/Color.scala index bcbed88..1af2cdf 100644 --- a/ui/components/src/ui/components/tailwind/Color.scala +++ b/ui/components/src/ui/components/tailwind/Color.scala @@ -21,16 +21,17 @@ inline def toCSSNoColorWeight(prefix: String): String = s"${prefix}-${name}" + inline def toCSSWithColorWeight( prefix: String, weight: ColorWeight ): String = s"${prefix}-${name}-${weight.toCSS}" + inline def toCSS(prefix: String)(weight: ColorWeight): String = - weight match { - case `w__` => toCSSNoColorWeight(prefix) - case _ => toCSSWithColorWeight(prefix, weight) - } + if weight == ColorWeight.w__ then toCSSNoColorWeight(prefix) + else toCSSWithColorWeight(prefix, weight) + inline def bg: ColorWeight => String = toCSS("bg")(_) inline def text: ColorWeight => String = toCSS("text")(_) inline def decoration: ColorWeight => String = toCSS("decoration")(_) diff --git a/ui/components/src/ui/components/tailwind/Icons.scala b/ui/components/src/ui/components/tailwind/Icons.scala index 7a53cd0..4da092a 100644 --- a/ui/components/src/ui/components/tailwind/Icons.scala +++ b/ui/components/src/ui/components/tailwind/Icons.scala @@ -215,6 +215,20 @@ ) ) + inline def exclamation(extraClasses: String): SvgElement = + svg( + cls := extraClasses, + xmlns := "http://www.w3.org/2000/svg", + viewBox := "0 0 20 20", + fill := "currentColor", + aria.hidden(true), + path( + fillRule := "evenodd", + d := "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", + clipRule := "evenodd" + ) + ) + inline def users(extraClasses: String): SvgElement = svg( cls(extraClasses), @@ -368,5 +382,33 @@ ) ) + inline def `x-circle`(extraClasses: String): SvgElement = + svg( + cls := extraClasses, + xmlns := "http://www.w3.org/2000/svg", + viewBox := "0 0 20 20", + fill := "currentColor", + aria.hidden := true, + path( + fillRule := "evenodd", + d := "M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z", + clipRule := "evenodd" + ) + ) + + inline def `check-circle`(extraClasses: String): SvgElement = + svg( + cls := extraClasses, + xmlns := "http://www.w3.org/2000/svg", + viewBox := "0 0 20 20", + fill := "currentColor", + aria.hidden := true, + path( + fillRule := "evenodd", + d := "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z", + clipRule := "evenodd" + ) + ) + end solid end Icons diff --git a/ui/components/src/ui/components/tailwind/TailwindSupport.scala b/ui/components/src/ui/components/tailwind/TailwindSupport.scala index 879d622..c63a79e 100644 --- a/ui/components/src/ui/components/tailwind/TailwindSupport.scala +++ b/ui/components/src/ui/components/tailwind/TailwindSupport.scala @@ -30,6 +30,18 @@ "text-amber-800", "text-green-800", "text-yellow-800", + "hover:text-red-800", + "hover:text-amber-800", + "hover:text-green-800", + "hover:text-yellow-800", + "text-red-700", + "text-amber-700", + "text-green-700", + "text-yellow-700", + "text-red-400", + "text-amber-400", + "text-green-400", + "text-yellow-400", "bg-red-100", "bg-amber-100", "bg-green-100",