@youcan/celeste 0.6.46 → 0.6.48
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/celeste.css +44 -47
- package/dist/cjs/checkbox-card.js +1 -1
- package/dist/cjs/popover-content.js +6 -2
- package/dist/components/popover/popover-content.d.ts +3 -0
- package/dist/es/checkbox-card.js +1 -1
- package/dist/es/popover-content.js +6 -2
- package/package.json +3 -3
- package/src/components/checkbox/checkbox-card.vue +2 -8
- package/src/components/popover/popover-content.vue +6 -1
- package/src/components/popover/stories/popover.stories.ts +16 -1
package/dist/celeste.css
CHANGED
|
@@ -1903,10 +1903,10 @@ to {
|
|
|
1903
1903
|
.celeste-cbutton-white[data-v-c062bacd] {
|
|
1904
1904
|
background-color: var(--color-bg-white-0);
|
|
1905
1905
|
box-shadow: var(--shadow-regular-xs);
|
|
1906
|
-
}[data-v-
|
|
1906
|
+
}[data-v-25983c0a] {
|
|
1907
1907
|
box-sizing: border-box;
|
|
1908
1908
|
}
|
|
1909
|
-
.celeste-checkbox-card[data-v-
|
|
1909
|
+
.celeste-checkbox-card[data-v-25983c0a] {
|
|
1910
1910
|
display: flex;
|
|
1911
1911
|
align-items: flex-start;
|
|
1912
1912
|
padding: var(--spacing-16);
|
|
@@ -1919,21 +1919,21 @@ to {
|
|
|
1919
1919
|
font: var(--paragraph-sm);
|
|
1920
1920
|
gap: var(--spacing-14);
|
|
1921
1921
|
}
|
|
1922
|
-
.celeste-checkbox-card[data-v-
|
|
1922
|
+
.celeste-checkbox-card[data-v-25983c0a]:not(.celeste-checkbox-card-disabled) {
|
|
1923
1923
|
cursor: pointer;
|
|
1924
1924
|
}
|
|
1925
|
-
.celeste-checkbox-card[data-v-
|
|
1925
|
+
.celeste-checkbox-card[data-v-25983c0a]:has([data-state=checked]):not(.celeste-checkbox-card-disabled) {
|
|
1926
1926
|
border-color: var(--color-primary-base);
|
|
1927
1927
|
box-shadow: none;
|
|
1928
1928
|
}
|
|
1929
|
-
.celeste-checkbox-card[data-v-
|
|
1929
|
+
.celeste-checkbox-card[data-v-25983c0a]:hover:not(.celeste-checkbox-card-disabled), .celeste-checkbox-card[data-v-25983c0a]:focus-visible:not(.celeste-checkbox-card-disabled) {
|
|
1930
1930
|
background-color: var(--color-bg-weak-50);
|
|
1931
1931
|
box-shadow: none;
|
|
1932
1932
|
}
|
|
1933
|
-
.celeste-checkbox-card[data-v-
|
|
1933
|
+
.celeste-checkbox-card[data-v-25983c0a]:hover:not(.celeste-checkbox-card-disabled):not(:has([data-state=checked])), .celeste-checkbox-card[data-v-25983c0a]:focus-visible:not(.celeste-checkbox-card-disabled):not(:has([data-state=checked])) {
|
|
1934
1934
|
border-color: transparent;
|
|
1935
1935
|
}
|
|
1936
|
-
.celeste-checkbox-card-preview[data-v-
|
|
1936
|
+
.celeste-checkbox-card-preview[data-v-25983c0a] {
|
|
1937
1937
|
display: flex;
|
|
1938
1938
|
position: relative;
|
|
1939
1939
|
flex-shrink: 0;
|
|
@@ -1947,12 +1947,15 @@ to {
|
|
|
1947
1947
|
background-color: var(--color-bg-white-0);
|
|
1948
1948
|
box-shadow: var(--shadow-regular-xs);
|
|
1949
1949
|
}
|
|
1950
|
-
.celeste-checkbox-card-preview-icon i[data-v-
|
|
1950
|
+
.celeste-checkbox-card-preview-icon i[data-v-25983c0a] {
|
|
1951
1951
|
width: 20px;
|
|
1952
1952
|
height: 20px;
|
|
1953
1953
|
color: var(--color-icon-sub-600);
|
|
1954
1954
|
}
|
|
1955
|
-
.celeste-checkbox-card-preview-image
|
|
1955
|
+
.celeste-checkbox-card-preview-image[data-v-25983c0a] {
|
|
1956
|
+
border: none;
|
|
1957
|
+
}
|
|
1958
|
+
.celeste-checkbox-card-preview-image i[data-v-25983c0a] {
|
|
1956
1959
|
position: absolute;
|
|
1957
1960
|
z-index: 0;
|
|
1958
1961
|
top: 50%;
|
|
@@ -1962,27 +1965,21 @@ to {
|
|
|
1962
1965
|
transform: translate(-50%, -50%);
|
|
1963
1966
|
color: var(--color-icon-sub-600);
|
|
1964
1967
|
}
|
|
1965
|
-
.celeste-checkbox-card-preview-image[data-v-
|
|
1968
|
+
.celeste-checkbox-card-preview-image[data-v-25983c0a] img {
|
|
1966
1969
|
z-index: 1000;
|
|
1967
1970
|
}
|
|
1968
|
-
.celeste-checkbox-card-
|
|
1969
|
-
border: none;
|
|
1970
|
-
}
|
|
1971
|
-
.celeste-checkbox-card-preview-image :has(img) i[data-v-1dfcdddc] {
|
|
1972
|
-
display: none;
|
|
1973
|
-
}
|
|
1974
|
-
.celeste-checkbox-card-content[data-v-1dfcdddc] {
|
|
1971
|
+
.celeste-checkbox-card-content[data-v-25983c0a] {
|
|
1975
1972
|
display: flex;
|
|
1976
1973
|
flex-direction: column;
|
|
1977
1974
|
gap: var(--spacing-4);
|
|
1978
1975
|
}
|
|
1979
|
-
.celeste-checkbox-card-row[data-v-
|
|
1976
|
+
.celeste-checkbox-card-row[data-v-25983c0a] {
|
|
1980
1977
|
display: flex;
|
|
1981
1978
|
flex-shrink: 1;
|
|
1982
1979
|
align-items: center;
|
|
1983
1980
|
gap: var(--spacing-8);
|
|
1984
1981
|
}
|
|
1985
|
-
.celeste-checkbox-card-label[data-v-
|
|
1982
|
+
.celeste-checkbox-card-label[data-v-25983c0a] {
|
|
1986
1983
|
flex-shrink: 1;
|
|
1987
1984
|
min-width: 0;
|
|
1988
1985
|
overflow: hidden;
|
|
@@ -1991,7 +1988,7 @@ to {
|
|
|
1991
1988
|
text-overflow: ellipsis;
|
|
1992
1989
|
white-space: nowrap;
|
|
1993
1990
|
}
|
|
1994
|
-
.celeste-checkbox-card-sublabel[data-v-
|
|
1991
|
+
.celeste-checkbox-card-sublabel[data-v-25983c0a] {
|
|
1995
1992
|
flex-shrink: 1;
|
|
1996
1993
|
min-width: 0;
|
|
1997
1994
|
overflow: hidden;
|
|
@@ -2000,20 +1997,20 @@ to {
|
|
|
2000
1997
|
text-overflow: ellipsis;
|
|
2001
1998
|
white-space: nowrap;
|
|
2002
1999
|
}
|
|
2003
|
-
.celeste-checkbox-card-description[data-v-
|
|
2000
|
+
.celeste-checkbox-card-description[data-v-25983c0a] {
|
|
2004
2001
|
color: var(--color-text-sub-600);
|
|
2005
2002
|
font: var(--paragraph-xs);
|
|
2006
2003
|
}
|
|
2007
|
-
.celeste-checkbox-card-disabled[data-v-
|
|
2004
|
+
.celeste-checkbox-card-disabled[data-v-25983c0a] {
|
|
2008
2005
|
cursor: not-allowed;
|
|
2009
2006
|
}
|
|
2010
|
-
.celeste-checkbox-card-disabled .celeste-checkbox-card-label[data-v-
|
|
2007
|
+
.celeste-checkbox-card-disabled .celeste-checkbox-card-label[data-v-25983c0a] {
|
|
2011
2008
|
color: var(--color-text-sub-600);
|
|
2012
2009
|
}
|
|
2013
|
-
.celeste-checkbox-card-disabled .celeste-checkbox-card-sublabel[data-v-
|
|
2010
|
+
.celeste-checkbox-card-disabled .celeste-checkbox-card-sublabel[data-v-25983c0a] {
|
|
2014
2011
|
color: var(--color-text-soft-400);
|
|
2015
2012
|
}
|
|
2016
|
-
.celeste-checkbox-card-disabled .celeste-checkbox-card-description[data-v-
|
|
2013
|
+
.celeste-checkbox-card-disabled .celeste-checkbox-card-description[data-v-25983c0a] {
|
|
2017
2014
|
color: var(--color-text-soft-400);
|
|
2018
2015
|
}.celeste-checkbox-label[data-v-ad0a5759] {
|
|
2019
2016
|
display: flex;
|
|
@@ -3778,7 +3775,7 @@ to {
|
|
|
3778
3775
|
.celeste-modal-header:has(.description)[data-type=error] .icon[data-v-a655071e] {
|
|
3779
3776
|
background: var(--color-state-error-lighter);
|
|
3780
3777
|
color: var(--color-state-error-base);
|
|
3781
|
-
}[data-v-
|
|
3778
|
+
}[data-v-700edccc] .celeste-popover-content-wrapper {
|
|
3782
3779
|
z-index: 50;
|
|
3783
3780
|
min-width: 200px;
|
|
3784
3781
|
max-width: 400px;
|
|
@@ -3791,20 +3788,20 @@ to {
|
|
|
3791
3788
|
box-shadow: var(--shadow-regular-md);
|
|
3792
3789
|
scale: 0.95;
|
|
3793
3790
|
}
|
|
3794
|
-
[data-v-
|
|
3795
|
-
animation-name: open-
|
|
3791
|
+
[data-v-700edccc] .celeste-popover-content-wrapper[data-state=open] {
|
|
3792
|
+
animation-name: open-700edccc;
|
|
3796
3793
|
}
|
|
3797
|
-
[data-v-
|
|
3798
|
-
animation-name: close-
|
|
3794
|
+
[data-v-700edccc] .celeste-popover-content-wrapper[data-state=closed] {
|
|
3795
|
+
animation-name: close-700edccc;
|
|
3799
3796
|
}
|
|
3800
|
-
[data-v-
|
|
3797
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-arrow {
|
|
3801
3798
|
display: block;
|
|
3802
3799
|
position: relative;
|
|
3803
3800
|
width: 16px;
|
|
3804
3801
|
height: 8px;
|
|
3805
3802
|
overflow: hidden;
|
|
3806
3803
|
}
|
|
3807
|
-
[data-v-
|
|
3804
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-arrow::after {
|
|
3808
3805
|
content: "";
|
|
3809
3806
|
display: block;
|
|
3810
3807
|
position: absolute;
|
|
@@ -3818,75 +3815,75 @@ to {
|
|
|
3818
3815
|
background-color: var(--color-bg-white-0);
|
|
3819
3816
|
rotate: 45deg;
|
|
3820
3817
|
}
|
|
3821
|
-
[data-v-
|
|
3818
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-close-button {
|
|
3822
3819
|
position: absolute;
|
|
3823
3820
|
inset-inline-end: var(--spacing-16);
|
|
3824
3821
|
inset-block-start: var(--spacing-16);
|
|
3825
3822
|
}
|
|
3826
|
-
[data-v-
|
|
3823
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content {
|
|
3827
3824
|
display: flex;
|
|
3828
3825
|
flex-direction: column;
|
|
3829
3826
|
gap: var(--spacing-8);
|
|
3830
3827
|
}
|
|
3831
|
-
[data-v-
|
|
3828
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-title,[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-description {
|
|
3832
3829
|
margin: var(--spacing-0);
|
|
3833
3830
|
}
|
|
3834
|
-
[data-v-
|
|
3831
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-title {
|
|
3835
3832
|
color: var(--color-text-strong-950);
|
|
3836
3833
|
font: var(--label-md);
|
|
3837
3834
|
}
|
|
3838
|
-
[data-v-
|
|
3835
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-description {
|
|
3839
3836
|
color: var(--color-text-sub-600);
|
|
3840
3837
|
font: var(--paragraph-sm);
|
|
3841
3838
|
}
|
|
3842
|
-
[data-v-
|
|
3839
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon {
|
|
3843
3840
|
box-sizing: border-box;
|
|
3844
3841
|
margin-block-end: var(--spacing-16);
|
|
3845
3842
|
border: 1px solid var(--color-stroke-soft-200);
|
|
3846
3843
|
border-radius: 50%;
|
|
3847
3844
|
color: var(--color-icon-sub-600);
|
|
3848
3845
|
}
|
|
3849
|
-
[data-v-
|
|
3846
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon[data-icon-size=sm] {
|
|
3850
3847
|
width: 32px;
|
|
3851
3848
|
height: 32px;
|
|
3852
3849
|
padding: var(--spacing-6);
|
|
3853
3850
|
}
|
|
3854
|
-
[data-v-
|
|
3851
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon[data-icon-size=md] {
|
|
3855
3852
|
width: 40px;
|
|
3856
3853
|
height: 40px;
|
|
3857
3854
|
padding: var(--spacing-6);
|
|
3858
3855
|
}
|
|
3859
|
-
[data-v-
|
|
3856
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon[data-icon-size=lg] {
|
|
3860
3857
|
width: 48px;
|
|
3861
3858
|
height: 48px;
|
|
3862
3859
|
padding: var(--spacing-12);
|
|
3863
3860
|
}
|
|
3864
|
-
[data-v-
|
|
3861
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon[data-icon-size=xl] {
|
|
3865
3862
|
width: 56px;
|
|
3866
3863
|
height: 56px;
|
|
3867
3864
|
padding: var(--spacing-14);
|
|
3868
3865
|
}
|
|
3869
|
-
[data-v-
|
|
3866
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon[data-icon-size=xxl] {
|
|
3870
3867
|
width: 64px;
|
|
3871
3868
|
height: 64px;
|
|
3872
3869
|
padding: var(--spacing-16);
|
|
3873
3870
|
}
|
|
3874
|
-
[data-v-
|
|
3871
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-content .celeste-popover-icon i {
|
|
3875
3872
|
width: 100%;
|
|
3876
3873
|
height: 100%;
|
|
3877
3874
|
}
|
|
3878
|
-
[data-v-
|
|
3875
|
+
[data-v-700edccc] .celeste-popover-content-wrapper .celeste-popover-footer {
|
|
3879
3876
|
display: flex;
|
|
3880
3877
|
padding: var(--spacing-16);
|
|
3881
3878
|
border-block-start: 1px solid var(--color-stroke-soft-200);
|
|
3882
3879
|
}
|
|
3883
|
-
@keyframes open-
|
|
3880
|
+
@keyframes open-700edccc {
|
|
3884
3881
|
to {
|
|
3885
3882
|
opacity: 1;
|
|
3886
3883
|
scale: 1;
|
|
3887
3884
|
}
|
|
3888
3885
|
}
|
|
3889
|
-
@keyframes close-
|
|
3886
|
+
@keyframes close-700edccc {
|
|
3890
3887
|
from {
|
|
3891
3888
|
opacity: 1;
|
|
3892
3889
|
scale: 1;
|
|
@@ -106,5 +106,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
});
|
|
109
|
-
const checkboxCard = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
109
|
+
const checkboxCard = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-25983c0a"]]);
|
|
110
110
|
module.exports = checkboxCard;
|
|
@@ -20,6 +20,9 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
20
20
|
props: {
|
|
21
21
|
class: {},
|
|
22
22
|
side: { default: "bottom" },
|
|
23
|
+
sideOffset: {},
|
|
24
|
+
align: {},
|
|
25
|
+
alignOffset: {},
|
|
23
26
|
title: {},
|
|
24
27
|
description: {},
|
|
25
28
|
showTail: { type: Boolean, default: true },
|
|
@@ -32,12 +35,13 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
32
35
|
const props = __props;
|
|
33
36
|
const emits = __emit;
|
|
34
37
|
const delegatedProps = useDelegatedProps.useDelegatedProps(props, ["class", "title"]);
|
|
38
|
+
const sideOffset = props.showTail ? 0 : props.sideOffset ?? 8;
|
|
35
39
|
const forwarded = index.xe(delegatedProps, emits);
|
|
36
40
|
return (_ctx, _cache) => {
|
|
37
41
|
return Mo.openBlock(), Mo.createBlock(Mo.unref(index.bs), null, {
|
|
38
42
|
default: Mo.withCtx(() => [
|
|
39
43
|
Mo.createVNode(Mo.unref(index.ws), Mo.mergeProps({ ...Mo.unref(forwarded), ..._ctx.$attrs }, {
|
|
40
|
-
"side-offset":
|
|
44
|
+
"side-offset": Mo.unref(sideOffset),
|
|
41
45
|
class: Mo.unref(clsx.clsx)(
|
|
42
46
|
"celeste-popover-content-wrapper",
|
|
43
47
|
props.class
|
|
@@ -100,5 +104,5 @@ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
|
|
|
100
104
|
};
|
|
101
105
|
}
|
|
102
106
|
});
|
|
103
|
-
const PopoverContent = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
107
|
+
const PopoverContent = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-700edccc"]]);
|
|
104
108
|
module.exports = PopoverContent;
|
|
@@ -3,6 +3,9 @@ import { PopoverContentProps as RadixPopoverContentProps } from 'radix-vue';
|
|
|
3
3
|
export interface PopoverContentProps {
|
|
4
4
|
class?: HTMLAttributes['class'];
|
|
5
5
|
side?: RadixPopoverContentProps['side'];
|
|
6
|
+
sideOffset?: RadixPopoverContentProps['sideOffset'];
|
|
7
|
+
align?: RadixPopoverContentProps['align'];
|
|
8
|
+
alignOffset?: RadixPopoverContentProps['alignOffset'];
|
|
6
9
|
title?: string;
|
|
7
10
|
description?: string;
|
|
8
11
|
showTail?: boolean;
|
package/dist/es/checkbox-card.js
CHANGED
|
@@ -105,7 +105,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
-
const checkboxCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
108
|
+
const checkboxCard = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-25983c0a"]]);
|
|
109
109
|
export {
|
|
110
110
|
checkboxCard as default
|
|
111
111
|
};
|
|
@@ -19,6 +19,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
19
|
props: {
|
|
20
20
|
class: {},
|
|
21
21
|
side: { default: "bottom" },
|
|
22
|
+
sideOffset: {},
|
|
23
|
+
align: {},
|
|
24
|
+
alignOffset: {},
|
|
22
25
|
title: {},
|
|
23
26
|
description: {},
|
|
24
27
|
showTail: { type: Boolean, default: true },
|
|
@@ -31,12 +34,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
31
34
|
const props = __props;
|
|
32
35
|
const emits = __emit;
|
|
33
36
|
const delegatedProps = useDelegatedProps(props, ["class", "title"]);
|
|
37
|
+
const sideOffset = props.showTail ? 0 : props.sideOffset ?? 8;
|
|
34
38
|
const forwarded = xe(delegatedProps, emits);
|
|
35
39
|
return (_ctx, _cache) => {
|
|
36
40
|
return openBlock(), createBlock(unref(bs), null, {
|
|
37
41
|
default: withCtx(() => [
|
|
38
42
|
createVNode(unref(ws), mergeProps({ ...unref(forwarded), ..._ctx.$attrs }, {
|
|
39
|
-
"side-offset":
|
|
43
|
+
"side-offset": unref(sideOffset),
|
|
40
44
|
class: unref(clsx)(
|
|
41
45
|
"celeste-popover-content-wrapper",
|
|
42
46
|
props.class
|
|
@@ -99,7 +103,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
99
103
|
};
|
|
100
104
|
}
|
|
101
105
|
});
|
|
102
|
-
const PopoverContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
106
|
+
const PopoverContent = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-700edccc"]]);
|
|
103
107
|
export {
|
|
104
108
|
PopoverContent as default
|
|
105
109
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@youcan/celeste",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.48",
|
|
5
5
|
"author": "YouCan <tech@youcan.shop>",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"youcan",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"radix-vue": "^1.9.12",
|
|
45
45
|
"tinycolor2": "^1.6.0",
|
|
46
46
|
"vue-sonner": "^2.0.2",
|
|
47
|
-
"@youcan/celeste-
|
|
48
|
-
"@youcan/celeste-
|
|
47
|
+
"@youcan/celeste-tokens": "0.6.48",
|
|
48
|
+
"@youcan/celeste-icons": "0.6.48"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@chromatic-com/storybook": "^4.0.0",
|
|
@@ -148,6 +148,8 @@ const delegatedProps = useDelegatedProps(props, 'class');
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
.celeste-checkbox-card-preview-image {
|
|
151
|
+
border: none;
|
|
152
|
+
|
|
151
153
|
i {
|
|
152
154
|
position: absolute;
|
|
153
155
|
z-index: 0;
|
|
@@ -162,14 +164,6 @@ const delegatedProps = useDelegatedProps(props, 'class');
|
|
|
162
164
|
:deep(img) {
|
|
163
165
|
z-index: 1000;
|
|
164
166
|
}
|
|
165
|
-
|
|
166
|
-
:has(img) {
|
|
167
|
-
border: none;
|
|
168
|
-
|
|
169
|
-
i {
|
|
170
|
-
display: none;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
167
|
}
|
|
174
168
|
|
|
175
169
|
.celeste-checkbox-card-content {
|
|
@@ -30,6 +30,8 @@ const emits = defineEmits<PopoverContentEmits>();
|
|
|
30
30
|
|
|
31
31
|
const delegatedProps = useDelegatedProps(props, ['class', 'title']);
|
|
32
32
|
|
|
33
|
+
const sideOffset = props.showTail ? 0 : props.sideOffset ?? 8;
|
|
34
|
+
|
|
33
35
|
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
34
36
|
</script>
|
|
35
37
|
|
|
@@ -37,6 +39,9 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
|
37
39
|
export interface PopoverContentProps {
|
|
38
40
|
class?: HTMLAttributes['class'];
|
|
39
41
|
side?: RadixPopoverContentProps['side'];
|
|
42
|
+
sideOffset?: RadixPopoverContentProps['sideOffset'];
|
|
43
|
+
align?: RadixPopoverContentProps['align'];
|
|
44
|
+
alignOffset?: RadixPopoverContentProps['alignOffset'];
|
|
40
45
|
title?: string;
|
|
41
46
|
description?: string;
|
|
42
47
|
showTail?: boolean;
|
|
@@ -50,7 +55,7 @@ export interface PopoverContentProps {
|
|
|
50
55
|
<PopoverPortal>
|
|
51
56
|
<PopoverContent
|
|
52
57
|
v-bind="{ ...forwarded, ...$attrs }"
|
|
53
|
-
:side-offset="
|
|
58
|
+
:side-offset="sideOffset"
|
|
54
59
|
:class="
|
|
55
60
|
clsx(
|
|
56
61
|
'celeste-popover-content-wrapper',
|
|
@@ -16,6 +16,19 @@ const meta: Meta<typeof PopoverContent> = {
|
|
|
16
16
|
options: ['top', 'right', 'bottom', 'left'],
|
|
17
17
|
description: 'The preferred side of the trigger to render against when open.',
|
|
18
18
|
},
|
|
19
|
+
sideOffset: {
|
|
20
|
+
control: { type: 'number' },
|
|
21
|
+
description: 'The distance in pixels from the trigger.',
|
|
22
|
+
},
|
|
23
|
+
align: {
|
|
24
|
+
control: { type: 'select' },
|
|
25
|
+
options: ['start', 'center', 'end'],
|
|
26
|
+
description: 'The preferred alignment against the trigger. May change when collisions occur.',
|
|
27
|
+
},
|
|
28
|
+
alignOffset: {
|
|
29
|
+
control: { type: 'number' },
|
|
30
|
+
description: 'An offset in pixels from the start or end alignment options.',
|
|
31
|
+
},
|
|
19
32
|
title: {
|
|
20
33
|
control: { type: 'text' },
|
|
21
34
|
description: 'The title text for the popover',
|
|
@@ -46,6 +59,8 @@ const meta: Meta<typeof PopoverContent> = {
|
|
|
46
59
|
side: 'bottom',
|
|
47
60
|
title: 'Popover Title',
|
|
48
61
|
description: 'This is the popover description text.',
|
|
62
|
+
align: 'center',
|
|
63
|
+
alignOffset: 0,
|
|
49
64
|
showTail: true,
|
|
50
65
|
dismissible: true,
|
|
51
66
|
iconSize: 'lg',
|
|
@@ -279,7 +294,7 @@ export const Positioning: Story = {
|
|
|
279
294
|
return { args };
|
|
280
295
|
},
|
|
281
296
|
template: `
|
|
282
|
-
<div style="display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); grid-column-gap: 0px; grid-gap: var(--spacing-8)">
|
|
297
|
+
<div style="display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center; grid-column-gap: 0px; grid-gap: var(--spacing-8)">
|
|
283
298
|
<div />
|
|
284
299
|
<Popover v-bind="args" style="grid-column-start: 2;">
|
|
285
300
|
<PopoverTrigger>
|