origam 2.31.0 → 2.32.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.
@@ -427,6 +427,7 @@
427
427
  --origam-card--loading---min-width: 240px;
428
428
  --origam-card--loading---min-height: 120px;
429
429
  --origam-card__asset---aspect-ratio: 16 / 9;
430
+ --origam-card__content---display: block;
430
431
  --origam-card__loader---min-height: 4px;
431
432
  --origam-card__skeleton---padding: var(--origam-space---4);
432
433
  --origam-card__loader---z-index: 3;
@@ -3447,6 +3448,7 @@
3447
3448
  --origam-card--loading---min-width: 240px;
3448
3449
  --origam-card--loading---min-height: 120px;
3449
3450
  --origam-card__asset---aspect-ratio: 16 / 9;
3451
+ --origam-card__content---display: block;
3450
3452
  --origam-card__loader---min-height: 4px;
3451
3453
  --origam-card__skeleton---padding: var(--origam-space---4);
3452
3454
  --origam-card__loader---z-index: 3;
@@ -327,6 +327,7 @@
327
327
  --origam-card--loading---min-width: 240px;
328
328
  --origam-card--loading---min-height: 120px;
329
329
  --origam-card__asset---aspect-ratio: 16 / 9;
330
+ --origam-card__content---display: block;
330
331
  --origam-card__loader---min-height: 4px;
331
332
  --origam-card__skeleton---padding: var(--origam-space---4);
332
333
  --origam-card__loader---z-index: 3;
@@ -427,6 +427,7 @@
427
427
  --origam-card--loading---min-width: 240px;
428
428
  --origam-card--loading---min-height: 120px;
429
429
  --origam-card__asset---aspect-ratio: 16 / 9;
430
+ --origam-card__content---display: block;
430
431
  --origam-card__loader---min-height: 4px;
431
432
  --origam-card__skeleton---padding: var(--origam-space---4);
432
433
  --origam-card__loader---z-index: 3;
@@ -3447,6 +3448,7 @@
3447
3448
  --origam-card--loading---min-width: 240px;
3448
3449
  --origam-card--loading---min-height: 120px;
3449
3450
  --origam-card__asset---aspect-ratio: 16 / 9;
3451
+ --origam-card__content---display: block;
3450
3452
  --origam-card__loader---min-height: 4px;
3451
3453
  --origam-card__skeleton---padding: var(--origam-space---4);
3452
3454
  --origam-card__loader---z-index: 3;
@@ -327,6 +327,7 @@
327
327
  --origam-card--loading---min-width: 240px;
328
328
  --origam-card--loading---min-height: 120px;
329
329
  --origam-card__asset---aspect-ratio: 16 / 9;
330
+ --origam-card__content---display: block;
330
331
  --origam-card__loader---min-height: 4px;
331
332
  --origam-card__skeleton---padding: var(--origam-space---4);
332
333
  --origam-card__loader---z-index: 3;
@@ -162,7 +162,10 @@
162
162
  </div>
163
163
  </template>
164
164
 
165
- <div class="origam-card__content">
165
+ <div
166
+ class="origam-card__content"
167
+ :style="contentStyles"
168
+ >
166
169
  <template v-if="hasText">
167
170
  <slot name="text">
168
171
  <origam-card-text
@@ -214,9 +217,9 @@ import { PROGRESS_TYPE } from "../../enums/Progress/progress.enum";
214
217
  import { splitSkeletonOverrides } from "../../utils/Skeleton/skeleton.util";
215
218
  import { computed, ref, StyleValue, toRef, useAttrs, useSlots } from "vue";
