@vuetify/nightly 3.4.0-dev.2023-11-09 → 3.4.0-dev.2023-12-07

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/vuetify.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Vuetify v3.4.0-dev.2023-11-09
2
+ * Vuetify v3.4.0-dev.2023-12-07
3
3
  * Forged by John Leider
4
4
  * Released under the MIT License.
5
5
  */
@@ -1937,6 +1937,7 @@
1937
1937
  id: false,
1938
1938
  it: false,
1939
1939
  ja: false,
1940
+ km: false,
1940
1941
  ko: false,
1941
1942
  lv: false,
1942
1943
  lt: false,
@@ -2993,6 +2994,101 @@
2993
2994
 
2994
2995
  // Types
2995
2996
 
2997
+ // Composables
2998
+ function useColor(colors) {
2999
+ return destructComputed(() => {
3000
+ const classes = [];
3001
+ const styles = {};
3002
+ if (colors.value.background) {
3003
+ if (isCssColor(colors.value.background)) {
3004
+ styles.backgroundColor = colors.value.background;
3005
+ if (!colors.value.text && isParsableColor(colors.value.background)) {
3006
+ const backgroundColor = parseColor(colors.value.background);
3007
+ if (backgroundColor.a == null || backgroundColor.a === 1) {
3008
+ const textColor = getForeground(backgroundColor);
3009
+ styles.color = textColor;
3010
+ styles.caretColor = textColor;
3011
+ }
3012
+ }
3013
+ } else {
3014
+ classes.push(`bg-${colors.value.background}`);
3015
+ }
3016
+ }
3017
+ if (colors.value.text) {
3018
+ if (isCssColor(colors.value.text)) {
3019
+ styles.color = colors.value.text;
3020
+ styles.caretColor = colors.value.text;
3021
+ } else {
3022
+ classes.push(`text-${colors.value.text}`);
3023
+ }
3024
+ }
3025
+ return {
3026
+ colorClasses: classes,
3027
+ colorStyles: styles
3028
+ };
3029
+ });
3030
+ }
3031
+ function useTextColor(props, name) {
3032
+ const colors = vue.computed(() => ({
3033
+ text: vue.isRef(props) ? props.value : name ? props[name] : null
3034
+ }));
3035
+ const {
3036
+ colorClasses: textColorClasses,
3037
+ colorStyles: textColorStyles
3038
+ } = useColor(colors);
3039
+ return {
3040
+ textColorClasses,
3041
+ textColorStyles
3042
+ };
3043
+ }
3044
+ function useBackgroundColor(props, name) {
3045
+ const colors = vue.computed(() => ({
3046
+ background: vue.isRef(props) ? props.value : name ? props[name] : null
3047
+ }));
3048
+ const {
3049
+ colorClasses: backgroundColorClasses,
3050
+ colorStyles: backgroundColorStyles
3051
+ } = useColor(colors);
3052
+ return {
3053
+ backgroundColorClasses,
3054
+ backgroundColorStyles
3055
+ };
3056
+ }
3057
+
3058
+ // Utilities
3059
+
3060
+ // Types
3061
+
3062
+ // Composables
3063
+ const makeRoundedProps = propsFactory({
3064
+ rounded: {
3065
+ type: [Boolean, Number, String],
3066
+ default: undefined
3067
+ }
3068
+ }, 'rounded');
3069
+ function useRounded(props) {
3070
+ let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
3071
+ const roundedClasses = vue.computed(() => {
3072
+ const rounded = vue.isRef(props) ? props.value : props.rounded;
3073
+ const classes = [];
3074
+ if (rounded === true || rounded === '') {
3075
+ classes.push(`${name}--rounded`);
3076
+ } else if (typeof rounded === 'string' || rounded === 0) {
3077
+ for (const value of String(rounded).split(' ')) {
3078
+ classes.push(`rounded-${value}`);
3079
+ }
3080
+ }
3081
+ return classes;
3082
+ });
3083
+ return {
3084
+ roundedClasses
3085
+ };
3086
+ }
3087
+
3088
+ // Utilities
3089
+
3090
+ // Types
3091
+
2996
3092
  const makeTransitionProps = propsFactory({
2997
3093
  transition: {
2998
3094
  type: [Boolean, String, Object],
@@ -3073,6 +3169,7 @@
3073
3169
  const makeVImgProps = propsFactory({
3074
3170
  alt: String,
3075
3171
  cover: Boolean,
3172
+ color: String,
3076
3173
  draggable: {
3077
3174
  type: [Boolean, String],
3078
3175
  default: undefined
@@ -3101,6 +3198,7 @@
3101
3198
  position: String,
3102
3199
  ...makeVResponsiveProps(),
3103
3200
  ...makeComponentProps(),
3201
+ ...makeRoundedProps(),
3104
3202
  ...makeTransitionProps()
3105
3203
  }, 'VImg');
3106
3204
  const VImg = genericComponent()({
@@ -3119,6 +3217,13 @@
3119
3217
  emit,
3120
3218
  slots
3121
3219
  } = _ref;
3220
+ const {
3221
+ backgroundColorClasses,
3222
+ backgroundColorStyles
3223
+ } = useBackgroundColor(vue.toRef(props, 'color'));
3224
+ const {
3225
+ roundedClasses
3226
+ } = useRounded(props);
3122
3227
  const currentSrc = vue.shallowRef(''); // Set from srcset
3123
3228
  const image = vue.ref();
3124
3229
  const state = vue.shallowRef(props.eager ? 'loading' : 'idle');
@@ -3311,10 +3416,10 @@
3311
3416
  return vue.withDirectives(vue.createVNode(VResponsive, vue.mergeProps({
3312
3417
  "class": ['v-img', {
3313
3418
  'v-img--booting': !isBooted.value
3314
- }, props.class],
3419
+ }, backgroundColorClasses.value, roundedClasses.value, props.class],
3315
3420
  "style": [{
3316
3421
  width: convertToUnit(props.width === 'auto' ? naturalWidth.value : props.width)
3317
- }, props.style]
3422
+ }, backgroundColorStyles.value, props.style]
3318
3423
  }, responsiveProps, {
3319
3424
  "aspectRatio": aspectRatio.value,
3320
3425
  "aria-label": props.alt,
@@ -3370,71 +3475,6 @@
3370
3475
 
3371
3476
  // Types
3372
3477
 
3373
- // Composables
3374
- function useColor(colors) {
3375
- return destructComputed(() => {
3376
- const classes = [];
3377
- const styles = {};
3378
- if (colors.value.background) {
3379
- if (isCssColor(colors.value.background)) {
3380
- styles.backgroundColor = colors.value.background;
3381
- if (!colors.value.text && isParsableColor(colors.value.background)) {
3382
- const backgroundColor = parseColor(colors.value.background);
3383
- if (backgroundColor.a == null || backgroundColor.a === 1) {
3384
- const textColor = getForeground(backgroundColor);
3385
- styles.color = textColor;
3386
- styles.caretColor = textColor;
3387
- }
3388
- }
3389
- } else {
3390
- classes.push(`bg-${colors.value.background}`);
3391
- }
3392
- }
3393
- if (colors.value.text) {
3394
- if (isCssColor(colors.value.text)) {
3395
- styles.color = colors.value.text;
3396
- styles.caretColor = colors.value.text;
3397
- } else {
3398
- classes.push(`text-${colors.value.text}`);
3399
- }
3400
- }
3401
- return {
3402
- colorClasses: classes,
3403
- colorStyles: styles
3404
- };
3405
- });
3406
- }
3407
- function useTextColor(props, name) {
3408
- const colors = vue.computed(() => ({
3409
- text: vue.isRef(props) ? props.value : name ? props[name] : null
3410
- }));
3411
- const {
3412
- colorClasses: textColorClasses,
3413
- colorStyles: textColorStyles
3414
- } = useColor(colors);
3415
- return {
3416
- textColorClasses,
3417
- textColorStyles
3418
- };
3419
- }
3420
- function useBackgroundColor(props, name) {
3421
- const colors = vue.computed(() => ({
3422
- background: vue.isRef(props) ? props.value : name ? props[name] : null
3423
- }));
3424
- const {
3425
- colorClasses: backgroundColorClasses,
3426
- colorStyles: backgroundColorStyles
3427
- } = useColor(colors);
3428
- return {
3429
- backgroundColorClasses,
3430
- backgroundColorStyles
3431
- };
3432
- }
3433
-
3434
- // Utilities
3435
-
3436
- // Types
3437
-
3438
3478
  // Composables
3439
3479
  const makeElevationProps = propsFactory({
3440
3480
  elevation: {
@@ -3461,36 +3501,6 @@
3461
3501
  };
3462
3502
  }
3463
3503
 
3464
- // Utilities
3465
-
3466
- // Types
3467
-
3468
- // Composables
3469
- const makeRoundedProps = propsFactory({
3470
- rounded: {
3471
- type: [Boolean, Number, String],
3472
- default: undefined
3473
- }
3474
- }, 'rounded');
3475
- function useRounded(props) {
3476
- let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getCurrentInstanceName();
3477
- const roundedClasses = vue.computed(() => {
3478
- const rounded = vue.isRef(props) ? props.value : props.rounded;
3479
- const classes = [];
3480
- if (rounded === true || rounded === '') {
3481
- classes.push(`${name}--rounded`);
3482
- } else if (typeof rounded === 'string' || rounded === 0) {
3483
- for (const value of String(rounded).split(' ')) {
3484
- classes.push(`rounded-${value}`);
3485
- }
3486
- }
3487
- return classes;
3488
- });
3489
- return {
3490
- roundedClasses
3491
- };
3492
- }
3493
-
3494
3504
  // Types
3495
3505
 
3496
3506
  const allowedDensities$1 = [null, 'prominent', 'default', 'comfortable', 'compact'];
@@ -25107,7 +25117,7 @@
25107
25117
  date
25108
25118
  };
25109
25119
  }
25110
- const version$1 = "3.4.0-dev.2023-11-09";
25120
+ const version$1 = "3.4.0-dev.2023-12-07";
25111
25121
  createVuetify$1.version = version$1;
25112
25122
 
25113
25123
  // Vue's inject() can only be used in setup
@@ -25132,7 +25142,7 @@
25132
25142
  ...options
25133
25143
  });
25134
25144
  };
25135
- const version = "3.4.0-dev.2023-11-09";
25145
+ const version = "3.4.0-dev.2023-12-07";
25136
25146
  createVuetify.version = version;
25137
25147
 
25138
25148
  exports.components = components;