lkd-web-kit 0.4.7 → 0.4.8

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.
@@ -3,26 +3,26 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  const jsxRuntime = require('react/jsx-runtime');
6
- const clsx = require('clsx');
7
6
  const Icon = require('../Icon.cjs');
7
+ const core = require('@mantine/core');
8
8
 
9
9
  const pxBySize = {
10
10
  sm: 48,
11
11
  md: 60,
12
12
  lg: 84
13
13
  };
14
- const EmptyState = ({
15
- label,
16
- action,
17
- icon,
18
- className,
19
- size = "md",
20
- ...props
21
- }) => {
14
+ const EmptyState = ({ label, action, icon, size = "md", ...props }) => {
15
+ const { colors } = core.useMantineTheme();
22
16
  return /* @__PURE__ */ jsxRuntime.jsxs(
23
17
  "div",
24
18
  {
25
- className: clsx("justfiy-center flex flex-col items-center gap-1", className),
19
+ style: {
20
+ display: "flex",
21
+ flexDirection: "column",
22
+ alignItems: "center",
23
+ justifyContent: "center",
24
+ gap: 4
25
+ },
26
26
  ...props,
27
27
  children: [
28
28
  icon && /* @__PURE__ */ jsxRuntime.jsx(
@@ -30,10 +30,22 @@ const EmptyState = ({
30
30
  {
31
31
  i: icon,
32
32
  size: pxBySize[size],
33
- className: "text-gray-2"
33
+ style: {
34
+ color: colors.gray[2]
35
+ }
36
+ }
37
+ ),
38
+ /* @__PURE__ */ jsxRuntime.jsx(
39
+ core.Text,
40
+ {
41
+ c: "gray.6",
42
+ style: {
43
+ fontSize: 14,
44
+ fontWeight: 600
45
+ },
46
+ children: label
34
47
  }
35
48
  ),
36
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-gray-6 text-sm font-semibold", children: label }),
37
49
  /* @__PURE__ */ jsxRuntime.jsx("div", { children: action })
38
50
  ]
39
51
  }
@@ -1,24 +1,24 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import clsx from 'clsx';
3
2
  import { Icon } from '../Icon.js';
3
+ import { useMantineTheme, Text } from '@mantine/core';
4
4
 
5
5
  const pxBySize = {
6
6
  sm: 48,
7
7
  md: 60,
8
8
  lg: 84
9
9
  };
10
- const EmptyState = ({
11
- label,
12
- action,
13
- icon,
14
- className,
15
- size = "md",
16
- ...props
17
- }) => {
10
+ const EmptyState = ({ label, action, icon, size = "md", ...props }) => {
11
+ const { colors } = useMantineTheme();
18
12
  return /* @__PURE__ */ jsxs(
19
13
  "div",
20
14
  {
21
- className: clsx("justfiy-center flex flex-col items-center gap-1", className),
15
+ style: {
16
+ display: "flex",
17
+ flexDirection: "column",
18
+ alignItems: "center",
19
+ justifyContent: "center",
20
+ gap: 4
21
+ },
22
22
  ...props,
23
23
  children: [
24
24
  icon && /* @__PURE__ */ jsx(
@@ -26,10 +26,22 @@ const EmptyState = ({
26
26
  {
27
27
  i: icon,
28
28
  size: pxBySize[size],
29
- className: "text-gray-2"
29
+ style: {
30
+ color: colors.gray[2]
31
+ }
32
+ }
33
+ ),
34
+ /* @__PURE__ */ jsx(
35
+ Text,
36
+ {
37
+ c: "gray.6",
38
+ style: {
39
+ fontSize: 14,
40
+ fontWeight: 600
41
+ },
42
+ children: label
30
43
  }
31
44
  ),
32
- /* @__PURE__ */ jsx("p", { className: "text-gray-6 text-sm font-semibold", children: label }),
33
45
  /* @__PURE__ */ jsx("div", { children: action })
34
46
  ]
35
47
  }
@@ -4,9 +4,8 @@
4
4
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
 
6
6
  const jsxRuntime = require('react/jsx-runtime');
7
- const clsx = require('clsx');
8
7
 
9
- const Icon = ({ i: I, size = "md", style, rotate, className, ...rest }) => {
8
+ const Icon = ({ i: I, size = "md", style, rotate, ...rest }) => {
10
9
  return /* @__PURE__ */ jsxRuntime.jsx(
11
10
  I,
12
11
  {
@@ -17,9 +16,9 @@ const Icon = ({ i: I, size = "md", style, rotate, className, ...rest }) => {
17
16
  viewBox: "0 0 24 24",
18
17
  style: {
19
18
  ...style,
19
+ flexShrink: 0,
20
20
  transform: `rotate(${rotate}deg)`
21
21
  },
22
- className: clsx("shrink-0", className),
23
22
  ...rest
24
23
  }
25
24
  );
@@ -1,8 +1,7 @@
1
1
  'use client';
2
2
  import { jsx } from 'react/jsx-runtime';
3
- import clsx from 'clsx';
4
3
 
5
- const Icon = ({ i: I, size = "md", style, rotate, className, ...rest }) => {
4
+ const Icon = ({ i: I, size = "md", style, rotate, ...rest }) => {
6
5
  return /* @__PURE__ */ jsx(
7
6
  I,
8
7
  {
@@ -13,9 +12,9 @@ const Icon = ({ i: I, size = "md", style, rotate, className, ...rest }) => {
13
12
  viewBox: "0 0 24 24",
14
13
  style: {
15
14
  ...style,
15
+ flexShrink: 0,
16
16
  transform: `rotate(${rotate}deg)`
17
17
  },
18
- className: clsx("shrink-0", className),
19
18
  ...rest
20
19
  }
21
20
  );
@@ -120,7 +120,9 @@ function InfinitySelect({
120
120
  core.Combobox.Options,
121
121
  {
122
122
  mah: 200,
123
- className: "overflow-y-auto",
123
+ style: {
124
+ overflowY: "auto"
125
+ },
124
126
  ref: scrollRef,
125
127
  children: [
126
128
  data.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { ...virtualStyles.getVirtualContainerProps(virtualizer), children: virtualizer.getVirtualItems().map((virtualItem) => {
@@ -139,15 +141,16 @@ function InfinitySelect({
139
141
  },
140
142
  renderOption ? renderOption({ option }) : getOptionLabel(option)
141
143
  );
142
- }) }) : !infinity.isFetching ? /* @__PURE__ */ jsxRuntime.jsx(core.Combobox.Empty, { className: "min-h-6", children: nothingFoundMessage ? typeof nothingFoundMessage === "function" ? nothingFoundMessage({ combobox }) : nothingFoundMessage : "No hay resultados" }) : null,
144
+ }) }) : !infinity.isFetching ? /* @__PURE__ */ jsxRuntime.jsx(core.Combobox.Empty, { mih: 24, children: nothingFoundMessage ? typeof nothingFoundMessage === "function" ? nothingFoundMessage({ combobox }) : nothingFoundMessage : "No hay resultados" }) : null,
143
145
  /* @__PURE__ */ jsxRuntime.jsx(
144
146
  index$1.InfinityLoader,
145
147
  {
146
148
  root: scrollRef,
147
149
  infinity,
148
150
  loaderProps: {
149
- size: "sm",
150
- className: "mt-1 mb-2"
151
+ mt: 4,
152
+ mb: 8,
153
+ size: "sm"
151
154
  }
152
155
  }
153
156
  )
@@ -116,7 +116,9 @@ function InfinitySelect({
116
116
  Combobox.Options,
117
117
  {
118
118
  mah: 200,
119
- className: "overflow-y-auto",
119
+ style: {
120
+ overflowY: "auto"
121
+ },
120
122
  ref: scrollRef,
121
123
  children: [
122
124
  data.length > 0 ? /* @__PURE__ */ jsx("div", { ...getVirtualContainerProps(virtualizer), children: virtualizer.getVirtualItems().map((virtualItem) => {
@@ -135,15 +137,16 @@ function InfinitySelect({
135
137
  },
136
138
  renderOption ? renderOption({ option }) : getOptionLabel(option)
137
139
  );
138
- }) }) : !infinity.isFetching ? /* @__PURE__ */ jsx(Combobox.Empty, { className: "min-h-6", children: nothingFoundMessage ? typeof nothingFoundMessage === "function" ? nothingFoundMessage({ combobox }) : nothingFoundMessage : "No hay resultados" }) : null,
140
+ }) }) : !infinity.isFetching ? /* @__PURE__ */ jsx(Combobox.Empty, { mih: 24, children: nothingFoundMessage ? typeof nothingFoundMessage === "function" ? nothingFoundMessage({ combobox }) : nothingFoundMessage : "No hay resultados" }) : null,
139
141
  /* @__PURE__ */ jsx(
140
142
  InfinityLoader,
141
143
  {
142
144
  root: scrollRef,
143
145
  infinity,
144
146
  loaderProps: {
145
- size: "sm",
146
- className: "mt-1 mb-2"
147
+ mt: 4,
148
+ mb: 8,
149
+ size: "sm"
147
150
  }
148
151
  }
149
152
  )
package/dist/index.d.ts CHANGED
@@ -86,7 +86,7 @@ export declare interface EmptyProps extends ComponentProps<'div'> {
86
86
  size?: keyof typeof pxBySize;
87
87
  }
88
88
 
89
- export declare const EmptyState: ({ label, action, icon, className, size, ...props }: EmptyProps) => JSX.Element;
89
+ export declare const EmptyState: ({ label, action, icon, size, ...props }: EmptyProps) => JSX.Element;
90
90
 
91
91
  declare type ExtractPathParams<T extends string> = T extends `${string}:${infer Param}/${infer Rest}` ? {
92
92
  [K in Param | keyof ExtractPathParams<`/${Rest}`>]: string | number;
@@ -257,7 +257,7 @@ export declare enum HttpStatus {
257
257
  NetworkAuthenticationRequired = 511
258
258
  }
259
259
 
260
- export declare const Icon: ({ i: I, size, style, rotate, className, ...rest }: IconProps) => JSX.Element;
260
+ export declare const Icon: ({ i: I, size, style, rotate, ...rest }: IconProps) => JSX.Element;
261
261
 
262
262
  export declare type IconFC = default_2.FC<ComponentPropsWithoutRef<'svg'>>;
263
263
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lkd-web-kit",
3
- "version": "0.4.7",
3
+ "version": "0.4.8",
4
4
  "description": "A template for creating React component libraries with Vite.",
5
5
  "author": "LKD",
6
6
  "license": "MIT",