@julseb-lib/react 0.0.97 → 0.1.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.
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +292 -272
- package/dist/index.umd.js +2 -2
- package/dist/lib/components/Grid/Grid.tsx +35 -35
- package/dist/lib/components/Meta/Meta.tsx +58 -29
- package/dist/lib/components/Meta/types.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -813,7 +813,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
813
813
|
}
|
|
814
814
|
`;_([o1]);const tl=({"data-testid":l,as:c,ref:e,children:a,gap:h="m",...d})=>t.jsx(o1,{"data-testid":l,ref:e,as:c,$gap:h,...d,children:a}),z1=s.div`
|
|
815
815
|
${o.Grid}
|
|
816
|
-
`;_([z1]);const hl=({"data-testid":l,as:c,ref:e,children:a,inline:h,col:d=1,gap:i
|
|
816
|
+
`;_([z1]);const hl=({"data-testid":l,as:c,ref:e,children:a,inline:h,col:d=1,gap:i,columnGap:r,rowGap:f,justifyItems:m="stretch",alignItems:z="stretch",justifyContent:p="auto",alignContent:M="normal",padding:v="0px",...g})=>t.jsx(z1,{"data-testid":l,ref:e,as:c,$inline:h,$col:d,$gap:i,$columnGap:r,$rowGap:f,$justifyItems:m,$alignItems:z,$justifyContent:p,$alignContent:M,$padding:v,...g,children:a}),p1=s.div`
|
|
817
817
|
${o.Flexbox}
|
|
818
818
|
`;_([p1]);const r2=({"data-testid":l,as:c,ref:e,children:a,inline:h,flexDirection:d,flexWrap:i,justifyContent:r,alignItems:f,justifyItems:m,alignContent:z,gap:p,columnGap:M,rowGap:v,padding:g,...n})=>t.jsx(p1,{"data-testid":l,ref:e,as:c,$inline:h,$flexDirection:d,$flexWrap:i,$justifyContent:r,$alignItems:f,$justifyItems:m,$alignContent:z,$gap:p,$columnGap:M,$rowGap:v,$padding:g,...n,children:a}),v1=s(S6)`
|
|
819
819
|
width: ${({$size:l})=>x.stringifyPx(l)};
|
|
@@ -4172,7 +4172,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
4172
4172
|
&:disabled {
|
|
4173
4173
|
cursor: not-allowed;
|
|
4174
4174
|
}
|
|
4175
|
-
`;_([L6]);const ie=({"data-testid":l,ref:c,className:e,icon:a,iconSize:h,iconBaseUrl:d,iconClockSize:i=16,iconClock:r=t.jsx(Z3,{"data-testid":l&&`${l}.RightContainer.IconClock`,className:e&&"IconClock",size:i}),id:f,label:m,labelComment:z,helper:p,helperBottom:M,validation:v,inputBackground:g,inputVariant:n,containerStyle:y,inputAndListContainerStyle:u,listDirection:$,step:C="1h",minTime:R,maxTime:A,value:S,setValue:I,prefix:V,disabled:O,tabIndex:T,...J})=>{const F=!!(m||z||p||M||v),X=H.useRef(null);let Z=Object.keys(C==="30min"?Z2.halfHours:C==="15min"?Z2.quarterHours:C==="1min"?Z2.minutes:Z2.hours);R&&(Z=Z.splice(Z.indexOf(Z.find(Q=>Q===R)),Z.length-1)),A&&(Z=Z.splice(0,Z.indexOf(A)+1));const{isOpen:D,setIsOpen:W,cursor:q,listRef:a2}=w0({data:Z,value:S,setValue:I}),m2=()=>{D&&W(!1),W(!0)},j=()=>W(!0),P=()=>W(!1),c2=Q=>I(Q.target.value),t2=Q=>{I(Q),P()};return H2(a2,P),t.jsx(g2,{"data-testid":l,id:f,label:m,labelComment:z,helper:p,helperBottom:M,validation:v,value:S,className:e,iconBaseUrl:d,style:y,hasListOpen:D,counter:void 0,maxLength:void 0,children:t.jsxs(z0,{"data-testid":l,className:e,hasListOpen:D,isParent:!F,ref:X,inputAndListContainerStyle:u,children:[t.jsxs(Y2,{"data-testid":l,className:e,isTextArea:!1,inputBackground:g,inputVariant:n,validationStatus:v==null?void 0:v.status,hasListOpen:D,hasContainer:!0,children:[(a||V)&&t.jsxs(u2,{"data-testid":l,className:e,disabled:O,children:[V&&t.jsx(S2,{"data-testid":l,className:e,prefix:V,inputBackground:g}),a&&t.jsx(y2,{"data-testid":l,className:e,icon:a,iconSize:h,validationStatus:v==null?void 0:v.status,disabled:O,inputBackground:g,inputVariant:n,iconBaseUrl:d})]}),t.jsx(L6,{"data-testid":l&&`${l}.InputWrapper.InputTime`,className:e&&"InputTime",ref:c,onClick:m2,onFocus:j,tabIndex:T,value:S,onChange:c2,disabled:O,$disabled:O,$validationStatus:v==null?void 0:v.status,$inputBackground:g,$inputVariant:n,...J}),t.jsxs(b2,{"data-testid":l,className:e,disabled:O,withBorder:!1,withPadding:!0,children:[t.jsx(A2,{"data-testid":l,className:e,icon:r,iconSize:i,onClick:m2,"aria-label":"Calendar",disabled:O,inputBackground:g,validationStatus:v==null?void 0:v.status}),v&&t.jsx($2,{"data-testid":l,className:e,validation:v,inputBackground:g})]})]}),t.jsx(o0,{"data-testid":l,className:e,direction:$,inputBackground:g,inputVariant:n,validationStatus:v==null?void 0:v.status,isOpen:!!(S&&D),ref:a2,children:Z.map((Q,d2)=>t.jsx(U2,{"data-testid":l,className:e,validationStatus:v==null?void 0:v.status,inputBackground:g,onClick:()=>t2(Q),isActive:d2===q,isHovered:S===Q,children:Q},Q))})]})})},R6=({children:l,title:c,favicon:e,description:a,keywords:h,author:d,
|
|
4175
|
+
`;_([L6]);const ie=({"data-testid":l,ref:c,className:e,icon:a,iconSize:h,iconBaseUrl:d,iconClockSize:i=16,iconClock:r=t.jsx(Z3,{"data-testid":l&&`${l}.RightContainer.IconClock`,className:e&&"IconClock",size:i}),id:f,label:m,labelComment:z,helper:p,helperBottom:M,validation:v,inputBackground:g,inputVariant:n,containerStyle:y,inputAndListContainerStyle:u,listDirection:$,step:C="1h",minTime:R,maxTime:A,value:S,setValue:I,prefix:V,disabled:O,tabIndex:T,...J})=>{const F=!!(m||z||p||M||v),X=H.useRef(null);let Z=Object.keys(C==="30min"?Z2.halfHours:C==="15min"?Z2.quarterHours:C==="1min"?Z2.minutes:Z2.hours);R&&(Z=Z.splice(Z.indexOf(Z.find(Q=>Q===R)),Z.length-1)),A&&(Z=Z.splice(0,Z.indexOf(A)+1));const{isOpen:D,setIsOpen:W,cursor:q,listRef:a2}=w0({data:Z,value:S,setValue:I}),m2=()=>{D&&W(!1),W(!0)},j=()=>W(!0),P=()=>W(!1),c2=Q=>I(Q.target.value),t2=Q=>{I(Q),P()};return H2(a2,P),t.jsx(g2,{"data-testid":l,id:f,label:m,labelComment:z,helper:p,helperBottom:M,validation:v,value:S,className:e,iconBaseUrl:d,style:y,hasListOpen:D,counter:void 0,maxLength:void 0,children:t.jsxs(z0,{"data-testid":l,className:e,hasListOpen:D,isParent:!F,ref:X,inputAndListContainerStyle:u,children:[t.jsxs(Y2,{"data-testid":l,className:e,isTextArea:!1,inputBackground:g,inputVariant:n,validationStatus:v==null?void 0:v.status,hasListOpen:D,hasContainer:!0,children:[(a||V)&&t.jsxs(u2,{"data-testid":l,className:e,disabled:O,children:[V&&t.jsx(S2,{"data-testid":l,className:e,prefix:V,inputBackground:g}),a&&t.jsx(y2,{"data-testid":l,className:e,icon:a,iconSize:h,validationStatus:v==null?void 0:v.status,disabled:O,inputBackground:g,inputVariant:n,iconBaseUrl:d})]}),t.jsx(L6,{"data-testid":l&&`${l}.InputWrapper.InputTime`,className:e&&"InputTime",ref:c,onClick:m2,onFocus:j,tabIndex:T,value:S,onChange:c2,disabled:O,$disabled:O,$validationStatus:v==null?void 0:v.status,$inputBackground:g,$inputVariant:n,...J}),t.jsxs(b2,{"data-testid":l,className:e,disabled:O,withBorder:!1,withPadding:!0,children:[t.jsx(A2,{"data-testid":l,className:e,icon:r,iconSize:i,onClick:m2,"aria-label":"Calendar",disabled:O,inputBackground:g,validationStatus:v==null?void 0:v.status}),v&&t.jsx($2,{"data-testid":l,className:e,validation:v,inputBackground:g})]})]}),t.jsx(o0,{"data-testid":l,className:e,direction:$,inputBackground:g,inputVariant:n,validationStatus:v==null?void 0:v.status,isOpen:!!(S&&D),ref:a2,children:Z.map((Q,d2)=>t.jsx(U2,{"data-testid":l,className:e,validationStatus:v==null?void 0:v.status,inputBackground:g,onClick:()=>t2(Q),isActive:d2===q,isHovered:S===Q,children:Q},Q))})]})})},R6=({children:l,title:c,favicon:e,description:a,keywords:h,author:d,publisher:i=d,type:r,cover:f,siteName:m,language:z,url:p,email:M})=>t.jsxs(t.Fragment,{children:[t.jsx("title",{children:c}),t.jsx("meta",{property:"og:title",content:c}),t.jsx("meta",{httpEquiv:"Content-Type",content:"text/html;charset=UTF-8"}),t.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1.0"}),t.jsx("meta",{name:"referrer",content:"origin"}),a&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{name:"description",content:a}),t.jsx("meta",{property:"og:description",content:a}),t.jsx("meta",{name:"twitter:description",content:a})]}),e&&t.jsxs(t.Fragment,{children:[t.jsx("link",{rel:"shortcut icon",href:e,type:"image/x-icon"}),t.jsx("link",{rel:"icon",href:e})]}),d&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{name:"author",content:d}),t.jsx("meta",{name:"creator",content:d}),t.jsx("meta",{name:"twitter:creator",content:d})]}),h&&t.jsx("meta",{name:"keywords",content:h==null?void 0:h.join(",")}),m&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{name:"application-name",content:m}),t.jsx("meta",{property:"og:site_name",content:m}),t.jsx("meta",{property:"og:site_name",content:m}),t.jsx("meta",{name:"twitter:title",content:m})]}),i&&t.jsx("meta",{name:"publisher",content:i}),r&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{name:"category",content:r}),t.jsx("meta",{property:"og:type",content:r})]}),f&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{property:"og:image",content:f}),t.jsx("meta",{property:"og:image",content:f}),t.jsx("meta",{name:"twitter:image",content:f})]}),z&&t.jsx("meta",{property:"og:locale",content:z}),p&&t.jsxs(t.Fragment,{children:[t.jsx("meta",{property:"og:url",content:p}),t.jsx("meta",{name:"twitter:site",content:p})]}),M&&t.jsx("meta",{property:"og:email",content:M}),t.jsx("meta",{name:"twitter:card",content:"summary"}),l]}),j6=s.video`
|
|
4176
4176
|
display: block;
|
|
4177
4177
|
width: ${({$width:l})=>x.stringifyPx(l)};
|
|
4178
4178
|
height: ${({$height:l})=>x.stringifyPx(l)};
|
|
@@ -32,40 +32,40 @@ import type { ILibGrid } from "./types"
|
|
|
32
32
|
* </Grid>
|
|
33
33
|
*/
|
|
34
34
|
export const Grid: FC<ILibGrid> = ({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
"data-testid": testid,
|
|
36
|
+
as,
|
|
37
|
+
ref,
|
|
38
|
+
children,
|
|
39
|
+
inline,
|
|
40
|
+
col = 1,
|
|
41
|
+
gap,
|
|
42
|
+
columnGap,
|
|
43
|
+
rowGap,
|
|
44
|
+
justifyItems = "stretch",
|
|
45
|
+
alignItems = "stretch",
|
|
46
|
+
justifyContent = "auto",
|
|
47
|
+
alignContent = "normal",
|
|
48
|
+
padding = "0px",
|
|
49
|
+
...rest
|
|
50
50
|
}) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
51
|
+
return (
|
|
52
|
+
<StyledGrid
|
|
53
|
+
data-testid={testid}
|
|
54
|
+
ref={ref}
|
|
55
|
+
as={as}
|
|
56
|
+
$inline={inline}
|
|
57
|
+
$col={col}
|
|
58
|
+
$gap={gap}
|
|
59
|
+
$columnGap={columnGap}
|
|
60
|
+
$rowGap={rowGap}
|
|
61
|
+
$justifyItems={justifyItems}
|
|
62
|
+
$alignItems={alignItems}
|
|
63
|
+
$justifyContent={justifyContent}
|
|
64
|
+
$alignContent={alignContent}
|
|
65
|
+
$padding={padding}
|
|
66
|
+
{...rest}
|
|
67
|
+
>
|
|
68
|
+
{children}
|
|
69
|
+
</StyledGrid>
|
|
70
|
+
)
|
|
71
71
|
}
|
|
@@ -12,6 +12,7 @@ import type { ILibMeta } from "./types"
|
|
|
12
12
|
* @param {string} [props.description] - Meta description for SEO.
|
|
13
13
|
* @param {string[]} [props.keywords] - Array of keywords for SEO.
|
|
14
14
|
* @param {string} [props.author] - Author of the document.
|
|
15
|
+
* @param {string} [props.publisher] - Publisher of the document, default is author.
|
|
15
16
|
* @param {string} [props.type] - Open Graph type (e.g., "website", "article").
|
|
16
17
|
* @param {string} [props.cover] - Open Graph image URL.
|
|
17
18
|
* @param {string} [props.siteName] - Open Graph site name.
|
|
@@ -43,6 +44,7 @@ export const Meta: FC<ILibMeta> = ({
|
|
|
43
44
|
description,
|
|
44
45
|
keywords,
|
|
45
46
|
author,
|
|
47
|
+
publisher = author,
|
|
46
48
|
type,
|
|
47
49
|
cover,
|
|
48
50
|
siteName,
|
|
@@ -53,42 +55,69 @@ export const Meta: FC<ILibMeta> = ({
|
|
|
53
55
|
return (
|
|
54
56
|
<>
|
|
55
57
|
<title>{title}</title>
|
|
58
|
+
<meta property="og:title" content={title} />
|
|
56
59
|
<meta httpEquiv="Content-Type" content="text/html;charset=UTF-8" />
|
|
57
60
|
<meta
|
|
58
61
|
name="viewport"
|
|
59
62
|
content="width=device-width, initial-scale=1.0"
|
|
60
63
|
/>
|
|
61
|
-
<meta name="description" content={description} />
|
|
62
|
-
<link rel="shortcut icon" href={favicon} type="image/x-icon" />
|
|
63
|
-
<link rel="icon" href={favicon} />
|
|
64
|
-
<meta name="author" content={author} />
|
|
65
|
-
<meta name="keywords" content={keywords?.join(",")} />
|
|
66
|
-
|
|
67
|
-
<meta name="application-name" content={siteName} />
|
|
68
64
|
<meta name="referrer" content="origin" />
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
65
|
+
{description && (
|
|
66
|
+
<>
|
|
67
|
+
<meta name="description" content={description} />
|
|
68
|
+
<meta property="og:description" content={description} />
|
|
69
|
+
<meta name="twitter:description" content={description} />
|
|
70
|
+
</>
|
|
71
|
+
)}
|
|
72
|
+
{favicon && (
|
|
73
|
+
<>
|
|
74
|
+
<link
|
|
75
|
+
rel="shortcut icon"
|
|
76
|
+
href={favicon}
|
|
77
|
+
type="image/x-icon"
|
|
78
|
+
/>
|
|
79
|
+
<link rel="icon" href={favicon} />
|
|
80
|
+
</>
|
|
81
|
+
)}
|
|
82
|
+
{author && (
|
|
83
|
+
<>
|
|
84
|
+
<meta name="author" content={author} />
|
|
85
|
+
<meta name="creator" content={author} />
|
|
86
|
+
<meta name="twitter:creator" content={author} />
|
|
87
|
+
</>
|
|
88
|
+
)}
|
|
89
|
+
{keywords && <meta name="keywords" content={keywords?.join(",")} />}
|
|
90
|
+
{siteName && (
|
|
91
|
+
<>
|
|
92
|
+
<meta name="application-name" content={siteName} />
|
|
93
|
+
<meta property="og:site_name" content={siteName} />
|
|
94
|
+
<meta property="og:site_name" content={siteName} />
|
|
95
|
+
<meta name="twitter:title" content={siteName} />
|
|
96
|
+
</>
|
|
97
|
+
)}
|
|
98
|
+
{publisher && <meta name="publisher" content={publisher} />}
|
|
99
|
+
{type && (
|
|
100
|
+
<>
|
|
101
|
+
<meta name="category" content={type} />
|
|
102
|
+
<meta property="og:type" content={type} />
|
|
103
|
+
</>
|
|
104
|
+
)}
|
|
105
|
+
{cover && (
|
|
106
|
+
<>
|
|
107
|
+
<meta property="og:image" content={cover} />
|
|
108
|
+
<meta property="og:image" content={cover} />
|
|
109
|
+
<meta name="twitter:image" content={cover} />
|
|
110
|
+
</>
|
|
111
|
+
)}
|
|
112
|
+
{language && <meta property="og:locale" content={language} />}
|
|
113
|
+
{url && (
|
|
114
|
+
<>
|
|
115
|
+
<meta property="og:url" content={url} />
|
|
116
|
+
<meta name="twitter:site" content={url} />
|
|
117
|
+
</>
|
|
118
|
+
)}
|
|
119
|
+
{email && <meta property="og:email" content={email} />}
|
|
86
120
|
<meta name="twitter:card" content="summary" />
|
|
87
|
-
<meta name="twitter:site" content={url} />
|
|
88
|
-
<meta name="twitter:creator" content={author} />
|
|
89
|
-
<meta name="twitter:title" content={siteName} />
|
|
90
|
-
<meta name="twitter:description" content={description} />
|
|
91
|
-
<meta name="twitter:image" content={cover} />
|
|
92
121
|
|
|
93
122
|
{children}
|
|
94
123
|
</>
|