@varlet/ui 3.1.3 → 3.2.0-alpha.1710928822670

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;
@@ -22710,7 +22755,7 @@ var stdin_default$3r = vue.defineComponent({
22710
22755
  lastIndex
22711
22756
  });
22712
22757
  return vue.createVNode("div", {
22713
- "class": classes$a([direction === "column", n$d("--full")]),
22758
+ "class": classes$a([direction === "column", n$d("--auto")]),
22714
22759
  "style": {
22715
22760
  margin
22716
22761
  }
@@ -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",
@@ -24315,6 +24364,7 @@ var stdin_default$2O = {
24315
24364
  var stdin_default$2N = {
24316
24365
  "--table-background": "#303030",
24317
24366
  "--table-thead-th-text-color": "rgba(255, 255, 255, 0.6)",
24367
+ "--table-thead-th-text-align": "left",
24318
24368
  "--table-tbody-td-text-color": "#fff",
24319
24369
  "--table-tbody-tr-hover-background": "#4c4b4b",
24320
24370
  "--table-border-radius": "2px",
@@ -24323,6 +24373,7 @@ var stdin_default$2N = {
24323
24373
  "--table-thead-tr-border-bottom": "thin solid var(--color-outline)",
24324
24374
  "--table-tbody-tr-border-bottom": "thin solid var(--color-outline)",
24325
24375
  "--table-tbody-td-font-size": "16px",
24376
+ "--table-tbody-td-text-align": "left",
24326
24377
  "--table-row-height": "46px",
24327
24378
  "--table-row-padding": "0 16px",
24328
24379
  "--table-footer-border-top": "thin solid var(--color-outline)"
@@ -24441,9 +24492,15 @@ var stdin_default$2I = {
24441
24492
  "--bottom-navigation-item-font-size": "var(--font-size-sm)",
24442
24493
  "--bottom-navigation-item-active-color": "var(--color-primary)",
24443
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%",
24444
24498
  "--bottom-navigation-item-line-height": "1",
24445
24499
  "--bottom-navigation-item-icon-size": "22px",
24446
- "--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"
24447
24504
  };
24448
24505
  var stdin_default$2H = {
24449
24506
  "--menu-background-color": "#272727",
@@ -24532,6 +24589,7 @@ var stdin_default$2x = {
24532
24589
  };
24533
24590
  var stdin_default$2w = {
24534
24591
  "--bottom-navigation-height": "50px",
24592
+ "--bottom-navigation-variant-height": "66px",
24535
24593
  "--bottom-navigation-z-index": "1",
24536
24594
  "--bottom-navigation-background-color": "var(--color-surface-container-high)",
24537
24595
  "--bottom-navigation-border-color": "var(--color-outline)",
@@ -25114,11 +25172,13 @@ var stdin_default$1Q = {
25114
25172
  "--table-border-radius": "2px",
25115
25173
  "--table-thead-border-bottom": "thin solid var(--color-outline)",
25116
25174
  "--table-thead-th-text-color": "rgba(0, 0, 0, 0.6)",
25175
+ "--table-thead-th-text-align": "left",
25117
25176
  "--table-thead-th-font-size": "14px",
25118
25177
  "--table-thead-tr-border-bottom": "thin solid var(--color-outline)",
25119
25178
  "--table-tbody-tr-border-bottom": "thin solid var(--color-outline)",
25120
25179
  "--table-tbody-td-text-color": "#555",
25121
25180
  "--table-tbody-td-font-size": "16px",
25181
+ "--table-tbody-td-text-align": "left",
25122
25182
  "--table-row-height": "46px",
25123
25183
  "--table-row-padding": "0 16px",
25124
25184
  "--table-footer-border-top": "thin solid var(--color-outline)"
@@ -25164,6 +25224,7 @@ var stdin_default$1N = {
25164
25224
  "--bottom-navigation-background-color": "var(--color-surface-container)",
25165
25225
  "--bottom-navigation-fab-border-radius": "12px",
25166
25226
  "--bottom-navigation-height": "50px",
25227
+ "--bottom-navigation-variant-height": "66px",
25167
25228
  "--bottom-navigation-z-index": "1",
25168
25229
  "--bottom-navigation-border-color": "var(--color-outline)",
25169
25230
  "--bottom-navigation-fab-offset": "4px"
@@ -25171,11 +25232,17 @@ var stdin_default$1N = {
25171
25232
  var stdin_default$1M = {
25172
25233
  "--bottom-navigation-item-active-background-color": "var(--color-info-container)",
25173
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",
25174
25238
  "--bottom-navigation-item-font-size": "var(--font-size-sm)",
25175
25239
  "--bottom-navigation-item-active-color": "var(--color-primary)",
25176
25240
  "--bottom-navigation-item-line-height": "1",
25177
25241
  "--bottom-navigation-item-icon-size": "22px",
25178
- "--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"
25179
25246
  };
25180
25247
  var stdin_default$1L = {
25181
25248
  "--snackbar-color": "#F5EFF7",
@@ -26086,6 +26153,7 @@ var stdin_default$N = {
26086
26153
  var stdin_default$M = {
26087
26154
  "--table-background": "var(--color-surface-container-highest)",
26088
26155
  "--table-thead-th-text-color": "rgba(255, 255, 255, 0.6)",
26156
+ "--table-thead-th-text-align": "left",
26089
26157
  "--table-tbody-td-text-color": "#fff",
26090
26158
  "--table-tbody-tr-hover-background": "var(--color-surface-container-highest)",
26091
26159
  "--table-border-radius": "2px",
@@ -26094,6 +26162,7 @@ var stdin_default$M = {
26094
26162
  "--table-thead-tr-border-bottom": "thin solid var(--color-outline)",
26095
26163
  "--table-tbody-tr-border-bottom": "thin solid var(--color-outline)",
26096
26164
  "--table-tbody-td-font-size": "16px",
26165
+ "--table-tbody-td-text-align": "left",
26097
26166
  "--table-row-height": "46px",
26098
26167
  "--table-row-padding": "0 16px",
26099
26168
  "--table-footer-border-top": "thin solid var(--color-outline)"
@@ -26172,6 +26241,7 @@ var stdin_default$H = {
26172
26241
  var stdin_default$G = {
26173
26242
  "--bottom-navigation-background-color": "var(--color-surface-container)",
26174
26243
  "--bottom-navigation-height": "50px",
26244
+ "--bottom-navigation-variant-height": "66px",
26175
26245
  "--bottom-navigation-z-index": "1",
26176
26246
  "--bottom-navigation-border-color": "var(--color-outline)",
26177
26247
  "--bottom-navigation-fab-offset": "4px",
@@ -26180,12 +26250,17 @@ var stdin_default$G = {
26180
26250
  var stdin_default$F = {
26181
26251
  "--bottom-navigation-item-active-background-color": "#4A4458",
26182
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)",
26183
26255
  "--bottom-navigation-fab-border-radius": "12px",
26184
26256
  "--bottom-navigation-item-font-size": "var(--font-size-sm)",
26185
26257
  "--bottom-navigation-item-active-color": "var(--color-primary)",
26186
26258
  "--bottom-navigation-item-line-height": "1",
26187
26259
  "--bottom-navigation-item-icon-size": "22px",
26188
- "--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"
26189
26264
  };
26190
26265
  var stdin_default$E = {
26191
26266
  "--snackbar-color": "#322F35",
@@ -28376,7 +28451,7 @@ withInstall(stdin_default$1);
28376
28451
  withPropsDefaultsSetter(stdin_default$1, props);
28377
28452
  const _WatermarkComponent = stdin_default$1;
28378
28453
  var stdin_default = stdin_default$1;
28379
- const version = "3.1.3";
28454
+ const version = "3.2.0-alpha.1710928822670";
28380
28455
  function install(app) {
28381
28456
  stdin_default$5E.install && app.use(stdin_default$5E);
28382
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.3",
3
+ "version": "3.2.0-alpha.1710928822670",
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/use": "3.1.3",
52
- "@varlet/shared": "3.1.3",
53
- "@varlet/icons": "3.1.3"
51
+ "@varlet/shared": "3.2.0-alpha.1710928822670",
52
+ "@varlet/use": "3.2.0-alpha.1710928822670",
53
+ "@varlet/icons": "3.2.0-alpha.1710928822670"
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/ui": "3.1.3",
70
- "@varlet/touch-emulator": "3.1.3",
71
- "@varlet/cli": "3.1.3"
69
+ "@varlet/cli": "3.2.0-alpha.1710928822670",
70
+ "@varlet/touch-emulator": "3.2.0-alpha.1710928822670",
71
+ "@varlet/ui": "3.2.0-alpha.1710928822670"
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
@@ -1207,6 +1219,8 @@ export interface StyleVars {
1207
1219
  tableTheadBorderBottom?: string
1208
1220
  '--table-thead-th-text-color'?: string
1209
1221
  tableTheadThTextColor?: string
1222
+ '--table-thead-th-text-align'?: string
1223
+ tableTheadThTextAlign?: string
1210
1224
  '--table-thead-th-font-size'?: string
1211
1225
  tableTheadThFontSize?: string
1212
1226
  '--table-thead-tr-border-bottom'?: string
@@ -1219,6 +1233,8 @@ export interface StyleVars {
1219
1233
  tableTbodyTdTextColor?: string
1220
1234
  '--table-tbody-td-font-size'?: string
1221
1235
  tableTbodyTdFontSize?: string
1236
+ '--table-tbody-td-text-align'?: string
1237
+ tableTbodyTdTextAlign?: string
1222
1238
  '--table-row-height'?: string
1223
1239
  tableRowHeight?: string
1224
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