nuance-ui 0.2.34 → 0.2.35
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/LICENSE.md +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -2
- package/dist/runtime/components/timeline.d.vue.ts +3 -1
- package/dist/runtime/components/timeline.vue +6 -3
- package/dist/runtime/components/timeline.vue.d.ts +3 -1
- package/dist/runtime/utils/color/get-gradient.js +1 -1
- package/dist/runtime/utils/color/index.d.ts +0 -1
- package/dist/runtime/utils/color/index.js +0 -1
- package/dist/runtime/utils/const/icons.js +33 -0
- package/dist/runtime/utils/const/index.d.ts +2 -0
- package/dist/runtime/utils/const/index.js +2 -0
- package/dist/runtime/utils/index.d.ts +1 -1
- package/dist/runtime/utils/index.js +1 -1
- package/dist/runtime/utils/style/create-variant-color-resolver.js +1 -1
- package/package.json +3 -2
- package/dist/runtime/utils/icons/default-icons.js +0 -33
- package/dist/runtime/utils/icons/index.d.ts +0 -1
- package/dist/runtime/utils/icons/index.js +0 -1
- /package/dist/runtime/utils/{color/const.d.ts → const/gradient.d.ts} +0 -0
- /package/dist/runtime/utils/{color/const.js → const/gradient.js} +0 -0
- /package/dist/runtime/utils/{icons/default-icons.d.ts → const/icons.d.ts} +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2026 Igor Iugin
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addTypeTemplate, addComponentsDir, addImportsDir, addTemplate } from '@nuxt/kit';
|
|
2
2
|
import { defu } from 'defu';
|
|
3
|
-
import { DEFAULT_GRADIENT } from '../dist/runtime/utils/
|
|
4
|
-
import { DEFAULT_ICONS } from '../dist/runtime/utils/icons/default-icons.js';
|
|
3
|
+
import { DEFAULT_ICONS, DEFAULT_GRADIENT } from '../dist/runtime/utils/index.js';
|
|
5
4
|
|
|
6
5
|
const SHADES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
7
6
|
function fromName(name) {
|
|
@@ -27,7 +27,7 @@ export interface TimelineItem {
|
|
|
27
27
|
[key: string]: any;
|
|
28
28
|
}
|
|
29
29
|
export interface TimelineVars {
|
|
30
|
-
root: '--tl-line-width' | '--tl-size' | '--tl-color' | '--tl-radius';
|
|
30
|
+
root: '--tl-line-width' | '--tl-size' | '--tl-color' | '--tl-radius' | '--tl-gap';
|
|
31
31
|
}
|
|
32
32
|
export type TimelineSlots<T extends TimelineItem = TimelineItem> = {
|
|
33
33
|
bullet?: SlotProps<T>;
|
|
@@ -57,6 +57,8 @@ export interface TimelineProps<T extends TimelineItem> extends BoxProps {
|
|
|
57
57
|
align?: 'right' | 'left';
|
|
58
58
|
/** Control width of the line */
|
|
59
59
|
lineWidth?: number | string;
|
|
60
|
+
/** Gap between items (padding-bottom on each non-last item) */
|
|
61
|
+
gap?: number | string;
|
|
60
62
|
/** If set, the active items direction is reversed without reversing items order @default false */
|
|
61
63
|
reverse?: boolean;
|
|
62
64
|
/** @default 'vertical' */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useVarsResolver } from "@nui/composables";
|
|
3
|
-
import { getRadius, getSize, getThemeColor, rem } from "@nui/utils";
|
|
3
|
+
import { getRadius, getSize, getSpacing, getThemeColor, rem } from "@nui/utils";
|
|
4
4
|
import { computed } from "vue";
|
|
5
5
|
import Box from "./box.vue";
|
|
6
6
|
const {
|
|
@@ -9,6 +9,7 @@ const {
|
|
|
9
9
|
align = "left",
|
|
10
10
|
size,
|
|
11
11
|
lineWidth = 4,
|
|
12
|
+
gap,
|
|
12
13
|
color,
|
|
13
14
|
classes,
|
|
14
15
|
mod,
|
|
@@ -22,6 +23,7 @@ const {
|
|
|
22
23
|
size: { type: [String, Object], required: false },
|
|
23
24
|
align: { type: String, required: false },
|
|
24
25
|
lineWidth: { type: [Number, String], required: false },
|
|
26
|
+
gap: { type: [Number, String], required: false },
|
|
25
27
|
reverse: { type: Boolean, required: false },
|
|
26
28
|
orientation: { type: String, required: false },
|
|
27
29
|
valueKey: { type: String, required: false },
|
|
@@ -37,7 +39,8 @@ const style = useVarsResolver((theme) => ({
|
|
|
37
39
|
"--tl-size": getSize(size, "tl-size"),
|
|
38
40
|
"--tl-line-width": rem(lineWidth),
|
|
39
41
|
"--tl-radius": radius === void 0 ? void 0 : getRadius(radius),
|
|
40
|
-
"--tl-color": color ? getThemeColor(color, theme) : void 0
|
|
42
|
+
"--tl-color": color ? getThemeColor(color, theme) : void 0,
|
|
43
|
+
"--tl-gap": getSpacing(gap)
|
|
41
44
|
}
|
|
42
45
|
}));
|
|
43
46
|
const currentStepIx = computed(() => {
|
|
@@ -108,5 +111,5 @@ function getActive(ix) {
|
|
|
108
111
|
</template>
|
|
109
112
|
|
|
110
113
|
<style module>
|
|
111
|
-
.root{--tl-size-xs:1rem;--tl-size-sm:1.25rem;--tl-size-md:1.5rem;--tl-size-lg:1.75rem;--tl-size-xl:2rem;--tl-size:var(--tl-size-md);--tl-offset:calc((var(--tl-size) - var(--tl-line-width))/2);--tl-line-width:.25rem;--tl-radius:1000px;--tl-color:var(--color-primary-filled)}.root:where([data-align=left]){padding-inline-start:var(--tl-offset)}.root:where([data-align=right]){padding-inline-end:var(--tl-offset)}.root:where([data-orientation=horizontal]){display:flex;flex-direction:row;padding-block-start:var(--tl-offset);padding-inline:0}.item{--tli-bd-style:solid;--tli-bd-color:var(--color-primary-filled);--item-border:var(--tl-line-width) var(--tli-bd-style) var(--tli-bd-color);color:var(--color-text);position:relative}.item:before{border-inline-start:var(--item-border);bottom:0;content:"";display:var(--timeline-line-display,none);left:var(--timeline-line-left,0);pointer-events:none;position:absolute;right:var(--timeline-line-right,0);top:0}.root[data-align=left] .item:before{--timeline-line-left:calc(var(--tl-line-width)*-1);--timeline-line-right:auto;@mixin rtl{--timeline-line-left:auto;--timeline-line-right:calc(var(--tl-line-width)*-1)}}.root[data-align=right] .item:before{--timeline-line-left:auto;--timeline-line-right:calc(var(--tl-line-width)*-1);@mixin rtl{--timeline-line-left:calc(var(--tl-line-width)*-1);--timeline-line-right:auto}}.root:where([data-align=left]) .item{padding-inline-start:var(--tl-offset);text-align:left}.root:where([data-align=right]) .item{padding-inline-end:var(--tl-offset);text-align:right}.root:where([data-orientation=horizontal]) .item{flex:1;padding-block-start:var(--tl-offset);padding-inline:0;text-align:center}.root:where([data-orientation=horizontal]) .item:before{--timeline-line-top:calc((var(--tl-size) - var(--tl-line-width))/2);border-inline-start:none;border-top:var(--item-border);bottom:auto;height:var(--tl-line-width);left:0;right:0;top:var(--timeline-line-top,0)}.root:where([data-orientation=horizontal]) .item:where(:not(:last-of-type)){--timeline-line-display:block;padding-bottom:0}.item{@mixin where-light{--tli-bd-color:var(--color-gray-3)}}.item{@mixin where-dark{--tli-bd-color:var(--color-dark-4)}}.item:where([data-line-active]){--tli-bd-color:var(--tl-color)}.item:where(:not(:last-of-type)){--timeline-line-display:block;padding-bottom:var(--
|
|
114
|
+
.root{--tl-size-xs:1rem;--tl-size-sm:1.25rem;--tl-size-md:1.5rem;--tl-size-lg:1.75rem;--tl-size-xl:2rem;--tl-size:var(--tl-size-md);--tl-offset:calc((var(--tl-size) - var(--tl-line-width))/2);--tl-line-width:.25rem;--tl-radius:1000px;--tl-color:var(--color-primary-filled);--tl-gap:var(--spacing-xl)}.root:where([data-align=left]){padding-inline-start:var(--tl-offset)}.root:where([data-align=right]){padding-inline-end:var(--tl-offset)}.root:where([data-orientation=horizontal]){display:flex;flex-direction:row;padding-block-start:var(--tl-offset);padding-inline:0}.item{--tli-bd-style:solid;--tli-bd-color:var(--color-primary-filled);--item-border:var(--tl-line-width) var(--tli-bd-style) var(--tli-bd-color);color:var(--color-text);position:relative}.item:before{border-inline-start:var(--item-border);bottom:0;content:"";display:var(--timeline-line-display,none);left:var(--timeline-line-left,0);pointer-events:none;position:absolute;right:var(--timeline-line-right,0);top:0}.root[data-align=left] .item:before{--timeline-line-left:calc(var(--tl-line-width)*-1);--timeline-line-right:auto;@mixin rtl{--timeline-line-left:auto;--timeline-line-right:calc(var(--tl-line-width)*-1)}}.root[data-align=right] .item:before{--timeline-line-left:auto;--timeline-line-right:calc(var(--tl-line-width)*-1);@mixin rtl{--timeline-line-left:calc(var(--tl-line-width)*-1);--timeline-line-right:auto}}.root:where([data-align=left]) .item{padding-inline-start:var(--tl-offset);text-align:left}.root:where([data-align=right]) .item{padding-inline-end:var(--tl-offset);text-align:right}.root:where([data-orientation=horizontal]) .item{flex:1;padding-block-start:var(--tl-offset);padding-inline:0;text-align:center}.root:where([data-orientation=horizontal]) .item:before{--timeline-line-top:calc((var(--tl-size) - var(--tl-line-width))/2);border-inline-start:none;border-top:var(--item-border);bottom:auto;height:var(--tl-line-width);left:0;right:0;top:var(--timeline-line-top,0)}.root:where([data-orientation=horizontal]) .item:where(:not(:last-of-type)){--timeline-line-display:block;padding-bottom:0}.item{@mixin where-light{--tli-bd-color:var(--color-gray-3)}}.item{@mixin where-dark{--tli-bd-color:var(--color-dark-4)}}.item:where([data-line-active]){--tli-bd-color:var(--tl-color)}.item:where(:not(:last-of-type)){--timeline-line-display:block;padding-bottom:var(--tl-gap)}.root:where([data-orientation=horizontal]) .item:where(:not(:first-of-type)){padding-bottom:0}.bullet{--tl-bullet-offset:calc(var(--tl-size)/2*-1 + var(--tl-line-width)/2*-1);align-items:center;background-color:var(--color-body);border:var(--tl-line-width) solid;border-radius:var(--tli-radius,var(--tl-radius));color:var(--color-text);display:flex;height:var(--tl-size);justify-content:center;position:absolute;top:0;width:var(--tl-size);@mixin where-light{border-color:var(--color-gray-3)}@mixin where-dark{border-color:var(--color-dark-4)}}.root:where([data-align=left]) .bullet{left:var(--tl-bullet-offset);right:auto;@mixin where-rtl{left:auto;right:var(--tl-bullet-offset)}}.root:where([data-align=right]) .bullet{left:auto;right:var(--tl-bullet-offset);@mixin where-rtl{left:var(--tl-bullet-offset);right:auto}}.root:where([data-orientation=horizontal]) .bullet{--tl-bullet-offset:0}.bullet:where([data-with-child]){border-width:var(--tl-line-width);@mixin where-light{background-color:var(--color-gray-3)}@mixin where-dark{background-color:var(--color-dark-4)}}.bullet:where([data-active]){background-color:var(--color-white);border-color:var(--tli-color,var(--tl-color));color:var(--tl-icon-color,var(--color-white))}.bullet:where([data-active]):where([data-with-child]){background-color:var(--tli-color,var(--tl-color));color:var(--tl-icon-color,var(--color-white))}.root:where([data-align=left]) .body{padding-inline-start:var(--tl-offset);text-align:left;@mixin where-rtl{text-align:right}}.root:where([data-align=right]) .body{padding-inline-end:var(--tl-offset);text-align:right;@mixin where-rtl{text-align:left}}.root:where([data-orientation=horizontal]) .body{padding-block-start:calc(var(--tl-offset) + var(--spacing-xs));padding-inline:0}.label{font-weight:600;line-height:var(--tl-size)}.content{color:var(--color-dimmed)}
|
|
112
115
|
</style>
|
|
@@ -27,7 +27,7 @@ export interface TimelineItem {
|
|
|
27
27
|
[key: string]: any;
|
|
28
28
|
}
|
|
29
29
|
export interface TimelineVars {
|
|
30
|
-
root: '--tl-line-width' | '--tl-size' | '--tl-color' | '--tl-radius';
|
|
30
|
+
root: '--tl-line-width' | '--tl-size' | '--tl-color' | '--tl-radius' | '--tl-gap';
|
|
31
31
|
}
|
|
32
32
|
export type TimelineSlots<T extends TimelineItem = TimelineItem> = {
|
|
33
33
|
bullet?: SlotProps<T>;
|
|
@@ -57,6 +57,8 @@ export interface TimelineProps<T extends TimelineItem> extends BoxProps {
|
|
|
57
57
|
align?: 'right' | 'left';
|
|
58
58
|
/** Control width of the line */
|
|
59
59
|
lineWidth?: number | string;
|
|
60
|
+
/** Gap between items (padding-bottom on each non-last item) */
|
|
61
|
+
gap?: number | string;
|
|
60
62
|
/** If set, the active items direction is reversed without reversing items order @default false */
|
|
61
63
|
reverse?: boolean;
|
|
62
64
|
/** @default 'vertical' */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const DEFAULT_ICONS = {
|
|
2
|
+
// ─── Actions ───
|
|
3
|
+
close: "lucide:x",
|
|
4
|
+
check: "lucide:check",
|
|
5
|
+
minus: "lucide:minus",
|
|
6
|
+
plus: "lucide:plus",
|
|
7
|
+
// ─── Chevrons ───
|
|
8
|
+
chevronRight: "lucide:chevron-right",
|
|
9
|
+
chevronLeft: "lucide:chevron-left",
|
|
10
|
+
chevronDown: "lucide:chevron-down",
|
|
11
|
+
chevronUp: "lucide:chevron-up",
|
|
12
|
+
selectExpand: "lucide:chevrons-up-down",
|
|
13
|
+
// ─── Inputs ───
|
|
14
|
+
email: "lucide:at-sign",
|
|
15
|
+
passwordShow: "lucide:eye",
|
|
16
|
+
passwordHide: "lucide:eye-off",
|
|
17
|
+
calendar: "lucide:calendar",
|
|
18
|
+
clock: "lucide:clock",
|
|
19
|
+
// ─── User ───
|
|
20
|
+
person: "lucide:user",
|
|
21
|
+
// ─── Theme ───
|
|
22
|
+
sun: "lucide:sun",
|
|
23
|
+
moon: "lucide:moon",
|
|
24
|
+
// ─── Files & tree ───
|
|
25
|
+
upload: "lucide:upload",
|
|
26
|
+
file: "lucide:file",
|
|
27
|
+
folder: "lucide:folder",
|
|
28
|
+
folderOpen: "lucide:folder-open",
|
|
29
|
+
// ─── Table sort ───
|
|
30
|
+
sortAsc: "lucide:arrow-up-narrow-wide",
|
|
31
|
+
sortDesc: "lucide:arrow-down-wide-narrow",
|
|
32
|
+
sortOff: "lucide:arrow-up-down"
|
|
33
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './boolean/index.js';
|
|
2
2
|
export * from './color/index.js';
|
|
3
|
+
export * from './const/index.js';
|
|
3
4
|
export * from './css/index.js';
|
|
4
5
|
export * from './date/index.js';
|
|
5
|
-
export * from './icons/index.js';
|
|
6
6
|
export * from './style/index.js';
|
|
7
7
|
export * from './tree.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from "./boolean/index.js";
|
|
2
2
|
export * from "./color/index.js";
|
|
3
|
+
export * from "./const/index.js";
|
|
3
4
|
export * from "./css/index.js";
|
|
4
5
|
export * from "./date/index.js";
|
|
5
|
-
export * from "./icons/index.js";
|
|
6
6
|
export * from "./style/index.js";
|
|
7
7
|
export * from "./tree.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DEFAULT_GRADIENT } from "../color/const.js";
|
|
2
1
|
import { getGradient, getGradientOutline } from "../color/get-gradient.js";
|
|
3
2
|
import { getThemeColor, parseThemeColor } from "../color/parse-theme-color.js";
|
|
3
|
+
import { DEFAULT_GRADIENT } from "../const/index.js";
|
|
4
4
|
export function createVariantColorResolver({
|
|
5
5
|
color = "primary",
|
|
6
6
|
variant,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nuance-ui",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "A modern
|
|
3
|
+
"version": "0.2.35",
|
|
4
|
+
"description": "A modern Nuxt UI library inspired by the best of the React ecosystem.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/Igor-Iugin/nuance-ui.git"
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@antfu/eslint-config": "^8.2.0",
|
|
81
|
+
"@nuxt/icon": "^2.2.1",
|
|
81
82
|
"@nuxt/devtools": "^3.1.1",
|
|
82
83
|
"@nuxt/eslint": "1.10.0",
|
|
83
84
|
"@nuxt/eslint-config": "^1.13.0",
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export const DEFAULT_ICONS = {
|
|
2
|
-
// ─── Actions ───
|
|
3
|
-
close: "gravity-ui:xmark",
|
|
4
|
-
check: "gravity-ui:check",
|
|
5
|
-
minus: "gravity-ui:minus",
|
|
6
|
-
plus: "gravity-ui:plus",
|
|
7
|
-
// ─── Chevrons ───
|
|
8
|
-
chevronRight: "gravity-ui:chevron-right",
|
|
9
|
-
chevronLeft: "gravity-ui:chevron-left",
|
|
10
|
-
chevronDown: "gravity-ui:chevron-down",
|
|
11
|
-
chevronUp: "gravity-ui:chevron-up",
|
|
12
|
-
selectExpand: "gravity-ui:chevrons-expand-vertical",
|
|
13
|
-
// ─── Inputs ───
|
|
14
|
-
email: "gravity-ui:at",
|
|
15
|
-
passwordShow: "gravity-ui:eye",
|
|
16
|
-
passwordHide: "gravity-ui:eye-slash",
|
|
17
|
-
calendar: "gravity-ui:calendar",
|
|
18
|
-
clock: "gravity-ui:clock",
|
|
19
|
-
// ─── User ───
|
|
20
|
-
person: "gravity-ui:person",
|
|
21
|
-
// ─── Theme ───
|
|
22
|
-
sun: "gravity-ui:sun",
|
|
23
|
-
moon: "gravity-ui:moon",
|
|
24
|
-
// ─── Files & tree ───
|
|
25
|
-
upload: "gravity-ui:arrow-shape-up-from-line",
|
|
26
|
-
file: "gravity-ui:file",
|
|
27
|
-
folder: "gravity-ui:folder",
|
|
28
|
-
folderOpen: "gravity-ui:folder-open",
|
|
29
|
-
// ─── Table sort ───
|
|
30
|
-
sortAsc: "gravity-ui:bars-descending-align-left-arrow-up",
|
|
31
|
-
sortDesc: "gravity-ui:bars-descending-align-left-arrow-down",
|
|
32
|
-
sortOff: "gravity-ui:bars-descending-align-left"
|
|
33
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './default-icons.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./default-icons.js";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|