@grupor5/raya 0.2.1 → 0.2.2
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/README.md +47 -4
- package/dist/atoms/avatar/index.d.mts +12 -0
- package/dist/atoms/avatar/index.d.ts +12 -0
- package/dist/atoms/avatar/index.js +99 -0
- package/dist/atoms/avatar/index.mjs +76 -0
- package/dist/atoms/badge/index.d.mts +16 -0
- package/dist/atoms/badge/index.d.ts +16 -0
- package/dist/atoms/badge/index.js +149 -0
- package/dist/atoms/badge/index.mjs +146 -0
- package/dist/atoms/button/index.d.mts +11 -0
- package/dist/atoms/button/index.d.ts +11 -0
- package/dist/atoms/button/index.js +307 -0
- package/dist/atoms/button/index.mjs +301 -0
- package/dist/atoms/checkbox/index.d.mts +6 -0
- package/dist/atoms/checkbox/index.d.ts +6 -0
- package/dist/atoms/checkbox/index.js +98 -0
- package/dist/atoms/checkbox/index.mjs +75 -0
- package/dist/atoms/input/index.d.mts +12 -0
- package/dist/atoms/input/index.d.ts +12 -0
- package/dist/atoms/input/index.js +104 -0
- package/dist/atoms/input/index.mjs +82 -0
- package/dist/atoms/label/index.d.mts +8 -0
- package/dist/atoms/label/index.d.ts +8 -0
- package/dist/atoms/label/index.js +77 -0
- package/dist/atoms/label/index.mjs +54 -0
- package/dist/atoms/radio/index.d.mts +7 -0
- package/dist/atoms/radio/index.d.ts +7 -0
- package/dist/atoms/radio/index.js +97 -0
- package/dist/atoms/radio/index.mjs +73 -0
- package/dist/atoms/switch/index.d.mts +6 -0
- package/dist/atoms/switch/index.d.ts +6 -0
- package/dist/atoms/switch/index.js +97 -0
- package/dist/atoms/switch/index.mjs +74 -0
- package/dist/atoms/tag/index.d.mts +14 -0
- package/dist/atoms/tag/index.d.ts +14 -0
- package/dist/atoms/tag/index.js +128 -0
- package/dist/atoms/tag/index.mjs +122 -0
- package/dist/atoms/textarea/index.d.mts +11 -0
- package/dist/atoms/textarea/index.d.ts +11 -0
- package/dist/atoms/textarea/index.js +125 -0
- package/dist/atoms/textarea/index.mjs +103 -0
- package/dist/atoms/typography/index.d.mts +20 -0
- package/dist/atoms/typography/index.d.ts +20 -0
- package/dist/atoms/typography/index.js +140 -0
- package/dist/atoms/typography/index.mjs +115 -0
- package/dist/hooks/index.d.mts +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +17 -0
- package/dist/hooks/index.mjs +15 -0
- package/dist/hooks/use-pagination.d.mts +10 -0
- package/dist/hooks/use-pagination.d.ts +10 -0
- package/dist/hooks/use-pagination.js +54 -0
- package/dist/hooks/use-pagination.mjs +51 -0
- package/dist/hooks/use-toast.d.mts +2 -0
- package/dist/hooks/use-toast.d.ts +2 -0
- package/dist/hooks/use-toast.js +2 -0
- package/dist/hooks/use-toast.mjs +1 -0
- package/dist/hooks/useModal.d.mts +7 -0
- package/dist/hooks/useModal.d.ts +7 -0
- package/dist/hooks/useModal.js +17 -0
- package/dist/hooks/useModal.mjs +15 -0
- package/dist/index.d.mts +50 -1298
- package/dist/index.d.ts +50 -1298
- package/dist/molecules/accordion/index.d.mts +17 -0
- package/dist/molecules/accordion/index.d.ts +17 -0
- package/dist/molecules/accordion/index.js +154 -0
- package/dist/molecules/accordion/index.mjs +128 -0
- package/dist/molecules/alert/index.d.mts +14 -0
- package/dist/molecules/alert/index.d.ts +14 -0
- package/dist/molecules/alert/index.js +425 -0
- package/dist/molecules/alert/index.mjs +402 -0
- package/dist/molecules/card/index.d.mts +10 -0
- package/dist/molecules/card/index.d.ts +10 -0
- package/dist/molecules/card/index.js +128 -0
- package/dist/molecules/card/index.mjs +101 -0
- package/dist/molecules/chart/index.d.mts +80 -0
- package/dist/molecules/chart/index.d.ts +80 -0
- package/dist/molecules/chart/index.js +300 -0
- package/dist/molecules/chart/index.mjs +272 -0
- package/dist/molecules/data-table/index.d.mts +57 -0
- package/dist/molecules/data-table/index.d.ts +57 -0
- package/dist/molecules/data-table/index.js +1456 -0
- package/dist/molecules/data-table/index.mjs +1430 -0
- package/dist/molecules/date-picker/index.d.mts +12 -0
- package/dist/molecules/date-picker/index.d.ts +12 -0
- package/dist/molecules/date-picker/index.js +756 -0
- package/dist/molecules/date-picker/index.mjs +734 -0
- package/dist/molecules/dropdown/index.d.mts +21 -0
- package/dist/molecules/dropdown/index.d.ts +21 -0
- package/dist/molecules/dropdown/index.js +221 -0
- package/dist/molecules/dropdown/index.mjs +198 -0
- package/dist/molecules/form/index.d.mts +19 -0
- package/dist/molecules/form/index.d.ts +19 -0
- package/dist/molecules/form/index.js +139 -0
- package/dist/molecules/form/index.mjs +114 -0
- package/dist/molecules/pagination/index.d.mts +15 -0
- package/dist/molecules/pagination/index.d.ts +15 -0
- package/dist/molecules/pagination/index.js +605 -0
- package/dist/molecules/pagination/index.mjs +583 -0
- package/dist/molecules/progress-bar/index.d.mts +15 -0
- package/dist/molecules/progress-bar/index.d.ts +15 -0
- package/dist/molecules/progress-bar/index.js +166 -0
- package/dist/molecules/progress-bar/index.mjs +144 -0
- package/dist/molecules/select/index.d.mts +15 -0
- package/dist/molecules/select/index.d.ts +15 -0
- package/dist/molecules/select/index.js +201 -0
- package/dist/molecules/select/index.mjs +169 -0
- package/dist/molecules/stepper/index.d.mts +67 -0
- package/dist/molecules/stepper/index.d.ts +67 -0
- package/dist/molecules/stepper/index.js +287 -0
- package/dist/molecules/stepper/index.mjs +260 -0
- package/dist/molecules/tabs/index.d.mts +9 -0
- package/dist/molecules/tabs/index.d.ts +9 -0
- package/dist/molecules/tabs/index.js +112 -0
- package/dist/molecules/tabs/index.mjs +86 -0
- package/dist/tokens/badge.d.mts +39 -0
- package/dist/tokens/badge.d.ts +39 -0
- package/dist/tokens/badge.js +61 -0
- package/dist/tokens/badge.mjs +59 -0
- package/dist/tokens/buttons.d.mts +277 -0
- package/dist/tokens/buttons.d.ts +277 -0
- package/dist/tokens/buttons.js +191 -0
- package/dist/tokens/buttons.mjs +173 -0
- package/dist/tokens/colors.d.mts +65 -0
- package/dist/tokens/colors.d.ts +65 -0
- package/dist/tokens/colors.js +68 -0
- package/dist/tokens/colors.mjs +66 -0
- package/dist/tokens/effects.d.mts +124 -0
- package/dist/tokens/effects.d.ts +124 -0
- package/dist/tokens/effects.js +130 -0
- package/dist/tokens/effects.mjs +115 -0
- package/dist/tokens/grids.d.mts +331 -0
- package/dist/tokens/grids.d.ts +331 -0
- package/dist/tokens/grids.js +305 -0
- package/dist/tokens/grids.mjs +292 -0
- package/dist/tokens/icons.d.mts +134 -0
- package/dist/tokens/icons.d.ts +134 -0
- package/dist/tokens/icons.js +108 -0
- package/dist/tokens/icons.mjs +97 -0
- package/dist/tokens/index.d.mts +6 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +775 -0
- package/dist/tokens/index.mjs +743 -0
- package/dist/tokens/progress-bar.d.mts +31 -0
- package/dist/tokens/progress-bar.d.ts +31 -0
- package/dist/tokens/progress-bar.js +70 -0
- package/dist/tokens/progress-bar.mjs +68 -0
- package/dist/tokens/spacing.d.mts +90 -0
- package/dist/tokens/spacing.d.ts +90 -0
- package/dist/tokens/spacing.js +120 -0
- package/dist/tokens/spacing.mjs +109 -0
- package/dist/tokens/stroke.d.mts +292 -0
- package/dist/tokens/stroke.d.ts +292 -0
- package/dist/tokens/stroke.js +202 -0
- package/dist/tokens/stroke.mjs +186 -0
- package/dist/tokens/tab.d.mts +31 -0
- package/dist/tokens/tab.d.ts +31 -0
- package/dist/tokens/tab.js +48 -0
- package/dist/tokens/tab.mjs +46 -0
- package/dist/tokens/tag.d.mts +53 -0
- package/dist/tokens/tag.d.ts +53 -0
- package/dist/tokens/tag.js +80 -0
- package/dist/tokens/tag.mjs +78 -0
- package/dist/tokens/typography.d.mts +394 -0
- package/dist/tokens/typography.d.ts +394 -0
- package/dist/tokens/typography.js +302 -0
- package/dist/tokens/typography.mjs +292 -0
- package/dist/utils/classNames.d.mts +3 -0
- package/dist/utils/classNames.d.ts +3 -0
- package/dist/utils/classNames.js +8 -0
- package/dist/utils/classNames.mjs +6 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +11 -0
- package/dist/utils/cn.mjs +9 -0
- package/dist/utils/index.d.mts +3 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.js +15 -0
- package/dist/utils/index.mjs +12 -0
- package/package.json +34 -1
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
import { Circle } from 'lucide-react';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __defProps = Object.defineProperties;
|
|
10
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
11
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
if (__getOwnPropSymbols)
|
|
20
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
};
|
|
26
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
+
var __objRest = (source, exclude) => {
|
|
28
|
+
var target = {};
|
|
29
|
+
for (var prop in source)
|
|
30
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
if (source != null && __getOwnPropSymbols)
|
|
33
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
34
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
39
|
+
function cn(...inputs) {
|
|
40
|
+
return twMerge(clsx(inputs));
|
|
41
|
+
}
|
|
42
|
+
var RadioGroup = React.forwardRef((_a, ref) => {
|
|
43
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
RadioGroupPrimitive.Root,
|
|
46
|
+
__spreadProps(__spreadValues({
|
|
47
|
+
className: cn("grid gap-2", className)
|
|
48
|
+
}, props), {
|
|
49
|
+
ref
|
|
50
|
+
})
|
|
51
|
+
);
|
|
52
|
+
});
|
|
53
|
+
RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
|
|
54
|
+
var RadioGroupItem = React.forwardRef((_a, ref) => {
|
|
55
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
56
|
+
return /* @__PURE__ */ jsx(
|
|
57
|
+
RadioGroupPrimitive.Item,
|
|
58
|
+
__spreadProps(__spreadValues({
|
|
59
|
+
ref,
|
|
60
|
+
className: cn(
|
|
61
|
+
"aspect-square h-5 w-5 rounded-full border border-primary-1200 text-primary-1200 mx-s",
|
|
62
|
+
"focus:outline-none focus-visible:shadow-focus",
|
|
63
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
64
|
+
className
|
|
65
|
+
)
|
|
66
|
+
}, props), {
|
|
67
|
+
children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-3 w-3 fill-current text-current" }) })
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
|
|
72
|
+
|
|
73
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
3
|
+
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
3
|
+
|
|
4
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var SwitchPrimitives = require('@radix-ui/react-switch');
|
|
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
|
+
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
29
|
+
|
|
30
|
+
var __defProp = Object.defineProperty;
|
|
31
|
+
var __defProps = Object.defineProperties;
|
|
32
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
33
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
34
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
35
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
36
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37
|
+
var __spreadValues = (a, b) => {
|
|
38
|
+
for (var prop in b || (b = {}))
|
|
39
|
+
if (__hasOwnProp.call(b, prop))
|
|
40
|
+
__defNormalProp(a, prop, b[prop]);
|
|
41
|
+
if (__getOwnPropSymbols)
|
|
42
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
43
|
+
if (__propIsEnum.call(b, prop))
|
|
44
|
+
__defNormalProp(a, prop, b[prop]);
|
|
45
|
+
}
|
|
46
|
+
return a;
|
|
47
|
+
};
|
|
48
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
49
|
+
var __objRest = (source, exclude) => {
|
|
50
|
+
var target = {};
|
|
51
|
+
for (var prop in source)
|
|
52
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
53
|
+
target[prop] = source[prop];
|
|
54
|
+
if (source != null && __getOwnPropSymbols)
|
|
55
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
56
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
57
|
+
target[prop] = source[prop];
|
|
58
|
+
}
|
|
59
|
+
return target;
|
|
60
|
+
};
|
|
61
|
+
function cn(...inputs) {
|
|
62
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
63
|
+
}
|
|
64
|
+
var Switch = React__namespace.forwardRef((_a, ref) => {
|
|
65
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
66
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
+
SwitchPrimitives__namespace.Root,
|
|
68
|
+
__spreadProps(__spreadValues({
|
|
69
|
+
className: cn(
|
|
70
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors mx-s",
|
|
71
|
+
"focus-visible:outline-none focus-visible:shadow-focus",
|
|
72
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
73
|
+
"data-[state=unchecked]:bg-primary-300 data-[state=checked]:bg-secondary-600",
|
|
74
|
+
// Pressed states
|
|
75
|
+
"data-[state=unchecked]:active:bg-primary-400 data-[state=checked]:active:bg-secondary-700",
|
|
76
|
+
// Disabled states
|
|
77
|
+
"data-[state=unchecked]:disabled:bg-primary-200 data-[state=checked]:disabled:bg-secondary-300",
|
|
78
|
+
className
|
|
79
|
+
)
|
|
80
|
+
}, props), {
|
|
81
|
+
ref,
|
|
82
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
83
|
+
SwitchPrimitives__namespace.Thumb,
|
|
84
|
+
{
|
|
85
|
+
className: cn(
|
|
86
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-neutral-10 shadow-lg ring-0 transition-transform",
|
|
87
|
+
"data-[state=unchecked]:translate-x-0",
|
|
88
|
+
"data-[state=checked]:translate-x-5"
|
|
89
|
+
)
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
96
|
+
|
|
97
|
+
exports.Switch = Switch;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
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 __defProps = Object.defineProperties;
|
|
9
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
+
var __objRest = (source, exclude) => {
|
|
27
|
+
var target = {};
|
|
28
|
+
for (var prop in source)
|
|
29
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
if (source != null && __getOwnPropSymbols)
|
|
32
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
+
target[prop] = source[prop];
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
function cn(...inputs) {
|
|
39
|
+
return twMerge(clsx(inputs));
|
|
40
|
+
}
|
|
41
|
+
var Switch = React.forwardRef((_a, ref) => {
|
|
42
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
SwitchPrimitives.Root,
|
|
45
|
+
__spreadProps(__spreadValues({
|
|
46
|
+
className: cn(
|
|
47
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors mx-s",
|
|
48
|
+
"focus-visible:outline-none focus-visible:shadow-focus",
|
|
49
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
50
|
+
"data-[state=unchecked]:bg-primary-300 data-[state=checked]:bg-secondary-600",
|
|
51
|
+
// Pressed states
|
|
52
|
+
"data-[state=unchecked]:active:bg-primary-400 data-[state=checked]:active:bg-secondary-700",
|
|
53
|
+
// Disabled states
|
|
54
|
+
"data-[state=unchecked]:disabled:bg-primary-200 data-[state=checked]:disabled:bg-secondary-300",
|
|
55
|
+
className
|
|
56
|
+
)
|
|
57
|
+
}, props), {
|
|
58
|
+
ref,
|
|
59
|
+
children: /* @__PURE__ */ jsx(
|
|
60
|
+
SwitchPrimitives.Thumb,
|
|
61
|
+
{
|
|
62
|
+
className: cn(
|
|
63
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-neutral-10 shadow-lg ring-0 transition-transform",
|
|
64
|
+
"data-[state=unchecked]:translate-x-0",
|
|
65
|
+
"data-[state=checked]:translate-x-5"
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
})
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
73
|
+
|
|
74
|
+
export { Switch };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const tagVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "success" | "danger" | "warning" | null | undefined;
|
|
7
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface TagProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof tagVariants> {
|
|
9
|
+
showBullet?: boolean;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const Tag: React__default.ForwardRefExoticComponent<TagProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
|
|
14
|
+
export { Tag, type TagProps };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const tagVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "success" | "danger" | "warning" | null | undefined;
|
|
7
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface TagProps extends React__default.HTMLAttributes<HTMLDivElement>, VariantProps<typeof tagVariants> {
|
|
9
|
+
showBullet?: boolean;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const Tag: React__default.ForwardRefExoticComponent<TagProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
|
|
14
|
+
export { Tag, type TagProps };
|
|
@@ -0,0 +1,128 @@
|
|
|
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 rayaIcons = require('@grupor5/raya-icons');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
13
|
+
|
|
14
|
+
var __defProp = Object.defineProperty;
|
|
15
|
+
var __defProps = Object.defineProperties;
|
|
16
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
17
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
18
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
19
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
20
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
21
|
+
var __spreadValues = (a, b) => {
|
|
22
|
+
for (var prop in b || (b = {}))
|
|
23
|
+
if (__hasOwnProp.call(b, prop))
|
|
24
|
+
__defNormalProp(a, prop, b[prop]);
|
|
25
|
+
if (__getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
27
|
+
if (__propIsEnum.call(b, prop))
|
|
28
|
+
__defNormalProp(a, prop, b[prop]);
|
|
29
|
+
}
|
|
30
|
+
return a;
|
|
31
|
+
};
|
|
32
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
33
|
+
var __objRest = (source, exclude) => {
|
|
34
|
+
var target = {};
|
|
35
|
+
for (var prop in source)
|
|
36
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
37
|
+
target[prop] = source[prop];
|
|
38
|
+
if (source != null && __getOwnPropSymbols)
|
|
39
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
40
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
41
|
+
target[prop] = source[prop];
|
|
42
|
+
}
|
|
43
|
+
return target;
|
|
44
|
+
};
|
|
45
|
+
function cn(...inputs) {
|
|
46
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
47
|
+
}
|
|
48
|
+
var tagVariants = classVarianceAuthority.cva(
|
|
49
|
+
"group inline-flex items-center justify-center rounded-tag px-tag-x py-tag-y text-tag transition-colors",
|
|
50
|
+
{
|
|
51
|
+
variants: {
|
|
52
|
+
variant: {
|
|
53
|
+
default: "bg-tag-default-background text-tag-default-text hover:bg-tag-default-hover-background",
|
|
54
|
+
success: "bg-tag-success-background text-tag-success-text hover:bg-tag-success-hover-background",
|
|
55
|
+
warning: "bg-tag-warning-background text-tag-warning-text hover:bg-tag-warning-hover-background",
|
|
56
|
+
danger: "bg-tag-danger-background text-tag-danger-text hover:bg-tag-danger-hover-background"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
variant: "default"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
var bulletVariants = classVarianceAuthority.cva("", {
|
|
65
|
+
variants: {
|
|
66
|
+
variant: {
|
|
67
|
+
default: "text-tag-default-bullet",
|
|
68
|
+
success: "text-tag-success-bullet",
|
|
69
|
+
warning: "text-tag-warning-bullet",
|
|
70
|
+
danger: "text-tag-danger-bullet"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
defaultVariants: {
|
|
74
|
+
variant: "default"
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
var closeButtonVariants = classVarianceAuthority.cva(
|
|
78
|
+
"ml-2 flex-shrink-0 transition-colors",
|
|
79
|
+
{
|
|
80
|
+
variants: {
|
|
81
|
+
variant: {
|
|
82
|
+
default: "text-tag-default-text hover:text-tag-default-hover-text",
|
|
83
|
+
success: "text-tag-success-text hover:text-tag-success-hover-text",
|
|
84
|
+
warning: "text-tag-warning-text hover:text-tag-warning-hover-text",
|
|
85
|
+
danger: "text-tag-danger-text hover:text-tag-danger-hover-text"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
variant: "default"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
var Tag = React__default.default.forwardRef(
|
|
94
|
+
(_a, ref) => {
|
|
95
|
+
var _b = _a, { className, children, showBullet = false, onClose, variant } = _b, props = __objRest(_b, ["className", "children", "showBullet", "onClose", "variant"]);
|
|
96
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
97
|
+
"div",
|
|
98
|
+
__spreadProps(__spreadValues({
|
|
99
|
+
className: cn(tagVariants({ variant, className })),
|
|
100
|
+
ref
|
|
101
|
+
}, props), {
|
|
102
|
+
children: [
|
|
103
|
+
showBullet && /* @__PURE__ */ jsxRuntime.jsx(
|
|
104
|
+
rayaIcons.DotIcon,
|
|
105
|
+
{
|
|
106
|
+
className: cn("mr-1.5 flex-shrink-0", bulletVariants({ variant })),
|
|
107
|
+
size: 10
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
children,
|
|
111
|
+
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
112
|
+
"button",
|
|
113
|
+
{
|
|
114
|
+
type: "button",
|
|
115
|
+
onClick: onClose,
|
|
116
|
+
className: cn(closeButtonVariants({ variant })),
|
|
117
|
+
"aria-label": "Remove tag",
|
|
118
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(rayaIcons.CloseSquareIcon, { size: 12 })
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
]
|
|
122
|
+
})
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
Tag.displayName = "Tag";
|
|
127
|
+
|
|
128
|
+
exports.Tag = Tag;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { cva } from 'class-variance-authority';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { DotIcon, CloseSquareIcon } from '@grupor5/raya-icons';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __defProps = Object.defineProperties;
|
|
10
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
11
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
12
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
13
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
15
|
+
var __spreadValues = (a, b) => {
|
|
16
|
+
for (var prop in b || (b = {}))
|
|
17
|
+
if (__hasOwnProp.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
if (__getOwnPropSymbols)
|
|
20
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
21
|
+
if (__propIsEnum.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
}
|
|
24
|
+
return a;
|
|
25
|
+
};
|
|
26
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
27
|
+
var __objRest = (source, exclude) => {
|
|
28
|
+
var target = {};
|
|
29
|
+
for (var prop in source)
|
|
30
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
31
|
+
target[prop] = source[prop];
|
|
32
|
+
if (source != null && __getOwnPropSymbols)
|
|
33
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
34
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
}
|
|
37
|
+
return target;
|
|
38
|
+
};
|
|
39
|
+
function cn(...inputs) {
|
|
40
|
+
return twMerge(clsx(inputs));
|
|
41
|
+
}
|
|
42
|
+
var tagVariants = cva(
|
|
43
|
+
"group inline-flex items-center justify-center rounded-tag px-tag-x py-tag-y text-tag transition-colors",
|
|
44
|
+
{
|
|
45
|
+
variants: {
|
|
46
|
+
variant: {
|
|
47
|
+
default: "bg-tag-default-background text-tag-default-text hover:bg-tag-default-hover-background",
|
|
48
|
+
success: "bg-tag-success-background text-tag-success-text hover:bg-tag-success-hover-background",
|
|
49
|
+
warning: "bg-tag-warning-background text-tag-warning-text hover:bg-tag-warning-hover-background",
|
|
50
|
+
danger: "bg-tag-danger-background text-tag-danger-text hover:bg-tag-danger-hover-background"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
defaultVariants: {
|
|
54
|
+
variant: "default"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
var bulletVariants = cva("", {
|
|
59
|
+
variants: {
|
|
60
|
+
variant: {
|
|
61
|
+
default: "text-tag-default-bullet",
|
|
62
|
+
success: "text-tag-success-bullet",
|
|
63
|
+
warning: "text-tag-warning-bullet",
|
|
64
|
+
danger: "text-tag-danger-bullet"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
variant: "default"
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
var closeButtonVariants = cva(
|
|
72
|
+
"ml-2 flex-shrink-0 transition-colors",
|
|
73
|
+
{
|
|
74
|
+
variants: {
|
|
75
|
+
variant: {
|
|
76
|
+
default: "text-tag-default-text hover:text-tag-default-hover-text",
|
|
77
|
+
success: "text-tag-success-text hover:text-tag-success-hover-text",
|
|
78
|
+
warning: "text-tag-warning-text hover:text-tag-warning-hover-text",
|
|
79
|
+
danger: "text-tag-danger-text hover:text-tag-danger-hover-text"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
defaultVariants: {
|
|
83
|
+
variant: "default"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
var Tag = React.forwardRef(
|
|
88
|
+
(_a, ref) => {
|
|
89
|
+
var _b = _a, { className, children, showBullet = false, onClose, variant } = _b, props = __objRest(_b, ["className", "children", "showBullet", "onClose", "variant"]);
|
|
90
|
+
return /* @__PURE__ */ jsxs(
|
|
91
|
+
"div",
|
|
92
|
+
__spreadProps(__spreadValues({
|
|
93
|
+
className: cn(tagVariants({ variant, className })),
|
|
94
|
+
ref
|
|
95
|
+
}, props), {
|
|
96
|
+
children: [
|
|
97
|
+
showBullet && /* @__PURE__ */ jsx(
|
|
98
|
+
DotIcon,
|
|
99
|
+
{
|
|
100
|
+
className: cn("mr-1.5 flex-shrink-0", bulletVariants({ variant })),
|
|
101
|
+
size: 10
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
children,
|
|
105
|
+
onClose && /* @__PURE__ */ jsx(
|
|
106
|
+
"button",
|
|
107
|
+
{
|
|
108
|
+
type: "button",
|
|
109
|
+
onClick: onClose,
|
|
110
|
+
className: cn(closeButtonVariants({ variant })),
|
|
111
|
+
"aria-label": "Remove tag",
|
|
112
|
+
children: /* @__PURE__ */ jsx(CloseSquareIcon, { size: 12 })
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
]
|
|
116
|
+
})
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
Tag.displayName = "Tag";
|
|
121
|
+
|
|
122
|
+
export { Tag };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
error?: string | boolean;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
|
|
11
|
+
export { Textarea, type TextareaProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
error?: string | boolean;
|
|
5
|
+
helperText?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
10
|
+
|
|
11
|
+
export { Textarea, type TextareaProps };
|