tccd-ui 0.0.82 → 0.0.84
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -769,7 +769,9 @@ function DropdownMenu({
|
|
|
769
769
|
ref: buttonRef,
|
|
770
770
|
onClick: () => !disabled && setIsOpen(!isOpen),
|
|
771
771
|
disabled,
|
|
772
|
-
className: `flex items-center justify-between w-full text-left bg-transparent border-gray-400 dark:border-gray-600
|
|
772
|
+
className: `flex items-center justify-between w-full text-left bg-transparent border-gray-400 dark:border-gray-600 px-2 py-1.5 md:px-3 md:py-2 border outline-none
|
|
773
|
+
${isOpen ? "rounded-t-xl" : "rounded-xl"}
|
|
774
|
+
${error ? "border-red-300 focus:border-red-500 focus:ring-red-500/30 dark:border-red-700 dark:focus:border-red-600" : "focus:border-primary dark:focus:border-primary"} transition-all duration-300 ease-in-out text-sm dark:bg-gray-900 dark:text-white ${!selectedOption ? "text-gray-400 dark:text-gray-400" : ""} ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`,
|
|
773
775
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "truncate w-full text-center", children: selectedOption ? selectedOption.label : placeholder })
|
|
774
776
|
}
|
|
775
777
|
),
|
|
@@ -786,7 +788,7 @@ function DropdownMenu({
|
|
|
786
788
|
{
|
|
787
789
|
ref: dropdownRef,
|
|
788
790
|
style: menuStyles,
|
|
789
|
-
className: "bg-background border border-secondary/30 rounded-xl shadow-lg max-h-60 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-background [&::-webkit-scrollbar-thumb]:bg-secondary/30 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:hover:bg-secondary/50",
|
|
791
|
+
className: "bg-background border border-secondary/30 rounded-b-xl shadow-lg max-h-60 overflow-y-auto [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-track]:bg-background [&::-webkit-scrollbar-thumb]:bg-secondary/30 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:hover:bg-secondary/50",
|
|
790
792
|
children: options.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "px-3 py-2 text-sm text-text", children: "No options available" }) : options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
791
793
|
"button",
|
|
792
794
|
{
|
|
@@ -1121,6 +1123,10 @@ function FullScreenViewer({ isOpen, items, index, setIndex, onClose }) {
|
|
|
1121
1123
|
);
|
|
1122
1124
|
}
|
|
1123
1125
|
|
|
1126
|
+
// src/config.ts
|
|
1127
|
+
var import_meta = {};
|
|
1128
|
+
var ENABLE_DARK_MODE = import_meta.env.VITE_ENABLE_DARK_MODE === "true";
|
|
1129
|
+
|
|
1124
1130
|
// src/components/InputField.tsx
|
|
1125
1131
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1126
1132
|
function InputField({
|
|
@@ -1131,8 +1137,15 @@ function InputField({
|
|
|
1131
1137
|
error,
|
|
1132
1138
|
id
|
|
1133
1139
|
}) {
|
|
1140
|
+
const dark = ENABLE_DARK_MODE;
|
|
1134
1141
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex flex-col w-full", children: [
|
|
1135
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1142
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1143
|
+
"label",
|
|
1144
|
+
{
|
|
1145
|
+
className: dark ? "text-gray-200 text-[14px] md:text-[15px] lg:text-[16px] mb-2 font-semibold" : "text-label text-[14px] md:text-[15px] lg:text-[16px] mb-2 font-semibold",
|
|
1146
|
+
children: label
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1136
1149
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1137
1150
|
"input",
|
|
1138
1151
|
{
|
|
@@ -1140,7 +1153,7 @@ function InputField({
|
|
|
1140
1153
|
value,
|
|
1141
1154
|
placeholder,
|
|
1142
1155
|
onChange: (e) => onChange(e),
|
|
1143
|
-
className: `border-gray-400
|
|
1156
|
+
className: `border-gray-400 rounded-2xl px-2 py-1.5 md:px-3 md:py-2 border outline-none ${error ? dark ? "border-red-700 focus:border-red-600" : "border-red-300 focus:border-red-500 focus:ring-red-500/30" : dark ? "focus:border-primary" : "focus:border-primary"} transition-all duration-300 ease-in-out text-sm ${dark ? "bg-gray-900 text-white placeholder-gray-400 border-gray-600" : ""}`
|
|
1144
1157
|
}
|
|
1145
1158
|
)
|
|
1146
1159
|
] });
|