@woobee/ui 0.3.0 → 0.3.1
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.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +27 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +27 -26
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -89,7 +89,7 @@ function Tag({
|
|
|
89
89
|
{
|
|
90
90
|
className: classNames({
|
|
91
91
|
"inline-flex items-center rounded font-medium whitespace-nowrap": true,
|
|
92
|
-
"bg-cream-200 dark:bg-charcoal-700 text-content-title
|
|
92
|
+
"bg-cream-200 dark:bg-charcoal-700 text-content-title": !color,
|
|
93
93
|
"text-white": !!color,
|
|
94
94
|
// medium size
|
|
95
95
|
"text-sm": size === "medium",
|
|
@@ -140,7 +140,7 @@ function TagGroup({
|
|
|
140
140
|
children: tag.name
|
|
141
141
|
},
|
|
142
142
|
tag.id || tag.name
|
|
143
|
-
)) : placeholder && /* @__PURE__ */ jsx("span", { className: "text-content-
|
|
143
|
+
)) : placeholder && /* @__PURE__ */ jsx("span", { className: "text-content-placeholder text-sm flex items-center", children: placeholder })
|
|
144
144
|
}
|
|
145
145
|
);
|
|
146
146
|
}
|
|
@@ -165,8 +165,8 @@ function Tabs({
|
|
|
165
165
|
{
|
|
166
166
|
className: classNames({
|
|
167
167
|
"px-3 py-2 transition-colors rounded-lg": true,
|
|
168
|
-
"bg-white text-
|
|
169
|
-
"
|
|
168
|
+
"bg-white text-content-link dark:bg-charcoal-600": value === option.id,
|
|
169
|
+
"text-content-secondary": value !== option.id
|
|
170
170
|
}),
|
|
171
171
|
onClick: () => onChange(option.id),
|
|
172
172
|
children: option.label
|
|
@@ -275,7 +275,7 @@ function CheckboxList({
|
|
|
275
275
|
};
|
|
276
276
|
const renderPlaceholder = () => {
|
|
277
277
|
if (typeof placeholder === "string") {
|
|
278
|
-
return /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-content-
|
|
278
|
+
return /* @__PURE__ */ jsx("div", { className: "p-4 text-center text-sm text-content-placeholder", children: placeholder });
|
|
279
279
|
}
|
|
280
280
|
return placeholder;
|
|
281
281
|
};
|
|
@@ -301,7 +301,7 @@ function CheckboxList({
|
|
|
301
301
|
className: classNames({
|
|
302
302
|
"w-5 h-5 rounded border flex items-center justify-center transition-colors cursor-pointer": true,
|
|
303
303
|
"border-gray-300 bg-white dark:border-charcoal-700 dark:bg-charcoal-700": !checked,
|
|
304
|
-
"border-brown-500 bg-brown-500 dark:bg-primary-500 dark:border-primary-500
|
|
304
|
+
"border-brown-500 bg-brown-500 dark:bg-primary-500 dark:border-primary-500 text-content-primary-button": checked
|
|
305
305
|
}),
|
|
306
306
|
children: checked && /* @__PURE__ */ jsx("svg", { className: "w-4 h-4", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z" }) })
|
|
307
307
|
}
|
|
@@ -311,8 +311,8 @@ function CheckboxList({
|
|
|
311
311
|
{
|
|
312
312
|
className: classNames({
|
|
313
313
|
"text-sm": true,
|
|
314
|
-
"text-content-
|
|
315
|
-
"
|
|
314
|
+
"text-content-secondary": !checked,
|
|
315
|
+
"text-content-title": checked
|
|
316
316
|
}),
|
|
317
317
|
children: label
|
|
318
318
|
}
|
|
@@ -910,7 +910,7 @@ function Drawer({
|
|
|
910
910
|
"div",
|
|
911
911
|
{
|
|
912
912
|
"aria-label": "Close",
|
|
913
|
-
className: "-mr-3 text-
|
|
913
|
+
className: "-mr-3 text-content-title hover:text-primary-500 p-1.5 rounded-lg hover:bg-primary-100 transition ease-in-out duration-150",
|
|
914
914
|
onClick: handleClose,
|
|
915
915
|
children: /* @__PURE__ */ jsx("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
916
916
|
}
|
|
@@ -1192,10 +1192,10 @@ function ButtonItem({
|
|
|
1192
1192
|
"div",
|
|
1193
1193
|
{
|
|
1194
1194
|
className: classNames({
|
|
1195
|
-
"p-3 rounded-xl mx-auto
|
|
1195
|
+
"p-3 rounded-xl mx-auto flex justify-center cursor-pointer": true,
|
|
1196
1196
|
"w-full": direction === "vertical",
|
|
1197
1197
|
"w-full overflow-hidden": direction === "horizontal",
|
|
1198
|
-
"
|
|
1198
|
+
"text-content-link bg-white/50 dark:bg-charcoal-800/90 dark:backdrop-filter dark:backdrop-blur-sm border border-white lg:border-transparent dark:border-charcoal-700 shadow-xs dark:shadow-none": active,
|
|
1199
1199
|
...classNameObject(className)
|
|
1200
1200
|
}),
|
|
1201
1201
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -1318,7 +1318,7 @@ function H1({ className, children }) {
|
|
|
1318
1318
|
"h1",
|
|
1319
1319
|
{
|
|
1320
1320
|
className: classNames({
|
|
1321
|
-
"text-lg sm:text-
|
|
1321
|
+
"text-lg sm:text-3xl font-title font-semibold": true,
|
|
1322
1322
|
...classNameObject(className)
|
|
1323
1323
|
}),
|
|
1324
1324
|
children
|
|
@@ -1549,7 +1549,7 @@ var Input = forwardRef((props, ref) => {
|
|
|
1549
1549
|
id,
|
|
1550
1550
|
className: classNames({
|
|
1551
1551
|
...classNameObject(className),
|
|
1552
|
-
"px-3 group form-input placeholder-gray-300 dark:placeholder-charcoal-400 focus:outline-none block transition ease-in-out duration-150
|
|
1552
|
+
"text-content-primary px-3 group form-input placeholder-gray-300 dark:placeholder-charcoal-400 focus:outline-none block transition ease-in-out duration-150 dark:bg-charcoal-800 shadow-sm focus:dark:text-content-link focus:dark:border-primary-500 focus:dark:ring-primary-500": true,
|
|
1553
1553
|
"!text-white !border-charcoal-400 !placeholder-charcoal-400 focus:!text-primary-500 focus:!border-primary-500 focus:!ring-primary-500": !!darkMode,
|
|
1554
1554
|
"h-11": !className || !className.includes("h-"),
|
|
1555
1555
|
"text-sm": type !== "tel",
|
|
@@ -1565,7 +1565,7 @@ var Input = forwardRef((props, ref) => {
|
|
|
1565
1565
|
"w-full": type !== "radio" && (!className || className.includes("w-full") || !className.includes("w-")),
|
|
1566
1566
|
"sm:leading-normal": !className || !className.includes("leading-"),
|
|
1567
1567
|
"cursor-pointer": type === "checkbox" || type === "button",
|
|
1568
|
-
"
|
|
1568
|
+
"h-4 w-4": type === "radio",
|
|
1569
1569
|
"pr-10": type === "search"
|
|
1570
1570
|
}),
|
|
1571
1571
|
...type === "button" ? { value: label } : {},
|
|
@@ -1636,6 +1636,7 @@ Input.displayName = "Input";
|
|
|
1636
1636
|
var Input_default = Input;
|
|
1637
1637
|
function Label({
|
|
1638
1638
|
className,
|
|
1639
|
+
active = false,
|
|
1639
1640
|
error = false,
|
|
1640
1641
|
htmlFor,
|
|
1641
1642
|
info,
|
|
@@ -1649,8 +1650,8 @@ function Label({
|
|
|
1649
1650
|
{
|
|
1650
1651
|
htmlFor,
|
|
1651
1652
|
className: classNames({
|
|
1652
|
-
"block text-sm font-medium mb-1.5
|
|
1653
|
-
"text-
|
|
1653
|
+
"block text-sm font-medium mb-1.5": true,
|
|
1654
|
+
"text-content-link": active,
|
|
1654
1655
|
"text-red-600": error,
|
|
1655
1656
|
...classNameObject(className)
|
|
1656
1657
|
}),
|
|
@@ -1664,7 +1665,7 @@ function Label({
|
|
|
1664
1665
|
"span",
|
|
1665
1666
|
{
|
|
1666
1667
|
className: classNames({
|
|
1667
|
-
"text-sm leading-5
|
|
1668
|
+
"text-sm leading-5 mb-1.5": true,
|
|
1668
1669
|
"text-red-600": error
|
|
1669
1670
|
}),
|
|
1670
1671
|
children: info
|
|
@@ -1779,7 +1780,7 @@ var Textarea = forwardRef((props, ref) => {
|
|
|
1779
1780
|
placeholder,
|
|
1780
1781
|
className: classNames({
|
|
1781
1782
|
...classNameObject(className),
|
|
1782
|
-
"form-input border block w-full placeholder-gray-300 dark:placeholder-white/50 dark:focus:placeholder-charcoal-400 text-sm transition ease-in-out duration-150 px-3 py-2 border-gray-200 dark:border-charcoal-700
|
|
1783
|
+
"form-input border block w-full placeholder-gray-300 dark:placeholder-white/50 dark:focus:placeholder-charcoal-400 text-sm transition ease-in-out duration-150 px-3 py-2 border-gray-200 dark:border-charcoal-700 dark:bg-charcoal-800 rounded-lg": true,
|
|
1783
1784
|
"focus:ring-white dark:focus:ring-1 dark:focus:border-primary-600 dark:focus:ring-primary-500": !error,
|
|
1784
1785
|
"focus:outline-none focus:ring-0 focus:ring-offset-0 dark:focus:border-primary-500": true,
|
|
1785
1786
|
"border-red-300 text-red-900 placeholder-red-300 dark:placeholder-red-600 focus:border-red-300 focus:shadow-outline-red": error
|
|
@@ -1916,7 +1917,7 @@ function NoData({ className }) {
|
|
|
1916
1917
|
),
|
|
1917
1918
|
/* @__PURE__ */ jsxs("div", { className: "max-w-[90%] flex flex-col text-center", children: [
|
|
1918
1919
|
/* @__PURE__ */ jsx("h4", { className: "text-6 font-medium text-content-title mt-3 /50", children: "It's empty." }),
|
|
1919
|
-
/* @__PURE__ */ jsx("p", { className: "text-4
|
|
1920
|
+
/* @__PURE__ */ jsx("p", { className: "text-4", children: "Nothing to do for now." })
|
|
1920
1921
|
] })
|
|
1921
1922
|
] });
|
|
1922
1923
|
}
|
|
@@ -2059,7 +2060,7 @@ function useThemeContext() {
|
|
|
2059
2060
|
}
|
|
2060
2061
|
function ThemeToggle() {
|
|
2061
2062
|
const { theme, handleToggleTheme } = useThemeContext();
|
|
2062
|
-
return /* @__PURE__ */ jsxs("div", { className: "text-content-primary
|
|
2063
|
+
return /* @__PURE__ */ jsxs("div", { className: "text-content-primary z-30 flex space-x-1.5 items-center", children: [
|
|
2063
2064
|
/* @__PURE__ */ jsx(
|
|
2064
2065
|
"div",
|
|
2065
2066
|
{
|
|
@@ -2174,7 +2175,7 @@ function PopoverCard({
|
|
|
2174
2175
|
!!description && /* @__PURE__ */ jsx("p", { className: "px-3 pb-1 opacity-70", children: description }),
|
|
2175
2176
|
actions && actions.length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-1.5 w-full", children: actions.filter((action) => (action.items || []).length > 0).map((action, actionIndex) => /* @__PURE__ */ jsxs("div", { children: [
|
|
2176
2177
|
actionIndex > 0 && /* @__PURE__ */ jsx("div", { className: "w-full h-px bg-gray-100 dark:bg-charcoal-800 mb-3" }),
|
|
2177
|
-
action.section && /* @__PURE__ */ jsx("p", { className: "px-3 text-xxs sm:text-xs uppercase text-content-secondary dark:
|
|
2178
|
+
action.section && /* @__PURE__ */ jsx("p", { className: "px-3 text-xxs sm:text-xs uppercase text-content-secondary dark:hover", children: action.section }),
|
|
2178
2179
|
/* @__PURE__ */ jsx(
|
|
2179
2180
|
"div",
|
|
2180
2181
|
{
|
|
@@ -2184,7 +2185,7 @@ function PopoverCard({
|
|
|
2184
2185
|
children: (action.items || []).map((item) => /* @__PURE__ */ jsx(
|
|
2185
2186
|
"div",
|
|
2186
2187
|
{
|
|
2187
|
-
className: "text-sm sm:text-base px-3 py-1.5 text-content-primary
|
|
2188
|
+
className: "text-sm sm:text-base px-3 py-1.5 text-content-primary hover:text-content-title hover:bg-gray-200 hover:dark:bg-charcoal-700 cursor-pointer whitespace-normal",
|
|
2188
2189
|
onClick: () => handleMenuClick(item.action || item.onClick),
|
|
2189
2190
|
children: item.label
|
|
2190
2191
|
},
|
|
@@ -2250,7 +2251,7 @@ function PopoverCard({
|
|
|
2250
2251
|
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: (action.items || []).map((item) => /* @__PURE__ */ jsx(
|
|
2251
2252
|
"div",
|
|
2252
2253
|
{
|
|
2253
|
-
className: "py-1.5 px-2 -mx-2 flex items-center text-base text-content-title
|
|
2254
|
+
className: "py-1.5 px-2 -mx-2 flex items-center text-base text-content-title active:bg-gray-50 dark:active:bg-charcoal-700 rounded-lg cursor-pointer",
|
|
2254
2255
|
onClick: () => handleMenuClick(item.action || item.onClick),
|
|
2255
2256
|
children: item.label
|
|
2256
2257
|
},
|
|
@@ -3426,7 +3427,7 @@ function DataTable({
|
|
|
3426
3427
|
"table",
|
|
3427
3428
|
{
|
|
3428
3429
|
className: classNames({
|
|
3429
|
-
"w-full text-sm
|
|
3430
|
+
"w-full text-sm rounded-xl border-separate border-spacing-0": true,
|
|
3430
3431
|
"text-charcoal-100": !!darkMode,
|
|
3431
3432
|
"text-content-secondary": !darkMode
|
|
3432
3433
|
}),
|
|
@@ -3685,7 +3686,7 @@ function DataGridHeader({ sort, onClick, opts, children }) {
|
|
|
3685
3686
|
"!text-right": align === "right",
|
|
3686
3687
|
"whitespace-nowrap": !!noWrap,
|
|
3687
3688
|
"sticky top-0 z-10 dark:bg-charcoal-800": !!stickyHeader,
|
|
3688
|
-
"bg-
|
|
3689
|
+
"bg-white dark:bg-charcoal-800": !darkMode,
|
|
3689
3690
|
"bg-charcoal-800": !!darkMode
|
|
3690
3691
|
}),
|
|
3691
3692
|
onClick,
|
|
@@ -3708,7 +3709,7 @@ function DataGridHeader({ sort, onClick, opts, children }) {
|
|
|
3708
3709
|
"!text-left": align === "left",
|
|
3709
3710
|
"whitespace-nowrap": !!noWrap,
|
|
3710
3711
|
"sticky top-0 z-10 dark:bg-charcoal-800": !!stickyHeader,
|
|
3711
|
-
"bg-
|
|
3712
|
+
"bg-white dark:bg-charcoal-800": !darkMode,
|
|
3712
3713
|
"bg-charcoal-800": !!darkMode
|
|
3713
3714
|
}),
|
|
3714
3715
|
children
|