@progress/kendo-vue-common 8.4.0-develop.3 → 8.4.0-develop.5
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-vue-common.js +1 -1
- package/icons/BaseIconProps.d.ts +11 -2
- package/icons/FontIcon.d.ts +6 -0
- package/icons/FontIcon.js +1 -1
- package/icons/FontIcon.mjs +12 -7
- package/icons/Icon.d.ts +2 -0
- package/icons/Icon.js +1 -1
- package/icons/Icon.mjs +23 -20
- package/icons/SvgIcon.d.ts +34 -0
- package/icons/SvgIcon.js +1 -1
- package/icons/SvgIcon.mjs +39 -26
- package/icons/models/fill-mode.d.ts +16 -0
- package/icons/models/theme-color.d.ts +1 -3
- package/icons/models/variant.d.ts +16 -0
- package/index.d.mts +2 -0
- package/index.d.ts +2 -0
- package/package.json +1 -1
- package/theme.js +1 -1
- package/theme.mjs +1 -0
- package/unstyled/buttons.d.ts +0 -4
- package/unstyled/buttons.js +1 -1
- package/unstyled/buttons.mjs +111 -129
- package/unstyled/icons.d.ts +2 -0
- package/unstyled/icons.js +1 -1
- package/unstyled/icons.mjs +10 -11
- package/unstyled/json-classes.js +1 -1
- package/unstyled/json-classes.mjs +6 -8
package/icons/Icon.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 o=require("vue"),
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),b=require("./FontIcon.js"),y=require("./SvgIcon.js"),C=o.defineComponent({name:"KendoIcon",emits:{click:null},inject:{kendoIcons:{default:{type:"svg",icons:{}}}},props:{name:String,icon:Object,title:String,themeColor:{type:String},size:{type:String},flip:{type:String},id:String,ariaLabel:String,viewBox:{type:String,default:"0 0 24 24"},tabIndex:Number,role:String,variant:String},render(){const{name:n,icon:e,themeColor:c,size:r,flip:d,id:l,viewBox:a,tabIndex:h,title:I,ariaLabel:k,role:p,variant:g}=this.$props,i=n&&this.kendoIcons&&this.kendoIcons.icons&&this.kendoIcons.icons[n]||e,m=this.kendoIcons&&this.kendoIcons.type==="svg"&&i!==void 0,S=this.kendoIcons&&this.kendoIcons.size?this.kendoIcons.size:r,u=this.kendoIcons&&this.kendoIcons.flip?this.kendoIcons.flip:d,t=n||(e&&e.name?e.name:void 0),s={themeColor:c,size:S,flip:u,id:l,tabIndex:h,title:I,ariaLabel:k,role:p},v=o.h(b.FontIcon,{...s,name:t,onClick:this.handleClick}),f=o.h(y.SvgIcon,{...s,icon:i,viewBox:a,name:t,variant:g,onClick:this.handleClick});return m?f:v},methods:{handleClick(n){this.$emit("click",n)}}});exports.Icon=C;
|
package/icons/Icon.mjs
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { FontIcon as
|
|
10
|
-
import { SvgIcon as
|
|
11
|
-
const
|
|
8
|
+
import { defineComponent as u, h as s } from "vue";
|
|
9
|
+
import { FontIcon as b } from "./FontIcon.mjs";
|
|
10
|
+
import { SvgIcon as y } from "./SvgIcon.mjs";
|
|
11
|
+
const j = /* @__PURE__ */ u({
|
|
12
12
|
name: "KendoIcon",
|
|
13
13
|
emits: {
|
|
14
14
|
click: null
|
|
@@ -41,7 +41,8 @@ const w = /* @__PURE__ */ C({
|
|
|
41
41
|
default: "0 0 24 24"
|
|
42
42
|
},
|
|
43
43
|
tabIndex: Number,
|
|
44
|
-
role: String
|
|
44
|
+
role: String,
|
|
45
|
+
variant: String
|
|
45
46
|
},
|
|
46
47
|
render() {
|
|
47
48
|
const {
|
|
@@ -51,32 +52,34 @@ const w = /* @__PURE__ */ C({
|
|
|
51
52
|
size: r,
|
|
52
53
|
flip: d,
|
|
53
54
|
id: l,
|
|
54
|
-
viewBox:
|
|
55
|
-
tabIndex:
|
|
56
|
-
title:
|
|
57
|
-
ariaLabel:
|
|
58
|
-
role: I
|
|
59
|
-
|
|
55
|
+
viewBox: a,
|
|
56
|
+
tabIndex: m,
|
|
57
|
+
title: h,
|
|
58
|
+
ariaLabel: p,
|
|
59
|
+
role: I,
|
|
60
|
+
variant: k
|
|
61
|
+
} = this.$props, o = n && this.kendoIcons && this.kendoIcons.icons && this.kendoIcons.icons[n] || e, g = this.kendoIcons && this.kendoIcons.type === "svg" && o !== void 0, f = this.kendoIcons && this.kendoIcons.size ? this.kendoIcons.size : r, S = this.kendoIcons && this.kendoIcons.flip ? this.kendoIcons.flip : d, i = n || (e && e.name ? e.name : void 0), t = {
|
|
60
62
|
themeColor: c,
|
|
61
63
|
size: f,
|
|
62
|
-
flip:
|
|
64
|
+
flip: S,
|
|
63
65
|
id: l,
|
|
64
|
-
tabIndex:
|
|
65
|
-
title:
|
|
66
|
-
ariaLabel:
|
|
66
|
+
tabIndex: m,
|
|
67
|
+
title: h,
|
|
68
|
+
ariaLabel: p,
|
|
67
69
|
role: I
|
|
68
|
-
},
|
|
70
|
+
}, v = s(b, {
|
|
69
71
|
...t,
|
|
70
72
|
name: i,
|
|
71
73
|
onClick: this.handleClick
|
|
72
|
-
}),
|
|
74
|
+
}), C = s(y, {
|
|
73
75
|
...t,
|
|
74
76
|
icon: o,
|
|
75
|
-
viewBox:
|
|
77
|
+
viewBox: a,
|
|
76
78
|
name: i,
|
|
79
|
+
variant: k,
|
|
77
80
|
onClick: this.handleClick
|
|
78
81
|
});
|
|
79
|
-
return
|
|
82
|
+
return g ? C : v;
|
|
80
83
|
},
|
|
81
84
|
methods: {
|
|
82
85
|
handleClick(n) {
|
|
@@ -85,5 +88,5 @@ const w = /* @__PURE__ */ C({
|
|
|
85
88
|
}
|
|
86
89
|
});
|
|
87
90
|
export {
|
|
88
|
-
|
|
91
|
+
j as Icon
|
|
89
92
|
};
|
package/icons/SvgIcon.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import { BaseIconProps } from './BaseIconProps';
|
|
9
|
+
import { IconVariant } from './models/variant';
|
|
9
10
|
/**
|
|
10
11
|
* Specifies the SVG icon.
|
|
11
12
|
*/
|
|
@@ -23,6 +24,13 @@ export interface SVGIcon {
|
|
|
23
24
|
* definition that should be used for the icon.
|
|
24
25
|
*/
|
|
25
26
|
viewBox: string;
|
|
27
|
+
/**
|
|
28
|
+
* A map of variant names to their SVG content strings.
|
|
29
|
+
* The available variants are typically `solid`, `outline`, and `duotone`.
|
|
30
|
+
*/
|
|
31
|
+
variants?: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
26
34
|
}
|
|
27
35
|
/**
|
|
28
36
|
* @hidden
|
|
@@ -48,8 +56,22 @@ export interface SvgIconProps extends BaseIconProps {
|
|
|
48
56
|
* * `name`—The unique name of the icon.
|
|
49
57
|
* * `content`—The entire SVG content of the icon.
|
|
50
58
|
* * `viewBox`—The viewBox definition that should be used for the icon.
|
|
59
|
+
* * `variants`—A map of variant names to their SVG content strings.
|
|
51
60
|
*/
|
|
52
61
|
icon?: SVGIcon;
|
|
62
|
+
/**
|
|
63
|
+
* Specifies the variant of the SVG icon to render.
|
|
64
|
+
*
|
|
65
|
+
* When set, the component renders the SVG content for the specified variant
|
|
66
|
+
* if available in the icon's `variants` map. If the variant is not found,
|
|
67
|
+
* the default `content` is used as a fallback.
|
|
68
|
+
*
|
|
69
|
+
* The possible values are:
|
|
70
|
+
* * `solid`—Renders a filled (solid) version of the icon.
|
|
71
|
+
* * `outline`—Renders an outlined version of the icon.
|
|
72
|
+
* * `duotone`—Renders a two-tone version of the icon.
|
|
73
|
+
*/
|
|
74
|
+
variant?: IconVariant | string;
|
|
53
75
|
/**
|
|
54
76
|
* Specifies the viewBox of the custom SVG icon.
|
|
55
77
|
*/
|
|
@@ -105,6 +127,12 @@ declare const SvgIcon: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
105
127
|
flip: {
|
|
106
128
|
type: StringConstructor;
|
|
107
129
|
};
|
|
130
|
+
fillMode: {
|
|
131
|
+
type: StringConstructor;
|
|
132
|
+
};
|
|
133
|
+
variant: {
|
|
134
|
+
type: StringConstructor;
|
|
135
|
+
};
|
|
108
136
|
id: StringConstructor;
|
|
109
137
|
ariaLabel: StringConstructor;
|
|
110
138
|
title: StringConstructor;
|
|
@@ -140,6 +168,12 @@ declare const SvgIcon: import('vue').DefineComponent<import('vue').ExtractPropTy
|
|
|
140
168
|
flip: {
|
|
141
169
|
type: StringConstructor;
|
|
142
170
|
};
|
|
171
|
+
fillMode: {
|
|
172
|
+
type: StringConstructor;
|
|
173
|
+
};
|
|
174
|
+
variant: {
|
|
175
|
+
type: StringConstructor;
|
|
176
|
+
};
|
|
143
177
|
id: StringConstructor;
|
|
144
178
|
ariaLabel: StringConstructor;
|
|
145
179
|
title: StringConstructor;
|
package/icons/SvgIcon.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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),f=require("./constants.js"),m=require("../defaultSlots.js"),b=l.defineComponent({name:"KendoSvgIcon",emits:{click:null},props:{name:String,icon:Object,themeColor:{type:String},size:{type:String},flip:{type:String},fillMode:{type:String},variant:{type:String},id:String,ariaLabel:String,title:String,viewBox:{type:String,default:"0 0 24 24"},tabIndex:Number,svgClassName:String,svgStyle:Object},computed:{wrapperClass(){const{name:e,icon:i,flip:t,size:n,themeColor:s,fillMode:a}=this.$props,r=e||(i==null?void 0:i.name);return{"k-icon":!0,"k-svg-icon":!0,["k-color-"+s]:s,["k-svg-i-"+r]:r,"k-flip-h":t==="horizontal"||t==="both","k-flip-v":t==="vertical"||t==="both",[f.SIZE_CLASSES[n]]:n,["k-icon-"+a]:a}}},render(){var g;const e=m.getDefaultSlots(this),{svgClassName:i,icon:t,id:n,tabIndex:s,svgStyle:a,viewBox:r,title:p,ariaLabel:S,variant:c}=this.$props,o=c?(g=t==null?void 0:t.variants)==null?void 0:g[c]:void 0,v=o!==void 0&&o!=="";let d;t&&(d=v?o:t.content);const u={id:n,title:p,"aria-hidden":!0,tabIndex:s,ariaLabel:S,focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:t?t.viewBox:r},h=l.h("svg",{...u,innerHTML:d,class:i,style:a},t?[]:[e]);return l.createVNode("span",{class:this.wrapperClass,onClick:this.handleClick,"aria-hidden":!0},[h])},methods:{handleClick(e){this.$emit("click",e)}}});exports.SvgIcon=b;
|
package/icons/SvgIcon.mjs
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { defineComponent as
|
|
9
|
-
import { SIZE_CLASSES as
|
|
10
|
-
import { getDefaultSlots as
|
|
11
|
-
const
|
|
8
|
+
import { defineComponent as h, h as f, createVNode as u } from "vue";
|
|
9
|
+
import { SIZE_CLASSES as b } from "./constants.mjs";
|
|
10
|
+
import { getDefaultSlots as k } from "../defaultSlots.mjs";
|
|
11
|
+
const y = /* @__PURE__ */ h({
|
|
12
12
|
name: "KendoSvgIcon",
|
|
13
13
|
emits: {
|
|
14
14
|
click: null
|
|
@@ -25,6 +25,12 @@ const k = /* @__PURE__ */ g({
|
|
|
25
25
|
flip: {
|
|
26
26
|
type: String
|
|
27
27
|
},
|
|
28
|
+
fillMode: {
|
|
29
|
+
type: String
|
|
30
|
+
},
|
|
31
|
+
variant: {
|
|
32
|
+
type: String
|
|
33
|
+
},
|
|
28
34
|
id: String,
|
|
29
35
|
ariaLabel: String,
|
|
30
36
|
title: String,
|
|
@@ -43,49 +49,56 @@ const k = /* @__PURE__ */ g({
|
|
|
43
49
|
icon: i,
|
|
44
50
|
flip: t,
|
|
45
51
|
size: n,
|
|
46
|
-
themeColor:
|
|
47
|
-
|
|
52
|
+
themeColor: r,
|
|
53
|
+
fillMode: a
|
|
54
|
+
} = this.$props, o = e || (i == null ? void 0 : i.name);
|
|
48
55
|
return {
|
|
49
56
|
"k-icon": !0,
|
|
50
57
|
"k-svg-icon": !0,
|
|
51
|
-
["k-color-" +
|
|
52
|
-
["k-svg-i-" +
|
|
58
|
+
["k-color-" + r]: r,
|
|
59
|
+
["k-svg-i-" + o]: o,
|
|
53
60
|
"k-flip-h": t === "horizontal" || t === "both",
|
|
54
61
|
"k-flip-v": t === "vertical" || t === "both",
|
|
55
|
-
[
|
|
62
|
+
[b[n]]: n,
|
|
63
|
+
["k-icon-" + a]: a
|
|
56
64
|
};
|
|
57
65
|
}
|
|
58
66
|
},
|
|
59
67
|
render() {
|
|
60
|
-
|
|
68
|
+
var p;
|
|
69
|
+
const e = k(this), {
|
|
61
70
|
svgClassName: i,
|
|
62
71
|
icon: t,
|
|
63
72
|
id: n,
|
|
64
|
-
tabIndex:
|
|
65
|
-
svgStyle:
|
|
66
|
-
viewBox:
|
|
67
|
-
title:
|
|
68
|
-
ariaLabel:
|
|
69
|
-
|
|
73
|
+
tabIndex: r,
|
|
74
|
+
svgStyle: a,
|
|
75
|
+
viewBox: o,
|
|
76
|
+
title: d,
|
|
77
|
+
ariaLabel: g,
|
|
78
|
+
variant: l
|
|
79
|
+
} = this.$props, s = l ? (p = t == null ? void 0 : t.variants) == null ? void 0 : p[l] : void 0, m = s !== void 0 && s !== "";
|
|
80
|
+
let c;
|
|
81
|
+
t && (c = m ? s : t.content);
|
|
82
|
+
const v = {
|
|
70
83
|
id: n,
|
|
71
|
-
title:
|
|
84
|
+
title: d,
|
|
72
85
|
"aria-hidden": !0,
|
|
73
|
-
tabIndex:
|
|
74
|
-
ariaLabel:
|
|
86
|
+
tabIndex: r,
|
|
87
|
+
ariaLabel: g,
|
|
75
88
|
focusable: "false",
|
|
76
89
|
xmlns: "http://www.w3.org/2000/svg",
|
|
77
|
-
viewBox: t ? t.viewBox :
|
|
78
|
-
},
|
|
79
|
-
...
|
|
90
|
+
viewBox: t ? t.viewBox : o
|
|
91
|
+
}, S = f("svg", {
|
|
92
|
+
...v,
|
|
80
93
|
innerHTML: c,
|
|
81
94
|
class: i,
|
|
82
|
-
style:
|
|
95
|
+
style: a
|
|
83
96
|
}, t ? [] : [e]);
|
|
84
|
-
return
|
|
97
|
+
return u("span", {
|
|
85
98
|
class: this.wrapperClass,
|
|
86
99
|
onClick: this.handleClick,
|
|
87
100
|
"aria-hidden": !0
|
|
88
|
-
}, [
|
|
101
|
+
}, [S]);
|
|
89
102
|
},
|
|
90
103
|
methods: {
|
|
91
104
|
handleClick(e) {
|
|
@@ -94,5 +107,5 @@ const k = /* @__PURE__ */ g({
|
|
|
94
107
|
}
|
|
95
108
|
});
|
|
96
109
|
export {
|
|
97
|
-
|
|
110
|
+
y as SvgIcon
|
|
98
111
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the fill mode of the Icon.
|
|
10
|
+
*
|
|
11
|
+
* The possible values are:
|
|
12
|
+
* * `solid`—The default icon fill mode.
|
|
13
|
+
* * `outline`—Renders an outlined version of the icon.
|
|
14
|
+
* * `duotone`—Renders a two-tone version of the icon.
|
|
15
|
+
*/
|
|
16
|
+
export type IconFillMode = 'solid' | 'outline' | 'duotone';
|
|
@@ -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';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the variant of the SVG Icon.
|
|
10
|
+
*
|
|
11
|
+
* The possible values are:
|
|
12
|
+
* * `solid`—Renders a filled (solid) version of the icon.
|
|
13
|
+
* * `outline`—Renders an outlined version of the icon.
|
|
14
|
+
* * `duotone`—Renders a two-tone version of the icon.
|
|
15
|
+
*/
|
|
16
|
+
export type IconVariant = 'solid' | 'outline' | 'duotone';
|
package/index.d.mts
CHANGED
|
@@ -41,6 +41,8 @@ export * from './fileExtensionIcon.js';
|
|
|
41
41
|
export * from './icons/models/flip.js';
|
|
42
42
|
export * from './icons/models/size.js';
|
|
43
43
|
export * from './icons/models/theme-color.js';
|
|
44
|
+
export * from './icons/models/fill-mode.js';
|
|
45
|
+
export * from './icons/models/variant.js';
|
|
44
46
|
export * from './navigation.js';
|
|
45
47
|
export * from './getActiveElement.js';
|
|
46
48
|
export * from './unstyled/main.js';
|
package/index.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export * from './fileExtensionIcon';
|
|
|
41
41
|
export * from './icons/models/flip';
|
|
42
42
|
export * from './icons/models/size';
|
|
43
43
|
export * from './icons/models/theme-color';
|
|
44
|
+
export * from './icons/models/fill-mode';
|
|
45
|
+
export * from './icons/models/variant';
|
|
44
46
|
export * from './navigation';
|
|
45
47
|
export * from './getActiveElement';
|
|
46
48
|
export * from './unstyled/main';
|
package/package.json
CHANGED
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:{xsmall:"xs",small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg",full:"full",none:"none"}};exports.kendoThemeMaps=e;
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={sizeMap:{xs:"xs",xsmall:"xs",small:"sm",medium:"md",large:"lg"},roundedMap:{small:"sm",medium:"md",large:"lg",full:"full",none:"none"}};exports.kendoThemeMaps=e;
|
package/theme.mjs
CHANGED
package/unstyled/buttons.d.ts
CHANGED
|
@@ -52,10 +52,6 @@ export interface ButtonWrapperClasses {
|
|
|
52
52
|
warning?: ThemeColorFillModeClasses;
|
|
53
53
|
/** Error theme color options */
|
|
54
54
|
error?: ThemeColorFillModeClasses;
|
|
55
|
-
/** Dark theme color options */
|
|
56
|
-
dark?: ThemeColorFillModeClasses;
|
|
57
|
-
/** Light theme color options */
|
|
58
|
-
light?: ThemeColorFillModeClasses;
|
|
59
55
|
/** Inverse theme color options */
|
|
60
56
|
inverse?: ThemeColorFillModeClasses;
|
|
61
57
|
};
|
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
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("./common.js"),e=require("./json-classes.js"),p={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:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.base}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.base}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.base}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.base}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.base}`}},primary:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.primary}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.primary}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.primary}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.primary}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.primary}`}},secondary:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.secondary}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.secondary}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.secondary}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.secondary}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.secondary}`}},tertiary:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.tertiary}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.tertiary}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.tertiary}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.tertiary}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.tertiary}`}},info:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.info}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.info}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.info}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.info}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.info}`}},success:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.success}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.success}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.success}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.success}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.success}`}},warning:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.warning}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.warning}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.warning}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.warning}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.warning}`}},error:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.error}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.error}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.error}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.error}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${e.themeColorMap.error}`}},inverse:{fillMode:{solid:`${e.buttonPrefix}-${e.fillModeMap.solid}-${e.themeColorMap.inverse}`,outline:`${e.buttonPrefix}-${e.fillModeMap.outline}-${e.themeColorMap.inverse}`,flat:`${e.buttonPrefix}-${e.fillModeMap.flat}-${e.themeColorMap.inverse}`,link:`${e.buttonPrefix}-${e.fillModeMap.link}-${e.themeColorMap.inverse}`,clear:`${e.buttonPrefix}-${e.fillModeMap.clear}-${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}`},w={wrapper:l=>{var u,M,b,c,m,x,P;const{isRtl:t,selected:a,disabled:i,size:o,fillMode:$,rounded:d,themeColor:k,iconButton:g,c:y=p}=l,n=y.wrapper,r=(u=n.themeColor)==null?void 0:u[k],f=(M=r==null?void 0:r.fillMode)==null?void 0:M[$];return{[n.main]:!0,[n.size[o]]:(b=n.size)==null?void 0:b[o],[`${e.buttonPrefix}-${o}`]:o&&!((c=n.size)!=null&&c[o]),[n.fillMode[$]]:(m=n.fillMode)==null?void 0:m[$],[f]:f,[n.rounded[d]]:(x=n.rounded)==null?void 0:x[d],[`${e.base.prefix}-${e.base.rounded}-${d}`]:d&&!((P=n.rounded)!=null&&P[d]),[n.iconButton]:g,[r==null?void 0:r.disabled]:i&&(r==null?void 0:r.disabled),[r==null?void 0:r.selected]:a&&(r==null?void 0:r.selected),[n.disabled]:i,[n.selected]:a,[n.isRtl]:t}},text:l=>{const{c:t=p}=l;return{[t.text]:!0}},icon:l=>{const{c:t=p}=l;return{[t.icon]:!0}}},h={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}`}},z={wrapper:l=>{const{stretched:t,disabled:a,c:i=h}=l,o=i.wrapper;return{[o.main]:!0,[o.stretched]:t,[o.disabled]:a}},position:l=>{const{start:t,end:a,c:i=h}=l,o=i.position;return{[o.start]:t,[o.end]:a}}},s={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}`},B={wrapper:l=>{const{focused:t,disabled:a,c:i=s}=l,o=i.wrapper;return{[o.main]:!0,[o.focus]:t,[o.disabled]:a}},ul:l=>{var o,$;const{size:t,c:a=s}=l,i=a.ul;return{[i.group]:!0,[i.size[t]]:(o=i.size)==null?void 0:o[t],[`${e.ddbPrefix}-${e.containers.group}-${t}`]:t&&!(($=i.size)!=null&&$[t])}},li:l=>{const{focused:t,c:a=s}=l,i=a.li;return{[i.item]:!0,[i.focus]:t}},item:C.getClassByName(s,"item"),link:l=>{const{selected:t,disabled:a,c:i=s}=l,o=i.link;return{[o.main]:!0,[o.link]:!0,[o.selected]:t,[o.disabled]:a}},popup:C.getClassByName(s,"popup")};exports.uButton=w;exports.uButtonGroup=z;exports.uDropDownButton=B;
|