@varlet/ui 3.1.4 → 3.2.0-alpha.1711119852830

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/lib/varlet.cjs.js CHANGED
@@ -3818,6 +3818,7 @@ const props$15 = {
3818
3818
  },
3819
3819
  fixed: Boolean,
3820
3820
  border: Boolean,
3821
+ variant: Boolean,
3821
3822
  safeArea: Boolean,
3822
3823
  activeColor: String,
3823
3824
  inactiveColor: String,
@@ -3869,7 +3870,16 @@ function __render__$1c(_ctx, _cache) {
3869
3870
  return vue.openBlock(), vue.createElementBlock(
3870
3871
  "div",
3871
3872
  {
3872
- class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box"), [_ctx.fixed, _ctx.n("--fixed")], [_ctx.border, _ctx.n("--border")], [_ctx.safeArea, _ctx.n("--safe-area")])),
3873
+ class: vue.normalizeClass(
3874
+ _ctx.classes(
3875
+ _ctx.n(),
3876
+ _ctx.n("$--box"),
3877
+ [_ctx.fixed, _ctx.n("--fixed")],
3878
+ [_ctx.border, _ctx.n("--border")],
3879
+ [_ctx.safeArea, _ctx.n("--safe-area")],
3880
+ [_ctx.variant, _ctx.n("--variant")]
3881
+ )
3882
+ ),
3873
3883
  ref: "bottomNavigationDom",
3874
3884
  style: vue.normalizeStyle(`z-index:${_ctx.zIndex}`)
3875
3885
  },
@@ -3901,12 +3911,14 @@ const __sfc__$1d = vue.defineComponent({
3901
3911
  const active = vue.computed(() => props2.active);
3902
3912
  const activeColor = vue.computed(() => props2.activeColor);
3903
3913
  const inactiveColor = vue.computed(() => props2.inactiveColor);
3914
+ const variant = vue.computed(() => props2.variant);
3904
3915
  const fabProps = vue.ref({});
3905
3916
  const { length, bottomNavigationItems, bindBottomNavigationItem } = useBottomNavigationItems();
3906
3917
  const bottomNavigationProvider = {
3907
3918
  active,
3908
3919
  activeColor,
3909
3920
  inactiveColor,
3921
+ variant,
3910
3922
  onToggle
3911
3923
  };
3912
3924
  bindBottomNavigationItem(bottomNavigationProvider);
@@ -4057,26 +4069,58 @@ function __render__$1b(_ctx, _cache) {
4057
4069
  return vue.withDirectives((vue.openBlock(), vue.createElementBlock(
4058
4070
  "button",
4059
4071
  {
4060
- class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box"), [_ctx.isActive, _ctx.n("--active")])),
4072
+ class: vue.normalizeClass(_ctx.classes(_ctx.n(), _ctx.n("$--box"), [_ctx.variant, _ctx.n("--variant-padding")], [_ctx.isActive && !_ctx.variant, _ctx.n("--active")])),
4061
4073
  style: vue.normalizeStyle({
4062
4074
  color: _ctx.isActive ? _ctx.activeColor : _ctx.inactiveColor
4063
4075
  }),
4064
4076
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
4065
4077
  },
4066
4078
  [
4067
- vue.renderSlot(_ctx.$slots, "icon", { active: _ctx.isActive }, () => [
4068
- _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_var_icon, {
4069
- key: 0,
4070
- name: _ctx.icon,
4071
- namespace: _ctx.namespace,
4072
- class: vue.normalizeClass(_ctx.n("icon")),
4073
- "var-bottom-navigation-item-cover": ""
4074
- }, null, 8, ["name", "namespace", "class"])) : vue.createCommentVNode("v-if", true)
4075
- ]),
4076
- _ctx.badge ? (vue.openBlock(), vue.createBlock(_component_var_badge, vue.mergeProps({ key: 0 }, _ctx.badgeProps, {
4077
- class: _ctx.n("badge"),
4078
- "var-bottom-navigation-item-cover": ""
4079
- }), null, 16, ["class"])) : vue.createCommentVNode("v-if", true),
4079
+ vue.createElementVNode(
4080
+ "div",
4081
+ {
4082
+ class: vue.normalizeClass(
4083
+ _ctx.classes(
4084
+ _ctx.n("icon-container"),
4085
+ [_ctx.variant, _ctx.n("--variant-icon-container")],
4086
+ [_ctx.isActive && _ctx.variant, _ctx.n("--variant-active")]
4087
+ )
4088
+ )
4089
+ },
4090
+ [
4091
+ _ctx.badge ? (vue.openBlock(), vue.createBlock(_component_var_badge, vue.mergeProps({ key: 0 }, _ctx.badgeProps, {
4092
+ class: _ctx.n("badge"),
4093
+ "var-bottom-navigation-item-cover": ""
4094
+ }), {
4095
+ default: vue.withCtx(() => [
4096
+ vue.renderSlot(_ctx.$slots, "icon", { active: _ctx.isActive }, () => [
4097
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_var_icon, {
4098
+ key: 0,
4099
+ name: _ctx.icon,
4100
+ namespace: _ctx.namespace,
4101
+ class: vue.normalizeClass(_ctx.n("icon")),
4102
+ "var-bottom-navigation-item-cover": ""
4103
+ }, null, 8, ["name", "namespace", "class"])) : vue.createCommentVNode("v-if", true)
4104
+ ])
4105
+ ]),
4106
+ _: 3
4107
+ /* FORWARDED */
4108
+ }, 16, ["class"])) : vue.renderSlot(_ctx.$slots, "icon", {
4109
+ key: 1,
4110
+ active: _ctx.isActive
4111
+ }, () => [
4112
+ _ctx.icon ? (vue.openBlock(), vue.createBlock(_component_var_icon, {
4113
+ key: 0,
4114
+ name: _ctx.icon,
4115
+ namespace: _ctx.namespace,
4116
+ class: vue.normalizeClass(_ctx.n("icon")),
4117
+ "var-bottom-navigation-item-cover": ""
4118
+ }, null, 8, ["name", "namespace", "class"])) : vue.createCommentVNode("v-if", true)
4119
+ ])
4120
+ ],
4121
+ 2
4122
+ /* CLASS */
4123
+ ),
4080
4124
  vue.createElementVNode(
4081
4125
  "span",
4082
4126
  {
@@ -4114,7 +4158,7 @@ const __sfc__$1c = vue.defineComponent({
4114
4158
  const isActive = vue.computed(() => [name2.value, index.value].includes(active.value));
4115
4159
  const badgeProps = vue.computed(() => props2.badge === true ? defaultBadgeProps : props2.badge);
4116
4160
  const { index, bottomNavigation, bindBottomNavigation } = useBottomNavigation();
4117
- const { active, activeColor, inactiveColor } = bottomNavigation;
4161
+ const { active, activeColor, inactiveColor, variant } = bottomNavigation;
4118
4162
  const bottomNavigationItemProvider = {
4119
4163
  name: name2,
4120
4164
  index
@@ -4131,6 +4175,7 @@ const __sfc__$1c = vue.defineComponent({
4131
4175
  inactiveColor,
4132
4176
  badgeProps,
4133
4177
  isActive,
4178
+ variant,
4134
4179
  n: n$1b,
4135
4180
  classes: classes$Z,
4136
4181
  handleClick
@@ -14600,7 +14645,7 @@ const __sfc__$M = vue.defineComponent({
14600
14645
  const contentRef = vue.ref(null);
14601
14646
  const { height: windowHeight } = useWindowSize();
14602
14647
  const defaultEndAnchor = vue.computed(() => windowHeight.value * 0.6);
14603
- const anchor = useVModel(props2, "anchor");
14648
+ const anchor = useVModel(props2, "anchor", { defaultValue: DEFAULT_START_ANCHOR });
14604
14649
  const anchors = vue.computed(() => {
14605
14650
  const defaultAnchors = [DEFAULT_START_ANCHOR, defaultEndAnchor.value];
14606
14651
  const { anchors: anchors2 } = props2;
@@ -23432,6 +23477,9 @@ const props$5 = {
23432
23477
  type: [Number, String],
23433
23478
  default: "100%"
23434
23479
  },
23480
+ scrollerHeight: {
23481
+ type: [Number, String]
23482
+ },
23435
23483
  elevation: {
23436
23484
  type: [Boolean, Number, String],
23437
23485
  default: true
@@ -23448,7 +23496,8 @@ function __render__$6(_ctx, _cache) {
23448
23496
  vue.createElementVNode(
23449
23497
  "div",
23450
23498
  {
23451
- class: vue.normalizeClass(_ctx.n("main"))
23499
+ class: vue.normalizeClass(_ctx.n("main")),
23500
+ style: vue.normalizeStyle({ height: _ctx.toSizeUnit(_ctx.scrollerHeight) })
23452
23501
  },
23453
23502
  [
23454
23503
  vue.createElementVNode(
@@ -23464,8 +23513,8 @@ function __render__$6(_ctx, _cache) {
23464
23513
  /* CLASS, STYLE */
23465
23514
  )
23466
23515
  ],
23467
- 2
23468
- /* CLASS */
23516
+ 6
23517
+ /* CLASS, STYLE */
23469
23518
  ),
23470
23519
  _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock(
23471
23520
  "div",
@@ -24324,6 +24373,7 @@ var stdin_default$2N = {
24324
24373
  "--table-thead-tr-border-bottom": "thin solid var(--color-outline)",
24325
24374
  "--table-tbody-tr-border-bottom": "thin solid var(--color-outline)",
24326
24375
  "--table-tbody-td-font-size": "16px",
24376
+ "--table-tbody-td-text-align": "left",
24327
24377
  "--table-row-height": "46px",
24328
24378
  "--table-row-padding": "0 16px",
24329
24379
  "--table-footer-border-top": "thin solid var(--color-outline)"
@@ -24442,9 +24492,15 @@ var stdin_default$2I = {
24442
24492
  "--bottom-navigation-item-font-size": "var(--font-size-sm)",
24443
24493
  "--bottom-navigation-item-active-color": "var(--color-primary)",
24444
24494
  "--bottom-navigation-item-active-background-color": "var(--color-surface-container-high)",
24495
+ "--bottom-navigation-item-variant-active-background-color": "var(--color-primary-container)",
24496
+ "--bottom-navigation-item-variant-active-color": "var(--color-on-primary-container)",
24497
+ "--bottom-navigation-fab-border-radius": "50%",
24445
24498
  "--bottom-navigation-item-line-height": "1",
24446
24499
  "--bottom-navigation-item-icon-size": "22px",
24447
- "--bottom-navigation-item-icon-margin-bottom": "5px"
24500
+ "--bottom-navigation-item-icon-margin-bottom": "5px",
24501
+ "--bottom-navigation-item-variant-icon-container-height": "30px",
24502
+ "--bottom-navigation-item-variant-icon-container-border-radius": "100px",
24503
+ "--bottom-navigation-item-variant-icon-container-max-width": "58px"
24448
24504
  };
24449
24505
  var stdin_default$2H = {
24450
24506
  "--menu-background-color": "#272727",
@@ -24533,6 +24589,7 @@ var stdin_default$2x = {
24533
24589
  };
24534
24590
  var stdin_default$2w = {
24535
24591
  "--bottom-navigation-height": "50px",
24592
+ "--bottom-navigation-variant-height": "66px",
24536
24593
  "--bottom-navigation-z-index": "1",
24537
24594
  "--bottom-navigation-background-color": "var(--color-surface-container-high)",
24538
24595
  "--bottom-navigation-border-color": "var(--color-outline)",
@@ -25121,6 +25178,7 @@ var stdin_default$1Q = {
25121
25178
  "--table-tbody-tr-border-bottom": "thin solid var(--color-outline)",
25122
25179
  "--table-tbody-td-text-color": "#555",
25123
25180
  "--table-tbody-td-font-size": "16px",
25181
+ "--table-tbody-td-text-align": "left",
25124
25182
  "--table-row-height": "46px",
25125
25183
  "--table-row-padding": "0 16px",
25126
25184
  "--table-footer-border-top": "thin solid var(--color-outline)"
@@ -25166,6 +25224,7 @@ var stdin_default$1N = {
25166
25224
  "--bottom-navigation-background-color": "var(--color-surface-container)",
25167
25225
  "--bottom-navigation-fab-border-radius": "12px",
25168
25226
  "--bottom-navigation-height": "50px",
25227
+ "--bottom-navigation-variant-height": "66px",
25169
25228
  "--bottom-navigation-z-index": "1",
25170
25229
  "--bottom-navigation-border-color": "var(--color-outline)",
25171
25230
  "--bottom-navigation-fab-offset": "4px"
@@ -25173,11 +25232,17 @@ var stdin_default$1N = {
25173
25232
  var stdin_default$1M = {
25174
25233
  "--bottom-navigation-item-active-background-color": "var(--color-info-container)",
25175
25234
  "--bottom-navigation-item-inactive-color": "var(--color-on-surface-variant)",
25235
+ "--bottom-navigation-item-variant-active-background-color": "var(--color-info-container)",
25236
+ "--bottom-navigation-item-variant-active-color": "var(--color-on-info-container)",
25237
+ "--bottom-navigation-fab-border-radius": "12px",
25176
25238
  "--bottom-navigation-item-font-size": "var(--font-size-sm)",
25177
25239
  "--bottom-navigation-item-active-color": "var(--color-primary)",
25178
25240
  "--bottom-navigation-item-line-height": "1",
25179
25241
  "--bottom-navigation-item-icon-size": "22px",
25180
- "--bottom-navigation-item-icon-margin-bottom": "5px"
25242
+ "--bottom-navigation-item-icon-margin-bottom": "5px",
25243
+ "--bottom-navigation-item-variant-icon-container-height": "30px",
25244
+ "--bottom-navigation-item-variant-icon-container-border-radius": "100px",
25245
+ "--bottom-navigation-item-variant-icon-container-max-width": "58px"
25181
25246
  };
25182
25247
  var stdin_default$1L = {
25183
25248
  "--snackbar-color": "#F5EFF7",
@@ -26097,6 +26162,7 @@ var stdin_default$M = {
26097
26162
  "--table-thead-tr-border-bottom": "thin solid var(--color-outline)",
26098
26163
  "--table-tbody-tr-border-bottom": "thin solid var(--color-outline)",
26099
26164
  "--table-tbody-td-font-size": "16px",
26165
+ "--table-tbody-td-text-align": "left",
26100
26166
  "--table-row-height": "46px",
26101
26167
  "--table-row-padding": "0 16px",
26102
26168
  "--table-footer-border-top": "thin solid var(--color-outline)"
@@ -26175,6 +26241,7 @@ var stdin_default$H = {
26175
26241
  var stdin_default$G = {
26176
26242
  "--bottom-navigation-background-color": "var(--color-surface-container)",
26177
26243
  "--bottom-navigation-height": "50px",
26244
+ "--bottom-navigation-variant-height": "66px",
26178
26245
  "--bottom-navigation-z-index": "1",
26179
26246
  "--bottom-navigation-border-color": "var(--color-outline)",
26180
26247
  "--bottom-navigation-fab-offset": "4px",
@@ -26183,12 +26250,17 @@ var stdin_default$G = {
26183
26250
  var stdin_default$F = {
26184
26251
  "--bottom-navigation-item-active-background-color": "#4A4458",
26185
26252
  "--bottom-navigation-item-inactive-color": "var(--color-on-surface-variant)",
26253
+ "--bottom-navigation-item-variant-active-background-color": "var(--color-info-container)",
26254
+ "--bottom-navigation-item-variant-active-color": "var(--color-on-info-container)",
26186
26255
  "--bottom-navigation-fab-border-radius": "12px",
26187
26256
  "--bottom-navigation-item-font-size": "var(--font-size-sm)",
26188
26257
  "--bottom-navigation-item-active-color": "var(--color-primary)",
26189
26258
  "--bottom-navigation-item-line-height": "1",
26190
26259
  "--bottom-navigation-item-icon-size": "22px",
26191
- "--bottom-navigation-item-icon-margin-bottom": "5px"
26260
+ "--bottom-navigation-item-icon-margin-bottom": "5px",
26261
+ "--bottom-navigation-item-variant-icon-container-height": "30px",
26262
+ "--bottom-navigation-item-variant-icon-container-border-radius": "100px",
26263
+ "--bottom-navigation-item-variant-icon-container-max-width": "58px"
26192
26264
  };
26193
26265
  var stdin_default$E = {
26194
26266
  "--snackbar-color": "#322F35",
@@ -28379,7 +28451,7 @@ withInstall(stdin_default$1);
28379
28451
  withPropsDefaultsSetter(stdin_default$1, props);
28380
28452
  const _WatermarkComponent = stdin_default$1;
28381
28453
  var stdin_default = stdin_default$1;
28382
- const version = "3.1.4";
28454
+ const version = "3.2.0-alpha.1711119852830";
28383
28455
  function install(app) {
28384
28456
  stdin_default$5E.install && app.use(stdin_default$5E);
28385
28457
  stdin_default$5C.install && app.use(stdin_default$5C);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@varlet/ui",
3
- "version": "3.1.4",
3
+ "version": "3.2.0-alpha.1711119852830",
4
4
  "description": "A material like components library",
5
5
  "main": "lib/varlet.cjs.js",
6
6
  "module": "es/index.mjs",
@@ -48,9 +48,9 @@
48
48
  "@popperjs/core": "^2.11.6",
49
49
  "dayjs": "^1.10.4",
50
50
  "decimal.js": "^10.2.1",
51
- "@varlet/shared": "3.1.4",
52
- "@varlet/icons": "3.1.4",
53
- "@varlet/use": "3.1.4"
51
+ "@varlet/icons": "3.2.0-alpha.1711119852830",
52
+ "@varlet/shared": "3.2.0-alpha.1711119852830",
53
+ "@varlet/use": "3.2.0-alpha.1711119852830"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@vue/runtime-core": "3.4.21",
@@ -66,9 +66,9 @@
66
66
  "typescript": "^5.1.5",
67
67
  "vue": "3.4.21",
68
68
  "vue-router": "4.2.0",
69
- "@varlet/cli": "3.1.4",
70
- "@varlet/ui": "3.1.4",
71
- "@varlet/touch-emulator": "3.1.4"
69
+ "@varlet/ui": "3.2.0-alpha.1711119852830",
70
+ "@varlet/cli": "3.2.0-alpha.1711119852830",
71
+ "@varlet/touch-emulator": "3.2.0-alpha.1711119852830"
72
72
  },
73
73
  "scripts": {
74
74
  "dev": "varlet-cli dev",
@@ -13,6 +13,7 @@ export interface BottomNavigationProps extends BasicAttributes {
13
13
  activeColor?: string
14
14
  inactiveColor?: string
15
15
  fabProps?: Partial<ButtonProps>
16
+ variant?: boolean
16
17
  onChange?: ListenerProp<(active: string | number) => void>
17
18
  onBeforeChange?: ListenerProp<(active: string | number) => any | Promise<any>>
18
19
  onFabClick?: ListenerProp<() => void>
@@ -109,6 +109,8 @@ export interface StyleVars {
109
109
  badgeDotHeight?: string
110
110
  '--bottom-navigation-height'?: string
111
111
  bottomNavigationHeight?: string
112
+ '--bottom-navigation-variant-height'?: string
113
+ bottomNavigationVariantHeight?: string
112
114
  '--bottom-navigation-z-index'?: string
113
115
  bottomNavigationZIndex?: string
114
116
  '--bottom-navigation-background-color'?: string
@@ -133,6 +135,16 @@ export interface StyleVars {
133
135
  bottomNavigationItemIconMarginBottom?: string
134
136
  '--bottom-navigation-fab-border-radius'?: string
135
137
  bottomNavigationFabBorderRadius?: string
138
+ '--bottom-navigation-item-variant-icon-container-height'?: string
139
+ bottomNavigationItemVariantIconContainerHeight?: string
140
+ '--bottom-navigation-item-variant-icon-container-border-radius'?: string
141
+ bottomNavigationItemVariantIconContainerBorderRadius?: string
142
+ '--bottom-navigation-item-variant-icon-container-max-width'?: string
143
+ bottomNavigationItemVariantIconContainerMaxWidth?: string
144
+ '--bottom-navigation-item-variant-active-background-color'?: string
145
+ bottomNavigationItemVariantActiveBackgroundColor?: string
146
+ '--bottom-navigation-item-variant-active-color'?: string
147
+ bottomNavigationItemVariantActiveColor?: string
136
148
  '--breadcrumb-active-color'?: string
137
149
  breadcrumbActiveColor?: string
138
150
  '--breadcrumb-inactive-color'?: string
@@ -1221,6 +1233,8 @@ export interface StyleVars {
1221
1233
  tableTbodyTdTextColor?: string
1222
1234
  '--table-tbody-td-font-size'?: string
1223
1235
  tableTbodyTdFontSize?: string
1236
+ '--table-tbody-td-text-align'?: string
1237
+ tableTbodyTdTextAlign?: string
1224
1238
  '--table-row-height'?: string
1225
1239
  tableRowHeight?: string
1226
1240
  '--table-row-padding'?: string
package/types/table.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare const tableProps: Record<keyof TableProps, any>
5
5
 
6
6
  export interface TableProps extends BasicAttributes {
7
7
  fullWidth?: string | number
8
+ scrollerHeight?: string | number
8
9
  elevation?: boolean | string | number
9
10
  }
10
11