@v1nt1248/3nclient-lib 0.3.50 → 0.4.0

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 (55) hide show
  1. package/README.md +2 -0
  2. package/dist/chunks/{ui3n-notification-o0tuhTpO.js → ui3n-notification-CTYQV3nR.js} +38 -37
  3. package/dist/src/components/ui3n-chip/ui3n-chip.d.ts +0 -5
  4. package/dist/src/components/ui3n-icon/ui3n-icon.d.ts +0 -1
  5. package/dist/src/components/ui3n-progress/ui3n-progress-circular.d.ts +0 -2
  6. package/dist/src/components/ui3n-progress/ui3n-progress-linear.d.ts +0 -2
  7. package/dist/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.d.ts +0 -7
  8. package/dist/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.d.ts +0 -7
  9. package/dist/src/components/ui3n-slider/ui3n-slider.d.ts +0 -5
  10. package/dist/src/components/ui3n-tabs/ui3n-tabs.d.ts +0 -4
  11. package/dist/src/components/ui3n-tooltip/ui3n-tooltip.d.ts +0 -3
  12. package/dist/style.css +1 -1
  13. package/dist/ui3n-components.js +1698 -1749
  14. package/dist/ui3n-plugins.js +3 -2
  15. package/dist/variables.css +1 -0
  16. package/package.json +11 -4
  17. package/src/components/ui3n-autocomplete/ui3n-autocomplete.vue +28 -25
  18. package/src/components/ui3n-badge/ui3n-badge-simple.vue +18 -17
  19. package/src/components/ui3n-badge/ui3n-badge.vue +3 -2
  20. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumb.vue +11 -10
  21. package/src/components/ui3n-breadcrumbs/ui3n-breadcrumbs.vue +4 -1
  22. package/src/components/ui3n-button/ui3n-button.vue +244 -158
  23. package/src/components/ui3n-checkbox/ui3n-checkbox.vue +22 -21
  24. package/src/components/ui3n-chip/ui3n-chip.vue +56 -40
  25. package/src/components/ui3n-dialog/ui3n-dialog-provider.vue +2 -0
  26. package/src/components/ui3n-dialog/ui3n-dialog.vue +19 -18
  27. package/src/components/ui3n-drop-files/ui3n-drop-files.vue +8 -7
  28. package/src/components/ui3n-editable/ui3n-content-editable.vue +11 -10
  29. package/src/components/ui3n-editable/ui3n-editable.vue +26 -25
  30. package/src/components/ui3n-emoji/ui3n-emoji.vue +7 -6
  31. package/src/components/ui3n-icon/ui3n-icon.vue +26 -16
  32. package/src/components/ui3n-input/ui3n-input.vue +36 -32
  33. package/src/components/ui3n-input-file/ui3n-input-file.vue +8 -5
  34. package/src/components/ui3n-list/ui3n-list.vue +8 -7
  35. package/src/components/ui3n-menu/ui3n-menu.vue +6 -5
  36. package/src/components/ui3n-mobile-menu/ui3n-mobile-menu.vue +4 -3
  37. package/src/components/ui3n-mobile-menu-item/ui3n-mobile-menu-item.vue +7 -6
  38. package/src/components/ui3n-notification/ui3n-notification-container.vue +2 -0
  39. package/src/components/ui3n-notification/ui3n-notification.vue +28 -26
  40. package/src/components/ui3n-progress/ui3n-progress-circular.vue +32 -19
  41. package/src/components/ui3n-progress/ui3n-progress-linear.vue +31 -18
  42. package/src/components/ui3n-radio-group/ui3n-radio-group.vue +4 -1
  43. package/src/components/ui3n-radio-group/ui3n-radio.vue +6 -5
  44. package/src/components/ui3n-scrollbar/ui3n-scrollbar.vue +94 -83
  45. package/src/components/ui3n-scrollbar-horizontal/ui3n-scrollbar-horizontal.vue +51 -39
  46. package/src/components/ui3n-scrollbar-vertical/ui3n-scrollbar-vertical.vue +51 -39
  47. package/src/components/ui3n-selector/ui3n-selector.vue +33 -28
  48. package/src/components/ui3n-slider/ui3n-slider.vue +53 -34
  49. package/src/components/ui3n-step-line-bar/ui3n-step-line-bar.vue +10 -6
  50. package/src/components/ui3n-switch/ui3n-switch.vue +23 -22
  51. package/src/components/ui3n-table/ui3n-table.vue +50 -48
  52. package/src/components/ui3n-tabs/ui3n-tabs.vue +38 -20
  53. package/src/components/ui3n-text/ui3n-text.vue +15 -14
  54. package/src/components/ui3n-tooltip/ui3n-tooltip-old.vue +14 -11
  55. package/src/components/ui3n-tooltip/ui3n-tooltip.vue +38 -27
