@spesia/ui 1.0.1-28 → 1.0.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.
@@ -1,9 +1,9 @@
1
- export interface LogoProps {
1
+ export type LogoProps = {
2
2
  withText?: boolean;
3
3
  alt?: string;
4
4
  height?: number;
5
5
  width?: number;
6
6
  color?: "blue" | "black" | "white";
7
- }
7
+ };
8
8
  declare const Logo: ({ withText, color, height, width, ...rest }: LogoProps) => import("react/jsx-runtime").JSX.Element | null;
9
9
  export default Logo;
@@ -0,0 +1,7 @@
1
+ export type TrendingChipProps = {
2
+ value: number;
3
+ size?: "small" | "medium";
4
+ className?: string;
5
+ };
6
+ declare const TrendingChip: ({ value, size, className, }: TrendingChipProps) => import("react/jsx-runtime").JSX.Element;
7
+ export default TrendingChip;
@@ -1 +1,2 @@
1
1
  export { default as Logo } from './Logo/Logo';
2
+ export { type LogoProps } from './Logo/Logo';
@@ -0,0 +1,9 @@
1
+ type SuitCXSettings = {
2
+ name: string;
3
+ modifiers?: string[] | undefined;
4
+ states?: string[] | undefined;
5
+ };
6
+ export declare const suitCx: (settings: string | SuitCXSettings, params: {
7
+ [key: string]: any;
8
+ }, className?: {}) => (...decendants: string[]) => string;
9
+ export {};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This function assumes that the value is between 0 - 1, and will convert it to a 0 - 100 percentage before rounding it and formatting.
3
+ * But if it's already been converted to 0-100 and you just want to format it, set isPercentage to true.
4
+ * @param value Value to format as a percentage
5
+ * @param isPercentage Optional value. Tells the function whether or not to convert the value to percentage first.
6
+ * @param precision Optional value. The precision to round to.
7
+ * @returns
8
+ */
9
+ export declare const formatPercentage: (value: number, isPercentage?: boolean, precision?: number) => string;
10
+ export declare const roundNumber: (value: number, precision?: number) => number;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { theme } from './styles';
2
2
  export { colors } from './styles/colors';
3
3
  export { themes, defaultTheme } from './themes';
4
+ export { suitCx } from './helpers/suitCx';
4
5
  export * from './components';