@arthurzakharov/ui-kit 1.2.3 → 1.2.4
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/dist/assets/not-found-ampOPJmx.css +1 -0
- package/dist/components/certifications/certifications.component.d.ts +3 -2
- package/dist/components/certifications/certifications.component.js +16 -16
- package/dist/components/message-block/message-block.component.js +1 -1
- package/dist/components/not-found/not-found.component.d.ts +2 -1
- package/dist/components/not-found/not-found.component.js +21 -28
- package/dist/fonts/lato/black/lato-black-900.ttf +0 -0
- package/dist/fonts/lato/black/lato-black-900.woff +0 -0
- package/dist/fonts/lato/black/lato-black-900.woff2 +0 -0
- package/dist/fonts/lato/black/lato-google-black-900.ttf +0 -0
- package/dist/fonts/lato/black/lato-latin-black-900.ttf +0 -0
- package/dist/fonts/lato/black/lato-latin-black-900.woff +0 -0
- package/dist/fonts/lato/black/lato-latin-black-900.woff2 +0 -0
- package/dist/fonts/lato/bold/lato-bold-700.ttf +0 -0
- package/dist/fonts/lato/bold/lato-bold-700.woff +0 -0
- package/dist/fonts/lato/bold/lato-bold-700.woff2 +0 -0
- package/dist/fonts/lato/bold/lato-google-bold-700.ttf +0 -0
- package/dist/fonts/lato/bold/lato-latin-bold-700.ttf +0 -0
- package/dist/fonts/lato/bold/lato-latin-bold-700.woff +0 -0
- package/dist/fonts/lato/bold/lato-latin-bold-700.woff2 +0 -0
- package/dist/fonts/lato/light/lato-google-light-300.ttf +0 -0
- package/dist/fonts/lato/light/lato-latin-light-300.ttf +0 -0
- package/dist/fonts/lato/light/lato-latin-light-300.woff +0 -0
- package/dist/fonts/lato/light/lato-latin-light-300.woff2 +0 -0
- package/dist/fonts/lato/light/lato-light-300.ttf +0 -0
- package/dist/fonts/lato/light/lato-light-300.woff +0 -0
- package/dist/fonts/lato/light/lato-light-300.woff2 +0 -0
- package/dist/fonts/lato/regular/lato-google-regular-400.ttf +0 -0
- package/dist/fonts/lato/regular/lato-latin-regular-400.ttf +0 -0
- package/dist/fonts/lato/regular/lato-latin-regular-400.woff +0 -0
- package/dist/fonts/lato/regular/lato-latin-regular-400.woff2 +0 -0
- package/dist/fonts/lato/regular/lato-regular-400.ttf +0 -0
- package/dist/fonts/lato/regular/lato-regular-400.woff +0 -0
- package/dist/fonts/lato/regular/lato-regular-400.woff2 +0 -0
- package/dist/styles/fonts.css +67 -0
- package/dist/utils/types.d.ts +3 -0
- package/package.json +1 -1
- package/dist/assets/tag-create-CXB1HuBg.css +0 -1
- package/dist/components/tag/block.component.d.ts +0 -32
- package/dist/components/tag/block.component.js +0 -5
- package/dist/components/tag/css-variables-map.util.d.ts +0 -32
- package/dist/components/tag/css-variables-map.util.js +0 -35
- package/dist/components/tag/flex.component.d.ts +0 -127
- package/dist/components/tag/flex.component.js +0 -10
- package/dist/components/tag/inline-block.component.d.ts +0 -32
- package/dist/components/tag/inline-block.component.js +0 -5
- package/dist/components/tag/inline-flex.component.d.ts +0 -127
- package/dist/components/tag/inline-flex.component.js +0 -10
- package/dist/components/tag/inline.component.d.ts +0 -32
- package/dist/components/tag/inline.component.js +0 -5
- package/dist/components/tag/table.component.d.ts +0 -189
- package/dist/components/tag/table.component.js +0 -12
- package/dist/components/tag/tag-create.d.ts +0 -32
- package/dist/components/tag/tag-create.js +0 -79
- package/dist/components/tag/tag.types.d.ts +0 -61
- package/dist/components/tag/tag.types.js +0 -1
- package/dist/components/tag/use-mq.hook.d.ts +0 -6
- package/dist/components/tag/use-mq.hook.js +0 -9
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { createElement as r } from "react";
|
|
2
|
-
import c from "clsx";
|
|
3
|
-
import '../../assets/tag-create-CXB1HuBg.css';const b = "_Tag_dnl2k_3", v = {
|
|
4
|
-
Tag: b
|
|
5
|
-
}, f = (t) => t === "xxs" || t === "xs" || t === "sm" || t === "md" || t === "lg" || t === "xl" || t === "xxl" || t === "xxxl", e = (t) => {
|
|
6
|
-
if (!t) return {};
|
|
7
|
-
const m = t.trim().split(/\s+/).filter(Boolean);
|
|
8
|
-
if (m.length === 0 || m.length > 4) return {};
|
|
9
|
-
if (!m.every(f)) return {};
|
|
10
|
-
const [i, l, n, d] = m;
|
|
11
|
-
return l ? n ? d ? { t: i, r: l, b: n, l: d } : { t: i, r: l, b: n, l } : { t: i, r: l, b: i, l } : { t: i, r: i, b: i, l: i };
|
|
12
|
-
}, x = (t) => {
|
|
13
|
-
const m = e(t);
|
|
14
|
-
return m.t === m.b && m.l === m.r && m.t === m.l ? { p: m.t, px: void 0, py: void 0, pt: void 0, pr: void 0, pb: void 0, pl: void 0 } : m.t === m.b && m.l === m.r && m.t !== m.l ? { p: void 0, px: m.l, py: m.t, pt: void 0, pr: void 0, pb: void 0, pl: void 0 } : { p: void 0, px: void 0, py: void 0, pt: m.t, pr: m.r, pb: m.b, pl: m.l };
|
|
15
|
-
}, a = (t) => {
|
|
16
|
-
const m = e(t);
|
|
17
|
-
return m.t === m.b && m.l === m.r && m.t === m.l ? { m: m.t, mx: void 0, my: void 0, mt: void 0, mr: void 0, mb: void 0, ml: void 0 } : m.t === m.b && m.l === m.r && m.t !== m.l ? { m: void 0, mx: m.l, my: m.t, mt: void 0, mr: void 0, mb: void 0, ml: void 0 } : { m: void 0, mx: void 0, my: void 0, mt: m.t, mr: m.r, mb: m.b, ml: m.l };
|
|
18
|
-
}, o = (t) => {
|
|
19
|
-
const m = x(t.p), i = {
|
|
20
|
-
p: m.p,
|
|
21
|
-
px: m.px,
|
|
22
|
-
py: m.py,
|
|
23
|
-
pt: m.pt,
|
|
24
|
-
pr: m.pr,
|
|
25
|
-
pb: m.pb,
|
|
26
|
-
pl: m.pl
|
|
27
|
-
};
|
|
28
|
-
return t.py && (i.py = t.py), t.px && (i.px = t.px), t.pt && (i.pt = t.pt), t.pr && (i.pr = t.pr), t.pb && (i.pb = t.pb), t.pl && (i.pl = t.pl), i;
|
|
29
|
-
}, y = (t) => {
|
|
30
|
-
const m = a(t.m), i = {
|
|
31
|
-
m: m.m,
|
|
32
|
-
mx: m.mx,
|
|
33
|
-
my: m.my,
|
|
34
|
-
mt: m.mt,
|
|
35
|
-
mr: m.mr,
|
|
36
|
-
mb: m.mb,
|
|
37
|
-
ml: m.ml
|
|
38
|
-
};
|
|
39
|
-
return t.my && (i.my = t.my), t.mx && (i.mx = t.mx), t.mt && (i.mt = t.mt), t.mr && (i.mr = t.mr), t.mb && (i.mb = t.mb), t.ml && (i.ml = t.ml), i;
|
|
40
|
-
}, h = (t) => {
|
|
41
|
-
const m = y(t), i = o(t);
|
|
42
|
-
return r(t.tag || "div", {
|
|
43
|
-
className: c(v.Tag, t.className),
|
|
44
|
-
d: t.d,
|
|
45
|
-
pos: t.pos,
|
|
46
|
-
// Margins
|
|
47
|
-
mt: m.mt,
|
|
48
|
-
mb: m.mb,
|
|
49
|
-
ml: m.ml,
|
|
50
|
-
mr: m.mr,
|
|
51
|
-
// Paddings
|
|
52
|
-
p: i.p,
|
|
53
|
-
px: i.px,
|
|
54
|
-
py: i.py,
|
|
55
|
-
pt: i.pt,
|
|
56
|
-
pb: i.pb,
|
|
57
|
-
pl: i.pl,
|
|
58
|
-
pr: i.pr,
|
|
59
|
-
// Font
|
|
60
|
-
fw: t.fw,
|
|
61
|
-
fz: t.fz,
|
|
62
|
-
c: t.c,
|
|
63
|
-
ta: t.ta,
|
|
64
|
-
td: t.td,
|
|
65
|
-
// FlexProps
|
|
66
|
-
fxd: t.fxd,
|
|
67
|
-
ai: t.ai,
|
|
68
|
-
jc: t.jc,
|
|
69
|
-
g: t.g,
|
|
70
|
-
va: t.va,
|
|
71
|
-
// Styles
|
|
72
|
-
style: t.style,
|
|
73
|
-
dangerouslySetInnerHTML: typeof t.children == "string" ? { __html: t.children } : null,
|
|
74
|
-
children: typeof t.children != "string" ? t.children : null
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
export {
|
|
78
|
-
h as tagCreate
|
|
79
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, PropsWithChildren } from 'react';
|
|
2
|
-
type Display = 'flex' | 'inline-flex' | 'block' | 'inline-block' | 'inline' | 'table' | 'table-row-group' | 'table-row' | 'table-cell';
|
|
3
|
-
type Position = 'relative' | 'absolute' | 'fixed' | 'static' | 'sticky';
|
|
4
|
-
type Direction = 'row' | 'column' | 'row-reverse' | 'column-reverse';
|
|
5
|
-
type AlignItems = 'center' | 'start' | 'end' | 'stretch';
|
|
6
|
-
type JustifyContent = 'center' | 'start' | 'end' | 'space-between';
|
|
7
|
-
type TextAlign = 'left' | 'center' | 'right';
|
|
8
|
-
type FontWeight = 'light' | 'regular' | 'medium' | 'bold';
|
|
9
|
-
type FontSize = 'regular' | 'small' | 'extra-small' | 'large' | 'hl1' | 'hl2' | 'hl3' | 'hl4' | 'hl5';
|
|
10
|
-
type Color = 'primary' | 'secondary' | 'accent-primary' | 'accent-secondary';
|
|
11
|
-
type TextDecoration = 'underline' | 'overline' | 'line-through';
|
|
12
|
-
type VerticalAlign = 'top' | 'bottom' | 'middle';
|
|
13
|
-
export type Space = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'xxxl';
|
|
14
|
-
export type SpaceShorthand = Space | `${Space} ${Space}` | `${Space} ${Space} ${Space}` | `${Space} ${Space} ${Space} ${Space}`;
|
|
15
|
-
export type ResolvedPadding = Partial<Record<'p' | 'px' | 'py' | 'pt' | 'pr' | 'pb' | 'pl', Space>>;
|
|
16
|
-
export type ResolvedMargin = Partial<Record<'m' | 'mx' | 'my' | 'mt' | 'mr' | 'mb' | 'ml', Space>>;
|
|
17
|
-
export type ResolvedSpaceShorthand = Partial<Record<'t' | 'r' | 'b' | 'l', Space>>;
|
|
18
|
-
interface CommonProps extends PropsWithChildren {
|
|
19
|
-
tag?: keyof HTMLElementTagNameMap;
|
|
20
|
-
style?: CSSProperties;
|
|
21
|
-
className?: string;
|
|
22
|
-
d?: Display;
|
|
23
|
-
pos?: Position;
|
|
24
|
-
}
|
|
25
|
-
export interface MarginProps {
|
|
26
|
-
mt?: Space;
|
|
27
|
-
mb?: Space;
|
|
28
|
-
ml?: Space;
|
|
29
|
-
mr?: Space;
|
|
30
|
-
mx?: Space;
|
|
31
|
-
my?: Space;
|
|
32
|
-
m?: SpaceShorthand;
|
|
33
|
-
}
|
|
34
|
-
export interface PaddingProps {
|
|
35
|
-
pt?: Space;
|
|
36
|
-
pb?: Space;
|
|
37
|
-
pl?: Space;
|
|
38
|
-
pr?: Space;
|
|
39
|
-
px?: Space;
|
|
40
|
-
py?: Space;
|
|
41
|
-
p?: SpaceShorthand;
|
|
42
|
-
}
|
|
43
|
-
interface FontProps {
|
|
44
|
-
fw?: FontWeight;
|
|
45
|
-
fz?: FontSize;
|
|
46
|
-
c?: Color;
|
|
47
|
-
ta?: TextAlign;
|
|
48
|
-
td?: TextDecoration;
|
|
49
|
-
va?: VerticalAlign;
|
|
50
|
-
}
|
|
51
|
-
interface FlexProps {
|
|
52
|
-
fxd?: Direction;
|
|
53
|
-
ai?: AlignItems;
|
|
54
|
-
jc?: JustifyContent;
|
|
55
|
-
g?: Space;
|
|
56
|
-
}
|
|
57
|
-
export type FlexTagProps = Omit<CommonProps & MarginProps & PaddingProps & FontProps & FlexProps, 'd' | 'fxd'>;
|
|
58
|
-
export type RegularTagProps = Omit<CommonProps & MarginProps & PaddingProps & FontProps, 'd'>;
|
|
59
|
-
export type TableTagProps = Omit<CommonProps & MarginProps & PaddingProps & FontProps, 'd' | 'tag'>;
|
|
60
|
-
export type CreateProps = CommonProps & MarginProps & PaddingProps & FontProps & FlexProps;
|
|
61
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export type Device = 'phone' | 'tablet' | 'laptop' | 'pc';
|
|
2
|
-
export type DeviceValues<T> = Partial<Record<Device, T>> & {
|
|
3
|
-
default?: T;
|
|
4
|
-
};
|
|
5
|
-
export declare const useMQ: () => Device;
|
|
6
|
-
export declare const media: <T>(device: Device, values: DeviceValues<T>) => T | undefined;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { useMediaQuery as n } from "usehooks-ts";
|
|
2
|
-
const i = () => {
|
|
3
|
-
const p = n("(min-width: 1200px)"), t = n("(min-width: 1024px)"), r = n("(min-width: 768px)");
|
|
4
|
-
return p ? "pc" : t ? "laptop" : r ? "tablet" : "phone";
|
|
5
|
-
}, e = (p, t) => p === "pc" ? t.pc ?? t.laptop ?? t.tablet ?? t.phone ?? t.default : p === "laptop" ? t.laptop ?? t.tablet ?? t.phone ?? t.default : p === "tablet" ? t.tablet ?? t.phone ?? t.default : t.phone ?? t.default;
|
|
6
|
-
export {
|
|
7
|
-
e as media,
|
|
8
|
-
i as useMQ
|
|
9
|
-
};
|