@mbao01/common 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/Dock/Dock.d.ts +8 -0
- package/dist/types/components/Dock/constants.d.ts +12 -0
- package/dist/types/components/Dock/index.d.ts +1 -0
- package/dist/types/components/Dock/types.d.ts +12 -0
- package/dist/types/components/Form/DatetimeInput/constants.d.ts +0 -7
- package/dist/types/components/Form/DatetimeInput/types.d.ts +2 -2
- package/dist/types/components/Form/Input/Input.d.ts +5 -2
- package/dist/types/components/Form/Input/constants.d.ts +11 -0
- package/dist/types/components/Form/Input/types.d.ts +9 -2
- package/dist/types/components/Form/MultiSelect/constants.d.ts +1 -7
- package/dist/types/components/Form/MultiSelect/types.d.ts +3 -2
- package/dist/types/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/types/components/Form/Radio/types.d.ts +1 -1
- package/dist/types/components/Form/Range/Range.d.ts +1 -1
- package/dist/types/components/Form/Range/types.d.ts +1 -1
- package/dist/types/components/Form/Select/Select.d.ts +5 -2
- package/dist/types/components/Form/Select/constants.d.ts +6 -2
- package/dist/types/components/Form/Select/types.d.ts +10 -2
- package/dist/types/components/Form/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Form/Switch/types.d.ts +1 -1
- package/dist/types/components/Form/TagsInput/TagsInput.d.ts +2 -0
- package/dist/types/components/Form/TagsInput/constants.d.ts +0 -4
- package/dist/types/components/Form/TagsInput/types.d.ts +2 -1
- package/dist/types/components/Form/TextField/TextField.d.ts +5 -1
- package/dist/types/components/Form/TextField/types.d.ts +1 -0
- package/dist/types/components/Form/Textarea/Textarea.d.ts +2 -0
- package/dist/types/components/Form/Textarea/constants.d.ts +1 -0
- package/dist/types/components/Form/Textarea/types.d.ts +7 -1
- package/dist/types/components/Form/Validator/Validator.d.ts +6 -0
- package/dist/types/components/Form/Validator/constants.d.ts +4 -0
- package/dist/types/components/Form/Validator/index.d.ts +1 -0
- package/dist/types/components/Form/Validator/types.d.ts +14 -0
- package/dist/types/components/Form/components/Fieldset/types.d.ts +1 -1
- package/dist/types/components/Form/index.d.ts +1 -0
- package/dist/types/components/Indicator/Indicator.d.ts +6 -0
- package/dist/types/components/Indicator/constants.d.ts +15 -0
- package/dist/types/components/Indicator/index.d.ts +1 -0
- package/dist/types/components/Indicator/types.d.ts +14 -0
- package/dist/types/components/Join/Join.d.ts +6 -0
- package/dist/types/components/Join/constants.d.ts +2 -0
- package/dist/types/components/Join/index.d.ts +1 -0
- package/dist/types/components/Join/types.d.ts +13 -0
- package/dist/types/components/Kbd/Kbd.d.ts +2 -0
- package/dist/types/components/Kbd/constants.d.ts +5 -0
- package/dist/types/components/Kbd/index.d.ts +1 -0
- package/dist/types/components/Kbd/types.d.ts +3 -0
- package/dist/types/components/List/List.d.ts +7 -0
- package/dist/types/components/List/constants.d.ts +5 -0
- package/dist/types/components/List/index.d.ts +1 -0
- package/dist/types/components/List/types.d.ts +6 -0
- package/dist/types/components/Resizable/Resizable.d.ts +24 -0
- package/dist/types/components/Resizable/constants.d.ts +6 -0
- package/dist/types/components/Resizable/index.d.ts +1 -0
- package/dist/types/components/Resizable/types.d.ts +7 -0
- package/dist/types/components/Sidebar/Sidebar.d.ts +5 -2
- package/dist/types/components/Stack/Stack.d.ts +2 -0
- package/dist/types/components/Stack/constants.d.ts +3 -0
- package/dist/types/components/Stack/index.d.ts +1 -0
- package/dist/types/components/Stack/types.d.ts +3 -0
- package/dist/types/components/Stat/Stat.d.ts +11 -0
- package/dist/types/components/Stat/constants.d.ts +11 -0
- package/dist/types/components/Stat/index.d.ts +1 -0
- package/dist/types/components/Stat/types.d.ts +10 -0
- package/dist/types/components/Status/Status.d.ts +2 -0
- package/dist/types/components/Status/constants.d.ts +5 -0
- package/dist/types/components/Status/index.d.ts +1 -0
- package/dist/types/components/Status/types.d.ts +3 -0
- package/dist/types/components/Text/types.d.ts +1 -1
- package/dist/types/index.d.ts +9 -0
- package/package.json +44 -42
- package/src/components/Dock/Dock.tsx +41 -0
- package/src/components/Dock/constants.ts +62 -0
- package/src/components/Dock/index.ts +1 -0
- package/src/components/Dock/types.ts +23 -0
- package/src/components/Form/Checkbox/constants.ts +9 -8
- package/src/components/Form/DatetimeInput/DatetimeInput.tsx +2 -2
- package/src/components/Form/DatetimeInput/constants.ts +0 -53
- package/src/components/Form/DatetimeInput/types.ts +2 -2
- package/src/components/Form/Input/Input.tsx +71 -10
- package/src/components/Form/Input/constants.ts +78 -5
- package/src/components/Form/Input/types.ts +12 -4
- package/src/components/Form/MultiSelect/MultiSelect.tsx +3 -1
- package/src/components/Form/MultiSelect/constants.ts +8 -49
- package/src/components/Form/MultiSelect/types.ts +2 -2
- package/src/components/Form/Radio/types.ts +4 -1
- package/src/components/Form/Range/types.ts +4 -1
- package/src/components/Form/Select/Select.tsx +71 -10
- package/src/components/Form/Select/constants.ts +22 -12
- package/src/components/Form/Select/types.ts +11 -1
- package/src/components/Form/Switch/types.ts +4 -1
- package/src/components/Form/TagsInput/TagsInput.tsx +7 -2
- package/src/components/Form/TagsInput/constants.ts +15 -48
- package/src/components/Form/TagsInput/types.ts +3 -1
- package/src/components/Form/TextField/types.ts +1 -0
- package/src/components/Form/Textarea/Textarea.tsx +29 -3
- package/src/components/Form/Textarea/constants.ts +2 -15
- package/src/components/Form/Textarea/types.ts +9 -2
- package/src/components/Form/Validator/Validator.tsx +27 -0
- package/src/components/Form/Validator/constants.ts +18 -0
- package/src/components/Form/Validator/index.ts +1 -0
- package/src/components/Form/Validator/types.ts +30 -0
- package/src/components/Form/components/Fieldset/types.ts +1 -1
- package/src/components/Form/index.ts +1 -0
- package/src/components/Indicator/Indicator.tsx +46 -0
- package/src/components/Indicator/constants.ts +26 -0
- package/src/components/Indicator/index.ts +1 -0
- package/src/components/Indicator/types.ts +34 -0
- package/src/components/Join/Join.tsx +28 -0
- package/src/components/Join/constants.ts +5 -0
- package/src/components/Join/index.ts +1 -0
- package/src/components/Join/types.ts +29 -0
- package/src/components/Kbd/Kbd.tsx +7 -0
- package/src/components/Kbd/constants.ts +40 -0
- package/src/components/Kbd/index.ts +1 -0
- package/src/components/Kbd/types.ts +4 -0
- package/src/components/List/List.tsx +35 -0
- package/src/components/List/constants.ts +14 -0
- package/src/components/List/index.ts +1 -0
- package/src/components/List/types.ts +12 -0
- package/src/components/Resizable/Resizable.tsx +36 -0
- package/src/components/Resizable/constants.ts +22 -0
- package/src/components/Resizable/index.ts +1 -0
- package/src/components/Resizable/types.ts +13 -0
- package/src/components/Stack/Stack.tsx +11 -0
- package/src/components/Stack/constants.ts +12 -0
- package/src/components/Stack/index.ts +1 -0
- package/src/components/Stack/types.ts +5 -0
- package/src/components/Stat/Stat.tsx +55 -0
- package/src/components/Stat/constants.ts +33 -0
- package/src/components/Stat/index.ts +1 -0
- package/src/components/Stat/types.ts +31 -0
- package/src/components/Status/Status.tsx +7 -0
- package/src/components/Status/constants.ts +31 -0
- package/src/components/Status/index.ts +1 -0
- package/src/components/Status/types.ts +5 -0
- package/src/components/Text/types.ts +1 -1
- package/src/index.ts +9 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cva } from "../../libs";
|
|
2
|
+
|
|
3
|
+
export const getStatusClasses = cva("status", {
|
|
4
|
+
variants: {
|
|
5
|
+
variant: {
|
|
6
|
+
accent: "status-accent",
|
|
7
|
+
default: "",
|
|
8
|
+
error: "status-error",
|
|
9
|
+
ghost: "",
|
|
10
|
+
info: "status-info",
|
|
11
|
+
neutral: "status-neutral",
|
|
12
|
+
primary: "status-primary",
|
|
13
|
+
secondary: "status-secondary",
|
|
14
|
+
success: "status-success",
|
|
15
|
+
warning: "status-warning",
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
xs: "status-xs",
|
|
19
|
+
sm: "status-sm",
|
|
20
|
+
md: "status-md",
|
|
21
|
+
lg: "status-lg",
|
|
22
|
+
xl: "status-xl",
|
|
23
|
+
},
|
|
24
|
+
animate: {
|
|
25
|
+
bounce: "animate-bounce",
|
|
26
|
+
ping: "animate-ping",
|
|
27
|
+
pulse: "animate-pulse",
|
|
28
|
+
spin: "animate-spin",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Status } from "./Status";
|
|
@@ -5,7 +5,7 @@ export type As = "h1" | "h2" | "h3" | "h4" | "h5" | "p" | "span";
|
|
|
5
5
|
|
|
6
6
|
type AllowedElements = Pick<React.JSX.IntrinsicElements, As>;
|
|
7
7
|
|
|
8
|
-
export type TextProps<T extends As> =
|
|
8
|
+
export type TextProps<T extends As> = AllowedElements[T] &
|
|
9
9
|
VariantProps<typeof getTextClasses> & {
|
|
10
10
|
as?: As;
|
|
11
11
|
};
|
package/src/index.ts
CHANGED
|
@@ -17,10 +17,19 @@ export * from "./components/Card";
|
|
|
17
17
|
export * from "./components/Calendar";
|
|
18
18
|
export * from "./components/Collapsible";
|
|
19
19
|
export * from "./components/Description";
|
|
20
|
+
export * from "./components/Dock";
|
|
21
|
+
export * from "./components/Indicator";
|
|
22
|
+
export * from "./components/Join";
|
|
23
|
+
export * from "./components/Kbd";
|
|
24
|
+
export * from "./components/List";
|
|
20
25
|
export * from "./components/Progress";
|
|
26
|
+
export * from "./components/Resizable";
|
|
21
27
|
export * from "./components/ScrollArea";
|
|
22
28
|
export * from "./components/Separator";
|
|
23
29
|
export * from "./components/Sonner";
|
|
30
|
+
export * from "./components/Stack";
|
|
31
|
+
export * from "./components/Stat";
|
|
32
|
+
export * from "./components/Status";
|
|
24
33
|
export * from "./components/Table";
|
|
25
34
|
export * from "./components/Tabs";
|
|
26
35
|
export * from "./components/Text";
|