@grupor5/raya 0.2.1 → 0.2.3

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.
Files changed (180) hide show
  1. package/README.md +68 -4
  2. package/dist/atoms/avatar/index.d.mts +12 -0
  3. package/dist/atoms/avatar/index.d.ts +12 -0
  4. package/dist/atoms/avatar/index.js +99 -0
  5. package/dist/atoms/avatar/index.mjs +76 -0
  6. package/dist/atoms/badge/index.d.mts +16 -0
  7. package/dist/atoms/badge/index.d.ts +16 -0
  8. package/dist/atoms/badge/index.js +149 -0
  9. package/dist/atoms/badge/index.mjs +146 -0
  10. package/dist/atoms/button/index.d.mts +11 -0
  11. package/dist/atoms/button/index.d.ts +11 -0
  12. package/dist/atoms/button/index.js +307 -0
  13. package/dist/atoms/button/index.mjs +301 -0
  14. package/dist/atoms/checkbox/index.d.mts +6 -0
  15. package/dist/atoms/checkbox/index.d.ts +6 -0
  16. package/dist/atoms/checkbox/index.js +98 -0
  17. package/dist/atoms/checkbox/index.mjs +75 -0
  18. package/dist/atoms/input/index.d.mts +12 -0
  19. package/dist/atoms/input/index.d.ts +12 -0
  20. package/dist/atoms/input/index.js +104 -0
  21. package/dist/atoms/input/index.mjs +82 -0
  22. package/dist/atoms/label/index.d.mts +8 -0
  23. package/dist/atoms/label/index.d.ts +8 -0
  24. package/dist/atoms/label/index.js +77 -0
  25. package/dist/atoms/label/index.mjs +54 -0
  26. package/dist/atoms/radio/index.d.mts +7 -0
  27. package/dist/atoms/radio/index.d.ts +7 -0
  28. package/dist/atoms/radio/index.js +97 -0
  29. package/dist/atoms/radio/index.mjs +73 -0
  30. package/dist/atoms/switch/index.d.mts +6 -0
  31. package/dist/atoms/switch/index.d.ts +6 -0
  32. package/dist/atoms/switch/index.js +97 -0
  33. package/dist/atoms/switch/index.mjs +74 -0
  34. package/dist/atoms/tag/index.d.mts +14 -0
  35. package/dist/atoms/tag/index.d.ts +14 -0
  36. package/dist/atoms/tag/index.js +128 -0
  37. package/dist/atoms/tag/index.mjs +122 -0
  38. package/dist/atoms/textarea/index.d.mts +11 -0
  39. package/dist/atoms/textarea/index.d.ts +11 -0
  40. package/dist/atoms/textarea/index.js +125 -0
  41. package/dist/atoms/textarea/index.mjs +103 -0
  42. package/dist/atoms/typography/index.d.mts +20 -0
  43. package/dist/atoms/typography/index.d.ts +20 -0
  44. package/dist/atoms/typography/index.js +140 -0
  45. package/dist/atoms/typography/index.mjs +115 -0
  46. package/dist/hooks/index.d.mts +1 -0
  47. package/dist/hooks/index.d.ts +1 -0
  48. package/dist/hooks/index.js +17 -0
  49. package/dist/hooks/index.mjs +15 -0
  50. package/dist/hooks/use-pagination.d.mts +10 -0
  51. package/dist/hooks/use-pagination.d.ts +10 -0
  52. package/dist/hooks/use-pagination.js +54 -0
  53. package/dist/hooks/use-pagination.mjs +51 -0
  54. package/dist/hooks/use-toast.d.mts +2 -0
  55. package/dist/hooks/use-toast.d.ts +2 -0
  56. package/dist/hooks/use-toast.js +2 -0
  57. package/dist/hooks/use-toast.mjs +1 -0
  58. package/dist/hooks/useModal.d.mts +7 -0
  59. package/dist/hooks/useModal.d.ts +7 -0
  60. package/dist/hooks/useModal.js +17 -0
  61. package/dist/hooks/useModal.mjs +15 -0
  62. package/dist/index.d.mts +50 -1298
  63. package/dist/index.d.ts +50 -1298
  64. package/dist/molecules/accordion/index.d.mts +17 -0
  65. package/dist/molecules/accordion/index.d.ts +17 -0
  66. package/dist/molecules/accordion/index.js +154 -0
  67. package/dist/molecules/accordion/index.mjs +128 -0
  68. package/dist/molecules/alert/index.d.mts +14 -0
  69. package/dist/molecules/alert/index.d.ts +14 -0
  70. package/dist/molecules/alert/index.js +425 -0
  71. package/dist/molecules/alert/index.mjs +402 -0
  72. package/dist/molecules/card/index.d.mts +10 -0
  73. package/dist/molecules/card/index.d.ts +10 -0
  74. package/dist/molecules/card/index.js +128 -0
  75. package/dist/molecules/card/index.mjs +101 -0
  76. package/dist/molecules/chart/index.d.mts +80 -0
  77. package/dist/molecules/chart/index.d.ts +80 -0
  78. package/dist/molecules/chart/index.js +300 -0
  79. package/dist/molecules/chart/index.mjs +272 -0
  80. package/dist/molecules/data-table/index.d.mts +57 -0
  81. package/dist/molecules/data-table/index.d.ts +57 -0
  82. package/dist/molecules/data-table/index.js +1456 -0
  83. package/dist/molecules/data-table/index.mjs +1430 -0
  84. package/dist/molecules/date-picker/index.d.mts +12 -0
  85. package/dist/molecules/date-picker/index.d.ts +12 -0
  86. package/dist/molecules/date-picker/index.js +756 -0
  87. package/dist/molecules/date-picker/index.mjs +734 -0
  88. package/dist/molecules/dropdown/index.d.mts +21 -0
  89. package/dist/molecules/dropdown/index.d.ts +21 -0
  90. package/dist/molecules/dropdown/index.js +221 -0
  91. package/dist/molecules/dropdown/index.mjs +198 -0
  92. package/dist/molecules/form/index.d.mts +19 -0
  93. package/dist/molecules/form/index.d.ts +19 -0
  94. package/dist/molecules/form/index.js +139 -0
  95. package/dist/molecules/form/index.mjs +114 -0
  96. package/dist/molecules/pagination/index.d.mts +15 -0
  97. package/dist/molecules/pagination/index.d.ts +15 -0
  98. package/dist/molecules/pagination/index.js +605 -0
  99. package/dist/molecules/pagination/index.mjs +583 -0
  100. package/dist/molecules/progress-bar/index.d.mts +15 -0
  101. package/dist/molecules/progress-bar/index.d.ts +15 -0
  102. package/dist/molecules/progress-bar/index.js +166 -0
  103. package/dist/molecules/progress-bar/index.mjs +144 -0
  104. package/dist/molecules/select/index.d.mts +15 -0
  105. package/dist/molecules/select/index.d.ts +15 -0
  106. package/dist/molecules/select/index.js +201 -0
  107. package/dist/molecules/select/index.mjs +169 -0
  108. package/dist/molecules/stepper/index.d.mts +67 -0
  109. package/dist/molecules/stepper/index.d.ts +67 -0
  110. package/dist/molecules/stepper/index.js +287 -0
  111. package/dist/molecules/stepper/index.mjs +260 -0
  112. package/dist/molecules/tabs/index.d.mts +9 -0
  113. package/dist/molecules/tabs/index.d.ts +9 -0
  114. package/dist/molecules/tabs/index.js +112 -0
  115. package/dist/molecules/tabs/index.mjs +86 -0
  116. package/dist/tokens/badge.d.mts +39 -0
  117. package/dist/tokens/badge.d.ts +39 -0
  118. package/dist/tokens/badge.js +61 -0
  119. package/dist/tokens/badge.mjs +59 -0
  120. package/dist/tokens/buttons.d.mts +277 -0
  121. package/dist/tokens/buttons.d.ts +277 -0
  122. package/dist/tokens/buttons.js +191 -0
  123. package/dist/tokens/buttons.mjs +173 -0
  124. package/dist/tokens/colors.d.mts +65 -0
  125. package/dist/tokens/colors.d.ts +65 -0
  126. package/dist/tokens/colors.js +68 -0
  127. package/dist/tokens/colors.mjs +66 -0
  128. package/dist/tokens/effects.d.mts +124 -0
  129. package/dist/tokens/effects.d.ts +124 -0
  130. package/dist/tokens/effects.js +130 -0
  131. package/dist/tokens/effects.mjs +115 -0
  132. package/dist/tokens/grids.d.mts +331 -0
  133. package/dist/tokens/grids.d.ts +331 -0
  134. package/dist/tokens/grids.js +305 -0
  135. package/dist/tokens/grids.mjs +292 -0
  136. package/dist/tokens/icons.d.mts +134 -0
  137. package/dist/tokens/icons.d.ts +134 -0
  138. package/dist/tokens/icons.js +108 -0
  139. package/dist/tokens/icons.mjs +97 -0
  140. package/dist/tokens/index.d.mts +6 -0
  141. package/dist/tokens/index.d.ts +6 -0
  142. package/dist/tokens/index.js +775 -0
  143. package/dist/tokens/index.mjs +743 -0
  144. package/dist/tokens/progress-bar.d.mts +31 -0
  145. package/dist/tokens/progress-bar.d.ts +31 -0
  146. package/dist/tokens/progress-bar.js +70 -0
  147. package/dist/tokens/progress-bar.mjs +68 -0
  148. package/dist/tokens/spacing.d.mts +90 -0
  149. package/dist/tokens/spacing.d.ts +90 -0
  150. package/dist/tokens/spacing.js +120 -0
  151. package/dist/tokens/spacing.mjs +109 -0
  152. package/dist/tokens/stroke.d.mts +292 -0
  153. package/dist/tokens/stroke.d.ts +292 -0
  154. package/dist/tokens/stroke.js +202 -0
  155. package/dist/tokens/stroke.mjs +186 -0
  156. package/dist/tokens/tab.d.mts +31 -0
  157. package/dist/tokens/tab.d.ts +31 -0
  158. package/dist/tokens/tab.js +48 -0
  159. package/dist/tokens/tab.mjs +46 -0
  160. package/dist/tokens/tag.d.mts +53 -0
  161. package/dist/tokens/tag.d.ts +53 -0
  162. package/dist/tokens/tag.js +80 -0
  163. package/dist/tokens/tag.mjs +78 -0
  164. package/dist/tokens/typography.d.mts +394 -0
  165. package/dist/tokens/typography.d.ts +394 -0
  166. package/dist/tokens/typography.js +302 -0
  167. package/dist/tokens/typography.mjs +292 -0
  168. package/dist/utils/classNames.d.mts +3 -0
  169. package/dist/utils/classNames.d.ts +3 -0
  170. package/dist/utils/classNames.js +8 -0
  171. package/dist/utils/classNames.mjs +6 -0
  172. package/dist/utils/cn.d.mts +5 -0
  173. package/dist/utils/cn.d.ts +5 -0
  174. package/dist/utils/cn.js +11 -0
  175. package/dist/utils/cn.mjs +9 -0
  176. package/dist/utils/index.d.mts +3 -0
  177. package/dist/utils/index.d.ts +3 -0
  178. package/dist/utils/index.js +15 -0
  179. package/dist/utils/index.mjs +12 -0
  180. package/package.json +34 -1
