@v1nt1248/3nclient-lib 0.1.16 → 0.1.18

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.
Files changed (47) hide show
  1. package/README.md +22 -6
  2. package/dist/components/ui3n-badge/ui3n-badge-simple.vue.d.ts +5 -32
  3. package/dist/components/ui3n-badge/ui3n-badge.vue.d.ts +2 -31
  4. package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue.d.ts +5 -30
  5. package/dist/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue.d.ts +2 -25
  6. package/dist/components/ui3n-button/ui3n-button.vue.d.ts +10 -37
  7. package/dist/components/ui3n-checkbox/ui3n-checkbox.vue.d.ts +6 -39
  8. package/dist/components/ui3n-chip/ui3n-chip.vue.d.ts +5 -40
  9. package/dist/components/ui3n-dialog/ui3n-dialog.vue.d.ts +8 -8
  10. package/dist/components/ui3n-drop-files/ui3n-drop-files.vue.d.ts +5 -30
  11. package/dist/components/ui3n-emoji/ui3n-emoji.vue.d.ts +5 -28
  12. package/dist/components/ui3n-icon/types.d.ts +1 -4
  13. package/dist/components/ui3n-icon/ui3n-icon.vue.d.ts +6 -35
  14. package/dist/components/ui3n-input/ui3n-input.vue.d.ts +13 -22
  15. package/dist/components/ui3n-list/ui3n-list.vue.d.ts +3 -3
  16. package/dist/components/ui3n-menu/ui3n-menu.vue.d.ts +9 -40
  17. package/dist/components/ui3n-notification/ui3n-notification.vue.d.ts +2 -33
  18. package/dist/components/ui3n-progress/ui3n-progress-circular.vue.d.ts +2 -29
  19. package/dist/components/ui3n-progress/ui3n-progress-linear.vue.d.ts +2 -29
  20. package/dist/components/ui3n-radio-group/ui3n-radio.vue.d.ts +8 -39
  21. package/dist/components/ui3n-step-line-bar/ui3n-step-line-bar.vue.d.ts +2 -23
  22. package/dist/components/ui3n-switch/ui3n-switch.vue.d.ts +6 -31
  23. package/dist/components/ui3n-table/composables/useTable.d.ts +10 -4
  24. package/dist/components/ui3n-table/ui3n-table-sort-icon.vue.d.ts +1 -10
  25. package/dist/components/ui3n-table/ui3n-table.vue.d.ts +4 -4
  26. package/dist/components/ui3n-tabs/ui3n-tabs.vue.d.ts +5 -38
  27. package/dist/components/ui3n-text/ui3n-text.vue.d.ts +13 -42
  28. package/dist/components/ui3n-tooltip/ui3n-tooltip.vue.d.ts +9 -42
  29. package/dist/components/ui3n-virtual-scroll/ui3n-virtual-scroll.vue.d.ts +1 -1
  30. package/dist/index.d.ts +1 -0
  31. package/dist/plugins/types.d.ts +7 -0
  32. package/dist/style.css +1 -1
  33. package/dist/ui3n-components.js +9400 -10643
  34. package/dist/ui3n-plugins.d.ts +2 -1
  35. package/dist/ui3n-plugins.js +4084 -5327
  36. package/dist/variables.css +1 -1
  37. package/package.json +7 -8
  38. package/src/components/index.ts +1 -0
  39. package/src/components/ui3n-chip/ui3n-chip.vue +1 -1
  40. package/src/components/ui3n-dialog/ui3n-dialog.vue +1 -1
  41. package/src/components/ui3n-icon/types.ts +1 -4
  42. package/src/components/ui3n-icon/ui3n-icon.vue +21 -21
  43. package/src/components/ui3n-input/ui3n-input.vue +3 -2
  44. package/src/components/ui3n-notification/ui3n-notification.vue +3 -3
  45. package/src/components/ui3n-table/ui3n-table-sort-icon.vue +2 -2
  46. package/src/components/ui3n-tabs/ui3n-tabs.vue +12 -12
  47. package/src/components/ui3n-text/ui3n-text.vue +1 -0
@@ -71,7 +71,7 @@
71
71
  --grey-0: #fcfcfd;
72
72
  --grey-5: #eff0f1;
73
73
  --grey-10: #e1e3e6;