216
219
  const props = defineProps({
220
+ contentDisplay: { type: null, required: false },
217
221
  disabled: { type: Boolean, required: false },
218
222
  flat: { type: Boolean, required: false },
219
- hover: { type: Boolean, required: false },
220
223
  image: { type: String, required: false },
221
224
  link: { type: Boolean, required: false },
222
225
  subtitle: { type: [String, Number], required: false },
@@ -310,7 +313,9 @@ const props = defineProps({
310
313
  prependAriaLabel: { type: String, required: false },
311
314
  appendAriaLabel: { type: String, required: false },
312
315
  active: { type: [Boolean, Object], required: false },
313
- activeClass: { type: String, required: false }
316
+ activeClass: { type: String, required: false },
317
+ hover: { type: [Boolean, Object], required: false },
318
+ hoverClass: { type: String, required: false }
314
319
  });
315
320
  defineEmits(["click:append", "click:prepend", "update:active", "update:hover"]);
316
321
  defineSlots();
@@ -419,6 +424,7 @@ const cardStyles = computed(() => {
419
424
  props.style
420
425
  ];
421
426
  });
427
+ const contentStyles = computed(() => props.contentDisplay ? { display: props.contentDisplay } : void 0);
422
428
  const cardProgressClasses = computed(() => {
423
429
  return [
424
430
  "origam-card__progress",
@@ -516,6 +522,10 @@ defineExpose({
516
522
  border-end-end-radius: var(--origam-card---border-end-end-radius, 0);
517
523
  border-end-start-radius: var(--origam-card---border-end-start-radius, 0);
518
524
 
525
+ &__content {
526
+ display: var(--origam-card__content---display, block);
527
+ }
528
+
519
529
  &__asset {
520
530
  aspect-ratio: var(--origam-card__asset---aspect-ratio, 16 / 9);
521
531
  overflow: hidden;
@@ -204,8 +204,8 @@ const props = defineProps({
204
204
  transition: { type: [Boolean, String, Object], required: false, default: () => ({ component: OrigamTranslateScale }) },
205
205
  scrim: { type: [Boolean, String], required: false, default: true },
206
206
  attach: { type: [Boolean, String, null], required: false, skipCheck: true },
207
+ contentDisplay: { type: null, required: false },
207
208
  flat: { type: Boolean, required: false },
208
- hover: { type: Boolean, required: false },
209
209
  image: { type: String, required: false },
210
210
  link: { type: Boolean, required: false },
211
211
  subtitle: { type: [String, Number], required: false },
@@ -290,6 +290,8 @@ const props = defineProps({
290
290
  appendAriaLabel: { type: String, required: false },
291
291
  active: { type: [Boolean, Object], required: false },
292
292
  activeClass: { type: String, required: false },
293
+ hover: { type: [Boolean, Object], required: false },
294
+ hoverClass: { type: String, required: false },
293
295
  status: { type: null, required: false },
294
296
  statusIconPosition: { type: null, required: false },
295
297
  icon: { type: null, required: false }
@@ -180,8 +180,8 @@ const props = defineProps({
180
180
  transition: { type: [Boolean, String, Object], required: false },
181
181
  scrim: { type: [Boolean, String], required: false },
182
182
  attach: { type: [Boolean, String, null], required: false, skipCheck: true },
183
+ contentDisplay: { type: null, required: false },
183
184
  flat: { type: Boolean, required: false },
184
- hover: { type: Boolean, required: false },
185
185
  image: { type: String, required: false },
186
186
  link: { type: Boolean, required: false },
187
187
  subtitle: { type: [String, Number], required: false },
@@ -266,6 +266,8 @@ const props = defineProps({
266
266
  appendAriaLabel: { type: String, required: false },
267
267
  active: { type: [Boolean, Object], required: false },
268
268
  activeClass: { type: String, required: false },
269
+ hover: { type: [Boolean, Object], required: false },
270
+ hoverClass: { type: String, required: false },
269
271
  status: { type: null, required: false },
270
272
  statusIconPosition: { type: null, required: false },
271
273
  icon: { type: null, required: false }
@@ -3,9 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.CARD_TYPE = void 0;
6
+ exports.CARD_TYPE = exports.CARD_CONTENT_DISPLAY = void 0;
7
7
  var CARD_TYPE = exports.CARD_TYPE = /* @__PURE__ */(CARD_TYPE2 => {
8
8
  CARD_TYPE2["GRID"] = "grid";
9
9
  CARD_TYPE2["LIST"] = "list";
10
10
  return CARD_TYPE2;
11
- })(CARD_TYPE || {});
11
+ })(CARD_TYPE || {});
12
+ var CARD_CONTENT_DISPLAY = exports.CARD_CONTENT_DISPLAY = /* @__PURE__ */(CARD_CONTENT_DISPLAY2 => {
13
+ CARD_CONTENT_DISPLAY2["BLOCK"] = "block";
14
+ CARD_CONTENT_DISPLAY2["CONTENTS"] = "contents";
15
+ CARD_CONTENT_DISPLAY2["FLEX"] = "flex";
16
+ CARD_CONTENT_DISPLAY2["GRID"] = "grid";
17
+ return CARD_CONTENT_DISPLAY2;
18
+ })(CARD_CONTENT_DISPLAY || {});
@@ -2,3 +2,9 @@ export declare enum CARD_TYPE {
2
2
  GRID = "grid",
3
3
  LIST = "list"
4
4
  }
5
+ export declare enum CARD_CONTENT_DISPLAY {
6
+ BLOCK = "block",
7
+ CONTENTS = "contents",
8
+ FLEX = "flex",
9
+ GRID = "grid"
10
+ }
@@ -3,3 +3,10 @@ export var CARD_TYPE = /* @__PURE__ */ ((CARD_TYPE2) => {
3
3
  CARD_TYPE2["LIST"] = "list";
4
4
  return CARD_TYPE2;
5
5
  })(CARD_TYPE || {});
6
+ export var CARD_CONTENT_DISPLAY = /* @__PURE__ */ ((CARD_CONTENT_DISPLAY2) => {
7
+ CARD_CONTENT_DISPLAY2["BLOCK"] = "block";
8
+ CARD_CONTENT_DISPLAY2["CONTENTS"] = "contents";
9
+ CARD_CONTENT_DISPLAY2["FLEX"] = "flex";
10
+ CARD_CONTENT_DISPLAY2["GRID"] = "grid";
11
+ return CARD_CONTENT_DISPLAY2;
12
+ })(CARD_CONTENT_DISPLAY || {});
@@ -6,7 +6,7 @@ import type { ICommonsComponentProps, ITagProps } from '../Commons/commons.inter
6
6
  import type { IDensityProps } from '../Commons/density.interface';
7
7
  import type { IDimensionProps } from '../Commons/dimension.interface';
8
8
  import type { IElevationProps } from '../Commons/elevation.interface';
9
- import type { IHoverEmits } from '../Commons/hover.interface';
9
+ import type { IHoverEmits, IHoverProps } from '../Commons/hover.interface';
10
10
  import type { ILinkProps } from '../Commons/router.interface';
11
11
  import type { ILoaderProps } from '../Commons/loader.interface';
12
12
  import type { ILocationProps } from '../Commons/location.interface';
@@ -15,11 +15,19 @@ import type { IPaddingProps } from '../Commons/padding.interface';
15
15
  import type { IPositionProps } from '../Commons/position.interface';
16
16
  import type { IRippleProps } from '../Commons/ripple.interface';
17
17
  import type { IRoundedProps } from '../Commons/rounded.interface';
18
- import type { TCardType } from '../../types/Card/card.type';
19
- export interface ICardProps extends ICommonsComponentProps, ITagProps, IBorderProps, IColorProps, IBgColorProps, IDensityProps, IDimensionProps, IElevationProps, ILoaderProps, ILocationProps, IPositionProps, IRoundedProps, IMarginProps, IPaddingProps, ILinkProps, IRippleProps, IAdjacentProps, IActiveProps {
18
+ import type { TCardContentDisplay, TCardType } from '../../types/Card/card.type';
19
+ export interface ICardProps extends ICommonsComponentProps, ITagProps, IBorderProps, IColorProps, IBgColorProps, IDensityProps, IDimensionProps, IElevationProps, ILoaderProps, ILocationProps, IPositionProps, IRoundedProps, IMarginProps, IPaddingProps, ILinkProps, IRippleProps, IAdjacentProps, IActiveProps, IHoverProps {
20
+ /*********************************************************
21
+ * contentDisplay
22
+ *
23
+ * @description
24
+ * `display` of the `.origam-card__content` wrapper around the default and `text` slots (#1100).
25
+ * `contents` flattens it so the slotted children become direct items of the card's own grid / flex layout.
26
+ * Defaults to the `--origam-card__content---display` token (`block`).
27
+ ********************************************************/
28
+ contentDisplay?: TCardContentDisplay;
20
29
  disabled?: boolean;
21
30
  flat?: boolean;
22
- hover?: boolean;
23
31
  image?: string;
24
32
  link?: boolean;
25
33
  subtitle?: string | number;
@@ -1,4 +1,5 @@
1
1
  import OrigamCard from '../../components/Card/OrigamCard.vue';
2
- import { CARD_TYPE } from '../../enums/Card/card.enum';
2
+ import { CARD_CONTENT_DISPLAY, CARD_TYPE } from '../../enums/Card/card.enum';
3
3
  export type TCardType = `${CARD_TYPE}`;
4
+ export type TCardContentDisplay = `${CARD_CONTENT_DISPLAY}`;
4
5
  export type TOrigamCard = InstanceType<typeof OrigamCard>;