@docsplain-kit/core 0.0.15 → 0.0.16
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/index.d.ts +4 -1
- package/index.js +7 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/skeleton/index.d.ts +2 -0
- package/skeleton/index.js +6 -0
- package/skeleton/index.js.map +1 -0
- package/skeleton/skeleton.d.ts +4 -0
- package/skeleton/skeleton.js +16 -0
- package/skeleton/skeleton.js.map +1 -0
- package/skeleton/skeleton.props.d.ts +12 -0
- package/skeleton/skeleton.props.js +3 -0
- package/skeleton/skeleton.props.js.map +1 -0
- package/skeleton/skeleton.style.d.ts +109 -0
- package/skeleton/skeleton.style.js +127 -0
- package/skeleton/skeleton.style.js.map +1 -0
- package/switch-box/index.d.ts +2 -0
- package/switch-box/index.js +6 -0
- package/switch-box/index.js.map +1 -0
- package/switch-box/switch-box.d.ts +4 -0
- package/switch-box/switch-box.js +18 -0
- package/switch-box/switch-box.js.map +1 -0
- package/switch-box/switch-box.props.d.ts +11 -0
- package/switch-box/switch-box.props.js +3 -0
- package/switch-box/switch-box.props.js.map +1 -0
- package/switch-box/switch-box.style.d.ts +74 -0
- package/switch-box/switch-box.style.js +91 -0
- package/switch-box/switch-box.style.js.map +1 -0
- package/tooltip/index.d.ts +2 -0
- package/tooltip/index.js +6 -0
- package/tooltip/index.js.map +1 -0
- package/tooltip/tooltip.d.ts +4 -0
- package/tooltip/tooltip.js +24 -0
- package/tooltip/tooltip.js.map +1 -0
- package/tooltip/tooltip.style.d.ts +40 -0
- package/tooltip/tooltip.style.js +44 -0
- package/tooltip/tooltip.style.js.map +1 -0
package/index.d.ts
CHANGED
|
@@ -22,7 +22,10 @@ import Popper from './popper/popper';
|
|
|
22
22
|
import PopperHandler from './popper/popper-handler';
|
|
23
23
|
import PopperContent from './popper/popper-content';
|
|
24
24
|
import RadioButton from './radio-button/radio-button';
|
|
25
|
+
import Skeleton from './skeleton/skeleton';
|
|
25
26
|
import Spinner from './spinner/spinner';
|
|
27
|
+
import SwitchBox from './switch-box/switch-box';
|
|
26
28
|
import Text from './text/text';
|
|
29
|
+
import Tooltip from './tooltip/tooltip';
|
|
27
30
|
import { twMerge } from './tailwind-merge-config';
|
|
28
|
-
export { Accordion, AccordionContent, AccordionHeader, Alert, Badge, Button, Card, CardBody, CardHeader, CardFooter, Checkbox, Chip, Div, Divider, Label, List, ListItem, Media, Modal, MousePopup, Popper, PopperHandler, PopperContent, RadioButton, Spinner, Text, twMerge, };
|
|
31
|
+
export { Accordion, AccordionContent, AccordionHeader, Alert, Badge, Button, Card, CardBody, CardHeader, CardFooter, Checkbox, Chip, Div, Divider, Label, List, ListItem, Media, Modal, MousePopup, Popper, PopperHandler, PopperContent, RadioButton, Skeleton, Spinner, SwitchBox, Text, Tooltip, twMerge, };
|
package/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.twMerge = exports.Text = exports.Spinner = exports.RadioButton = exports.PopperContent = exports.PopperHandler = exports.Popper = exports.MousePopup = exports.Modal = exports.Media = exports.ListItem = exports.List = exports.Label = exports.Divider = exports.Div = exports.Chip = exports.Checkbox = exports.CardFooter = exports.CardHeader = exports.CardBody = exports.Card = exports.Button = exports.Badge = exports.Alert = exports.AccordionHeader = exports.AccordionContent = exports.Accordion = void 0;
|
|
3
|
+
exports.twMerge = exports.Tooltip = exports.Text = exports.SwitchBox = exports.Spinner = exports.Skeleton = exports.RadioButton = exports.PopperContent = exports.PopperHandler = exports.Popper = exports.MousePopup = exports.Modal = exports.Media = exports.ListItem = exports.List = exports.Label = exports.Divider = exports.Div = exports.Chip = exports.Checkbox = exports.CardFooter = exports.CardHeader = exports.CardBody = exports.Card = exports.Button = exports.Badge = exports.Alert = exports.AccordionHeader = exports.AccordionContent = exports.Accordion = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var accordion_1 = tslib_1.__importDefault(require("./accordion/accordion"));
|
|
6
6
|
exports.Accordion = accordion_1["default"];
|
|
@@ -50,10 +50,16 @@ var popper_content_1 = tslib_1.__importDefault(require("./popper/popper-content"
|
|
|
50
50
|
exports.PopperContent = popper_content_1["default"];
|
|
51
51
|
var radio_button_1 = tslib_1.__importDefault(require("./radio-button/radio-button"));
|
|
52
52
|
exports.RadioButton = radio_button_1["default"];
|
|
53
|
+
var skeleton_1 = tslib_1.__importDefault(require("./skeleton/skeleton"));
|
|
54
|
+
exports.Skeleton = skeleton_1["default"];
|
|
53
55
|
var spinner_1 = tslib_1.__importDefault(require("./spinner/spinner"));
|
|
54
56
|
exports.Spinner = spinner_1["default"];
|
|
57
|
+
var switch_box_1 = tslib_1.__importDefault(require("./switch-box/switch-box"));
|
|
58
|
+
exports.SwitchBox = switch_box_1["default"];
|
|
55
59
|
var text_1 = tslib_1.__importDefault(require("./text/text"));
|
|
56
60
|
exports.Text = text_1["default"];
|
|
61
|
+
var tooltip_1 = tslib_1.__importDefault(require("./tooltip/tooltip"));
|
|
62
|
+
exports.Tooltip = tooltip_1["default"];
|
|
57
63
|
var tailwind_merge_config_1 = require("./tailwind-merge-config");
|
|
58
64
|
exports.twMerge = tailwind_merge_config_1.twMerge;
|
|
59
65
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;AAAA,4EAA8C;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;AAAA,4EAA8C;AAgC5C,oBAhCK,sBAAS,CAgCL;AA/BX,8GAA+E;AAgC7E,2BAhCK,8BAAgB,CAgCL;AA/BlB,2GAA4E;AAgC1E,0BAhCK,6BAAe,CAgCL;AA/BjB,gEAAkC;AAgChC,gBAhCK,kBAAK,CAgCL;AA/BP,gEAAkC;AAgChC,gBAhCK,k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
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../skeleton/index.ts"],"names":[],"mappings":";;;AAAA,gEAAkC;AAElC,qBAAe,qBAAQ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.Skeleton = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
var tailwind_merge_config_1 = require("../tailwind-merge-config");
|
|
7
|
+
var skeleton_style_1 = require("./skeleton.style");
|
|
8
|
+
var react_2 = require("motion/react");
|
|
9
|
+
var Skeleton = function (_a) {
|
|
10
|
+
var className = _a.className, _b = _a.shape, shape = _b === void 0 ? 'rectangular' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, _e = _a.delay, delay = _e === void 0 ? 0 : _e, _f = _a.animation, animation = _f === void 0 ? 'pulse' : _f, rest = tslib_1.__rest(_a, ["className", "shape", "size", "color", "delay", "animation"]);
|
|
11
|
+
var selectedAnimation = skeleton_style_1.ANIMATIONS[animation];
|
|
12
|
+
return (react_1["default"].createElement(react_2.motion.div, tslib_1.__assign({ role: 'status', className: (0, tailwind_merge_config_1.twMerge)(className, skeleton_style_1.COLORS[color], size ? skeleton_style_1.SIZES[size] : 'h-fit', (0, skeleton_style_1.SHAPES)({ shape: shape, size: size })), initial: selectedAnimation.initial, animate: selectedAnimation.animate, transition: tslib_1.__assign(tslib_1.__assign({}, selectedAnimation.transition), { delay: delay }) }, rest)));
|
|
13
|
+
};
|
|
14
|
+
exports.Skeleton = Skeleton;
|
|
15
|
+
exports["default"] = exports.Skeleton;
|
|
16
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.js","sourceRoot":"","sources":["../../skeleton/skeleton.tsx"],"names":[],"mappings":";;;;AAAA,wDAA0B;AAE1B,kEAAmD;AACnD,mDAAqE;AACrE,sCAAsC;AAE/B,IAAM,QAAQ,GAAG,UAAC,EAQT;IAPd,IAAA,SAAS,eAAA,EACT,aAAqB,EAArB,KAAK,mBAAG,aAAa,KAAA,EACrB,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EACf,aAAiB,EAAjB,KAAK,mBAAG,SAAS,KAAA,EACjB,aAAS,EAAT,KAAK,mBAAG,CAAC,KAAA,EACT,iBAAmB,EAAnB,SAAS,mBAAG,OAAO,KAAA,EAChB,IAAI,sBAPgB,6DAQxB,CADQ;IAEP,IAAM,iBAAiB,GAAG,2BAAU,CAAC,SAAS,CAAC,CAAC;IAEhD,OAAO,CACL,iCAAC,cAAM,CAAC,GAAG,qBACT,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,IAAA,+BAAO,EAChB,SAAS,EACT,uBAAM,CAAC,KAAK,CAAC,EACb,IAAI,CAAC,CAAC,CAAC,sBAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,EAC5B,IAAA,uBAAM,EAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CACrC,EACD,OAAO,EAAE,iBAAiB,CAAC,OAAO,EAClC,OAAO,EAAE,iBAAiB,CAAC,OAAO,EAClC,UAAU,wCACL,iBAAiB,CAAC,UAAU,KAC/B,KAAK,EAAE,KAAK,OAEV,IAAI,EACR,CACH,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,QAAQ,YA6BnB;AAEF,qBAAe,gBAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Colors } from '../types';
|
|
2
|
+
export interface SkeletonProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
size?: Size;
|
|
5
|
+
color?: Colors;
|
|
6
|
+
shape?: Shape;
|
|
7
|
+
delay?: number;
|
|
8
|
+
animation?: AnimationType;
|
|
9
|
+
}
|
|
10
|
+
export type Size = 'tiny' | 'small' | 'medium' | 'large' | 'huge';
|
|
11
|
+
export type Shape = 'rectangular' | 'rounded' | 'circle';
|
|
12
|
+
export type AnimationType = 'pulse' | 'wave' | 'shimmer' | 'bounce';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.props.js","sourceRoot":"","sources":["../../skeleton/skeleton.props.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { Shape, Size } from './skeleton.props';
|
|
2
|
+
export declare const SIZES: {
|
|
3
|
+
huge: string;
|
|
4
|
+
large: string;
|
|
5
|
+
medium: string;
|
|
6
|
+
small: string;
|
|
7
|
+
tiny: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const COLORS: {
|
|
10
|
+
primary: string;
|
|
11
|
+
danger: string;
|
|
12
|
+
warning: string;
|
|
13
|
+
secondary: string;
|
|
14
|
+
control: string;
|
|
15
|
+
tertiary: string;
|
|
16
|
+
success: string;
|
|
17
|
+
info: string;
|
|
18
|
+
inherit: string;
|
|
19
|
+
slate: string;
|
|
20
|
+
zinc: string;
|
|
21
|
+
neutral: string;
|
|
22
|
+
stone: string;
|
|
23
|
+
red: string;
|
|
24
|
+
orange: string;
|
|
25
|
+
amber: string;
|
|
26
|
+
yellow: string;
|
|
27
|
+
lime: string;
|
|
28
|
+
green: string;
|
|
29
|
+
emerald: string;
|
|
30
|
+
teal: string;
|
|
31
|
+
cyan: string;
|
|
32
|
+
sky: string;
|
|
33
|
+
blue: string;
|
|
34
|
+
indigo: string;
|
|
35
|
+
violet: string;
|
|
36
|
+
purple: string;
|
|
37
|
+
fuchsia: string;
|
|
38
|
+
pink: string;
|
|
39
|
+
rose: string;
|
|
40
|
+
};
|
|
41
|
+
export declare const SHAPES: ({ size, shape }: {
|
|
42
|
+
size: Size;
|
|
43
|
+
shape: Shape;
|
|
44
|
+
}) => string;
|
|
45
|
+
export declare const ANIMATIONS: {
|
|
46
|
+
pulse: {
|
|
47
|
+
initial: {
|
|
48
|
+
opacity: number;
|
|
49
|
+
};
|
|
50
|
+
animate: {
|
|
51
|
+
opacity: number[];
|
|
52
|
+
};
|
|
53
|
+
transition: {
|
|
54
|
+
repeat: number;
|
|
55
|
+
duration: number;
|
|
56
|
+
ease: readonly [0.4, 0, 0.6, 1];
|
|
57
|
+
times: number[];
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
wave: {
|
|
61
|
+
initial: {
|
|
62
|
+
opacity: number;
|
|
63
|
+
};
|
|
64
|
+
animate: {
|
|
65
|
+
opacity: number[];
|
|
66
|
+
x: number[];
|
|
67
|
+
scaleX: number[];
|
|
68
|
+
};
|
|
69
|
+
transition: {
|
|
70
|
+
repeat: number;
|
|
71
|
+
duration: number;
|
|
72
|
+
ease: readonly [0.25, 0.46, 0.45, 0.94];
|
|
73
|
+
times: number[];
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
shimmer: {
|
|
77
|
+
initial: {
|
|
78
|
+
opacity: number;
|
|
79
|
+
};
|
|
80
|
+
animate: {
|
|
81
|
+
opacity: number[];
|
|
82
|
+
scaleX: number[];
|
|
83
|
+
background: string[];
|
|
84
|
+
};
|
|
85
|
+
transition: {
|
|
86
|
+
repeat: number;
|
|
87
|
+
duration: number;
|
|
88
|
+
ease: readonly [0.16, 1, 0.3, 1];
|
|
89
|
+
times: number[];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
bounce: {
|
|
93
|
+
initial: {
|
|
94
|
+
opacity: number;
|
|
95
|
+
scale: number;
|
|
96
|
+
};
|
|
97
|
+
animate: {
|
|
98
|
+
opacity: number[];
|
|
99
|
+
scale: number[];
|
|
100
|
+
y: number[];
|
|
101
|
+
};
|
|
102
|
+
transition: {
|
|
103
|
+
repeat: number;
|
|
104
|
+
duration: number;
|
|
105
|
+
ease: readonly [0.68, -0.55, 0.265, 1.55];
|
|
106
|
+
times: number[];
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.ANIMATIONS = exports.SHAPES = exports.COLORS = exports.SIZES = void 0;
|
|
4
|
+
exports.SIZES = {
|
|
5
|
+
huge: 'h-14',
|
|
6
|
+
large: 'h-12',
|
|
7
|
+
medium: 'h-10',
|
|
8
|
+
small: 'h-8',
|
|
9
|
+
tiny: 'h-4'
|
|
10
|
+
};
|
|
11
|
+
exports.COLORS = {
|
|
12
|
+
primary: 'bg-primary-200 border-primary-200 text-primary-light',
|
|
13
|
+
danger: 'bg-danger-200 border-danger-200 text-danger-light',
|
|
14
|
+
warning: 'bg-warning-200 border-warning-200 text-warning-light',
|
|
15
|
+
secondary: 'bg-secondary-200 border-secondary-200 text-secondary-light',
|
|
16
|
+
control: 'bg-control-200 border-control-200 text-control-light',
|
|
17
|
+
tertiary: 'bg-tertiary-200 border-tertiary-200 text-tertiary-light',
|
|
18
|
+
success: 'bg-success-200 border-success-200 text-success-light',
|
|
19
|
+
info: 'bg-info-200 border-info-200 text-info-light',
|
|
20
|
+
inherit: 'bg-transparent border-transparent text-inherit',
|
|
21
|
+
slate: 'bg-slate-200 border-slate-200 text-slate-300',
|
|
22
|
+
zinc: 'bg-zinc-200 border-zinc-200 text-zinc-300',
|
|
23
|
+
neutral: 'bg-neutral-200 border-neutral-200 text-neutral-300',
|
|
24
|
+
stone: 'bg-stone-200 border-stone-200 text-stone-300',
|
|
25
|
+
red: 'bg-red-200 border-red-200 text-red-300',
|
|
26
|
+
orange: 'bg-orange-200 border-orange-200 text-orange-300',
|
|
27
|
+
amber: 'bg-amber-200 border-amber-200 text-amber-300',
|
|
28
|
+
yellow: 'bg-yellow-200 border-yellow-200 text-yellow-300',
|
|
29
|
+
lime: 'bg-lime-200 border-lime-200 text-lime-300',
|
|
30
|
+
green: 'bg-green-200 border-green-200 text-green-300',
|
|
31
|
+
emerald: 'bg-emerald-200 border-emerald-200 text-emerald-300',
|
|
32
|
+
teal: 'bg-teal-200 border-teal-200 text-teal-300',
|
|
33
|
+
cyan: 'bg-cyan-200 border-cyan-200 text-cyan-300',
|
|
34
|
+
sky: 'bg-sky-200 border-sky-200 text-sky-300',
|
|
35
|
+
blue: 'bg-blue-200 border-blue-200 text-blue-300',
|
|
36
|
+
indigo: 'bg-indigo-200 border-indigo-200 text-indigo-300',
|
|
37
|
+
violet: 'bg-violet-200 border-violet-200 text-violet-300',
|
|
38
|
+
purple: 'bg-purple-200 border-purple-200 text-purple-300',
|
|
39
|
+
fuchsia: 'bg-fuchsia-200 border-fuchsia-200 text-fuchsia-300',
|
|
40
|
+
pink: 'bg-pink-200 border-pink-200 text-pink-300',
|
|
41
|
+
rose: 'bg-rose-200 border-rose-200 text-rose-300'
|
|
42
|
+
};
|
|
43
|
+
var SHAPES = function (_a) {
|
|
44
|
+
var size = _a.size, shape = _a.shape;
|
|
45
|
+
var className = 'rounded';
|
|
46
|
+
if (shape === 'rounded' || shape === 'circle') {
|
|
47
|
+
className = 'rounded-full';
|
|
48
|
+
}
|
|
49
|
+
if (size === 'tiny') {
|
|
50
|
+
className = "max-w-4 min-w-4 p-0 ".concat(className);
|
|
51
|
+
}
|
|
52
|
+
else if (size === 'small') {
|
|
53
|
+
className = "max-w-8 min-w-8 md:max-w-10 md:min-w-10 p-0 ".concat(className);
|
|
54
|
+
}
|
|
55
|
+
else if (size === 'medium') {
|
|
56
|
+
className = "max-w-10 min-w-10 md:max-w-12 md:min-w-12 p-0 ".concat(className);
|
|
57
|
+
}
|
|
58
|
+
else if (size === 'large') {
|
|
59
|
+
className = "max-w-12 min-w-12 md:max-w-14 md:min-w-14 p-0 ".concat(className);
|
|
60
|
+
}
|
|
61
|
+
else if (size === 'huge') {
|
|
62
|
+
className = "max-w-14 min-w-14 md:max-w-16 md:min-w-16 p-0 ".concat(className);
|
|
63
|
+
}
|
|
64
|
+
return className;
|
|
65
|
+
};
|
|
66
|
+
exports.SHAPES = SHAPES;
|
|
67
|
+
exports.ANIMATIONS = {
|
|
68
|
+
pulse: {
|
|
69
|
+
initial: { opacity: 0.6 },
|
|
70
|
+
animate: { opacity: [0.6, 1, 0.6] },
|
|
71
|
+
transition: {
|
|
72
|
+
repeat: Infinity,
|
|
73
|
+
duration: 2,
|
|
74
|
+
ease: [0.4, 0.0, 0.6, 1],
|
|
75
|
+
times: [0, 0.5, 1]
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
wave: {
|
|
79
|
+
initial: { opacity: 0.6 },
|
|
80
|
+
animate: {
|
|
81
|
+
opacity: [0.6, 1, 0.7, 1, 0.6],
|
|
82
|
+
x: [0, 3, -2, 2, 0],
|
|
83
|
+
scaleX: [1, 1.02, 0.98, 1.01, 1]
|
|
84
|
+
},
|
|
85
|
+
transition: {
|
|
86
|
+
repeat: Infinity,
|
|
87
|
+
duration: 3,
|
|
88
|
+
ease: [0.25, 0.46, 0.45, 0.94],
|
|
89
|
+
times: [0, 0.2, 0.5, 0.8, 1]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
shimmer: {
|
|
93
|
+
initial: { opacity: 0.5 },
|
|
94
|
+
animate: {
|
|
95
|
+
opacity: [0.5, 0.8, 1, 0.8, 0.5],
|
|
96
|
+
scaleX: [1, 1.01, 1.02, 1.01, 1],
|
|
97
|
+
background: [
|
|
98
|
+
'linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%)',
|
|
99
|
+
'linear-gradient(90deg, transparent 20%, rgba(255,255,255,0.4) 60%, transparent 100%)',
|
|
100
|
+
'linear-gradient(90deg, transparent 40%, rgba(255,255,255,0.6) 70%, transparent 100%)',
|
|
101
|
+
'linear-gradient(90deg, transparent 20%, rgba(255,255,255,0.4) 60%, transparent 100%)',
|
|
102
|
+
'linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%)',
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
transition: {
|
|
106
|
+
repeat: Infinity,
|
|
107
|
+
duration: 2.5,
|
|
108
|
+
ease: [0.16, 1, 0.3, 1],
|
|
109
|
+
times: [0, 0.25, 0.5, 0.75, 1]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
bounce: {
|
|
113
|
+
initial: { opacity: 0.7, scale: 1 },
|
|
114
|
+
animate: {
|
|
115
|
+
opacity: [0.7, 0.9, 1, 0.9, 0.7],
|
|
116
|
+
scale: [1, 1.005, 1.01, 1.005, 1],
|
|
117
|
+
y: [0, -1, -2, -1, 0]
|
|
118
|
+
},
|
|
119
|
+
transition: {
|
|
120
|
+
repeat: Infinity,
|
|
121
|
+
duration: 2,
|
|
122
|
+
ease: [0.68, -0.55, 0.265, 1.55],
|
|
123
|
+
times: [0, 0.2, 0.5, 0.8, 1]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=skeleton.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.style.js","sourceRoot":"","sources":["../../skeleton/skeleton.style.ts"],"names":[],"mappings":";;;AAEa,QAAA,KAAK,GAAG;IACnB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,KAAK;IACZ,IAAI,EAAE,KAAK;CACZ,CAAC;AAEW,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE,sDAAsD;IAC/D,MAAM,EAAE,mDAAmD;IAC3D,OAAO,EAAE,sDAAsD;IAC/D,SAAS,EAAE,4DAA4D;IACvE,OAAO,EAAE,sDAAsD;IAC/D,QAAQ,EAAE,yDAAyD;IACnE,OAAO,EAAE,sDAAsD;IAC/D,IAAI,EAAE,6CAA6C;IACnD,OAAO,EAAE,gDAAgD;IACzD,KAAK,EAAE,8CAA8C;IACrD,IAAI,EAAE,2CAA2C;IACjD,OAAO,EAAE,oDAAoD;IAC7D,KAAK,EAAE,8CAA8C;IACrD,GAAG,EAAE,wCAAwC;IAC7C,MAAM,EAAE,i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,UAAU,EAAE;YACV,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAU;YAChC,KAAK,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;SAC/B;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE;QACnC,OAAO,EAAE;YACP,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC;YAChC,KAAK,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;YACjC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;SACtB;QACD,UAAU,EAAE;YACV,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,CAAC;YACX,IAAI,EAAE,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAU;YACzC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;SAC7B;KACF;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../switch-box/index.ts"],"names":[],"mappings":";;;AAAA,oEAAqC;AAErC,qBAAe,uBAAS,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.SwitchBox = void 0;
|
|
5
|
+
var tslib_1 = require("tslib");
|
|
6
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
+
var switch_box_style_1 = require("./switch-box.style");
|
|
8
|
+
var tailwind_merge_config_1 = require("../tailwind-merge-config");
|
|
9
|
+
var SwitchBox = function (_a) {
|
|
10
|
+
var _b = _a.color, color = _b === void 0 ? 'primary' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, _d = _a.variant, variant = _d === void 0 ? 'default' : _d, value = _a.value, onChange = _a.onChange, disabled = _a.disabled;
|
|
11
|
+
return (react_1["default"].createElement("label", { className: (0, tailwind_merge_config_1.twMerge)('relative flex items-center justify-center', disabled ? 'cursor-not-allowed !bg-control-200' : 'cursor-pointer', (0, switch_box_style_1.LABEL_VARIANT_SIZES)({ checked: value, color: color, size: size, variant: variant }), switch_box_style_1.LABEL_VARIANT_ROUNDING[variant]) },
|
|
12
|
+
react_1["default"].createElement("div", { className: (0, tailwind_merge_config_1.twMerge)('flex', switch_box_style_1.LABEL_SIZES[size]) },
|
|
13
|
+
react_1["default"].createElement("div", { className: (0, tailwind_merge_config_1.twMerge)("flex before:rounded-full transition duration-500 before:flex before:self-center before:bg-white before:transition before:duration-500 before:content-['']", switch_box_style_1.SIZES[size], value ? "".concat(switch_box_style_1.COLORS[color], " translate-x-1/2") : "before:-translate-x-1/2 before:shadow-lg") }),
|
|
14
|
+
react_1["default"].createElement("input", { disabled: disabled, checked: value, onChange: onChange, className: 'w-0 h-0 border-0! opacity-0 focus:shadow-md', type: "checkbox" }))));
|
|
15
|
+
};
|
|
16
|
+
exports.SwitchBox = SwitchBox;
|
|
17
|
+
exports["default"] = exports.SwitchBox;
|
|
18
|
+
//# sourceMappingURL=switch-box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-box.js","sourceRoot":"","sources":["../../switch-box/switch-box.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,wDAA0B;AAC1B,uDAA6G;AAC7G,kEAAmD;AAG5C,IAAM,SAAS,GAAG,UAAC,EAAsG;QAApG,aAAiB,EAAjB,KAAK,mBAAG,SAAS,KAAA,EAAE,YAAe,EAAf,IAAI,mBAAG,QAAQ,KAAA,EAAE,eAAmB,EAAnB,OAAO,mBAAG,SAAS,KAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,QAAQ,cAAA;IAC5G,OAAO,CACL,4CAAO,SAAS,EAAE,IAAA,+BAAO,EACvB,2CAA2C,EAC3C,QAAQ,CAAC,CAAC,CAAC,oCAAoC,CAAC,CAAC,CAAC,gBAAgB,EAClE,IAAA,sCAAmB,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,EACnF,yCAAsB,CAAC,OAAO,CAAC,CAChC;QACC,0CAAK,SAAS,EAAE,IAAA,+BAAO,EAAC,MAAM,EAAE,8BAAW,CAAC,IAAI,CAAC,CAAC;YAChD,0CACE,SAAS,EAAE,IAAA,+BAAO,EAChB,2JAA2J,EAC3J,wBAAK,CAAC,IAAI,CAAC,EACX,KAAK,CAAC,CAAC,CAAC,UAAG,yBAAM,CAAC,KAAK,CAAC,qBAAkB,CAAC,CAAC,CAAC,0CAA0C,CACxF,GAAG;YACN,4CAAO,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,6CAA6C,EAAE,IAAI,EAAC,UAAU,GAAE,CACtI,CACA,CACT,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,SAAS,aAmBpB;AAEF,qBAAe,iBAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Colors } from '../types';
|
|
2
|
+
export interface SwitchBoxProps {
|
|
3
|
+
color?: Colors;
|
|
4
|
+
size?: Sizes;
|
|
5
|
+
variant?: Variants;
|
|
6
|
+
value: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onChange?: () => void;
|
|
9
|
+
}
|
|
10
|
+
export type Sizes = 'tiny' | 'small' | 'medium' | 'large' | 'huge';
|
|
11
|
+
export type Variants = 'default' | 'rounded' | 'linear';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-box.props.js","sourceRoot":"","sources":["../../switch-box/switch-box.props.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Sizes, Variants } from './switch-box.props';
|
|
2
|
+
import { Colors } from '../types';
|
|
3
|
+
export declare const LABEL_VARIANT_SIZES: ({ checked, color, variant, size }: {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
color: Colors;
|
|
6
|
+
variant: Variants;
|
|
7
|
+
size: Sizes;
|
|
8
|
+
}) => string;
|
|
9
|
+
export declare const CONTAINER_SIZES: {
|
|
10
|
+
huge: string;
|
|
11
|
+
large: string;
|
|
12
|
+
medium: string;
|
|
13
|
+
small: string;
|
|
14
|
+
tiny: string;
|
|
15
|
+
};
|
|
16
|
+
export declare const LINEAR_CONTAINER_SIZES: {
|
|
17
|
+
huge: string;
|
|
18
|
+
large: string;
|
|
19
|
+
medium: string;
|
|
20
|
+
small: string;
|
|
21
|
+
tiny: string;
|
|
22
|
+
};
|
|
23
|
+
export declare const CHECKED: (checked: boolean, color: Colors) => string;
|
|
24
|
+
export declare const COLORS: {
|
|
25
|
+
primary: string;
|
|
26
|
+
danger: string;
|
|
27
|
+
warning: string;
|
|
28
|
+
secondary: string;
|
|
29
|
+
control: string;
|
|
30
|
+
tertiary: string;
|
|
31
|
+
success: string;
|
|
32
|
+
info: string;
|
|
33
|
+
inherit: string;
|
|
34
|
+
slate: string;
|
|
35
|
+
zinc: string;
|
|
36
|
+
neutral: string;
|
|
37
|
+
stone: string;
|
|
38
|
+
red: string;
|
|
39
|
+
orange: string;
|
|
40
|
+
amber: string;
|
|
41
|
+
yellow: string;
|
|
42
|
+
lime: string;
|
|
43
|
+
green: string;
|
|
44
|
+
emerald: string;
|
|
45
|
+
teal: string;
|
|
46
|
+
cyan: string;
|
|
47
|
+
sky: string;
|
|
48
|
+
blue: string;
|
|
49
|
+
indigo: string;
|
|
50
|
+
violet: string;
|
|
51
|
+
purple: string;
|
|
52
|
+
fuchsia: string;
|
|
53
|
+
pink: string;
|
|
54
|
+
rose: string;
|
|
55
|
+
};
|
|
56
|
+
export declare const SIZES: {
|
|
57
|
+
huge: string;
|
|
58
|
+
large: string;
|
|
59
|
+
medium: string;
|
|
60
|
+
small: string;
|
|
61
|
+
tiny: string;
|
|
62
|
+
};
|
|
63
|
+
export declare const LABEL_SIZES: {
|
|
64
|
+
huge: string;
|
|
65
|
+
large: string;
|
|
66
|
+
medium: string;
|
|
67
|
+
small: string;
|
|
68
|
+
tiny: string;
|
|
69
|
+
};
|
|
70
|
+
export declare const LABEL_VARIANT_ROUNDING: {
|
|
71
|
+
default: string;
|
|
72
|
+
linear: string;
|
|
73
|
+
rounded: string;
|
|
74
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.LABEL_VARIANT_ROUNDING = exports.LABEL_SIZES = exports.SIZES = exports.COLORS = exports.CHECKED = exports.LINEAR_CONTAINER_SIZES = exports.CONTAINER_SIZES = exports.LABEL_VARIANT_SIZES = void 0;
|
|
4
|
+
var LABEL_VARIANT_SIZES = function (_a) {
|
|
5
|
+
var checked = _a.checked, color = _a.color, variant = _a.variant, size = _a.size;
|
|
6
|
+
var className = exports.CONTAINER_SIZES[size];
|
|
7
|
+
if (variant === 'linear') {
|
|
8
|
+
className = exports.LINEAR_CONTAINER_SIZES[size];
|
|
9
|
+
}
|
|
10
|
+
if (checked) {
|
|
11
|
+
className = "".concat(className, " ").concat(exports.COLORS[color]);
|
|
12
|
+
}
|
|
13
|
+
else {
|
|
14
|
+
className = "".concat(className, " bg-control hover:bg-control-dark");
|
|
15
|
+
}
|
|
16
|
+
return className;
|
|
17
|
+
};
|
|
18
|
+
exports.LABEL_VARIANT_SIZES = LABEL_VARIANT_SIZES;
|
|
19
|
+
exports.CONTAINER_SIZES = {
|
|
20
|
+
huge: 'w-20 h-[40px]',
|
|
21
|
+
large: 'w-16 h-[34px]',
|
|
22
|
+
medium: 'w-14 h-[28px]',
|
|
23
|
+
small: 'w-12 h-[22px]',
|
|
24
|
+
tiny: 'w-10 h-[18px]'
|
|
25
|
+
};
|
|
26
|
+
exports.LINEAR_CONTAINER_SIZES = {
|
|
27
|
+
huge: 'w-9 h-3',
|
|
28
|
+
large: 'w-8 h-3',
|
|
29
|
+
medium: 'w-7 h-3',
|
|
30
|
+
small: 'w-6 h-3',
|
|
31
|
+
tiny: 'w-5 h-3'
|
|
32
|
+
};
|
|
33
|
+
var CHECKED = function (checked, color) {
|
|
34
|
+
if (checked) {
|
|
35
|
+
return "".concat(exports.COLORS[color], " translate-x-1/2");
|
|
36
|
+
}
|
|
37
|
+
return "";
|
|
38
|
+
};
|
|
39
|
+
exports.CHECKED = CHECKED;
|
|
40
|
+
exports.COLORS = {
|
|
41
|
+
primary: 'bg-primary hover:bg-primary-dark',
|
|
42
|
+
danger: 'bg-danger hover:bg-danger-dark',
|
|
43
|
+
warning: 'bg-warning hover:bg-warning-dark',
|
|
44
|
+
secondary: 'bg-secondary hover:bg-secondary-dark',
|
|
45
|
+
control: 'bg-control-700 hover:bg-control-900',
|
|
46
|
+
tertiary: 'bg-tertiary hover:bg-tertiary-dark',
|
|
47
|
+
success: 'bg-success hover:bg-success-dark',
|
|
48
|
+
info: 'bg-info hover:bg-info-dark',
|
|
49
|
+
inherit: 'bg-inherit hover:bg-inherit-dark',
|
|
50
|
+
slate: 'bg-slate-500 hover:bg-slate-700',
|
|
51
|
+
zinc: 'bg-zinc-500 hover:bg-zinc-700',
|
|
52
|
+
neutral: 'bg-neutral-500 hover:bg-neutral-700',
|
|
53
|
+
stone: 'bg-stone-500 hover:bg-stone-700',
|
|
54
|
+
red: 'bg-red-500 hover:bg-red-700',
|
|
55
|
+
orange: 'bg-orange-500 hover:bg-orange-700',
|
|
56
|
+
amber: 'bg-amber-500 hover:bg-amber-700',
|
|
57
|
+
yellow: 'bg-yellow-500 hover:bg-yellow-700',
|
|
58
|
+
lime: 'bg-lime-500 hover:bg-lime-700',
|
|
59
|
+
green: 'bg-green-500 hover:bg-green-700',
|
|
60
|
+
emerald: 'bg-emerald-500 hover:bg-emerald-700',
|
|
61
|
+
teal: 'bg-teal-500 hover:bg-teal-700',
|
|
62
|
+
cyan: 'bg-cyan-500 hover:bg-cyan-700',
|
|
63
|
+
sky: 'bg-sky-500 hover:bg-sky-700',
|
|
64
|
+
blue: 'bg-blue-500 hover:bg-blue-700',
|
|
65
|
+
indigo: 'bg-indigo-500 hover:bg-indigo-700',
|
|
66
|
+
violet: 'bg-violet-500 hover:bg-violet-700',
|
|
67
|
+
purple: 'bg-purple-500 hover:bg-purple-700',
|
|
68
|
+
fuchsia: 'bg-fuchsia-500 hover:bg-fuchsia-700',
|
|
69
|
+
pink: 'bg-pink-500 hover:bg-pink-700',
|
|
70
|
+
rose: 'bg-rose-500 hover:bg-rose-700'
|
|
71
|
+
};
|
|
72
|
+
exports.SIZES = {
|
|
73
|
+
huge: 'before:h-7 before:w-7 rounded-[40px] shadow-2xl',
|
|
74
|
+
large: 'before:h-6 before:w-6 rounded-[34px] shadow-2xl',
|
|
75
|
+
medium: 'before:h-5 before:w-5 rounded-[28px]',
|
|
76
|
+
small: 'before:h-4 before:w-4 rounded-[22px]',
|
|
77
|
+
tiny: 'before:h-3 before:w-3 rounded-[18px]'
|
|
78
|
+
};
|
|
79
|
+
exports.LABEL_SIZES = {
|
|
80
|
+
huge: 'w-7 h-7',
|
|
81
|
+
large: 'w-6 h-6',
|
|
82
|
+
medium: 'w-5 h-5',
|
|
83
|
+
small: 'w-4 h-4',
|
|
84
|
+
tiny: 'w-3 h-3'
|
|
85
|
+
};
|
|
86
|
+
exports.LABEL_VARIANT_ROUNDING = {
|
|
87
|
+
"default": 'rounded-lg',
|
|
88
|
+
linear: 'rounded-full',
|
|
89
|
+
rounded: 'rounded-full'
|
|
90
|
+
};
|
|
91
|
+
//# sourceMappingURL=switch-box.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-box.style.js","sourceRoot":"","sources":["../../switch-box/switch-box.style.ts"],"names":[],"mappings":";;;AAGO,IAAM,mBAAmB,GAAG,UAAC,EAAsG;QAApG,OAAO,aAAA,EAAE,KAAK,WAAA,EAAE,OAAO,aAAA,EAAE,IAAI,UAAA;IACjE,IAAI,SAAS,GAAG,uBAAe,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,OAAO,KAAK,QAAQ,EAAE;QACxB,SAAS,GAAG,8BAAsB,CAAC,IAAI,CAAC,CAAC;KAC1C;IACD,IAAI,OAAO,EAAE;QACX,SAAS,GAAG,UAAG,SAAS,cAAI,cAAM,CAAC,KAAK,CAAC,CAAE,CAAC;KAC7C;SAAM;QACL,SAAS,GAAG,UAAG,SAAS,sCAAmC,CAAC;KAC7D;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAZW,QAAA,mBAAmB,uBAY9B;AAEW,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,eAAe;IACrB,KAAK,EAAE,eAAe;IACtB,MAAM,EAAE,eAAe;IACvB,KAAK,EAAE,eAAe;IACtB,IAAI,EAAE,eAAe;CACtB,CAAC;AAEW,QAAA,sBAAsB,GAAG;IACpC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,SAAS;IAChB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEK,IAAM,OAAO,GAAG,UAAC,OAAgB,EAAE,KAAa;IACrD,IAAI,OAAO,EAAE;QACX,OAAO,UAAG,cAAM,CAAC,KAAK,CAAC,qBAAkB,CAAC;KAC3C;IACD,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AALW,QAAA,OAAO,WAKlB;AAEW,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE,kCAAkC;IAC3C,MAA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tooltip/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tooltip/index.ts"],"names":[],"mappings":";;;AAAA,8DAAgC;AAEhC,qBAAe,oBAAO,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.Tooltip = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
+
var div_1 = tslib_1.__importDefault(require("../div"));
|
|
7
|
+
var text_1 = tslib_1.__importDefault(require("../text"));
|
|
8
|
+
var tooltip_style_1 = require("./tooltip.style");
|
|
9
|
+
var tailwind_merge_config_1 = require("../tailwind-merge-config");
|
|
10
|
+
var Tooltip = function (_a) {
|
|
11
|
+
var children = _a.children, content = _a.content, position = _a.position, color = _a.color, className = _a.className, wrapperClassName = _a.wrapperClassName, _b = _a.typography, typography = _b === void 0 ? 'base' : _b;
|
|
12
|
+
return (react_1["default"].createElement(div_1["default"], null,
|
|
13
|
+
react_1["default"].createElement(div_1["default"], { className: (0, tailwind_merge_config_1.twMerge)('group relative flex justify-center items-center', wrapperClassName) },
|
|
14
|
+
children,
|
|
15
|
+
react_1["default"].createElement(ArrowIcon, { typography: typography, color: color, position: position, content: content, className: className }))));
|
|
16
|
+
};
|
|
17
|
+
exports.Tooltip = Tooltip;
|
|
18
|
+
var ArrowIcon = function (_a) {
|
|
19
|
+
var _b = _a.position, position = _b === void 0 ? 'right' : _b, _c = _a.color, color = _c === void 0 ? 'black' : _c, content = _a.content, className = _a.className, typography = _a.typography;
|
|
20
|
+
return (react_1["default"].createElement(div_1["default"], { className: (0, tailwind_merge_config_1.twMerge)('w-max !px-2 py-1 hidden group-hover:flex before:border-x-8 before:!border-x-transparent before:border-b-8 before:absolute items-center justify-center absolute z-10 rounded-lg shadow-lg', className, tooltip_style_1.POSITIONS[position], tooltip_style_1.COLORS[color]) },
|
|
21
|
+
react_1["default"].createElement(text_1["default"], { typography: typography, color: 'inherit' }, content)));
|
|
22
|
+
};
|
|
23
|
+
exports["default"] = exports.Tooltip;
|
|
24
|
+
//# sourceMappingURL=tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../tooltip/tooltip.tsx"],"names":[],"mappings":";;;;AAAA,wDAA0B;AAE1B,uDAAyB;AACzB,yDAA2B;AAC3B,iDAAoD;AACpD,kEAAmD;AAE5C,IAAM,OAAO,GAAG,UAAC,EAAsG;QAApG,QAAQ,cAAA,EAAE,OAAO,aAAA,EAAE,QAAQ,cAAA,EAAE,KAAK,WAAA,EAAE,SAAS,eAAA,EAAE,gBAAgB,sBAAA,EAAE,kBAAmB,EAAnB,UAAU,mBAAG,MAAM,KAAA;IAC5G,OAAO,CACL,iCAAC,gBAAG;QACF,iCAAC,gBAAG,IAAC,SAAS,EAAE,IAAA,+BAAO,EAAC,iDAAiD,EAAE,gBAAgB,CAAC;YACzF,QAAQ;YACT,iCAAC,SAAS,IAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,GAAG,CAC1G,CACF,CACP,CAAC;AACJ,CAAC,CAAC;AATW,QAAA,OAAO,WASlB;AAEF,IAAM,SAAS,GAAG,UAAC,EAAuG;QAArG,gBAAkB,EAAlB,QAAQ,mBAAG,OAAO,KAAA,EAAE,aAAe,EAAf,KAAK,mBAAG,OAAO,KAAA,EAAE,OAAO,aAAA,EAAE,SAAS,eAAA,EAAE,UAAU,gBAAA;IACtF,OAAO,CACL,iCAAC,gBAAG,IAAC,SAAS,EAAE,IAAA,+BAAO,EACrB,0LAA0L,EAC1L,SAAS,EACT,yBAAS,CAAC,QAAQ,CAAC,EACnB,sBAAM,CAAC,KAAK,CAAC,CACd;QACC,iCAAC,iBAAI,IAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,IAAG,OAAO,CAAQ,CAC5D,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,qBAAe,eAAO,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export declare const COLORS: {
|
|
2
|
+
primary: string;
|
|
3
|
+
secondary: string;
|
|
4
|
+
tertiary: string;
|
|
5
|
+
info: string;
|
|
6
|
+
success: string;
|
|
7
|
+
danger: string;
|
|
8
|
+
warning: string;
|
|
9
|
+
control: string;
|
|
10
|
+
white: string;
|
|
11
|
+
black: string;
|
|
12
|
+
inherit: string;
|
|
13
|
+
slate: string;
|
|
14
|
+
zinc: string;
|
|
15
|
+
neutral: string;
|
|
16
|
+
stone: string;
|
|
17
|
+
red: string;
|
|
18
|
+
orange: string;
|
|
19
|
+
amber: string;
|
|
20
|
+
yellow: string;
|
|
21
|
+
lime: string;
|
|
22
|
+
green: string;
|
|
23
|
+
emerald: string;
|
|
24
|
+
teal: string;
|
|
25
|
+
cyan: string;
|
|
26
|
+
sky: string;
|
|
27
|
+
blue: string;
|
|
28
|
+
indigo: string;
|
|
29
|
+
violet: string;
|
|
30
|
+
purple: string;
|
|
31
|
+
fuchsia: string;
|
|
32
|
+
pink: string;
|
|
33
|
+
rose: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const POSITIONS: {
|
|
36
|
+
top: string;
|
|
37
|
+
bottom: string;
|
|
38
|
+
left: string;
|
|
39
|
+
right: string;
|
|
40
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.POSITIONS = exports.COLORS = void 0;
|
|
4
|
+
exports.COLORS = {
|
|
5
|
+
primary: '!bg-primary before:border-primary text-primary-100',
|
|
6
|
+
secondary: '!bg-secondary before:border-secondary text-secondary-100',
|
|
7
|
+
tertiary: '!bg-tertiary before:border-tertiary text-tertiary-100',
|
|
8
|
+
info: '!bg-info before:border-info text-info-100',
|
|
9
|
+
success: '!bg-success before:border-success text-success-100',
|
|
10
|
+
danger: '!bg-danger before:border-danger text-danger-100',
|
|
11
|
+
warning: '!bg-warning before:border-warning text-warning-100',
|
|
12
|
+
control: '!bg-control before:border-control text-control-100',
|
|
13
|
+
white: '!bg-white before:border-white text-black',
|
|
14
|
+
black: '!bg-black before:border-black text-white',
|
|
15
|
+
inherit: '!bg-black before:border-black text-white',
|
|
16
|
+
slate: '!bg-slate-500 before:border-slate-500 text-slate-100',
|
|
17
|
+
zinc: '!bg-zinc-500 before:border-zinc-500 text-zinc-100',
|
|
18
|
+
neutral: '!bg-neutral-500 before:border-neutral-500 text-neutral-100',
|
|
19
|
+
stone: '!bg-stone-500 before:border-stone-500 text-stone-100',
|
|
20
|
+
red: '!bg-red-500 before:border-red-500 text-red-100',
|
|
21
|
+
orange: '!bg-orange-500 before:border-orange-500 text-orange-100',
|
|
22
|
+
amber: '!bg-amber-500 before:border-amber-500 text-amber-100',
|
|
23
|
+
yellow: '!bg-yellow-500 before:border-yellow-500 text-yellow-100',
|
|
24
|
+
lime: '!bg-lime-500 before:border-lime-500 text-lime-100',
|
|
25
|
+
green: '!bg-green-500 before:border-green-500 text-green-100',
|
|
26
|
+
emerald: '!bg-emerald-500 before:border-emerald-500 text-emerald-100',
|
|
27
|
+
teal: '!bg-teal-500 before:border-teal-500 text-teal-100',
|
|
28
|
+
cyan: '!bg-cyan-500 before:border-cyan-500 text-cyan-100',
|
|
29
|
+
sky: '!bg-sky-500 before:border-sky-500 text-sky-100',
|
|
30
|
+
blue: '!bg-blue-500 before:border-blue-500 text-blue-100',
|
|
31
|
+
indigo: '!bg-indigo-500 before:border-indigo-500 text-indigo-100',
|
|
32
|
+
violet: '!bg-violet-500 before:border-violet-500 text-violet-100',
|
|
33
|
+
purple: '!bg-purple-500 before:border-purple-500 text-purple-100',
|
|
34
|
+
fuchsia: '!bg-fuchsia-500 before:border-fuchsia-500 text-fuchsia-100',
|
|
35
|
+
pink: '!bg-pink-500 before:border-pink-500 text-pink-100',
|
|
36
|
+
rose: '!bg-rose-500 before:border-rose-500 text-rose-100'
|
|
37
|
+
};
|
|
38
|
+
exports.POSITIONS = {
|
|
39
|
+
top: 'mb-2 before:-bottom-2 bottom-[100%] before:!rotate-180',
|
|
40
|
+
bottom: 'mt-2 before:-top-2 top-[100%]',
|
|
41
|
+
left: 'mr-2 before:-right-2.5 right-[100%] before:!rotate-90',
|
|
42
|
+
right: 'ml-2 before:-left-2.5 left-[100%] before:!-rotate-90'
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=tooltip.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.style.js","sourceRoot":"","sources":["../../tooltip/tooltip.style.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IACpB,OAAO,EAAE,oDAAoD;IAC7D,SAAS,EAAE,0DAA0D;IACrE,QAAQ,EAAE,uDAAuD;IACjE,IAAI,EAAE,2CAA2C;IACjD,OAAO,EAAE,oDAAoD;IAC7D,MAAM,EAAE,iDAAiD;IACzD,OAAO,EAAE,oDAAoD;IAC7D,OAAO,EAAE,oDAAoD;IAC7D,KAAK,EAAE,0CAA0C;IACjD,KAAK,EAAE,0CAA0C;IACjD,OAAO,EAAE,0CAA0C;IACnD,KAAK,EAAE,sDAAsD;IAC7D,IAAI,EAAE,mDAAmD;IACzD,OAAO,EAAE,4DAA4D;IACrE,KAAK,EAAE,sDAAsD;IAC7D,GAAG,EAAE,gDAAgD;IACrD,MAAM,EAAE,yDAAyD;IACjE,KAAK,EAAE,sDAAsD;IAC7D,MAAM,EAAE,yDAAyD;IACjE,IAAI,EAAE,mDAAmD;IACzD,KAAK,EAAE,sDAAsD;IAC7D,OAAO,EAAE,4DAA4D;IACrE,IAAI,EAAE,mDAAmD;IACzD,IAAI,EAAE,mDAAmD;IACzD,GAAG,EAAE,gDAAgD;IACrD,IAAI,EAAE,mDAAmD;IACzD,MAAM,EAAE,yDAAyD;IACjE,MAAM,EAAE,yDAAyD;IACjE,MAAM,EAAE,yDAAyD;IACjE,OAAO,EAAE,4DAA4D;IACrE,IAAI,EAAE,mDAAmD;IACzD,IAAI,EAAE,mDAAmD;CAC1D,CAAC;AAEW,QAAA,SAAS,GAAG;IACvB,GAAG,EAAE,wDAAwD;IAC7D,MAAM,EAAE,+BAA+B;IACvC,IAAI,EAAE,uDAAuD;IAC7D,KAAK,EAAE,sDAAsD;CAC9D,CAAC"}
|