@progress/kendo-react-common 14.5.0-develop.1 → 14.5.0-develop.11
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/cdn/js/kendo-react-common.js +1 -1
- package/icons/BaseIconProps.d.ts +0 -2
- package/icons/Icon.js +1 -1
- package/icons/Icon.mjs +11 -13
- package/icons/SvgIcon.js +1 -1
- package/icons/SvgIcon.mjs +0 -2
- package/icons/models/theme-color.d.ts +1 -3
- package/package.json +7 -2
- package/theme.js +1 -1
- package/theme.mjs +4 -2
- package/typography/Typography.js +1 -1
- package/typography/Typography.mjs +6 -8
- package/typography/TypographyProps.d.ts +1 -3
- package/unstyled/buttons.d.ts +2 -0
- package/unstyled/buttons.js +1 -1
- package/unstyled/buttons.mjs +39 -38
- package/unstyled/grid.js +1 -1
- package/unstyled/grid.mjs +41 -41
- package/unstyled/icons.d.ts +2 -4
- package/unstyled/icons.js +1 -1
- package/unstyled/icons.mjs +10 -11
- package/unstyled/json-classes.js +1 -1
- package/unstyled/json-classes.mjs +13 -15
- package/validate-package.d.ts +11 -0
- package/validate-package.js +2 -2
- package/validate-package.mjs +16 -9
- package/watermark/WatermarkOverlay.js +1 -1
- package/watermark/WatermarkOverlay.mjs +82 -182
package/icons/BaseIconProps.d.ts
CHANGED
|
@@ -40,8 +40,6 @@ export interface BaseIconProps {
|
|
|
40
40
|
* * `success`— Applies coloring based on success theme color.
|
|
41
41
|
* * `warning`— Applies coloring based on warning theme color.
|
|
42
42
|
* * `error`— Applies coloring based on error theme color.
|
|
43
|
-
* * `dark`— Applies coloring based on dark theme color.
|
|
44
|
-
* * `light`— Applies coloring based on light theme color.
|
|
45
43
|
* * `inverse`— Applies coloring based on inverse theme color.
|
|
46
44
|
*
|
|
47
45
|
* If the property is not set, the icon inherits the color from its parent.
|
package/icons/Icon.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),r=require("prop-types"),z=require("../classNames.js"),I=require("./constants.js"),N=require("./utils.js"),P=require("../hooks/useMouse.js");function S(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const e=S(x),i=e.forwardRef((t,n)=>{const{className:s,name:o,themeColor:l,size:u,flip:f,style:g,id:b,tabIndex:y,...h}=t,c=e.useRef(null),m=e.useRef(null);e.useImperativeHandle(c,()=>({element:m.current})),e.useImperativeHandle(n,()=>c.current);const p=e.useMemo(()=>u||d.size,[u]),a=e.useMemo(()=>f||d.flip,[f]),O=e.useMemo(()=>z.classNames("k-icon","k-font-icon",o&&N.toIconClass(o),{[`k-color-${l}`]:l,"k-flip-h":a==="horizontal"||a==="both","k-flip-v":a==="vertical"||a==="both"},I.SIZE_CLASSES[p],s),[o,l,p,a,s]),v=P.useMouse(t,c);return e.createElement("span",{ref:m,...h,...v,className:O,id:b,tabIndex:y,style:g,role:"presentation"})});i.propTypes={style:r.object,classNames:r.string,name:r.string,themeColor:r.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react"),r=require("prop-types"),z=require("../classNames.js"),I=require("./constants.js"),N=require("./utils.js"),P=require("../hooks/useMouse.js");function S(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const s in t)if(s!=="default"){const o=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,o.get?o:{enumerable:!0,get:()=>t[s]})}}return n.default=t,Object.freeze(n)}const e=S(x),i=e.forwardRef((t,n)=>{const{className:s,name:o,themeColor:l,size:u,flip:f,style:g,id:b,tabIndex:y,...h}=t,c=e.useRef(null),m=e.useRef(null);e.useImperativeHandle(c,()=>({element:m.current})),e.useImperativeHandle(n,()=>c.current);const p=e.useMemo(()=>u||d.size,[u]),a=e.useMemo(()=>f||d.flip,[f]),O=e.useMemo(()=>z.classNames("k-icon","k-font-icon",o&&N.toIconClass(o),{[`k-color-${l}`]:l,"k-flip-h":a==="horizontal"||a==="both","k-flip-v":a==="vertical"||a==="both"},I.SIZE_CLASSES[p],s),[o,l,p,a,s]),v=P.useMouse(t,c);return e.createElement("span",{ref:m,...h,...v,className:O,id:b,tabIndex:y,style:g,role:"presentation"})});i.propTypes={style:r.object,classNames:r.string,name:r.string,themeColor:r.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","inverse"]),size:r.oneOf(["default","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"]),flip:r.oneOf(["default","horizontal","vertical","both"])};const d={size:"default",flip:"default"};i.displayName="KendoIcon";exports.Icon=i;
|
package/icons/Icon.mjs
CHANGED
|
@@ -8,30 +8,30 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
10
|
import o from "prop-types";
|
|
11
|
-
import { classNames as
|
|
12
|
-
import { SIZE_CLASSES as
|
|
13
|
-
import { toIconClass as
|
|
14
|
-
import { useMouse as
|
|
11
|
+
import { classNames as v } from "../classNames.mjs";
|
|
12
|
+
import { SIZE_CLASSES as N } from "./constants.mjs";
|
|
13
|
+
import { toIconClass as b } from "./utils.mjs";
|
|
14
|
+
import { useMouse as k } from "../hooks/useMouse.mjs";
|
|
15
15
|
const u = e.forwardRef((l, d) => {
|
|
16
|
-
const { className: n, name: s, themeColor: t, size: i, flip: m, style: h, id:
|
|
16
|
+
const { className: n, name: s, themeColor: t, size: i, flip: m, style: h, id: x, tabIndex: g, ...y } = l, a = e.useRef(null), f = e.useRef(null);
|
|
17
17
|
e.useImperativeHandle(a, () => ({
|
|
18
18
|
element: f.current
|
|
19
19
|
})), e.useImperativeHandle(d, () => a.current);
|
|
20
20
|
const c = e.useMemo(() => i || p.size, [i]), r = e.useMemo(() => m || p.flip, [m]), z = e.useMemo(
|
|
21
|
-
() =>
|
|
21
|
+
() => v(
|
|
22
22
|
"k-icon",
|
|
23
23
|
"k-font-icon",
|
|
24
|
-
s &&
|
|
24
|
+
s && b(s),
|
|
25
25
|
{
|
|
26
26
|
[`k-color-${t}`]: t,
|
|
27
27
|
"k-flip-h": r === "horizontal" || r === "both",
|
|
28
28
|
"k-flip-v": r === "vertical" || r === "both"
|
|
29
29
|
},
|
|
30
|
-
|
|
30
|
+
N[c],
|
|
31
31
|
n
|
|
32
32
|
),
|
|
33
33
|
[s, t, c, r, n]
|
|
34
|
-
), I =
|
|
34
|
+
), I = k(l, a);
|
|
35
35
|
return /* @__PURE__ */ e.createElement(
|
|
36
36
|
"span",
|
|
37
37
|
{
|
|
@@ -39,8 +39,8 @@ const u = e.forwardRef((l, d) => {
|
|
|
39
39
|
...y,
|
|
40
40
|
...I,
|
|
41
41
|
className: z,
|
|
42
|
-
id:
|
|
43
|
-
tabIndex:
|
|
42
|
+
id: x,
|
|
43
|
+
tabIndex: g,
|
|
44
44
|
style: h,
|
|
45
45
|
role: "presentation"
|
|
46
46
|
}
|
|
@@ -59,8 +59,6 @@ u.propTypes = {
|
|
|
59
59
|
"success",
|
|
60
60
|
"error",
|
|
61
61
|
"warning",
|
|
62
|
-
"dark",
|
|
63
|
-
"light",
|
|
64
62
|
"inverse"
|
|
65
63
|
]),
|
|
66
64
|
size: o.oneOf(["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"]),
|
package/icons/SvgIcon.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),i=require("prop-types"),S=require("../classNames.js"),M=require("../unstyled/icons.js"),H=require("../unstyled/unstyled-context.js");function R(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(l,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return l.default=e,Object.freeze(l)}const t=R(q),m=t.forwardRef((e,l)=>{const{children:s,className:r,svgClassName:N,icon:n,flip:f,id:p,tabIndex:z,size:g,style:a,svgStyle:I,themeColor:u,viewBox:v,name:_,onClick:P,...O}=e,w=t.useRef(null),y=H.useUnstyled(),h=y&&y.uSvgIcon;t.useImperativeHandle(l,()=>({element:w.current}));const b=t.useMemo(()=>n?n.name:c.icon,[n]),d=t.useMemo(()=>n?n.content:void 0,[n]),x=t.useMemo(()=>g||c.size,[g]),o=t.useMemo(()=>f||c.flip,[f]),C=t.useMemo(()=>v||c.viewBox,[v]),j=t.useMemo(()=>S.classNames(M.uSvgIcon.wrapper({c:h,iconNameProp:b,themeColor:u,flipH:o==="horizontal"||o==="both",flipV:o==="vertical"||o==="both",size:x}),r),[h,b,u,o,x,r]),B=t.useMemo(()=>e.width&&e.height?{width:e.width,height:e.height,...a}:e.width?{width:e.width,height:e.width,...a}:e.height?{width:e.height,height:e.height,...a}:{...a},[e.width,e.height,a]),T=t.useMemo(()=>d?{__html:d}:void 0,[d]);return t.createElement("span",{className:S.classNames(M.uSvgIcon.svg({c:h,themeColor:u,flipH:o==="horizontal"||o==="both",flipV:o==="vertical"||o==="both"}),j),style:B,ref:w,onClick:P,"aria-hidden":!0},t.createElement("svg",{id:p,className:N,style:I,"aria-hidden":!0,tabIndex:z,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:n?n.viewBox:C,dangerouslySetInnerHTML:T,...O},n?void 0:s))});m.propTypes={style:i.object,classNames:i.string,children:i.any,icon:i.object,themeColor:i.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react"),i=require("prop-types"),S=require("../classNames.js"),M=require("../unstyled/icons.js"),H=require("../unstyled/unstyled-context.js");function R(e){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const s in e)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(l,s,r.get?r:{enumerable:!0,get:()=>e[s]})}}return l.default=e,Object.freeze(l)}const t=R(q),m=t.forwardRef((e,l)=>{const{children:s,className:r,svgClassName:N,icon:n,flip:f,id:p,tabIndex:z,size:g,style:a,svgStyle:I,themeColor:u,viewBox:v,name:_,onClick:P,...O}=e,w=t.useRef(null),y=H.useUnstyled(),h=y&&y.uSvgIcon;t.useImperativeHandle(l,()=>({element:w.current}));const b=t.useMemo(()=>n?n.name:c.icon,[n]),d=t.useMemo(()=>n?n.content:void 0,[n]),x=t.useMemo(()=>g||c.size,[g]),o=t.useMemo(()=>f||c.flip,[f]),C=t.useMemo(()=>v||c.viewBox,[v]),j=t.useMemo(()=>S.classNames(M.uSvgIcon.wrapper({c:h,iconNameProp:b,themeColor:u,flipH:o==="horizontal"||o==="both",flipV:o==="vertical"||o==="both",size:x}),r),[h,b,u,o,x,r]),B=t.useMemo(()=>e.width&&e.height?{width:e.width,height:e.height,...a}:e.width?{width:e.width,height:e.width,...a}:e.height?{width:e.height,height:e.height,...a}:{...a},[e.width,e.height,a]),T=t.useMemo(()=>d?{__html:d}:void 0,[d]);return t.createElement("span",{className:S.classNames(M.uSvgIcon.svg({c:h,themeColor:u,flipH:o==="horizontal"||o==="both",flipV:o==="vertical"||o==="both"}),j),style:B,ref:w,onClick:P,"aria-hidden":!0},t.createElement("svg",{id:p,className:N,style:I,"aria-hidden":!0,tabIndex:z,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:n?n.viewBox:C,dangerouslySetInnerHTML:T,...O},n?void 0:s))});m.propTypes={style:i.object,classNames:i.string,children:i.any,icon:i.object,themeColor:i.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","inverse"]),size:i.oneOf(["default","xsmall","small","medium","large","xlarge","xxlarge","xxxlarge"]),flip:i.oneOf(["default","horizontal","vertical","both"])};const c={size:"default",flip:"default",icon:"",viewBox:"0 0 24 24"};m.displayName="KendoSvgIcon";exports.SvgIcon=m;
|
package/icons/SvgIcon.mjs
CHANGED
|
@@ -17,12 +17,10 @@
|
|
|
17
17
|
* * `success`— Applies coloring based on success theme color.
|
|
18
18
|
* * `warning`— Applies coloring based on warning theme color.
|
|
19
19
|
* * `error`— Applies coloring based on error theme color.
|
|
20
|
-
* * `dark`— Applies coloring based on dark theme color.
|
|
21
|
-
* * `light`— Applies coloring based on light theme color.
|
|
22
20
|
* * `inverse`— Applies coloring based on inverse theme color.
|
|
23
21
|
*
|
|
24
22
|
* If the property is not set, the icon inherits the color from its parent.
|
|
25
23
|
*
|
|
26
24
|
* You can use the `style` prop to apply custom color related properties to the icon.
|
|
27
25
|
*/
|
|
28
|
-
export type IconThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | '
|
|
26
|
+
export type IconThemeColor = 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'inverse';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-common",
|
|
3
|
-
"version": "14.5.0-develop.
|
|
3
|
+
"version": "14.5.0-develop.11",
|
|
4
4
|
"description": "React Common package delivers common utilities that can be used with the KendoReact UI components. KendoReact Common Utilities package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"sideEffects": false,
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.2",
|
|
29
|
-
"@progress/kendo-svg-icons": "^4.0.0",
|
|
29
|
+
"@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
|
|
30
30
|
"react": "^18.0.0 || ^19.0.0",
|
|
31
31
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
32
32
|
},
|
|
@@ -58,5 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"peerDependenciesMeta": {
|
|
63
|
+
"@progress/kendo-svg-icons": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
61
66
|
}
|
|
62
67
|
}
|
package/theme.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={sizeMap:{small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg",full:"full",none:"none"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};exports.kendoThemeMaps=e;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={sizeMap:{xsmall:"xs",xs:"xs",small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg",full:"full",none:"none"},orientationMap:{vertical:"vstack",horizontal:"hstack"}};exports.kendoThemeMaps=e;
|
package/theme.mjs
CHANGED
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
const
|
|
8
|
+
const l = {
|
|
9
9
|
sizeMap: {
|
|
10
|
+
xsmall: "xs",
|
|
11
|
+
xs: "xs",
|
|
10
12
|
small: "sm",
|
|
11
13
|
medium: "md",
|
|
12
14
|
large: "lg"
|
|
@@ -24,5 +26,5 @@ const e = {
|
|
|
24
26
|
}
|
|
25
27
|
};
|
|
26
28
|
export {
|
|
27
|
-
|
|
29
|
+
l as kendoThemeMaps
|
|
28
30
|
};
|
package/typography/Typography.js
CHANGED
|
@@ -6,4 +6,4 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
"use client";
|
|
9
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),t=require("prop-types"),a=require("./constants.js");function j(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const f=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(c,s,f.get?f:{enumerable:!0,get:()=>r[s]})}}return c.default=r,Object.freeze(c)}const l=j(R),n=r=>{const c=l.forwardRef((s,f)=>{const{id:y,style:h,className:m,fontSize:S,fontWeight:d,textAlign:T,textTransform:C,themeColor:E,margin:e,...O}=s,u=l.useRef(null),g=l.useRef(null);l.useImperativeHandle(u,()=>({element:g.current,props:s})),l.useImperativeHandle(f,()=>u.current);const _=()=>`k-${r==="p"?"paragraph":r}`,A=r,b=(i,p)=>{const o=typeof p=="string"?a.MARGIN_ENUM_VALUES[p]:p;return`${a.MARGIN_SIDES_CLASSES[i]}${o}`},N=()=>{if(e!==void 0){if(typeof e=="string")return[a.MARGIN_ENUM_CLASSES[e]];if(typeof e=="number"&&e>=0&&e<=24)return[`k-m-${e}`];if(typeof e=="object"){const i=[];return Object.keys(e).forEach(o=>{e[o]!==null&&e[o]!==void 0&&i.push(b(o,e[o]))}),i.join(" ")}}},M=()=>[_(),a.FONT_SIZE_CLASSES[S],a.FONT_WEIGHT_CLASSES[d],a.TEXT_ALIGN_CLASSES[T],a.TEXT_TRANSFORM_CLASSES[C],a.THEME_COLOR_CLASSES[E],N(),m].filter(o=>o!==void 0).join(" ");return l.createElement(A,{id:y,ref:g,className:M(),style:h,...O},s.children)});return c.propTypes={style:t.object,className:t.string,fontSize:t.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:t.oneOf(["light","normal","bold"]),margin:t.oneOfType([t.number,t.object,t.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:t.oneOf(["left","right","center","justify"]),textTransform:t.oneOf(["lowercase","uppercase","capitalize"]),themeColor:t.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","
|
|
9
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("react"),t=require("prop-types"),a=require("./constants.js");function j(r){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const s in r)if(s!=="default"){const f=Object.getOwnPropertyDescriptor(r,s);Object.defineProperty(c,s,f.get?f:{enumerable:!0,get:()=>r[s]})}}return c.default=r,Object.freeze(c)}const l=j(R),n=r=>{const c=l.forwardRef((s,f)=>{const{id:y,style:h,className:m,fontSize:S,fontWeight:d,textAlign:T,textTransform:C,themeColor:E,margin:e,...O}=s,u=l.useRef(null),g=l.useRef(null);l.useImperativeHandle(u,()=>({element:g.current,props:s})),l.useImperativeHandle(f,()=>u.current);const _=()=>`k-${r==="p"?"paragraph":r}`,A=r,b=(i,p)=>{const o=typeof p=="string"?a.MARGIN_ENUM_VALUES[p]:p;return`${a.MARGIN_SIDES_CLASSES[i]}${o}`},N=()=>{if(e!==void 0){if(typeof e=="string")return[a.MARGIN_ENUM_CLASSES[e]];if(typeof e=="number"&&e>=0&&e<=24)return[`k-m-${e}`];if(typeof e=="object"){const i=[];return Object.keys(e).forEach(o=>{e[o]!==null&&e[o]!==void 0&&i.push(b(o,e[o]))}),i.join(" ")}}},M=()=>[_(),a.FONT_SIZE_CLASSES[S],a.FONT_WEIGHT_CLASSES[d],a.TEXT_ALIGN_CLASSES[T],a.TEXT_TRANSFORM_CLASSES[C],a.THEME_COLOR_CLASSES[E],N(),m].filter(o=>o!==void 0).join(" ");return l.createElement(A,{id:y,ref:g,className:M(),style:h,...O},s.children)});return c.propTypes={style:t.object,className:t.string,fontSize:t.oneOf(["xsmall","small","medium","large","xlarge"]),fontWeight:t.oneOf(["light","normal","bold"]),margin:t.oneOfType([t.number,t.object,t.oneOf(["xsmall","small","medium","large","xlarge","thin","hair"])]),textAlign:t.oneOf(["left","right","center","justify"]),textTransform:t.oneOf(["lowercase","uppercase","capitalize"]),themeColor:t.oneOf(["inherit","primary","secondary","tertiary","info","success","error","warning","inverse"])},c.displayName=`KendoReactTypography${r.toUpperCase()}`,c},L=n("h1"),I=n("h2"),x=n("h3"),v=n("h4"),G=n("h5"),P=n("h6"),$=n("p"),w=n("code"),z=n("pre"),H={h1:L,h2:I,h3:x,h4:v,h5:G,h6:P,p:$,code:w,pre:z};exports.Typography=H;
|
|
@@ -11,7 +11,7 @@ import t from "prop-types";
|
|
|
11
11
|
import { FONT_SIZE_CLASSES as L, FONT_WEIGHT_CLASSES as M, TEXT_ALIGN_CLASSES as x, TEXT_TRANSFORM_CLASSES as I, THEME_COLOR_CLASSES as b, MARGIN_ENUM_CLASSES as j, MARGIN_SIDES_CLASSES as v, MARGIN_ENUM_VALUES as G } from "./constants.mjs";
|
|
12
12
|
const r = (c) => {
|
|
13
13
|
const i = n.forwardRef((l, h) => {
|
|
14
|
-
const { id: m, style: g, className: y, fontSize: S, fontWeight: u, textAlign:
|
|
14
|
+
const { id: m, style: g, className: y, fontSize: S, fontWeight: u, textAlign: C, textTransform: E, themeColor: d, margin: e, ...T } = l, p = n.useRef(null), f = n.useRef(null);
|
|
15
15
|
n.useImperativeHandle(p, () => ({
|
|
16
16
|
element: f.current,
|
|
17
17
|
props: l
|
|
@@ -36,9 +36,9 @@ const r = (c) => {
|
|
|
36
36
|
A(),
|
|
37
37
|
L[S],
|
|
38
38
|
M[u],
|
|
39
|
-
x[
|
|
40
|
-
I[
|
|
41
|
-
b[
|
|
39
|
+
x[C],
|
|
40
|
+
I[E],
|
|
41
|
+
b[d],
|
|
42
42
|
O(),
|
|
43
43
|
y
|
|
44
44
|
].filter((s) => s !== void 0).join(" ");
|
|
@@ -65,12 +65,10 @@ const r = (c) => {
|
|
|
65
65
|
"success",
|
|
66
66
|
"error",
|
|
67
67
|
"warning",
|
|
68
|
-
"dark",
|
|
69
|
-
"light",
|
|
70
68
|
"inverse"
|
|
71
69
|
])
|
|
72
70
|
}, i.displayName = `KendoReactTypography${c.toUpperCase()}`, i;
|
|
73
|
-
}, $ = r("h1"), H = r("h2"), U = r("h3"), w = r("h4"), z = r("h5"), F = r("h6"), W = r("p"), P = r("code"), X = r("pre"),
|
|
71
|
+
}, $ = r("h1"), H = r("h2"), U = r("h3"), w = r("h4"), z = r("h5"), F = r("h6"), W = r("p"), P = r("code"), X = r("pre"), V = {
|
|
74
72
|
h1: $,
|
|
75
73
|
h2: H,
|
|
76
74
|
h3: U,
|
|
@@ -82,5 +80,5 @@ const r = (c) => {
|
|
|
82
80
|
pre: X
|
|
83
81
|
};
|
|
84
82
|
export {
|
|
85
|
-
|
|
83
|
+
V as Typography
|
|
86
84
|
};
|
|
@@ -112,14 +112,12 @@ export interface TypographyProps extends KendoReactComponentBaseProps {
|
|
|
112
112
|
* * `success`— Applies coloring based on success theme color.
|
|
113
113
|
* * `warning`— Applies coloring based on warning theme color.
|
|
114
114
|
* * `error`— Applies coloring based on error theme color.
|
|
115
|
-
* * `dark`— Applies coloring based on dark theme color.
|
|
116
|
-
* * `light`— Applies coloring based on light theme color.
|
|
117
115
|
* * `inverse`— Applies coloring based on inverse theme color.
|
|
118
116
|
*
|
|
119
117
|
* You can use the `style` property to apply custom color related properties to the element.
|
|
120
118
|
*
|
|
121
119
|
*/
|
|
122
|
-
themeColor?: 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | '
|
|
120
|
+
themeColor?: 'inherit' | 'primary' | 'secondary' | 'tertiary' | 'info' | 'success' | 'warning' | 'error' | 'inverse';
|
|
123
121
|
/**
|
|
124
122
|
* Sets a custom property to the element.
|
|
125
123
|
*/
|
package/unstyled/buttons.d.ts
CHANGED
package/unstyled/buttons.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./interfaces/common.js"),e=require("./json-classes.js"),d={wrapper:{main:e.buttonPrefix,size:{small:`${e.buttonPrefix}-${e.sizeMap.small}`,medium:`${e.buttonPrefix}-${e.sizeMap.medium}`,large:`${e.buttonPrefix}-${e.sizeMap.large}`},fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}`},themeColor:{base:`${e.buttonPrefix}-${e.themeColorMap.base}`,primary:`${e.buttonPrefix}-${e.themeColorMap.primary}`,secondary:`${e.buttonPrefix}-${e.themeColorMap.secondary}`,tertiary:`${e.buttonPrefix}-${e.themeColorMap.tertiary}`,info:`${e.buttonPrefix}-${e.themeColorMap.info}`,success:`${e.buttonPrefix}-${e.themeColorMap.success}`,warning:`${e.buttonPrefix}-${e.themeColorMap.warning}`,error:`${e.buttonPrefix}-${e.themeColorMap.error}`,dark:`${e.buttonPrefix}-${e.themeColorMap.dark}`,light:`${e.buttonPrefix}-${e.themeColorMap.light}`,inverse:`${e.buttonPrefix}-${e.themeColorMap.inverse}`},rounded:{small:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.small}`,medium:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.medium}`,large:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.large}`},iconButton:`${e.base.prefix}-${e.elements.icon}-${e.elements.button}`,disabled:`${e.base.prefix}-${e.states.disabled}`,selected:`${e.base.prefix}-${e.states.selected}`,isRtl:`${e.base.prefix}-${e.base.rtl}`},text:`${e.buttonPrefix}-${e.elements.text}`,icon:`${e.buttonPrefix}-${e.elements.icon}`},x={wrapper:o=>{const{isRtl:r,selected:n,disabled:s,size:t,fillMode:u,rounded:a,themeColor:$,iconButton:f,c:m=d}=o,i=m.wrapper,p=$&&i.themeColor?i.themeColor[$]:void 0;return{[i.main]:!0,[i.size[t]]:t&&i.size[t],[`${e.buttonPrefix}-${t}`]:t&&!i.size[t],[i.fillMode[u]]:u&&i.fillMode[u],[p]:p,[i.rounded[a]]:a&&i.rounded[a],[`${e.base.prefix}-${e.base.rounded}-${a}`]:a&&!i.rounded[a],[i.iconButton]:f,[i.disabled]:s,[i.selected]:n,[i.isRtl]:r}},text:o=>{const{c:r=d}=o;return{[r.text]:!0}},icon:o=>{const{c:r=d}=o;return{[r.icon]:!0}}},b={wrapper:{main:`${e.buttonPrefix}-${e.containers.group}`,stretched:`${e.buttonPrefix}-${e.containers.group}-${e.states.stretched}`,disabled:`${e.base.prefix}-${e.states.disabled}`},position:{start:`${e.base.prefix}-${e.containers.group}-${e.directionMap.start}`,end:`${e.base.prefix}-${e.containers.group}-${e.directionMap.end}`}},M={wrapper:o=>{const{stretched:r,disabled:n,c:s=b}=o,t=s.wrapper;return{[t.main]:!0,[t.stretched]:r,[t.disabled]:n}},position:o=>{const{start:r,end:n,c:s=b}=o,t=s.position;return{[t.start]:r,[t.end]:n}}},l={wrapper:{main:`${e.ddbPrefix}-${e.elements.button}`,focus:`${e.base.prefix}-${e.states.focus}`,disabled:`${e.base.prefix}-${e.states.disabled}`},ul:{group:`${e.ddbPrefix}-${e.containers.group}`,size:{small:`${e.ddbPrefix}-${e.containers.group}-${e.sizeMap.small}`,medium:`${e.ddbPrefix}-${e.containers.group}-${e.sizeMap.medium}`,large:`${e.ddbPrefix}-${e.containers.group}-${e.sizeMap.large}`}},li:{item:`${e.base.prefix}-${e.containers.item}`,focus:`${e.base.prefix}-${e.states.focus}`},item:`${e.ddbPrefix}-${e.containers.item}`,link:{main:`${e.base.prefix}-${e.elements.link}`,link:`${e.ddbPrefix}-${e.elements.link}`,selected:`${e.base.prefix}-${e.states.selected}`,disabled:`${e.base.prefix}-${e.states.disabled}`},popup:`${e.ddbPrefix}-${e.containers.popup}`},P={wrapper:o=>{const{focused:r,disabled:n,c:s=l}=o,t=s.wrapper;return{[t.main]:!0,[t.focus]:r,[t.disabled]:n}},ul:o=>{const{size:r,c:n=l}=o,s=n.ul;return{[s.group]:!0,[s.size[r]]:s.size[r],[`${e.ddbPrefix}-${e.containers.group}-${r}`]:r&&!s.size[r]}},li:o=>{const{focused:r,c:n=l}=o,s=n.li;return{[s.item]:!0,[s.focus]:r}},item:c.getClassByName(l,"item"),link:o=>{const{selected:r,disabled:n,c:s=l}=o,t=s.link;return{[t.main]:!0,[t.link]:!0,[t.selected]:r,[t.disabled]:n}},popup:c.getClassByName(l,"popup")};exports.uButton=x;exports.uButtonGroup=M;exports.uDropDownButton=P;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./interfaces/common.js"),e=require("./json-classes.js"),d={wrapper:{main:e.buttonPrefix,size:{xs:`${e.buttonPrefix}-${e.sizeMap.xsmall}`,small:`${e.buttonPrefix}-${e.sizeMap.small}`,medium:`${e.buttonPrefix}-${e.sizeMap.medium}`,large:`${e.buttonPrefix}-${e.sizeMap.large}`},fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}`},themeColor:{base:`${e.buttonPrefix}-${e.themeColorMap.base}`,primary:`${e.buttonPrefix}-${e.themeColorMap.primary}`,secondary:`${e.buttonPrefix}-${e.themeColorMap.secondary}`,tertiary:`${e.buttonPrefix}-${e.themeColorMap.tertiary}`,info:`${e.buttonPrefix}-${e.themeColorMap.info}`,success:`${e.buttonPrefix}-${e.themeColorMap.success}`,warning:`${e.buttonPrefix}-${e.themeColorMap.warning}`,error:`${e.buttonPrefix}-${e.themeColorMap.error}`,dark:`${e.buttonPrefix}-${e.themeColorMap.dark}`,light:`${e.buttonPrefix}-${e.themeColorMap.light}`,inverse:`${e.buttonPrefix}-${e.themeColorMap.inverse}`},rounded:{small:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.small}`,medium:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.medium}`,large:`${e.base.prefix}-${e.base.rounded}-${e.roundedMap.large}`},iconButton:`${e.base.prefix}-${e.elements.icon}-${e.elements.button}`,disabled:`${e.base.prefix}-${e.states.disabled}`,selected:`${e.base.prefix}-${e.states.selected}`,isRtl:`${e.base.prefix}-${e.base.rtl}`},text:`${e.buttonPrefix}-${e.elements.text}`,icon:`${e.buttonPrefix}-${e.elements.icon}`},x={wrapper:o=>{const{isRtl:r,selected:n,disabled:s,size:t,fillMode:u,rounded:a,themeColor:$,iconButton:f,c:m=d}=o,i=m.wrapper,p=$&&i.themeColor?i.themeColor[$]:void 0;return{[i.main]:!0,[i.size[t]]:t&&i.size[t],[`${e.buttonPrefix}-${t}`]:t&&!i.size[t],[i.fillMode[u]]:u&&i.fillMode[u],[p]:p,[i.rounded[a]]:a&&i.rounded[a],[`${e.base.prefix}-${e.base.rounded}-${a}`]:a&&!i.rounded[a],[i.iconButton]:f,[i.disabled]:s,[i.selected]:n,[i.isRtl]:r}},text:o=>{const{c:r=d}=o;return{[r.text]:!0}},icon:o=>{const{c:r=d}=o;return{[r.icon]:!0}}},b={wrapper:{main:`${e.buttonPrefix}-${e.containers.group}`,stretched:`${e.buttonPrefix}-${e.containers.group}-${e.states.stretched}`,disabled:`${e.base.prefix}-${e.states.disabled}`},position:{start:`${e.base.prefix}-${e.containers.group}-${e.directionMap.start}`,end:`${e.base.prefix}-${e.containers.group}-${e.directionMap.end}`}},M={wrapper:o=>{const{stretched:r,disabled:n,c:s=b}=o,t=s.wrapper;return{[t.main]:!0,[t.stretched]:r,[t.disabled]:n}},position:o=>{const{start:r,end:n,c:s=b}=o,t=s.position;return{[t.start]:r,[t.end]:n}}},l={wrapper:{main:`${e.ddbPrefix}-${e.elements.button}`,focus:`${e.base.prefix}-${e.states.focus}`,disabled:`${e.base.prefix}-${e.states.disabled}`},ul:{group:`${e.ddbPrefix}-${e.containers.group}`,size:{small:`${e.ddbPrefix}-${e.containers.group}-${e.sizeMap.small}`,medium:`${e.ddbPrefix}-${e.containers.group}-${e.sizeMap.medium}`,large:`${e.ddbPrefix}-${e.containers.group}-${e.sizeMap.large}`}},li:{item:`${e.base.prefix}-${e.containers.item}`,focus:`${e.base.prefix}-${e.states.focus}`},item:`${e.ddbPrefix}-${e.containers.item}`,link:{main:`${e.base.prefix}-${e.elements.link}`,link:`${e.ddbPrefix}-${e.elements.link}`,selected:`${e.base.prefix}-${e.states.selected}`,disabled:`${e.base.prefix}-${e.states.disabled}`},popup:`${e.ddbPrefix}-${e.containers.popup}`},P={wrapper:o=>{const{focused:r,disabled:n,c:s=l}=o,t=s.wrapper;return{[t.main]:!0,[t.focus]:r,[t.disabled]:n}},ul:o=>{const{size:r,c:n=l}=o,s=n.ul;return{[s.group]:!0,[s.size[r]]:s.size[r],[`${e.ddbPrefix}-${e.containers.group}-${r}`]:r&&!s.size[r]}},li:o=>{const{focused:r,c:n=l}=o,s=n.li;return{[s.item]:!0,[s.focus]:r}},item:c.getClassByName(l,"item"),link:o=>{const{selected:r,disabled:n,c:s=l}=o,t=s.link;return{[t.main]:!0,[t.link]:!0,[t.selected]:r,[t.disabled]:n}},popup:c.getClassByName(l,"popup")};exports.uButton=x;exports.uButtonGroup=M;exports.uDropDownButton=P;
|
package/unstyled/buttons.mjs
CHANGED
|
@@ -6,21 +6,22 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { getClassByName as z } from "./interfaces/common.mjs";
|
|
9
|
-
import { buttonPrefix as e, elements as u, base as r, states as
|
|
9
|
+
import { buttonPrefix as e, elements as u, base as r, states as p, roundedMap as g, themeColorMap as d, fillModeMap as x, sizeMap as c, containers as l, directionMap as C, ddbPrefix as a } from "./json-classes.mjs";
|
|
10
10
|
const w = {
|
|
11
11
|
wrapper: {
|
|
12
12
|
main: e,
|
|
13
13
|
size: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
xs: `${e}-${c.xsmall}`,
|
|
15
|
+
small: `${e}-${c.small}`,
|
|
16
|
+
medium: `${e}-${c.medium}`,
|
|
17
|
+
large: `${e}-${c.large}`
|
|
17
18
|
},
|
|
18
19
|
fillMode: {
|
|
19
|
-
solid: `${e}-${
|
|
20
|
-
outline: `${e}-${
|
|
21
|
-
flat: `${e}-${
|
|
22
|
-
link: `${e}-${
|
|
23
|
-
clear: `${e}-${
|
|
20
|
+
solid: `${e}-${x.solid}`,
|
|
21
|
+
outline: `${e}-${x.outline}`,
|
|
22
|
+
flat: `${e}-${x.flat}`,
|
|
23
|
+
link: `${e}-${x.link}`,
|
|
24
|
+
clear: `${e}-${x.clear}`
|
|
24
25
|
},
|
|
25
26
|
themeColor: {
|
|
26
27
|
base: `${e}-${d.base}`,
|
|
@@ -41,23 +42,23 @@ const w = {
|
|
|
41
42
|
large: `${r.prefix}-${r.rounded}-${g.large}`
|
|
42
43
|
},
|
|
43
44
|
iconButton: `${r.prefix}-${u.icon}-${u.button}`,
|
|
44
|
-
disabled: `${r.prefix}-${
|
|
45
|
-
selected: `${r.prefix}-${
|
|
45
|
+
disabled: `${r.prefix}-${p.disabled}`,
|
|
46
|
+
selected: `${r.prefix}-${p.selected}`,
|
|
46
47
|
isRtl: `${r.prefix}-${r.rtl}`
|
|
47
48
|
},
|
|
48
49
|
text: `${e}-${u.text}`,
|
|
49
50
|
icon: `${e}-${u.icon}`
|
|
50
51
|
}, R = {
|
|
51
52
|
wrapper: (o) => {
|
|
52
|
-
const { isRtl: i, selected: n, disabled: s, size: t, fillMode:
|
|
53
|
+
const { isRtl: i, selected: n, disabled: s, size: t, fillMode: b, rounded: m, themeColor: h, iconButton: B, c: y = w } = o, $ = y.wrapper, k = h && $.themeColor ? $.themeColor[h] : void 0;
|
|
53
54
|
return {
|
|
54
55
|
[$.main]: !0,
|
|
55
56
|
[$.size[t]]: t && $.size[t],
|
|
56
57
|
[`${e}-${t}`]: t && !$.size[t],
|
|
57
|
-
[$.fillMode[
|
|
58
|
+
[$.fillMode[b]]: b && $.fillMode[b],
|
|
58
59
|
[k]: k,
|
|
59
|
-
[$.rounded[
|
|
60
|
-
[`${r.prefix}-${r.rounded}-${
|
|
60
|
+
[$.rounded[m]]: m && $.rounded[m],
|
|
61
|
+
[`${r.prefix}-${r.rounded}-${m}`]: m && !$.rounded[m],
|
|
61
62
|
[$.iconButton]: B,
|
|
62
63
|
[$.disabled]: s,
|
|
63
64
|
[$.selected]: n,
|
|
@@ -79,8 +80,8 @@ const w = {
|
|
|
79
80
|
}, M = {
|
|
80
81
|
wrapper: {
|
|
81
82
|
main: `${e}-${l.group}`,
|
|
82
|
-
stretched: `${e}-${l.group}-${
|
|
83
|
-
disabled: `${r.prefix}-${
|
|
83
|
+
stretched: `${e}-${l.group}-${p.stretched}`,
|
|
84
|
+
disabled: `${r.prefix}-${p.disabled}`
|
|
84
85
|
},
|
|
85
86
|
position: {
|
|
86
87
|
start: `${r.prefix}-${l.group}-${C.start}`,
|
|
@@ -102,35 +103,35 @@ const w = {
|
|
|
102
103
|
[t.end]: n
|
|
103
104
|
};
|
|
104
105
|
}
|
|
105
|
-
},
|
|
106
|
+
}, f = {
|
|
106
107
|
wrapper: {
|
|
107
|
-
main: `${
|
|
108
|
-
focus: `${r.prefix}-${
|
|
109
|
-
disabled: `${r.prefix}-${
|
|
108
|
+
main: `${a}-${u.button}`,
|
|
109
|
+
focus: `${r.prefix}-${p.focus}`,
|
|
110
|
+
disabled: `${r.prefix}-${p.disabled}`
|
|
110
111
|
},
|
|
111
112
|
ul: {
|
|
112
|
-
group: `${
|
|
113
|
+
group: `${a}-${l.group}`,
|
|
113
114
|
size: {
|
|
114
|
-
small: `${
|
|
115
|
-
medium: `${
|
|
116
|
-
large: `${
|
|
115
|
+
small: `${a}-${l.group}-${c.small}`,
|
|
116
|
+
medium: `${a}-${l.group}-${c.medium}`,
|
|
117
|
+
large: `${a}-${l.group}-${c.large}`
|
|
117
118
|
}
|
|
118
119
|
},
|
|
119
120
|
li: {
|
|
120
121
|
item: `${r.prefix}-${l.item}`,
|
|
121
|
-
focus: `${r.prefix}-${
|
|
122
|
+
focus: `${r.prefix}-${p.focus}`
|
|
122
123
|
},
|
|
123
|
-
item: `${
|
|
124
|
+
item: `${a}-${l.item}`,
|
|
124
125
|
link: {
|
|
125
126
|
main: `${r.prefix}-${u.link}`,
|
|
126
|
-
link: `${
|
|
127
|
-
selected: `${r.prefix}-${
|
|
128
|
-
disabled: `${r.prefix}-${
|
|
127
|
+
link: `${a}-${u.link}`,
|
|
128
|
+
selected: `${r.prefix}-${p.selected}`,
|
|
129
|
+
disabled: `${r.prefix}-${p.disabled}`
|
|
129
130
|
},
|
|
130
|
-
popup: `${
|
|
131
|
+
popup: `${a}-${l.popup}`
|
|
131
132
|
}, P = {
|
|
132
133
|
wrapper: (o) => {
|
|
133
|
-
const { focused: i, disabled: n, c: s =
|
|
134
|
+
const { focused: i, disabled: n, c: s = f } = o, t = s.wrapper;
|
|
134
135
|
return {
|
|
135
136
|
[t.main]: !0,
|
|
136
137
|
[t.focus]: i,
|
|
@@ -138,23 +139,23 @@ const w = {
|
|
|
138
139
|
};
|
|
139
140
|
},
|
|
140
141
|
ul: (o) => {
|
|
141
|
-
const { size: i, c: n =
|
|
142
|
+
const { size: i, c: n = f } = o, s = n.ul;
|
|
142
143
|
return {
|
|
143
144
|
[s.group]: !0,
|
|
144
145
|
[s.size[i]]: s.size[i],
|
|
145
|
-
[`${
|
|
146
|
+
[`${a}-${l.group}-${i}`]: i && !s.size[i]
|
|
146
147
|
};
|
|
147
148
|
},
|
|
148
149
|
li: (o) => {
|
|
149
|
-
const { focused: i, c: n =
|
|
150
|
+
const { focused: i, c: n = f } = o, s = n.li;
|
|
150
151
|
return {
|
|
151
152
|
[s.item]: !0,
|
|
152
153
|
[s.focus]: i
|
|
153
154
|
};
|
|
154
155
|
},
|
|
155
|
-
item: z(
|
|
156
|
+
item: z(f, "item"),
|
|
156
157
|
link: (o) => {
|
|
157
|
-
const { selected: i, disabled: n, c: s =
|
|
158
|
+
const { selected: i, disabled: n, c: s = f } = o, t = s.link;
|
|
158
159
|
return {
|
|
159
160
|
[t.main]: !0,
|
|
160
161
|
[t.link]: !0,
|
|
@@ -162,7 +163,7 @@ const w = {
|
|
|
162
163
|
[t.disabled]: n
|
|
163
164
|
};
|
|
164
165
|
},
|
|
165
|
-
popup: z(
|
|
166
|
+
popup: z(f, "popup")
|
|
166
167
|
};
|
|
167
168
|
export {
|
|
168
169
|
R as uButton,
|
package/unstyled/grid.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./json-classes.js"),a={wrapper:{main:e.gridPrefix,size:{small:`${e.gridPrefix}-${e.sizeMap.small}`,medium:`${e.gridPrefix}-${e.sizeMap.medium}`},virtual:`${e.gridPrefix}-${e.base.virtual}`,stacked:`${e.gridPrefix}-stack`},ariaRoot:`${e.gridPrefix}-${e.grid.ariaRoot}`,container:`${e.gridPrefix}-${e.containers.container}`,content:{main:`${e.gridPrefix}-${e.containers.content}`,virtual:`${e.base.prefix}-${e.base.virtual}-${e.containers.content}`},tableWrap:`${e.gridPrefix}-${e.grid.tableWrap}`,table:{main:`${e.base.prefix}-${e.elements.table}`,gridTable:`${e.gridPrefix}-${e.elements.table}`,size:{small:`${e.base.prefix}-${e.elements.table}-${e.sizeMap.small}`,medium:`${e.base.prefix}-${e.elements.table}-${e.sizeMap.medium}`}},tbody:`${e.base.prefix}-${e.elements.table}-${e.elements.tbody}`,thead:{main:`${e.
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./json-classes.js"),a={wrapper:{main:e.gridPrefix,size:{small:`${e.gridPrefix}-${e.sizeMap.small}`,medium:`${e.gridPrefix}-${e.sizeMap.medium}`},virtual:`${e.gridPrefix}-${e.base.virtual}`,stacked:`${e.gridPrefix}-stack`},ariaRoot:`${e.gridPrefix}-${e.grid.ariaRoot}`,container:`${e.gridPrefix}-${e.containers.container}`,content:{main:`${e.gridPrefix}-${e.containers.content}`,virtual:`${e.base.prefix}-${e.base.virtual}-${e.containers.content}`},tableWrap:`${e.gridPrefix}-${e.grid.tableWrap}`,table:{main:`${e.base.prefix}-${e.elements.table}`,gridTable:`${e.gridPrefix}-${e.elements.table}`,size:{small:`${e.base.prefix}-${e.elements.table}-${e.sizeMap.small}`,medium:`${e.base.prefix}-${e.elements.table}-${e.sizeMap.medium}`}},tbody:`${e.base.prefix}-${e.elements.table}-${e.elements.tbody}`,thead:{main:`${e.base.prefix}-${e.elements.table}-${e.elements.thead}`,draggable:`${e.gridPrefix}-${e.states.draggable}-${e.elements.header}`},header:{main:`${e.gridPrefix}-${e.elements.header}`,draggable:`${e.gridPrefix}-${e.states.draggable}-${e.elements.header}`},headerWrap:`${e.gridPrefix}-${e.elements.header}-${e.containers.wrap}`,headerTable:{main:`${e.base.prefix}-${e.elements.table}`,header:`${e.gridPrefix}-${e.elements.header}-${e.elements.table}`,size:{small:`${e.base.prefix}-${e.elements.table}-${e.sizeMap.small}`,medium:`${e.base.prefix}-${e.elements.table}-${e.sizeMap.medium}`}},headerTh:{main:`${e.base.prefix}-${e.elements.table}-${e.elements.th}`,header:`${e.base.prefix}-${e.elements.header}`,first:`${e.base.prefix}-${e.states.first}`,filterable:`${e.base.prefix}-${e.states.filterable}`,locked:`${e.gridPrefix}-${e.elements.header}-${e.states.sticky}`,sorted:`${e.base.prefix}-${e.states.sorted}`},tableThead:`${e.base.prefix}-${e.elements.table}-${e.elements.thead}`,heightContainer:`${e.base.prefix}-${e.dimensions.height}-${e.containers.container}`,sortIcon:`${e.base.prefix}-${e.states.sort}-${e.elements.icon}`,sortOrder:`${e.base.prefix}-${e.states.sort}-${e.states.order}`,tr:{main:`${e.base.prefix}-${e.elements.table}-${e.grid.row}`,header:`${e.base.prefix}-${e.elements.table}-${e.grid.group}-${e.grid.row}`,grouping:`${e.base.prefix}-${e.states.grouping}-${e.grid.row}`,footer:`${e.base.prefix}-${e.grid.group}-${e.elements.footer}`,master:`${e.base.prefix}-${e.grid.master}-${e.grid.row}`,rowAlt:`${e.base.prefix}-${e.elements.table}-${e.states.alt}-${e.grid.row}`,selected:`${e.base.prefix}-${e.states.selected}`,highlighted:`${e.base.prefix}-${e.states.highlighted}`,isInEdit:`${e.gridPrefix}-${e.states.edit}-${e.grid.row}`,isPinned:`${e.base.prefix}-pinned-source`},detailTr:{main:`${e.base.prefix}-${e.elements.table}-${e.grid.row}`,row:`${e.base.prefix}-${e.grid.detail}-${e.grid.row}`,rowAlt:`${e.base.prefix}-${e.elements.table}-${e.states.alt}-${e.grid.row}`},simpleTr:`${e.base.prefix}-${e.elements.table}-${e.grid.row}`,headerCellInner:`${e.base.prefix}-${e.grid.cellInner}`,columnTitle:`${e.base.prefix}-${e.grid.column}-${e.elements.title}`,headerCellLink:{main:`${e.base.prefix}-${e.elements.link}`,notSortable:`${e.base.important}${e.base.prefix}-${e.cursor.default}`},noRecords:`${e.gridPrefix}-${e.grid.noRecords}`,noRecordsTemplate:`${e.gridPrefix}-${e.grid.noRecords}-${e.states.template}`,pager:`${e.gridPrefix}-${e.grid.pager}`,sorted:`${e.base.prefix}-${e.states.sorted}`,contentSticky:`${e.gridPrefix}-${e.containers.content}-${e.states.sticky}`,hierarchyCell:{main:`${e.base.prefix}-${e.grid.hierarchy}-${e.grid.cell}`,header:`${e.base.prefix}-${e.elements.header}`},rowReorder:{dropIndicator:{main:`${e.base.prefix}-${e.gridRowReorder.drop}-${e.gridRowReorder.hint}`,direction:`${e.base.prefix}-${e.gridRowReorder.drop}-${e.gridRowReorder.hint}-${e.gridRowReorder.horizontal}`},dragClue:{main:`${e.base.prefix}-${e.gridRowReorder.drag}-${e.gridRowReorder.clue}`,operation:`${e.base.prefix}-${e.gridRowReorder.reorder}-${e.gridRowReorder.clue}`}},td:{main:`${e.base.prefix}-${e.elements.table}-${e.elements.td}`,selected:`${e.base.prefix}-${e.states.selected}`,highlighted:`${e.base.prefix}-${e.states.highlighted}`},detailTd:{main:`${e.base.prefix}-${e.elements.table}-${e.elements.td}`,cell:`${e.base.prefix}-${e.grid.detail}-${e.grid.cell}`},editTd:{main:`${e.base.prefix}-${e.elements.table}-${e.elements.td}`,cell:`${e.gridPrefix}-${e.states.edit}-${e.grid.cell}`,selected:`${e.base.prefix}-${e.states.selected}`},hierarchyTd:{main:`${e.base.prefix}-${e.elements.table}-${e.elements.td}`,cell:`${e.base.prefix}-${e.grid.hierarchy}-${e.grid.cell}`},stickyContainer:{main:`${e.gridPrefix}-${e.states.sticky}-${e.containers.container}`,bottom:`${e.base.prefix}-pos-${e.states.bottom}`},srOnly:`${e.base.prefix}-sr-only`},b={wrapper:t=>{const{size:r,virtual:i,isStackedMode:n,c:d=a.wrapper}=t;return{[d.main]:!0,[d.size[r]]:d.size[r],[`${e.gridPrefix}-${r}`]:r&&!d.size[r],[d.virtual]:i,[d.stacked]:n}},ariaRoot:t=>{const{c:r=a}=t;return r.ariaRoot},container:t=>{const{c:r=a}=t;return r.container},content:t=>{const{c:r=a.content}=t;return{[r.main]:!0,[r.virtual]:!0}},tableWrap:t=>{const{c:r=a}=t;return r.tableWrap},table:t=>{var n,d,s;const{size:r,c:i=a.table}=t;return{[i.main]:!0,[i.gridTable]:!0,[(n=i.size)==null?void 0:n[r]]:r!==void 0&&((d=i.size)==null?void 0:d[r]),[`${e.base.prefix}-${e.elements.table}-${r}`]:r!==void 0&&!((s=i.size)!=null&&s[r])}},tbody:t=>{const{c:r=a}=t;return r.tbody},thead:t=>{const{draggable:r,c:i=a.thead}=t;return{[i.main]:!0,[i.draggable]:r}},header:t=>{const{draggable:r,c:i=a.header}=t;return{[i.main]:!0,[i.draggable]:r}},headerWrap:t=>{const{c:r=a}=t;return r.headerWrap},headerTable:t=>{const{size:r,c:i=a.headerTable}=t;return{[i.main]:!0,[i.header]:!0,[i.size[r]]:r!==void 0&&i.size[r],[`${e.base.prefix}-${e.elements.table}-${r}`]:r!==void 0&&!i.size[r]}},headerTh:t=>{const{first:r,filterable:i,locked:n,sorted:d,c:s=a.headerTh}=t;return{[s.main]:!0,[s.header]:!0,[s.first]:r,[s.filterable]:i,[s.locked]:n,[s.sorted]:d}},tableThead:t=>{const{c:r=a}=t;return r.tableThead},heightContainer:t=>{const{c:r=a}=t;return r.heightContainer},sortIcon:t=>{const{c:r=a}=t;return r.sortIcon},sortOrder:t=>{const{c:r=a}=t;return r.sortOrder},tr:t=>{const{isHeader:r,isFooter:i,isMaster:n,isAltRow:d,selected:s,highlighted:o,isInEdit:$,isPinned:c,c:l=a.tr}=t;return{[l.main]:!0,[l.header]:r,[l.grouping]:r,[l.footer]:i,[l.master]:n,[l.rowAlt]:n&&d,[l.selected]:s,[l.highlighted]:o,[l.isInEdit]:$,[l.isPinned]:c}},detailTr:t=>{const{isAlt:r,c:i=a.detailTr}=t;return{[i.main]:!0,[i.row]:!0,[i.rowAlt]:r}},simpleTr:t=>{const{c:r=a}=t;return r.simpleTr},rowReorder:t=>{const{dropIndicatorMain:r,dropIndicatorDirection:i,dragClueMain:n,dragClueOperation:d,c:s=a.rowReorder}=t;return{[s.dropIndicator.main]:r,[s.dropIndicator.direction]:i,[s.dragClue.main]:n,[s.dragClue.operation]:d}},headerCellInner:t=>{const{c:r=a}=t;return r.headerCellInner},columnTitle:t=>{const{c:r=a}=t;return r.columnTitle},headerCellLink:t=>{const{sortable:r,c:i=a.headerCellLink}=t;return{[i.main]:!0,[i.notSortable]:!r}},noRecords:t=>{const{c:r=a}=t;return r.noRecords},noRecordsTemplate:t=>{const{c:r=a}=t;return r.noRecordsTemplate},pager:t=>{const{c:r=a}=t;return r.pager},sorted:t=>{const{c:r=a}=t;return r.sorted},contentSticky:t=>{const{locked:r,c:i=a}=t;return{[i.contentSticky]:r}},hierarchyCell:t=>{const{c:r=a.hierarchyCell}=t;return{[r.main]:!0,[r.header]:!0}},td:t=>{const{selected:r,highlighted:i,c:n=a.td}=t;return{[n.main]:!0,[n.selected]:r,[n.highlighted]:i}},detailTd:t=>{const{c:r=a.detailTd}=t;return{[r.main]:!0,[r.cell]:!0}},editTd:t=>{const{selected:r,c:i=a.editTd}=t;return{[i.main]:!0,[i.cell]:!0,[i.selected]:r}},hierarchyTd:t=>{const{c:r=a.hierarchyTd}=t;return{[r.main]:!0,[r.cell]:!0}},stickyContainer:t=>{const{bottom:r,c:i=a.stickyContainer}=t;return{[i.main]:!0,[i.bottom]:r}},srOnly:t=>{const{c:r=a}=t;return r.srOnly}};exports.uGrid=b;
|