@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 CHANGED
@@ -366,6 +366,7 @@ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttri
366
366
 
367
367
  interface LabelProps {
368
368
  className?: string;
369
+ active?: boolean;
369
370
  error?: boolean;
370
371
  htmlFor?: string;
371
372
  info?: string;
@@ -375,7 +376,7 @@ interface LabelProps {
375
376
  };
376
377
  children?: ReactNode;
377
378
  }
378
- declare function Label({ className, error, htmlFor, info, mandatory, opts, children, }: LabelProps): React.JSX.Element;
379
+ declare function Label({ className, active, error, htmlFor, info, mandatory, opts, children, }: LabelProps): React.JSX.Element;
379
380
 
380
381
  interface SelectProps {
381
382
  id?: string;
package/dist/index.d.ts CHANGED
@@ -366,6 +366,7 @@ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttri
366
366
 
367
367
  interface LabelProps {
368
368
  className?: string;
369
+ active?: boolean;
369
370
  error?: boolean;
370
371
  htmlFor?: string;
371
372
  info?: string;
@@ -375,7 +376,7 @@ interface LabelProps {
375
376
  };
376
377
  children?: ReactNode;
377
378
  }
378
- declare function Label({ className, error, htmlFor, info, mandatory, opts, children, }: LabelProps): React.JSX.Element;
379
+ declare function Label({ className, active, error, htmlFor, info, mandatory, opts, children, }: LabelProps): React.JSX.Element;
379
380
 
380
381
  interface SelectProps {
381
382
  id?: string;
package/dist/index.js CHANGED
@@ -95,7 +95,7 @@ function Tag({
95
95
  {
96
96
  className: classNames({
97
97
  "inline-flex items-center rounded font-medium whitespace-nowrap": true,
98
- "bg-cream-200 dark:bg-charcoal-700 text-content-title dark:text-content-primary": !color,
98
+ "bg-cream-200 dark:bg-charcoal-700 text-content-title": !color,
99
99
  "text-white": !!color,
100
100
  // medium size
101
101
  "text-sm": size === "medium",
@@ -146,7 +146,7 @@ function TagGroup({
146
146
  children: tag.name
147
147
  },
148
148
  tag.id || tag.name
149
- )) : placeholder && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-content-disabled dark:text-content-placeholder text-sm flex items-center", children: placeholder })
149
+ )) : placeholder && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-content-placeholder text-sm flex items-center", children: placeholder })
150
150
  }
151
151
  );
152
152
  }
@@ -171,8 +171,8 @@ function Tabs({
171
171
  {
172
172
  className: classNames({
173
173
  "px-3 py-2 transition-colors rounded-lg": true,
174
- "bg-white text-brown-500 dark:text-primary-500 dark:bg-charcoal-600": value === option.id,
175
- "hover:text-brown-500 dark:text-content-secondary dark:hover:text-primary-500": value !== option.id
174
+ "bg-white text-content-link dark:bg-charcoal-600": value === option.id,
175
+ "text-content-secondary": value !== option.id
176
176
  }),
177
177
  onClick: () => onChange(option.id),
178
178
  children: option.label
@@ -281,7 +281,7 @@ function CheckboxList({
281
281
  };
282
282
  const renderPlaceholder = () => {
283
283
  if (typeof placeholder === "string") {
284
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-content-secondary dark:text-content-placeholder", children: placeholder });
284
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 text-center text-sm text-content-placeholder", children: placeholder });
285
285
  }
286
286
  return placeholder;
287
287
  };
@@ -307,7 +307,7 @@ function CheckboxList({
307
307
  className: classNames({
308
308
  "w-5 h-5 rounded border flex items-center justify-center transition-colors cursor-pointer": true,
309
309
  "border-gray-300 bg-white dark:border-charcoal-700 dark:bg-charcoal-700": !checked,
310
- "border-brown-500 bg-brown-500 dark:bg-primary-500 dark:border-primary-500 dark:text-black text-white": checked
310
+ "border-brown-500 bg-brown-500 dark:bg-primary-500 dark:border-primary-500 text-content-primary-button": checked
311
311
  }),
312
312
  children: checked && /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4", viewBox: "0 0 16 16", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.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" }) })
313
313
  }
@@ -317,8 +317,8 @@ function CheckboxList({
317
317
  {
318
318
  className: classNames({
319
319
  "text-sm": true,
320
- "text-content-title dark:text-content-primary": !checked,
321
- "dark:text-primary-400": checked
320
+ "text-content-secondary": !checked,
321
+ "text-content-title": checked
322
322
  }),
323
323
  children: label
324
324
  }
@@ -916,7 +916,7 @@ function Drawer({
916
916
  "div",
917
917
  {
918
918
  "aria-label": "Close",
919
- className: "-mr-3 text-primary-700 dark:text-content-title hover:text-primary-500 p-1.5 rounded-lg hover:bg-primary-100 transition ease-in-out duration-150",
919
+ 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",
920
920
  onClick: handleClose,
921
921
  children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
922
922
  }
@@ -1198,10 +1198,10 @@ function ButtonItem({
1198
1198
  "div",
1199
1199
  {
1200
1200
  className: classNames({
1201
- "p-3 rounded-xl mx-auto text-content-primary/70 dark:text-content-title/50 flex justify-center cursor-pointer": true,
1201
+ "p-3 rounded-xl mx-auto flex justify-center cursor-pointer": true,
1202
1202
  "w-full": direction === "vertical",
1203
1203
  "w-full overflow-hidden": direction === "horizontal",
1204
- "!text-content-primary dark:!text-primary-500 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,
1204
+ "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,
1205
1205
  ...classNameObject(className)
1206
1206
  }),
1207
1207
  children: /* @__PURE__ */ jsxRuntime.jsxs(
@@ -1324,7 +1324,7 @@ function H1({ className, children }) {
1324
1324
  "h1",
1325
1325
  {
1326
1326
  className: classNames({
1327
- "text-lg sm:text-xl font-title text-primary-500 font-semibold": true,
1327
+ "text-lg sm:text-3xl font-title font-semibold": true,
1328
1328
  ...classNameObject(className)
1329
1329
  }),
1330
1330
  children
@@ -1555,7 +1555,7 @@ var Input = React18.forwardRef((props, ref) => {
1555
1555
  id,
1556
1556
  className: classNames({
1557
1557
  ...classNameObject(className),
1558
- "px-3 group form-input placeholder-gray-300 dark:placeholder-charcoal-400 focus:outline-none block transition ease-in-out duration-150 text-black dark:text-content-primary dark:bg-charcoal-800 shadow-sm focus:dark:text-primary-500 focus:dark:border-primary-500 focus:dark:ring-primary-500": true,
1558
+ "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,
1559
1559
  "!text-white !border-charcoal-400 !placeholder-charcoal-400 focus:!text-primary-500 focus:!border-primary-500 focus:!ring-primary-500": !!darkMode,
1560
1560
  "h-11": !className || !className.includes("h-"),
1561
1561
  "text-sm": type !== "tel",
@@ -1571,7 +1571,7 @@ var Input = React18.forwardRef((props, ref) => {
1571
1571
  "w-full": type !== "radio" && (!className || className.includes("w-full") || !className.includes("w-")),
1572
1572
  "sm:leading-normal": !className || !className.includes("leading-"),
1573
1573
  "cursor-pointer": type === "checkbox" || type === "button",
1574
- "text-black h-4 w-4": type === "radio",
1574
+ "h-4 w-4": type === "radio",
1575
1575
  "pr-10": type === "search"
1576
1576
  }),
1577
1577
  ...type === "button" ? { value: label } : {},
@@ -1642,6 +1642,7 @@ Input.displayName = "Input";
1642
1642
  var Input_default = Input;
1643
1643
  function Label({
1644
1644
  className,
1645
+ active = false,
1645
1646
  error = false,
1646
1647
  htmlFor,
1647
1648
  info,
@@ -1655,8 +1656,8 @@ function Label({
1655
1656
  {
1656
1657
  htmlFor,
1657
1658
  className: classNames({
1658
- "block text-sm font-medium mb-1.5 text-black dark:text-content-title": true,
1659
- "text-black dark:text-content-title/80": !error,
1659
+ "block text-sm font-medium mb-1.5": true,
1660
+ "text-content-link": active,
1660
1661
  "text-red-600": error,
1661
1662
  ...classNameObject(className)
1662
1663
  }),
@@ -1670,7 +1671,7 @@ function Label({
1670
1671
  "span",
1671
1672
  {
1672
1673
  className: classNames({
1673
- "text-sm leading-5 text-black mb-1.5": true,
1674
+ "text-sm leading-5 mb-1.5": true,
1674
1675
  "text-red-600": error
1675
1676
  }),
1676
1677
  children: info
@@ -1785,7 +1786,7 @@ var Textarea = React18.forwardRef((props, ref) => {
1785
1786
  placeholder,
1786
1787
  className: classNames({
1787
1788
  ...classNameObject(className),
1788
- "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 text-black dark:text-content-primary dark:bg-charcoal-800 rounded-lg": true,
1789
+ "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,
1789
1790
  "focus:ring-white dark:focus:ring-1 dark:focus:border-primary-600 dark:focus:ring-primary-500": !error,
1790
1791
  "focus:outline-none focus:ring-0 focus:ring-offset-0 dark:focus:border-primary-500": true,
1791
1792
  "border-red-300 text-red-900 placeholder-red-300 dark:placeholder-red-600 focus:border-red-300 focus:shadow-outline-red": error
@@ -1922,7 +1923,7 @@ function NoData({ className }) {
1922
1923
  ),
1923
1924
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-[90%] flex flex-col text-center", children: [
1924
1925
  /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-6 font-medium text-content-title mt-3 /50", children: "It's empty." }),
1925
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-4 text-content-primary dark:text-content-title/60", children: "Nothing to do for now." })
1926
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-4", children: "Nothing to do for now." })
1926
1927
  ] })
1927
1928
  ] });
1928
1929
  }
@@ -2065,7 +2066,7 @@ function useThemeContext() {
2065
2066
  }
2066
2067
  function ThemeToggle() {
2067
2068
  const { theme, handleToggleTheme } = useThemeContext();
2068
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-content-primary dark:text-content-title z-30 flex space-x-1.5 items-center", children: [
2069
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-content-primary z-30 flex space-x-1.5 items-center", children: [
2069
2070
  /* @__PURE__ */ jsxRuntime.jsx(
2070
2071
  "div",
2071
2072
  {
@@ -2180,7 +2181,7 @@ function PopoverCard({
2180
2181
  !!description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1 opacity-70", children: description }),
2181
2182
  actions && actions.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5 w-full", children: actions.filter((action) => (action.items || []).length > 0).map((action, actionIndex) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
2182
2183
  actionIndex > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-px bg-gray-100 dark:bg-charcoal-800 mb-3" }),
2183
- action.section && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 text-xxs sm:text-xs uppercase text-content-secondary dark:text-content-title dark:hover", children: action.section }),
2184
+ action.section && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 text-xxs sm:text-xs uppercase text-content-secondary dark:hover", children: action.section }),
2184
2185
  /* @__PURE__ */ jsxRuntime.jsx(
2185
2186
  "div",
2186
2187
  {
@@ -2190,7 +2191,7 @@ function PopoverCard({
2190
2191
  children: (action.items || []).map((item) => /* @__PURE__ */ jsxRuntime.jsx(
2191
2192
  "div",
2192
2193
  {
2193
- className: "text-sm sm:text-base px-3 py-1.5 text-content-primary dark:text-content-secondary hover:text-content-title hover:bg-gray-200 hover:dark:text-content-disabled hover:dark:bg-charcoal-700 cursor-pointer whitespace-normal",
2194
+ 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",
2194
2195
  onClick: () => handleMenuClick(item.action || item.onClick),
2195
2196
  children: item.label
2196
2197
  },
@@ -2256,7 +2257,7 @@ function PopoverCard({
2256
2257
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1", children: (action.items || []).map((item) => /* @__PURE__ */ jsxRuntime.jsx(
2257
2258
  "div",
2258
2259
  {
2259
- className: "py-1.5 px-2 -mx-2 flex items-center text-base text-content-title dark:text-content-primary active:bg-gray-50 dark:active:bg-charcoal-700 rounded-lg cursor-pointer",
2260
+ 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",
2260
2261
  onClick: () => handleMenuClick(item.action || item.onClick),
2261
2262
  children: item.label
2262
2263
  },
@@ -3432,7 +3433,7 @@ function DataTable({
3432
3433
  "table",
3433
3434
  {
3434
3435
  className: classNames({
3435
- "w-full text-sm dark:text-content-primary rounded-xl border-separate border-spacing-0": true,
3436
+ "w-full text-sm rounded-xl border-separate border-spacing-0": true,
3436
3437
  "text-charcoal-100": !!darkMode,
3437
3438
  "text-content-secondary": !darkMode
3438
3439
  }),
@@ -3691,7 +3692,7 @@ function DataGridHeader({ sort, onClick, opts, children }) {
3691
3692
  "!text-right": align === "right",
3692
3693
  "whitespace-nowrap": !!noWrap,
3693
3694
  "sticky top-0 z-10 dark:bg-charcoal-800": !!stickyHeader,
3694
- "bg-cream-50": !darkMode,
3695
+ "bg-white dark:bg-charcoal-800": !darkMode,
3695
3696
  "bg-charcoal-800": !!darkMode
3696
3697
  }),
3697
3698
  onClick,
@@ -3714,7 +3715,7 @@ function DataGridHeader({ sort, onClick, opts, children }) {
3714
3715
  "!text-left": align === "left",
3715
3716
  "whitespace-nowrap": !!noWrap,
3716
3717
  "sticky top-0 z-10 dark:bg-charcoal-800": !!stickyHeader,
3717
- "bg-cream-50": !darkMode,
3718
+ "bg-white dark:bg-charcoal-800": !darkMode,
3718
3719
  "bg-charcoal-800": !!darkMode
3719
3720
  }),
3720
3721
  children