pangea-lib 2.9.16 → 2.10.1

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.
@@ -30,15 +30,15 @@ margin-x()
30
30
  else
31
31
  margin-right arguments[1]
32
32
 
33
- size($heightSize, $widthSize = false)
34
- height $heightSize
35
- min-height $heightSize
36
- if $widthSize
37
- width $widthSize
38
- min-width $widthSize
33
+ size($size-height, $size-width = false)
34
+ height $size-height
35
+ min-height $size-height
36
+ if $size-width
37
+ width $size-width
38
+ min-width $size-width
39
39
  else
40
- width $heightSize
41
- min-width $heightSize
40
+ width $size-height
41
+ min-width $size-height
42
42
 
43
43
  size-rounded($size)
44
44
  size($size)
@@ -47,17 +47,17 @@ size-rounded($size)
47
47
  shadow($blur = 1rem, $color = rgba(0, 0, 0, 0.2))
48
48
  box-shadow 0 0 $blur $color
49
49
 
50
- flex($flexDirection = row, $justifyContent = flex-start, $alignItems = stretch, $gap = 0, $flexWrap = nowrap)
50
+ flex($flex-direction = row, $justify-content = flex-start, $align-items = stretch, $gap = 0, $flex-wrap = nowrap)
51
51
  display flex
52
- flex-direction $flexDirection
53
- justify-content $justifyContent
54
- align-items $alignItems
52
+ flex-direction $flex-direction
53
+ justify-content $justify-content
54
+ align-items $align-items
55
55
  gap $gap
56
- flex-wrap $flexWrap
56
+ flex-wrap $flex-wrap
57
57
 
58
58
  flex-center()
59
59
  flex(row, center, center)
60
60
 
61
- dynamic-rgba($rgbValues, $opacity = 1)
61
+ dynamic-rgba($rgb-values, $opacity = 1)
62
62
  // return rgba as a string so it doesn't get interpolated by stylus compiler
63
- s('rgba(%s, %s)', $rgbValues, $opacity)
63
+ s('rgba(%s, %s)', $rgb-values, $opacity)
@@ -1,10 +1,10 @@
1
1
  // Large desktops
2
2
  // no breakpoint since this is the default
3
3
  // Desktops
4
- $largeDevicesBreakpoint = 1200px
4
+ $breakpoint-large-devices = 1200px
5
5
  // Tablets
6
- $mediumDevicesBreakpoint = 992px
6
+ $breakpoint-medium-devices = 992px
7
7
  // Landscape phones
8
- $smallDevicesBreakpoint = 768px
8
+ $breakpoint-small-devices = 768px
9
9
  // Portrait phones
10
- $extraSmallDevicesBreakpoint = 576px
10
+ $breakpoint-extra-small-devices = 576px
@@ -1,5 +1,5 @@
1
- import { Color, ColorAlpha, AppColor, AppColorType, ColorRgba } from './colors.types';
1
+ import { ColorHex } from '../types/color';
2
+ import { AppColor, AppColorType } from './colors.types';
2
3
 
3
- export declare function rgba(color: Color, colorAlpha: ColorAlpha): ColorRgba;
4
4
  export declare function getColorType(color: AppColor): AppColorType;
5
- export declare function setRootProperty(propertyName: string, newColor: Color): void;
5
+ export declare function setColorsVariable(colorName: string, color: ColorHex): void;
@@ -1,15 +1,4 @@
1
- import { StoreColors, AppColorName, AppColor, AppColors } from './colors.types';
1
+ import { AppColorName, AppColor, AppColors } from './colors.types';
2
2
 
3
- export declare const useColorsStore: import('pinia').StoreDefinition<"pga-colors", import('pinia')._UnwrapAll<Pick<{
4
- colors: import('vue').ComputedRef<StoreColors>;
5
- setColor: (colorName: AppColorName, newColor: AppColor) => void;
6
- setColors: (newColors: AppColors) => void;
7
- }, never>>, Pick<{
8
- colors: import('vue').ComputedRef<StoreColors>;
9
- setColor: (colorName: AppColorName, newColor: AppColor) => void;
10
- setColors: (newColors: AppColors) => void;
11
- }, "colors">, Pick<{
12
- colors: import('vue').ComputedRef<StoreColors>;
13
- setColor: (colorName: AppColorName, newColor: AppColor) => void;
14
- setColors: (newColors: AppColors) => void;
15
- }, "setColor" | "setColors">>;
3
+ export declare function setColor(colorName: AppColorName, newColor: AppColor): void;
4
+ export declare function setColors(newColors: AppColors): void;
@@ -1,21 +1,18 @@
1
- export type ColorAlpha = number;
2
- export type ColorRgb = `rgb(${number}, ${number}, ${number})`;
3
- export type ColorRgba = `rgba(${number}, ${number}, ${number}, ${number})`;
4
- export type ColorHex = `#${string}`;
5
- export type Color = ColorRgb | ColorRgba | ColorHex;
1
+ import { ColorHex } from '../types/color';
2
+
6
3
  export type AppColorNameTheme = 'textFirst' | 'textSecond' | 'textThird' | 'backgroundFirst' | 'backgroundSecond' | 'backgroundThird';
