Current section
5 Versions
Jump to
Current section
5 Versions
Compare versions
35
files changed
+830
additions
-408
deletions
| @@ -18,9 +18,9 @@ Latest supported version is [Basecoat v0.3.11](https://github.com/hunvreus/basec | |
| 18 18 | GitHub Pages Demo: <https://daniellionel01.github.io/glaze/glaze_basecoat/> |
| 19 19 | |
| 20 20 | Example projects: |
| 21 | - - [Lustre SPA](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/examples/lustre_spa/) |
| 22 | - - [Wisp server (w/ CDN imports)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/examples/wisper_server_cdn/) |
| 23 | - - [Wisp server (w/ Tailwind CLI)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/examples/wisper_server_tw_cli/) |
| 21 | + - [Lustre SPA](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/glaze_basecoat/examples/lustre_spa/) |
| 22 | + - [Wisp server (w/ CDN imports)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/glaze_basecoat/examples/wisper_server_cdn/) |
| 23 | + - [Wisp server (w/ Tailwind CLI)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/glaze_basecoat/examples/wisper_server_tw_cli/) |
| 24 24 | |
| 25 25 | ## Getting Started |
| 26 26 | |
| @@ -193,9 +193,9 @@ Lucide docs: <https://lucide.dev/guide/packages/lucide> | |
| 193 193 | This library constructs HTML elements the same way on a client or on a server, so it is compatible in both environments. |
| 194 194 | |
| 195 195 | Example projects: |
| 196 | - - [Lustre SPA](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/examples/lustre_spa/) |
| 197 | - - [Wisp server (w/ CDN imports)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/examples/wisper_server_cdn/) |
| 198 | - - [Wisp server (w/ Tailwind CLI)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/examples/wisper_server_tw_cli/) |
| 196 | + - [Lustre SPA](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/glaze_basecoat/examples/lustre_spa/) |
| 197 | + - [Wisp server (w/ CDN imports)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/glaze_basecoat/examples/wisper_server_cdn/) |
| 198 | + - [Wisp server (w/ Tailwind CLI)](https://github.com/daniellionel01/glaze/blob/basecoat-v3.0.0/glaze_basecoat/examples/wisper_server_tw_cli/) |
| 199 199 | |
| 200 200 | ## Development |
| @@ -1,5 +1,5 @@ | |
| 1 1 | name = "glaze_basecoat" |
| 2 | - version = "3.0.0" |
| 2 | + version = "3.1.0" |
| 3 3 | description = "🍩 Lustre Bindings to Basecoat UI Components" |
| 4 4 | |
| 5 5 | licences = ["Apache-2.0"] |
| @@ -1,6 +1,6 @@ | |
| 1 1 | {<<"name">>, <<"glaze_basecoat">>}. |
| 2 2 | {<<"app">>, <<"glaze_basecoat">>}. |
| 3 | - {<<"version">>, <<"3.0.0">>}. |
| 3 | + {<<"version">>, <<"3.1.0">>}. |
| 4 4 | {<<"description">>, <<"🍩 Lustre Bindings to Basecoat UI Components"/utf8>>}. |
| 5 5 | {<<"licenses">>, [<<"Apache-2.0">>]}. |
| 6 6 | {<<"build_tools">>, [<<"gleam">>]}. |
| @@ -9,16 +9,16 @@ | |
| 9 9 | {<<"Repository">>, <<"https://github.com/daniellionel01/glaze">>} |
| 10 10 | ]}. |
| 11 11 | {<<"requirements">>, [ |
| 12 | - {<<"gleam_stdlib">>, [ |
| 13 | - {<<"app">>, <<"gleam_stdlib">>}, |
| 14 | - {<<"optional">>, false}, |
| 15 | - {<<"requirement">>, <<">= 0.44.0 and < 2.0.0">>} |
| 16 | - ]}, |
| 17 12 | {<<"gleam_json">>, [ |
| 18 13 | {<<"app">>, <<"gleam_json">>}, |
| 19 14 | {<<"optional">>, false}, |
| 20 15 | {<<"requirement">>, <<">= 3.1.0 and < 4.0.0">>} |
| 21 16 | ]}, |
| 17 | + {<<"gleam_stdlib">>, [ |
| 18 | + {<<"app">>, <<"gleam_stdlib">>}, |
| 19 | + {<<"optional">>, false}, |
| 20 | + {<<"requirement">>, <<">= 0.44.0 and < 2.0.0">>} |
| 21 | + ]}, |
| 22 22 | {<<"lustre">>, [ |
| 23 23 | {<<"app">>, <<"lustre">>}, |
| 24 24 | {<<"optional">>, false}, |
| @@ -64,8 +64,10 @@ | |
| 64 64 | //// |
| 65 65 | //// ## Sizes |
| 66 66 | //// |
| 67 | - //// - [`small`](#small) - Small button |
| 68 | - //// - [`large`](#large) - Large button |
| 67 | + //// Size can be set via the [`small`](#small) or [`large`](#large) attribute |
| 68 | + //// helpers when using a primary button. For other variants, pass the size to |
| 69 | + //// the variant function directly (e.g., `outline_sm`, `destructive_lg`) to |
| 70 | + //// produce the correct compound CSS class (e.g., `btn-sm-outline`). |
| 69 71 | //// |
| 70 72 | |
| 71 73 | import lustre/attribute.{type Attribute} |
| @@ -216,6 +218,184 @@ pub fn large() -> Attribute(msg) { | |
| 216 218 | attribute.class("btn-lg") |
| 217 219 | } |
| 218 220 | |
| 221 | + // -- Small variant buttons -------------------------------------------------- |
| 222 | + |
| 223 | + pub fn secondary_sm( |
| 224 | + attrs: List(Attribute(msg)), |
| 225 | + children: List(Element(msg)), |
| 226 | + ) -> Element(msg) { |
| 227 | + html.button( |
| 228 | + [attribute.class("btn-sm-secondary"), attribute.type_("button"), ..attrs], |
| 229 | + children, |
| 230 | + ) |
| 231 | + } |
| 232 | + |
| 233 | + pub fn destructive_sm( |
| 234 | + attrs: List(Attribute(msg)), |
| 235 | + children: List(Element(msg)), |
| 236 | + ) -> Element(msg) { |
| 237 | + html.button( |
| 238 | + [attribute.class("btn-sm-destructive"), attribute.type_("button"), ..attrs], |
| 239 | + children, |
| 240 | + ) |
| 241 | + } |
| 242 | + |
| 243 | + pub fn outline_sm( |
| 244 | + attrs: List(Attribute(msg)), |
| 245 | + children: List(Element(msg)), |
| 246 | + ) -> Element(msg) { |
| 247 | + html.button( |
| 248 | + [attribute.class("btn-sm-outline"), attribute.type_("button"), ..attrs], |
| 249 | + children, |
| 250 | + ) |
| 251 | + } |
| 252 | + |
| 253 | + pub fn ghost_sm( |
| 254 | + attrs: List(Attribute(msg)), |
| 255 | + children: List(Element(msg)), |
| 256 | + ) -> Element(msg) { |
| 257 | + html.button( |
| 258 | + [attribute.class("btn-sm-ghost"), attribute.type_("button"), ..attrs], |
| 259 | + children, |
| 260 | + ) |
| 261 | + } |
| 262 | + |
| 263 | + pub fn link_style_sm( |
| 264 | + attrs: List(Attribute(msg)), |
| 265 | + children: List(Element(msg)), |
| 266 | + ) -> Element(msg) { |
| 267 | + html.button( |
| 268 | + [attribute.class("btn-sm-link"), attribute.type_("button"), ..attrs], |
| 269 | + children, |
| 270 | + ) |
| 271 | + } |
| 272 | + |
| 273 | + // -- Large variant buttons -------------------------------------------------- |
| 274 | + |
| 275 | + pub fn secondary_lg( |
| 276 | + attrs: List(Attribute(msg)), |
| 277 | + children: List(Element(msg)), |
| 278 | + ) -> Element(msg) { |
| 279 | + html.button( |
| 280 | + [attribute.class("btn-lg-secondary"), attribute.type_("button"), ..attrs], |
| 281 | + children, |
| 282 | + ) |
| 283 | + } |
| 284 | + |
| 285 | + pub fn destructive_lg( |
| 286 | + attrs: List(Attribute(msg)), |
| 287 | + children: List(Element(msg)), |
| 288 | + ) -> Element(msg) { |
| 289 | + html.button( |
| 290 | + [attribute.class("btn-lg-destructive"), attribute.type_("button"), ..attrs], |
| 291 | + children, |
| 292 | + ) |
| 293 | + } |
| 294 | + |
| 295 | + pub fn outline_lg( |
| 296 | + attrs: List(Attribute(msg)), |
| 297 | + children: List(Element(msg)), |
| 298 | + ) -> Element(msg) { |
| 299 | + html.button( |
| 300 | + [attribute.class("btn-lg-outline"), attribute.type_("button"), ..attrs], |
| 301 | + children, |
| 302 | + ) |
| 303 | + } |
| 304 | + |
| 305 | + pub fn ghost_lg( |
| 306 | + attrs: List(Attribute(msg)), |
| 307 | + children: List(Element(msg)), |
| 308 | + ) -> Element(msg) { |
| 309 | + html.button( |
| 310 | + [attribute.class("btn-lg-ghost"), attribute.type_("button"), ..attrs], |
| 311 | + children, |
| 312 | + ) |
| 313 | + } |
| 314 | + |
| 315 | + pub fn link_style_lg( |
| 316 | + attrs: List(Attribute(msg)), |
| 317 | + children: List(Element(msg)), |
| 318 | + ) -> Element(msg) { |
| 319 | + html.button( |
| 320 | + [attribute.class("btn-lg-link"), attribute.type_("button"), ..attrs], |
| 321 | + children, |
| 322 | + ) |
| 323 | + } |
| 324 | + |
| 325 | + // -- Small variant links ---------------------------------------------------- |
| 326 | + |
| 327 | + pub fn link_sm( |
| 328 | + attrs: List(Attribute(msg)), |
| 329 | + children: List(Element(msg)), |
| 330 | + ) -> Element(msg) { |
| 331 | + html.a([attribute.class("btn-sm"), ..attrs], children) |
| 332 | + } |
| 333 | + |
| 334 | + pub fn link_secondary_sm( |
| 335 | + attrs: List(Attribute(msg)), |
| 336 | + children: List(Element(msg)), |
| 337 | + ) -> Element(msg) { |
| 338 | + html.a([attribute.class("btn-sm-secondary"), ..attrs], children) |
| 339 | + } |
| 340 | + |
| 341 | + pub fn link_outline_sm( |
| 342 | + attrs: List(Attribute(msg)), |
| 343 | + children: List(Element(msg)), |
| 344 | + ) -> Element(msg) { |
| 345 | + html.a([attribute.class("btn-sm-outline"), ..attrs], children) |
| 346 | + } |
| 347 | + |
| 348 | + pub fn link_ghost_sm( |
| 349 | + attrs: List(Attribute(msg)), |
| 350 | + children: List(Element(msg)), |
| 351 | + ) -> Element(msg) { |
| 352 | + html.a([attribute.class("btn-sm-ghost"), ..attrs], children) |
| 353 | + } |
| 354 | + |
| 355 | + pub fn link_destructive_sm( |
| 356 | + attrs: List(Attribute(msg)), |
| 357 | + children: List(Element(msg)), |
| 358 | + ) -> Element(msg) { |
| 359 | + html.a([attribute.class("btn-sm-destructive"), ..attrs], children) |
| 360 | + } |
| 361 | + |
| 362 | + // -- Large variant links ---------------------------------------------------- |
| 363 | + |
| 364 | + pub fn link_lg( |
| 365 | + attrs: List(Attribute(msg)), |
| 366 | + children: List(Element(msg)), |
| 367 | + ) -> Element(msg) { |
| 368 | + html.a([attribute.class("btn-lg"), ..attrs], children) |
| 369 | + } |
| 370 | + |
| 371 | + pub fn link_secondary_lg( |
| 372 | + attrs: List(Attribute(msg)), |
| 373 | + children: List(Element(msg)), |
| 374 | + ) -> Element(msg) { |
| 375 | + html.a([attribute.class("btn-lg-secondary"), ..attrs], children) |
| 376 | + } |
| 377 | + |
| 378 | + pub fn link_outline_lg( |
| 379 | + attrs: List(Attribute(msg)), |
| 380 | + children: List(Element(msg)), |
| 381 | + ) -> Element(msg) { |
| 382 | + html.a([attribute.class("btn-lg-outline"), ..attrs], children) |
| 383 | + } |
| 384 | + |
| 385 | + pub fn link_ghost_lg( |
| 386 | + attrs: List(Attribute(msg)), |
| 387 | + children: List(Element(msg)), |
| 388 | + ) -> Element(msg) { |
| 389 | + html.a([attribute.class("btn-lg-ghost"), ..attrs], children) |
| 390 | + } |
| 391 | + |
| 392 | + pub fn link_destructive_lg( |
| 393 | + attrs: List(Attribute(msg)), |
| 394 | + children: List(Element(msg)), |
| 395 | + ) -> Element(msg) { |
| 396 | + html.a([attribute.class("btn-lg-destructive"), ..attrs], children) |
| 397 | + } |
| 398 | + |
| 219 399 | pub fn full_width() -> Attribute(msg) { |
| 220 400 | attribute.class("w-full") |
| 221 401 | } |
| @@ -1,7 +1,7 @@ | |
| 1 1 | -module(glaze@basecoat@button). |
| 2 2 | -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]). |
| 3 3 | -define(FILEPATH, "src/glaze/basecoat/button.gleam"). |
| 4 | - -export([group/2, button/2, secondary/2, destructive/2, outline/2, ghost/2, link_style/2, icon/2, icon_outline/2, icon_destructive/2, link/2, link_secondary/2, link_outline/2, link_ghost/2, link_destructive/2, small/0, large/0, full_width/0, disabled/0, loading/0, submit/2, reset/2]). |
| 4 | + -export([group/2, button/2, secondary/2, destructive/2, outline/2, ghost/2, link_style/2, icon/2, icon_outline/2, icon_destructive/2, link/2, link_secondary/2, link_outline/2, link_ghost/2, link_destructive/2, small/0, large/0, secondary_sm/2, destructive_sm/2, outline_sm/2, ghost_sm/2, link_style_sm/2, secondary_lg/2, destructive_lg/2, outline_lg/2, ghost_lg/2, link_style_lg/2, link_sm/2, link_secondary_sm/2, link_outline_sm/2, link_ghost_sm/2, link_destructive_sm/2, link_lg/2, link_secondary_lg/2, link_outline_lg/2, link_ghost_lg/2, link_destructive_lg/2, full_width/0, disabled/0, loading/0, submit/2, reset/2]). |
| 5 5 | |
| 6 6 | -if(?OTP_RELEASE >= 27). |
| 7 7 | -define(MODULEDOC(Str), -moduledoc(Str)). |
| @@ -78,12 +78,14 @@ | |
| 78 78 | "\n" |
| 79 79 | " ## Sizes\n" |
| 80 80 | "\n" |
| 81 | - " - [`small`](#small) - Small button\n" |
| 82 | - " - [`large`](#large) - Large button\n" |
| 81 | + " Size can be set via the [`small`](#small) or [`large`](#large) attribute\n" |
| 82 | + " helpers when using a primary button. For other variants, pass the size to\n" |
| 83 | + " the variant function directly (e.g., `outline_sm`, `destructive_lg`) to\n" |
| 84 | + " produce the correct compound CSS class (e.g., `btn-sm-outline`).\n" |
| 83 85 | "\n" |
| 84 86 | ). |
| 85 87 | |
| 86 | - -file("src/glaze/basecoat/button.gleam", 75). |
| 88 | + -file("src/glaze/basecoat/button.gleam", 77). |
| 87 89 | -spec group( |
| 88 90 | list(lustre@vdom@vattr:attribute(PQD)), |
| 89 91 | list(lustre@vdom@vnode:element(PQD)) |
| @@ -94,7 +96,7 @@ group(Attrs, Children) -> | |
| 94 96 | Children |
| 95 97 | ). |
| 96 98 | |
| 97 | - -file("src/glaze/basecoat/button.gleam", 82). |
| 99 | + -file("src/glaze/basecoat/button.gleam", 84). |
| 98 100 | -spec button( |
| 99 101 | list(lustre@vdom@vattr:attribute(PQJ)), |
| 100 102 | list(lustre@vdom@vnode:element(PQJ)) |
| @@ -107,7 +109,7 @@ button(Attrs, Children) -> | |
| 107 109 | Children |
| 108 110 | ). |
| 109 111 | |
| 110 | - -file("src/glaze/basecoat/button.gleam", 92). |
| 112 | + -file("src/glaze/basecoat/button.gleam", 94). |
| 111 113 | -spec secondary( |
| 112 114 | list(lustre@vdom@vattr:attribute(PQP)), |
| 113 115 | list(lustre@vdom@vnode:element(PQP)) |
| @@ -120,7 +122,7 @@ secondary(Attrs, Children) -> | |
| 120 122 | Children |
| 121 123 | ). |
| 122 124 | |
| 123 | - -file("src/glaze/basecoat/button.gleam", 102). |
| 125 | + -file("src/glaze/basecoat/button.gleam", 104). |
| 124 126 | -spec destructive( |
| 125 127 | list(lustre@vdom@vattr:attribute(PQV)), |
| 126 128 | list(lustre@vdom@vnode:element(PQV)) |
| @@ -133,7 +135,7 @@ destructive(Attrs, Children) -> | |
| 133 135 | Children |
| 134 136 | ). |
| 135 137 | |
| 136 | - -file("src/glaze/basecoat/button.gleam", 112). |
| 138 | + -file("src/glaze/basecoat/button.gleam", 114). |
| 137 139 | -spec outline( |
| 138 140 | list(lustre@vdom@vattr:attribute(PRB)), |
| 139 141 | list(lustre@vdom@vnode:element(PRB)) |
| @@ -146,7 +148,7 @@ outline(Attrs, Children) -> | |
| 146 148 | Children |
| 147 149 | ). |
| 148 150 | |
| 149 | - -file("src/glaze/basecoat/button.gleam", 122). |
| 151 | + -file("src/glaze/basecoat/button.gleam", 124). |
| 150 152 | -spec ghost( |
| 151 153 | list(lustre@vdom@vattr:attribute(PRH)), |
| 152 154 | list(lustre@vdom@vnode:element(PRH)) |
| @@ -159,7 +161,7 @@ ghost(Attrs, Children) -> | |
| 159 161 | Children |
| 160 162 | ). |
| 161 163 | |
| 162 | - -file("src/glaze/basecoat/button.gleam", 132). |
| 164 | + -file("src/glaze/basecoat/button.gleam", 134). |
| 163 165 | -spec link_style( |
| 164 166 | list(lustre@vdom@vattr:attribute(PRN)), |
| 165 167 | list(lustre@vdom@vnode:element(PRN)) |
| @@ -172,7 +174,7 @@ link_style(Attrs, Children) -> | |
| 172 174 | Children |
| 173 175 | ). |
| 174 176 | |
| 175 | - -file("src/glaze/basecoat/button.gleam", 142). |
| 177 | + -file("src/glaze/basecoat/button.gleam", 144). |
| 176 178 | -spec icon( |
| 177 179 | list(lustre@vdom@vattr:attribute(PRT)), |
| 178 180 | list(lustre@vdom@vnode:element(PRT)) |
| @@ -185,7 +187,7 @@ icon(Attrs, Children) -> | |
| 185 187 | Children |
| 186 188 | ). |
| 187 189 | |
| 188 | - -file("src/glaze/basecoat/button.gleam", 152). |
| 190 | + -file("src/glaze/basecoat/button.gleam", 154). |
| 189 191 | -spec icon_outline( |
| 190 192 | list(lustre@vdom@vattr:attribute(PRZ)), |
| 191 193 | list(lustre@vdom@vnode:element(PRZ)) |
| @@ -198,7 +200,7 @@ icon_outline(Attrs, Children) -> | |
| 198 200 | Children |
| 199 201 | ). |
| 200 202 | |
| 201 | - -file("src/glaze/basecoat/button.gleam", 162). |
| 203 | + -file("src/glaze/basecoat/button.gleam", 164). |
| 202 204 | -spec icon_destructive( |
| 203 205 | list(lustre@vdom@vattr:attribute(PSF)), |
| 204 206 | list(lustre@vdom@vnode:element(PSF)) |
| @@ -211,7 +213,7 @@ icon_destructive(Attrs, Children) -> | |
| 211 213 | Children |
| 212 214 | ). |
| 213 215 | |
| 214 | - -file("src/glaze/basecoat/button.gleam", 176). |
| 216 | + -file("src/glaze/basecoat/button.gleam", 178). |
| 215 217 | -spec link( |
| 216 218 | list(lustre@vdom@vattr:attribute(PSL)), |
| 217 219 | list(lustre@vdom@vnode:element(PSL)) |
| @@ -222,7 +224,7 @@ link(Attrs, Children) -> | |
| 222 224 | Children |
| 223 225 | ). |
| 224 226 | |
| 225 | - -file("src/glaze/basecoat/button.gleam", 183). |
| 227 | + -file("src/glaze/basecoat/button.gleam", 185). |
| 226 228 | -spec link_secondary( |
| 227 229 | list(lustre@vdom@vattr:attribute(PSR)), |
| 228 230 | list(lustre@vdom@vnode:element(PSR)) |
| @@ -233,7 +235,7 @@ link_secondary(Attrs, Children) -> | |
| 233 235 | Children |
| 234 236 | ). |
| 235 237 | |
| 236 | - -file("src/glaze/basecoat/button.gleam", 190). |
| 238 | + -file("src/glaze/basecoat/button.gleam", 192). |
| 237 239 | -spec link_outline( |
| 238 240 | list(lustre@vdom@vattr:attribute(PSX)), |
| 239 241 | list(lustre@vdom@vnode:element(PSX)) |
| @@ -244,7 +246,7 @@ link_outline(Attrs, Children) -> | |
| 244 246 | Children |
| 245 247 | ). |
| 246 248 | |
| 247 | - -file("src/glaze/basecoat/button.gleam", 197). |
| 249 | + -file("src/glaze/basecoat/button.gleam", 199). |
| 248 250 | -spec link_ghost( |
| 249 251 | list(lustre@vdom@vattr:attribute(PTD)), |
| 250 252 | list(lustre@vdom@vnode:element(PTD)) |
| @@ -255,7 +257,7 @@ link_ghost(Attrs, Children) -> | |
| 255 257 | Children |
| 256 258 | ). |
| 257 259 | |
| 258 | - -file("src/glaze/basecoat/button.gleam", 204). |
| 260 | + -file("src/glaze/basecoat/button.gleam", 206). |
| 259 261 | -spec link_destructive( |
| 260 262 | list(lustre@vdom@vattr:attribute(PTJ)), |
| 261 263 | list(lustre@vdom@vnode:element(PTJ)) |
| @@ -266,36 +268,276 @@ link_destructive(Attrs, Children) -> | |
| 266 268 | Children |
| 267 269 | ). |
| 268 270 | |
| 269 | - -file("src/glaze/basecoat/button.gleam", 211). |
| 271 | + -file("src/glaze/basecoat/button.gleam", 213). |
| 270 272 | -spec small() -> lustre@vdom@vattr:attribute(any()). |
| 271 273 | small() -> |
| 272 274 | lustre@attribute:class(<<"btn-sm"/utf8>>). |
| 273 275 | |
| 274 | - -file("src/glaze/basecoat/button.gleam", 215). |
| 276 | + -file("src/glaze/basecoat/button.gleam", 217). |
| 275 277 | -spec large() -> lustre@vdom@vattr:attribute(any()). |
| 276 278 | large() -> |
| 277 279 | lustre@attribute:class(<<"btn-lg"/utf8>>). |
| 278 280 | |
| 279 | - -file("src/glaze/basecoat/button.gleam", 219). |
| 281 | + -file("src/glaze/basecoat/button.gleam", 223). |
| 282 | + -spec secondary_sm( |
| 283 | + list(lustre@vdom@vattr:attribute(PTT)), |
| 284 | + list(lustre@vdom@vnode:element(PTT)) |
| 285 | + ) -> lustre@vdom@vnode:element(PTT). |
| 286 | + secondary_sm(Attrs, Children) -> |
| 287 | + lustre@element@html:button( |
| 288 | + [lustre@attribute:class(<<"btn-sm-secondary"/utf8>>), |
| 289 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 290 | + Attrs], |
| 291 | + Children |
| 292 | + ). |
| 293 | + |
| 294 | + -file("src/glaze/basecoat/button.gleam", 233). |
| 295 | + -spec destructive_sm( |
| 296 | + list(lustre@vdom@vattr:attribute(PTZ)), |
| 297 | + list(lustre@vdom@vnode:element(PTZ)) |
| 298 | + ) -> lustre@vdom@vnode:element(PTZ). |
| 299 | + destructive_sm(Attrs, Children) -> |
| 300 | + lustre@element@html:button( |
| 301 | + [lustre@attribute:class(<<"btn-sm-destructive"/utf8>>), |
| 302 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 303 | + Attrs], |
| 304 | + Children |
| 305 | + ). |
| 306 | + |
| 307 | + -file("src/glaze/basecoat/button.gleam", 243). |
| 308 | + -spec outline_sm( |
| 309 | + list(lustre@vdom@vattr:attribute(PUF)), |
| 310 | + list(lustre@vdom@vnode:element(PUF)) |
| 311 | + ) -> lustre@vdom@vnode:element(PUF). |
| 312 | + outline_sm(Attrs, Children) -> |
| 313 | + lustre@element@html:button( |
| 314 | + [lustre@attribute:class(<<"btn-sm-outline"/utf8>>), |
| 315 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 316 | + Attrs], |
| 317 | + Children |
| 318 | + ). |
| 319 | + |
| 320 | + -file("src/glaze/basecoat/button.gleam", 253). |
| 321 | + -spec ghost_sm( |
| 322 | + list(lustre@vdom@vattr:attribute(PUL)), |
| 323 | + list(lustre@vdom@vnode:element(PUL)) |
| 324 | + ) -> lustre@vdom@vnode:element(PUL). |
| 325 | + ghost_sm(Attrs, Children) -> |
| 326 | + lustre@element@html:button( |
| 327 | + [lustre@attribute:class(<<"btn-sm-ghost"/utf8>>), |
| 328 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 329 | + Attrs], |
| 330 | + Children |
| 331 | + ). |
| 332 | + |
| 333 | + -file("src/glaze/basecoat/button.gleam", 263). |
| 334 | + -spec link_style_sm( |
| 335 | + list(lustre@vdom@vattr:attribute(PUR)), |
| 336 | + list(lustre@vdom@vnode:element(PUR)) |
| 337 | + ) -> lustre@vdom@vnode:element(PUR). |
| 338 | + link_style_sm(Attrs, Children) -> |
| 339 | + lustre@element@html:button( |
| 340 | + [lustre@attribute:class(<<"btn-sm-link"/utf8>>), |
| 341 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 342 | + Attrs], |
| 343 | + Children |
| 344 | + ). |
| 345 | + |
| 346 | + -file("src/glaze/basecoat/button.gleam", 275). |
| 347 | + -spec secondary_lg( |
| 348 | + list(lustre@vdom@vattr:attribute(PUX)), |
| 349 | + list(lustre@vdom@vnode:element(PUX)) |
| 350 | + ) -> lustre@vdom@vnode:element(PUX). |
| 351 | + secondary_lg(Attrs, Children) -> |
| 352 | + lustre@element@html:button( |
| 353 | + [lustre@attribute:class(<<"btn-lg-secondary"/utf8>>), |
| 354 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 355 | + Attrs], |
| 356 | + Children |
| 357 | + ). |
| 358 | + |
| 359 | + -file("src/glaze/basecoat/button.gleam", 285). |
| 360 | + -spec destructive_lg( |
| 361 | + list(lustre@vdom@vattr:attribute(PVD)), |
| 362 | + list(lustre@vdom@vnode:element(PVD)) |
| 363 | + ) -> lustre@vdom@vnode:element(PVD). |
| 364 | + destructive_lg(Attrs, Children) -> |
| 365 | + lustre@element@html:button( |
| 366 | + [lustre@attribute:class(<<"btn-lg-destructive"/utf8>>), |
| 367 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 368 | + Attrs], |
| 369 | + Children |
| 370 | + ). |
| 371 | + |
| 372 | + -file("src/glaze/basecoat/button.gleam", 295). |
| 373 | + -spec outline_lg( |
| 374 | + list(lustre@vdom@vattr:attribute(PVJ)), |
| 375 | + list(lustre@vdom@vnode:element(PVJ)) |
| 376 | + ) -> lustre@vdom@vnode:element(PVJ). |
| 377 | + outline_lg(Attrs, Children) -> |
| 378 | + lustre@element@html:button( |
| 379 | + [lustre@attribute:class(<<"btn-lg-outline"/utf8>>), |
| 380 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 381 | + Attrs], |
| 382 | + Children |
| 383 | + ). |
| 384 | + |
| 385 | + -file("src/glaze/basecoat/button.gleam", 305). |
| 386 | + -spec ghost_lg( |
| 387 | + list(lustre@vdom@vattr:attribute(PVP)), |
| 388 | + list(lustre@vdom@vnode:element(PVP)) |
| 389 | + ) -> lustre@vdom@vnode:element(PVP). |
| 390 | + ghost_lg(Attrs, Children) -> |
| 391 | + lustre@element@html:button( |
| 392 | + [lustre@attribute:class(<<"btn-lg-ghost"/utf8>>), |
| 393 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 394 | + Attrs], |
| 395 | + Children |
| 396 | + ). |
| 397 | + |
| 398 | + -file("src/glaze/basecoat/button.gleam", 315). |
| 399 | + -spec link_style_lg( |
| 400 | + list(lustre@vdom@vattr:attribute(PVV)), |
| 401 | + list(lustre@vdom@vnode:element(PVV)) |
| 402 | + ) -> lustre@vdom@vnode:element(PVV). |
| 403 | + link_style_lg(Attrs, Children) -> |
| 404 | + lustre@element@html:button( |
| 405 | + [lustre@attribute:class(<<"btn-lg-link"/utf8>>), |
| 406 | + lustre@attribute:type_(<<"button"/utf8>>) | |
| 407 | + Attrs], |
| 408 | + Children |
| 409 | + ). |
| 410 | + |
| 411 | + -file("src/glaze/basecoat/button.gleam", 327). |
| 412 | + -spec link_sm( |
| 413 | + list(lustre@vdom@vattr:attribute(PWB)), |
| 414 | + list(lustre@vdom@vnode:element(PWB)) |
| 415 | + ) -> lustre@vdom@vnode:element(PWB). |
| 416 | + link_sm(Attrs, Children) -> |
| 417 | + lustre@element@html:a( |
| 418 | + [lustre@attribute:class(<<"btn-sm"/utf8>>) | Attrs], |
| 419 | + Children |
| 420 | + ). |
| 421 | + |
| 422 | + -file("src/glaze/basecoat/button.gleam", 334). |
| 423 | + -spec link_secondary_sm( |
| 424 | + list(lustre@vdom@vattr:attribute(PWH)), |
| 425 | + list(lustre@vdom@vnode:element(PWH)) |
| 426 | + ) -> lustre@vdom@vnode:element(PWH). |
| 427 | + link_secondary_sm(Attrs, Children) -> |
| 428 | + lustre@element@html:a( |
| 429 | + [lustre@attribute:class(<<"btn-sm-secondary"/utf8>>) | Attrs], |
| 430 | + Children |
| 431 | + ). |
| 432 | + |
| 433 | + -file("src/glaze/basecoat/button.gleam", 341). |
| 434 | + -spec link_outline_sm( |
| 435 | + list(lustre@vdom@vattr:attribute(PWN)), |
| 436 | + list(lustre@vdom@vnode:element(PWN)) |
| 437 | + ) -> lustre@vdom@vnode:element(PWN). |
| 438 | + link_outline_sm(Attrs, Children) -> |
| 439 | + lustre@element@html:a( |
| 440 | + [lustre@attribute:class(<<"btn-sm-outline"/utf8>>) | Attrs], |
| 441 | + Children |
| 442 | + ). |
| 443 | + |
| 444 | + -file("src/glaze/basecoat/button.gleam", 348). |
| 445 | + -spec link_ghost_sm( |
| 446 | + list(lustre@vdom@vattr:attribute(PWT)), |
| 447 | + list(lustre@vdom@vnode:element(PWT)) |
| 448 | + ) -> lustre@vdom@vnode:element(PWT). |
| 449 | + link_ghost_sm(Attrs, Children) -> |
| 450 | + lustre@element@html:a( |
| 451 | + [lustre@attribute:class(<<"btn-sm-ghost"/utf8>>) | Attrs], |
| 452 | + Children |
| 453 | + ). |
| 454 | + |
| 455 | + -file("src/glaze/basecoat/button.gleam", 355). |
| 456 | + -spec link_destructive_sm( |
| 457 | + list(lustre@vdom@vattr:attribute(PWZ)), |
| 458 | + list(lustre@vdom@vnode:element(PWZ)) |
| 459 | + ) -> lustre@vdom@vnode:element(PWZ). |
| 460 | + link_destructive_sm(Attrs, Children) -> |
| 461 | + lustre@element@html:a( |
| 462 | + [lustre@attribute:class(<<"btn-sm-destructive"/utf8>>) | Attrs], |
| 463 | + Children |
| 464 | + ). |
| 465 | + |
| 466 | + -file("src/glaze/basecoat/button.gleam", 364). |
| 467 | + -spec link_lg( |
| 468 | + list(lustre@vdom@vattr:attribute(PXF)), |
| 469 | + list(lustre@vdom@vnode:element(PXF)) |
| 470 | + ) -> lustre@vdom@vnode:element(PXF). |
| 471 | + link_lg(Attrs, Children) -> |
| 472 | + lustre@element@html:a( |
| 473 | + [lustre@attribute:class(<<"btn-lg"/utf8>>) | Attrs], |
| 474 | + Children |
| 475 | + ). |
| 476 | + |
| 477 | + -file("src/glaze/basecoat/button.gleam", 371). |
| 478 | + -spec link_secondary_lg( |
| 479 | + list(lustre@vdom@vattr:attribute(PXL)), |
| 480 | + list(lustre@vdom@vnode:element(PXL)) |
| 481 | + ) -> lustre@vdom@vnode:element(PXL). |
| 482 | + link_secondary_lg(Attrs, Children) -> |
| 483 | + lustre@element@html:a( |
| 484 | + [lustre@attribute:class(<<"btn-lg-secondary"/utf8>>) | Attrs], |
| 485 | + Children |
| 486 | + ). |
| 487 | + |
| 488 | + -file("src/glaze/basecoat/button.gleam", 378). |
| 489 | + -spec link_outline_lg( |
| 490 | + list(lustre@vdom@vattr:attribute(PXR)), |
| 491 | + list(lustre@vdom@vnode:element(PXR)) |
| 492 | + ) -> lustre@vdom@vnode:element(PXR). |
| 493 | + link_outline_lg(Attrs, Children) -> |
| 494 | + lustre@element@html:a( |
| 495 | + [lustre@attribute:class(<<"btn-lg-outline"/utf8>>) | Attrs], |
| 496 | + Children |
| 497 | + ). |
| 498 | + |
| 499 | + -file("src/glaze/basecoat/button.gleam", 385). |
| 500 | + -spec link_ghost_lg( |
| 501 | + list(lustre@vdom@vattr:attribute(PXX)), |
| 502 | + list(lustre@vdom@vnode:element(PXX)) |
| 503 | + ) -> lustre@vdom@vnode:element(PXX). |
| 504 | + link_ghost_lg(Attrs, Children) -> |
| 505 | + lustre@element@html:a( |
| 506 | + [lustre@attribute:class(<<"btn-lg-ghost"/utf8>>) | Attrs], |
| 507 | + Children |
| 508 | + ). |
| 509 | + |
| 510 | + -file("src/glaze/basecoat/button.gleam", 392). |
| 511 | + -spec link_destructive_lg( |
| 512 | + list(lustre@vdom@vattr:attribute(PYD)), |
| 513 | + list(lustre@vdom@vnode:element(PYD)) |
| 514 | + ) -> lustre@vdom@vnode:element(PYD). |
| 515 | + link_destructive_lg(Attrs, Children) -> |
| 516 | + lustre@element@html:a( |
| 517 | + [lustre@attribute:class(<<"btn-lg-destructive"/utf8>>) | Attrs], |
| 518 | + Children |
| 519 | + ). |
| 520 | + |
| 521 | + -file("src/glaze/basecoat/button.gleam", 399). |
| 280 522 | -spec full_width() -> lustre@vdom@vattr:attribute(any()). |
| 281 523 | full_width() -> |
| 282 524 | lustre@attribute:class(<<"w-full"/utf8>>). |
| 283 525 | |
| 284 | - -file("src/glaze/basecoat/button.gleam", 223). |
| 526 | + -file("src/glaze/basecoat/button.gleam", 403). |
| 285 527 | -spec disabled() -> lustre@vdom@vattr:attribute(any()). |
| 286 528 | disabled() -> |
| 287 529 | lustre@attribute:disabled(true). |
| 288 530 | |
| 289 | - -file("src/glaze/basecoat/button.gleam", 227). |
| 531 | + -file("src/glaze/basecoat/button.gleam", 407). |
| 290 532 | -spec loading() -> lustre@vdom@vattr:attribute(any()). |
| 291 533 | loading() -> |
| 292 534 | lustre@attribute:disabled(true). |
| 293 535 | |
| 294 | - -file("src/glaze/basecoat/button.gleam", 231). |
| 536 | + -file("src/glaze/basecoat/button.gleam", 411). |
| 295 537 | -spec submit( |
| 296 | - list(lustre@vdom@vattr:attribute(PTZ)), |
| 297 | - list(lustre@vdom@vnode:element(PTZ)) |
| 298 | - ) -> lustre@vdom@vnode:element(PTZ). |
| 538 | + list(lustre@vdom@vattr:attribute(PYP)), |
| 539 | + list(lustre@vdom@vnode:element(PYP)) |
| 540 | + ) -> lustre@vdom@vnode:element(PYP). |
| 299 541 | submit(Attrs, Children) -> |
| 300 542 | lustre@element@html:button( |
| 301 543 | [lustre@attribute:class(<<"btn"/utf8>>), |
| @@ -304,11 +546,11 @@ submit(Attrs, Children) -> | |
| 304 546 | Children |
| 305 547 | ). |
| 306 548 | |
| 307 | - -file("src/glaze/basecoat/button.gleam", 241). |
| 549 | + -file("src/glaze/basecoat/button.gleam", 421). |
| 308 550 | -spec reset( |
| 309 | - list(lustre@vdom@vattr:attribute(PUF)), |
| 310 | - list(lustre@vdom@vnode:element(PUF)) |
| 311 | - ) -> lustre@vdom@vnode:element(PUF). |
| 551 | + list(lustre@vdom@vattr:attribute(PYV)), |
| 552 | + list(lustre@vdom@vnode:element(PYV)) |
| 553 | + ) -> lustre@vdom@vnode:element(PYV). |
| 312 554 | reset(Attrs, Children) -> |
| 313 555 | lustre@element@html:button( |
| 314 556 | [lustre@attribute:class(<<"btn"/utf8>>), |
Loading more files…