@threadlabs/looma 0.23.21 → 0.23.23
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/components/shared/overlay.js +1 -1
- package/components/ui-button/ui-button.html +68 -2
- package/components/ui-image/ui-image.html +177 -0
- package/components/ui-image/ui-image.js +107 -0
- package/components/ui-menu/ui-menu.js +1 -1
- package/components/ui-popover/ui-popover.js +4 -1
- package/components/ui-separator/ui-separator.html +26 -2
- package/dist/index.js +24 -23
- package/editor/chunks/extensions.js +633 -20
- package/editor/extensions/block-selection.d.ts +6 -0
- package/editor/extensions/expand.d.ts +31 -0
- package/editor/extensions/image.d.ts +12 -0
- package/editor/extensions/index.d.ts +4 -1
- package/editor/extensions/index.js +2 -2
- package/editor/extensions/preset.d.ts +8 -0
- package/editor/extensions/slash-command.d.ts +31 -3
- package/editor/extensions/table-of-contents.d.ts +58 -0
- package/editor/index.js +2 -2
- package/package.json +1 -1
- package/styles/ui-button.css +39 -0
- package/styles/ui-image.css +153 -0
- package/styles/ui-separator.css +22 -2
- package/vanilla/UiButton.d.ts +1 -1
- package/vanilla/UiButton.js +126 -10
- package/vanilla/UiImage.d.ts +21 -0
- package/vanilla/UiImage.js +84 -0
- package/vanilla/UiSeparator.d.ts +3 -0
- package/vanilla/UiSeparator.js +14 -4
- package/vanilla/index.js +1 -0
- package/vue/UiButton.d.ts +18 -6
- package/vue/UiButton.vue +269 -8
- package/vue/UiImage.d.ts +100 -0
- package/vue/UiImage.js +2 -0
- package/vue/UiImage.vue +463 -0
- package/vue/UiListItem.d.ts +1 -1
- package/vue/UiSection.d.ts +1 -1
- package/vue/UiSeparator.d.ts +27 -0
- package/vue/UiSeparator.vue +94 -3
- package/vue/UiSidebar.d.ts +1 -1
- package/vue/chunks/UiButton.js +196 -12
- package/vue/chunks/UiImage.js +313 -0
- package/vue/chunks/UiSeparator.js +106 -22
- package/vue/components.css +252 -53
- package/vue/editor/LoomaEditor.d.ts +19 -2
- package/vue/editor/divider.d.ts +6 -0
- package/vue/editor/expand.d.ts +7 -0
- package/vue/editor/image-controls.d.ts +19 -0
- package/vue/editor/image-delivery.d.ts +2 -2
- package/vue/editor/image.d.ts +7 -0
- package/vue/editor/index.d.ts +1 -1
- package/vue/editor/index.js +1188 -52
- package/vue/editor/table-of-contents.d.ts +7 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -1
package/vue/UiButton.vue
CHANGED
|
@@ -4,6 +4,7 @@ import { computed, getCurrentInstance, useTemplateRef, watchSyncEffect } from 'v
|
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
5
|
import { createDispatch, preserveRootFocus, useComponentHost } from './host'
|
|
6
6
|
import { checkedProp, propValidityState, vPropValidity } from './props'
|
|
7
|
+
import UiIcon from './UiIcon.vue'
|
|
7
8
|
import UiSpinner from './UiSpinner.vue'
|
|
8
9
|
|
|
9
10
|
defineOptions({ inheritAttrs: false })
|
|
@@ -119,8 +120,8 @@ const propValidityContract = {
|
|
|
119
120
|
required: false,
|
|
120
121
|
target: { attribute: 'variant' },
|
|
121
122
|
description:
|
|
122
|
-
'Emphasis: how loudly the button asks. solid fills with its tone, outline draws its tone at the edge over a wash of it, ghost carries only text until it is\n hovered, and link is an inline text action that reads as a link. danger is solid in the danger tone, kept for the call sites that name it.',
|
|
123
|
-
values: ['outline', 'solid', 'danger', 'ghost', 'link'],
|
|
123
|
+
'Emphasis: how loudly the button asks. solid fills with its tone, outline draws its tone at the edge over a wash of it, ghost carries only text until it is\n hovered, and link is an inline text action that reads as a link. danger is solid in the danger tone, kept for the call sites that name it. card uses the\n same tone on a full-width action with an icon slot, wrapping content, and a centered action slot.',
|
|
124
|
+
values: ['outline', 'solid', 'danger', 'ghost', 'link', 'card'],
|
|
124
125
|
default: 'outline',
|
|
125
126
|
},
|
|
126
127
|
},
|
|
@@ -148,7 +149,9 @@ const props = defineProps({
|
|
|
148
149
|
default: 'button',
|
|
149
150
|
},
|
|
150
151
|
variant: {
|
|
151
|
-
type: null as unknown as PropType<
|
|
152
|
+
type: null as unknown as PropType<
|
|
153
|
+
'outline' | 'solid' | 'danger' | 'ghost' | 'link' | 'card' | null
|
|
154
|
+
>,
|
|
152
155
|
default: 'outline',
|
|
153
156
|
},
|
|
154
157
|
})
|
|
@@ -260,13 +263,13 @@ const checkedProps = computed(() => ({
|
|
|
260
263
|
'type',
|
|
261
264
|
acceptedProps,
|
|
262
265
|
) as 'button' | 'submit' | 'reset',
|
|
263
|
-
variant: checkedProp<'outline' | 'solid' | 'danger' | 'ghost' | 'link'>(
|
|
266
|
+
variant: checkedProp<'outline' | 'solid' | 'danger' | 'ghost' | 'link' | 'card'>(
|
|
264
267
|
props['variant'],
|
|
265
268
|
{ kind: 'terminal', name: 'keyword' },
|
|
266
269
|
false,
|
|
267
270
|
'variant',
|
|
268
271
|
acceptedProps,
|
|
269
|
-
) as 'outline' | 'solid' | 'danger' | 'ghost' | 'link',
|
|
272
|
+
) as 'outline' | 'solid' | 'danger' | 'ghost' | 'link' | 'card',
|
|
270
273
|
}))
|
|
271
274
|
void checkedProps.value
|
|
272
275
|
watchSyncEffect(() => {
|
|
@@ -448,11 +451,155 @@ const guardedBinding3 = computed(() => {
|
|
|
448
451
|
concat(checkedProps.value.loading || checkedProps.value.pending),
|
|
449
452
|
))
|
|
450
453
|
})
|
|
454
|
+
let guardedBinding4Previous: any = null
|
|
455
|
+
const guardedBinding4 = computed(() => {
|
|
456
|
+
const candidate: any = ((objectValue: any, indexValue: any) =>
|
|
457
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
458
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
459
|
+
? Symbol.for('html-next.invalid-result')
|
|
460
|
+
: objectValue[indexValue])(
|
|
461
|
+
{ true: null, false: checkedProps.value.href },
|
|
462
|
+
concat(
|
|
463
|
+
checkedProps.value.disabled || checkedProps.value.loading || checkedProps.value.pending,
|
|
464
|
+
),
|
|
465
|
+
)
|
|
466
|
+
if (candidate === Symbol.for('html-next.invalid-result')) {
|
|
467
|
+
return guardedBinding4Previous
|
|
468
|
+
}
|
|
469
|
+
return guardedBinding4Previous = attribute(((objectValue: any, indexValue: any) =>
|
|
470
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
471
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
472
|
+
? Symbol.for('html-next.invalid-result')
|
|
473
|
+
: objectValue[indexValue])(
|
|
474
|
+
{ true: null, false: checkedProps.value.href },
|
|
475
|
+
concat(
|
|
476
|
+
checkedProps.value.disabled || checkedProps.value.loading || checkedProps.value.pending,
|
|
477
|
+
),
|
|
478
|
+
))
|
|
479
|
+
})
|
|
480
|
+
let guardedBinding5Previous: any = null
|
|
481
|
+
const guardedBinding5 = computed(() => {
|
|
482
|
+
const candidate: any = ((objectValue: any, indexValue: any) =>
|
|
483
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
484
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
485
|
+
? Symbol.for('html-next.invalid-result')
|
|
486
|
+
: objectValue[indexValue])(
|
|
487
|
+
{ true: 'true', false: null },
|
|
488
|
+
concat(
|
|
489
|
+
checkedProps.value.disabled || checkedProps.value.loading || checkedProps.value.pending,
|
|
490
|
+
),
|
|
491
|
+
)
|
|
492
|
+
if (candidate === Symbol.for('html-next.invalid-result')) {
|
|
493
|
+
return guardedBinding5Previous
|
|
494
|
+
}
|
|
495
|
+
return guardedBinding5Previous = typeof (((objectValue: any, indexValue: any) =>
|
|
496
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
497
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
498
|
+
? Symbol.for('html-next.invalid-result')
|
|
499
|
+
: objectValue[indexValue])(
|
|
500
|
+
{ true: 'true', false: null },
|
|
501
|
+
concat(
|
|
502
|
+
checkedProps.value.disabled || checkedProps.value.loading || checkedProps.value.pending,
|
|
503
|
+
),
|
|
504
|
+
)) === 'boolean'
|
|
505
|
+
? String(((objectValue: any, indexValue: any) =>
|
|
506
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
507
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
508
|
+
? Symbol.for('html-next.invalid-result')
|
|
509
|
+
: objectValue[indexValue])(
|
|
510
|
+
{ true: 'true', false: null },
|
|
511
|
+
concat(
|
|
512
|
+
checkedProps.value.disabled || checkedProps.value.loading || checkedProps.value.pending,
|
|
513
|
+
),
|
|
514
|
+
))
|
|
515
|
+
: attribute(((objectValue: any, indexValue: any) =>
|
|
516
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
517
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
518
|
+
? Symbol.for('html-next.invalid-result')
|
|
519
|
+
: objectValue[indexValue])(
|
|
520
|
+
{ true: 'true', false: null },
|
|
521
|
+
concat(
|
|
522
|
+
checkedProps.value.disabled || checkedProps.value.loading || checkedProps.value.pending,
|
|
523
|
+
),
|
|
524
|
+
))
|
|
525
|
+
})
|
|
526
|
+
let guardedBinding6Previous: any = null
|
|
527
|
+
const guardedBinding6 = computed(() => {
|
|
528
|
+
const candidate: any = ((objectValue: any, indexValue: any) =>
|
|
529
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
530
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
531
|
+
? Symbol.for('html-next.invalid-result')
|
|
532
|
+
: objectValue[indexValue])(
|
|
533
|
+
{ true: '0', false: null },
|
|
534
|
+
concat(
|
|
535
|
+
(checkedProps.value.loading || checkedProps.value.pending) && !checkedProps.value.disabled,
|
|
536
|
+
),
|
|
537
|
+
)
|
|
538
|
+
if (candidate === Symbol.for('html-next.invalid-result')) {
|
|
539
|
+
return guardedBinding6Previous
|
|
540
|
+
}
|
|
541
|
+
return guardedBinding6Previous = attribute(
|
|
542
|
+
((objectValue: any, indexValue: any) =>
|
|
543
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
544
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
545
|
+
? Symbol.for('html-next.invalid-result')
|
|
546
|
+
: objectValue[indexValue])(
|
|
547
|
+
{ true: '0', false: null },
|
|
548
|
+
concat(
|
|
549
|
+
(checkedProps.value.loading || checkedProps.value.pending)
|
|
550
|
+
&& !checkedProps.value.disabled,
|
|
551
|
+
),
|
|
552
|
+
),
|
|
553
|
+
)
|
|
554
|
+
})
|
|
555
|
+
let guardedBinding7Previous: any = null
|
|
556
|
+
const guardedBinding7 = computed(() => {
|
|
557
|
+
const candidate: any = ((objectValue: any, indexValue: any) =>
|
|
558
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
559
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
560
|
+
? Symbol.for('html-next.invalid-result')
|
|
561
|
+
: objectValue[indexValue])(
|
|
562
|
+
{ true: 'true', false: null },
|
|
563
|
+
concat(checkedProps.value.loading || checkedProps.value.pending),
|
|
564
|
+
)
|
|
565
|
+
if (candidate === Symbol.for('html-next.invalid-result')) {
|
|
566
|
+
return guardedBinding7Previous
|
|
567
|
+
}
|
|
568
|
+
return guardedBinding7Previous = typeof (((objectValue: any, indexValue: any) =>
|
|
569
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
570
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
571
|
+
? Symbol.for('html-next.invalid-result')
|
|
572
|
+
: objectValue[indexValue])(
|
|
573
|
+
{ true: 'true', false: null },
|
|
574
|
+
concat(checkedProps.value.loading || checkedProps.value.pending),
|
|
575
|
+
)) === 'boolean'
|
|
576
|
+
? String(((objectValue: any, indexValue: any) =>
|
|
577
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
578
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
579
|
+
? Symbol.for('html-next.invalid-result')
|
|
580
|
+
: objectValue[indexValue])(
|
|
581
|
+
{ true: 'true', false: null },
|
|
582
|
+
concat(checkedProps.value.loading || checkedProps.value.pending),
|
|
583
|
+
))
|
|
584
|
+
: attribute(((objectValue: any, indexValue: any) =>
|
|
585
|
+
objectValue === Symbol.for('html-next.invalid-result')
|
|
586
|
+
|| indexValue === Symbol.for('html-next.invalid-result')
|
|
587
|
+
? Symbol.for('html-next.invalid-result')
|
|
588
|
+
: objectValue[indexValue])(
|
|
589
|
+
{ true: 'true', false: null },
|
|
590
|
+
concat(checkedProps.value.loading || checkedProps.value.pending),
|
|
591
|
+
))
|
|
592
|
+
})
|
|
451
593
|
const hydrationNode = hydrationInstance?.vnode.el
|
|
452
594
|
if (
|
|
453
595
|
typeof window !== 'undefined' && hydrationNode != null
|
|
454
596
|
&& (!(hydrationNode instanceof Element)
|
|
455
|
-
|| hydrationNode.localName
|
|
597
|
+
|| hydrationNode.localName
|
|
598
|
+
!== ((checkedProps.value.variant === 'card' && checkedProps.value.as === 'a')
|
|
599
|
+
? 'a'
|
|
600
|
+
: ((checkedProps.value.variant === 'card')
|
|
601
|
+
? 'button'
|
|
602
|
+
: ((checkedProps.value.as === 'a') ? 'a' : ('button')))))
|
|
456
603
|
) {
|
|
457
604
|
throw Object.assign(new Error('HR005: Server markup for <ui-button> has an incompatible root.'), {
|
|
458
605
|
name: 'HtmlDiagnosticError',
|
|
@@ -554,7 +701,7 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
|
|
|
554
701
|
|
|
555
702
|
<template>
|
|
556
703
|
<a
|
|
557
|
-
v-if="checkedProps.as === 'a'"
|
|
704
|
+
v-if="checkedProps.variant === 'card' && checkedProps.as === 'a'"
|
|
558
705
|
data-component="ui-button"
|
|
559
706
|
v-bind="nativeAttrs($attrs)"
|
|
560
707
|
:href="guarded"
|
|
@@ -580,6 +727,84 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
|
|
|
580
727
|
:data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
|
|
581
728
|
:data-ui-button-state="hostState || undefined"
|
|
582
729
|
ref="@html-next/root"
|
|
730
|
+
><span class="card-icon"><UiSpinner
|
|
731
|
+
v-if="checkedProps.loading || checkedProps.pending"
|
|
732
|
+
size="sm"
|
|
733
|
+
/>
|
|
734
|
+
<template v-if="!(checkedProps.loading || checkedProps.pending)"><slot
|
|
735
|
+
name="icon"
|
|
736
|
+
/></template></span>
|
|
737
|
+
<span class="card-content"><slot /></span>
|
|
738
|
+
<span class="card-action"><slot name="action"><UiIcon
|
|
739
|
+
name="chevron-right"
|
|
740
|
+
aria-hidden="true"
|
|
741
|
+
/></slot></span></a>
|
|
742
|
+
<button
|
|
743
|
+
v-else-if="checkedProps.variant === 'card'"
|
|
744
|
+
data-component="ui-button"
|
|
745
|
+
v-bind="nativeAttrs($attrs)"
|
|
746
|
+
:type="checkedProps.type ?? undefined"
|
|
747
|
+
:disabled="checkedProps.disabled ?? undefined"
|
|
748
|
+
:aria-disabled="guardedBinding3"
|
|
749
|
+
:aria-busy="checkedProps.loading || checkedProps.pending"
|
|
750
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
751
|
+
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
752
|
+
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
753
|
+
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
754
|
+
:data-href="reflectedProp('href', 'href', checkedProps.href, undefined, false)"
|
|
755
|
+
:data-loading="reflectedProp('loading', 'loading', checkedProps.loading, undefined, false)"
|
|
756
|
+
:data-pending="reflectedProp('pending', 'pending', checkedProps.pending, undefined, false)"
|
|
757
|
+
:data-rel="reflectedProp('rel', 'rel', checkedProps.rel, undefined, false)"
|
|
758
|
+
:data-shape="reflectedProp('shape', 'shape', checkedProps.shape, undefined, false)"
|
|
759
|
+
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
760
|
+
:data-stretch="reflectedProp('stretch', 'stretch', checkedProps.stretch, undefined, false)"
|
|
761
|
+
:data-target="reflectedProp('target', 'target', checkedProps.target, undefined, false)"
|
|
762
|
+
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
763
|
+
:data-type="reflectedProp('type', 'type', checkedProps.type, undefined, false)"
|
|
764
|
+
:data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
|
|
765
|
+
:data-ui-button-state="hostState || undefined"
|
|
766
|
+
ref="@html-next/root"
|
|
767
|
+
>
|
|
768
|
+
<span class="card-icon"><UiSpinner
|
|
769
|
+
v-if="checkedProps.loading || checkedProps.pending"
|
|
770
|
+
size="sm"
|
|
771
|
+
/>
|
|
772
|
+
<template v-if="!(checkedProps.loading || checkedProps.pending)"><slot
|
|
773
|
+
name="icon"
|
|
774
|
+
/></template></span>
|
|
775
|
+
<span class="card-content"><slot /></span>
|
|
776
|
+
<span class="card-action"><slot name="action"><UiIcon
|
|
777
|
+
name="chevron-right"
|
|
778
|
+
aria-hidden="true"
|
|
779
|
+
/></slot></span>
|
|
780
|
+
</button>
|
|
781
|
+
<a
|
|
782
|
+
v-else-if="checkedProps.as === 'a'"
|
|
783
|
+
data-component="ui-button"
|
|
784
|
+
v-bind="nativeAttrs($attrs)"
|
|
785
|
+
:href="guardedBinding4"
|
|
786
|
+
:target="checkedProps.target ?? undefined"
|
|
787
|
+
:rel="checkedProps.rel ?? undefined"
|
|
788
|
+
:aria-disabled="guardedBinding5"
|
|
789
|
+
:aria-busy="checkedProps.loading || checkedProps.pending"
|
|
790
|
+
:tabindex="guardedBinding6"
|
|
791
|
+
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
792
|
+
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
793
|
+
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
794
|
+
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
795
|
+
:data-href="reflectedProp('href', 'href', checkedProps.href, undefined, false)"
|
|
796
|
+
:data-loading="reflectedProp('loading', 'loading', checkedProps.loading, undefined, false)"
|
|
797
|
+
:data-pending="reflectedProp('pending', 'pending', checkedProps.pending, undefined, false)"
|
|
798
|
+
:data-rel="reflectedProp('rel', 'rel', checkedProps.rel, undefined, false)"
|
|
799
|
+
:data-shape="reflectedProp('shape', 'shape', checkedProps.shape, undefined, false)"
|
|
800
|
+
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
801
|
+
:data-stretch="reflectedProp('stretch', 'stretch', checkedProps.stretch, undefined, false)"
|
|
802
|
+
:data-target="reflectedProp('target', 'target', checkedProps.target, undefined, false)"
|
|
803
|
+
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
804
|
+
:data-type="reflectedProp('type', 'type', checkedProps.type, undefined, false)"
|
|
805
|
+
:data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
|
|
806
|
+
:data-ui-button-state="hostState || undefined"
|
|
807
|
+
ref="@html-next/root"
|
|
583
808
|
><span v-if="checkedProps.loading || checkedProps.pending" class="spinner-wrap"><UiSpinner
|
|
584
809
|
size="sm"
|
|
585
810
|
/></span>
|
|
@@ -590,7 +815,7 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
|
|
|
590
815
|
v-bind="nativeAttrs($attrs)"
|
|
591
816
|
:type="checkedProps.type ?? undefined"
|
|
592
817
|
:disabled="checkedProps.disabled ?? undefined"
|
|
593
|
-
:aria-disabled="
|
|
818
|
+
:aria-disabled="guardedBinding7"
|
|
594
819
|
:aria-busy="checkedProps.loading || checkedProps.pending"
|
|
595
820
|
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
596
821
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
@@ -790,6 +1015,42 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
|
|
|
790
1015
|
font-size: var(--ui-font-size-md);
|
|
791
1016
|
}
|
|
792
1017
|
|
|
1018
|
+
/* Card actions inherit Button's palette and behavior; only their shared layout changes.
|
|
1019
|
+
The icon may contain any decorative composition. Empty icons remove their column. */
|
|
1020
|
+
[data-component~="ui-button"][data-ui-button-state~="variant=card"] {
|
|
1021
|
+
display: grid;
|
|
1022
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
1023
|
+
align-items: start;
|
|
1024
|
+
gap: var(--ui-space-3);
|
|
1025
|
+
inline-size: 100%;
|
|
1026
|
+
min-block-size: max(var(--ui-control-min-block-size), var(--ui-control-size-md));
|
|
1027
|
+
text-align: start;
|
|
1028
|
+
white-space: normal;
|
|
1029
|
+
box-shadow: none;
|
|
1030
|
+
background-image: none;
|
|
1031
|
+
}
|
|
1032
|
+
[data-component~="ui-button"][data-ui-button-state~="variant=card"][data-ui-button-state~="size=lg"] {
|
|
1033
|
+
min-block-size: max(var(--ui-control-min-block-size), var(--ui-control-size-lg));
|
|
1034
|
+
}
|
|
1035
|
+
[data-component~="ui-button"][data-ui-button-state~="variant=card"]:has(.card-icon:empty) {
|
|
1036
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
1037
|
+
}
|
|
1038
|
+
.card-icon {
|
|
1039
|
+
display: flex;
|
|
1040
|
+
align-items: flex-start;
|
|
1041
|
+
}
|
|
1042
|
+
.card-icon:empty {
|
|
1043
|
+
display: none;
|
|
1044
|
+
}
|
|
1045
|
+
.card-content {
|
|
1046
|
+
min-inline-size: 0;
|
|
1047
|
+
}
|
|
1048
|
+
.card-action {
|
|
1049
|
+
display: flex;
|
|
1050
|
+
align-items: center;
|
|
1051
|
+
align-self: center;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
793
1054
|
/* A link is never :enabled, so interactive states test "not unavailable" instead: for a button that
|
|
794
1055
|
is exactly :enabled, at the same specificity, and it also matches a link that can be followed. */
|
|
795
1056
|
[data-component~="ui-button"]:hover:not(:disabled, [aria-disabled="true"]) {
|
package/vue/UiImage.d.ts
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
3
|
+
type __VLS_Slots = {} & {
|
|
4
|
+
media?: (props: typeof __VLS_1) => any;
|
|
5
|
+
} & {
|
|
6
|
+
controls?: (props: typeof __VLS_3) => any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
9
|
+
alt: {
|
|
10
|
+
type: PropType<string | null>;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
height: {
|
|
14
|
+
type: PropType<number | null>;
|
|
15
|
+
default: null;
|
|
16
|
+
};
|
|
17
|
+
placement: {
|
|
18
|
+
type: PropType<"block" | "center" | "wrap-left" | "wrap-right" | null>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
resizable: {
|
|
22
|
+
type: PropType<boolean | null>;
|
|
23
|
+
default: boolean;
|
|
24
|
+
};
|
|
25
|
+
selected: {
|
|
26
|
+
type: PropType<boolean | null>;
|
|
27
|
+
default: boolean;
|
|
28
|
+
};
|
|
29
|
+
src: {
|
|
30
|
+
type: PropType<string | null>;
|
|
31
|
+
default: string;
|
|
32
|
+
};
|
|
33
|
+
width: {
|
|
34
|
+
type: PropType<number | null>;
|
|
35
|
+
default: null;
|
|
36
|
+
};
|
|
37
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
resize: (event: CustomEvent<{
|
|
39
|
+
readonly width: number;
|
|
40
|
+
readonly height: number;
|
|
41
|
+
readonly phase: "preview" | "commit" | "cancel";
|
|
42
|
+
readonly trigger: "pointer" | "keyboard";
|
|
43
|
+
}>) => any;
|
|
44
|
+
"update:height": (value: number) => any;
|
|
45
|
+
"update:width": (value: number) => any;
|
|
46
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
alt: {
|
|
48
|
+
type: PropType<string | null>;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
height: {
|
|
52
|
+
type: PropType<number | null>;
|
|
53
|
+
default: null;
|
|
54
|
+
};
|
|
55
|
+
placement: {
|
|
56
|
+
type: PropType<"block" | "center" | "wrap-left" | "wrap-right" | null>;
|
|
57
|
+
default: string;
|
|
58
|
+
};
|
|
59
|
+
resizable: {
|
|
60
|
+
type: PropType<boolean | null>;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
selected: {
|
|
64
|
+
type: PropType<boolean | null>;
|
|
65
|
+
default: boolean;
|
|
66
|
+
};
|
|
67
|
+
src: {
|
|
68
|
+
type: PropType<string | null>;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
width: {
|
|
72
|
+
type: PropType<number | null>;
|
|
73
|
+
default: null;
|
|
74
|
+
};
|
|
75
|
+
}>> & Readonly<{
|
|
76
|
+
onResize?: ((event: CustomEvent<{
|
|
77
|
+
readonly width: number;
|
|
78
|
+
readonly height: number;
|
|
79
|
+
readonly phase: "preview" | "commit" | "cancel";
|
|
80
|
+
readonly trigger: "pointer" | "keyboard";
|
|
81
|
+
}>) => any) | undefined;
|
|
82
|
+
"onUpdate:height"?: ((value: number) => any) | undefined;
|
|
83
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
84
|
+
}>, {
|
|
85
|
+
alt: string | null;
|
|
86
|
+
selected: boolean | null;
|
|
87
|
+
width: number | null;
|
|
88
|
+
height: number | null;
|
|
89
|
+
src: string | null;
|
|
90
|
+
placement: "center" | "block" | "wrap-left" | "wrap-right" | null;
|
|
91
|
+
resizable: boolean | null;
|
|
92
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
94
|
+
declare const _default: typeof __VLS_export;
|
|
95
|
+
export default _default;
|
|
96
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
97
|
+
new (): {
|
|
98
|
+
$slots: S;
|
|
99
|
+
};
|
|
100
|
+
};
|
package/vue/UiImage.js
ADDED