package/README.md CHANGED
@@ -120,6 +120,8 @@ import '@v1nt1248/3nclient-lib/style.css';
120
120
 
121
121
  `variables.css` contains design tokens only (palette, theme semantics, `--color-*` mapping). Light tokens and the color mapping are applied on `:root`, so `<html>` classes are **not** required for the default (light) look.
122
122
 
123
+ Every component also has CSS variables of its own, which you can set on `:root`, on a container or on the element through its `data-ui3n` attribute. See [Styling](docs/guide/styling.md) for how they work, and a component's documentation page for the ones it has.
124
+
123
125
  `.default-theme` is a deprecated alias of `.light-theme`.
124
126
 
125
127
  To start with another theme or switch at runtime:
@@ -39,19 +39,17 @@ var T = {
39
39
  size: {},
40
40
  width: {},
41
41
  height: {},
42
- color: { default: "var(--color-icon-control-primary-default)" },
42
+ color: {},
43
43
  horizontalFlip: { type: Boolean },
44
44
  verticalFlip: { type: Boolean },
45
45
  rotate: { default: 0 }
46
46
  },
47
47
  emits: ["click"],
48
48
  setup(e, { emit: n }) {
49
- let r = e, a = n, o = t(() => r.size || r.width || 16), s = t(() => r.size || r.height || 16), l = t(() => {
50
- let e = {
51
- "--ui3n-icon-width": u(o.value),
52
- "--ui3n-icon-height": u(s.value),
53
- "--ui3n-icon-color": r.color
54
- }, t = [];
49
+ let r = e, a = n, o = t(() => r.size || r.width), s = t(() => r.size || r.height), l = t(() => {
50
+ let e = {};
51
+ o.value !== void 0 && (e["--ui3n-icon-width"] = u(o.value)), s.value !== void 0 && (e["--ui3n-icon-height"] = u(s.value)), r.color && (e["--ui3n-icon-color"] = r.color);
52
+ let t = [];
55
53
  return r.horizontalFlip && t.push("rotateY(180deg)"), r.verticalFlip && t.push("rotateX(180deg)"), r.rotate && t.push(`rotate(${r.rotate}deg)`), t.length && (e.transform = t.join(" ")), e;
56
54
  });
57
55
  function u(e) {
@@ -59,12 +57,13 @@ var T = {
59
57
  }
60
58
  return (t, n) => (p(), i("div", c({
61
59
  id: e.id,
60
+ "data-ui3n": "icon",
62
61
  class: t.$style.ui3nIcon,
63
62
  title: e.title,
64
63
  style: l.value
65
64
  }, { "data-icon": e.icon }, { onClick: n[0] ||= (e) => a("click", e) }), null, 16, E));
66
65
  }
67
- }), O = { ui3nIcon: "_ui3nIcon_10yhz_1" }, k = (e, t) => {
66
+ }), O = { ui3nIcon: "_ui3nIcon_pfn1q_1" }, k = (e, t) => {
68
67
  let n = e.__vccOpts || e;
69
68
  for (let [e, r] of t) n[e] = r;
70
69
  return n;
@@ -121,6 +120,7 @@ var T = {
121
120
  ref_key: "buttonEl",
122
121
  ref: d,
123
122
  id: e.id,
123
+ "data-ui3n": "button",
124
124
  class: l(g.value),
125
125
  type: "button",
126
126
  disabled: e.disabled,
@@ -145,23 +145,23 @@ var T = {
145
145
  }, [h(t.$slots, "default")], 2))], 42, M)), [[_(o)]]);
146
146
  }