74
- --grey-15: #d4d6da;
74
+ --grey-15: #d4d6da;
75
75
  --grey-20: #c6cacf;
76
76
  --grey-30: #abb0b8;
77
77
  --grey-40: #9197a0;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@v1nt1248/3nclient-lib",
3
3
  "license": "AGPL-3.0-or-later",
4
4
  "author": "v1nt1248",
5
- "version": "0.1.16",
5
+ "version": "0.1.18",
6
6
  "description": "Library for 3NWeb clients",
7
7
  "type": "module",
8
8
  "files": [
@@ -32,6 +32,7 @@
32
32
  "generate:types": "vue-tsc --declaration --emitDeclarationOnly --outdir ./dist",
33
33
  "copy:dts": "cp ./src/types.d.ts ./dist",
34
34
  "copy:css": "cp ./src/assets/styles/variables.css ./dist",
35
+ "copy:icons:css": "cp ./src/assets/styles/icons.css ./dist",
35
36
  "clean:dist": "rm -rf dist/",
36
37
  "build:components": "LIB_NAME=lib vite build",
37
38
  "build:plugins": "LIB_NAME=plugins vite build",
@@ -51,8 +52,6 @@
51
52
  },
52
53
  "dependencies": {
53
54
  "@floating-ui/vue": "^1.1.4",
54
- "@iconify-icons/ic": "1.2.13",
55
- "@iconify/vue": "4.1.2",
56
55
  "dayjs": "1.11.12",
57
56
  "lodash": "4.17.21",
58
57
  "mitt": "3.0.1",
@@ -61,8 +60,8 @@
61
60
  "vuedraggable": "^4.1.0"
62
61
  },
63
62
  "peerDependencies": {
64
- "pinia": "2.2.1",
65
- "vue": "3.4.38"
63
+ "pinia": "2.2.2",
64
+ "vue": "3.5.5"
66
65
  },
67
66
  "devDependencies": {
68
67
  "@types/lodash": "4.17.5",
@@ -71,9 +70,9 @@
71
70
  "@typescript-eslint/eslint-plugin": "8.0.1",
72
71
  "@typescript-eslint/parser": "8.0.1",
73
72
  "@vitejs/plugin-vue": "5.1.2",
74
- "@vue/compiler-core": "3.4.38",
73
+ "@vue/compiler-core": "3.5.5",
75
74
  "@vue/eslint-config-typescript": "13.0.0",
76
- "@vue/runtime-core": "3.4.38",
75
+ "@vue/runtime-core": "3.5.5",
77
76
  "@vuedx/typescript-plugin-vue": "0.7.6",
78
77
  "eslint": "9.9.0",
79
78
  "eslint-config-prettier": "^9.1.0",
@@ -99,7 +98,7 @@
99
98
  "vite-plugin-dts": "4.0.2",
100
99
  "vite-plugin-vue-devtools": "^7.3.7",
101
100
  "vitepress": "1.3.2",
102
- "vue": "3.4.38",
101
+ "vue": "3.5.5",
103
102
  "vue-tsc": "2.0.29"
104
103
  },
105
104
  "packageManager": "pnpm@9.7.0",
@@ -1,3 +1,4 @@
1
+ import '../assets/styles/icons.css';
1
2
  import Ui3nIcon from './ui3n-icon/ui3n-icon.vue';
2
3
  import type { Ui3nIconProps, Ui3nIconEmits } from './ui3n-icon/types';
3
4
  import Ui3nButton from './ui3n-button/ui3n-button.vue';
@@ -56,7 +56,7 @@ const hasLeftSlot = computed(() => !!slots.left);
56
56
  type="icon"
57
57
  size="small"
58
58
  color="transparent"
59
- icon="close"
59
+ icon="round-close"
60
60
  icon-color="var(--color-icon-control-primary-default)"
61
61
  @click="emits('close')"
62
62
  />
