@varlet/ui 3.18.2 → 3.19.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/es/action-sheet/ActionItem.mjs +28 -8
- package/es/action-sheet/actionSheet.css +1 -1
- package/es/action-sheet/index.mjs +4 -2
- package/es/action-sheet/style/index.mjs +1 -1
- package/es/alert/alert.css +1 -1
- package/es/badge/Badge.mjs +20 -10
- package/es/badge/badge.css +1 -1
- package/es/bottom-navigation-item/BottomNavigationItem.mjs +34 -20
- package/es/bottom-navigation-item/bottomNavigationItem.css +1 -1
- package/es/checkbox/Checkbox.mjs +45 -22
- package/es/checkbox/checkbox.css +1 -1
- package/es/chip/Chip.mjs +11 -4
- package/es/chip/chip.css +1 -1
- package/es/chip/props.mjs +4 -0
- package/es/date-input/DateInput.mjs +865 -0
- package/es/date-input/DateInputSfc.css +0 -0
- package/es/date-input/TimeSelect.mjs +201 -0
- package/es/date-input/date-input.css +1 -0
- package/es/date-input/index.mjs +12 -0
- package/es/date-input/props.mjs +77 -0
- package/es/date-input/style/index.mjs +14 -0
- package/es/date-picker/DatePicker.mjs +522 -451
- package/es/date-picker/DayPickerPanel.mjs +318 -0
- package/es/date-picker/MonthPickerPanel.mjs +187 -0
- package/es/date-picker/PanelHeader.mjs +332 -0
- package/es/date-picker/YearPickerPanel.mjs +199 -0
- package/es/date-picker/constants.mjs +31 -0
- package/es/date-picker/date-picker.css +1 -1
- package/es/date-picker/props.mjs +6 -9
- package/es/date-picker/style/index.mjs +0 -1
- package/es/date-picker/types.mjs +0 -0
- package/es/field-decorator/fieldDecorator.css +1 -1
- package/es/icon/icon.css +1 -1
- package/es/index.bundle.mjs +7 -1
- package/es/index.mjs +6 -1
- package/es/input/props.mjs +1 -1
- package/es/locale/en-US.mjs +2 -0
- package/es/locale/fa-IR.mjs +2 -0
- package/es/locale/ja-JP.mjs +2 -0
- package/es/locale/zh-CN.mjs +2 -0
- package/es/locale/zh-TW.mjs +2 -0
- package/es/menu-select/MenuSelect.mjs +11 -2
- package/es/menu-select/menuSelect.css +1 -1
- package/es/radio/Radio.mjs +30 -14
- package/es/radio/radio.css +1 -1
- package/es/rail-navigation-item/RailNavigationItem.mjs +33 -19
- package/es/rail-navigation-item/railNavigationItem.css +1 -1
- package/es/rate/Rate.mjs +23 -12
- package/es/rate/rate.css +1 -1
- package/es/select/Select.mjs +10 -1
- package/es/select/select.css +1 -1
- package/es/step/Step.mjs +50 -20
- package/es/step/step.css +1 -1
- package/es/style.mjs +1 -0
- package/es/themes/dark/alert.mjs +2 -2
- package/es/themes/dark/dateInput.mjs +9 -0
- package/es/themes/dark/datePicker.mjs +23 -19
- package/es/themes/dark/index.mjs +3 -2
- package/es/themes/md3-dark/alert.mjs +2 -2
- package/es/themes/md3-dark/dateInput.mjs +9 -0
- package/es/themes/md3-dark/datePicker.mjs +18 -13
- package/es/themes/md3-dark/index.mjs +3 -2
- package/es/themes/md3-light/alert.mjs +2 -2
- package/es/themes/md3-light/dateInput.mjs +9 -0
- package/es/themes/md3-light/datePicker.mjs +18 -13
- package/es/themes/md3-light/index.mjs +3 -2
- package/es/utils/elements.mjs +7 -0
- package/es/utils/shared.mjs +15 -0
- package/es/varlet.css +1 -1
- package/es/varlet.esm.js +11893 -10656
- package/highlight/web-types.en-US.json +599 -73
- package/highlight/web-types.zh-CN.json +572 -67
- package/lib/varlet.cjs.js +5592 -4211
- package/lib/varlet.css +1 -1
- package/package.json +7 -7
- package/types/actionSheet.d.ts +1 -1
- package/types/badge.d.ts +1 -0
- package/types/chip.d.ts +3 -0
- package/types/dateInput.d.ts +96 -0
- package/types/datePicker.d.ts +4 -2
- package/types/index.d.ts +2 -0
- package/types/locale.d.ts +2 -0
- package/types/rate.d.ts +7 -0
- package/types/step.d.ts +3 -0
- package/types/styleVars.d.ts +14 -4
- package/umd/varlet.js +7 -7
- package/es/date-picker/src/day-picker-panel.mjs +0 -385
- package/es/date-picker/src/month-picker-panel.mjs +0 -300
- package/es/date-picker/src/panel-header.mjs +0 -142
- package/es/date-picker/src/year-picker-panel.mjs +0 -311
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { callOrReturn, isString } from "@varlet/shared";
|
|
1
2
|
import { defineComponent } from "vue";
|
|
2
3
|
import Hover from "../hover/index.mjs";
|
|
3
4
|
import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
4
5
|
import VarIcon from "../icon/index.mjs";
|
|
5
6
|
import Ripple from "../ripple/index.mjs";
|
|
6
|
-
import { createNamespace } from "../utils/components.mjs";
|
|
7
|
+
import { createNamespace, MaybeVNode } from "../utils/components.mjs";
|
|
7
8
|
const { name, n, classes } = createNamespace("action-sheet");
|
|
8
|
-
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode,
|
|
9
|
+
import { resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createVNode as _createVNode, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
|
9
10
|
function __render__(_ctx, _cache) {
|
|
10
11
|
const _component_var_icon = _resolveComponent("var-icon");
|
|
12
|
+
const _component_maybe_v_node = _resolveComponent("maybe-v-node");
|
|
11
13
|
const _component_var_hover_overlay = _resolveComponent("var-hover-overlay");
|
|
12
14
|
const _directive_ripple = _resolveDirective("ripple");
|
|
13
15
|
const _directive_hover = _resolveDirective("hover");
|
|
@@ -18,14 +20,26 @@ function __render__(_ctx, _cache) {
|
|
|
18
20
|
style: _normalizeStyle({ color: _ctx.color })
|
|
19
21
|
},
|
|
20
22
|
[
|
|
21
|
-
_ctx.icon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
23
|
+
_ctx.isString(_ctx.icon) ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
22
24
|
key: 0,
|
|
23
|
-
"var-action-sheet-cover": "",
|
|
24
25
|
class: _normalizeClass(_ctx.n("action-icon")),
|
|
25
26
|
namespace: _ctx.namespace,
|
|
26
27
|
name: _ctx.icon,
|
|
27
28
|
size: _ctx.iconSize
|
|
28
|
-
}, null, 8, ["class", "namespace", "name", "size"])) :
|
|
29
|
+
}, null, 8, ["class", "namespace", "name", "size"])) : _ctx.icon ? (_openBlock(), _createElementBlock(
|
|
30
|
+
"span",
|
|
31
|
+
{
|
|
32
|
+
key: 1,
|
|
33
|
+
class: _normalizeClass(_ctx.n("action-icon"))
|
|
34
|
+
},
|
|
35
|
+
[
|
|
36
|
+
_createVNode(_component_maybe_v_node, {
|
|
37
|
+
is: _ctx.renderIcon()
|
|
38
|
+
}, null, 8, ["is"])
|
|
39
|
+
],
|
|
40
|
+
2
|
|
41
|
+
/* CLASS */
|
|
42
|
+
)) : _createCommentVNode("v-if", true),
|
|
29
43
|
_createElementVNode(
|
|
30
44
|
"div",
|
|
31
45
|
{
|
|
@@ -49,6 +63,7 @@ function __render__(_ctx, _cache) {
|
|
|
49
63
|
const __sfc__ = defineComponent({
|
|
50
64
|
name,
|
|
51
65
|
components: {
|
|
66
|
+
MaybeVNode,
|
|
52
67
|
VarHoverOverlay,
|
|
53
68
|
VarIcon
|
|
54
69
|
},
|
|
@@ -60,15 +75,20 @@ const __sfc__ = defineComponent({
|
|
|
60
75
|
color: String,
|
|
61
76
|
namespace: String,
|
|
62
77
|
iconSize: [String, Number],
|
|
63
|
-
icon: String
|
|
78
|
+
icon: [String, Object, Function]
|
|
64
79
|
},
|
|
65
|
-
setup() {
|
|
80
|
+
setup(props) {
|
|
66
81
|
const { hovering, handleHovering } = useHoverOverlay();
|
|
82
|
+
function renderIcon() {
|
|
83
|
+
return callOrReturn(props.icon);
|
|
84
|
+
}
|
|
67
85
|
return {
|
|
68
86
|
hovering,
|
|
87
|
+
isString,
|
|
69
88
|
n,
|
|
70
89
|
classes,
|
|
71
|
-
handleHovering
|
|
90
|
+
handleHovering,
|
|
91
|
+
renderIcon
|
|
72
92
|
};
|
|
73
93
|
}
|
|
74
94
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --action-sheet-border-radius: 2px; --action-sheet-border-top: none; --action-sheet-title-color: #888; --action-sheet-title-padding: 10px 16px; --action-sheet-title-font-size: 14px; --action-sheet-action-item-height: 48px; --action-sheet-action-item-padding: 0 18px; --action-sheet-action-item-color: #333; --action-sheet-action-item-disabled-color: var(--color-text-disabled); --action-sheet-icon-margin: 0 20px 0 0; --action-sheet-icon-size: 24px; --action-sheet-background: #fff;}.var-action-sheet { padding: 10px 0; background: var(--action-sheet-background); transition: background-color 0.25s;}.var-action-sheet__popup-radius { border-radius: var(--action-sheet-border-radius); border-top: var(--action-sheet-border-top);}.var-action-sheet__title { padding: var(--action-sheet-title-padding); color: var(--action-sheet-title-color); font-size: var(--action-sheet-title-font-size);}.var-action-sheet__action-item { display: flex; align-items: center; height: var(--action-sheet-action-item-height); padding: var(--action-sheet-action-item-padding); color: var(--action-sheet-action-item-color); cursor: pointer; position: relative;}.var-action-sheet__action-name { overflow: auto; max-height: var(--action-sheet-action-item-height);}.var-action-sheet__action-icon
|
|
1
|
+
:root { --action-sheet-border-radius: 2px; --action-sheet-border-top: none; --action-sheet-title-color: #888; --action-sheet-title-padding: 10px 16px; --action-sheet-title-font-size: 14px; --action-sheet-action-item-height: 48px; --action-sheet-action-item-padding: 0 18px; --action-sheet-action-item-color: #333; --action-sheet-action-item-disabled-color: var(--color-text-disabled); --action-sheet-icon-margin: 0 20px 0 0; --action-sheet-icon-size: 24px; --action-sheet-background: #fff;}.var-action-sheet { padding: 10px 0; background: var(--action-sheet-background); transition: background-color 0.25s;}.var-action-sheet__popup-radius { border-radius: var(--action-sheet-border-radius); border-top: var(--action-sheet-border-top);}.var-action-sheet__title { padding: var(--action-sheet-title-padding); color: var(--action-sheet-title-color); font-size: var(--action-sheet-title-font-size);}.var-action-sheet__action-item { display: flex; align-items: center; height: var(--action-sheet-action-item-height); padding: var(--action-sheet-action-item-padding); color: var(--action-sheet-action-item-color); cursor: pointer; position: relative;}.var-action-sheet__action-name { overflow: auto; max-height: var(--action-sheet-action-item-height);}.var-action-sheet__action-icon { display: inline-flex; margin: var(--action-sheet-icon-margin); width: var(--action-sheet-icon-size); height: var(--action-sheet-icon-size); font-size: var(--action-sheet-icon-size);}.var-action-sheet__action-icon .var-icon { font-size: inherit;}.var-action-sheet--disabled { color: var(--action-sheet-action-item-disabled-color) !important; cursor: not-allowed;}
|
|
@@ -15,7 +15,7 @@ var __spreadValues = (a, b) => {
|
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
17
|
import { call, inBrowser } from "@varlet/shared";
|
|
18
|
-
import { nextTick,
|
|
18
|
+
import { nextTick, shallowReactive } from "vue";
|
|
19
19
|
import { mountInstance, withInstall, withPropsDefaultsSetter } from "../utils/components.mjs";
|
|
20
20
|
import VarActionSheet from "./ActionSheet.mjs";
|
|
21
21
|
import { props as actionSheetProps } from "./props.mjs";
|
|
@@ -30,7 +30,9 @@ function ActionSheet(options) {
|
|
|
30
30
|
}
|
|
31
31
|
return new Promise((resolve) => {
|
|
32
32
|
ActionSheet.close();
|
|
33
|
-
const reactiveActionSheetOptions =
|
|
33
|
+
const reactiveActionSheetOptions = shallowReactive(
|
|
34
|
+
normalizeOptions(options)
|
|
35
|
+
);
|
|
34
36
|
reactiveActionSheetOptions.teleport = "body";
|
|
35
37
|
singletonOptions = reactiveActionSheetOptions;
|
|
36
38
|
const { unmountInstance } = mountInstance(VarActionSheet, reactiveActionSheetOptions, {
|
package/es/alert/alert.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --alert-padding: 16px; --alert-border-radius: 4px; --alert-icon-size: 22px; --alert-icon-margin:
|
|
1
|
+
:root { --alert-padding: 16px; --alert-border-radius: 4px; --alert-icon-size: 22px; --alert-icon-margin: 1px 12px 0 0; --alert-close-icon-size: 22px; --alert-close-icon-margin: 1px 0 0 12px; --alert-standard-info-text-color: var(--color-on-info); --alert-standard-danger-text-color: var(--color-on-danger); --alert-standard-success-text-color: var(--color-on-success); --alert-standard-warning-text-color: var(--color-on-warning); --alert-danger-background: var(--color-danger); --alert-success-background: var(--color-success); --alert-warning-background: var(--color-warning); --alert-info-background: var(--color-info); --alert-tonal-danger-background: hsla(var(--hsl-danger), 0.12); --alert-tonal-success-background: hsla(var(--hsl-success), 0.12); --alert-tonal-warning-background: hsla(var(--hsl-warning), 0.12); --alert-tonal-info-background: hsla(var(--hsl-info), 0.12); --alert-tonal-danger-text-color: var(--color-danger); --alert-tonal-success-text-color: var(--color-success); --alert-tonal-warning-text-color: var(--color-warning); --alert-tonal-info-text-color: var(--color-info); --alert-message-font-size: 14px; --alert-title-font-size: 16px; --alert-title-font-weight: 500; --alert-message-margin-top: 4px; --alert-message-line-height: 1.5; --alert-title-line-height: 1.5;}.var-alert { display: flex; padding: var(--alert-padding); border-radius: var(--alert-border-radius);}.var-alert__icon { display: inline-flex; align-items: start; margin: var(--alert-icon-margin); font-size: var(--alert-icon-size);}.var-alert__icon .var-icon { font-size: inherit;}.var-alert__content { flex: 1;}.var-alert__title { font-size: var(--alert-title-font-size); font-weight: var(--alert-title-font-weight); line-height: var(--alert-title-line-height); word-break: normal; word-wrap: break-word;}.var-alert__title + .var-alert__message { margin-top: var(--alert-message-margin-top);}.var-alert__message { font-size: var(--alert-message-font-size); line-height: var(--alert-message-line-height); margin-top: 2px;}.var-alert__close-icon { display: inline-flex; align-items: start; cursor: pointer; margin: var(--alert-close-icon-margin); font-size: var(--alert-close-icon-size);}.var-alert__close-icon .var-icon { font-size: inherit;}.var-alert--outlined { border: thin solid currentColor; background-color: transparent;}.var-alert--outlined.var-alert--info { border-color: var(--alert-info-background); color: var(--alert-info-background);}.var-alert--outlined.var-alert--success { border-color: var(--alert-success-background); color: var(--alert-success-background);}.var-alert--outlined.var-alert--warning { border-color: var(--alert-warning-background); color: var(--alert-warning-background);}.var-alert--outlined.var-alert--danger { border-color: var(--alert-danger-background); color: var(--alert-danger-background);}.var-alert--tonal.var-alert--info { background-color: var(--alert-tonal-info-background); color: var(--alert-tonal-info-text-color);}.var-alert--tonal.var-alert--success { background-color: var(--alert-tonal-success-background); color: var(--alert-tonal-success-text-color);}.var-alert--tonal.var-alert--warning { background-color: var(--alert-tonal-warning-background); color: var(--alert-tonal-warning-text-color);}.var-alert--tonal.var-alert--danger { background-color: var(--alert-tonal-danger-background); color: var(--alert-tonal-danger-text-color);}.var-alert--standard.var-alert--info { background-color: var(--alert-info-background); color: var(--alert-standard-info-text-color);}.var-alert--standard.var-alert--success { background-color: var(--alert-success-background); color: var(--alert-standard-success-text-color);}.var-alert--standard.var-alert--warning { background-color: var(--alert-warning-background); color: var(--alert-standard-warning-text-color);}.var-alert--standard.var-alert--danger { background-color: var(--alert-danger-background); color: var(--alert-standard-danger-text-color);}
|
package/es/badge/Badge.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { createNamespace } from "../utils/components.mjs";
|
|
|
21
21
|
import { toSizeUnit } from "../utils/elements.mjs";
|
|
22
22
|
import { props } from "./props.mjs";
|
|
23
23
|
const { name, n, classes } = createNamespace("badge");
|
|
24
|
-
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, normalizeClass as _normalizeClass, openBlock as _openBlock,
|
|
24
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, vShow as _vShow, mergeProps as _mergeProps, createElementVNode as _createElementVNode, withDirectives as _withDirectives, Transition as _Transition, withCtx as _withCtx } from "vue";
|
|
25
25
|
const _hoisted_1 = { key: 0 };
|
|
26
26
|
function __render__(_ctx, _cache) {
|
|
27
27
|
const _component_var_icon = _resolveComponent("var-icon");
|
|
@@ -45,20 +45,30 @@ function __render__(_ctx, _cache) {
|
|
|
45
45
|
_ctx.n(`--${_ctx.type}`),
|
|
46
46
|
[_ctx.$slots.default, _ctx.n(`--${_ctx.position}`), _ctx.n("--offset")],
|
|
47
47
|
[_ctx.dot, _ctx.n("--dot")],
|
|
48
|
-
[_ctx.icon, _ctx.n("--icon")]
|
|
48
|
+
[_ctx.icon || _ctx.$slots.icon, _ctx.n("--icon")]
|
|
49
49
|
),
|
|
50
50
|
style: __spreadValues({ background: _ctx.color }, _ctx.offsetStyle)
|
|
51
51
|
}, _ctx.$attrs),
|
|
52
52
|
[
|
|
53
|
-
_ctx.icon ? (_openBlock(),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
_ctx.$slots.icon || _ctx.icon ? (_openBlock(), _createElementBlock(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
key: 0,
|
|
57
|
+
class: _normalizeClass(_ctx.n("icon"))
|
|
58
|
+
},
|
|
59
|
+
[
|
|
60
|
+
_renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
61
|
+
_createVNode(_component_var_icon, {
|
|
62
|
+
name: _ctx.icon,
|
|
63
|
+
namespace: _ctx.namespace
|
|
64
|
+
}, null, 8, ["name", "namespace"])
|
|
65
|
+
])
|
|
66
|
+
],
|
|
67
|
+
2
|
|
68
|
+
/* CLASS */
|
|
69
|
+
)) : _createCommentVNode("v-if", true),
|
|
60
70
|
_renderSlot(_ctx.$slots, "value", {}, () => [
|
|
61
|
-
!_ctx.icon && !_ctx.dot ? (_openBlock(), _createElementBlock(
|
|
71
|
+
!_ctx.$slots.icon && !_ctx.icon && !_ctx.dot ? (_openBlock(), _createElementBlock(
|
|
62
72
|
"span",
|
|
63
73
|
_hoisted_1,
|
|
64
74
|
_toDisplayString(_ctx.value),
|
package/es/badge/badge.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --badge-content-padding: 2px 6px; --badge-content-border: none; --badge-content-border-radius: 100px; --badge-content-font-size: 12px; --badge-icon-size: 12px; --badge-default-color: #e0e0e0; --badge-primary-color: var(--color-primary); --badge-danger-color: var(--color-danger); --badge-success-color: var(--color-success); --badge-warning-color: var(--color-warning); --badge-info-color: var(--color-info); --badge-default-text-color: #1d1b20; --badge-primary-text-color: var(--color-on-primary); --badge-danger-text-color: var(--color-on-danger); --badge-success-text-color: var(--color-on-success); --badge-warning-text-color: var(--color-on-warning); --badge-info-text-color: var(--color-on-info); --badge-dot-width: 8px; --badge-dot-height: 8px;}.var-badge { display: inline-flex; align-items: center; position: relative; vertical-align: middle; transition: background-color 0.25s;}.var-badge__content { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: var(--badge-content-padding); border: var(--badge-content-border); border-radius: var(--badge-content-border-radius); font-size: var(--badge-content-font-size); line-height: 1;}.var-badge--offset { transform: translateX(var(--badge-offset-x)) translateY(var(--badge-offset-y));}.var-badge__icon
|
|
1
|
+
:root { --badge-content-padding: 2px 6px; --badge-content-border: none; --badge-content-border-radius: 100px; --badge-content-font-size: 12px; --badge-icon-size: 12px; --badge-default-color: #e0e0e0; --badge-primary-color: var(--color-primary); --badge-danger-color: var(--color-danger); --badge-success-color: var(--color-success); --badge-warning-color: var(--color-warning); --badge-info-color: var(--color-info); --badge-default-text-color: #1d1b20; --badge-primary-text-color: var(--color-on-primary); --badge-danger-text-color: var(--color-on-danger); --badge-success-text-color: var(--color-on-success); --badge-warning-text-color: var(--color-on-warning); --badge-info-text-color: var(--color-on-info); --badge-dot-width: 8px; --badge-dot-height: 8px;}.var-badge { display: inline-flex; align-items: center; position: relative; vertical-align: middle; transition: background-color 0.25s;}.var-badge__content { display: inline-flex; align-items: center; justify-content: center; text-align: center; padding: var(--badge-content-padding); border: var(--badge-content-border); border-radius: var(--badge-content-border-radius); font-size: var(--badge-content-font-size); line-height: 1;}.var-badge--offset { transform: translateX(var(--badge-offset-x)) translateY(var(--badge-offset-y));}.var-badge__icon { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; font-size: var(--badge-icon-size); line-height: 1;}.var-badge__icon .var-icon { font-size: inherit;}.var-badge--icon { padding: 2px 4px;}.var-badge--dot { box-sizing: content-box; width: var(--badge-dot-width); height: var(--badge-dot-height); padding: 0;}.var-badge--default { color: var(--badge-default-text-color); background: var(--badge-default-color);}.var-badge--primary { color: var(--badge-primary-text-color); background: var(--badge-primary-color);}.var-badge--info { color: var(--badge-info-text-color); background: var(--badge-info-color);}.var-badge--warning { color: var(--badge-warning-text-color); background: var(--badge-warning-color);}.var-badge--success { color: var(--badge-success-text-color); background: var(--badge-success-color);}.var-badge--danger { color: var(--badge-danger-text-color); background: var(--badge-danger-color);}.var-badge--right-top { position: absolute; top: 0; right: 0; transform: translateY(calc(-50% + var(--badge-offset-y))) translateX(calc(50% + var(--badge-offset-x)));}.var-badge--left-top { position: absolute; top: 0; left: 0; transform: translateY(calc(-50% + var(--badge-offset-y))) translateX(calc(-50% + var(--badge-offset-x)));}.var-badge--right-bottom { position: absolute; bottom: 0; right: 0; transform: translateY(calc(50% + var(--badge-offset-y))) translateX(calc(50% + var(--badge-offset-x)));}.var-badge--left-bottom { position: absolute; bottom: 0; left: 0; transform: translateY(calc(50% + var(--badge-offset-y))) translateX(calc(-50% + var(--badge-offset-x)));}.var-badge-fade-enter-active,.var-badge-fade-leave-active { transition: opacity 0.15s var(--cubic-bezier);}.var-badge-fade-enter-from,.var-badge-fade-leave-to { opacity: 0;}
|
|
@@ -11,7 +11,7 @@ const defaultBadgeProps = {
|
|
|
11
11
|
type: "danger",
|
|
12
12
|
dot: true
|
|
13
13
|
};
|
|
14
|
-
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent,
|
|
14
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementVNode as _createElementVNode, mergeProps as _mergeProps, withCtx as _withCtx, createElementBlock as _createElementBlock, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, normalizeStyle as _normalizeStyle, resolveDirective as _resolveDirective, withDirectives as _withDirectives } from "vue";
|
|
15
15
|
function __render__(_ctx, _cache) {
|
|
16
16
|
const _component_var_icon = _resolveComponent("var-icon");
|
|
17
17
|
const _component_var_badge = _resolveComponent("var-badge");
|
|
@@ -51,30 +51,44 @@ function __render__(_ctx, _cache) {
|
|
|
51
51
|
"var-bottom-navigation-item-cover": ""
|
|
52
52
|
}), {
|
|
53
53
|
default: _withCtx(() => [
|
|
54
|
+
_createElementVNode(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
class: _normalizeClass(_ctx.n("icon"))
|
|
58
|
+
},
|
|
59
|
+
[
|
|
60
|
+
_renderSlot(_ctx.$slots, "icon", { active: _ctx.isActive }, () => [
|
|
61
|
+
_ctx.icon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
62
|
+
key: 0,
|
|
63
|
+
name: _ctx.icon,
|
|
64
|
+
namespace: _ctx.namespace
|
|
65
|
+
}, null, 8, ["name", "namespace"])) : _createCommentVNode("v-if", true)
|
|
66
|
+
])
|
|
67
|
+
],
|
|
68
|
+
2
|
|
69
|
+
/* CLASS */
|
|
70
|
+
)
|
|
71
|
+
]),
|
|
72
|
+
_: 3
|
|
73
|
+
/* FORWARDED */
|
|
74
|
+
}, 16, ["class"])) : _ctx.$slots.icon || _ctx.icon ? (_openBlock(), _createElementBlock(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
key: 1,
|
|
78
|
+
class: _normalizeClass(_ctx.n("icon"))
|
|
79
|
+
},
|
|
80
|
+
[
|
|
54
81
|
_renderSlot(_ctx.$slots, "icon", { active: _ctx.isActive }, () => [
|
|
55
82
|
_ctx.icon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
56
83
|
key: 0,
|
|
57
84
|
name: _ctx.icon,
|
|
58
|
-
namespace: _ctx.namespace
|
|
59
|
-
|
|
60
|
-
"var-bottom-navigation-item-cover": ""
|
|
61
|
-
}, null, 8, ["name", "namespace", "class"])) : _createCommentVNode("v-if", true)
|
|
85
|
+
namespace: _ctx.namespace
|
|
86
|
+
}, null, 8, ["name", "namespace"])) : _createCommentVNode("v-if", true)
|
|
62
87
|
])
|
|
63
|
-
]
|
|
64
|
-
|
|
65
|
-
/*
|
|
66
|
-
|
|
67
|
-
key: 1,
|
|
68
|
-
active: _ctx.isActive
|
|
69
|
-
}, () => [
|
|
70
|
-
_ctx.icon ? (_openBlock(), _createBlock(_component_var_icon, {
|
|
71
|
-
key: 0,
|
|
72
|
-
name: _ctx.icon,
|
|
73
|
-
namespace: _ctx.namespace,
|
|
74
|
-
class: _normalizeClass(_ctx.n("icon")),
|
|
75
|
-
"var-bottom-navigation-item-cover": ""
|
|
76
|
-
}, null, 8, ["name", "namespace", "class"])) : _createCommentVNode("v-if", true)
|
|
77
|
-
])
|
|
88
|
+
],
|
|
89
|
+
2
|
|
90
|
+
/* CLASS */
|
|
91
|
+
)) : _createCommentVNode("v-if", true)
|
|
78
92
|
],
|
|
79
93
|
2
|
|
80
94
|
/* CLASS */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --bottom-navigation-item-font-size: var(--font-size-sm); --bottom-navigation-item-inactive-color: #646566; --bottom-navigation-item-active-color: var(--color-primary); --bottom-navigation-item-active-background-color: var(--color-surface-container-high); --bottom-navigation-item-variant-active-background-color: var(--color-primary-container); --bottom-navigation-item-variant-active-color: var(--color-on-primary-container); --bottom-navigation-item-line-height: 1; --bottom-navigation-item-icon-size: 22px; --bottom-navigation-item-icon-margin-bottom: 5px; --bottom-navigation-item-variant-icon-margin-bottom: 6px; --bottom-navigation-item-variant-icon-container-height: 30px; --bottom-navigation-item-variant-icon-container-border-radius: 100px; --bottom-navigation-item-variant-icon-container-max-width: 58px;}.var-bottom-navigation-item { height: 100%; padding-bottom: 2px; position: relative; display: inline-flex; flex: 1 1 0%; flex-direction: column; align-items: center; justify-content: center; line-height: var(--bottom-navigation-item-line-height); color: var(--bottom-navigation-item-inactive-color); cursor: pointer; user-select: none; vertical-align: middle; appearance: none; text-decoration: none; background-color: transparent; outline: 0; border: 0; transition: color 250ms, margin 250ms;}.var-bottom-navigation-item--variant-padding { padding-bottom: 6px;}.var-bottom-navigation-item--active { color: var(--bottom-navigation-item-active-color); background-color: var(--bottom-navigation-item-active-background-color); transition: background-color 250ms;}.var-bottom-navigation-item--animated .var-bottom-navigation-item__label { font-size: calc(var(--bottom-navigation-item-font-size) * 1.16);}.var-bottom-navigation-item--variant-icon-container { display: flex; justify-content: center; align-items: center; width: 0; height: var(--bottom-navigation-item-variant-icon-container-height); border-radius: var(--bottom-navigation-item-variant-icon-container-border-radius); max-width: var(--bottom-navigation-item-variant-icon-container-max-width);}.var-bottom-navigation-item--variant-active { color: var(--bottom-navigation-item-variant-active-color); background-color: var(--bottom-navigation-item-variant-active-background-color); width: 100%; transition: background-color 0.25s, width 0.5s;}.var-bottom-navigation-item--right-half-space { margin-right: calc(var(--bottom-navigation-height) / 2);}.var-bottom-navigation-item--left-half-space { margin-left: calc(var(--bottom-navigation-height) / 2);}.var-bottom-navigation-item--right-space { margin-right: calc(var(--bottom-navigation-height) + var(--bottom-navigation-fab-offset));}.var-bottom-navigation-item__icon
|
|
1
|
+
:root { --bottom-navigation-item-font-size: var(--font-size-sm); --bottom-navigation-item-inactive-color: #646566; --bottom-navigation-item-active-color: var(--color-primary); --bottom-navigation-item-active-background-color: var(--color-surface-container-high); --bottom-navigation-item-variant-active-background-color: var(--color-primary-container); --bottom-navigation-item-variant-active-color: var(--color-on-primary-container); --bottom-navigation-item-line-height: 1; --bottom-navigation-item-icon-size: 22px; --bottom-navigation-item-icon-margin-bottom: 5px; --bottom-navigation-item-variant-icon-margin-bottom: 6px; --bottom-navigation-item-variant-icon-container-height: 30px; --bottom-navigation-item-variant-icon-container-border-radius: 100px; --bottom-navigation-item-variant-icon-container-max-width: 58px;}.var-bottom-navigation-item { height: 100%; padding-bottom: 2px; position: relative; display: inline-flex; flex: 1 1 0%; flex-direction: column; align-items: center; justify-content: center; line-height: var(--bottom-navigation-item-line-height); color: var(--bottom-navigation-item-inactive-color); cursor: pointer; user-select: none; vertical-align: middle; appearance: none; text-decoration: none; background-color: transparent; outline: 0; border: 0; transition: color 250ms, margin 250ms;}.var-bottom-navigation-item--variant-padding { padding-bottom: 6px;}.var-bottom-navigation-item--active { color: var(--bottom-navigation-item-active-color); background-color: var(--bottom-navigation-item-active-background-color); transition: background-color 250ms;}.var-bottom-navigation-item--animated .var-bottom-navigation-item__label { font-size: calc(var(--bottom-navigation-item-font-size) * 1.16);}.var-bottom-navigation-item--variant-icon-container { display: flex; justify-content: center; align-items: center; width: 0; height: var(--bottom-navigation-item-variant-icon-container-height); border-radius: var(--bottom-navigation-item-variant-icon-container-border-radius); max-width: var(--bottom-navigation-item-variant-icon-container-max-width);}.var-bottom-navigation-item--variant-active { color: var(--bottom-navigation-item-variant-active-color); background-color: var(--bottom-navigation-item-variant-active-background-color); width: 100%; transition: background-color 0.25s, width 0.5s;}.var-bottom-navigation-item--right-half-space { margin-right: calc(var(--bottom-navigation-height) / 2);}.var-bottom-navigation-item--left-half-space { margin-left: calc(var(--bottom-navigation-height) / 2);}.var-bottom-navigation-item--right-space { margin-right: calc(var(--bottom-navigation-height) + var(--bottom-navigation-fab-offset));}.var-bottom-navigation-item__icon { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; font-size: var(--bottom-navigation-item-icon-size); line-height: 1;}.var-bottom-navigation-item__icon .var-icon { font-size: inherit;}.var-bottom-navigation-item__badge[var-bottom-navigation-item-cover] { margin-top: 6px; margin-right: -4px;}.var-bottom-navigation-item__label { margin-top: var(--bottom-navigation-item-icon-margin-bottom); font-size: var(--bottom-navigation-item-font-size); transition: font-size 0.2s ease 0.1s; white-space: nowrap;}.var-bottom-navigation-item--variant-padding .var-bottom-navigation-item__label { margin-top: var(--bottom-navigation-item-variant-icon-margin-bottom);}
|
package/es/checkbox/Checkbox.mjs
CHANGED
|
@@ -28,10 +28,11 @@ import VarHoverOverlay, { useHoverOverlay } from "../hover-overlay/index.mjs";
|
|
|
28
28
|
import VarIcon from "../icon/index.mjs";
|
|
29
29
|
import Ripple from "../ripple/index.mjs";
|
|
30
30
|
import { createNamespace, useValidation } from "../utils/components.mjs";
|
|
31
|
+
import { toSizeUnit } from "../utils/elements.mjs";
|
|
31
32
|
import { props } from "./props.mjs";
|
|
32
33
|
import { useCheckboxGroup } from "./provide.mjs";
|
|
33
34
|
const { name, n, classes } = createNamespace("checkbox");
|
|
34
|
-
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent,
|
|
35
|
+
import { renderSlot as _renderSlot, resolveComponent as _resolveComponent, createVNode as _createVNode, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, resolveDirective as _resolveDirective, withDirectives as _withDirectives, createElementVNode as _createElementVNode } from "vue";
|
|
35
36
|
const _hoisted_1 = ["aria-checked", "aria-disabled", "tabindex"];
|
|
36
37
|
function __render__(_ctx, _cache) {
|
|
37
38
|
const _component_var_icon = _resolveComponent("var-icon");
|
|
@@ -70,30 +71,51 @@ function __render__(_ctx, _cache) {
|
|
|
70
71
|
style: _normalizeStyle({ color: _ctx.checked || _ctx.isIndeterminate ? _ctx.checkedColor : _ctx.uncheckedColor })
|
|
71
72
|
},
|
|
72
73
|
[
|
|
73
|
-
_ctx.isIndeterminate ?
|
|
74
|
-
|
|
74
|
+
_ctx.isIndeterminate ? (_openBlock(), _createElementBlock(
|
|
75
|
+
"span",
|
|
76
|
+
{
|
|
77
|
+
key: 0,
|
|
75
78
|
class: _normalizeClass(_ctx.n("icon")),
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
style: _normalizeStyle({ fontSize: _ctx.toSizeUnit(_ctx.iconSize) })
|
|
80
|
+
},
|
|
81
|
+
[
|
|
82
|
+
_renderSlot(_ctx.$slots, "indeterminate-icon", {}, () => [
|
|
83
|
+
_createVNode(_component_var_icon, { name: "minus-box" })
|
|
84
|
+
])
|
|
85
|
+
],
|
|
86
|
+
6
|
|
87
|
+
/* CLASS, STYLE */
|
|
88
|
+
)) : _createCommentVNode("v-if", true),
|
|
89
|
+
_ctx.checked && !_ctx.isIndeterminate ? (_openBlock(), _createElementBlock(
|
|
90
|
+
"span",
|
|
91
|
+
{
|
|
92
|
+
key: 1,
|
|
83
93
|
class: _normalizeClass(_ctx.n("icon")),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
94
|
+
style: _normalizeStyle({ fontSize: _ctx.toSizeUnit(_ctx.iconSize) })
|
|
95
|
+
},
|
|
96
|
+
[
|
|
97
|
+
_renderSlot(_ctx.$slots, "checked-icon", {}, () => [
|
|
98
|
+
_createVNode(_component_var_icon, { name: "checkbox-marked" })
|
|
99
|
+
])
|
|
100
|
+
],
|
|
101
|
+
6
|
|
102
|
+
/* CLASS, STYLE */
|
|
103
|
+
)) : _createCommentVNode("v-if", true),
|
|
104
|
+
!_ctx.checked && !_ctx.isIndeterminate ? (_openBlock(), _createElementBlock(
|
|
105
|
+
"span",
|
|
106
|
+
{
|
|
107
|
+
key: 2,
|
|
91
108
|
class: _normalizeClass(_ctx.n("icon")),
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
109
|
+
style: _normalizeStyle({ fontSize: _ctx.toSizeUnit(_ctx.iconSize) })
|
|
110
|
+
},
|
|
111
|
+
[
|
|
112
|
+
_renderSlot(_ctx.$slots, "unchecked-icon", {}, () => [
|
|
113
|
+
_createVNode(_component_var_icon, { name: "checkbox-blank-outline" })
|
|
114
|
+
])
|
|
115
|
+
],
|
|
116
|
+
6
|
|
117
|
+
/* CLASS, STYLE */
|
|
118
|
+
)) : _createCommentVNode("v-if", true),
|
|
97
119
|
_createVNode(_component_var_hover_overlay, {
|
|
98
120
|
hovering: !_ctx.disabled && !_ctx.formDisabled && _ctx.hovering,
|
|
99
121
|
focusing: !_ctx.disabled && !_ctx.formDisabled && _ctx.isFocusing
|
|
@@ -267,6 +289,7 @@ const __sfc__ = defineComponent({
|
|
|
267
289
|
handleHovering,
|
|
268
290
|
handleClick,
|
|
269
291
|
handleTextClick,
|
|
292
|
+
toSizeUnit,
|
|
270
293
|
toggle,
|
|
271
294
|
reset,
|
|
272
295
|
validate,
|
package/es/checkbox/checkbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --checkbox-checked-color: var(--color-primary); --checkbox-unchecked-color: #555; --checkbox-disabled-color: var(--color-text-disabled); --checkbox-error-color: var(--color-danger); --checkbox-action-padding: 6px; --checkbox-text-color: #555; --checkbox-icon-size: 24px;}.var-checkbox { display: flex; align-items: center; outline: none; transform: translateX(calc(-1 * var(--checkbox-action-padding))); cursor: pointer; -webkit-tap-highlight-color: transparent;}.var-checkbox__wrap { display: inline-flex; flex-direction: column;}.var-checkbox__action { position: relative; display: flex; justify-content: center; align-items: center; flex-shrink: 0; padding: var(--checkbox-action-padding); border-radius: 50%; transition: background-color 0.25s, color 0.25s;}.var-checkbox__icon
|
|
1
|
+
:root { --checkbox-checked-color: var(--color-primary); --checkbox-unchecked-color: #555; --checkbox-disabled-color: var(--color-text-disabled); --checkbox-error-color: var(--color-danger); --checkbox-action-padding: 6px; --checkbox-text-color: #555; --checkbox-icon-size: 24px;}.var-checkbox { display: flex; align-items: center; outline: none; transform: translateX(calc(-1 * var(--checkbox-action-padding))); cursor: pointer; -webkit-tap-highlight-color: transparent;}.var-checkbox__wrap { display: inline-flex; flex-direction: column;}.var-checkbox__action { position: relative; display: flex; justify-content: center; align-items: center; flex-shrink: 0; padding: var(--checkbox-action-padding); border-radius: 50%; transition: background-color 0.25s, color 0.25s;}.var-checkbox__icon { display: inline-flex; align-items: center; justify-content: center; width: 1em; height: 1em; font-size: var(--checkbox-icon-size); line-height: 1;}.var-checkbox__icon .var-icon { font-size: inherit;}.var-checkbox__text { color: var(--checkbox-text-color);}.var-checkbox--checked { color: var(--checkbox-checked-color);}.var-checkbox--unchecked { color: var(--checkbox-unchecked-color);}.var-checkbox--disabled { color: var(--checkbox-disabled-color); cursor: not-allowed;}.var-checkbox--error { color: var(--checkbox-error-color);}
|
package/es/chip/Chip.mjs
CHANGED
|
@@ -39,10 +39,12 @@ function __render__(_ctx, _cache) {
|
|
|
39
39
|
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClose && _ctx.handleClose(...args))
|
|
40
40
|
},
|
|
41
41
|
[
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
_renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
43
|
+
_createVNode(_component_var_icon, {
|
|
44
|
+
name: _ctx.closeIconName,
|
|
45
|
+
namespace: _ctx.namespace
|
|
46
|
+
}, null, 8, ["name", "namespace"])
|
|
47
|
+
])
|
|
46
48
|
],
|
|
47
49
|
2
|
|
48
50
|
/* CLASS */
|
|
@@ -84,12 +86,17 @@ const __sfc__ = defineComponent({
|
|
|
84
86
|
const roundClass = round ? n("--round") : null;
|
|
85
87
|
return [n(`--${size}`), blockClass, plainTypeClass, roundClass];
|
|
86
88
|
});
|
|
89
|
+
const closeIconName = computed(() => {
|
|
90
|
+
var _a, _b;
|
|
91
|
+
return (_b = (_a = props2.icon) != null ? _a : props2.iconName) != null ? _b : "close-circle";
|
|
92
|
+
});
|
|
87
93
|
function handleClose(e) {
|
|
88
94
|
call(props2.onClose, e);
|
|
89
95
|
}
|
|
90
96
|
return {
|
|
91
97
|
chipStyle,
|
|
92
98
|
contentClass,
|
|
99
|
+
closeIconName,
|
|
93
100
|
n,
|
|
94
101
|
classes,
|
|
95
102
|
formatElevation,
|
package/es/chip/chip.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
:root { --chip-default-text-color: #555; --chip-primary-text-color: var(--color-on-primary-container); --chip-danger-text-color: var(--color-on-danger-container); --chip-success-text-color: var(--color-on-success-container); --chip-warning-text-color: var(--color-on-warning-container); --chip-info-text-color: var(--color-on-info-container); --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary-container); --chip-danger-color: var(--color-danger-container); --chip-success-color: var(--color-success-container); --chip-warning-color: var(--color-warning-container); --chip-info-color: var(--color-info-container); --chip-primary-plain-color: var(--color-primary); --chip-danger-plain-color: var(--color-danger); --chip-success-plain-color: var(--color-success); --chip-warning-plain-color: var(--color-warning); --chip-info-plain-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0 10px; --chip-large-padding: 0 17px; --chip-small-padding: 0 6px; --chip-mini-padding: 0 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px; --chip-mini-font-size: var(--font-size-xs); --chip-small-font-size: var(--font-size-sm); --chip-normal-font-size: var(--font-size-md); --chip-large-font-size: var(--font-size-lg);}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; transition: background-color 0.25s, border-radius 0.25s;}.var-chip--default { color: var(--chip-default-text-color); background: var(--chip-default-color);}.var-chip--primary { color: var(--chip-primary-text-color); background-color: var(--chip-primary-color);}.var-chip--info { color: var(--chip-info-text-color); background-color: var(--chip-info-color);}.var-chip--success { color: var(--chip-success-text-color); background-color: var(--chip-success-color);}.var-chip--warning { color: var(--chip-warning-text-color); background-color: var(--chip-warning-color);}.var-chip--danger { color: var(--chip-danger-text-color); background-color: var(--chip-danger-color);}.var-chip__plain { background-color: transparent;}.var-chip__plain:active { box-shadow: none;}.var-chip__plain-default { color: inherit; border-color: currentColor;}.var-chip__plain-primary { color: var(--chip-primary-plain-color); border-color: currentColor;}.var-chip__plain-info { color: var(--chip-info-plain-color); border-color: currentColor;}.var-chip__plain-success { color: var(--chip-success-plain-color); border-color: currentColor;}.var-chip__plain-warning { color: var(--chip-warning-plain-color); border-color: currentColor;}.var-chip__plain-danger { color: var(--chip-danger-plain-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--chip-normal-font-size); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--chip-large-font-size); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--chip-small-font-size); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--chip-mini-font-size); height: var(--chip-mini-height);}.var-chip--close { cursor: pointer; -webkit-tap-highlight-color: transparent;}.var-chip__text-large { margin: var(--chip-text-large-margin);}.var-chip__text-normal { margin: var(--chip-text-normal-margin);}.var-chip__text-small { margin: var(--chip-text-small-margin);}.var-chip__text-mini { margin: var(--chip-text-mini-margin);}
|
|
1
|
+
:root { --chip-default-text-color: #555; --chip-primary-text-color: var(--color-on-primary-container); --chip-danger-text-color: var(--color-on-danger-container); --chip-success-text-color: var(--color-on-success-container); --chip-warning-text-color: var(--color-on-warning-container); --chip-info-text-color: var(--color-on-info-container); --chip-default-color: #e0e0e0; --chip-primary-color: var(--color-primary-container); --chip-danger-color: var(--color-danger-container); --chip-success-color: var(--color-success-container); --chip-warning-color: var(--color-warning-container); --chip-info-color: var(--color-info-container); --chip-primary-plain-color: var(--color-primary); --chip-danger-plain-color: var(--color-danger); --chip-success-plain-color: var(--color-success); --chip-warning-plain-color: var(--color-warning); --chip-info-plain-color: var(--color-info); --chip-border-radius: 2px; --chip-normal-height: 32px; --chip-large-height: 40px; --chip-small-height: 24px; --chip-mini-height: 16px; --chip-round-radius: 100px; --chip-normal-padding: 0 10px; --chip-large-padding: 0 17px; --chip-small-padding: 0 6px; --chip-mini-padding: 0 4px; --chip-text-normal-margin: 0 5px; --chip-text-large-margin: 0 5px; --chip-text-small-margin: 0 3px; --chip-text-mini-margin: 0 2px; --chip-mini-font-size: var(--font-size-xs); --chip-small-font-size: var(--font-size-sm); --chip-normal-font-size: var(--font-size-md); --chip-large-font-size: var(--font-size-lg);}.var-fade-leave-to { opacity: 0;}.var-fade-leave-active { transition: opacity 0.3s;}.var-chip { justify-content: center; align-items: center; font-family: Roboto, sans-serif; border-radius: var(--chip-border-radius); cursor: default; border: thin solid transparent; vertical-align: middle; transition: background-color 0.25s, border-radius 0.25s;}.var-chip--default { color: var(--chip-default-text-color); background: var(--chip-default-color);}.var-chip--primary { color: var(--chip-primary-text-color); background-color: var(--chip-primary-color);}.var-chip--info { color: var(--chip-info-text-color); background-color: var(--chip-info-color);}.var-chip--success { color: var(--chip-success-text-color); background-color: var(--chip-success-color);}.var-chip--warning { color: var(--chip-warning-text-color); background-color: var(--chip-warning-color);}.var-chip--danger { color: var(--chip-danger-text-color); background-color: var(--chip-danger-color);}.var-chip__plain { background-color: transparent;}.var-chip__plain:active { box-shadow: none;}.var-chip__plain-default { color: inherit; border-color: currentColor;}.var-chip__plain-primary { color: var(--chip-primary-plain-color); border-color: currentColor;}.var-chip__plain-info { color: var(--chip-info-plain-color); border-color: currentColor;}.var-chip__plain-success { color: var(--chip-success-plain-color); border-color: currentColor;}.var-chip__plain-warning { color: var(--chip-warning-plain-color); border-color: currentColor;}.var-chip__plain-danger { color: var(--chip-danger-plain-color); border-color: currentColor;}.var-chip--round { border-radius: var(--chip-round-radius);}.var-chip--normal { font-size: var(--chip-normal-font-size); padding: var(--chip-normal-padding); height: var(--chip-normal-height);}.var-chip--large { padding: var(--chip-large-padding); font-size: var(--chip-large-font-size); height: var(--chip-large-height);}.var-chip--small { padding: var(--chip-small-padding); font-size: var(--chip-small-font-size); height: var(--chip-small-height);}.var-chip--mini { padding: var(--chip-mini-padding); font-size: var(--chip-mini-font-size); height: var(--chip-mini-height);}.var-chip--close { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: inherit; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent;}.var-chip--close .var-icon { font-size: inherit;}.var-chip__text-large { margin: var(--chip-text-large-margin);}.var-chip__text-normal { margin: var(--chip-text-normal-margin);}.var-chip__text-small { margin: var(--chip-text-small-margin);}.var-chip__text-mini { margin: var(--chip-text-mini-margin);}
|
package/es/chip/props.mjs
CHANGED
|
@@ -11,6 +11,10 @@ const props = {
|
|
|
11
11
|
},
|
|
12
12
|
color: String,
|
|
13
13
|
textColor: String,
|
|
14
|
+
icon: pickProps(iconProps, "name"),
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated use icon instead
|
|
17
|
+
*/
|
|
14
18
|
iconName: pickProps(iconProps, "name"),
|
|
15
19
|
namespace: pickProps(iconProps, "namespace"),
|
|
16
20
|
plain: Boolean,
|