7
4
  export type AppColorNameProp = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'dark' | 'light' | 'red' | 'purple' | 'sky' | 'beige';
8
5
  export type AppColorNameInformative = 'info' | 'link' | 'error';
9
6
  export type AppColorName = AppColorNameTheme | AppColorNameProp | AppColorNameInformative;
10
7
  export type AppColorTheme = {
11
- light: Color;
12
- dark: Color;
8
+ light: ColorHex;
9
+ dark: ColorHex;
13
10
  };
14
11
  export type AppColorProp = {
15
- main: Color;
16
- contrast: Color;
12
+ main: ColorHex;
13
+ contrast: ColorHex;
17
14
  };
18
- export type AppColorInformative = Color;
15
+ export type AppColorInformative = ColorHex;
19
16
  export type AppColor = AppColorTheme | AppColorProp | AppColorInformative;
20
17
  export type AppColorThemes = {
21
18
  [K in AppColorNameTheme]: AppColorTheme;
@@ -29,12 +26,12 @@ export type AppColorInformatives = {
29
26
  export type AppColors = AppColorThemes & AppColorProps & AppColorInformatives;
30
27
  export type AppColorType = 'theme' | 'prop' | 'informative';
31
28
  export type StoreColorThemes = {
32
- [K in AppColorNameTheme]: Color;
29
+ [K in AppColorNameTheme]: ColorHex;
33
30
  };
34
31
  export type StoreColorProps = {
35
- [K in AppColorNameProp as `${K}`]: Color;
32
+ [K in AppColorNameProp as `${K}`]: ColorHex;
36
33
  } & {
37
- [K in AppColorNameProp as `${K}Contrast`]: Color;
34
+ [K in AppColorNameProp as `${K}Contrast`]: ColorHex;
38
35
  };
39
36
  export type StoreColorInformatives = AppColorInformatives;
40
37
  export type StoreColors = StoreColorThemes & StoreColorProps & StoreColorInformatives;
@@ -1,6 +1,3 @@
1
- import { rgba } from './colors.helpers';
2
- import { useColorsStore } from './colors.store';
3
-
4
- export { rgba, useColorsStore };
5
- export * from './colors.types';
1
+ export * from './colors.store';
6
2
  export * from './theme.store';
3
+ export * from './colors.types';
@@ -1,11 +1,8 @@
1
1
  export type Theme = 'light' | 'dark';
2
2
  export declare const useThemeStore: import('pinia').StoreDefinition<"pga-theme", import('pinia')._UnwrapAll<Pick<{
3
3
  theme: import('vue').Ref<Theme>;
4
- setTheme: (newTheme: Theme) => void;
5
4
  }, "theme">>, Pick<{
6
5
  theme: import('vue').Ref<Theme>;
7
- setTheme: (newTheme: Theme) => void;
8
6
  }, never>, Pick<{
9
7
  theme: import('vue').Ref<Theme>;
10
- setTheme: (newTheme: Theme) => void;
11
- }, "setTheme">>;
8
+ }, never>>;
@@ -1,15 +1,15 @@
1
- import { Color, AppColorNameProp } from '../colors';
1
+ import { AppColorNameProp } from '../colors';
2
2
 
3
3
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
- color?: Color | AppColorNameProp;
4
+ color?: AppColorNameProp;
5
5
  }>, {
6
6
  color: string;
7
7
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
- color?: Color | AppColorNameProp;
8
+ color?: AppColorNameProp;
9
9
  }>, {
10
10
  color: string;
11
11
  }>>>, {
12
- color: Color | AppColorNameProp;
12
+ color: AppColorNameProp;
13
13
  }, {}>, {
14
14
  default?(_: {}): any;
15
15
  }>;
@@ -1,20 +1,20 @@
1
- import { Color, AppColorNameProp } from '../colors';
2
1
  import { Size } from '../types';
2
+ import { AppColorNameProp } from '../colors';
3
3
 
4
4
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
- color?: AppColorNameProp | Color;
5
+ color?: AppColorNameProp;
6
6
  size?: Size;
7
7
  }>, {
8
8
  color: string;
9
9
  size: string;
10
10
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
11
- color?: AppColorNameProp | Color;
11
+ color?: AppColorNameProp;
12
12
  size?: Size;
13
13
  }>, {
14
14
  color: string;
15
15
  size: string;
16
16
  }>>>, {
17
- color: AppColorNameProp | Color;
17
+ color: AppColorNameProp;
18
18
  size: Size;
19
19
  }, {}>;