@@ -137,7 +137,7 @@ const handleEvent = (event: Event, eventName: Ui3nDialogEvent) => {
137
137
  type="icon"
138
138
  size="small"
139
139
  color="transparent"
140
- icon="close"
140
+ icon="round-close"
141
141
  icon-size="16"
142
142
  icon-color="var(--color-icon-control-primary-default)"
143
143
  @click="closeDialog({ ev: $event })"
@@ -1,15 +1,12 @@
1
1
  export interface Ui3nIconProps {
2
2
  icon: string;
3
3
  title?: string;
4
- inline?: boolean;
5
4
  width?: string | number;
6
5
  height?: string | number;
6
+ color?: string;
7
7
  horizontalFlip?: boolean;
8
8
  verticalFlip?: boolean;
9
- flip?: string;
10
9
  rotate?: number;
11
- color?: string;
12
- onLoad?: Function;
13
10
  }
14
11
 
15
12
  export interface Ui3nIconEmits {
@@ -1,6 +1,5 @@
1
1
  <script lang="ts" setup>
2
2
  import { computed } from 'vue';
3
- import { Icon } from '@iconify/vue';
4
3
  import type { Ui3nIconEmits, Ui3nIconProps } from './types';
5
4
 
6
5
  const props = withDefaults(
@@ -15,13 +14,23 @@ const props = withDefaults(
15
14
  );
16
15
  const emits = defineEmits<Ui3nIconEmits>();
17
16
 
18
- const iconName = computed(() => `ic:${props.icon}`);
19
-
20
- function onLoad(value: unknown) {
21
- if (props.onLoad) {
22
- props.onLoad(value);
17
+ const iconClass = computed(() => `ui3n-icon__${props.icon}`);
18
+ const iconStyle = computed(() => {
19
+ const value: Record<string, string> = {
20
+ width: `${props.width}px`,
21
+ height: `${props.height}px`,
22
+ color: props.color,
23
+ };
24
+ const transformData = [];
25
+ props.horizontalFlip && transformData.push('rotateY(180deg)');
26
+ props.verticalFlip && transformData.push('rotateX(180deg)');
27
+ props.rotate && transformData.push(`rotate(${props.rotate}deg)`);
28
+ if (transformData.length) {
29
+ value.transform = transformData.join(' ');
23
30
  }
24
- }
31
+
32
+ return value;
33
+ });
25
34
 
26
35
  function onClick(ev: Event) {
27
36
  emits('click', ev);
@@ -29,24 +38,15 @@ function onClick(ev: Event) {
29
38
  </script>
30
39
 
31
40
  <template>
32
- <icon
33
- :class="$style.icon"
34
- :icon="iconName"
41
+ <div
42
+ :class="['ui3n-icon', iconClass]"
35
43
  :title="title"
36
- :inline="inline"
37
- :width="width"
38
- :height="height"
39
- :horizontal-flip="horizontalFlip"
40
- :vertical-flip="verticalFlip"
41
- :flip="flip"
42
- :rotate="rotate"
43
- :color="color"
44
- :on-load="onLoad"
44
+ :style="iconStyle"
45
45
  @click="onClick"
46
- />
46
+ ></div>
47
47
  </template>
48
48
 
49
- <style lang="scss" module>
49
+ <style lang="scss">
50
50
  .icon {
51
51
  min-width: v-bind(width);
52
52
  min-height: v-bind(height);
@@ -140,7 +140,7 @@ const validate = (text: string) => {
140
140
  type="icon"
141
141
  size="small"
142
142
  color="transparent"
143
- icon="close"
143
+ icon="round-close"
144
144
  icon-size="16"
145
145
  icon-color="var(--color-icon-control-accent-default)"
146
146
  :class="$style.clearBtn"
@@ -149,7 +149,7 @@ const validate = (text: string) => {
149
149
 
150
150
  <ui3n-icon
151
151
  v-if="displayStateMode === 'success' && displayStateWithIcon && !isFocused"
152
- icon="sharp-check-circle-outline"
152
+ icon="round-check-circle-outline"
153
153
  :width="16"
154
154
  :height="16"
155
155
  color="var(--success-content-default)"
@@ -179,6 +179,7 @@ const validate = (text: string) => {
179
179
 
180
180
  position: relative;
181
181
  width: 100%;
182
+ padding: 1px;
182
183
  border-radius: var(--spacing-xs);
183
184
 
184
185
  &:hover {
@@ -33,13 +33,13 @@ const stylesByTypes = {
33
33
  color: 'var(--info-content-default)',
34
34
  icon: 'round-info',
35
35
  iconColor: 'var(--info-fill-default)',
36
- iconRotate: 90,
36
+ iconRotate: 180,
37
37
  },
38
38
  error: {
39
39
  color: 'var(--error-content-default)',
40
40
  icon: 'round-info',
41
41
  iconColor: 'var(--error-fill-default)',
42
- iconRotate: 90,
42
+ iconRotate: 180,
43
43
  },
44
44
  };
45
45
 
@@ -81,7 +81,7 @@ const closeNotification = () => {
81
81
  type="icon"
82
82
  size="small"
83
83
  color="transparent"
84
- icon="close"
84
+ icon="round-close"
85
85
  :icon-color="stylesByTypes[type].color"
86
86
  :class="$style.closeBtn"
87
87
  @click="closeNotification"
@@ -12,8 +12,8 @@
12
12
  <template>
13
13
  <transition mode="out-in" name="fade">
14
14
  <ui3n-icon
15
- :key="value === 'asc' ? 'baseline-arrow-downward' : 'baseline-arrow-upward'"
16
- :icon="value === 'asc' ? 'baseline-arrow-downward' : 'baseline-arrow-upward'"
15
+ :key="value === 'asc' ? 'round-arrow-downward' : 'round-arrow-upward'"
16
+ :icon="value === 'asc' ? 'round-arrow-downward' : 'round-arrow-upward'"
17
17
  :width="iconSize"
18
18
  :height="iconSize"
19
19
  :color="iconColor"
@@ -22,11 +22,11 @@ const $style = useCssModule();
22
22
  const tabs = ref<HTMLDivElement | null>(null);
23
23
  const children = ref<HTMLCollection | null>(null);
24
24
 
25
- const activeColor = computed(() => props.activeColor);
26
- const inactiveColor = computed(() => props.inactiveColor);
27
- const indicatorColor = computed(() => props.indicatorColor);
28
- const indicatorSize = computed(() => `${props.indicatorSize}px`);
29
- const indicatorPosition = computed(() => props.indicatorPosition === 'reverse' ? '100%' : '0');
25
+ const activeColorValue = computed(() => props.activeColor);
26
+ const inactiveColorValue = computed(() => props.inactiveColor);
27
+ const indicatorColorValue = computed(() => props.indicatorColor);
28
+ const indicatorSizeValue = computed(() => `${props.indicatorSize}px`);
29
+ const indicatorPositionValue = computed(() => props.indicatorPosition === 'reverse' ? '100%' : '0');
30
30
 
31
31
  watch(
32
32
  () => props.modelValue,
@@ -100,7 +100,7 @@ const onClick = (ev: MouseEvent) => {
100
100
  cursor: pointer;
101
101
  position: relative;
102
102
  user-select: none;
103
- color: v-bind('inactiveColor');
103
+ color: v-bind(inactiveColorValue);
104
104
  @include ripple(var(--color-bg-control-secondary-default));
105
105
 
106
106
  &:hover {
@@ -112,8 +112,8 @@ const onClick = (ev: MouseEvent) => {
112
112
  content: '';
113
113
  left: 0;
114
114
  width: 100%;
115
- bottom: v-bind('indicatorPosition');
116
- height: v-bind('indicatorSize');
115
+ bottom: v-bind(indicatorPositionValue);
116
+ height: v-bind(indicatorSizeValue);
117
117
  background-color: transparent;
118
118
  transition: background-color 250ms ease-in-out;
119
119
  }
@@ -126,10 +126,10 @@ const onClick = (ev: MouseEvent) => {
126
126
  }
127
127
 
128
128
  .active {
129
- color: v-bind('activeColor');
129
+ color: v-bind(activeColorValue);
130
130
 
131
131
  &::after {
132
- background-color: v-bind('indicatorColor');
132
+ background-color: v-bind(indicatorColorValue);
133
133
  transition: background-color 250ms ease-in-out;
134
134
  }
135
135
  }
@@ -140,8 +140,8 @@ const onClick = (ev: MouseEvent) => {
140
140
 
141
141
  .item {
142
142
  &::after {
143
- left: v-bind('indicatorPosition');
144
- width: v-bind('indicatorSize');
143
+ left: v-bind(indicatorPositionValue);
144
+ width: v-bind(indicatorSizeValue);
145
145
  bottom: 0;
146
146
  height: 100%;
147
147
  }
@@ -101,6 +101,7 @@ const onInput = (ev: Event) => {
101
101
  position: relative;
102
102
  width: 100%;
103
103
  border-radius: var(--spacing-xs);
104
+ padding: 1px;
104
105
  }
105
106
 
106
107
  .label {