@@ -0,0 +1,125 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var clsx = require('clsx');
5
+ var tailwindMerge = require('tailwind-merge');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+
8
+ function _interopNamespace(e) {
9
+ if (e && e.__esModule) return e;
10
+ var n = Object.create(null);
11
+ if (e) {
12
+ Object.keys(e).forEach(function (k) {
13
+ if (k !== 'default') {
14
+ var d = Object.getOwnPropertyDescriptor(e, k);
15
+ Object.defineProperty(n, k, d.get ? d : {
16
+ enumerable: true,
17
+ get: function () { return e[k]; }
18
+ });
19
+ }
20
+ });
21
+ }
22
+ n.default = e;
23
+ return Object.freeze(n);
24
+ }
25
+
26
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
27
+
28
+ var __defProp = Object.defineProperty;
29
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
30
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
31
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
32
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
33
+ var __spreadValues = (a, b) => {
34
+ for (var prop in b || (b = {}))
35
+ if (__hasOwnProp.call(b, prop))
36
+ __defNormalProp(a, prop, b[prop]);
37
+ if (__getOwnPropSymbols)
38
+ for (var prop of __getOwnPropSymbols(b)) {
39
+ if (__propIsEnum.call(b, prop))
40
+ __defNormalProp(a, prop, b[prop]);
41
+ }
42
+ return a;
43
+ };
44
+ var __objRest = (source, exclude) => {
45
+ var target = {};
46
+ for (var prop in source)
47
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
48
+ target[prop] = source[prop];
49
+ if (source != null && __getOwnPropSymbols)
50
+ for (var prop of __getOwnPropSymbols(source)) {
51
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
52
+ target[prop] = source[prop];
53
+ }
54
+ return target;
55
+ };
56
+ function cn(...inputs) {
57
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
58
+ }
59
+ var Textarea = React__namespace.forwardRef(
60
+ (_a, ref) => {
61
+ var _b = _a, { className, error, helperText, label, required, id, maxLength, value, onChange, defaultValue } = _b, props = __objRest(_b, ["className", "error", "helperText", "label", "required", "id", "maxLength", "value", "onChange", "defaultValue"]);
62
+ const textareaId = id || `textarea-${React__namespace.useId()}`;
63
+ const [charCount, setCharCount] = React__namespace.useState(String(defaultValue || "").length);
64
+ const isControlled = value !== void 0;
65
+ const currentLength = isControlled ? String(value).length : charCount;
66
+ const handleOnChange = (e) => {
67
+ if (!isControlled) {
68
+ setCharCount(e.target.value.length);
69
+ }
70
+ if (onChange) {
71
+ onChange(e);
72
+ }
73
+ };
74
+ const displayCounter = typeof maxLength === "number";
75
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full space-y-2", children: [
76
+ (label || displayCounter) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-center", children: [
77
+ label ? /* @__PURE__ */ jsxRuntime.jsx(
78
+ "label",
79
+ {
80
+ htmlFor: textareaId,
81
+ className: cn(
82
+ "text-body-xs font-normal leading-none",
83
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
84
+ required && "after:content-['*'] after:text-destructive after:ml-1"
85
+ ),
86
+ children: label
87
+ }
88
+ ) : /* @__PURE__ */ jsxRuntime.jsx("div", {}),
89
+ " ",
90
+ displayCounter && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-body-xs font-normal text-muted-foreground", children: [
91
+ currentLength,
92
+ "/",
93
+ maxLength
94
+ ] })
95
+ ] }),
96
+ /* @__PURE__ */ jsxRuntime.jsx(
97
+ "textarea",
98
+ __spreadValues({
99
+ id: textareaId,
100
+ className: cn(
101
+ "flex min-h-[80px] w-full rounded-lg border border-primary-600 bg-background px-3 py-2 text-body-sm",
102
+ "placeholder:text-muted-foreground",
103
+ "focus-visible:outline-none focus-visible:shadow-focus",
104
+ "active:shadow-pressed",
105
+ "disabled:cursor-not-allowed disabled:opacity-50",
106
+ error && "border-destructive focus-visible:shadow-destructive",
107
+ className
108
+ ),
109
+ ref,
110
+ maxLength,
111
+ value,
112
+ defaultValue,
113
+ onChange: handleOnChange,
114
+ "aria-invalid": error ? "true" : "false",
115
+ "aria-describedby": error ? `${textareaId}-error` : helperText ? `${textareaId}-helper` : void 0
116
+ }, props)
117
+ ),
118
+ helperText && !error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${textareaId}-helper`, className: "text-body-xs text-muted-foreground", children: helperText }),
119
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { id: `${textareaId}-error`, className: "text-body-xs text-destructive", children: typeof error === "string" ? error : "Este campo tiene errores" })
120
+ ] });
121
+ }
122
+ );
123
+ Textarea.displayName = "Textarea";
124
+
125
+ exports.Textarea = Textarea;
@@ -0,0 +1,103 @@
1
+ import * as React from 'react';
2
+ import { clsx } from 'clsx';
3
+ import { twMerge } from 'tailwind-merge';
4
+ import { jsxs, jsx } from 'react/jsx-runtime';
5
+
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
22
+ var __objRest = (source, exclude) => {
23
+ var target = {};
24
+ for (var prop in source)
25
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
+ target[prop] = source[prop];
27
+ if (source != null && __getOwnPropSymbols)
28
+ for (var prop of __getOwnPropSymbols(source)) {
29
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
+ target[prop] = source[prop];
31
+ }
32
+ return target;
33
+ };
34
+ function cn(...inputs) {
35
+ return twMerge(clsx(inputs));
36
+ }
37
+ var Textarea = React.forwardRef(
38
+ (_a, ref) => {
39
+ var _b = _a, { className, error, helperText, label, required, id, maxLength, value, onChange, defaultValue } = _b, props = __objRest(_b, ["className", "error", "helperText", "label", "required", "id", "maxLength", "value", "onChange", "defaultValue"]);
40
+ const textareaId = id || `textarea-${React.useId()}`;
41
+ const [charCount, setCharCount] = React.useState(String(defaultValue || "").length);
42
+ const isControlled = value !== void 0;
43
+ const currentLength = isControlled ? String(value).length : charCount;
44
+ const handleOnChange = (e) => {
45
+ if (!isControlled) {
46
+ setCharCount(e.target.value.length);
47
+ }
48
+ if (onChange) {
49
+ onChange(e);
50
+ }
51
+ };
52
+ const displayCounter = typeof maxLength === "number";
53
+ return /* @__PURE__ */ jsxs("div", { className: "w-full space-y-2", children: [
54
+ (label || displayCounter) && /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
55
+ label ? /* @__PURE__ */ jsx(
56
+ "label",
57
+ {
58
+ htmlFor: textareaId,
59
+ className: cn(
60
+ "text-body-xs font-normal leading-none",
61
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
62
+ required && "after:content-['*'] after:text-destructive after:ml-1"
63
+ ),
64
+ children: label
65
+ }
66
+ ) : /* @__PURE__ */ jsx("div", {}),
67
+ " ",
68
+ displayCounter && /* @__PURE__ */ jsxs("span", { className: "text-body-xs font-normal text-muted-foreground", children: [
69
+ currentLength,
70
+ "/",
71
+ maxLength
72
+ ] })
73
+ ] }),
74
+ /* @__PURE__ */ jsx(
75
+ "textarea",
76
+ __spreadValues({
77
+ id: textareaId,
78
+ className: cn(
79
+ "flex min-h-[80px] w-full rounded-lg border border-primary-600 bg-background px-3 py-2 text-body-sm",
80
+ "placeholder:text-muted-foreground",
81
+ "focus-visible:outline-none focus-visible:shadow-focus",
82
+ "active:shadow-pressed",
83
+ "disabled:cursor-not-allowed disabled:opacity-50",
84
+ error && "border-destructive focus-visible:shadow-destructive",
85
+ className
86
+ ),
87
+ ref,
88
+ maxLength,
89
+ value,
90
+ defaultValue,
91
+ onChange: handleOnChange,
92
+ "aria-invalid": error ? "true" : "false",
93
+ "aria-describedby": error ? `${textareaId}-error` : helperText ? `${textareaId}-helper` : void 0
94
+ }, props)
95
+ ),
96
+ helperText && !error && /* @__PURE__ */ jsx("p", { id: `${textareaId}-helper`, className: "text-body-xs text-muted-foreground", children: helperText }),
97
+ error && /* @__PURE__ */ jsx("p", { id: `${textareaId}-error`, className: "text-body-xs text-destructive", children: typeof error === "string" ? error : "Este campo tiene errores" })
98
+ ] });
99
+ }
100
+ );
101
+ Textarea.displayName = "Textarea";
102
+
103
+ export { Textarea };
@@ -0,0 +1,20 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const typographyVariants: (props?: ({
6
+ variant?: "display-l" | "heading-xl" | "heading-lg" | "heading-md" | "heading-sm" | "subheading-lg" | "subheading-md" | "subheading-sm" | "body-bold-lg" | "body-bold-md" | "body-bold-sm" | "body-bold-xs" | "body-lg" | "body-md" | "body-sm" | "body-xs" | "caption-c1" | null | undefined;
7
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
8
+ interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
9
+ as?: React.ElementType;
10
+ }
11
+ declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLElement>>;
12
+
13
+ declare const Title: React.ForwardRefExoticComponent<Omit<TypographyProps, "as"> & {
14
+ level: 1 | 2 | 3 | 4 | 5 | 6;
15
+ } & React.RefAttributes<HTMLHeadingElement>>;
16
+
17
+ type ParagraphProps = Omit<TypographyProps, 'as'>;
18
+ declare const Paragraph: React.ForwardRefExoticComponent<ParagraphProps & React.RefAttributes<HTMLParagraphElement>>;
19
+
20
+ export { Paragraph, Title, Typography, type TypographyProps, typographyVariants };
@@ -0,0 +1,20 @@
1
+ import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const typographyVariants: (props?: ({
6
+ variant?: "display-l" | "heading-xl" | "heading-lg" | "heading-md" | "heading-sm" | "subheading-lg" | "subheading-md" | "subheading-sm" | "body-bold-lg" | "body-bold-md" | "body-bold-sm" | "body-bold-xs" | "body-lg" | "body-md" | "body-sm" | "body-xs" | "caption-c1" | null | undefined;
7
+ } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
8
+ interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
9
+ as?: React.ElementType;
10
+ }
11
+ declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLElement>>;
12
+
13
+ declare const Title: React.ForwardRefExoticComponent<Omit<TypographyProps, "as"> & {
14
+ level: 1 | 2 | 3 | 4 | 5 | 6;
15
+ } & React.RefAttributes<HTMLHeadingElement>>;
16
+
17
+ type ParagraphProps = Omit<TypographyProps, 'as'>;
18
+ declare const Paragraph: React.ForwardRefExoticComponent<ParagraphProps & React.RefAttributes<HTMLParagraphElement>>;
19
+
20
+ export { Paragraph, Title, Typography, type TypographyProps, typographyVariants };
@@ -0,0 +1,140 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var classVarianceAuthority = require('class-variance-authority');
5
+ var clsx = require('clsx');
6
+ var tailwindMerge = require('tailwind-merge');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ function _interopNamespace(e) {
10
+ if (e && e.__esModule) return e;
11
+ var n = Object.create(null);
12
+ if (e) {
13
+ Object.keys(e).forEach(function (k) {
14
+ if (k !== 'default') {
15
+ var d = Object.getOwnPropertyDescriptor(e, k);
16
+ Object.defineProperty(n, k, d.get ? d : {
17
+ enumerable: true,
18
+ get: function () { return e[k]; }
19
+ });
20
+ }
21
+ });
22
+ }
23
+ n.default = e;
24
+ return Object.freeze(n);
25
+ }
26
+
27
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
28
+
29
+ var __defProp = Object.defineProperty;
30
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
31
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
32
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
33
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34
+ var __spreadValues = (a, b) => {
35
+ for (var prop in b || (b = {}))
36
+ if (__hasOwnProp.call(b, prop))
37
+ __defNormalProp(a, prop, b[prop]);
38
+ if (__getOwnPropSymbols)
39
+ for (var prop of __getOwnPropSymbols(b)) {
40
+ if (__propIsEnum.call(b, prop))
41
+ __defNormalProp(a, prop, b[prop]);
42
+ }
43
+ return a;
44
+ };
45
+ var __objRest = (source, exclude) => {
46
+ var target = {};
47
+ for (var prop in source)
48
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
49
+ target[prop] = source[prop];
50
+ if (source != null && __getOwnPropSymbols)
51
+ for (var prop of __getOwnPropSymbols(source)) {
52
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
53
+ target[prop] = source[prop];
54
+ }
55
+ return target;
56
+ };
57
+ function cn(...inputs) {
58
+ return tailwindMerge.twMerge(clsx.clsx(inputs));
59
+ }
60
+ var typographyVariants = classVarianceAuthority.cva("font-primary", {
61
+ variants: {
62
+ variant: {
63
+ "display-l": "text-display-l",
64
+ "heading-xl": "text-heading-xl",
65
+ "heading-lg": "text-heading-lg",
66
+ "heading-md": "text-heading-md",
67
+ "heading-sm": "text-heading-sm",
68
+ "subheading-lg": "text-subheading-lg",
69
+ "subheading-md": "text-subheading-md",
70
+ "subheading-sm": "text-subheading-sm",
71
+ "body-bold-lg": "text-body-bold-lg",
72
+ "body-bold-md": "text-body-bold-md",
73
+ "body-bold-sm": "text-body-bold-sm",
74
+ "body-bold-xs": "text-body-bold-xs",
75
+ "body-lg": "text-body-lg",
76
+ "body-md": "text-body-md",
77
+ "body-sm": "text-body-sm",
78
+ "body-xs": "text-body-xs",
79
+ "caption-c1": "text-caption-c1"
80
+ }
81
+ },
82
+ defaultVariants: {
83
+ variant: "body-md"
84
+ }
85
+ });
86
+ var Typography = React__namespace.forwardRef(
87
+ (_a, ref) => {
88
+ var _b = _a, { className, variant, as: Component = "p" } = _b, props = __objRest(_b, ["className", "variant", "as"]);
89
+ return /* @__PURE__ */ jsxRuntime.jsx(
90
+ Component,
91
+ __spreadValues({
92
+ className: cn(typographyVariants({ variant, className })),
93
+ ref
94
+ }, props)
95
+ );
96
+ }
97
+ );
98
+ Typography.displayName = "Typography";
99
+ var levelMapping = {
100
+ 1: { as: "h1", variant: "display-l" },
101
+ 2: { as: "h2", variant: "heading-xl" },
102
+ 3: { as: "h3", variant: "heading-lg" },
103
+ 4: { as: "h4", variant: "heading-md" },
104
+ 5: { as: "h5", variant: "heading-sm" },
105
+ 6: { as: "h6", variant: "subheading-lg" }
106
+ };
107
+ var Title = React__namespace.forwardRef(
108
+ (_a, ref) => {
109
+ var _b = _a, { level, variant } = _b, props = __objRest(_b, ["level", "variant"]);
110
+ const { as, variant: defaultVariant } = levelMapping[level];
111
+ return /* @__PURE__ */ jsxRuntime.jsx(
112
+ Typography,
113
+ __spreadValues({
114
+ ref,
115
+ as,
116
+ variant: variant || defaultVariant
117
+ }, props)
118
+ );
119
+ }
120
+ );
121
+ Title.displayName = "Title";
122
+ var Paragraph = React__namespace.forwardRef(
123
+ (_a, ref) => {
124
+ var _b = _a, { variant = "body-md" } = _b, props = __objRest(_b, ["variant"]);
125
+ return /* @__PURE__ */ jsxRuntime.jsx(
126
+ Typography,
127
+ __spreadValues({
128
+ ref,
129
+ as: "p",
130
+ variant
131
+ }, props)
132
+ );
133
+ }
134
+ );
135
+ Paragraph.displayName = "Paragraph";
136
+
137
+ exports.Paragraph = Paragraph;
138
+ exports.Title = Title;
139
+ exports.Typography = Typography;
140
+ exports.typographyVariants = typographyVariants;
@@ -0,0 +1,115 @@
1
+ import * as React from 'react';
2
+ import { cva } from 'class-variance-authority';
3
+ import { clsx } from 'clsx';
4
+ import { twMerge } from 'tailwind-merge';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ var __defProp = Object.defineProperty;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
20
+ }
21
+ return a;
22
+ };
23
+ var __objRest = (source, exclude) => {
24
+ var target = {};
25
+ for (var prop in source)
26
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
27
+ target[prop] = source[prop];
28
+ if (source != null && __getOwnPropSymbols)
29
+ for (var prop of __getOwnPropSymbols(source)) {
30
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
31
+ target[prop] = source[prop];
32
+ }
33
+ return target;
34
+ };
35
+ function cn(...inputs) {
36
+ return twMerge(clsx(inputs));
37
+ }
38
+ var typographyVariants = cva("font-primary", {
39
+ variants: {
40
+ variant: {
41
+ "display-l": "text-display-l",
42
+ "heading-xl": "text-heading-xl",
43
+ "heading-lg": "text-heading-lg",
44
+ "heading-md": "text-heading-md",
45
+ "heading-sm": "text-heading-sm",
46
+ "subheading-lg": "text-subheading-lg",
47
+ "subheading-md": "text-subheading-md",
48
+ "subheading-sm": "text-subheading-sm",
49
+ "body-bold-lg": "text-body-bold-lg",
50
+ "body-bold-md": "text-body-bold-md",
51
+ "body-bold-sm": "text-body-bold-sm",
52
+ "body-bold-xs": "text-body-bold-xs",
53
+ "body-lg": "text-body-lg",
54
+ "body-md": "text-body-md",
55
+ "body-sm": "text-body-sm",
56
+ "body-xs": "text-body-xs",
57
+ "caption-c1": "text-caption-c1"
58
+ }
59
+ },
60
+ defaultVariants: {
61
+ variant: "body-md"
62
+ }
63
+ });
64
+ var Typography = React.forwardRef(
65
+ (_a, ref) => {
66
+ var _b = _a, { className, variant, as: Component = "p" } = _b, props = __objRest(_b, ["className", "variant", "as"]);
67
+ return /* @__PURE__ */ jsx(
68
+ Component,
69
+ __spreadValues({
70
+ className: cn(typographyVariants({ variant, className })),
71
+ ref
72
+ }, props)
73
+ );
74
+ }
75
+ );
76
+ Typography.displayName = "Typography";
77
+ var levelMapping = {
78
+ 1: { as: "h1", variant: "display-l" },
79
+ 2: { as: "h2", variant: "heading-xl" },
80
+ 3: { as: "h3", variant: "heading-lg" },
81
+ 4: { as: "h4", variant: "heading-md" },
82
+ 5: { as: "h5", variant: "heading-sm" },
83
+ 6: { as: "h6", variant: "subheading-lg" }
84
+ };
85
+ var Title = React.forwardRef(
86
+ (_a, ref) => {
87
+ var _b = _a, { level, variant } = _b, props = __objRest(_b, ["level", "variant"]);
88
+ const { as, variant: defaultVariant } = levelMapping[level];
89
+ return /* @__PURE__ */ jsx(
90
+ Typography,
91
+ __spreadValues({
92
+ ref,
93
+ as,
94
+ variant: variant || defaultVariant
95
+ }, props)
96
+ );
97
+ }
98
+ );
99
+ Title.displayName = "Title";
100
+ var Paragraph = React.forwardRef(
101
+ (_a, ref) => {
102
+ var _b = _a, { variant = "body-md" } = _b, props = __objRest(_b, ["variant"]);
103
+ return /* @__PURE__ */ jsx(
104
+ Typography,
105
+ __spreadValues({
106
+ ref,
107
+ as: "p",
108
+ variant
109
+ }, props)
110
+ );
111
+ }
112
+ );
113
+ Paragraph.displayName = "Paragraph";
114
+
115
+ export { Paragraph, Title, Typography, typographyVariants };
@@ -0,0 +1 @@
1
+ export { useModal } from './useModal.mjs';
@@ -0,0 +1 @@
1
+ export { useModal } from './useModal.js';
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // src/hooks/useModal.ts
6
+ function useModal(initialOpen = false) {
7
+ const [open, setOpen] = react.useState(initialOpen);
8
+ function openModal() {
9
+ setOpen(true);
10
+ }
11
+ function closeModal() {
12
+ setOpen(false);
13
+ }
14
+ return { open, openModal, closeModal };
15
+ }
16
+
17
+ exports.useModal = useModal;
@@ -0,0 +1,15 @@
1
+ import { useState } from 'react';
2
+
3
+ // src/hooks/useModal.ts
4
+ function useModal(initialOpen = false) {
5
+ const [open, setOpen] = useState(initialOpen);
6
+ function openModal() {
7
+ setOpen(true);
8
+ }
9
+ function closeModal() {
10
+ setOpen(false);
11
+ }
12
+ return { open, openModal, closeModal };
13
+ }
14
+
15
+ export { useModal };
@@ -0,0 +1,10 @@
1
+ declare const DOTS = "...";
2
+ interface UsePaginationProps {
3
+ totalCount: number;
4
+ pageSize: number;
5
+ siblingCount?: number;
6
+ currentPage: number;
7
+ }
8
+ declare const usePagination: ({ totalCount, pageSize, siblingCount, currentPage, }: UsePaginationProps) => (string | number)[];
9
+
10
+ export { DOTS, type UsePaginationProps, usePagination };
@@ -0,0 +1,10 @@
1
+ declare const DOTS = "...";
2
+ interface UsePaginationProps {
3
+ totalCount: number;
4
+ pageSize: number;
5
+ siblingCount?: number;
6
+ currentPage: number;
7
+ }
8
+ declare const usePagination: ({ totalCount, pageSize, siblingCount, currentPage, }: UsePaginationProps) => (string | number)[];
9
+
10
+ export { DOTS, type UsePaginationProps, usePagination };
@@ -0,0 +1,54 @@
1
+ 'use strict';
2
+
3
+ var react = require('react');
4
+
5
+ // src/hooks/use-pagination.ts
6
+ var DOTS = "...";
7
+ var range = (start, end) => {
8
+ const length = end - start + 1;
9
+ return Array.from({ length }, (_, idx) => idx + start);
10
+ };
11
+ var usePagination = ({
12
+ totalCount,
13
+ pageSize,
14
+ siblingCount = 1,
15
+ currentPage
16
+ }) => {
17
+ const paginationRange = react.useMemo(() => {
18
+ const totalPageCount = Math.ceil(totalCount / pageSize);
19
+ if (totalPageCount <= 10) {
20
+ return range(1, totalPageCount);
21
+ }
22
+ const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
23
+ const rightSiblingIndex = Math.min(
24
+ currentPage + siblingCount,
25
+ totalPageCount
26
+ );
27
+ const shouldShowLeftDots = leftSiblingIndex > 2;
28
+ const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
29
+ const firstPageIndex = 1;
30
+ const lastPageIndex = totalPageCount;
31
+ if (!shouldShowLeftDots && shouldShowRightDots) {
32
+ const leftItemCount = 3 + 2 * siblingCount;
33
+ const leftRange = range(1, leftItemCount);
34
+ return [...leftRange, DOTS, totalPageCount];
35
+ }
36
+ if (shouldShowLeftDots && !shouldShowRightDots) {
37
+ const rightItemCount = 3 + 2 * siblingCount;
38
+ const rightRange = range(
39
+ totalPageCount - rightItemCount + 1,
40
+ totalPageCount
41
+ );
42
+ return [firstPageIndex, DOTS, ...rightRange];
43
+ }
44
+ if (shouldShowLeftDots && shouldShowRightDots) {
45
+ const middleRange = range(leftSiblingIndex, rightSiblingIndex);
46
+ return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
47
+ }
48
+ return range(1, totalPageCount);
49
+ }, [totalCount, pageSize, siblingCount, currentPage]);
50
+ return paginationRange;
51
+ };
52
+
53
+ exports.DOTS = DOTS;
54
+ exports.usePagination = usePagination;