147
147
  }), [["__cssModules", { $style: {
148
- ui3nButton: "_ui3nButton_5lm0q_3",
149
- "withIcon-left": "_withIcon-left_5lm0q_35",
150
- "withIcon-right": "_withIcon-right_5lm0q_38",
151
- square: "_square_5lm0q_41",
152
- regular: "_regular_5lm0q_48",
153
- small: "_small_5lm0q_55",
154
- large: "_large_5lm0q_62",
155
- block: "_block_5lm0q_69",
156
- primary: "_primary_5lm0q_73",
157
- elevation: "_elevation_5lm0q_96",
158
- text: "_text_5lm0q_101",
159
- secondary: "_secondary_5lm0q_133",
160
- tertiary: "_tertiary_5lm0q_187",
161
- outline: "_outline_5lm0q_242",
162
- icon: "_icon_5lm0q_270",
163
- custom: "_custom_5lm0q_290",
164
- buttonIcon: "_buttonIcon_5lm0q_319"
148
+ ui3nButton: "_ui3nButton_1y5ej_3",
149
+ "withIcon-left": "_withIcon-left_1y5ej_43",
150
+ "withIcon-right": "_withIcon-right_1y5ej_46",
151
+ square: "_square_1y5ej_49",
152
+ regular: "_regular_1y5ej_57",
153
+ small: "_small_1y5ej_67",
154
+ large: "_large_1y5ej_77",
155
+ block: "_block_1y5ej_87",
156
+ primary: "_primary_1y5ej_91",
157
+ elevation: "_elevation_1y5ej_117",
158
+ text: "_text_1y5ej_122",
159
+ secondary: "_secondary_1y5ej_160",
160
+ tertiary: "_tertiary_1y5ej_232",
161
+ outline: "_outline_1y5ej_302",
162
+ icon: "_icon_1y5ej_340",
163
+ custom: "_custom_1y5ej_360",
164
+ buttonIcon: "_buttonIcon_1y5ej_392"
165
165
  } }]]), P = ["id"], F = /* @__PURE__ */ k(/* @__PURE__ */ s({
166
166
  __name: "ui3n-notification",
167
167
  props: {
@@ -225,6 +225,7 @@ var T = {
225
225
  m && clearTimeout(m);
226
226
  }), (e, t) => (p(), i("div", {
227
227
  id: s.id,
228
+ "data-ui3n": "notification",
228
229
  class: l(b.value),
229
230
  style: u(x.value)
230
231
  }, [
@@ -255,18 +256,18 @@ var T = {
255
256
  ], 14, P));
256
257
  }
257
258
  }), [["__cssModules", { $style: {
258
- ui3nNotification: "_ui3nNotification_1pr9s_1",
259
- withIcon: "_withIcon_1pr9s_23",
260
- ui3nNotificationIcon: "_ui3nNotificationIcon_1pr9s_27",
261
- ui3nNotificationContent: "_ui3nNotificationContent_1pr9s_40",
262
- closeBtn: "_closeBtn_1pr9s_50",
263
- infoType: "_infoType_1pr9s_58",
264
- successType: "_successType_1pr9s_69",
265
- warningType: "_warningType_1pr9s_80",
266
- errorType: "_errorType_1pr9s_91",
267
- leftPosition: "_leftPosition_1pr9s_102",
268
- centerPosition: "_centerPosition_1pr9s_107",
269
- rightPosition: "_rightPosition_1pr9s_112"
259
+ ui3nNotification: "_ui3nNotification_152ae_1",
260
+ withIcon: "_withIcon_152ae_24",
261
+ ui3nNotificationIcon: "_ui3nNotificationIcon_152ae_28",
262
+ ui3nNotificationContent: "_ui3nNotificationContent_152ae_41",
263
+ closeBtn: "_closeBtn_152ae_51",
264
+ infoType: "_infoType_152ae_59",
265
+ successType: "_successType_152ae_70",
266
+ warningType: "_warningType_152ae_81",
267
+ errorType: "_errorType_152ae_92",
268
+ leftPosition: "_leftPosition_152ae_103",
269
+ centerPosition: "_centerPosition_152ae_108",
270
+ rightPosition: "_rightPosition_152ae_113"
270
271
  } }]]);
271
272
  //#endregion
272
273
  export { T as a, k as i, N as n, A as r, F as t };
@@ -13,14 +13,9 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nChipProps, {},
13
13
  onClick?: ((value: MouseEvent) => any) | undefined;
14
14
  onClose?: (() => any) | undefined;
