@namuna-nur/ui-kit 1.9.18 → 1.9.21

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.
@@ -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;
@@ -10,7 +10,7 @@ export type MultiSelectRef = {
10
10
  };
11
11
  export type MultiSelectOption = {
12
12
  label: string;
13
- id: string | number;
13
+ value: string;
14
14
  };
15
15
  export type MultiSelectTokens = {
16
16
  trigger: string;
@@ -60,6 +60,6 @@ export type MultiSelectProps = {
60
60
  };
61
61
  };
62
62
  export declare const items: {
63
- id: number;
63
+ value: string;
64
64
  label: string;
65
65
  }[];
@@ -2,18 +2,15 @@ import { FilterItemType } from '..';
2
2
  export declare const SearchInput: import('react').ForwardRefExoticComponent<import('react').InputHTMLAttributes<HTMLInputElement> & {
3
3
  value: string;
4
4
  isHasFilter?: boolean;
5
- filterByStatus?: FilterItemType[];
6
5
  filterByModule?: FilterItemType[];
7
- onFilterClick?: (updated: {
8
- status: FilterItemType[];
9
- module: FilterItemType[];
10
- }) => void;
6
+ onFilterClick?: (selectedModule: FilterItemType) => void;
11
7
  debounceDelay?: number;
12
8
  onDebouncedSearch?: (value: string) => void;
13
9
  searchResults?: string[];
14
10
  onResultClick?: (result: string) => void;
15
11
  isSearchIcon?: boolean;
16
12
  isSearchResultDisabled?: boolean;
13
+ isLoading?: boolean;
17
14
  classNames?: {
18
15
  base?: string;
19
16
  input?: string;
@@ -0,0 +1,4 @@
1
+ import { FilterItemType } from '..';
2
+ export declare const FILTER_BY_STATUS: FilterItemType[];
3
+ export declare const FILTER_BY_MODULE: FilterItemType[];
4
+ export declare const OPTIONS_ITEMS: string[];
@@ -3,5 +3,6 @@ import { SearchInput, SearchInputStory } from '..';
3
3
  declare const meta: Meta<typeof SearchInput>;
4
4
  export declare const Default: SearchInputStory;
5
5
  export declare const Disabled: SearchInputStory;
6
+ export declare const LoadingSearch: SearchInputStory;
6
7
  export declare const WithoutFilter: SearchInputStory;
7
8
  export default meta;
@@ -12,9 +12,7 @@ export declare const searchInputTokens: {
12
12
  };
13
13
  dropdown: {
14
14
  content: string;
15
- wrapperByStatus: string;
16
- wrapperByModule: string;
17
- title: string;
15
+ wrapperModule: string;
18
16
  typeFilter: string;
19
17
  };
20
18
  popover: {
@@ -39,4 +37,9 @@ export declare const searchInputTokens: {
39
37
  wrapper: string;
40
38
  text: string;
41
39
  };
40
+ options: {
41
+ items: string;
42
+ itemsText: string;
43
+ active: string;
44
+ };
42
45
  };
@@ -5,18 +5,15 @@ export type SearchInputStory = StoryObj<typeof SearchInput>;
5
5
  export type SearchInputProps = InputHTMLAttributes<HTMLInputElement> & {
6
6
  value: string;
7
7
  isHasFilter?: boolean;
8
- filterByStatus?: FilterItemType[];
9
8
  filterByModule?: FilterItemType[];
10
- onFilterClick?: (updated: {
11
- status: FilterItemType[];
12
- module: FilterItemType[];
13
- }) => void;
9
+ onFilterClick?: (selectedModule: FilterItemType) => void;
14
10
  debounceDelay?: number;
15
11
  onDebouncedSearch?: (value: string) => void;
16
12
  searchResults?: string[];
17
13
  onResultClick?: (result: string) => void;
18
14
  isSearchIcon?: boolean;
19
15
  isSearchResultDisabled?: boolean;
16
+ isLoading?: boolean;
20
17
  classNames?: {
21
18
  base?: string;
22
19
  input?: string;
@@ -27,13 +24,8 @@ export type SearchInputProps = InputHTMLAttributes<HTMLInputElement> & {
27
24
  export type FilterItemType = {
28
25
  id: string;
29
26
  label: string;
30
- checked?: boolean;
31
27
  };
32
28
  export type FilterListProps = {
33
- type: 'status' | 'module';
34
29
  title: string;
35
30
  items: FilterItemType[] | undefined;
36
31
  };
37
- export declare const FILTER_BY_STATUS: FilterItemType[];
38
- export declare const FILTER_BY_MODULE: FilterItemType[];
39
- export declare const OPTIONS_ITEMS: 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.18",
3
+ "version": "1.9.21",
4
4
  "description": "UI Kit for Namuna NUR",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",