20
20
  export default _default;
@@ -1,31 +1,31 @@
1
+ import { Icon, TextProp, Size, ButtonType } from '../../types';
1
2
  import { AppColorNameProp } from '../../colors';
2
- import { Icon, TextProp, Size, ButtonStyle } from '../../types';
3
3
 
4
4
  declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
5
5
  icon?: Icon;
6
6
  text?: TextProp;
7
- type?: AppColorNameProp;
8
- style?: ButtonStyle;
7
+ type?: ButtonType;
8
+ color?: AppColorNameProp;
9
9
  size?: Size;
10
10
  isLoading?: boolean;
11
11
  numberToDisplay?: number;
12
12
  }>, {
13
- type: string;
13
+ color: string;
14
14
  size: string;
15
15
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
16
16
  icon?: Icon;
17
17
  text?: TextProp;
18
- type?: AppColorNameProp;
19
- style?: ButtonStyle;
18
+ type?: ButtonType;
19
+ color?: AppColorNameProp;
20
20
  size?: Size;
21
21
  isLoading?: boolean;
22
22
  numberToDisplay?: number;
23
23
  }>, {
24
- type: string;
24
+ color: string;
25
25
  size: string;
26
26
  }>>>, {
27
+ color: AppColorNameProp;
27
28
  size: Size;
28
- type: AppColorNameProp;
29
29
  }, {}>, {
30
30
  default?(_: {}): any;
31
31
  }>;
@@ -1 +1,4 @@
1
+ import { ColorAlpha, ColorRgba, Color } from '../types/color';
2
+
3
+ export declare function rgba(color: Color, colorAlpha: ColorAlpha): ColorRgba;
1
4
  export declare function animation(element: string, animation: string, prefix?: string): Promise<unknown>;
@@ -1,19 +1,19 @@
1
1
  export declare const useOptionsStore: import('pinia').StoreDefinition<"pga-options", import('pinia')._UnwrapAll<Pick<{
2
2
  options: import('vue').Ref<{
3
3
  button: {
4
- style: import('../types').ButtonStyle;
4
+ type: import('../types').ButtonType;
5
5
  };
6
6
  }>;
7
7
  }, "options">>, Pick<{
8
8
  options: import('vue').Ref<{
9
9
  button: {
10
- style: import('../types').ButtonStyle;
10
+ type: import('../types').ButtonType;
11
11
  };
12
12
  }>;
13
13
  }, never>, Pick<{
14
14
  options: import('vue').Ref<{
15
15
  button: {
16
- style: import('../types').ButtonStyle;
16
+ type: import('../types').ButtonType;
17
17
  };
18
18
  }>;
19
19
  }, never>>;
@@ -1,11 +1,11 @@
1
1
  import { Theme } from '../colors/theme.store';
2
2
  import { AppColors } from '../colors/colors.types';
3
- import { ButtonStyle } from '../types/button';
3
+ import { ButtonType } from '../types/button';
4
4
  import { DeepPartial } from 'pangea-helpers';
5
5
 
6
6
  export type OptionsStore = {
7
7
  button: {
8
- style: ButtonStyle;
8
+ type: ButtonType;
9
9
  };
10
10
  };
11
11
  export type Options = OptionsStore & {
@@ -1 +1 @@
1
- export type ButtonStyle = 'filled' | 'outlined';
1
+ export type ButtonType = 'filled' | 'outlined';
@@ -0,0 +1,5 @@
1
+ export type ColorAlpha = number;
2
+ export type ColorRgb = `rgb(${number}, ${number}, ${number})`;
3
+ export type ColorRgba = `rgba(${number}, ${number}, ${number}, ${number})`;
4
+ export type ColorHex = `#${string}`;
5
+ export type Color = ColorRgb | ColorRgba | ColorHex;
@@ -1,5 +1,6 @@
1
1
  export * from './button';
2
2
  export * from './chart';
3
+ export * from './color';
3
4
  export * from './icon';
4
5
  export * from './image';
5
6
  export * from './populate';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pangea-lib",
3
3
  "description": "",
4
- "version": "2.9.16",
4
+ "version": "2.10.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -52,7 +52,7 @@
52
52
  "chart.js": "^4.4.3",
53
53
  "click-outside-vue3": "^4.0.1",
54
54
  "moment": "^2.30.1",
55
- "pangea-helpers": "^1.3.6",
55
+ "pangea-helpers": "^1.3.7",
56
56
  "pinia": "^2.1.7",
57
57
  "pinia-plugin-persistedstate": "^3.2.1",
58
58
  "sanitize.css": "^13.0.0",