changes for running.

This commit is contained in:
2023-10-28 12:17:01 -07:00
parent 0f74b71cd1
commit 855c23f4ae
13 changed files with 122 additions and 68 deletions

View File

@@ -120,7 +120,7 @@
(update params :class
#(cond-> %
true (str " inline-flex items-center justify-center items-center p-3 text-sm font-medium border border-gray-300 dark:border-gray-700 text-center rounded-lg ")
true (str " inline-flex items-center justify-center items-center p-3 text-sm font-medium border border-gray-300 dark:border-gray-700 text-center rounded-lg hover:scale-110")
(= :secondary (:color params)) (str " bg-blue-500 hover:bg-blue-600 focus:ring-blue-300 dark:bg-blue-600 dark:hover:bg-blue-700")
(= :primary (:color params)) (str " bg-green-500 hover:bg-green-600 focus:ring-green-300 dark:bg-green-600 dark:hover:bg-green-700 ")
(= :primary-light (:color params)) (str " bg-green-200 hover:bg-green-300 focus:ring-green-200 dark:bg-green-700 dark:hover:bg-green-600 text-gray-800 dark:text-gray-200")

View File

@@ -6,7 +6,8 @@
[auto-ap.ssr.components.buttons :refer [a-button-]]
[bidi.bidi :as bidi]
[hiccup2.core :as hiccup]
[auto-ap.ssr.hx :as hx]))
[auto-ap.ssr.hx :as hx]
[auto-ap.ssr.components.inputs :as inputs]))
(defn header- [params & rest]
(into [:th.px-4.py-3 {:scope "col" :class (:class params)
@@ -30,13 +31,12 @@
(defn right-stack-cell- [params & rest]
(cell- params (into [:div.flex.flex-row-reverse.items-center.justify-between
rest]))
)
rest])))
(defn checkbox-header- [params & rest]
[:th {:scope "col", :class "p-4"}
[:div {:class "flex items-center"}
[:input {:id "checkbox-all", :type "checkbox", :class "w-4 h-4 bg-gray-100 border-gray-300 rounded text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600"}]
[:input {:id "checkbox-all", :type "checkbox", :class inputs/default-checkbox-classes}]
[:label {:for "checkbox-all", :class "sr-only"} "checkbox"]]])
(defn data-grid- [{:keys [headers thead-params id]} & rest]

View File

@@ -48,7 +48,7 @@
(defn stacked-modal-card- [index params header content footer]
[:div (merge params
{:class "bg-white rounded-lg shadow dark:bg-gray-700 dark:text-white modal-content flex flex-col"
{:class "bg-white rounded-lg shadow dark:bg-gray-700 dark:text-white modal-content flex flex-col h-full"
:x-data (hx/json {:i index})
:x-show "index == i && hidingIndex != i"
"x-transition:enter" "transition duration-150",

View File

@@ -19,6 +19,9 @@
"group-[.has-error]:dark:border-red-500"])
(def default-checkbox-classes
"w-4 h-4 bg-gray-100 border-gray-300 rounded text-primary-600 focus:ring-primary-500 dark:focus:ring-primary-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600")
(defn select- [params & children]
(into
[:select (-> params
@@ -199,3 +202,7 @@
(defn hidden- [{:keys [name value]}]
[:input {:type "hidden" :value value :name name}])
(defn checkbox- [params & rest]
[:input {:type "checkbox" :class (hh/add-class default-checkbox-classes (:class params ""))}
rest])

View File

@@ -1,4 +1,5 @@
(ns auto-ap.ssr.components.tags)
(ns auto-ap.ssr.components.tags
(:require [auto-ap.ssr.hiccup-helper :as hh]))
(defn pill- [params & children]
@@ -20,4 +21,4 @@
children))
(defn badge- [params & children]
[:div {:class "absolute inline-flex items-center justify-center w-6 h-6 text-xs font-bold text-white bg-red-300 border-3 border-white rounded-full -top-2 -right-2 dark:border-gray-900"} children])
[:div {:class (hh/add-class "absolute inline-flex items-center justify-center w-6 h-6 text-xs font-bold text-white bg-red-300 border-3 border-white rounded-full -top-2 -right-2 dark:border-gray-900" (:class params))} children])