diff --git a/fh_tailwindcss/utility/__init__.py b/fh_tailwindcss/utility/__init__.py index ec4504d..15f1d53 100644 --- a/fh_tailwindcss/utility/__init__.py +++ b/fh_tailwindcss/utility/__init__.py @@ -5,7 +5,8 @@ BorderStyle, BorderWidth, BorderWidths, DivideUtilities, - RingUtilities) + RingUtilities +) from .layout import Display from .sizing import Height, Width, Size, MaxWidth from .spacing import Margin, Margins, Padding, Paddings @@ -21,6 +22,74 @@ BackgroundImage, GradientColorStop, GradientColorStops ) +from .effect import ( + BackgroundBlendMode, + BoxShadowColor, BoxShadowColors, + BoxShadow, + MixBlendMode, + Opacity, Opacities +) + +from .filter import ( + Blur, + Brightness, Brightnesses, + Contrast, Contrasts, + DropShadow, + GrayScale, + HueRotate, HueRotateDegrees, + Invert, + Saturate, SaturateValues, + Sepia, + BackdropBlur, + BackdropBrightness, BackdropBrightnesses, + BackdropContrast, BackdropContrasts, + BackdropGrayScale, + BackdropHueRotate, BackdropHueRotateDegrees, + BackdropInvert, + BackdropOpacity, BackdropOpacities, + BackdropSaturate, BackdropSaturateValues, + BackdropSepia +) + +from .accessibility import ForcedColorAdjust, ScreenReader + +from .interactivity import ( + AccentColor, AccentColors, + Appearance, + CaretColor, CaretColors, + Cursor, + PointerEvents, + Resize, + ScrollBehavior, ScrollMargin, ScrollMargins, ScrollPadding, ScrollPaddings, ScrollSnapAlign, ScrollSnapStop, ScrollSnapType, + TouchAction, + UserSelect, + WillChange +) + +from .svg import Fill, Stroke, Strokes, StrokeWidth + +from .table import ( + BorderCollapse, + BorderSpacing, BorderSpacings, + CaptionSide, + TableLayout +) + +from .transform import ( + Rotate, RotateDegrees, + Scale, ScaleValues, + Skew, SkewDegrees, + TransformOrigin, + Translate, TranslateValues +) + +from .transition_and_animation import ( + Animation, + TransitionDelay, TransitionDelays, + TransitionDuration, TransitionDurations, + TransitionProperty, + TransitionTimingFunction +) __all__ = [ 'BackgroundAttachment', 'BackgroundClip', 'BackgroundColor', 'BackgroundColors', 'BackgroundOrigin', 'BackgroundPosition', 'BackgroundRepeat', 'BackgroundSize', 'BackgroundImage', 'GradientColorStop', 'GradientColorStops', @@ -28,5 +97,14 @@ 'Display', 'Height', 'Width', 'Size', 'MaxWidth', 'Margin', 'Margins', 'Padding', 'Paddings', - 'FontSize', 'FontWeight' + 'FontSize', 'FontWeight', + 'BackgroundBlendMode', 'BoxShadowColor', 'BoxShadowColors', 'BoxShadow', 'MixBlendMode', 'Opacity', 'Opacities', + 'Blur', 'Brightness', 'Brightnesses', 'Contrast', 'Contrasts', 'DropShadow', 'GrayScale', 'HueRotate', 'HueRotateDegrees', 'Invert', 'Saturate', 'SaturateValues', 'Sepia', + 'BackdropBlur', 'BackdropBrightness', 'BackdropBrightnesses', 'BackdropContrast', 'BackdropContrasts', 'BackdropGrayScale', 'BackdropHueRotate', 'BackdropHueRotateDegrees', 'BackdropInvert', 'BackdropOpacity', 'BackdropOpacities', 'BackdropSaturate', 'BackdropSaturateValues', 'BackdropSepia', + 'ForcedColorAdjust', 'ScreenReader', + 'AccentColor', 'AccentColors', 'Appearance', 'CaretColor', 'CaretColors', 'Cursor', 'PointerEvents', 'Resize', 'ScrollBehavior', 'ScrollMargin', 'ScrollMargins', 'ScrollPadding', 'ScrollPaddings', 'ScrollSnapAlign', 'ScrollSnapStop', 'ScrollSnapType', 'TouchAction', 'UserSelect', 'WillChange', + 'Fill', 'Stroke', 'Strokes', 'StrokeWidth', + 'BorderCollapse', 'BorderSpacing', 'BorderSpacings', 'CaptionSide', 'TableLayout', + 'Rotate', 'RotateDegrees', 'Scale', 'ScaleValues', 'Skew', 'SkewDegrees', 'TransformOrigin', 'Translate', 'TranslateValues', + 'Animation', 'TransitionDelay', 'TransitionDelays', 'TransitionDuration', 'TransitionDurations', 'TransitionProperty', 'TransitionTimingFunction' ] \ No newline at end of file diff --git a/fh_tailwindcss/utility/accessibility/__init__.py b/fh_tailwindcss/utility/accessibility/__init__.py new file mode 100644 index 0000000..0b1bdf8 --- /dev/null +++ b/fh_tailwindcss/utility/accessibility/__init__.py @@ -0,0 +1,7 @@ +from .forced_color_adjust import ForcedColorAdjust +from .screen_reader import ScreenReader + +__all__ = [ + "ForcedColorAdjust", + "ScreenReader", +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/accessibility/forced_color_adjust.py b/fh_tailwindcss/utility/accessibility/forced_color_adjust.py new file mode 100644 index 0000000..ecf04a9 --- /dev/null +++ b/fh_tailwindcss/utility/accessibility/forced_color_adjust.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/forced-color-adjust + +class ForcedColorAdjust(TailwindEnum): + """ + Utilities for opting in and out of forced colors. + + Attributes: + AUTO (str): Represents `forced-color-adjust-auto` to allow forced color adjustment. + NONE (str): Represents `forced-color-adjust-none` to disable forced color adjustment. + """ + + AUTO = "forced-color-adjust-auto" + NONE = "forced-color-adjust-none" diff --git a/fh_tailwindcss/utility/accessibility/screen_reader.py b/fh_tailwindcss/utility/accessibility/screen_reader.py new file mode 100644 index 0000000..bd37c3b --- /dev/null +++ b/fh_tailwindcss/utility/accessibility/screen_reader.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/screen-readers + +class ScreenReader(TailwindEnum): + """ + Utilities for improving accessibility with screen readers. + + Attributes: + SR_ONLY (str): Represents `sr-only` for making an element visually hidden but accessible to screen readers. + NOT_SR_ONLY (str): Represents `not-sr-only` for making an element visible and accessible to both screen readers and users. + """ + + SR_ONLY = "sr-only" + NOT_SR_ONLY = "not-sr-only" diff --git a/fh_tailwindcss/utility/effect/__init__.py b/fh_tailwindcss/utility/effect/__init__.py new file mode 100644 index 0000000..98278cc --- /dev/null +++ b/fh_tailwindcss/utility/effect/__init__.py @@ -0,0 +1,13 @@ +from .background_blend_mode import BackgroundBlendMode +from .box_shadow_color import BoxShadowColor, BoxShadowColors +from .box_shadow import BoxShadow +from .mix_blend_mode import MixBlendMode +from .opacity import Opacity, Opacities + +__all__ = [ + 'BackgroundBlendMode', + 'BoxShadowColor', 'BoxShadowColors', + 'BoxShadow', + 'MixBlendMode', + 'Opacity', 'Opacities' +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/effect/background_blend_mode.py b/fh_tailwindcss/utility/effect/background_blend_mode.py new file mode 100644 index 0000000..7ac8da6 --- /dev/null +++ b/fh_tailwindcss/utility/effect/background_blend_mode.py @@ -0,0 +1,41 @@ +from ...tailwind import TailwindEnum + +class BackgroundBlendMode(TailwindEnum): + """ + Utilities for controlling how an element's background image should blend with its background color. + + Attributes: + NORMAL (str): Sets the background blend mode to normal. + MULTIPLY (str): Sets the background blend mode to multiply. + SCREEN (str): Sets the background blend mode to screen. + OVERLAY (str): Sets the background blend mode to overlay. + DARKEN (str): Sets the background blend mode to darken. + LIGHTEN (str): Sets the background blend mode to lighten. + COLOR_DODGE (str): Sets the background blend mode to color-dodge. + COLOR_BURN (str): Sets the background blend mode to color-burn. + HARD_LIGHT (str): Sets the background blend mode to hard-light. + SOFT_LIGHT (str): Sets the background blend mode to soft-light. + DIFFERENCE (str): Sets the background blend mode to difference. + EXCLUSION (str): Sets the background blend mode to exclusion. + HUE (str): Sets the background blend mode to hue. + SATURATION (str): Sets the background blend mode to saturation. + COLOR (str): Sets the background blend mode to color. + LUMINOSITY (str): Sets the background blend mode to luminosity. + """ + + NORMAL = "bg-blend-normal" + MULTIPLY = "bg-blend-multiply" + SCREEN = "bg-blend-screen" + OVERLAY = "bg-blend-overlay" + DARKEN = "bg-blend-darken" + LIGHTEN = "bg-blend-lighten" + COLOR_DODGE = "bg-blend-color-dodge" + COLOR_BURN = "bg-blend-color-burn" + HARD_LIGHT = "bg-blend-hard-light" + SOFT_LIGHT = "bg-blend-soft-light" + DIFFERENCE = "bg-blend-difference" + EXCLUSION = "bg-blend-exclusion" + HUE = "bg-blend-hue" + SATURATION = "bg-blend-saturation" + COLOR = "bg-blend-color" + LUMINOSITY = "bg-blend-luminosity" \ No newline at end of file diff --git a/fh_tailwindcss/utility/effect/box_shadow.py b/fh_tailwindcss/utility/effect/box_shadow.py new file mode 100644 index 0000000..7ded16a --- /dev/null +++ b/fh_tailwindcss/utility/effect/box_shadow.py @@ -0,0 +1,41 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/box-shadow + +class BoxShadow(TailwindEnum): + """ + Utilities for controlling the box shadow of an element. + + Attributes: + SM (str): A small shadow for minimal emphasis. + Equivalent to `box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);`. + + DEFAULT (str): The default shadow providing balanced depth. + Equivalent to `box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);`. + + MD (str): A medium shadow suitable for moderate emphasis. + Equivalent to `box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);`. + + LG (str): A large shadow for elements requiring higher prominence. + Equivalent to `box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);`. + + XL (str): An extra-large shadow for significant emphasis. + Equivalent to `box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);`. + + XXL (str): A prominent shadow with greater spread and softness. + Equivalent to `box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);`. + + INNER (str): An inner shadow for inset effects. + Equivalent to `box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);`. + + NONE (str): Removes any applied shadow. + Equivalent to `box-shadow: 0 0 #0000;`. + """ + SM = "shadow-sm" + DEFAULT = "shadow" + MD = "shadow-md" + LG = "shadow-lg" + XL = "shadow-xl" + XXL = "shadow-2xl" + INNER = "shadow-inner" + NONE = "shadow-none" diff --git a/fh_tailwindcss/utility/effect/box_shadow_color.py b/fh_tailwindcss/utility/effect/box_shadow_color.py new file mode 100644 index 0000000..324850e --- /dev/null +++ b/fh_tailwindcss/utility/effect/box_shadow_color.py @@ -0,0 +1,69 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/box-shadow-color + +class BoxShadowColor(TailwindEnum): + """ + Utilities for controlling the color of a box shadow. + + Attributes: + INHERIT (str): Inherits the box shadow color. + CURRENT (str): Sets the box shadow color to the current text color. + TRANSPARENT (str): Makes the box shadow color transparent. + BLACK (str): A solid black box shadow color. + WHITE (str): A solid white box shadow color. + SLATE (str): Shades of slate colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + GRAY (str): Shades of gray colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + ZINC (str): Shades of zinc colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + NEUTRAL (str): Shades of neutral colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + STONE (str): Shades of stone colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + RED (str): Shades of red colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + ORANGE (str): Shades of orange colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + AMBER (str): Shades of amber colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + YELLOW (str): Shades of yellow colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + LIME (str): Shades of lime colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + GREEN (str): Shades of green colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + EMERALD (str): Shades of emerald colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + TEAL (str): Shades of teal colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + CYAN (str): Shades of cyan colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + SKY (str): Shades of sky colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + BLUE (str): Shades of blue colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + INDIGO (str): Shades of indigo colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + VIOLET (str): Shades of violet colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + PURPLE (str): Shades of purple colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + FUCHSIA (str): Shades of fuchsia colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + PINK (str): Shades of pink colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + ROSE (str): Shades of rose colors. Available options: [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950]. + """ + + INHERIT = "shadow-inherit" + CURRENT = "shadow-current" + TRANSPARENT = "shadow-transparent" + BLACK = "shadow-black" + WHITE = "shadow-white" + + SLATE = "shadow-slate" + GRAY = "shadow-gray" + ZINC = "shadow-zinc" + NEUTRAL = "shadow-neutral" + STONE = "shadow-stone" + RED = "shadow-red" + ORANGE = "shadow-orange" + AMBER = "shadow-amber" + YELLOW = "shadow-yellow" + LIME = "shadow-lime" + GREEN = "shadow-green" + EMERALD = "shadow-emerald" + TEAL = "shadow-teal" + CYAN = "shadow-cyan" + SKY = "shadow-sky" + BLUE = "shadow-blue" + INDIGO = "shadow-indigo" + VIOLET = "shadow-violet" + PURPLE = "shadow-purple" + FUCHSIA = "shadow-fuchsia" + PINK = "shadow-pink" + ROSE = "shadow-rose" + +class BoxShadowColors(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/effect/mix_blend_mode.py b/fh_tailwindcss/utility/effect/mix_blend_mode.py new file mode 100644 index 0000000..84b985e --- /dev/null +++ b/fh_tailwindcss/utility/effect/mix_blend_mode.py @@ -0,0 +1,47 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/mix-blend-mode + +class MixBlendMode(TailwindEnum): + """ + Utilities for controlling how an element should blend with the background. + + Attributes: + NORMAL (str): Sets the blend mode to normal. + MULTIPLY (str): Sets the blend mode to multiply. + SCREEN (str): Sets the blend mode to screen. + OVERLAY (str): Sets the blend mode to overlay. + DARKEN (str): Sets the blend mode to darken. + LIGHTEN (str): Sets the blend mode to lighten. + COLOR_DODGE (str): Sets the blend mode to color-dodge. + COLOR_BURN (str): Sets the blend mode to color-burn. + HARD_LIGHT (str): Sets the blend mode to hard-light. + SOFT_LIGHT (str): Sets the blend mode to soft-light. + DIFFERENCE (str): Sets the blend mode to difference. + EXCLUSION (str): Sets the blend mode to exclusion. + HUE (str): Sets the blend mode to hue. + SATURATION (str): Sets the blend mode to saturation. + COLOR (str): Sets the blend mode to color. + LUMINOSITY (str): Sets the blend mode to luminosity. + PLUS_DARKER (str): Sets the blend mode to plus-darker. + PLUS_LIGHTER (str): Sets the blend mode to plus-lighter. + """ + + NORMAL = "mix-blend-normal" + MULTIPLY = "mix-blend-multiply" + SCREEN = "mix-blend-screen" + OVERLAY = "mix-blend-overlay" + DARKEN = "mix-blend-darken" + LIGHTEN = "mix-blend-lighten" + COLOR_DODGE = "mix-blend-color-dodge" + COLOR_BURN = "mix-blend-color-burn" + HARD_LIGHT = "mix-blend-hard-light" + SOFT_LIGHT = "mix-blend-soft-light" + DIFFERENCE = "mix-blend-difference" + EXCLUSION = "mix-blend-exclusion" + HUE = "mix-blend-hue" + SATURATION = "mix-blend-saturation" + COLOR = "mix-blend-color" + LUMINOSITY = "mix-blend-luminosity" + PLUS_DARKER = "mix-blend-plus-darker" + PLUS_LIGHTER = "mix-blend-plus-lighter" \ No newline at end of file diff --git a/fh_tailwindcss/utility/effect/opacity.py b/fh_tailwindcss/utility/effect/opacity.py new file mode 100644 index 0000000..bf2e62f --- /dev/null +++ b/fh_tailwindcss/utility/effect/opacity.py @@ -0,0 +1,17 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/opacity + +class Opacity(TailwindEnum): + """ + Utilities for controlling the opacity of an element. + + Attributes: + OPACITY (str): Base class for opacity utilities. Available intensity values: + [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]. + """ + + OPACITY = "opacity" + +class Opacities(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/__init__.py b/fh_tailwindcss/utility/filter/__init__.py new file mode 100644 index 0000000..396fc22 --- /dev/null +++ b/fh_tailwindcss/utility/filter/__init__.py @@ -0,0 +1,42 @@ +from .blur import Blur +from .brightness import Brightness, Brightnesses +from .contrast import Contrast, Contrasts +from .drop_shadow import DropShadow +from .grayscale import GrayScale +from .hue_rotate import HueRotate, HueRotateDegrees +from .invert import Invert +from .saturate import Saturate, SaturateValues +from .sepia import Sepia + +from .backdrop_utilities import ( + BackdropBlur, + BackdropBrightness, BackdropBrightnesses, + BackdropContrast, BackdropContrasts, + BackdropGrayScale, + BackdropHueRotate, BackdropHueRotateDegrees, + BackdropInvert, + BackdropOpacity, BackdropOpacities, + BackdropSaturate, BackdropSaturateValues, + BackdropSepia +) + +__all__ = [ + "Blur", + "Brightness", "Brightnesses", + "Contrast", "Contrasts", + "DropShadow", + "GrayScale", + "HueRotate", "HueRotateDegrees", + "Invert", + "Saturate", "SaturateValues", + "Sepia", + "BackdropBlur", + "BackdropBrightness", "BackdropBrightnesses", + "BackdropContrast", "BackdropContrasts", + "BackdropGrayScale", + "BackdropHueRotate", "BackdropHueRotateDegrees", + "BackdropInvert", + "BackdropOpacity", "BackdropOpacities", + "BackdropSaturate", "BackdropSaturateValues", + "BackdropSepia" +] diff --git a/fh_tailwindcss/utility/filter/backdrop_utilities.py b/fh_tailwindcss/utility/filter/backdrop_utilities.py new file mode 100644 index 0000000..79d8c89 --- /dev/null +++ b/fh_tailwindcss/utility/filter/backdrop_utilities.py @@ -0,0 +1,166 @@ +from ...tailwind import TailwindDict + +from .blur import Blur +from .brightness import Brightness +from .contrast import Contrast +from .grayscale import GrayScale +from .hue_rotate import HueRotate +from .invert import Invert +from ..effect import Opacity +from .saturate import Saturate +from .sepia import Sepia + + +# https://tailwindcss.com/docs/backdrop-blur + +class BackdropBlur(Blur): + """ + Utilities for applying backdrop-blur filters to an element. + + Attributes: + NONE (str): Applies no backdrop-blur filter. + SM (str): Applies a backdrop-blur filter with a radius of 4px. + DEFAULT (str): Applies a backdrop-blur filter with a radius of 8px. + MD (str): Applies a backdrop-blur filter with a radius of 12px. + LG (str): Applies a backdrop-blur filter with a radius of 16px. + XL (str): Applies a backdrop-blur filter with a radius of 24px. + XXL (str): Applies a backdrop-blur filter with a radius of 40px. + XXXL (str): Applies a backdrop-blur filter with a radius of 64px. + """ + + NONE = "backdrop" + str(Blur.NONE) + SM = "backdrop" + str(Blur.SM) + DEFAULT = "backdrop" + str(Blur.DEFAULT) + MD = "backdrop" + str(Blur.MD) + LG = "backdrop" + str(Blur.LG) + XL = "backdrop" + str(Blur.XL) + XXL = "backdrop" + str(Blur.XXL) + XXXL = "backdrop" + str(Blur.XXXL) + + +# https://tailwindcss.com/docs/backdrop-brightness + +class BackdropBrightness(Brightness): + """ + Utilities for applying brightness filters to an element. + + Attributes: + BRIGHTNESS (str): Base class for brightness utilities. Available intensity values: + [0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200]. + """ + + BRIGHTNESS = "backdrop" + str(Brightness.BRIGHTNESS) + +class BackdropBrightnesses(TailwindDict): + pass + + +# https://tailwindcss.com/docs/backdrop-contrast + +class BackdropContrast(Contrast): + """ + Utilities for applying contrast filters to an element. + + Attributes: + CONTRAST (str): Base class for contrast utilities. Available intensity values: + [0, 50, 75, 100, 125, 150, 200]. + """ + + CONTRAST = "backdrop" + str(Contrast.CONTRAST) + +class BackdropContrasts(TailwindDict): + pass + + +# https://tailwindcss.com/docs/backdrop-grayscale + +class BackdropGrayScale(GrayScale): + """ + Utilities for applying grayscale filters to an element. + + Attributes: + GRAYSCALE_0 (str): No grayscale applied. + GRAYSCALE (str): Applies full grayscale (100%). + """ + + GRAYSCALE_0 = "backdrop" + str(GrayScale.GRAYSCALE_0) + GRAYSCALE = "backdrop" + str(GrayScale.GRAYSCALE) + + +# https://tailwindcss.com/docs/backdrop-hue-rotate + +class BackdropHueRotate(HueRotate): + """ + Utilities for applying hue-rotate filters to an element. + + Attributes: + HUE_ROTATE (str): Applies a hue-rotate filter. Available degrees: [0, 15, 30, 60, 90, 180]. + """ + + HUE_ROTATE = "backdrop" + str(HueRotate.HUE_ROTATE) + +class BackdropHueRotateDegrees(TailwindDict): + pass + + +# https://tailwindcss.com/docs/backdrop-invert + +class BackdropInvert(Invert): + """ + Utilities for applying invert filters to an element. + + Attributes: + INVERT_0 (str): No invert applied. + INVERT (str): Applies full invert (100%). + """ + + INVERT_0 = "backdrop" + str(Invert.INVERT_0) + INVERT = "backdrop" + str(Invert.INVERT) + + +# https://tailwindcss.com/docs/backdrop-opacity + +class BackdropOpacity(Opacity): + """ + Utilities for controlling the opacity of an element. + + Attributes: + OPACITY (str): Base class for opacity utilities. Available intensity values: + [0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100]. + """ + + OPACITY = "backdrop" + str(Opacity.OPACITY) + +class BackdropOpacities(TailwindDict): + pass + + +# https://tailwindcss.com/docs/backdrop-saturate + +class BackdropSaturate(Saturate): + """ + Utilities for applying saturation filters to an element. + + Attributes: + SATURATE (str): Applies a saturation filter. Available percentages: [0, 50, 100, 150, 200]. + """ + + SATURATE = "backdrop" + str(Saturate.SATURATE) + +class BackdropSaturateValues(TailwindDict): + pass + + +# https://tailwindcss.com/docs/backdrop-sepia + +class BackdropSepia(Sepia): + """ + Utilities for applying sepia filters to an element. + + Attributes: + SEPIA_0 (str): No sepia applied. + SEPIA (str): Applies full sepia (100%). + """ + + SEPIA_0 = "backdrop" + str(Sepia.SEPIA_0) + SEPIA = "backdrop" + str(Sepia.SEPIA) \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/blur.py b/fh_tailwindcss/utility/filter/blur.py new file mode 100644 index 0000000..5ced572 --- /dev/null +++ b/fh_tailwindcss/utility/filter/blur.py @@ -0,0 +1,27 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/blur + +class Blur(TailwindEnum): + """ + Utilities for applying blur filters to an element. + + Attributes: + NONE (str): No blur applied. + SM (str): Applies a small blur (4px). + DEFAULT (str): Applies a default blur (8px). + MD (str): Applies a medium blur (12px). + LG (str): Applies a large blur (16px). + XL (str): Applies an extra-large blur (24px). + XXL (str): Applies a double extra-large blur (40px). + XXXL (str): Applies a triple extra-large blur (64px). + """ + + NONE = "blur-none" + SM = "blur-sm" + DEFAULT = "blur" + MD = "blur-md" + LG = "blur-lg" + XL = "blur-xl" + XXL = "blur-2xl" + XXXL = "blur-3xl" \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/brightness.py b/fh_tailwindcss/utility/filter/brightness.py new file mode 100644 index 0000000..fa74d51 --- /dev/null +++ b/fh_tailwindcss/utility/filter/brightness.py @@ -0,0 +1,17 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/brightness + +class Brightness(TailwindEnum): + """ + Utilities for applying brightness filters to an element. + + Attributes: + BRIGHTNESS (str): Base class for brightness utilities. Available intensity values: + [0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200]. + """ + + BRIGHTNESS = "brightness" + +class Brightnesses(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/contrast.py b/fh_tailwindcss/utility/filter/contrast.py new file mode 100644 index 0000000..7dd6453 --- /dev/null +++ b/fh_tailwindcss/utility/filter/contrast.py @@ -0,0 +1,17 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/contrast + +class Contrast(TailwindEnum): + """ + Utilities for applying contrast filters to an element. + + Attributes: + CONTRAST (str): Base class for contrast utilities. Available intensity values: + [0, 50, 75, 100, 125, 150, 200]. + """ + + CONTRAST = "contrast" + +class Contrasts(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/drop_shadow.py b/fh_tailwindcss/utility/filter/drop_shadow.py new file mode 100644 index 0000000..a2aabd9 --- /dev/null +++ b/fh_tailwindcss/utility/filter/drop_shadow.py @@ -0,0 +1,25 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/drop-shadow + +class DropShadow(TailwindEnum): + """ + Utilities for applying drop-shadow filters to an element. + + Attributes: + SM (str): Applies a small drop-shadow. + DEFAULT (str): Applies a default drop-shadow. + MD (str): Applies a medium drop-shadow. + LG (str): Applies a large drop-shadow. + XL (str): Applies an extra-large drop-shadow. + TWO_XL (str): Applies a 2x extra-large drop-shadow. + NONE (str): No drop-shadow applied. + """ + + SM = "drop-shadow-sm" + DEFAULT = "drop-shadow" + MD = "drop-shadow-md" + LG = "drop-shadow-lg" + XL = "drop-shadow-xl" + TWO_XL = "drop-shadow-2xl" + NONE = "drop-shadow-none" \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/grayscale.py b/fh_tailwindcss/utility/filter/grayscale.py new file mode 100644 index 0000000..a3d0e7f --- /dev/null +++ b/fh_tailwindcss/utility/filter/grayscale.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/grayscale + +class GrayScale(TailwindEnum): + """ + Utilities for applying grayscale filters to an element. + + Attributes: + GRAYSCALE_0 (str): No grayscale applied. + GRAYSCALE (str): Applies full grayscale (100%). + """ + + GRAYSCALE_0 = "grayscale-0" + GRAYSCALE = "grayscale" \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/hue_rotate.py b/fh_tailwindcss/utility/filter/hue_rotate.py new file mode 100644 index 0000000..78eb7b3 --- /dev/null +++ b/fh_tailwindcss/utility/filter/hue_rotate.py @@ -0,0 +1,16 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/hue-rotate + +class HueRotate(TailwindEnum): + """ + Utilities for applying hue-rotate filters to an element. + + Attributes: + HUE_ROTATE (str): Applies a hue-rotate filter. Available degrees: [0, 15, 30, 60, 90, 180]. + """ + + HUE_ROTATE = "hue-rotate" + +class HueRotateDegrees(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/filter/invert.py b/fh_tailwindcss/utility/filter/invert.py new file mode 100644 index 0000000..6613bed --- /dev/null +++ b/fh_tailwindcss/utility/filter/invert.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/invert + +class Invert(TailwindEnum): + """ + Utilities for applying invert filters to an element. + + Attributes: + INVERT_0 (str): Applies no invert filter. + INVERT (str): Applies a full invert filter. + """ + + INVERT_0 = "invert-0" + INVERT = "invert" diff --git a/fh_tailwindcss/utility/filter/saturate.py b/fh_tailwindcss/utility/filter/saturate.py new file mode 100644 index 0000000..572f1c6 --- /dev/null +++ b/fh_tailwindcss/utility/filter/saturate.py @@ -0,0 +1,16 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/saturate + +class Saturate(TailwindEnum): + """ + Utilities for applying saturation filters to an element. + + Attributes: + SATURATE (str): Applies a saturation filter. Available percentages: [0, 50, 100, 150, 200]. + """ + + SATURATE = "saturate" + +class SaturateValues(TailwindDict): + pass diff --git a/fh_tailwindcss/utility/filter/sepia.py b/fh_tailwindcss/utility/filter/sepia.py new file mode 100644 index 0000000..7b56f00 --- /dev/null +++ b/fh_tailwindcss/utility/filter/sepia.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/sepia + +class Sepia(TailwindEnum): + """ + Utilities for applying sepia filters to an element. + + Attributes: + SEPIA_0 (str): Applies no sepia filter. + SEPIA (str): Applies a sepia filter. + """ + + SEPIA_0 = "sepia-0" + SEPIA = "sepia" \ No newline at end of file diff --git a/fh_tailwindcss/utility/interactivity/__init__.py b/fh_tailwindcss/utility/interactivity/__init__.py new file mode 100644 index 0000000..618a195 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/__init__.py @@ -0,0 +1,30 @@ +from .accent_color import AccentColor, AccentColors +from .appearance import Appearance +from .caret_color import CaretColor, CaretColors +from .cursor import Cursor +from .pointer_events import PointerEvents +from .resize import Resize +from .scroll_utils import ( + ScrollBehavior, + ScrollMargin, ScrollMargins, + ScrollPadding, ScrollPaddings, + ScrollSnapAlign, + ScrollSnapStop, + ScrollSnapType, +) +from .touch_action import TouchAction +from .user_select import UserSelect +from .will_change import WillChange + +__all__ = [ + "AccentColor", "AccentColors", + "Appearance", + "CaretColor", "CaretColors", + "Cursor", "Cursors", + "PointerEvents", + "Resize", + "ScrollBehavior", "ScrollMargin", "ScrollMargins", "ScrollPadding", "ScrollPaddings", "ScrollSnapAlign", "ScrollSnapStop", "ScrollSnapType", + "TouchAction", + "UserSelect", + "WillChange", +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/interactivity/accent_color.py b/fh_tailwindcss/utility/interactivity/accent_color.py new file mode 100644 index 0000000..75bf235 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/accent_color.py @@ -0,0 +1,69 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/accent-color + +class AccentColor(TailwindEnum): + """ + Utilities for controlling the accent color of form controls. + + Attributes: + INHERIT: Use the `inherit` keyword to inherit the accent color. + CURRENT: Use the current color for the accent. + TRANSPARENT: Make the accent color transparent. + BLACK: Black accent color (no shades available). + WHITE: White accent color (no shades available). + SLATE: Slate accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + GRAY: Gray accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + ZINC: Zinc accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + NEUTRAL: Neutral accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + STONE: Stone accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + RED: Red accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + ORANGE: Orange accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + AMBER: Amber accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + YELLOW: Yellow accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + LIME: Lime accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + GREEN: Green accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + EMERALD: Emerald accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + TEAL: Teal accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + CYAN: Cyan accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + SKY: Sky accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + BLUE: Blue accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + INDIGO: Indigo accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + VIOLET: Violet accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + PURPLE: Purple accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + FUCHSIA: Fuchsia accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + PINK: Pink accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + ROSE: Rose accent color with shades 50, 100, 200, 300, 400, 500, 600, 700, 800, 900. + """ + + INHERIT = "accent-inherit" + CURRENT = "accent-current" + TRANSPARENT = "accent-transparent" + BLACK = "accent-black" + WHITE = "accent-white" + + SLATE = "accent-slate" + GRAY = "accent-gray" + ZINC = "accent-zinc" + NEUTRAL = "accent-neutral" + STONE = "accent-stone" + RED = "accent-red" + ORANGE = "accent-orange" + AMBER = "accent-amber" + YELLOW = "accent-yellow" + LIME = "accent-lime" + GREEN = "accent-green" + EMERALD = "accent-emerald" + TEAL = "accent-teal" + CYAN = "accent-cyan" + SKY = "accent-sky" + BLUE = "accent-blue" + INDIGO = "accent-indigo" + VIOLET = "accent-violet" + PURPLE = "accent-purple" + FUCHSIA = "accent-fuchsia" + PINK = "accent-pink" + ROSE = "accent-rose" + +class AccentColors(TailwindDict): + pass diff --git a/fh_tailwindcss/utility/interactivity/appearance.py b/fh_tailwindcss/utility/interactivity/appearance.py new file mode 100644 index 0000000..c4a1ea4 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/appearance.py @@ -0,0 +1,14 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/appearance + +class Appearance(TailwindEnum): + """ + Utilities for suppressing or restoring native form control styling. + + Attributes: + NONE (str): Removes the default browser styling from form controls, allowing full customization. + AUTO (str): Restores the browser's default styling for form controls. + """ + NONE = "appearance-none" + AUTO = "appearance-auto" diff --git a/fh_tailwindcss/utility/interactivity/caret_color.py b/fh_tailwindcss/utility/interactivity/caret_color.py new file mode 100644 index 0000000..e1bd820 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/caret_color.py @@ -0,0 +1,67 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/caret-color + +class CaretColor(TailwindEnum): + """ + Utilities for controlling the color of the text input cursor. + + Attributes: + INHERIT (str): Uses the parent element's caret color. + CURRENT (str): Sets the caret color to the current text color. + TRANSPARENT (str): Makes the caret color fully transparent. + BLACK (str): Applies the black color (#000). + WHITE (str): Applies the white color (#fff). + SLATE (str): Accepts shades 50-950 for slate tones (e.g., #f8fafc for 50). + GRAY (str): Accepts shades 50-950 for gray tones (e.g., #f9fafb for 50). + ZINC (str): Accepts shades 50-950 for zinc tones (e.g., #fafafa for 50). + NEUTRAL (str): Accepts shades 50-950 for neutral tones (e.g., #fafafa for 50). + STONE (str): Accepts shades 50-950 for stone tones (e.g., #fafaf9 for 50). + RED (str): Accepts shades 50-950 for red tones (e.g., #fef2f2 for 50). + ORANGE (str): Accepts shades 50-950 for orange tones (e.g., #fff7ed for 50). + AMBER (str): Accepts shades 50-950 for amber tones (e.g., #fffbeb for 50). + YELLOW (str): Accepts shades 50-950 for yellow tones (e.g., #fefce8 for 50). + LIME (str): Accepts shades 50-950 for lime tones (e.g., #f7fee7 for 50). + GREEN (str): Accepts shades 50-950 for green tones (e.g., #f0fdf4 for 50). + EMERALD (str): Accepts shades 50-950 for emerald tones (e.g., #ecfdf5 for 50). + TEAL (str): Accepts shades 50-950 for teal tones (e.g., #f0fdfa for 50). + CYAN (str): Accepts shades 50-950 for cyan tones (e.g., #ecfeff for 50). + SKY (str): Accepts shades 50-950 for sky tones (e.g., #f0f9ff for 50). + BLUE (str): Accepts shades 50-950 for blue tones (e.g., #eff6ff for 50). + INDIGO (str): Accepts shades 50-950 for indigo tones (e.g., #eef2ff for 50). + VIOLET (str): Accepts shades 50-950 for violet tones (e.g., #f5f3ff for 50). + PURPLE (str): Accepts shades 50-950 for purple tones (e.g., #faf5ff for 50). + FUCHSIA (str): Accepts shades 50-950 for fuchsia tones (e.g., #fdf4ff for 50). + PINK (str): Accepts shades 50-950 for pink tones (e.g., #fdf2f8 for 50). + ROSE (str): Accepts shades 50-950 for rose tones (e.g., #fff1f2 for 50). + """ + INHERIT = "caret-inherit" + CURRENT = "caret-current" + TRANSPARENT = "caret-transparent" + BLACK = "caret-black" + WHITE = "caret-white" + SLATE = "caret-slate" + GRAY = "caret-gray" + ZINC = "caret-zinc" + NEUTRAL = "caret-neutral" + STONE = "caret-stone" + RED = "caret-red" + ORANGE = "caret-orange" + AMBER = "caret-amber" + YELLOW = "caret-yellow" + LIME = "caret-lime" + GREEN = "caret-green" + EMERALD = "caret-emerald" + TEAL = "caret-teal" + CYAN = "caret-cyan" + SKY = "caret-sky" + BLUE = "caret-blue" + INDIGO = "caret-indigo" + VIOLET = "caret-violet" + PURPLE = "caret-purple" + FUCHSIA = "caret-fuchsia" + PINK = "caret-pink" + ROSE = "caret-rose" + +class CaretColors(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/interactivity/cursor.py b/fh_tailwindcss/utility/interactivity/cursor.py new file mode 100644 index 0000000..63406ca --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/cursor.py @@ -0,0 +1,82 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/cursor + +class Cursor(TailwindEnum): + """ + Utilities for controlling the cursor style when hovering over an element. + + Attributes: + AUTO (str): Sets the cursor style to "auto". + DEFAULT (str): Sets the cursor style to "default". + POINTER (str): Sets the cursor style to "pointer". + WAIT (str): Sets the cursor style to "wait". + TEXT (str): Sets the cursor style to "text". + MOVE (str): Sets the cursor style to "move". + HELP (str): Sets the cursor style to "help". + NOT_ALLOWED (str): Sets the cursor style to "not-allowed". + NONE (str): Hides the cursor. + CONTEXT_MENU (str): Sets the cursor style to "context-menu". + PROGRESS (str): Sets the cursor style to "progress". + CELL (str): Sets the cursor style to "cell". + CROSSHAIR (str): Sets the cursor style to "crosshair". + VERTICAL_TEXT (str): Sets the cursor style to "vertical-text". + ALIAS (str): Sets the cursor style to "alias". + COPY (str): Sets the cursor style to "copy". + NO_DROP (str): Sets the cursor style to "no-drop". + GRAB (str): Sets the cursor style to "grab". + GRABBING (str): Sets the cursor style to "grabbing". + ALL_SCROLL (str): Sets the cursor style to "all-scroll". + COL_RESIZE (str): Sets the cursor style to "col-resize". + ROW_RESIZE (str): Sets the cursor style to "row-resize". + N_RESIZE (str): Sets the cursor style to "n-resize". + E_RESIZE (str): Sets the cursor style to "e-resize". + S_RESIZE (str): Sets the cursor style to "s-resize". + W_RESIZE (str): Sets the cursor style to "w-resize". + NE_RESIZE (str): Sets the cursor style to "ne-resize". + NW_RESIZE (str): Sets the cursor style to "nw-resize". + SE_RESIZE (str): Sets the cursor style to "se-resize". + SW_RESIZE (str): Sets the cursor style to "sw-resize". + EW_RESIZE (str): Sets the cursor style to "ew-resize". + NS_RESIZE (str): Sets the cursor style to "ns-resize". + NESW_RESIZE (str): Sets the cursor style to "nesw-resize". + NWSE_RESIZE (str): Sets the cursor style to "nwse-resize". + ZOOM_IN (str): Sets the cursor style to "zoom-in". + ZOOM_OUT (str): Sets the cursor style to "zoom-out". + """ + AUTO = "cursor-auto" + DEFAULT = "cursor-default" + POINTER = "cursor-pointer" + WAIT = "cursor-wait" + TEXT = "cursor-text" + MOVE = "cursor-move" + HELP = "cursor-help" + NOT_ALLOWED = "cursor-not-allowed" + NONE = "cursor-none" + CONTEXT_MENU = "cursor-context-menu" + PROGRESS = "cursor-progress" + CELL = "cursor-cell" + CROSSHAIR = "cursor-crosshair" + VERTICAL_TEXT = "cursor-vertical-text" + ALIAS = "cursor-alias" + COPY = "cursor-copy" + NO_DROP = "cursor-no-drop" + GRAB = "cursor-grab" + GRABBING = "cursor-grabbing" + ALL_SCROLL = "cursor-all-scroll" + COL_RESIZE = "cursor-col-resize" + ROW_RESIZE = "cursor-row-resize" + N_RESIZE = "cursor-n-resize" + E_RESIZE = "cursor-e-resize" + S_RESIZE = "cursor-s-resize" + W_RESIZE = "cursor-w-resize" + NE_RESIZE = "cursor-ne-resize" + NW_RESIZE = "cursor-nw-resize" + SE_RESIZE = "cursor-se-resize" + SW_RESIZE = "cursor-sw-resize" + EW_RESIZE = "cursor-ew-resize" + NS_RESIZE = "cursor-ns-resize" + NESW_RESIZE = "cursor-nesw-resize" + NWSE_RESIZE = "cursor-nwse-resize" + ZOOM_IN = "cursor-zoom-in" + ZOOM_OUT = "cursor-zoom-out" diff --git a/fh_tailwindcss/utility/interactivity/pointer_events.py b/fh_tailwindcss/utility/interactivity/pointer_events.py new file mode 100644 index 0000000..c5a9e45 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/pointer_events.py @@ -0,0 +1,14 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/pointer-events + +class PointerEvents(TailwindEnum): + """ + Utilities for controlling whether an element responds to pointer events. + + Attributes: + NONE (str): Disables pointer events on the element (equivalent to `pointer-events: none`). + AUTO (str): Enables pointer events on the element (equivalent to `pointer-events: auto`). + """ + NONE = "pointer-events-none" + AUTO = "pointer-events-auto" diff --git a/fh_tailwindcss/utility/interactivity/resize.py b/fh_tailwindcss/utility/interactivity/resize.py new file mode 100644 index 0000000..07f9675 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/resize.py @@ -0,0 +1,16 @@ +from ...tailwind import TailwindEnum + +class Resize(TailwindEnum): + """ + Utilities for controlling how an element can be resized. + + Attributes: + NONE (str): Disables resizing on the element (equivalent to `resize: none`). + Y (str): Allows vertical resizing (equivalent to `resize: vertical`). + X (str): Allows horizontal resizing (equivalent to `resize: horizontal`). + DEFAULT (str): Allows both vertical and horizontal resizing (equivalent to `resize: both`). + """ + NONE = "resize-none" + Y = "resize-y" + X = "resize-x" + DEFAULT = "resize" diff --git a/fh_tailwindcss/utility/interactivity/scroll_utils.py b/fh_tailwindcss/utility/interactivity/scroll_utils.py new file mode 100644 index 0000000..df1cff3 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/scroll_utils.py @@ -0,0 +1,155 @@ +from ...tailwind import TailwindDict, TailwindEnum + + +# https://tailwindcss.com/docs/scroll-behavior + +class ScrollBehavior(TailwindEnum): + """ + Utilities for controlling the scroll behavior of an element. + + Attributes: + AUTO (str): Sets the scroll behavior to the default (equivalent to `scroll-behavior: auto`). + SMOOTH (str): Enables smooth scrolling (equivalent to `scroll-behavior: smooth`). + """ + AUTO = "scroll-auto" + SMOOTH = "scroll-smooth" + + +# https://tailwindcss.com/docs/scroll-margin + +class ScrollMargin(TailwindEnum): + """ + Utilities for controlling the scroll offset around items in a snap container. + + Attributes: + M (str): Defines the scroll-margin for all sides. + Possible values: '0', 'px', '0.5', '1', '1.5', '2', '2.5', '3', + '3.5', '4', '5', '6', '7', '8', '9', '10', '11', '12', '14', + '16', '20', '24', '28', '32', '36', '40', '44', '48', '52', + '56', '60', '64', '72', '80', '96', 'auto'. + MX (str): Defines the horizontal scroll-margin (left and right). + Possible values: Same as `M`. + MY (str): Defines the vertical scroll-margin (top and bottom). + Possible values: Same as `M`. + MT (str): Defines the top scroll-margin. + Possible values: Same as `M`. + MR (str): Defines the right scroll-margin. + Possible values: Same as `M`. + MB (str): Defines the bottom scroll-margin. + Possible values: Same as `M`. + ML (str): Defines the left scroll-margin. + Possible values: Same as `M`. + MS (str): Defines the start inline scroll-margin. + Possible values: Same as `M`. + ME (str): Defines the end inline scroll-margin. + Possible values: Same as `M`. + """ + M = "scroll-m" + MX = "scroll-mx" + MY = "scroll-my" + MT = "scroll-mt" + MR = "scroll-mr" + MB = "scroll-mb" + ML = "scroll-ml" + MS = "scroll-ms" + ME = "scroll-me" + +class ScrollMargins(TailwindDict): + pass + + +# https://tailwindcss.com/docs/scroll-padding + +class ScrollPadding(TailwindEnum): + """ + Utilities for controlling the scroll padding around items in a snap container. + + Attributes: + P (str): Defines the scroll-padding for all sides. + Possible values: '0', 'px', '0.5', '1', '1.5', '2', '2.5', '3', + '3.5', '4', '5', '6', '7', '8', '9', '10', '11', '12', '14', + '16', '20', '24', '28', '32', '36', '40', '44', '48', '52', + '56', '60', '64', '72', '80', '96', 'auto'. + PX (str): Defines the horizontal scroll-padding (left and right). + Possible values: Same as `P`. + PY (str): Defines the vertical scroll-padding (top and bottom). + Possible values: Same as `P`. + PT (str): Defines the top scroll-padding. + Possible values: Same as `P`. + PR (str): Defines the right scroll-padding. + Possible values: Same as `P`. + PB (str): Defines the bottom scroll-padding. + Possible values: Same as `P`. + PL (str): Defines the left scroll-padding. + Possible values: Same as `P`. + PS (str): Defines the start inline scroll-padding. + Possible values: Same as `P`. + PE (str): Defines the end inline scroll-padding. + Possible values: Same as `P`. + """ + P = "scroll-p" + PX = "scroll-px" + PY = "scroll-py" + PT = "scroll-pt" + PR = "scroll-pr" + PB = "scroll-pb" + PL = "scroll-pl" + PS = "scroll-ps" + PE = "scroll-pe" + +class ScrollPaddings(TailwindDict): + pass + + +# https://tailwindcss.com/docs/scroll-snap-align + +class ScrollSnapAlign(TailwindEnum): + """ + Utilities for controlling the alignment of snap points in a scroll container. + + Attributes: + START (str): Aligns snap points to the start of the scroll container. + CENTER (str): Aligns snap points to the center of the scroll container. + END (str): Aligns snap points to the end of the scroll container. + NONE (str): Disables alignment of snap points. + """ + START = "snap-start" + CENTER = "snap-center" + END = "snap-end" + NONE = "snap-align-none" + + +# https://tailwindcss.com/docs/scroll-snap-stop + +class ScrollSnapStop(TailwindEnum): + """ + Utilities for controlling whether the scroll container should stop on a snap point. + + Attributes: + NORMAL (str): Allows the scroll container to stop on snap points. + ALWAYS (str): Forces the scroll container to stop on snap points. + """ + NORMAL = "snap-normal" + ALWAYS = "snap-always" + + +# https://tailwindcss.com/docs/scroll-snap-type + +class ScrollSnapType(TailwindEnum): + """ + Utilities for controlling the scroll snapping behavior of an element. + + Attributes: + NONE (str): Disables scroll snapping. + MANDATORY (str): Forces the scroll container to snap to the nearest snap point. + PROXIMITY (str): Forces the scroll container to snap to the nearest snap point. + BOTH (str): Forces the scroll container to snap to the nearest snap point. + MANDATORY (str): Forces the scroll container to snap to the nearest snap point. + PROXIMITY (str): Forces the scroll container to snap to the nearest snap point. + """ + NONE = "snap-none" + MANDATORY = "snap-mandatory" + PROXIMITY = "snap-proximity" + BOTH = "snap-both" + X = "snap-x" + Y = "snap-y" diff --git a/fh_tailwindcss/utility/interactivity/touch_action.py b/fh_tailwindcss/utility/interactivity/touch_action.py new file mode 100644 index 0000000..9b056df --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/touch_action.py @@ -0,0 +1,32 @@ +from fh_tailwindcss.tailwind import TailwindEnum + +# https://tailwindcss.com/docs/touch-action + + +class TouchAction(TailwindEnum): + """ + Utilities for controlling how an element can be scrolled and zoomed on touchscreens. + + Attributes: + AUTO: Enables default browser handling for touch actions. + NONE: Disables all touch actions. + PAN_X: Allows horizontal panning. + PAN_LEFT: Enables panning only to the left. + PAN_RIGHT: Enables panning only to the right. + PAN_Y: Allows vertical panning. + PAN_UP: Enables panning only upwards. + PAN_DOWN: Enables panning only downwards. + PINCH_ZOOM: Enables pinch-to-zoom functionality. + MANIPULATION: Restricts actions to panning and pinch zooming. + """ + + AUTO = "touch-auto" + NONE = "touch-none" + PAN_X = "touch-pan-x" + PAN_LEFT = "touch-pan-left" + PAN_RIGHT = "touch-pan-right" + PAN_Y = "touch-pan-y" + PAN_UP = "touch-pan-up" + PAN_DOWN = "touch-pan-down" + PINCH_ZOOM = "touch-pinch-zoom" + MANIPULATION = "touch-manipulation" diff --git a/fh_tailwindcss/utility/interactivity/user_select.py b/fh_tailwindcss/utility/interactivity/user_select.py new file mode 100644 index 0000000..67ae49f --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/user_select.py @@ -0,0 +1,19 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/user-select + +class UserSelect(TailwindEnum): + """ + Utilities for controlling whether the user can select text in an element. + + Attributes: + NONE: Prevents text selection. + TEXT: Allows text selection. + ALL: Allows selection of all content. + AUTO: Enables default text selection behavior. + """ + + NONE = "select-none" + TEXT = "select-text" + ALL = "select-all" + AUTO = "select-auto" diff --git a/fh_tailwindcss/utility/interactivity/will_change.py b/fh_tailwindcss/utility/interactivity/will_change.py new file mode 100644 index 0000000..a55c0e7 --- /dev/null +++ b/fh_tailwindcss/utility/interactivity/will_change.py @@ -0,0 +1,19 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/will-change + +class WillChange(TailwindEnum): + """ + Utilities for optimizing upcoming animations of elements that are expected to change. + + Attributes: + AUTO: Default browser handling for changes. + SCROLL: Optimizes scroll-position changes. + CONTENTS: Optimizes content changes. + TRANSFORM: Optimizes transform property changes. + """ + + AUTO = "will-change-auto" + SCROLL = "will-change-scroll" + CONTENTS = "will-change-contents" + TRANSFORM = "will-change-transform" \ No newline at end of file diff --git a/fh_tailwindcss/utility/svg/__init__.py b/fh_tailwindcss/utility/svg/__init__.py new file mode 100644 index 0000000..a65669c --- /dev/null +++ b/fh_tailwindcss/utility/svg/__init__.py @@ -0,0 +1,9 @@ +from .fill import Fill +from .stroke import Stroke, Strokes +from .stroke_width import StrokeWidth + +__all__ = [ + "Fill", + "Stroke", "Strokes", + "StrokeWidth", +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/svg/fill.py b/fh_tailwindcss/utility/svg/fill.py new file mode 100644 index 0000000..707eeeb --- /dev/null +++ b/fh_tailwindcss/utility/svg/fill.py @@ -0,0 +1,73 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/fill + +from ...tailwind import TailwindEnum + +class Fill(TailwindEnum): + """ + Utilities for styling the fill of SVG elements. + + Attributes: + NONE (str): No fill. + INHERIT (str): Inherits the fill value from the parent element. + CURRENT (str): Uses the current text color as the fill color. + TRANSPARENT (str): Transparent fill. + BLACK (str): Black fill (#000). + WHITE (str): White fill (#fff). + SLATE (str): Slate color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + GRAY (str): Gray color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + ZINC (str): Zinc color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + NEUTRAL (str): Neutral color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + STONE (str): Stone color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + RED (str): Red color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + ORANGE (str): Orange color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + AMBER (str): Amber color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + YELLOW (str): Yellow color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + LIME (str): Lime color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + GREEN (str): Green color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + EMERALD (str): Emerald color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + TEAL (str): Teal color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + CYAN (str): Cyan color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + SKY (str): Sky color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + BLUE (str): Blue color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + INDIGO (str): Indigo color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + VIOLET (str): Violet color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + PURPLE (str): Purple color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + FUCHSIA (str): Fuchsia color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + PINK (str): Pink color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + ROSE (str): Rose color shades available in 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950. + """ + + NONE = "fill-none" + INHERIT = "fill-inherit" + CURRENT = "fill-current" + TRANSPARENT = "fill-transparent" + BLACK = "fill-black" + WHITE = "fill-white" + SLATE = "fill-slate" + GRAY = "fill-gray" + ZINC = "fill-zinc" + NEUTRAL = "fill-neutral" + STONE = "fill-stone" + RED = "fill-red" + ORANGE = "fill-orange" + AMBER = "fill-amber" + YELLOW = "fill-yellow" + LIME = "fill-lime" + GREEN = "fill-green" + EMERALD = "fill-emerald" + TEAL = "fill-teal" + CYAN = "fill-cyan" + SKY = "fill-sky" + BLUE = "fill-blue" + INDIGO = "fill-indigo" + VIOLET = "fill-violet" + PURPLE = "fill-purple" + FUCHSIA = "fill-fuchsia" + PINK = "fill-pink" + ROSE = "fill-rose" + + +class Fills(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/svg/stroke.py b/fh_tailwindcss/utility/svg/stroke.py new file mode 100644 index 0000000..c187eec --- /dev/null +++ b/fh_tailwindcss/utility/svg/stroke.py @@ -0,0 +1,70 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/stroke + +class Stroke(TailwindEnum): + """ + Utilities for styling the stroke of SVG elements. + + Attributes: + NONE (str): Represents `stroke-none` for no stroke. + INHERIT (str): Represents `stroke-inherit` for inheriting the stroke value. + CURRENT (str): Represents `stroke-current` to use the current color for the stroke. + TRANSPARENT (str): Represents `stroke-transparent` for a transparent stroke. + BLACK (str): Represents `stroke-black` for a black stroke. + WHITE (str): Represents `stroke-white` for a white stroke. + SLATE (str): Represents `stroke-slate` for slate color strokes. + GRAY (str): Represents `stroke-gray` for gray color strokes. + ZINC (str): Represents `stroke-zinc` for zinc color strokes. + NEUTRAL (str): Represents `stroke-neutral` for neutral color strokes. + STONE (str): Represents `stroke-stone` for stone color strokes. + RED (str): Represents `stroke-red` for red color strokes. + ORANGE (str): Represents `stroke-orange` for orange color strokes. + AMBER (str): Represents `stroke-amber` for amber color strokes. + YELLOW (str): Represents `stroke-yellow` for yellow color strokes. + LIME (str): Represents `stroke-lime` for lime color strokes. + GREEN (str): Represents `stroke-green` for green color strokes. + EMERALD (str): Represents `stroke-emerald` for emerald color strokes. + TEAL (str): Represents `stroke-teal` for teal color strokes. + CYAN (str): Represents `stroke-cyan` for cyan color strokes. + SKY (str): Represents `stroke-sky` for sky color strokes. + BLUE (str): Represents `stroke-blue` for blue color strokes. + INDIGO (str): Represents `stroke-indigo` for indigo color strokes. + VIOLET (str): Represents `stroke-violet` for violet color strokes. + PURPLE (str): Represents `stroke-purple` for purple color strokes. + FUCHSIA (str): Represents `stroke-fuchsia` for fuchsia color strokes. + PINK (str): Represents `stroke-pink` for pink color strokes. + ROSE (str): Represents `stroke-rose` for rose color strokes. + """ + + NONE = "stroke-none" + INHERIT = "stroke-inherit" + CURRENT = "stroke-current" + TRANSPARENT = "stroke-transparent" + BLACK = "stroke-black" + WHITE = "stroke-white" + SLATE = "stroke-slate" + GRAY = "stroke-gray" + ZINC = "stroke-zinc" + NEUTRAL = "stroke-neutral" + STONE = "stroke-stone" + RED = "stroke-red" + ORANGE = "stroke-orange" + AMBER = "stroke-amber" + YELLOW = "stroke-yellow" + LIME = "stroke-lime" + GREEN = "stroke-green" + EMERALD = "stroke-emerald" + TEAL = "stroke-teal" + CYAN = "stroke-cyan" + SKY = "stroke-sky" + BLUE = "stroke-blue" + INDIGO = "stroke-indigo" + VIOLET = "stroke-violet" + PURPLE = "stroke-purple" + FUCHSIA = "stroke-fuchsia" + PINK = "stroke-pink" + ROSE = "stroke-rose" + +class Strokes(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/svg/stroke_width.py b/fh_tailwindcss/utility/svg/stroke_width.py new file mode 100644 index 0000000..e500be5 --- /dev/null +++ b/fh_tailwindcss/utility/svg/stroke_width.py @@ -0,0 +1,17 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/stroke-width + +class StrokeWidth(TailwindEnum): + """ + Utilities for styling the stroke width of SVG elements. + + Attributes: + ZERO (str): Represents `stroke-0` for a stroke width of 0. + ONE (str): Represents `stroke-1` for a stroke width of 1. + TWO (str): Represents `stroke-2` for a stroke width of 2. + """ + + ZERO = "stroke-0" + ONE = "stroke-1" + TWO = "stroke-2" diff --git a/fh_tailwindcss/utility/table/__init__.py b/fh_tailwindcss/utility/table/__init__.py new file mode 100644 index 0000000..32fbaaf --- /dev/null +++ b/fh_tailwindcss/utility/table/__init__.py @@ -0,0 +1,11 @@ +from .border_collapse import BorderCollapse +from .border_spacing import BorderSpacing, BorderSpacings +from .caption_side import CaptionSide +from .table_layout import TableLayout + +__all__ = [ + "BorderCollapse", + "BorderSpacing", "BorderSpacings", + "CaptionSide", + "TableLayout", +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/table/border_collapse.py b/fh_tailwindcss/utility/table/border_collapse.py new file mode 100644 index 0000000..28ee75d --- /dev/null +++ b/fh_tailwindcss/utility/table/border_collapse.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/border-collapse + +class BorderCollapse(TailwindEnum): + """ + Utilities for controlling whether table borders should collapse or be separated. + + Attributes: + COLLAPSE (str): Sets table borders to collapse. + SEPARATE (str): Sets table borders to be separated. + """ + + COLLAPSE = "border-collapse" + SEPARATE = "border-separate" diff --git a/fh_tailwindcss/utility/table/border_spacing.py b/fh_tailwindcss/utility/table/border_spacing.py new file mode 100644 index 0000000..ef2763d --- /dev/null +++ b/fh_tailwindcss/utility/table/border_spacing.py @@ -0,0 +1,20 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/border-spacing + +class BorderSpacing(TailwindEnum): + """ + Utilities for controlling the spacing between table borders. + + Attributes: + SPACING (str): Sets uniform border spacing. Available options: [0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96]. + SPACING_X (str): Sets horizontal border spacing. Available options: [0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96]. + SPACING_Y (str): Sets vertical border spacing. Available options: [0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96]. + """ + + SPACING = "border-spacing" + SPACING_X = "border-spacing-x" + SPACING_Y = "border-spacing-y" + +class BorderSpacings(TailwindDict): + pass diff --git a/fh_tailwindcss/utility/table/caption_side.py b/fh_tailwindcss/utility/table/caption_side.py new file mode 100644 index 0000000..e2852a0 --- /dev/null +++ b/fh_tailwindcss/utility/table/caption_side.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/caption-side + +class CaptionSide(TailwindEnum): + """ + Utilities for controlling the alignment of a caption element inside a table. + + Attributes: + TOP (str): Aligns the caption to the top of the table. + BOTTOM (str): Aligns the caption to the bottom of the table. + """ + + TOP = "caption-top" + BOTTOM = "caption-bottom" diff --git a/fh_tailwindcss/utility/table/table_layout.py b/fh_tailwindcss/utility/table/table_layout.py new file mode 100644 index 0000000..0020f30 --- /dev/null +++ b/fh_tailwindcss/utility/table/table_layout.py @@ -0,0 +1,15 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/table-layout + +class TableLayout(TailwindEnum): + """ + Utilities for controlling the table layout algorithm. + + Attributes: + AUTO (str): Sets the table layout to auto. + FIXED (str): Sets the table layout to fixed. + """ + + AUTO = "table-auto" + FIXED = "table-fixed" diff --git a/fh_tailwindcss/utility/transform/__init__.py b/fh_tailwindcss/utility/transform/__init__.py new file mode 100644 index 0000000..ed4a392 --- /dev/null +++ b/fh_tailwindcss/utility/transform/__init__.py @@ -0,0 +1,13 @@ +from .rotate import Rotate, RotateDegrees +from .scale import Scale, ScaleValues +from .skew import Skew, SkewDegrees +from .transform_origin import TransformOrigin +from .translate import Translate, TranslateValues + +__all__ = [ + "Rotate", "RotateDegrees", + "Scale", "ScaleValues", + "Skew", "SkewDegrees", + "TransformOrigin", + "Translate", "TranslateValues", +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/transform/rotate.py b/fh_tailwindcss/utility/transform/rotate.py new file mode 100644 index 0000000..c88945a --- /dev/null +++ b/fh_tailwindcss/utility/transform/rotate.py @@ -0,0 +1,14 @@ +from ...tailwind import TailwindDict, TailwindEnum + +class Rotate(TailwindEnum): + """ + Utilities for rotating elements with transform. + + Attributes: + ROTATE (str): Rotates an element. Available options: [0, 1, 2, 3, 6, 12, 45, 90, 180]. + """ + + ROTATE = "rotate" + +class RotateDegrees(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/transform/scale.py b/fh_tailwindcss/utility/transform/scale.py new file mode 100644 index 0000000..1de0b6e --- /dev/null +++ b/fh_tailwindcss/utility/transform/scale.py @@ -0,0 +1,20 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/scale + +class Scale(TailwindEnum): + """ + Utilities for scaling elements with transform. + + Attributes: + SCALE (str): Scales an element. Available options: [0, 50, 75, 90, 95, 100, 105, 110, 125, 150]. + SCALE_X (str): Scales an element along the X axis. Available options: [0, 50, 75, 90, 95, 100, 105, 110, 125, 150]. + SCALE_Y (str): Scales an element along the Y axis. Available options: [0, 50, 75, 90, 95, 100, 105, 110, 125, 150]. + """ + + SCALE = "scale" + SCALE_X = "scale-x" + SCALE_Y = "scale-y" + +class ScaleValues(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/transform/skew.py b/fh_tailwindcss/utility/transform/skew.py new file mode 100644 index 0000000..561cb00 --- /dev/null +++ b/fh_tailwindcss/utility/transform/skew.py @@ -0,0 +1,18 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/skew + +class Skew(TailwindEnum): + """ + Utilities for skewing elements with transform. + + Attributes: + X (str): Horizontal skew. Available options: [0, 1, 2, 3, 6, 12]. + Y (str): Vertical skew. Available options: [0, 1, 2, 3, 6, 12]. + """ + + X = "skew-x" + Y = "skew-y" + +class SkewDegrees(TailwindDict): + pass diff --git a/fh_tailwindcss/utility/transform/transform_origin.py b/fh_tailwindcss/utility/transform/transform_origin.py new file mode 100644 index 0000000..ea38f8a --- /dev/null +++ b/fh_tailwindcss/utility/transform/transform_origin.py @@ -0,0 +1,29 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/transform-origin + +class TransformOrigin(TailwindEnum): + """ + Utilities for specifying the origin for an element's transformations. + + Attributes: + CENTER (str): Center origin. + TOP (str): Top origin. + TOP_RIGHT (str): Top-right origin. + RIGHT (str): Right origin. + BOTTOM_RIGHT (str): Bottom-right origin. + BOTTOM (str): Bottom origin. + BOTTOM_LEFT (str): Bottom-left origin. + LEFT (str): Left origin. + TOP_LEFT (str): Top-left origin. + """ + + CENTER = "origin-center" + TOP = "origin-top" + TOP_RIGHT = "origin-top-right" + RIGHT = "origin-right" + BOTTOM_RIGHT = "origin-bottom-right" + BOTTOM = "origin-bottom" + BOTTOM_LEFT = "origin-bottom-left" + LEFT = "origin-left" + TOP_LEFT = "origin-top-left" diff --git a/fh_tailwindcss/utility/transform/translate.py b/fh_tailwindcss/utility/transform/translate.py new file mode 100644 index 0000000..cb10055 --- /dev/null +++ b/fh_tailwindcss/utility/transform/translate.py @@ -0,0 +1,18 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/translate + +class Translate(TailwindEnum): + """ + Utilities for translating elements with transform. + + Attributes: + X (str): Horizontal translation. Available options: [0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full]. + Y (str): Vertical translation. Available options: [0, px, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 72, 80, 96, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, full]. + """ + + X = "translate-x" + Y = "translate-y" + +class TranslateValues(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/transition_and_animation/__init__.py b/fh_tailwindcss/utility/transition_and_animation/__init__.py new file mode 100644 index 0000000..2e81dfc --- /dev/null +++ b/fh_tailwindcss/utility/transition_and_animation/__init__.py @@ -0,0 +1,13 @@ +from .animation import Animation +from .transition_delay import TransitionDelay, TransitionDelays +from .transition_duration import TransitionDuration, TransitionDurations +from .transition_property import TransitionProperty +from .transition_timing_function import TransitionTimingFunction + +__all__ = [ + "Animation", + "TransitionDelay", "TransitionDelays", + "TransitionDuration", "TransitionDurations", + "TransitionProperty", + "TransitionTimingFunction", +] \ No newline at end of file diff --git a/fh_tailwindcss/utility/transition_and_animation/animation.py b/fh_tailwindcss/utility/transition_and_animation/animation.py new file mode 100644 index 0000000..cb27544 --- /dev/null +++ b/fh_tailwindcss/utility/transition_and_animation/animation.py @@ -0,0 +1,21 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/animation + +class Animation(TailwindEnum): + """ + Utilities for animating elements with CSS animations. + + Attributes: + NONE (str): Disables animation. + SPIN (str): Applies a spinning animation. + PING (str): Applies a ping animation. + PULSE (str): Applies a pulse animation. + BOUNCE (str): Applies a bouncing animation. + """ + + NONE = "animate-none" + SPIN = "animate-spin" + PING = "animate-ping" + PULSE = "animate-pulse" + BOUNCE = "animate-bounce" diff --git a/fh_tailwindcss/utility/transition_and_animation/transition_delay.py b/fh_tailwindcss/utility/transition_and_animation/transition_delay.py new file mode 100644 index 0000000..42b5d5e --- /dev/null +++ b/fh_tailwindcss/utility/transition_and_animation/transition_delay.py @@ -0,0 +1,16 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/transition-delay + +class TransitionDelay(TailwindEnum): + """ + Utilities for controlling the delay of CSS transitions. + + Attributes: + DELAY (str): Sets the transition delay. Available options: [0, 75, 100, 150, 200, 300, 500, 700, 1000] (in milliseconds). + """ + + DELAY = "delay" + +class TransitionDelays(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/transition_and_animation/transition_duration.py b/fh_tailwindcss/utility/transition_and_animation/transition_duration.py new file mode 100644 index 0000000..d076cc0 --- /dev/null +++ b/fh_tailwindcss/utility/transition_and_animation/transition_duration.py @@ -0,0 +1,16 @@ +from ...tailwind import TailwindDict, TailwindEnum + +# https://tailwindcss.com/docs/transition-duration + +class TransitionDuration(TailwindEnum): + """ + Utilities for controlling the duration of CSS transitions. + + Attributes: + DURATION (str): Sets the transition duration. Available options: [0, 75, 100, 150, 200, 300, 500, 700, 1000] (in milliseconds). + """ + + DURATION = "duration" + +class TransitionDurations(TailwindDict): + pass \ No newline at end of file diff --git a/fh_tailwindcss/utility/transition_and_animation/transition_property.py b/fh_tailwindcss/utility/transition_and_animation/transition_property.py new file mode 100644 index 0000000..b71cdb1 --- /dev/null +++ b/fh_tailwindcss/utility/transition_and_animation/transition_property.py @@ -0,0 +1,25 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/transition-property + +class TransitionProperty(TailwindEnum): + """ + Utilities for controlling which CSS properties transition. + + Attributes: + NONE (str): Disables all transitions. + ALL (str): Applies transitions to all properties. + DEFAULT (str): Applies default transitions to common properties like color, background-color, and transform. + COLORS (str): Applies transitions to color-related properties. + OPACITY (str): Applies transitions to opacity. + SHADOW (str): Applies transitions to box-shadow. + TRANSFORM (str): Applies transitions to transform. + """ + + NONE = "transition-none" + ALL = "transition-all" + DEFAULT = "transition" + COLORS = "transition-colors" + OPACITY = "transition-opacity" + SHADOW = "transition-shadow" + TRANSFORM = "transition-transform" diff --git a/fh_tailwindcss/utility/transition_and_animation/transition_timing_function.py b/fh_tailwindcss/utility/transition_and_animation/transition_timing_function.py new file mode 100644 index 0000000..ae5ce70 --- /dev/null +++ b/fh_tailwindcss/utility/transition_and_animation/transition_timing_function.py @@ -0,0 +1,19 @@ +from ...tailwind import TailwindEnum + +# https://tailwindcss.com/docs/transition-timing-function + +class TransitionTimingFunction(TailwindEnum): + """ + Utilities for controlling the easing of CSS transitions. + + Attributes: + LINEAR (str): Applies a linear easing function. + IN (str): Applies an "ease-in" cubic-bezier easing function. + OUT (str): Applies an "ease-out" cubic-bezier easing function. + IN_OUT (str): Applies an "ease-in-out" cubic-bezier easing function. + """ + + LINEAR = "ease-linear" + IN = "ease-in" + OUT = "ease-out" + IN_OUT = "ease-in-out" diff --git a/pyproject.toml b/pyproject.toml index de48206..95accba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,10 @@ build-backend = "setuptools.build_meta" name = "fh_tailwindcss" version = "0.0.3" description = "Tailwind CSS package for FastHTML." -authors = [{ name = "lmbelo", email = "lucas.belo@live.com" }] +authors = [ + { name = "lmbelo", email = "lucas.belo@live.com" }, + { name = "Priyatham10", email = "kunarapupriyatham@gmail.com"} +] dependencies = ["python-fasthtml>=0.10.1"] license = {file = "LICENSE"} readme = {file="README.md", content-type="text/markdown"}