vueless 0.0.653 → 0.0.655

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/constants.js CHANGED
@@ -21,9 +21,7 @@ export const DEFAULT_RING = 4; /* pixels */
21
21
  export const DEFAULT_RING_OFFSET = 0; /* pixels */
22
22
  export const DEFAULT_RING_OFFSET_COLOR_LIGHT = "#ffffff"; // white
23
23
  export const DEFAULT_RING_OFFSET_COLOR_DARK = "#111827"; // gray-900
24
- export const DEFAULT_ROUNDING_SM = 4; /* pixels */
25
24
  export const DEFAULT_ROUNDING = 8; /* pixels */
26
- export const DEFAULT_ROUNDING_LG = 16; /* pixels */
27
25
 
28
26
  /* Vueless supported colors and shades */
29
27
  export const COLOR_SHADES = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.653",
3
+ "version": "0.0.655",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -11,9 +11,7 @@ import {
11
11
  GRAY_COLOR,
12
12
  COOL_COLOR,
13
13
  DARK_MODE_SELECTOR,
14
- DEFAULT_ROUNDING_SM,
15
14
  DEFAULT_ROUNDING,
16
- DEFAULT_ROUNDING_LG,
17
15
  DEFAULT_RING,
18
16
  DEFAULT_RING_OFFSET,
19
17
  DEFAULT_RING_OFFSET_COLOR_LIGHT,
@@ -109,9 +107,9 @@ export const vuelessTailwindConfig = {
109
107
  "var(--vl-ring)": globalSettings.ring || DEFAULT_RING,
110
108
  "var(--vl-ring-offset)": globalSettings.ringOffset || DEFAULT_RING_OFFSET,
111
109
  "var(--vl-ring-offset-color)": globalSettings.ringOffsetColorLight || DEFAULT_RING_OFFSET_COLOR_LIGHT,
112
- "var(--vl-rounding-sm)": globalSettings.roundingSm || DEFAULT_ROUNDING_SM,
110
+ "var(--vl-rounding-sm)": globalSettings.roundingSm || (globalSettings.ring || DEFAULT_ROUNDING) / 2,
113
111
  "var(--vl-rounding)": globalSettings.ring || DEFAULT_ROUNDING,
114
- "var(--vl-rounding-lg)": globalSettings.roundingLg || DEFAULT_ROUNDING_LG,
112
+ "var(--vl-rounding-lg)": globalSettings.roundingLg || (globalSettings.ring || DEFAULT_ROUNDING) * 2,
115
113
  ...getReplacementColors(GRAY_COLOR, globalSettings.gray || DEFAULT_GRAY_COLOR),
116
114
  ...getReplacementColors(BRAND_COLOR, globalSettings.brand || DEFAULT_BRAND_COLOR),
117
115
  /* eslint-enable prettier/prettier */
@@ -2,4 +2,4 @@
2
2
  This const is needed to prevent the issue in script setup:
3
3
  `defineProps` is referencing locally declared variables. (vue/valid-define-props)
4
4
  */
5
- export const COMPONENT_NAME = "UGroup";
5
+ export const COMPONENT_NAME = "UGroups";
package/utils/theme.ts CHANGED
@@ -9,9 +9,7 @@ import {
9
9
  GRAYSCALE_COLOR,
10
10
  DEFAULT_RING,
11
11
  DEFAULT_RING_OFFSET,
12
- DEFAULT_ROUNDING_SM,
13
12
  DEFAULT_ROUNDING,
14
- DEFAULT_ROUNDING_LG,
15
13
  DEFAULT_BRAND_COLOR,
16
14
  DEFAULT_GRAY_COLOR,
17
15
  DEFAULT_RING_OFFSET_COLOR_LIGHT,
@@ -102,9 +100,9 @@ export function setColorMode(colorMode: `${ColorMode}`) {
102
100
  export function setTheme(config: Config = {}) {
103
101
  setColorMode(vuelessConfig?.colorMode || config?.colorMode || ColorMode.Light);
104
102
 
105
- const roundingSm = config?.roundingSm ?? vuelessConfig?.roundingSm ?? DEFAULT_ROUNDING_SM;
106
103
  const rounding = config?.rounding ?? vuelessConfig.rounding ?? DEFAULT_ROUNDING;
107
- const roundingLg = config?.roundingLg ?? vuelessConfig?.roundingLg ?? DEFAULT_ROUNDING_LG;
104
+ const roundingSm = config?.roundingSm ?? vuelessConfig?.roundingSm ?? rounding / 2;
105
+ const roundingLg = config?.roundingLg ?? vuelessConfig?.roundingLg ?? rounding * 2;
108
106
  const isDarkMode = document.documentElement.classList.contains(DARK_MODE_SELECTOR);
109
107
 
110
108
  let brand: BrandColors | GrayColors | typeof GRAY_COLOR =