vueless 0.0.707 → 0.0.708
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/bin/constants.js +0 -1
- package/constants.js +0 -2
- package/package.json +1 -1
- package/preset-tailwind.js +0 -5
- package/types.ts +0 -6
- package/ui.button/config.ts +1 -1
- package/ui.form-checkbox/config.ts +1 -1
- package/ui.form-date-picker/config.ts +1 -1
- package/ui.form-radio/config.ts +1 -1
- package/ui.form-switch/config.ts +1 -1
- package/ui.text-badge/config.ts +1 -1
- package/utils/theme.ts +0 -6
package/bin/constants.js
CHANGED
package/constants.js
CHANGED
|
@@ -18,7 +18,6 @@ export const COLOR_MODE_KEY = "vl-color-mode";
|
|
|
18
18
|
export const DEFAULT_BRAND_COLOR = GRAYSCALE_COLOR;
|
|
19
19
|
export const DEFAULT_GRAY_COLOR = COOL_COLOR;
|
|
20
20
|
export const DEFAULT_RING = 2; /* pixels */
|
|
21
|
-
export const DEFAULT_RING_OFFSET = 2; /* pixels */
|
|
22
21
|
export const DEFAULT_RING_OFFSET_COLOR_LIGHT = "#ffffff"; // white
|
|
23
22
|
export const DEFAULT_RING_OFFSET_COLOR_DARK = "#111827"; // gray-900
|
|
24
23
|
export const DEFAULT_ROUNDING = 8; /* pixels */
|
|
@@ -173,7 +172,6 @@ export const TAILWIND_MERGE_EXTENSION = {
|
|
|
173
172
|
},
|
|
174
173
|
classGroups: {
|
|
175
174
|
"ring-w": [{ ring: ["dynamic"] }],
|
|
176
|
-
"ring-offset-w": [{ "ring-offset": ["dynamic"] }],
|
|
177
175
|
"ring-offset-color": [{ "ring-offset": ["color-dynamic"] }],
|
|
178
176
|
"font-size": [{ text: ["2xs"] }],
|
|
179
177
|
rounded: [{ rounded: ["dynamic", "dynamic-sm", "dynamic-lg", "inherit"] }],
|
package/package.json
CHANGED
package/preset-tailwind.js
CHANGED
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
TAILWIND_COLORS,
|
|
14
14
|
DEFAULT_ROUNDING,
|
|
15
15
|
DEFAULT_RING,
|
|
16
|
-
DEFAULT_RING_OFFSET,
|
|
17
16
|
DEFAULT_RING_OFFSET_COLOR_LIGHT,
|
|
18
17
|
DEFAULT_BRAND_COLOR,
|
|
19
18
|
DEFAULT_GRAY_COLOR,
|
|
@@ -95,9 +94,6 @@ export const vuelessTailwindConfig = {
|
|
|
95
94
|
ringWidth: {
|
|
96
95
|
dynamic: "var(--vl-ring)",
|
|
97
96
|
},
|
|
98
|
-
ringOffsetWidth: {
|
|
99
|
-
dynamic: "var(--vl-ring-offset)",
|
|
100
|
-
},
|
|
101
97
|
ringOffsetColor: {
|
|
102
98
|
dynamic: twColorWithOpacity("--vl-ring-offset-color"),
|
|
103
99
|
},
|
|
@@ -106,7 +102,6 @@ export const vuelessTailwindConfig = {
|
|
|
106
102
|
themeReplacements: {
|
|
107
103
|
/* eslint-disable prettier/prettier */
|
|
108
104
|
"var(--vl-ring)": globalSettings.ring || DEFAULT_RING,
|
|
109
|
-
"var(--vl-ring-offset)": globalSettings.ringOffset || DEFAULT_RING_OFFSET,
|
|
110
105
|
"var(--vl-ring-offset-color)": globalSettings.ringOffsetColorLight || DEFAULT_RING_OFFSET_COLOR_LIGHT,
|
|
111
106
|
"var(--vl-rounding-sm)": globalSettings.roundingSm || (globalSettings.ring || DEFAULT_ROUNDING) / 2,
|
|
112
107
|
"var(--vl-rounding)": globalSettings.ring || DEFAULT_ROUNDING,
|
package/types.ts
CHANGED
|
@@ -100,11 +100,6 @@ export interface ThemeConfig {
|
|
|
100
100
|
*/
|
|
101
101
|
ring?: number;
|
|
102
102
|
|
|
103
|
-
/**
|
|
104
|
-
* Default components ring offset width.
|
|
105
|
-
*/
|
|
106
|
-
ringOffset?: number;
|
|
107
|
-
|
|
108
103
|
/**
|
|
109
104
|
* Default components ring color for light theme.
|
|
110
105
|
*/
|
|
@@ -345,7 +340,6 @@ export interface TailwindColorShades {
|
|
|
345
340
|
|
|
346
341
|
export interface VuelessCssVariables {
|
|
347
342
|
"--vl-ring": string;
|
|
348
|
-
"--vl-ring-offset": string;
|
|
349
343
|
"--vl-ring-offset-color": string;
|
|
350
344
|
"--vl-rounding-sm": string;
|
|
351
345
|
"--vl-rounding": string;
|
package/ui.button/config.ts
CHANGED
|
@@ -3,7 +3,7 @@ export default /*tw*/ {
|
|
|
3
3
|
base: `
|
|
4
4
|
flex items-center justify-center font-medium !leading-snug whitespace-nowrap
|
|
5
5
|
border border-transparent outline-none transition cursor-pointer
|
|
6
|
-
focus-visible:ring-dynamic focus-visible:ring-offset-
|
|
6
|
+
focus-visible:ring-dynamic focus-visible:ring-offset-2
|
|
7
7
|
focus-visible:ring-{color}-600 dark:focus-visible:ring-{color}-400
|
|
8
8
|
disabled:cursor-not-allowed disabled:ring-0 disabled:ring-offset-0
|
|
9
9
|
`,
|
|
@@ -7,7 +7,7 @@ export default /*tw*/ {
|
|
|
7
7
|
active:border-{color}-600 active:bg-{color}-200
|
|
8
8
|
focus:ring-0 focus:ring-offset-0
|
|
9
9
|
checked:text-{color}-600
|
|
10
|
-
focus-visible:ring-{color}-600 focus-visible:ring-dynamic focus-visible:ring-offset-
|
|
10
|
+
focus-visible:ring-{color}-600 focus-visible:ring-dynamic focus-visible:ring-offset-2
|
|
11
11
|
disabled:border-gray-300 disabled:bg-gray-100 disabled:cursor-not-allowed
|
|
12
12
|
`,
|
|
13
13
|
variants: {
|
|
@@ -4,7 +4,7 @@ export default /*tw*/ {
|
|
|
4
4
|
datepickerInputActive: {
|
|
5
5
|
base: "{UInput} {>datepickerInput}",
|
|
6
6
|
wrapper: {
|
|
7
|
-
base: "ring-dynamic ring-offset-
|
|
7
|
+
base: "ring-dynamic ring-offset-2 ring-brand-700/15 border-brand-500 hover:border-brand-500",
|
|
8
8
|
variants: {
|
|
9
9
|
error: {
|
|
10
10
|
true: "ring-red-700/15 border-red-500 hover:border-red-500",
|
package/ui.form-radio/config.ts
CHANGED
|
@@ -7,7 +7,7 @@ export default /*tw*/ {
|
|
|
7
7
|
active:border-{color}-600 active:bg-{color}-200
|
|
8
8
|
focus:ring-0 focus:ring-offset-0
|
|
9
9
|
checked:text-{color}-600
|
|
10
|
-
focus-visible:ring-{color}-600 focus-visible:ring-dynamic focus-visible:ring-offset-
|
|
10
|
+
focus-visible:ring-{color}-600 focus-visible:ring-dynamic focus-visible:ring-offset-2
|
|
11
11
|
disabled:border-gray-300 disabled:bg-gray-100 disabled:cursor-not-allowed
|
|
12
12
|
disabled:checked:bg-gray-400 disabled:checked:border-transparent
|
|
13
13
|
`,
|
package/ui.form-switch/config.ts
CHANGED
|
@@ -3,7 +3,7 @@ export default /*tw*/ {
|
|
|
3
3
|
wrapper: {
|
|
4
4
|
base: `
|
|
5
5
|
flex items-center p-0.5 relative rounded-full cursor-pointer transition
|
|
6
|
-
focus-visible:ring-dynamic focus-visible:ring-offset-
|
|
6
|
+
focus-visible:ring-dynamic focus-visible:ring-offset-2 ring-{color}-600 outline-0
|
|
7
7
|
`,
|
|
8
8
|
variants: {
|
|
9
9
|
size: {
|
package/ui.text-badge/config.ts
CHANGED
|
@@ -16,7 +16,7 @@ export default /*tw*/ {
|
|
|
16
16
|
true: "rounded-full",
|
|
17
17
|
},
|
|
18
18
|
tabindex: {
|
|
19
|
-
true: "cursor-pointer focus-visible:ring-dynamic focus-visible:ring-offset-
|
|
19
|
+
true: "cursor-pointer focus-visible:ring-dynamic focus-visible:ring-offset-2 focus-visible:ring-{color}-600",
|
|
20
20
|
},
|
|
21
21
|
color: {
|
|
22
22
|
grayscale: "focus-visible:ring-gray-900",
|
package/utils/theme.ts
CHANGED
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
GRAYSCALE_COLOR,
|
|
12
12
|
TAILWIND_COLORS,
|
|
13
13
|
DEFAULT_RING,
|
|
14
|
-
DEFAULT_RING_OFFSET,
|
|
15
14
|
DEFAULT_ROUNDING,
|
|
16
15
|
DEFAULT_BRAND_COLOR,
|
|
17
16
|
DEFAULT_GRAY_COLOR,
|
|
@@ -42,7 +41,6 @@ declare interface RootCSSVariableOptions {
|
|
|
42
41
|
brand: string;
|
|
43
42
|
gray: string;
|
|
44
43
|
ring: number;
|
|
45
|
-
ringOffset: number;
|
|
46
44
|
ringOffsetColorDark: string;
|
|
47
45
|
ringOffsetColorLight: string;
|
|
48
46
|
roundingSm: number;
|
|
@@ -158,7 +156,6 @@ export function setTheme(config: Config = {}) {
|
|
|
158
156
|
config.gray ?? getSelectedGrayColor() ?? vuelessConfig.gray ?? DEFAULT_GRAY_COLOR;
|
|
159
157
|
|
|
160
158
|
const ring = config.ring ?? vuelessConfig.ring ?? DEFAULT_RING;
|
|
161
|
-
const ringOffset = config.ringOffset ?? vuelessConfig.ringOffset ?? DEFAULT_RING_OFFSET;
|
|
162
159
|
|
|
163
160
|
const ringOffsetColorDark =
|
|
164
161
|
config.ringOffsetColorDark ??
|
|
@@ -202,7 +199,6 @@ export function setTheme(config: Config = {}) {
|
|
|
202
199
|
brand,
|
|
203
200
|
gray,
|
|
204
201
|
ring,
|
|
205
|
-
ringOffset,
|
|
206
202
|
ringOffsetColorDark,
|
|
207
203
|
ringOffsetColorLight,
|
|
208
204
|
roundingSm,
|
|
@@ -245,7 +241,6 @@ function setRootCSSVariables(options: RootCSSVariableOptions) {
|
|
|
245
241
|
brand,
|
|
246
242
|
gray,
|
|
247
243
|
ring,
|
|
248
|
-
ringOffset,
|
|
249
244
|
ringOffsetColorDark,
|
|
250
245
|
ringOffsetColorLight,
|
|
251
246
|
roundingSm,
|
|
@@ -263,7 +258,6 @@ function setRootCSSVariables(options: RootCSSVariableOptions) {
|
|
|
263
258
|
"--vl-rounding": `${Number(rounding) / PX_IN_REM}rem`,
|
|
264
259
|
"--vl-rounding-lg": `${Number(roundingLg) / PX_IN_REM}rem`,
|
|
265
260
|
"--vl-ring": `${Math.max(0, ring)}px`,
|
|
266
|
-
"--vl-ring-offset": `${Math.max(0, ringOffset)}px`,
|
|
267
261
|
"--vl-ring-offset-color": convertHexInRgb(defaultRingOffsetColor),
|
|
268
262
|
"--vl-color-gray-default": convertHexInRgb(colors[gray]?.[defaultBrandShade]),
|
|
269
263
|
"--vl-color-brand-default": convertHexInRgb(colors[brand]?.[defaultGrayShade]),
|