@korsolutions/ui 0.0.44 → 0.0.46
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/module/components/index.js +14 -13
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/progress/index.js +4 -0
- package/dist/module/components/progress/index.js.map +1 -0
- package/dist/module/components/progress/progress.js +27 -0
- package/dist/module/components/progress/progress.js.map +1 -0
- package/dist/module/components/progress/variants/default.js +27 -0
- package/dist/module/components/progress/variants/default.js.map +1 -0
- package/dist/module/components/progress/variants/index.js +7 -0
- package/dist/module/components/progress/variants/index.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/primitives/alert/alert-description.js +16 -0
- package/dist/module/primitives/alert/alert-description.js.map +1 -0
- package/dist/module/primitives/alert/alert-icon.js +16 -0
- package/dist/module/primitives/alert/alert-icon.js.map +1 -0
- package/dist/module/primitives/alert/alert-root.js +22 -0
- package/dist/module/primitives/alert/alert-root.js.map +1 -0
- package/dist/module/primitives/alert/alert-title.js +16 -0
- package/dist/module/primitives/alert/alert-title.js.map +1 -0
- package/dist/module/primitives/alert/context.js +12 -0
- package/dist/module/primitives/alert/context.js.map +1 -0
- package/dist/module/primitives/alert/index.js +13 -0
- package/dist/module/primitives/alert/index.js.map +1 -0
- package/dist/module/primitives/alert/types.js +4 -0
- package/dist/module/primitives/alert/types.js.map +1 -0
- package/dist/module/primitives/alert/variants/default.js +35 -0
- package/dist/module/primitives/alert/variants/default.js.map +1 -0
- package/dist/module/primitives/alert/variants/destructive.js +36 -0
- package/dist/module/primitives/alert/variants/destructive.js.map +1 -0
- package/dist/module/primitives/alert/variants/index.js +9 -0
- package/dist/module/primitives/alert/variants/index.js.map +1 -0
- package/dist/module/primitives/index.js +13 -11
- package/dist/module/primitives/index.js.map +1 -1
- package/dist/module/primitives/progress/context.js +12 -0
- package/dist/module/primitives/progress/context.js.map +1 -0
- package/dist/module/primitives/progress/index.js +9 -0
- package/dist/module/primitives/progress/index.js.map +1 -0
- package/dist/module/primitives/progress/progress-indicator.js +21 -0
- package/dist/module/primitives/progress/progress-indicator.js.map +1 -0
- package/dist/module/primitives/progress/progress-root.js +28 -0
- package/dist/module/primitives/progress/progress-root.js.map +1 -0
- package/dist/module/primitives/progress/types.js +4 -0
- package/dist/module/primitives/progress/types.js.map +1 -0
- package/dist/module/types/props.types.js +2 -0
- package/dist/module/types/props.types.js.map +1 -0
- package/dist/typescript/src/components/index.d.ts +14 -13
- package/dist/typescript/src/components/index.d.ts.map +1 -1
- package/dist/typescript/src/components/progress/index.d.ts +2 -0
- package/dist/typescript/src/components/progress/index.d.ts.map +1 -0
- package/dist/typescript/src/components/progress/progress.d.ts +11 -0
- package/dist/typescript/src/components/progress/progress.d.ts.map +1 -0
- package/dist/typescript/src/components/progress/variants/default.d.ts +3 -0
- package/dist/typescript/src/components/progress/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/components/progress/variants/index.d.ts +4 -0
- package/dist/typescript/src/components/progress/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/index.d.ts +1 -0
- package/dist/typescript/src/index.d.ts.map +1 -1
- package/dist/typescript/src/primitives/alert/alert-description.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-description.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-icon.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-icon.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-root.d.ts +11 -0
- package/dist/typescript/src/primitives/alert/alert-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/alert-title.d.ts +9 -0
- package/dist/typescript/src/primitives/alert/alert-title.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/context.d.ts +7 -0
- package/dist/typescript/src/primitives/alert/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/index.d.ts +16 -0
- package/dist/typescript/src/primitives/alert/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/types.d.ts +11 -0
- package/dist/typescript/src/primitives/alert/types.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/variants/default.d.ts +3 -0
- package/dist/typescript/src/primitives/alert/variants/default.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/variants/destructive.d.ts +3 -0
- package/dist/typescript/src/primitives/alert/variants/destructive.d.ts.map +1 -0
- package/dist/typescript/src/primitives/alert/variants/index.d.ts +5 -0
- package/dist/typescript/src/primitives/alert/variants/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/index.d.ts +13 -11
- package/dist/typescript/src/primitives/index.d.ts.map +1 -1
- package/dist/typescript/src/primitives/progress/context.d.ts +10 -0
- package/dist/typescript/src/primitives/progress/context.d.ts.map +1 -0
- package/dist/typescript/src/primitives/progress/index.d.ts +10 -0
- package/dist/typescript/src/primitives/progress/index.d.ts.map +1 -0
- package/dist/typescript/src/primitives/progress/progress-indicator.d.ts +10 -0
- package/dist/typescript/src/primitives/progress/progress-indicator.d.ts.map +1 -0
- package/dist/typescript/src/primitives/progress/progress-root.d.ts +13 -0
- package/dist/typescript/src/primitives/progress/progress-root.d.ts.map +1 -0
- package/dist/typescript/src/primitives/progress/types.d.ts +8 -0
- package/dist/typescript/src/primitives/progress/types.d.ts.map +1 -0
- package/dist/typescript/src/types/props.types.d.ts +4 -0
- package/dist/typescript/src/types/props.types.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/index.ts +14 -13
- package/src/components/progress/index.ts +1 -0
- package/src/components/progress/progress.tsx +23 -0
- package/src/components/progress/variants/default.tsx +25 -0
- package/src/components/progress/variants/index.ts +5 -0
- package/src/index.tsx +1 -0
- package/src/primitives/alert/alert-description.tsx +19 -0
- package/src/primitives/alert/alert-icon.tsx +19 -0
- package/src/primitives/alert/alert-root.tsx +28 -0
- package/src/primitives/alert/alert-title.tsx +19 -0
- package/src/primitives/alert/context.ts +16 -0
- package/src/primitives/alert/index.ts +17 -0
- package/src/primitives/alert/types.ts +11 -0
- package/src/primitives/alert/variants/default.tsx +32 -0
- package/src/primitives/alert/variants/destructive.tsx +33 -0
- package/src/primitives/alert/variants/index.ts +7 -0
- package/src/primitives/index.ts +13 -11
- package/src/primitives/progress/context.ts +19 -0
- package/src/primitives/progress/index.ts +11 -0
- package/src/primitives/progress/progress-indicator.tsx +21 -0
- package/src/primitives/progress/progress-root.tsx +36 -0
- package/src/primitives/progress/types.ts +9 -0
- package/src/types/props.types.ts +3 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/progress/variants/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,gBAAgB;;CAE5B,CAAC"}
|
|
@@ -12,5 +12,6 @@ export * from "./themes/adapters";
|
|
|
12
12
|
export * from "./themes/default";
|
|
13
13
|
export { useTheme } from "./themes/provider";
|
|
14
14
|
export * from "./themes/types";
|
|
15
|
+
export * from "./primitives/alert";
|
|
15
16
|
export * from "./safe-area";
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,GAAI,sDAAsD,aAAa,gCAWtG,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAE/B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAIlE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAE5E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC,CAAC;IAC/C,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC;AAED,eAAO,MAAM,mBAAmB,GAAI,sDAAsD,aAAa,gCAWtG,CAAC;AAEF,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,cAAc,gBAAgB,CAAC;AAE/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
4
|
+
export interface AlertDescriptionProps {
|
|
5
|
+
children?: string;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertDescription(props: PropsWithRender<AlertDescriptionProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-description.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-description.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,CAAC,qBAAqB,CAAC,qBAO7E"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
export interface AlertIconProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertIcon(props: PropsWithRender<AlertIconProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-icon.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,qBAO/D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
4
|
+
import { AlertVariants } from "./variants";
|
|
5
|
+
export interface AlertRootProps {
|
|
6
|
+
variant?: keyof typeof AlertVariants;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
style?: StyleProp<ViewStyle>;
|
|
9
|
+
}
|
|
10
|
+
export declare function AlertRoot(props: PropsWithRender<AlertRootProps>): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=alert-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-root.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-root.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE3C,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,EAAE,MAAM,OAAO,aAAa,CAAC;IACrC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,eAAe,CAAC,cAAc,CAAC,qBAc/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropsWithRender } from "../../types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, type TextStyle } from "react-native";
|
|
4
|
+
export interface AlertTitleProps {
|
|
5
|
+
children?: string;
|
|
6
|
+
style?: StyleProp<TextStyle>;
|
|
7
|
+
}
|
|
8
|
+
export declare function AlertTitle(props: PropsWithRender<AlertTitleProps>): React.JSX.Element;
|
|
9
|
+
//# sourceMappingURL=alert-title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert-title.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/alert-title.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,eAAe,CAAC,qBAOjE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AlertStyles } from "./types";
|
|
2
|
+
export interface AlertContext {
|
|
3
|
+
styles?: AlertStyles;
|
|
4
|
+
}
|
|
5
|
+
export declare const AlertContext: import("react").Context<AlertContext | undefined>;
|
|
6
|
+
export declare const useAlert: () => AlertContext;
|
|
7
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,YAAY;IAC3B,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,eAAO,MAAM,YAAY,mDAAqD,CAAC;AAE/E,eAAO,MAAM,QAAQ,oBAMpB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AlertDescription } from "./alert-description";
|
|
2
|
+
import { AlertIcon } from "./alert-icon";
|
|
3
|
+
import { AlertRoot } from "./alert-root";
|
|
4
|
+
import { AlertTitle } from "./alert-title";
|
|
5
|
+
export declare const Alert: {
|
|
6
|
+
Root: typeof AlertRoot;
|
|
7
|
+
Icon: typeof AlertIcon;
|
|
8
|
+
Title: typeof AlertTitle;
|
|
9
|
+
Description: typeof AlertDescription;
|
|
10
|
+
};
|
|
11
|
+
export type { AlertDescriptionProps } from "./alert-description";
|
|
12
|
+
export type { AlertIconProps } from "./alert-icon";
|
|
13
|
+
export type { AlertRootProps } from "./alert-root";
|
|
14
|
+
export type { AlertTitleProps } from "./alert-title";
|
|
15
|
+
export type { AlertStyles } from "./types";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,KAAK;;;;;CAKjB,CAAC;AAEF,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AlertDescriptionProps } from "./alert-description";
|
|
2
|
+
import type { AlertIconProps } from "./alert-icon";
|
|
3
|
+
import type { AlertRootProps } from "./alert-root";
|
|
4
|
+
import type { AlertTitleProps } from "./alert-title";
|
|
5
|
+
export interface AlertStyles {
|
|
6
|
+
root?: AlertRootProps["style"];
|
|
7
|
+
icon?: AlertIconProps["style"];
|
|
8
|
+
title?: AlertTitleProps["style"];
|
|
9
|
+
description?: AlertDescriptionProps["style"];
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/alert/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,WAAW,CAAC,EAAE,qBAAqB,CAAC,OAAO,CAAC,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/alert/variants/default.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,sBAAsB,QAAO,WA4BzC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"destructive.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/alert/variants/destructive.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,eAAO,MAAM,0BAA0B,QAAO,WA6B7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/primitives/alert/variants/index.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;CAGzB,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
3
|
-
export * from "./button";
|
|
4
|
-
export * from "./select";
|
|
1
|
+
export * from "./alert";
|
|
2
|
+
export * from "./alert-dialog";
|
|
5
3
|
export * from "./autocomplete";
|
|
6
|
-
export * from "./card";
|
|
7
|
-
export * from "./empty";
|
|
8
4
|
export * from "./avatar";
|
|
9
|
-
export * from "./toast";
|
|
10
5
|
export * from "./badge";
|
|
11
|
-
export * from "./
|
|
6
|
+
export * from "./button";
|
|
7
|
+
export * from "./calendar";
|
|
8
|
+
export * from "./card";
|
|
9
|
+
export * from "./checkbox";
|
|
12
10
|
export * from "./dropdown-menu";
|
|
11
|
+
export * from "./empty";
|
|
12
|
+
export * from "./field";
|
|
13
|
+
export * from "./input";
|
|
13
14
|
export * from "./popover";
|
|
14
15
|
export * from "./portal";
|
|
15
|
-
export * from "./
|
|
16
|
+
export * from "./progress";
|
|
17
|
+
export * from "./select";
|
|
16
18
|
export * from "./tabs";
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
+
export * from "./textarea";
|
|
20
|
+
export * from "./toast";
|
|
19
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ProgressState, ProgressStyles } from "./types";
|
|
2
|
+
export interface ProgressContext {
|
|
3
|
+
state: ProgressState;
|
|
4
|
+
styles?: ProgressStyles;
|
|
5
|
+
value: number;
|
|
6
|
+
max: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const ProgressContext: import("react").Context<ProgressContext | undefined>;
|
|
9
|
+
export declare const useProgress: () => ProgressContext;
|
|
10
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/progress/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,eAAe,sDAAwD,CAAC;AAErF,eAAO,MAAM,WAAW,uBAMvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ProgressRoot } from "./progress-root";
|
|
2
|
+
import { ProgressIndicator } from "./progress-indicator";
|
|
3
|
+
export declare const ProgressPrimitive: {
|
|
4
|
+
Root: typeof ProgressRoot;
|
|
5
|
+
Indicator: typeof ProgressIndicator;
|
|
6
|
+
};
|
|
7
|
+
export type { ProgressRootProps } from "./progress-root";
|
|
8
|
+
export type { ProgressIndicatorProps } from "./progress-indicator";
|
|
9
|
+
export type { ProgressStyles } from "./types";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/progress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
export interface ProgressIndicatorProps {
|
|
4
|
+
render?: (props: ProgressIndicatorProps & {
|
|
5
|
+
percentage: number;
|
|
6
|
+
}) => React.ReactNode;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
}
|
|
9
|
+
export declare function ProgressIndicator(props: ProgressIndicatorProps): React.JSX.Element;
|
|
10
|
+
//# sourceMappingURL=progress-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-indicator.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/progress/progress-indicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpE,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,sBAAsB,GAAG;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,SAAS,CAAC;IAErF,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,qBAS9D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type StyleProp, type ViewStyle } from "react-native";
|
|
3
|
+
import type { ProgressStyles } from "./types";
|
|
4
|
+
export interface ProgressRootProps {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
render?: (props: ProgressRootProps) => React.ReactNode;
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
styles?: ProgressStyles;
|
|
9
|
+
value?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
}
|
|
12
|
+
export declare function ProgressRoot(props: ProgressRootProps): React.JSX.Element;
|
|
13
|
+
//# sourceMappingURL=progress-root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-root.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/progress/progress-root.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,SAAS,CAAC;IAEvD,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,qBAiBpD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProgressIndicatorProps } from "./progress-indicator";
|
|
2
|
+
import type { ProgressRootProps } from "./progress-root";
|
|
3
|
+
export type ProgressState = "default";
|
|
4
|
+
export interface ProgressStyles {
|
|
5
|
+
root?: Partial<Record<ProgressState, ProgressRootProps["style"]>>;
|
|
6
|
+
indicator?: Partial<Record<ProgressState, ProgressIndicatorProps["style"]>>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/primitives/progress/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAClE,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,aAAa,EAAE,sBAAsB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.types.d.ts","sourceRoot":"","sources":["../../../../src/types/props.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG;IACnC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACxC,CAAC"}
|
package/package.json
CHANGED
package/src/components/index.ts
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./card/card";
|
|
3
|
-
export * from "./input";
|
|
4
|
-
export * from "./field/field";
|
|
5
|
-
export * from "./select/select";
|
|
1
|
+
export * from "./alert-dialog";
|
|
6
2
|
export * from "./autocomplete/autocomplete";
|
|
7
|
-
export * from "./typography/typography";
|
|
8
|
-
export * from "./link/link";
|
|
9
|
-
export * from "./empty/empty";
|
|
10
3
|
export * from "./avatar/avatar";
|
|
11
|
-
export * from "./toast/index";
|
|
12
4
|
export * from "./badge/badge";
|
|
13
|
-
export * from "./
|
|
5
|
+
export * from "./button/button";
|
|
6
|
+
export * from "./calendar/calendar";
|
|
7
|
+
export * from "./card/card";
|
|
8
|
+
export * from "./checkbox";
|
|
14
9
|
export * from "./dropdown-menu/dropdown-menu";
|
|
10
|
+
export * from "./empty/empty";
|
|
11
|
+
export * from "./field/field";
|
|
12
|
+
export * from "./input";
|
|
13
|
+
export * from "./link/link";
|
|
15
14
|
export * from "./popover/popover";
|
|
16
|
-
export * from "./
|
|
15
|
+
export * from "./progress";
|
|
16
|
+
export * from "./select/select";
|
|
17
17
|
export * from "./tabs";
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
18
|
+
export * from "./textarea/textarea";
|
|
19
|
+
export * from "./toast/index";
|
|
20
|
+
export * from "./typography/typography";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Progress } from "./progress";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ProgressPrimitive } from "@/primitives";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ProgressVariants } from "./variants";
|
|
4
|
+
|
|
5
|
+
interface ProgressProps {
|
|
6
|
+
value?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
variant?: keyof typeof ProgressVariants;
|
|
9
|
+
indicatorColor?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function Progress(props: ProgressProps) {
|
|
13
|
+
const { value = 0, max = 100, variant = "default", indicatorColor } = props;
|
|
14
|
+
|
|
15
|
+
const useVariantStyles = ProgressVariants[variant];
|
|
16
|
+
const variantStyles = useVariantStyles();
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<ProgressPrimitive.Root value={value} max={max} styles={variantStyles}>
|
|
20
|
+
<ProgressPrimitive.Indicator style={indicatorColor ? { backgroundColor: indicatorColor } : undefined} />
|
|
21
|
+
</ProgressPrimitive.Root>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ProgressStyles } from "@/primitives";
|
|
2
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
3
|
+
|
|
4
|
+
export const useProgressVariantDefault = (): ProgressStyles => {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
({ colors, radius }): ProgressStyles => ({
|
|
7
|
+
root: {
|
|
8
|
+
default: {
|
|
9
|
+
width: "100%",
|
|
10
|
+
height: 8,
|
|
11
|
+
backgroundColor: colors.muted,
|
|
12
|
+
borderRadius: radius,
|
|
13
|
+
overflow: "hidden",
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
indicator: {
|
|
17
|
+
default: {
|
|
18
|
+
height: "100%",
|
|
19
|
+
backgroundColor: colors.primary,
|
|
20
|
+
borderRadius: radius,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
})
|
|
24
|
+
);
|
|
25
|
+
};
|
package/src/index.tsx
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, Text, type TextStyle } from "react-native";
|
|
4
|
+
import { useAlert } from "./context";
|
|
5
|
+
|
|
6
|
+
export interface AlertDescriptionProps {
|
|
7
|
+
children?: string;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<TextStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertDescription(props: PropsWithRender<AlertDescriptionProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.description, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? Text;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
4
|
+
import { useAlert } from "./context";
|
|
5
|
+
|
|
6
|
+
export interface AlertIconProps {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<ViewStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertIcon(props: PropsWithRender<AlertIconProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.icon, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? View;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, View, type ViewStyle } from "react-native";
|
|
4
|
+
import { AlertContext } from "./context";
|
|
5
|
+
import { AlertVariants } from "./variants";
|
|
6
|
+
|
|
7
|
+
export interface AlertRootProps {
|
|
8
|
+
variant?: keyof typeof AlertVariants;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function AlertRoot(props: PropsWithRender<AlertRootProps>) {
|
|
15
|
+
const variantStyles = AlertVariants[props.variant ?? "default"]();
|
|
16
|
+
const composedStyle = [variantStyles.root, props.style];
|
|
17
|
+
|
|
18
|
+
const Component = props.render ?? View;
|
|
19
|
+
return (
|
|
20
|
+
<AlertContext.Provider
|
|
21
|
+
value={{
|
|
22
|
+
styles: variantStyles,
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
<Component {...props} style={composedStyle} />
|
|
26
|
+
</AlertContext.Provider>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PropsWithRender } from "@/types/props.types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { type StyleProp, Text, type TextStyle } from "react-native";
|
|
4
|
+
import { useAlert } from "./context";
|
|
5
|
+
|
|
6
|
+
export interface AlertTitleProps {
|
|
7
|
+
children?: string;
|
|
8
|
+
|
|
9
|
+
style?: StyleProp<TextStyle>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function AlertTitle(props: PropsWithRender<AlertTitleProps>) {
|
|
13
|
+
const alert = useAlert();
|
|
14
|
+
|
|
15
|
+
const composedStyle = [alert.styles?.title, props.style];
|
|
16
|
+
|
|
17
|
+
const Component = props.render ?? Text;
|
|
18
|
+
return <Component {...props} style={composedStyle} />;
|
|
19
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import type { AlertStyles } from "./types";
|
|
3
|
+
|
|
4
|
+
export interface AlertContext {
|
|
5
|
+
styles?: AlertStyles;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const AlertContext = createContext<AlertContext | undefined>(undefined);
|
|
9
|
+
|
|
10
|
+
export const useAlert = () => {
|
|
11
|
+
const context = useContext(AlertContext);
|
|
12
|
+
if (!context) {
|
|
13
|
+
throw new Error("useAlert must be used within an AlertRoot");
|
|
14
|
+
}
|
|
15
|
+
return context;
|
|
16
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AlertDescription } from "./alert-description";
|
|
2
|
+
import { AlertIcon } from "./alert-icon";
|
|
3
|
+
import { AlertRoot } from "./alert-root";
|
|
4
|
+
import { AlertTitle } from "./alert-title";
|
|
5
|
+
|
|
6
|
+
export const Alert = {
|
|
7
|
+
Root: AlertRoot,
|
|
8
|
+
Icon: AlertIcon,
|
|
9
|
+
Title: AlertTitle,
|
|
10
|
+
Description: AlertDescription,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type { AlertDescriptionProps } from "./alert-description";
|
|
14
|
+
export type { AlertIconProps } from "./alert-icon";
|
|
15
|
+
export type { AlertRootProps } from "./alert-root";
|
|
16
|
+
export type { AlertTitleProps } from "./alert-title";
|
|
17
|
+
export type { AlertStyles } from "./types";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AlertDescriptionProps } from "./alert-description";
|
|
2
|
+
import type { AlertIconProps } from "./alert-icon";
|
|
3
|
+
import type { AlertRootProps } from "./alert-root";
|
|
4
|
+
import type { AlertTitleProps } from "./alert-title";
|
|
5
|
+
|
|
6
|
+
export interface AlertStyles {
|
|
7
|
+
root?: AlertRootProps["style"];
|
|
8
|
+
icon?: AlertIconProps["style"];
|
|
9
|
+
title?: AlertTitleProps["style"];
|
|
10
|
+
description?: AlertDescriptionProps["style"];
|
|
11
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type AlertStyles } from "@/primitives";
|
|
2
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
3
|
+
|
|
4
|
+
export const useAlertVariantDefault = (): AlertStyles => {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
({ colors, radius, fontSize }): AlertStyles => ({
|
|
7
|
+
root: {
|
|
8
|
+
padding: 16,
|
|
9
|
+
backgroundColor: colors.background,
|
|
10
|
+
borderRadius: radius,
|
|
11
|
+
borderWidth: 1,
|
|
12
|
+
borderColor: colors.border,
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
gap: 12,
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
marginTop: 2,
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
fontSize: fontSize,
|
|
21
|
+
fontWeight: "600",
|
|
22
|
+
color: colors.foreground,
|
|
23
|
+
marginBottom: 4,
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
fontSize: fontSize * 0.875,
|
|
27
|
+
color: colors.mutedForeground,
|
|
28
|
+
lineHeight: 20,
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type AlertStyles } from "@/primitives";
|
|
2
|
+
import { useThemedStyles } from "@/utils/use-themed-styles";
|
|
3
|
+
|
|
4
|
+
export const useAlertVariantDestructive = (): AlertStyles => {
|
|
5
|
+
return useThemedStyles(
|
|
6
|
+
({ colors, radius, fontSize }): AlertStyles => ({
|
|
7
|
+
root: {
|
|
8
|
+
padding: 16,
|
|
9
|
+
backgroundColor: colors.background,
|
|
10
|
+
borderRadius: radius,
|
|
11
|
+
borderWidth: 1,
|
|
12
|
+
borderColor: colors.danger,
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
gap: 12,
|
|
15
|
+
},
|
|
16
|
+
icon: {
|
|
17
|
+
marginTop: 2,
|
|
18
|
+
},
|
|
19
|
+
title: {
|
|
20
|
+
fontSize: fontSize,
|
|
21
|
+
fontWeight: "600",
|
|
22
|
+
color: colors.danger,
|
|
23
|
+
marginBottom: 4,
|
|
24
|
+
},
|
|
25
|
+
description: {
|
|
26
|
+
fontSize: fontSize * 0.875,
|
|
27
|
+
color: colors.danger,
|
|
28
|
+
lineHeight: 20,
|
|
29
|
+
opacity: 0.9,
|
|
30
|
+
},
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
};
|