origam 2.31.0 → 2.32.1
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/CHANGELOG.md +18 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +2 -0
- package/dist/src/assets/css/tokens/light.css +1 -0
- package/dist/src/assets/scss/tokens/_dark.scss +2 -0
- package/dist/src/assets/scss/tokens/_light.scss +1 -0
- package/dist/src/components/Bracket/OrigamBracketCompetitor.vue +1 -1
- package/dist/src/components/Bracket/OrigamBracketMatch.vue +1 -1
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +1 -1
- package/dist/src/components/Btn/OrigamBtn.vue +1 -1
- package/dist/src/components/Card/OrigamCard.vue +13 -3
- package/dist/src/components/Dialog/OrigamDialog.vue +3 -1
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +3 -1
- package/dist/src/components/Select/OrigamSelect.vue +2 -2
- package/dist/src/components/Sheet/OrigamSheet.vue +1 -1
- package/dist/src/components/TextareaField/OrigamTextareaField.vue +1 -4
- package/dist/src/composables/Commons/dragResizer.composable.cjs +3 -3
- package/dist/src/composables/Commons/dragResizer.composable.d.ts +15 -2
- package/dist/src/composables/Commons/dragResizer.composable.js +5 -5
- package/dist/src/enums/Card/card.enum.cjs +9 -2
- package/dist/src/enums/Card/card.enum.d.ts +6 -0
- package/dist/src/enums/Card/card.enum.js +7 -0
- package/dist/src/interfaces/Bracket/bracket-competitor-component.interface.d.ts +2 -2
- package/dist/src/interfaces/Bracket/bracket-match-component.interface.d.ts +2 -2
- package/dist/src/interfaces/Breadcrumb/breadcrumb-item.interface.d.ts +9 -3
- package/dist/src/interfaces/Btn/btn.interface.d.ts +9 -2
- package/dist/src/interfaces/Card/card.interface.d.ts +12 -4
- package/dist/src/interfaces/Sheet/sheet-emits.interface.d.ts +6 -1
- package/dist/src/types/Card/card.type.d.ts +2 -1
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -151,7 +151,7 @@ const props = defineProps({
|
|
|
151
151
|
fontSize: { type: null, required: false },
|
|
152
152
|
fontWeight: { type: null, required: false }
|
|
153
153
|
});
|
|
154
|
-
const emit = defineEmits(["click", "update:active"]);
|
|
154
|
+
const emit = defineEmits(["click", "update:active", "update:hover"]);
|
|
155
155
|
defineSlots();
|
|
156
156
|
const { filterProps } = useProps(props);
|
|
157
157
|
const { typographyStyles: competitorTypographyStyles } = useTypography(props, "bracket-competitor");
|
|
@@ -176,7 +176,7 @@ const props = defineProps({
|
|
|
176
176
|
marginBlockStart: { type: [Boolean, Number, String], required: false },
|
|
177
177
|
marginBlockEnd: { type: [Boolean, Number, String], required: false }
|
|
178
178
|
});
|
|
179
|
-
const emit = defineEmits(["click", "competitor-click", "winner-click", "update:active"]);
|
|
179
|
+
const emit = defineEmits(["click", "competitor-click", "winner-click", "update:active", "update:hover"]);
|
|
180
180
|
defineSlots();
|
|
181
181
|
const { filterProps } = useProps(props);
|
|
182
182
|
const resolvedStatus = computed(() => props.status ?? props.match.status);
|
|
@@ -158,7 +158,7 @@ const props = defineProps({
|
|
|
158
158
|
active: { type: [Boolean, Object], required: false },
|
|
159
159
|
activeClass: { type: String, required: false }
|
|
160
160
|
});
|
|
161
|
-
defineEmits(["click:append", "click:prepend"]);
|
|
161
|
+
defineEmits(["click:append", "click:prepend", "update:hover"]);
|
|
162
162
|
defineSlots();
|
|
163
163
|
const { filterProps } = useProps(props);
|
|
164
164
|
const attrs = useAttrs();
|
|
@@ -249,7 +249,7 @@ const props = defineProps({
|
|
|
249
249
|
letterSpacing: { type: null, required: false }
|
|
250
250
|
});
|
|
251
251
|
const colorLocked = computed(() => props.color ? "true" : void 0);
|
|
252
|
-
defineEmits(["group:selected"]);
|
|
252
|
+
defineEmits(["group:selected", "update:hover"]);
|
|
253
253
|
defineSlots();
|
|
254
254
|
const { filterProps } = useProps(props);
|
|
255
255
|
const origamProgressRef = ref();
|
|
@@ -162,7 +162,10 @@
|
|
|
162
162
|
</div>
|
|
163
163
|
</template>
|
|
164
164
|
|
|
165
|
-
<div
|
|
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 }
|
|
@@ -246,7 +246,6 @@
|
|
|
246
246
|
<origam-icon
|
|
247
247
|
:icon="menuIcon"
|
|
248
248
|
class="origam-select__menu-icon"
|
|
249
|
-
@click="noop"
|
|
250
249
|
@mousedown="handleMousedownMenuIcon"
|
|
251
250
|
/>
|
|
252
251
|
</slot>
|
|
@@ -316,7 +315,7 @@ import { MDI_ICONS } from "../../enums/Commons/mdi.enum";
|
|
|
316
315
|
import { SELECT_STRATEGY } from "../../enums/Commons/nested.enum";
|
|
317
316
|
import { SIZES } from "../../enums/Commons/size.enum";
|
|
318
317
|
import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
|
|
319
|
-
import { deepEqual, matchesSelector,
|
|
318
|
+
import { deepEqual, matchesSelector, wrapInArray } from "../../utils/Commons/commons.util";
|
|
320
319
|
import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
|
|
321
320
|
import { getUid } from "../../utils/Commons/getCurrentInstance.util";
|
|
322
321
|
const props = defineProps({
|
|
@@ -1066,6 +1065,7 @@ defineExpose(forwardRefs({
|
|
|
1066
1065
|
}
|
|
1067
1066
|
|
|
1068
1067
|
&__menu-icon {
|
|
1068
|
+
cursor: pointer;
|
|
1069
1069
|
margin-inline-start: 4px;
|
|
1070
1070
|
transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
1071
1071
|
}
|
|
@@ -123,7 +123,7 @@ const props = defineProps({
|
|
|
123
123
|
hover: { type: [Boolean, Object], required: false },
|
|
124
124
|
hoverClass: { type: String, required: false }
|
|
125
125
|
});
|
|
126
|
-
const emit = defineEmits(["update:snap", "update:open", "update:active"]);
|
|
126
|
+
const emit = defineEmits(["update:snap", "update:open", "update:active", "update:hover"]);
|
|
127
127
|
defineSlots();
|
|
128
128
|
const { filterProps } = useProps(props);
|
|
129
129
|
const { colorClasses, colorStyles } = useBothColor(
|
|
@@ -611,10 +611,7 @@ watch([model, () => props.maxRows, () => props.density, () => props.rows, active
|
|
|
611
611
|
watch(minHeight, () => {
|
|
612
612
|
controlHeight.value = minHeight.value;
|
|
613
613
|
});
|
|
614
|
-
|
|
615
|
-
if (!verticalDragger.value) return;
|
|
616
|
-
useDragResizer(verticalDragger.value, controlHeight, minHeight.value, maxHeight.value, AXIS.Y);
|
|
617
|
-
});
|
|
614
|
+
useDragResizer(verticalDragger, controlHeight, minHeight, maxHeight, AXIS.Y);
|
|
618
615
|
watch(controlHeight, (newHeight) => {
|
|
619
616
|
nextTick(() => {
|
|
620
617
|
if (!textareaRef.value) return;
|
|
@@ -12,7 +12,7 @@ function useDragResizer(el, value, min, max, axis) {
|
|
|
12
12
|
const resizing = (0, _vue.ref)(false);
|
|
13
13
|
const removeListeners = [];
|
|
14
14
|
const onUnmountedCleanupFns = [];
|
|
15
|
-
(0,
|
|
15
|
+
(0, _commons.tryOnScopeDispose)(() => {
|
|
16
16
|
onUnmountedCleanupFns.forEach(fn => fn());
|
|
17
17
|
});
|
|
18
18
|
const isHorizontal = (0, _vue.computed)(() => {
|
|
@@ -31,7 +31,7 @@ function useDragResizer(el, value, min, max, axis) {
|
|
|
31
31
|
const onMouseMove = e2 => {
|
|
32
32
|
const clickOffset = (0, _commons.getPosition)(e2, isHorizontal.value ? _enums.CLIENT_POSITION.X : _enums.CLIENT_POSITION.Y);
|
|
33
33
|
const delta = clickOffset - start;
|
|
34
|
-
value.value = (0, _commons.clamp)(initialStart + delta, min, max);
|
|
34
|
+
value.value = (0, _commons.clamp)(initialStart + delta, (0, _vue.toValue)(min), (0, _vue.toValue)(max));
|
|
35
35
|
};
|
|
36
36
|
const onMouseUp = onDragEnd;
|
|
37
37
|
removeListeners.push(...[(0, _commons.addWindowListener)("mousemove", onMouseMove, onUnmountedCleanupFns), (0, _commons.addWindowListener)("mouseup", onMouseUp, onUnmountedCleanupFns)]);
|
|
@@ -45,7 +45,7 @@ function useDragResizer(el, value, min, max, axis) {
|
|
|
45
45
|
const onTouchMove = e2 => {
|
|
46
46
|
const clickOffset = (0, _commons.getPosition)(e2, isHorizontal.value ? _enums.CLIENT_POSITION.X : _enums.CLIENT_POSITION.Y);
|
|
47
47
|
const delta = clickOffset - start;
|
|
48
|
-
value.value =
|
|
48
|
+
value.value = (0, _commons.clamp)(initialStart + delta, (0, _vue.toValue)(min), (0, _vue.toValue)(max));
|
|
49
49
|
};
|
|
50
50
|
const onTouchEnd = onDragEnd;
|
|
51
51
|
removeListeners.push(...[(0, _commons.addWindowListener)("touchmove", onTouchMove, onUnmountedCleanupFns), (0, _commons.addWindowListener)("touchend", onTouchEnd, onUnmountedCleanupFns), (0, _commons.addWindowListener)("touchcancel", onTouchEnd, onUnmountedCleanupFns)]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
1
|
+
import type { MaybeRef, MaybeRefOrGetter, Ref } from 'vue';
|
|
2
2
|
import type { TAxis } from '../../types/Commons/axis.type';
|
|
3
3
|
/*********************************************************
|
|
4
4
|
* useDragResizer
|
|
@@ -15,5 +15,18 @@ import type { TAxis } from '../../types/Commons/axis.type';
|
|
|
15
15
|
* commente en mort dans le code et un `// TODO - Rework for both axis`
|
|
16
16
|
* l'annonce explicitement. Passer `AXIS.Y` fait juste tomber dans la
|
|
17
17
|
* branche verticale de `getPosition` sans etre teste par ce composable.
|
|
18
|
+
*
|
|
19
|
+
* @description
|
|
20
|
+
* ⛔ #1152 — `el`, `min` et `max` acceptent un `Ref` (ou un getter pour
|
|
21
|
+
* les bornes) pour que le composable s'appelle UNE fois, dans `setup()`.
|
|
22
|
+
* Son seul consommateur, `OrigamTextareaField`, l'appelait depuis un
|
|
23
|
+
* `watch` sur `[poignee, minHeight, maxHeight]` parce que la poignee
|
|
24
|
+
* n'existe qu'apres le montage et que les bornes bougent. Deux defauts en
|
|
25
|
+
* decoulaient : `onUnmounted` hors instance (Vue avertissait, le nettoyage
|
|
26
|
+
* des listeners `window` n'etait JAMAIS enregistre), et un `mousedown`
|
|
27
|
+
* SUPPLEMENTAIRE a chaque changement de borne, chacun avec ses bornes
|
|
28
|
+
* figees. `useEventListener` suit deja une cible `Ref`, et les bornes sont
|
|
29
|
+
* lues a chaque geste : rien n'oblige plus a rappeler le composable. Le
|
|
30
|
+
* nettoyage passe par `tryOnScopeDispose`, comme `useEventListener`.
|
|
18
31
|
********************************************************/
|
|
19
|
-
export declare function useDragResizer(el: HTMLElement | undefined
|
|
32
|
+
export declare function useDragResizer(el: MaybeRef<HTMLElement | undefined>, value: Ref<number>, min: MaybeRefOrGetter<number>, max: MaybeRefOrGetter<number>, axis: TAxis): void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { computed,
|
|
1
|
+
import { computed, ref, toValue } from "vue";
|
|
2
2
|
import { useEventListener } from "./eventListener.composable.js";
|
|
3
3
|
import { AXIS, CLIENT_POSITION } from "../../enums/index.js";
|
|
4
|
-
import { addWindowListener, clamp, getPosition } from "../../utils/Commons/commons.util.js";
|
|
4
|
+
import { addWindowListener, clamp, getPosition, tryOnScopeDispose } from "../../utils/Commons/commons.util.js";
|
|
5
5
|
export function useDragResizer(el, value, min, max, axis) {
|
|
6
6
|
const resizing = ref(false);
|
|
7
7
|
const removeListeners = [];
|
|
8
8
|
const onUnmountedCleanupFns = [];
|
|
9
|
-
|
|
9
|
+
tryOnScopeDispose(() => {
|
|
10
10
|
onUnmountedCleanupFns.forEach((fn) => fn());
|
|
11
11
|
});
|
|
12
12
|
const isHorizontal = computed(() => {
|
|
@@ -25,7 +25,7 @@ export function useDragResizer(el, value, min, max, axis) {
|
|
|
25
25
|
const onMouseMove = (e2) => {
|
|
26
26
|
const clickOffset = getPosition(e2, isHorizontal.value ? CLIENT_POSITION.X : CLIENT_POSITION.Y);
|
|
27
27
|
const delta = clickOffset - start;
|
|
28
|
-
value.value = clamp(initialStart + delta, min, max);
|
|
28
|
+
value.value = clamp(initialStart + delta, toValue(min), toValue(max));
|
|
29
29
|
};
|
|
30
30
|
const onMouseUp = onDragEnd;
|
|
31
31
|
removeListeners.push(...[
|
|
@@ -42,7 +42,7 @@ export function useDragResizer(el, value, min, max, axis) {
|
|
|
42
42
|
const onTouchMove = (e2) => {
|
|
43
43
|
const clickOffset = getPosition(e2, isHorizontal.value ? CLIENT_POSITION.X : CLIENT_POSITION.Y);
|
|
44
44
|
const delta = clickOffset - start;
|
|
45
|
-
value.value =
|
|
45
|
+
value.value = clamp(initialStart + delta, toValue(min), toValue(max));
|
|
46
46
|
};
|
|
47
47
|
const onTouchEnd = onDragEnd;
|
|
48
48
|
removeListeners.push(...[
|
|
@@ -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 || {});
|
|
@@ -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 || {});
|
|
@@ -5,7 +5,7 @@ import type { ICommonsComponentProps, ITagProps } from '../Commons/commons.inter
|
|
|
5
5
|
import type { IDensityProps } from '../Commons/density.interface';
|
|
6
6
|
import type { IDimensionProps } from '../Commons/dimension.interface';
|
|
7
7
|
import type { IElevationProps } from '../Commons/elevation.interface';
|
|
8
|
-
import type { IHoverProps } from '../Commons/hover.interface';
|
|
8
|
+
import type { IHoverEmits, IHoverProps } from '../Commons/hover.interface';
|
|
9
9
|
import type { IMarginProps } from '../Commons/margin.interface';
|
|
10
10
|
import type { IPaddingProps } from '../Commons/padding.interface';
|
|
11
11
|
import type { IRoundedProps } from '../Commons/rounded.interface';
|
|
@@ -75,7 +75,7 @@ export interface IBracketCompetitorProps extends ICommonsComponentProps, ITagPro
|
|
|
75
75
|
}
|
|
76
76
|
/** Emits fired by `<OrigamBracketCompetitor>` — click (mouse) / activation
|
|
77
77
|
* (Enter / Space when `interactive`) on the row. */
|
|
78
|
-
export interface IBracketCompetitorEmits extends IActiveEmits {
|
|
78
|
+
export interface IBracketCompetitorEmits extends IActiveEmits, IHoverEmits {
|
|
79
79
|
(e: 'click', event: MouseEvent | KeyboardEvent): void;
|
|
80
80
|
}
|
|
81
81
|
/*********************************************************
|
|
@@ -5,7 +5,7 @@ import type { ICommonsComponentProps, ITagProps } from '../Commons/commons.inter
|
|
|
5
5
|
import type { IDensityProps } from '../Commons/density.interface';
|
|
6
6
|
import type { IDimensionProps } from '../Commons/dimension.interface';
|
|
7
7
|
import type { IElevationProps } from '../Commons/elevation.interface';
|
|
8
|
-
import type { IHoverProps } from '../Commons/hover.interface';
|
|
8
|
+
import type { IHoverEmits, IHoverProps } from '../Commons/hover.interface';
|
|
9
9
|
import type { IMarginProps } from '../Commons/margin.interface';
|
|
10
10
|
import type { IPaddingProps } from '../Commons/padding.interface';
|
|
11
11
|
import type { IRoundedProps } from '../Commons/rounded.interface';
|
|
@@ -64,7 +64,7 @@ export interface IBracketMatchProps extends ICommonsComponentProps, ITagProps, I
|
|
|
64
64
|
/** Emits fired by `<OrigamBracketMatch>` — click on the card itself
|
|
65
65
|
* (outside a competitor row), and the two per-competitor channels the
|
|
66
66
|
* card re-emits on behalf of its `competitor` slot / default rows. */
|
|
67
|
-
export interface IBracketMatchEmits extends IActiveEmits {
|
|
67
|
+
export interface IBracketMatchEmits extends IActiveEmits, IHoverEmits {
|
|
68
68
|
(e: 'click', match: IBracketMatch, event: MouseEvent): void;
|
|
69
69
|
(e: 'competitor-click', competitor: IBracketCompetitor, match: IBracketMatch, side: 'A' | 'B', event: MouseEvent | KeyboardEvent): void;
|
|
70
70
|
(e: 'winner-click', competitor: IBracketCompetitor, match: IBracketMatch, event: MouseEvent | KeyboardEvent): void;
|
|
@@ -4,7 +4,7 @@ import type { IBorderProps } from '../Commons/border.interface';
|
|
|
4
4
|
import type { IBgColorProps, IColorProps } from '../Commons/color.interface';
|
|
5
5
|
import type { ICommonsComponentProps, ITagProps } from '../Commons/commons.interface';
|
|
6
6
|
import type { IDensityProps } from '../Commons/density.interface';
|
|
7
|
-
import type { IHoverProps } from '../Commons/hover.interface';
|
|
7
|
+
import type { IHoverEmits, IHoverProps } from '../Commons/hover.interface';
|
|
8
8
|
import type { ILinkProps } from '../Commons/router.interface';
|
|
9
9
|
import type { IMarginProps } from '../Commons/margin.interface';
|
|
10
10
|
import type { IPaddingProps } from '../Commons/padding.interface';
|
|
@@ -13,8 +13,14 @@ export interface IBreadcrumbItemProps extends ICommonsComponentProps, ITagProps,
|
|
|
13
13
|
title: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
}
|
|
16
|
-
/** Emits fired by `<OrigamBreadcrumbItem>` — clicks on prepend/append icons
|
|
17
|
-
|
|
16
|
+
/** Emits fired by `<OrigamBreadcrumbItem>` — clicks on prepend/append icons,
|
|
17
|
+
* plus `update:hover`.
|
|
18
|
+
*
|
|
19
|
+
* ⛔ #1152 — `update:hover` partait sans etre declare : `useStateFlag(props,
|
|
20
|
+
* {state: 'hover'})` ecrit dans le v-model `hover` depuis `set()` /
|
|
21
|
+
* `unset()`, cables sur `@mouseenter` / `@mouseleave`. Prouve dans
|
|
22
|
+
* `packages/tests/TU/origam/relay-emits-declaration.spec.ts`. */
|
|
23
|
+
export interface IBreadcrumbItemEmits extends IAdjacentEmits, IHoverEmits {
|
|
18
24
|
}
|
|
19
25
|
/** Slot signatures for `<OrigamBreadcrumbItem>`. */
|
|
20
26
|
export interface IBreadcrumbItemSlots extends IAdjacentSlots {
|
|
@@ -7,7 +7,7 @@ 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
9
|
import type { IGroupEmits, IGroupItemProps } from '../Commons/group.interface';
|
|
10
|
-
import type { IHoverProps } from '../Commons/hover.interface';
|
|
10
|
+
import type { IHoverEmits, IHoverProps } from '../Commons/hover.interface';
|
|
11
11
|
import type { ILinkProps } from '../Commons/router.interface';
|
|
12
12
|
import type { IControlLoaderProps } from '../Commons/loader.interface';
|
|
13
13
|
import type { ILocationProps } from '../Commons/location.interface';
|
|
@@ -56,8 +56,15 @@ export interface IBtnProps extends ICommonsComponentProps, IColorProps, IBgColor
|
|
|
56
56
|
*
|
|
57
57
|
* Two actions are two buttons: compose them with `<origam-btn-group>`. The
|
|
58
58
|
* `prepend` / `append` SLOTS are unaffected — see {@link IBtnSlots}.
|
|
59
|
+
*
|
|
60
|
+
* ⛔ #1152 — `update:hover` used to leave UNDECLARED: `useStateFlag(props,
|
|
61
|
+
* {state: 'hover'})` writes through the `hover` v-model from `set()` /
|
|
62
|
+
* `unset()`, wired on `@mouseenter` / `@mouseleave`. Vue warned on EVERY
|
|
63
|
+
* hover of every button ("neither declared in the emits option"), and the
|
|
64
|
+
* `onUpdate:hover` handler stayed in `$attrs`. Pinned by
|
|
65
|
+
* `packages/tests/TU/origam/relay-emits-declaration.spec.ts`.
|
|
59
66
|
*/
|
|
60
|
-
export interface IBtnEmits extends IGroupEmits {
|
|
67
|
+
export interface IBtnEmits extends IGroupEmits, IHoverEmits {
|
|
61
68
|
}
|
|
62
69
|
/** Slot signatures for `<OrigamBtn>`. */
|
|
63
70
|
export interface IBtnSlots extends IAdjacentSlots {
|
|
@@ -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 type { IActiveEmits } from '../Commons/active.interface';
|
|
2
|
+
import type { IHoverEmits } from '../Commons/hover.interface';
|
|
2
3
|
import type { TSheetSnapId } from '../../types/Sheet/sheet.type';
|
|
3
4
|
/**
|
|
4
5
|
* Emit signature for `<OrigamSheet>`.
|
|
@@ -21,8 +22,12 @@ import type { TSheetSnapId } from '../../types/Sheet/sheet.type';
|
|
|
21
22
|
* lie que `@click`, et son `tag` par défaut est `div` — donc aucun
|
|
22
23
|
* élément natif ne convertit une touche en clic. Le chemin clavier
|
|
23
24
|
* n'existe pas.
|
|
25
|
+
* - `update:hover` (⛔ #1152) vient de `useStateFlag(props, { state: 'hover' })` :
|
|
26
|
+
* `set()` / `unset()` cables sur `@mouseenter` / `@mouseleave`. Partait
|
|
27
|
+
* sans etre declare. Prouve dans
|
|
28
|
+
* `packages/tests/TU/origam/relay-emits-declaration.spec.ts`.
|
|
24
29
|
*/
|
|
25
|
-
export interface ISheetEmits extends IActiveEmits {
|
|
30
|
+
export interface ISheetEmits extends IActiveEmits, IHoverEmits {
|
|
26
31
|
(e: 'update:snap', id: TSheetSnapId): void;
|
|
27
32
|
(e: 'update:open', value: boolean): void;
|
|
28
33
|
}
|
|
@@ -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>;
|