15
15
  }>, {
16
- height: number | string;
17
- color: string;
18
- textColor: string;
19
- maxWidth: number | string;
20
16
  plain: boolean;
21
17
  round: boolean;
22
18
  closeable: boolean;
23
- textSize: number | string;
24
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
25
20
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
21
  export default _default;
@@ -5,7 +5,6 @@ declare const _default: import('vue').DefineComponent<Ui3nIconProps, {}, {}, {},
5
5
  onClick?: ((value: MouseEvent) => any) | undefined;
6
6
  }>, {
7
7
  title: string;
8
- color: string;
9
8
  rotate: number;
10
9
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
10
  export default _default;
@@ -1,9 +1,7 @@
1
1
  import { Ui3nProgressCircularProps } from './types';
2
2
  declare const _default: import('vue').DefineComponent<Ui3nProgressCircularProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Ui3nProgressCircularProps> & Readonly<{}>, {
3
3
  size: number | string;
4
- color: string;
5
4
  value: number | string;
6
- bgColor: string;
7
5
  indeterminate: boolean;
8
6
  withText: boolean;
9
7
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -1,9 +1,7 @@
1
1
  import { Ui3nProgressLinearProps } from './types';
2
2
  declare const _default: import('vue').DefineComponent<Ui3nProgressLinearProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Ui3nProgressLinearProps> & Readonly<{}>, {
3
3
  height: number | string;
4
- color: string;
5
4
  value: number | string;
6
- bgColor: string;
7
5
  indeterminate: boolean;
8
6
  withText: boolean;
9
7
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -18,13 +18,6 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nScrollbarHorizo
18
18
  }, string, import('vue').PublicProps, Readonly<Ui3nScrollbarHorizontalProps> & Readonly<{
19
19
  onScroll?: ((value: Event) => any) | undefined;
20
20
  }>, {
21
- thumbRadius: number | string;
22
- thumbColor: string;
23
- thumbHoverColor: string;
24
- thumbActiveColor: string;
25
- trackRadius: number | string;
26
- trackColor: string;
27
- trackHeight: number | string;
28
21
  thumbMinWidth: number | string;
29
22
  thumbWidth: number | string | "auto";
30
23
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -22,13 +22,6 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nScrollbarVertic
22
22
  autoUpdate: boolean;
23
23
  thumbMinHeight: number | string;
24
24
  thumbHeight: number | string | "auto";
25
- thumbRadius: number | string;
26
- thumbColor: string;
27
- thumbHoverColor: string;
28
- thumbActiveColor: string;
29
- trackWidth: number;
30
- trackRadius: number | string;
31
- trackColor: string;
32
25
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
33
26
  containerRef: HTMLDivElement;
34
27
  trackRef: HTMLDivElement;
@@ -7,16 +7,11 @@ declare const _default: import('vue').DefineComponent<UI3nSliderProps, {
7
7
  "onUpdate:modelValue"?: ((value: number | [number, number]) => any) | undefined;
8
8
  }>, {
9
9
  name: string;
10
- activeColor: string;
11
- thumbColor: string;
12
- trackColor: string;
13
10
  min: string | number;
14
11
  max: string | number;
15
12
  labelVisible: "always" | "normal" | "never";
16
13
  labelTextColor: string;
17
14
  labelColor: string;
18
- trackHeight: string | number;
19
- thumbSize: string | number;
20
15
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
21
16
  sliderEl: HTMLDivElement;
22
17
  pointerEl1: HTMLDivElement;
@@ -15,10 +15,6 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nTabsProps, {},
15
15
  }>, {
16
16
  modelValue: number;
17
17
  itemDirection: "horizontal" | "vertical";
18
- activeColor: string;
19
- inactiveColor: string;
20
- indicatorColor: string;
21
- indicatorSize: number | string;
22
18
  indicatorPosition: "normal" | "reverse";
23
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
24
20
  tabs: HTMLDivElement;
@@ -23,14 +23,11 @@ declare const __VLS_component: import('vue').DefineComponent<Ui3nTooltipProps, {
23
23
  onOpened?: (() => any) | undefined;
24
24
  onClosed?: (() => any) | undefined;
25
25
  }>, {
26
- color: string;
27
26
  disabled: boolean;
28
27
  offsetX: string | number;
29
28
  offsetY: string | number;
30
- textColor: string;
31
29
  positionStrategy: "absolute" | "fixed";
32
30
  placement: import('./types').Ui3nTooltipPlacement;
33
- maxContentWidth: number | string;
34
31
  trigger: "click" | "hover" | "manual";
35
32
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
36
33
  referenceContainer: HTMLDivElement;