11# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/03_daisy.ipynb.
22
3- # %% auto 0
3+ # %% auto # 0
44__all__ = ['AlertT' , 'Alert' , 'StepsT' , 'StepT' , 'Steps' , 'LiStep' , 'LoadingT' , 'Loading' , 'ToastHT' , 'ToastVT' , 'Toast' ]
55
6- # %% ../nbs/03_daisy.ipynb
6+ # %% ../nbs/03_daisy.ipynb #d623c13c
77import fasthtml .common as fh
88from .foundations import *
99from fasthtml .common import Div , Span , FT
1212from fastcore .all import *
1313
1414
15- # %% ../nbs/03_daisy.ipynb
15+ # %% ../nbs/03_daisy.ipynb #60694dc8
1616class AlertT (VEnum ):
1717 "Alert styles from DaisyUI"
1818 def _generate_next_value_ (name , start , count , last_values ): return f"alert-{ name } "
@@ -21,22 +21,22 @@ def _generate_next_value_(name, start, count, last_values): return f"alert-{name
2121 warning = auto ()
2222 error = auto ()
2323
24- # %% ../nbs/03_daisy.ipynb
24+ # %% ../nbs/03_daisy.ipynb #b2109995
2525def Alert (* c , # Content for Alert (often text and/or icon)
2626 cls = '' , # Class for the alert (often an `AlertT` option)
2727 ** kwargs # Additional arguments for outer Div
2828 )-> FT : # Div(Span(...), cls='alert', role='alert')
2929 "Alert informs users about important events."
3030 return Div (Span (* c ), cls = ('alert' , stringify (cls )), role = 'alert' , ** kwargs )
3131
32- # %% ../nbs/03_daisy.ipynb
32+ # %% ../nbs/03_daisy.ipynb #1f043eaf
3333class StepsT (VEnum ):
3434 "Options for Steps"
3535 def _generate_next_value_ (name , start , count , last_values ): return f'steps-{ name } '
3636 vertical = auto ()
3737 horizonal = auto ()
3838
39- # %% ../nbs/03_daisy.ipynb
39+ # %% ../nbs/03_daisy.ipynb #c37ed9f9
4040class StepT (VEnum ):
4141 'Step styles for LiStep'
4242 def _generate_next_value_ (name , start , count , last_values ): return f'step-{ name } '
@@ -49,7 +49,7 @@ def _generate_next_value_(name, start, count, last_values): return f'step-{name}
4949 error = auto ()
5050 neutral = auto ()
5151
52- # %% ../nbs/03_daisy.ipynb
52+ # %% ../nbs/03_daisy.ipynb #21a7d741
5353def Steps (* li , # Each `Li` represent a step (generally use `LiStep`)
5454 cls = '' , # class for Steps (generally a `StepsT` option)
5555 ** kwargs # Additional args for outer wrapper (`Ul` component)
@@ -65,7 +65,7 @@ def LiStep(*c, # Description for Step that goes next to bubble (often text)
6565 "Creates a step list item"
6666 return Li (* c , cls = ('step' , stringify (cls )), data_content = data_content , ** kwargs )
6767
68- # %% ../nbs/03_daisy.ipynb
68+ # %% ../nbs/03_daisy.ipynb #5e8838cf
6969class LoadingT (VEnum ):
7070 def _generate_next_value_ (name , start , count , last_values ): return f'loading-{ name } '
7171 spinner = auto ()
@@ -80,7 +80,7 @@ def _generate_next_value_(name, start, count, last_values): return f'loading-{na
8080 md = 'loading-medium'
8181 lg = 'loading-large'
8282
83- # %% ../nbs/03_daisy.ipynb
83+ # %% ../nbs/03_daisy.ipynb #a7902bff
8484def Loading (cls = (LoadingT .bars , LoadingT .lg ), # Classes for indicator (generally `LoadingT` options)
8585 htmx_indicator = False , # Add htmx-indicator class
8686 ** kwargs # additional args for outer conainter (`Span`)
@@ -90,7 +90,7 @@ def Loading(cls=(LoadingT.bars, LoadingT.lg), # Classes for indicator (generally
9090 if htmx_indicator : classes .append ('htmx-indicator' )
9191 return Span (cls = classes , ** kwargs )
9292
93- # %% ../nbs/03_daisy.ipynb
93+ # %% ../nbs/03_daisy.ipynb #a2c99d2e
9494class ToastHT (VEnum ):
9595 "Horizontal position for Toast"
9696 def _generate_next_value_ (name , start , count , last_values ): return f'toast-{ name } '
@@ -105,7 +105,7 @@ def _generate_next_value_(name, start, count, last_values): return f'toast-{name
105105 middle = auto ()
106106 bottom = auto ()
107107
108- # %% ../nbs/03_daisy.ipynb
108+ # %% ../nbs/03_daisy.ipynb #c57bac21
109109def Toast (* c , # Content for toast (often test)
110110 cls = '' , # Classes for toast (often `ToastHT` and `ToastVT` options)
111111 alert_cls = '' , # classes for altert (often `AlertT` options)
0 commit comments