@teja-app/ui 0.0.3 → 0.0.4
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/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.types.d.ts +3 -0
- package/dist/components/Select/Select.types.d.ts.map +1 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Select/index.d.ts.map +1 -1
- package/dist/index.cjs +44 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +44 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7222,7 +7222,8 @@ function Select({
|
|
|
7222
7222
|
fullWidth = false,
|
|
7223
7223
|
className,
|
|
7224
7224
|
isLoading = false,
|
|
7225
|
-
loadingText = "Loading..."
|
|
7225
|
+
loadingText = "Loading...",
|
|
7226
|
+
placement = "bottom"
|
|
7226
7227
|
}) {
|
|
7227
7228
|
const selectedOption = options.find((opt) => opt.value === value);
|
|
7228
7229
|
const hasError = !!error2;
|
|
@@ -7296,43 +7297,52 @@ function Select({
|
|
|
7296
7297
|
leave: "transition ease-in duration-100",
|
|
7297
7298
|
leaveFrom: "opacity-100",
|
|
7298
7299
|
leaveTo: "opacity-0",
|
|
7299
|
-
children: /* @__PURE__ */ jsx(
|
|
7300
|
-
|
|
7300
|
+
children: /* @__PURE__ */ jsx(
|
|
7301
|
+
Bt,
|
|
7301
7302
|
{
|
|
7302
|
-
|
|
7303
|
-
|
|
7304
|
-
|
|
7305
|
-
"relative cursor-pointer select-none py-2.5 pl-10 pr-4",
|
|
7306
|
-
// Light mode
|
|
7307
|
-
active ? "bg-gold-50 text-primary-900" : "text-primary-900",
|
|
7308
|
-
// Dark mode
|
|
7309
|
-
active ? "dark:bg-primary-700 dark:text-primary-100" : "dark:text-primary-200",
|
|
7310
|
-
option.disabled && "cursor-not-allowed opacity-50",
|
|
7311
|
-
selected && "font-medium"
|
|
7303
|
+
className: cn(
|
|
7304
|
+
"absolute z-dropdown max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-sm shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none dark:bg-primary-800 dark:ring-primary-700",
|
|
7305
|
+
placement === "top" ? "bottom-full mb-1" : "top-full mt-1"
|
|
7312
7306
|
),
|
|
7313
|
-
children: (
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
|
|
7318
|
-
|
|
7319
|
-
|
|
7320
|
-
|
|
7321
|
-
"
|
|
7322
|
-
|
|
7323
|
-
|
|
7307
|
+
children: options.map((option) => /* @__PURE__ */ jsx(
|
|
7308
|
+
It,
|
|
7309
|
+
{
|
|
7310
|
+
disabled: option.disabled,
|
|
7311
|
+
value: option.value,
|
|
7312
|
+
className: ({ active, selected }) => cn(
|
|
7313
|
+
"relative cursor-pointer select-none py-2.5 pl-10 pr-4",
|
|
7314
|
+
// Light mode
|
|
7315
|
+
active ? "bg-gold-50 text-primary-900" : "text-primary-900",
|
|
7316
|
+
// Dark mode
|
|
7317
|
+
active ? "dark:bg-primary-700 dark:text-primary-100" : "dark:text-primary-200",
|
|
7318
|
+
option.disabled && "cursor-not-allowed opacity-50",
|
|
7319
|
+
selected && "font-medium"
|
|
7320
|
+
),
|
|
7321
|
+
children: ({ selected }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7322
|
+
/* @__PURE__ */ jsx("span", { className: "block truncate", children: option.label }),
|
|
7323
|
+
selected && /* @__PURE__ */ jsx("span", { className: "absolute inset-y-0 left-0 flex items-center pl-3 text-gold-600 dark:text-gold-400", children: /* @__PURE__ */ jsx(
|
|
7324
|
+
"svg",
|
|
7324
7325
|
{
|
|
7325
|
-
|
|
7326
|
-
|
|
7327
|
-
|
|
7326
|
+
className: "h-5 w-5",
|
|
7327
|
+
fill: "currentColor",
|
|
7328
|
+
viewBox: "0 0 20 20",
|
|
7329
|
+
"aria-hidden": "true",
|
|
7330
|
+
children: /* @__PURE__ */ jsx(
|
|
7331
|
+
"path",
|
|
7332
|
+
{
|
|
7333
|
+
clipRule: "evenodd",
|
|
7334
|
+
d: "M16.704 4.153a.75.75 0 01.143 1.052l-8 10.5a.75.75 0 01-1.127.075l-4.5-4.5a.75.75 0 011.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 011.05-.143z",
|
|
7335
|
+
fillRule: "evenodd"
|
|
7336
|
+
}
|
|
7337
|
+
)
|
|
7328
7338
|
}
|
|
7329
|
-
)
|
|
7330
|
-
}
|
|
7331
|
-
|
|
7332
|
-
|
|
7333
|
-
|
|
7334
|
-
|
|
7335
|
-
)
|
|
7339
|
+
) })
|
|
7340
|
+
] })
|
|
7341
|
+
},
|
|
7342
|
+
option.value
|
|
7343
|
+
))
|
|
7344
|
+
}
|
|
7345
|
+
)
|
|
7336
7346
|
}
|
|
7337
7347
|
)
|
|
7338
7348
|
] }) }),
|