@namuna-nur/ui-kit 1.9.17 → 1.9.19

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.
@@ -1,2 +1,3 @@
1
1
  import { AvatarProps } from '..';
2
- export declare const Avatar: ({ imageSrc, alt, hasBadge, iconSize, isActive, isHasCamera, classNames, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
2
+ import * as React from 'react';
3
+ export declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLInputElement>>;
@@ -6,4 +6,5 @@ export declare const WithPhotoOnly: AvatarStory;
6
6
  export declare const WithBadgeOnly: AvatarStory;
7
7
  export declare const WithPhotoAndBadge: AvatarStory;
8
8
  export declare const ActivePhotoAndBadge: AvatarStory;
9
+ export declare const AvatarImageUpload: AvatarStory;
9
10
  export default meta;
@@ -21,4 +21,5 @@ export type AvatarProps = {
21
21
  classNames?: AvatarClassNames;
22
22
  isActive?: boolean;
23
23
  isHasCamera?: boolean;
24
+ onAvatarChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
24
25
  };
@@ -6,6 +6,7 @@ export declare const commentItemTokens: {
6
6
  wrapperComment: string;
7
7
  wrapperReview: string;
8
8
  img: string;
9
+ fallbackIcon: string;
9
10
  };
10
11
  author: {
11
12
  fullNameBase: string;
@@ -3,6 +3,7 @@ import { PhoneInput } from './PhoneInput';
3
3
  import { PhoneInputStory } from '..';
4
4
  declare const meta: Meta<typeof PhoneInput>;
5
5
  export declare const Default: PhoneInputStory;
6
+ export declare const PhoneNumberUz: PhoneInputStory;
6
7
  export declare const Focus: PhoneInputStory;
7
8
  export declare const Filled: PhoneInputStory;
8
9
  export declare const Disabled: PhoneInputStory;
@@ -8,6 +8,7 @@ export type PhoneInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onCha
8
8
  status?: PhoneInputStatusType;
9
9
  message?: string;
10
10
  label?: string;
11
+ countryCode?: 'UZ' | 'DEFAULT';
11
12
  onChange: (rawValue: string) => void;
12
13
  classNames?: {
13
14
  parent?: string;
@@ -19,6 +20,7 @@ export type PhoneInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'onCha
19
20
  export type PhoneInputTokens = {
20
21
  parent: string;
21
22
  base: string;
23
+ title: string;
22
24
  hover: string;
23
25
  focus: string;
24
26
  disabled: string;
@@ -1 +1,3 @@
1
- export declare function formatDateToDayMonthYear(date: Date | string): string;
1
+ export declare const DATE_FORMAT_DAY_MONTH_YEAR_DOT = "yyyy.MM.dd";
2
+ export declare const DATE_FORMAT_DAY_MONTH_YEAR_DASH = "yyyy-MM-dd";
3
+ export declare function formatDateToDayMonthYear(date: Date | string, formatDate: string): string;
@@ -3,28 +3,28 @@ import { clsx as l } from "clsx";
3
3
  import { extendTailwindMerge as p } from "tailwind-merge";
4
4
  import { typographyTokens as i, colorTokens as f } from "../tokens/index.js";
5
5
  import { PieChart as u, LineChart as d } from "echarts/charts";
6
- import { GridComponent as h, TitleComponent as M, TooltipComponent as x, LegendComponent as T } from "echarts/components";
7
- import * as C from "echarts/core";
6
+ import { GridComponent as M, TitleComponent as T, TooltipComponent as h, LegendComponent as y } from "echarts/components";
7
+ import * as x from "echarts/core";
8
8
  import { CanvasRenderer as N } from "echarts/renderers";
9
- const g = "dd.MM.yyyy";
10
- function S(t) {
11
- return c(new Date(t), g);
9
+ const R = "yyyy.MM.dd", S = "yyyy-MM-dd";
10
+ function w(t, o) {
11
+ return c(new Date(t), o);
12
12
  }
13
- const m = (t, { splitClassName: e } = { splitClassName: !0 }) => {
14
- const o = {};
15
- return Object.keys(t).forEach((r) => {
16
- const [n, s] = e ? r.split("-") : ["", r], a = `text-${e ? n : r}`;
17
- o[a] || (o[a] = []), o[a].push(s);
18
- }), o;
19
- }, y = (t) => {
13
+ const m = (t, { splitClassName: o } = { splitClassName: !0 }) => {
20
14
  const e = {};
21
- return Object.entries(t).forEach(([o, r]) => {
22
- const n = `text-${o}`;
23
- e[n] = Object.keys(r).filter(
15
+ return Object.keys(t).forEach((r) => {
16
+ const [n, s] = o ? r.split("-") : ["", r], a = `text-${o ? n : r}`;
17
+ e[a] || (e[a] = []), e[a].push(s);
18
+ }), e;
19
+ }, C = (t) => {
20
+ const o = {};
21
+ return Object.entries(t).forEach(([e, r]) => {
22
+ const n = `text-${e}`;
23
+ o[n] = Object.keys(r).filter(
24
24
  (s) => !isNaN(Number(s))
25
25
  );
26
- }), e;
27
- }, b = p({
26
+ }), o;
27
+ }, _ = p({
28
28
  extend: {
29
29
  classGroups: {
30
30
  "font-size": [
@@ -36,28 +36,30 @@ const m = (t, { splitClassName: e } = { splitClassName: !0 }) => {
36
36
  splitClassName: !1
37
37
  })
38
38
  ],
39
- "text-color": [y(f)]
39
+ "text-color": [C(f)]
40
40
  }
41
41
  }
42
- }), A = (...t) => b(l(t)), E = (t) => new Intl.NumberFormat("ru-RU").format(Number(t)), R = (t) => {
43
- const e = ["B", "KB", "MB", "GB"];
42
+ }), z = (...t) => _(l(t)), B = (t) => new Intl.NumberFormat("ru-RU").format(Number(t)), G = (t) => {
43
+ const o = ["B", "KB", "MB", "GB"];
44
44
  if (t === 0) return "0 B";
45
- const o = Math.floor(Math.log(t) / Math.log(1024));
46
- return `${(t / Math.pow(1024, o)).toFixed(2)}${e[o]}`;
45
+ const e = Math.floor(Math.log(t) / Math.log(1024));
46
+ return `${(t / Math.pow(1024, e)).toFixed(2)}${o[e]}`;
47
47
  };
48
- C.use([
48
+ x.use([
49
49
  N,
50
50
  u,
51
51
  d,
52
- h,
53
52
  M,
54
- x,
55
- T
53
+ T,
54
+ h,
55
+ y
56
56
  ]);
57
57
  export {
58
- A as cn,
58
+ S as DATE_FORMAT_DAY_MONTH_YEAR_DASH,
59
+ R as DATE_FORMAT_DAY_MONTH_YEAR_DOT,
60
+ z as cn,
59
61
  m as convertToGroupedFontSizes,
60
- S as formatDateToDayMonthYear,
61
- R as formatFileSize,
62
- E as numberFormat
62
+ w as formatDateToDayMonthYear,
63
+ G as formatFileSize,
64
+ B as numberFormat
63
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@namuna-nur/ui-kit",
3
- "version": "1.9.17",
3
+ "version": "1.9.19",
4
4
  "description": "UI Kit for Namuna NUR",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",