diff --git a/dist/basecoat.css b/dist/basecoat.css index c06fe96..2197ee9 100644 --- a/dist/basecoat.css +++ b/dist/basecoat.css @@ -336,9 +336,6 @@ .mx-auto { margin-inline: auto; } - .my-4 { - margin-block: calc(var(--spacing) * 4); - } .my-6 { margin-block: calc(var(--spacing) * 6); } @@ -1381,6 +1378,32 @@ } } } + .\[\&_a\:not\(\[class\]\)\]\:text-muted-foreground { + & a:not([class]) { + color: var(--color-muted-foreground); + } + } + .\[\&_a\:not\(\[class\]\)\]\:no-underline { + & a:not([class]) { + text-decoration-line: none; + } + } + .\[\&_a\:not\(\[class\]\)\]\:transition-colors { + & a:not([class]) { + transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to; + transition-timing-function: var(--tw-ease, var(--default-transition-timing-function)); + transition-duration: var(--tw-duration, var(--default-transition-duration)); + } + } + .\[\&_a\:not\(\[class\]\)\]\:hover\:text-foreground { + & a:not([class]) { + &:hover { + @media (hover: hover) { + color: var(--color-foreground); + } + } + } + } .\[\&_img\]\:size-8 { & img { width: calc(var(--spacing) * 8); @@ -2848,6 +2871,8 @@ display: flex; height: calc(var(--spacing) * 10); width: 100%; + min-width: calc(var(--spacing) * 0); + flex: 1; border-radius: var(--radius-md); background-color: transparent; padding-block: calc(var(--spacing) * 3); diff --git a/dist/basecoat.tailwind.css b/dist/basecoat.tailwind.css index 862d479..f79a2db 100644 --- a/dist/basecoat.tailwind.css +++ b/dist/basecoat.tailwind.css @@ -660,7 +660,7 @@ @apply size-4 shrink-0 opacity-50; } input[role='combobox'] { - @apply placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50; + @apply placeholder:text-muted-foreground flex h-10 flex-1 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50 min-w-0; } } [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before { diff --git a/docs/_includes/components/dialog-script.njk b/docs/_includes/components/dialog-script.njk new file mode 100644 index 0000000..2c76bdd --- /dev/null +++ b/docs/_includes/components/dialog-script.njk @@ -0,0 +1,55 @@ + \ No newline at end of file diff --git a/docs/_includes/components/dialog.njk b/docs/_includes/components/dialog.njk index 0a883c7..21ce3c9 100644 --- a/docs/_includes/components/dialog.njk +++ b/docs/_includes/components/dialog.njk @@ -1,3 +1,24 @@ +{# + Renders a dialog component with optional trigger, header, body, and footer. + + @param id {string} - Unique identifier for the dialog component. + @param trigger {string} [optional] - Text or HTML for the button that triggers the dialog. + @param title {string} [optional] - Title text displayed in the dialog header. + @param description {string} [optional] - Description text displayed below the title. + @param footer {string} [optional] - HTML content for the dialog footer. + @param main_attrs {object} [optional] - Additional HTML attributes for the main container div. + @param trigger_attrs {object} [optional] - Additional HTML attributes for the trigger button. + @param content_attrs {object} [optional] - Additional HTML attributes for the dialog content article. + @param content_header_attrs {object} [optional] - Additional HTML attributes for the dialog header. + @param content_body_attrs {object} [optional] - Additional HTML attributes for the dialog body section. + @param content_footer_attrs {object} [optional] - Additional HTML attributes for the dialog footer. + @param open {boolean} [optional] [default=false] - Whether the dialog should be open initially. + @param close_button {boolean} [optional] [default=true] - Whether to include a close button. + @param close_on_overlay_click {boolean} [optional] [default=true] - Whether clicking the overlay closes the dialog. + @param include_html {boolean} [optional] [default=true] - Whether to render the HTML structure. + @param include_script {boolean} [optional] [default=true] - Whether to include the Alpine.js component script. + @param register_on {array} [optional] [default=["alpine:init"]] - Alpine.js events to register the component on. +#} {% macro dialog( id, trigger=None, @@ -14,72 +35,11 @@ close_button=true, close_on_overlay_click=true, include_html=true, - include_script=true, + include_script=false, register_on=["alpine:init"] ) %} {% if include_script %} - + {% include "components/dialog-script.njk" %} {% endif %} {% if include_html %} @@ -94,6 +54,7 @@ > {% if trigger %}