@v1nt1248/3nclient-lib 0.0.39 → 0.0.41
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/README.md +2 -0
- package/dist/components/index.d.ts +5 -1
- package/dist/components/ui3n-breadcrumb.vue.d.ts +52 -0
- package/dist/components/ui3n-breadcrumbs.vue.d.ts +39 -0
- package/dist/components/ui3n-checkbox.vue.d.ts +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/stories/Ui3nBreadcrumbs.stories.d.ts +252 -0
- package/dist/stories/Ui3nCheckbox.stories.d.ts +19 -19
- package/dist/style.css +1 -1
- package/dist/ui-3n-lib.js +3540 -3470
- package/package.json +37 -38
- package/src/components/index.ts +10 -0
- package/src/components/ui3n-breadcrumb.vue +103 -0
- package/src/components/ui3n-breadcrumbs.vue +28 -0
package/package.json
CHANGED
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
"name": "@v1nt1248/3nclient-lib",
|
|
3
3
|
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"author": "v1nt1248",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.41",
|
|
6
6
|
"description": "Library for 3NWeb clients",
|
|
7
|
-
"private": false,
|
|
8
7
|
"type": "module",
|
|
9
8
|
"files": [
|
|
10
9
|
"dist",
|
|
@@ -39,59 +38,59 @@
|
|
|
39
38
|
"dayjs": "^1.11.10",
|
|
40
39
|
"lodash": "^4.17.21",
|
|
41
40
|
"mitt": "^3.0.1",
|
|
42
|
-
"sanitize-html": "^2.
|
|
41
|
+
"sanitize-html": "^2.12.1",
|
|
43
42
|
"tslib": "^2.6.2"
|
|
44
43
|
},
|
|
45
44
|
"peerDependencies": {
|
|
46
45
|
"pinia": "^2.1.7",
|
|
47
|
-
"vue": "^3.4.
|
|
46
|
+
"vue": "^3.4.21"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@storybook/addon-actions": "^
|
|
51
|
-
"@storybook/addon-docs": "^
|
|
52
|
-
"@storybook/addon-essentials": "^
|
|
53
|
-
"@storybook/addon-interactions": "^
|
|
54
|
-
"@storybook/addon-links": "^
|
|
55
|
-
"@storybook/blocks": "^
|
|
56
|
-
"@storybook/builder-vite": "^
|
|
49
|
+
"@storybook/addon-actions": "^8.0.2",
|
|
50
|
+
"@storybook/addon-docs": "^8.0.2",
|
|
51
|
+
"@storybook/addon-essentials": "^8.0.2",
|
|
52
|
+
"@storybook/addon-interactions": "^8.0.2",
|
|
53
|
+
"@storybook/addon-links": "^8.0.2",
|
|
54
|
+
"@storybook/blocks": "^8.0.2",
|
|
55
|
+
"@storybook/builder-vite": "^8.0.2",
|
|
57
56
|
"@storybook/testing-library": "^0.2.2",
|
|
58
|
-
"@storybook/vue3": "^
|
|
59
|
-
"@storybook/vue3-vite": "^
|
|
60
|
-
"@types/lodash": "^4.
|
|
61
|
-
"@types/node": "^20.
|
|
62
|
-
"@types/sanitize-html": "^2.
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
64
|
-
"@typescript-eslint/parser": "^
|
|
65
|
-
"@vitejs/plugin-vue": "^
|
|
66
|
-
"@vue/compiler-core": "^3.4.
|
|
67
|
-
"@vue/eslint-config-typescript": "^
|
|
57
|
+
"@storybook/vue3": "^8.0.2",
|
|
58
|
+
"@storybook/vue3-vite": "^8.0.2",
|
|
59
|
+
"@types/lodash": "^4.17.0",
|
|
60
|
+
"@types/node": "^20.11.30",
|
|
61
|
+
"@types/sanitize-html": "^2.11.0",
|
|
62
|
+
"@typescript-eslint/eslint-plugin": "^7.3.1",
|
|
63
|
+
"@typescript-eslint/parser": "^7.3.1",
|
|
64
|
+
"@vitejs/plugin-vue": "^5.0.4",
|
|
65
|
+
"@vue/compiler-core": "^3.4.21",
|
|
66
|
+
"@vue/eslint-config-typescript": "^13.0.0",
|
|
68
67
|
"@vuedx/typescript-plugin-vue": "^0.7.6",
|
|
69
|
-
"eslint": "^8.
|
|
68
|
+
"eslint": "^8.57.0",
|
|
70
69
|
"eslint-plugin-import": "^2.29.1",
|
|
71
70
|
"eslint-plugin-node": "^11.1.0",
|
|
72
71
|
"eslint-plugin-promise": "^6.1.1",
|
|
73
|
-
"eslint-plugin-storybook": "^0.
|
|
74
|
-
"eslint-plugin-vue": "^9.
|
|
72
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
73
|
+
"eslint-plugin-vue": "^9.23.0",
|
|
75
74
|
"jackspeak": "^2.3.6",
|
|
76
75
|
"path": "^0.12.7",
|
|
77
76
|
"pinia": "^2.1.7",
|
|
78
|
-
"postcss-html": "^1.
|
|
77
|
+
"postcss-html": "^1.6.0",
|
|
79
78
|
"react": "^18.2.0",
|
|
80
79
|
"react-dom": "^18.2.0",
|
|
81
|
-
"sass": "^1.
|
|
82
|
-
"storybook": "^
|
|
83
|
-
"stylelint": "^
|
|
84
|
-
"stylelint-config-recommended-scss": "^
|
|
80
|
+
"sass": "^1.72.0",
|
|
81
|
+
"storybook": "^8.0.2",
|
|
82
|
+
"stylelint": "^16.2.1",
|
|
83
|
+
"stylelint-config-recommended-scss": "^14.0.0",
|
|
85
84
|
"stylelint-config-recommended-vue": "^1.5.0",
|
|
86
|
-
"stylelint-config-standard": "^
|
|
85
|
+
"stylelint-config-standard": "^36.0.0",
|
|
87
86
|
"stylelint-rscss": "^0.4.0",
|
|
88
|
-
"stylelint-scss": "^
|
|
89
|
-
"typescript": "^5.
|
|
90
|
-
"vite": "^5.
|
|
91
|
-
"vite-plugin-css-injected-by-js": "^3.
|
|
92
|
-
"vite-plugin-dts": "^3.7.
|
|
93
|
-
"vue": "^3.4.
|
|
94
|
-
"vue-tsc": "^
|
|
87
|
+
"stylelint-scss": "^6.2.1",
|
|
88
|
+
"typescript": "^5.4.2",
|
|
89
|
+
"vite": "^5.2.2",
|
|
90
|
+
"vite-plugin-css-injected-by-js": "^3.5.0",
|
|
91
|
+
"vite-plugin-dts": "^3.7.3",
|
|
92
|
+
"vue": "^3.4.21",
|
|
93
|
+
"vue-tsc": "^2.0.7"
|
|
95
94
|
},
|
|
96
|
-
"packageManager": "yarn@
|
|
95
|
+
"packageManager": "yarn@4.1.1"
|
|
97
96
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -31,6 +31,10 @@ import Ui3nTabs from './ui3n-tabs.vue'
|
|
|
31
31
|
import type { Ui3nTabsProps, Ui3nTabsEmits, Ui3nTabsSlots } from './ui3n-tabs.vue'
|
|
32
32
|
import Ui3nBadge from './ui3n-badge.vue'
|
|
33
33
|
import type { Ui3nBadgeProps } from './ui3n-badge.vue'
|
|
34
|
+
import Ui3nBreadcrumb from './ui3n-breadcrumb.vue'
|
|
35
|
+
import type { Ui3nBreadcrumdProps, Ui3nBreadcrumdEmits, Ui3nBreadcrumdSlots } from './ui3n-breadcrumb.vue'
|
|
36
|
+
import Ui3nBreadcrumbs from './ui3n-breadcrumbs.vue'
|
|
37
|
+
import type { Ui3nBreadcrumdsProps } from './ui3n-breadcrumbs.vue'
|
|
34
38
|
|
|
35
39
|
export {
|
|
36
40
|
Ui3nIcon,
|
|
@@ -87,4 +91,10 @@ export {
|
|
|
87
91
|
Ui3nTabsSlots,
|
|
88
92
|
Ui3nBadge,
|
|
89
93
|
Ui3nBadgeProps,
|
|
94
|
+
Ui3nBreadcrumb,
|
|
95
|
+
Ui3nBreadcrumdProps,
|
|
96
|
+
Ui3nBreadcrumdEmits,
|
|
97
|
+
Ui3nBreadcrumdSlots,
|
|
98
|
+
Ui3nBreadcrumbs,
|
|
99
|
+
Ui3nBreadcrumdsProps,
|
|
90
100
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, getCurrentInstance } from 'vue';
|
|
3
|
+
|
|
4
|
+
export interface Ui3nBreadcrumdProps {
|
|
5
|
+
separator?: string | undefined;
|
|
6
|
+
isActive?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface Ui3nBreadcrumdEmits {
|
|
10
|
+
(ev: 'click', value: Event): void;
|
|
11
|
+
}
|
|
12
|
+
export interface Ui3nBreadcrumdSlots {
|
|
13
|
+
separator: () => unknown;
|
|
14
|
+
default: () => unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const props = withDefaults(
|
|
18
|
+
defineProps<Ui3nBreadcrumdProps>(),
|
|
19
|
+
{
|
|
20
|
+
separator: undefined,
|
|
21
|
+
isActive: false,
|
|
22
|
+
disabled: false,
|
|
23
|
+
},
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const emits = defineEmits<Ui3nBreadcrumdEmits>()
|
|
27
|
+
defineSlots<Ui3nBreadcrumdSlots>()
|
|
28
|
+
|
|
29
|
+
const separatorValue = computed(() => {
|
|
30
|
+
if (props.separator) {
|
|
31
|
+
return props.separator
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const instance = getCurrentInstance()
|
|
35
|
+
return instance?.parent?.props.separator || '/'
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
const parentDisabled = computed(() => {
|
|
39
|
+
const instance = getCurrentInstance()
|
|
40
|
+
return instance?.parent?.props.disabled || false;
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
const onClick = (ev: Event) => {
|
|
44
|
+
emits('click', ev);
|
|
45
|
+
}
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<div
|
|
50
|
+
:class="[
|
|
51
|
+
'ui3n-breadcrumb',
|
|
52
|
+
{
|
|
53
|
+
'ui3n-breadcrumb--active': isActive,
|
|
54
|
+
'ui3n-breadcrumb--disabled': disabled || parentDisabled,
|
|
55
|
+
},
|
|
56
|
+
]"
|
|
57
|
+
v-on="isActive && !(disabled || parentDisabled) ? { click: onClick } : {}"
|
|
58
|
+
>
|
|
59
|
+
<slot />
|
|
60
|
+
<div
|
|
61
|
+
v-if="isActive"
|
|
62
|
+
class="ui3n-breadcrumb__separator"
|
|
63
|
+
>
|
|
64
|
+
<slot name="separator">
|
|
65
|
+
<span>{{ separatorValue }}</span>
|
|
66
|
+
</slot>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.ui3n-breadcrumb {
|
|
73
|
+
--ui3n-breadcrumb-font-size: 16px;
|
|
74
|
+
--ui3n-breadcrumb-color-default: var(--black-90, #212121);
|
|
75
|
+
--ui3n-breadcrumb-color-selected: var(--blue-main, #0090ec);
|
|
76
|
+
|
|
77
|
+
position: relative;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
|
|
81
|
+
&__separator {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
margin: 0 var(--base-size, 8px);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&--active {
|
|
88
|
+
font-size: var(--ui3n-breadcrumb-font-size);
|
|
89
|
+
line-height: 1.25;
|
|
90
|
+
color: var(--ui3n-breadcrumb-color-default);
|
|
91
|
+
|
|
92
|
+
&:hover {
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
color: var(--ui3n-breadcrumb-color-selected);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--disabled {
|
|
99
|
+
cursor: default;
|
|
100
|
+
pointer-events: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
export interface Ui3nBreadcrumdsProps {
|
|
3
|
+
separator?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
withDefaults(
|
|
8
|
+
defineProps<Ui3nBreadcrumdsProps>(),
|
|
9
|
+
{
|
|
10
|
+
separator: '/',
|
|
11
|
+
disabled: false,
|
|
12
|
+
},
|
|
13
|
+
)
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div :class="['ui3n-breadcrumbs']">
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<style lang="scss" scoped>
|
|
23
|
+
.ui3n-breadcrumbs {
|
|
24
|
+
position: relative;
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
}
|
|
28
|
+
</style>
|