@davincihealthcare/elty-design-system-vue 1.76.0 → 1.77.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.
- package/dist/ElIcon.vue.d.ts +3 -0
- package/dist/ElInlineBanner.vue.d.ts +4 -0
- package/dist/ElItem.vue.d.ts +1 -1
- package/dist/ElModal.vue.d.ts +8 -0
- package/dist/forms/ElInputCheckbox.vue.d.ts +1 -1
- package/dist/forms/ElInputRadioButton.vue.d.ts +1 -1
- package/dist/forms/ElInputSearch.vue.d.ts +9 -1
- package/dist/src/ElCarousel.vue.cjs2.js +1 -1
- package/dist/src/ElCarousel.vue.cjs2.js.map +1 -1
- package/dist/src/ElCarousel.vue.esm2.js +1 -1
- package/dist/src/ElCarousel.vue.esm2.js.map +1 -1
- package/dist/src/ElIcon.vue.cjs2.js +1 -1
- package/dist/src/ElIcon.vue.cjs2.js.map +1 -1
- package/dist/src/ElIcon.vue.esm2.js +1 -1
- package/dist/src/ElIcon.vue.esm2.js.map +1 -1
- package/dist/src/style.cjs +1 -1
- package/dist/src/style.css +1 -1
- package/dist/table/ElServerSideResponsiveTable.vue.d.ts +13 -1
- package/package.json +1 -1
package/dist/ElIcon.vue.d.ts
CHANGED
|
@@ -4,16 +4,19 @@ type ElIconColors = (typeof elIconColors)[number];
|
|
|
4
4
|
export type IconNames = keyof typeof outlineIcons | ElIconColors;
|
|
5
5
|
export type ElIconProps = {
|
|
6
6
|
name: IconNames;
|
|
7
|
+
color?: ElIconColors;
|
|
7
8
|
solid?: boolean;
|
|
8
9
|
cursorPointer?: boolean;
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
};
|
|
11
12
|
declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
12
13
|
name: IconNames;
|
|
14
|
+
color?: ElIconColors;
|
|
13
15
|
solid?: boolean;
|
|
14
16
|
disabled?: boolean;
|
|
15
17
|
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
16
18
|
name: IconNames;
|
|
19
|
+
color?: ElIconColors;
|
|
17
20
|
solid?: boolean;
|
|
18
21
|
disabled?: boolean;
|
|
19
22
|
}>>>, {}, {}>;
|
|
@@ -31,6 +31,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
31
31
|
title: string;
|
|
32
32
|
icon: Omit<{
|
|
33
33
|
readonly name: import('./ElIcon.vue').IconNames;
|
|
34
|
+
readonly color?: ("pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo") | undefined;
|
|
34
35
|
readonly solid?: boolean | undefined;
|
|
35
36
|
readonly disabled?: boolean | undefined;
|
|
36
37
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -38,6 +39,9 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
38
39
|
type: import('vue').PropType<import('./ElIcon.vue').IconNames>;
|
|
39
40
|
required: true;
|
|
40
41
|
};
|
|
42
|
+
color: {
|
|
43
|
+
type: import('vue').PropType<"pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo">;
|
|
44
|
+
};
|
|
41
45
|
solid: {
|
|
42
46
|
type: import('vue').PropType<boolean>;
|
|
43
47
|
};
|
package/dist/ElItem.vue.d.ts
CHANGED
|
@@ -40,8 +40,8 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
|
|
|
40
40
|
}>>>, {
|
|
41
41
|
text: string;
|
|
42
42
|
avatar: AvatarParameters;
|
|
43
|
-
disabled: boolean;
|
|
44
43
|
color: "primary" | "secondary";
|
|
44
|
+
disabled: boolean;
|
|
45
45
|
leadingIcon: ElIconProps;
|
|
46
46
|
focused: boolean;
|
|
47
47
|
semiboldText: string;
|
package/dist/ElModal.vue.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
47
47
|
headerIcon: {
|
|
48
48
|
type: import('vue').PropType<Partial<{}> & Omit<{
|
|
49
49
|
readonly name: import('./ElIcon.vue').IconNames;
|
|
50
|
+
readonly color?: ("pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo") | undefined;
|
|
50
51
|
readonly solid?: boolean | undefined;
|
|
51
52
|
readonly disabled?: boolean | undefined;
|
|
52
53
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -54,6 +55,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
54
55
|
type: import('vue').PropType<import('./ElIcon.vue').IconNames>;
|
|
55
56
|
required: true;
|
|
56
57
|
};
|
|
58
|
+
color: {
|
|
59
|
+
type: import('vue').PropType<"pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo">;
|
|
60
|
+
};
|
|
57
61
|
solid: {
|
|
58
62
|
type: import('vue').PropType<boolean>;
|
|
59
63
|
};
|
|
@@ -327,6 +331,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
327
331
|
headerIcon: {
|
|
328
332
|
type: import('vue').PropType<Partial<{}> & Omit<{
|
|
329
333
|
readonly name: import('./ElIcon.vue').IconNames;
|
|
334
|
+
readonly color?: ("pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo") | undefined;
|
|
330
335
|
readonly solid?: boolean | undefined;
|
|
331
336
|
readonly disabled?: boolean | undefined;
|
|
332
337
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -334,6 +339,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
334
339
|
type: import('vue').PropType<import('./ElIcon.vue').IconNames>;
|
|
335
340
|
required: true;
|
|
336
341
|
};
|
|
342
|
+
color: {
|
|
343
|
+
type: import('vue').PropType<"pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo">;
|
|
344
|
+
};
|
|
337
345
|
solid: {
|
|
338
346
|
type: import('vue').PropType<boolean>;
|
|
339
347
|
};
|
|
@@ -164,10 +164,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
164
164
|
name: string;
|
|
165
165
|
size: "xxs" | "xs";
|
|
166
166
|
label: string;
|
|
167
|
+
color: "pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo" | "primary" | "secondary" | "gray";
|
|
167
168
|
disabled: boolean;
|
|
168
169
|
id: string;
|
|
169
170
|
placeholder: string;
|
|
170
|
-
color: "pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo" | "primary" | "secondary" | "gray";
|
|
171
171
|
step: number;
|
|
172
172
|
modelValue: boolean | "indeterminate";
|
|
173
173
|
errorMessage: string | boolean;
|
|
@@ -97,9 +97,9 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
97
97
|
}, {
|
|
98
98
|
size: "xxs" | "xs";
|
|
99
99
|
label: string;
|
|
100
|
+
color: "primary" | "secondary" | "inactive";
|
|
100
101
|
disabled: boolean;
|
|
101
102
|
id: string;
|
|
102
|
-
color: "primary" | "secondary" | "inactive";
|
|
103
103
|
validation: import('./validation-rules').InputValidation;
|
|
104
104
|
}, {}>;
|
|
105
105
|
export default _default;
|
|
@@ -191,10 +191,10 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
191
191
|
button: InstanceType<typeof ElButton>["$props"];
|
|
192
192
|
};
|
|
193
193
|
text: string;
|
|
194
|
+
color: "primary" | "secondary";
|
|
194
195
|
disabled: boolean;
|
|
195
196
|
id: string;
|
|
196
197
|
placeholder: string;
|
|
197
|
-
color: "primary" | "secondary";
|
|
198
198
|
results: (Partial<{}> & Omit<{
|
|
199
199
|
readonly primaryRow: string;
|
|
200
200
|
readonly time?: string | undefined;
|
|
@@ -202,6 +202,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
202
202
|
readonly color?: import('../ElVerticalTab.vue').ElVerticalTabColors | undefined;
|
|
203
203
|
readonly icon?: Omit<{
|
|
204
204
|
readonly name: import('../ElIcon.vue').IconNames;
|
|
205
|
+
readonly color?: ("pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo") | undefined;
|
|
205
206
|
readonly solid?: boolean | undefined;
|
|
206
207
|
readonly disabled?: boolean | undefined;
|
|
207
208
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -209,6 +210,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
209
210
|
type: PropType<import('../ElIcon.vue').IconNames>;
|
|
210
211
|
required: true;
|
|
211
212
|
};
|
|
213
|
+
color: {
|
|
214
|
+
type: PropType<"pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo">;
|
|
215
|
+
};
|
|
212
216
|
solid: {
|
|
213
217
|
type: PropType<boolean>;
|
|
214
218
|
};
|
|
@@ -236,6 +240,7 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
236
240
|
icon: {
|
|
237
241
|
type: PropType<Partial<{}> & Omit<{
|
|
238
242
|
readonly name: import('../ElIcon.vue').IconNames;
|
|
243
|
+
readonly color?: ("pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo") | undefined;
|
|
239
244
|
readonly solid?: boolean | undefined;
|
|
240
245
|
readonly disabled?: boolean | undefined;
|
|
241
246
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -243,6 +248,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
|
|
|
243
248
|
type: PropType<import('../ElIcon.vue').IconNames>;
|
|
244
249
|
required: true;
|
|
245
250
|
};
|
|
251
|
+
color: {
|
|
252
|
+
type: PropType<"pink" | "yellow" | "orange" | "cyan" | "rose" | "green" | "brand-blue" | "brand-green" | "red" | "purple" | "indigo">;
|
|
253
|
+
};
|
|
246
254
|
solid: {
|
|
247
255
|
type: PropType<boolean>;
|
|
248
256
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../node_modules/swiper/modules/keyboard.cjs.js"),f=require("../node_modules/swiper/modules/navigation.cjs.js"),p=require("../node_modules/swiper/modules/pagination.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=require("../node_modules/swiper/modules/keyboard.cjs.js"),f=require("../node_modules/swiper/modules/navigation.cjs.js"),p=require("../node_modules/swiper/modules/pagination.cjs.js"),n=require("../node_modules/swiper/swiper-vue.cjs.js");;/* empty css */require("./polyfills.cjs.js");require("vee-validate");require("../node_modules/codice-fiscale-js/dist/codice.fiscale.commonjs2.cjs.js");require("../node_modules/lodash/lodash.cjs.js");require("./tailwind.plugin.cjs.js");require("../node_modules/@davincihealthcare/elty-design-system-foundations/dist/index.cjs.js");const g=require("./ElButton.vue.cjs2.js");require("./forms/ElInputText.vue.cjs2.js");const o=require("./utils.cjs.js"),u=require("./ElIconButton.vue.cjs2.js");require("./forms/ElInputCheckbox.vue.cjs2.js");require("./forms/ElInputDate.vue.cjs2.js");require("./forms/ElInputFile.vue.cjs2.js");require("./forms/ElInputMeasureUnit.vue.cjs2.js");require("./forms/ElInputNumber.vue.cjs2.js");require("./forms/ElInputPhone.vue.cjs2.js");require("./forms/ElInputSelect.vue.cjs2.js");require("./forms/ElInputTextarea.vue.cjs2.js");require("./ElToast.vue.cjs2.js");require("./forms/ElInputRadioButton.vue.cjs2.js");;/* empty css */;/* empty css */require("./forms/ElInputSearch.vue.cjs2.js");const v={key:0,class:"bg-black opacity-30 left-0 absolute w-full h-full top-0 rounded-2xl"},w={class:"font-semibold text-neutral-inverse text-xl md:text-2xl lg:text-4xl"},q={class:"py-2 md:py-3 lg:py-4"},b={key:0,class:"px-6 w-full mb-20 hidden md:absolute md:mt-0 lg:top-60 md:bottom-0 lg:flex justify-between"},x={class:"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden"},y={class:"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden"},z=["sm","md","lg"],h=e.defineComponent({__name:"ElCarousel",props:{size:{},slides:{},opacity:{type:Boolean}},setup(k){const a=o.useMatchDevice(),d=e.computed(()=>{switch(a.value){case o.Device.Desktop:return"xl";case o.Device.Tablet:return"l";default:return"sm"}}),i=e.ref(),c=e.ref([f.default,p.default,m.default]);return(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["w-full relative",{"max-w-2xl":t.size==="md","max-w-7xl":t.size==="lg"}])},[e.createVNode(e.unref(n.Swiper),{"space-between":30,"slides-per-view":1,keyboard:{enabled:!0},pagination:{clickable:!0},loop:!0,navigation:!0,modules:c.value,class:"",onSwiper:s[0]||(s[0]=r=>i.value=r)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.slides,(r,l)=>(e.openBlock(),e.createBlock(e.unref(n.SwiperSlide),{key:l},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["flex items-center isolate overflow-hidden w-full bg-left bg-cover bg-no-repeat bg-black rounded-2xl p-6 md:p-7 lg:p-24",{"justify-end items-end h-auto":t.size==="sm","h-96":t.size==="md","h-auto":t.size==="lg"}]),style:e.normalizeStyle({backgroundImage:"url("+r.picture+")"})},[t.opacity?(e.openBlock(),e.createElementBlock("div",v)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["z-10 flex flex-col justify-end md:justify-center gap-3 lg:gap-4 items-start flex-1 self-stretch md:my-8 text-white text-sm md:text-base lg:text-xl",{"w-full":t.size==="sm","max-w-80":t.size==="md","max-w-96":t.size==="lg"}])},[e.createElementVNode("h1",w,e.toDisplayString(r.title),1),e.createElementVNode("p",{class:e.normalizeClass(["text-neutral-inverse font-medium text-sm md:text-base md:max-w-80 lg:text-xl lg:max-w-96",{"w-full":t.size==="sm","w-80 max-w-80":t.size==="md","w-96 max-w-96":t.size==="lg"}])},e.toDisplayString(r.description),3),e.createElementVNode("div",q,[e.createVNode(e.unref(g.default),e.mergeProps({ref_for:!0},r.button,{size:d.value}),null,16,["size"])])],2)],6)]),_:2},1024))),128))]),_:1},8,["modules"]),t.slides.length>1?(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",x,[e.createVNode(e.unref(u.default),{icon:{name:"ArrowSmallLeftIcon"},onClick:s[1]||(s[1]=r=>{var l;return(l=i.value)==null?void 0:l.slidePrev()})})]),e.createElementVNode("div",y,[e.createVNode(e.unref(u.default),{icon:{name:"ArrowSmallRightIcon"},onClick:s[2]||(s[2]=r=>{var l;return(l=i.value)==null?void 0:l.slideNext()})})])])):e.createCommentVNode("",!0)],2))}});exports.default=h;exports.elCarouselSizes=z;
|
|
2
2
|
//# sourceMappingURL=ElCarousel.vue.cjs2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElCarousel.vue.cjs2.js","sources":["../../src/ElCarousel.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elCarouselSizes = ['sm', 'md', 'lg'] as const;\nexport type ElCarouselSizes = (typeof elCarouselSizes)[number];\n\nexport interface CarouselProps {\n size?: ElCarouselSizes;\n slides: CarouselSlide[];\n opacity?: boolean;\n}\n\nexport interface CarouselSlide {\n title: string;\n description: string;\n picture: string;\n button: InstanceType<typeof ElButton>['$props'];\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { Keyboard, Navigation, Pagination } from 'swiper/modules';\nimport { Swiper, SwiperSlide } from 'swiper/vue';\nimport { ElButton, ElIconButton } from '.';\n\nimport 'swiper/css';\nimport 'swiper/css/pagination';\nimport { computed, ref } from 'vue';\nimport { Device, useMatchDevice } from './utils';\n\ndefineProps<CarouselProps>();\n\nconst device = useMatchDevice();\n\nconst buttonSize = computed(() => {\n switch (device.value) {\n case Device.Desktop:\n return 'xl';\n case Device.Tablet:\n return 'l';\n default:\n return 'sm';\n }\n});\n\nconst swiperInstance = ref();\nconst modules = ref([Navigation, Pagination, Keyboard]);\n</script>\n\n<template>\n <div\n class=\"w-full relative\"\n :class=\"{\n 'max-w-2xl': size === 'md',\n 'max-w-7xl': size === 'lg',\n }\"\n >\n <swiper\n :space-between=\"30\"\n :slides-per-view=\"1\"\n :keyboard=\"{\n enabled: true,\n }\"\n :pagination=\"{\n clickable: true,\n }\"\n :loop=\"true\"\n :navigation=\"true\"\n :modules=\"modules\"\n class=\"\"\n @swiper=\"swiperInstance = $event\"\n >\n <swiper-slide v-for=\"(slide, index) in slides\" :key=\"index\">\n <div\n class=\"flex items-center isolate overflow-hidden w-full bg-left bg-cover bg-no-repeat bg-black rounded-2xl p-6 md:p-7 lg:p-24\"\n :style=\"{\n backgroundImage: 'url(' + slide.picture + ')',\n }\"\n :class=\"{\n 'justify-end items-end h-auto': size === 'sm',\n 'h-96': size === 'md',\n 'h-auto': size === 'lg',\n }\"\n >\n <div v-if=\"opacity\" class=\"bg-black opacity-30 left-0 absolute w-full h-full top-0 rounded-2xl\"></div>\n\n <div\n class=\"z-10 flex flex-col justify-end md:justify-center gap-3 lg:gap-4 items-start flex-1 self-stretch md:my-8 text-white text-sm md:text-base lg:text-xl\"\n :class=\"{\n 'w-full': size === 'sm',\n 'max-w-80': size === 'md',\n 'max-w-96': size === 'lg',\n }\"\n >\n <h1 class=\"font-semibold text-neutral-inverse text-xl md:text-2xl lg:text-4xl\">\n {{ slide.title }}\n </h1>\n <p\n class=\"text-neutral-inverse font-medium text-sm md:text-base md:max-w-80 lg:text-xl lg:max-w-96\"\n :class=\"{\n 'w-full': size === 'sm',\n 'w-80 max-w-80': size === 'md',\n 'w-96 max-w-96': size === 'lg',\n }\"\n >\n {{ slide.description }}\n </p>\n <div class=\"py-2 md:py-3 lg:py-4\">\n <ElButton v-bind=\"slide.button\" :size=\"buttonSize\" />\n </div>\n </div>\n </div>\n </swiper-slide>\n </swiper>\n <div class=\"px-6 w-full mb-20 hidden md:absolute md:mt-0 lg:top-60 md:bottom-0 lg:flex justify-between\">\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallLeftIcon' }\" @click=\"swiperInstance?.slidePrev()\" />\n </div>\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallRightIcon' }\" @click=\"swiperInstance?.slideNext()\" />\n </div>\n </div>\n </div>\n</template>\n"],"names":["elCarouselSizes","device","useMatchDevice","buttonSize","computed","Device","swiperInstance","ref","modules","Navigation","Pagination","Keyboard"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ElCarousel.vue.cjs2.js","sources":["../../src/ElCarousel.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elCarouselSizes = ['sm', 'md', 'lg'] as const;\nexport type ElCarouselSizes = (typeof elCarouselSizes)[number];\n\nexport interface CarouselProps {\n size?: ElCarouselSizes;\n slides: CarouselSlide[];\n opacity?: boolean;\n}\n\nexport interface CarouselSlide {\n title: string;\n description: string;\n picture: string;\n button: InstanceType<typeof ElButton>['$props'];\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { Keyboard, Navigation, Pagination } from 'swiper/modules';\nimport { Swiper, SwiperSlide } from 'swiper/vue';\nimport { ElButton, ElIconButton } from '.';\n\nimport 'swiper/css';\nimport 'swiper/css/pagination';\nimport { computed, ref } from 'vue';\nimport { Device, useMatchDevice } from './utils';\n\ndefineProps<CarouselProps>();\n\nconst device = useMatchDevice();\n\nconst buttonSize = computed(() => {\n switch (device.value) {\n case Device.Desktop:\n return 'xl';\n case Device.Tablet:\n return 'l';\n default:\n return 'sm';\n }\n});\n\nconst swiperInstance = ref();\nconst modules = ref([Navigation, Pagination, Keyboard]);\n</script>\n\n<template>\n <div\n class=\"w-full relative\"\n :class=\"{\n 'max-w-2xl': size === 'md',\n 'max-w-7xl': size === 'lg',\n }\"\n >\n <swiper\n :space-between=\"30\"\n :slides-per-view=\"1\"\n :keyboard=\"{\n enabled: true,\n }\"\n :pagination=\"{\n clickable: true,\n }\"\n :loop=\"true\"\n :navigation=\"true\"\n :modules=\"modules\"\n class=\"\"\n @swiper=\"swiperInstance = $event\"\n >\n <swiper-slide v-for=\"(slide, index) in slides\" :key=\"index\">\n <div\n class=\"flex items-center isolate overflow-hidden w-full bg-left bg-cover bg-no-repeat bg-black rounded-2xl p-6 md:p-7 lg:p-24\"\n :style=\"{\n backgroundImage: 'url(' + slide.picture + ')',\n }\"\n :class=\"{\n 'justify-end items-end h-auto': size === 'sm',\n 'h-96': size === 'md',\n 'h-auto': size === 'lg',\n }\"\n >\n <div v-if=\"opacity\" class=\"bg-black opacity-30 left-0 absolute w-full h-full top-0 rounded-2xl\"></div>\n\n <div\n class=\"z-10 flex flex-col justify-end md:justify-center gap-3 lg:gap-4 items-start flex-1 self-stretch md:my-8 text-white text-sm md:text-base lg:text-xl\"\n :class=\"{\n 'w-full': size === 'sm',\n 'max-w-80': size === 'md',\n 'max-w-96': size === 'lg',\n }\"\n >\n <h1 class=\"font-semibold text-neutral-inverse text-xl md:text-2xl lg:text-4xl\">\n {{ slide.title }}\n </h1>\n <p\n class=\"text-neutral-inverse font-medium text-sm md:text-base md:max-w-80 lg:text-xl lg:max-w-96\"\n :class=\"{\n 'w-full': size === 'sm',\n 'w-80 max-w-80': size === 'md',\n 'w-96 max-w-96': size === 'lg',\n }\"\n >\n {{ slide.description }}\n </p>\n <div class=\"py-2 md:py-3 lg:py-4\">\n <ElButton v-bind=\"slide.button\" :size=\"buttonSize\" />\n </div>\n </div>\n </div>\n </swiper-slide>\n </swiper>\n <div v-if=\"slides.length > 1\" class=\"px-6 w-full mb-20 hidden md:absolute md:mt-0 lg:top-60 md:bottom-0 lg:flex justify-between\">\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallLeftIcon' }\" @click=\"swiperInstance?.slidePrev()\" />\n </div>\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallRightIcon' }\" @click=\"swiperInstance?.slideNext()\" />\n </div>\n </div>\n </div>\n</template>\n"],"names":["elCarouselSizes","device","useMatchDevice","buttonSize","computed","Device","swiperInstance","ref","modules","Navigation","Pagination","Keyboard"],"mappings":"k8DACaA,EAAkB,CAAC,KAAM,KAAM,IAAI,qGA6BhD,MAAMC,EAASC,EAAAA,iBAETC,EAAaC,EAAAA,SAAS,IAAM,CAChC,OAAQH,EAAO,MAAO,CACpB,KAAKI,EAAO,OAAA,QACH,MAAA,KACT,KAAKA,EAAO,OAAA,OACH,MAAA,IACT,QACS,MAAA,IACX,CAAA,CACD,EAEKC,EAAiBC,EAAAA,MACjBC,EAAUD,EAAAA,IAAI,CAACE,EAAY,QAAAC,EAAA,QAAYC,EAAQ,OAAA,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as y,computed as h,ref as p,openBlock as s,createElementBlock as m,normalizeClass as n,createVNode as a,unref as r,withCtx as u,Fragment as z,renderList as k,createBlock as S,createElementVNode as l,normalizeStyle as C,createCommentVNode as f,toDisplayString as c,mergeProps as _}from"vue";import j from"../node_modules/swiper/modules/keyboard.esm.js";import N from"../node_modules/swiper/modules/navigation.esm.js";import B from"../node_modules/swiper/modules/pagination.esm.js";import{Swiper as D,SwiperSlide as I}from"../node_modules/swiper/swiper-vue.esm.js";/* empty css */import"./polyfills.esm.js";import"vee-validate";import"../node_modules/codice-fiscale-js/dist/codice.fiscale.commonjs2.esm.js";import"../node_modules/lodash/lodash.esm.js";import"./tailwind.plugin.esm.js";import"../node_modules/@davincihealthcare/elty-design-system-foundations/dist/index.esm.js";import $ from"./ElButton.vue.esm2.js";import"./forms/ElInputText.vue.esm2.js";import{useMatchDevice as E,Device as w}from"./utils.esm.js";import g from"./ElIconButton.vue.esm2.js";import"./forms/ElInputCheckbox.vue.esm2.js";import"./forms/ElInputDate.vue.esm2.js";import"./forms/ElInputFile.vue.esm2.js";import"./forms/ElInputMeasureUnit.vue.esm2.js";import"./forms/ElInputNumber.vue.esm2.js";import"./forms/ElInputPhone.vue.esm2.js";import"./forms/ElInputSelect.vue.esm2.js";import"./forms/ElInputTextarea.vue.esm2.js";import"./ElToast.vue.esm2.js";import"./forms/ElInputRadioButton.vue.esm2.js";/* empty css *//* empty css */import"./forms/ElInputSearch.vue.esm2.js";const P={key:0,class:"bg-black opacity-30 left-0 absolute w-full h-full top-0 rounded-2xl"},V={class:"font-semibold text-neutral-inverse text-xl md:text-2xl lg:text-4xl"},A={class:"py-2 md:py-3 lg:py-4"},L={key:0,class:"px-6 w-full mb-20 hidden md:absolute md:mt-0 lg:top-60 md:bottom-0 lg:flex justify-between"},F={class:"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden"},K={class:"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden"},ge=["sm","md","lg"],ve=y({__name:"ElCarousel",props:{size:{},slides:{},opacity:{type:Boolean}},setup(M){const v=E(),x=h(()=>{switch(v.value){case w.Desktop:return"xl";case w.Tablet:return"l";default:return"sm"}}),d=p(),b=p([N,B,j]);return(e,i)=>(s(),m("div",{class:n(["w-full relative",{"max-w-2xl":e.size==="md","max-w-7xl":e.size==="lg"}])},[a(r(D),{"space-between":30,"slides-per-view":1,keyboard:{enabled:!0},pagination:{clickable:!0},loop:!0,navigation:!0,modules:b.value,class:"",onSwiper:i[0]||(i[0]=t=>d.value=t)},{default:u(()=>[(s(!0),m(z,null,k(e.slides,(t,o)=>(s(),S(r(I),{key:o},{default:u(()=>[l("div",{class:n(["flex items-center isolate overflow-hidden w-full bg-left bg-cover bg-no-repeat bg-black rounded-2xl p-6 md:p-7 lg:p-24",{"justify-end items-end h-auto":e.size==="sm","h-96":e.size==="md","h-auto":e.size==="lg"}]),style:C({backgroundImage:"url("+t.picture+")"})},[e.opacity?(s(),m("div",P)):f("",!0),l("div",{class:n(["z-10 flex flex-col justify-end md:justify-center gap-3 lg:gap-4 items-start flex-1 self-stretch md:my-8 text-white text-sm md:text-base lg:text-xl",{"w-full":e.size==="sm","max-w-80":e.size==="md","max-w-96":e.size==="lg"}])},[l("h1",V,c(t.title),1),l("p",{class:n(["text-neutral-inverse font-medium text-sm md:text-base md:max-w-80 lg:text-xl lg:max-w-96",{"w-full":e.size==="sm","w-80 max-w-80":e.size==="md","w-96 max-w-96":e.size==="lg"}])},c(t.description),3),l("div",A,[a(r($),_({ref_for:!0},t.button,{size:x.value}),null,16,["size"])])],2)],6)]),_:2},1024))),128))]),_:1},8,["modules"]),e.slides.length>1?(s(),m("div",L,[l("div",F,[a(r(g),{icon:{name:"ArrowSmallLeftIcon"},onClick:i[1]||(i[1]=t=>{var o;return(o=d.value)==null?void 0:o.slidePrev()})})]),l("div",K,[a(r(g),{icon:{name:"ArrowSmallRightIcon"},onClick:i[2]||(i[2]=t=>{var o;return(o=d.value)==null?void 0:o.slideNext()})})])])):f("",!0)],2))}});export{ve as default,ge as elCarouselSizes};
|
|
2
2
|
//# sourceMappingURL=ElCarousel.vue.esm2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElCarousel.vue.esm2.js","sources":["../../src/ElCarousel.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elCarouselSizes = ['sm', 'md', 'lg'] as const;\nexport type ElCarouselSizes = (typeof elCarouselSizes)[number];\n\nexport interface CarouselProps {\n size?: ElCarouselSizes;\n slides: CarouselSlide[];\n opacity?: boolean;\n}\n\nexport interface CarouselSlide {\n title: string;\n description: string;\n picture: string;\n button: InstanceType<typeof ElButton>['$props'];\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { Keyboard, Navigation, Pagination } from 'swiper/modules';\nimport { Swiper, SwiperSlide } from 'swiper/vue';\nimport { ElButton, ElIconButton } from '.';\n\nimport 'swiper/css';\nimport 'swiper/css/pagination';\nimport { computed, ref } from 'vue';\nimport { Device, useMatchDevice } from './utils';\n\ndefineProps<CarouselProps>();\n\nconst device = useMatchDevice();\n\nconst buttonSize = computed(() => {\n switch (device.value) {\n case Device.Desktop:\n return 'xl';\n case Device.Tablet:\n return 'l';\n default:\n return 'sm';\n }\n});\n\nconst swiperInstance = ref();\nconst modules = ref([Navigation, Pagination, Keyboard]);\n</script>\n\n<template>\n <div\n class=\"w-full relative\"\n :class=\"{\n 'max-w-2xl': size === 'md',\n 'max-w-7xl': size === 'lg',\n }\"\n >\n <swiper\n :space-between=\"30\"\n :slides-per-view=\"1\"\n :keyboard=\"{\n enabled: true,\n }\"\n :pagination=\"{\n clickable: true,\n }\"\n :loop=\"true\"\n :navigation=\"true\"\n :modules=\"modules\"\n class=\"\"\n @swiper=\"swiperInstance = $event\"\n >\n <swiper-slide v-for=\"(slide, index) in slides\" :key=\"index\">\n <div\n class=\"flex items-center isolate overflow-hidden w-full bg-left bg-cover bg-no-repeat bg-black rounded-2xl p-6 md:p-7 lg:p-24\"\n :style=\"{\n backgroundImage: 'url(' + slide.picture + ')',\n }\"\n :class=\"{\n 'justify-end items-end h-auto': size === 'sm',\n 'h-96': size === 'md',\n 'h-auto': size === 'lg',\n }\"\n >\n <div v-if=\"opacity\" class=\"bg-black opacity-30 left-0 absolute w-full h-full top-0 rounded-2xl\"></div>\n\n <div\n class=\"z-10 flex flex-col justify-end md:justify-center gap-3 lg:gap-4 items-start flex-1 self-stretch md:my-8 text-white text-sm md:text-base lg:text-xl\"\n :class=\"{\n 'w-full': size === 'sm',\n 'max-w-80': size === 'md',\n 'max-w-96': size === 'lg',\n }\"\n >\n <h1 class=\"font-semibold text-neutral-inverse text-xl md:text-2xl lg:text-4xl\">\n {{ slide.title }}\n </h1>\n <p\n class=\"text-neutral-inverse font-medium text-sm md:text-base md:max-w-80 lg:text-xl lg:max-w-96\"\n :class=\"{\n 'w-full': size === 'sm',\n 'w-80 max-w-80': size === 'md',\n 'w-96 max-w-96': size === 'lg',\n }\"\n >\n {{ slide.description }}\n </p>\n <div class=\"py-2 md:py-3 lg:py-4\">\n <ElButton v-bind=\"slide.button\" :size=\"buttonSize\" />\n </div>\n </div>\n </div>\n </swiper-slide>\n </swiper>\n <div class=\"px-6 w-full mb-20 hidden md:absolute md:mt-0 lg:top-60 md:bottom-0 lg:flex justify-between\">\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallLeftIcon' }\" @click=\"swiperInstance?.slidePrev()\" />\n </div>\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallRightIcon' }\" @click=\"swiperInstance?.slideNext()\" />\n </div>\n </div>\n </div>\n</template>\n"],"names":["elCarouselSizes","device","useMatchDevice","buttonSize","computed","Device","swiperInstance","ref","modules","Navigation","Pagination","Keyboard"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ElCarousel.vue.esm2.js","sources":["../../src/ElCarousel.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elCarouselSizes = ['sm', 'md', 'lg'] as const;\nexport type ElCarouselSizes = (typeof elCarouselSizes)[number];\n\nexport interface CarouselProps {\n size?: ElCarouselSizes;\n slides: CarouselSlide[];\n opacity?: boolean;\n}\n\nexport interface CarouselSlide {\n title: string;\n description: string;\n picture: string;\n button: InstanceType<typeof ElButton>['$props'];\n}\n</script>\n\n<script lang=\"ts\" setup>\nimport { Keyboard, Navigation, Pagination } from 'swiper/modules';\nimport { Swiper, SwiperSlide } from 'swiper/vue';\nimport { ElButton, ElIconButton } from '.';\n\nimport 'swiper/css';\nimport 'swiper/css/pagination';\nimport { computed, ref } from 'vue';\nimport { Device, useMatchDevice } from './utils';\n\ndefineProps<CarouselProps>();\n\nconst device = useMatchDevice();\n\nconst buttonSize = computed(() => {\n switch (device.value) {\n case Device.Desktop:\n return 'xl';\n case Device.Tablet:\n return 'l';\n default:\n return 'sm';\n }\n});\n\nconst swiperInstance = ref();\nconst modules = ref([Navigation, Pagination, Keyboard]);\n</script>\n\n<template>\n <div\n class=\"w-full relative\"\n :class=\"{\n 'max-w-2xl': size === 'md',\n 'max-w-7xl': size === 'lg',\n }\"\n >\n <swiper\n :space-between=\"30\"\n :slides-per-view=\"1\"\n :keyboard=\"{\n enabled: true,\n }\"\n :pagination=\"{\n clickable: true,\n }\"\n :loop=\"true\"\n :navigation=\"true\"\n :modules=\"modules\"\n class=\"\"\n @swiper=\"swiperInstance = $event\"\n >\n <swiper-slide v-for=\"(slide, index) in slides\" :key=\"index\">\n <div\n class=\"flex items-center isolate overflow-hidden w-full bg-left bg-cover bg-no-repeat bg-black rounded-2xl p-6 md:p-7 lg:p-24\"\n :style=\"{\n backgroundImage: 'url(' + slide.picture + ')',\n }\"\n :class=\"{\n 'justify-end items-end h-auto': size === 'sm',\n 'h-96': size === 'md',\n 'h-auto': size === 'lg',\n }\"\n >\n <div v-if=\"opacity\" class=\"bg-black opacity-30 left-0 absolute w-full h-full top-0 rounded-2xl\"></div>\n\n <div\n class=\"z-10 flex flex-col justify-end md:justify-center gap-3 lg:gap-4 items-start flex-1 self-stretch md:my-8 text-white text-sm md:text-base lg:text-xl\"\n :class=\"{\n 'w-full': size === 'sm',\n 'max-w-80': size === 'md',\n 'max-w-96': size === 'lg',\n }\"\n >\n <h1 class=\"font-semibold text-neutral-inverse text-xl md:text-2xl lg:text-4xl\">\n {{ slide.title }}\n </h1>\n <p\n class=\"text-neutral-inverse font-medium text-sm md:text-base md:max-w-80 lg:text-xl lg:max-w-96\"\n :class=\"{\n 'w-full': size === 'sm',\n 'w-80 max-w-80': size === 'md',\n 'w-96 max-w-96': size === 'lg',\n }\"\n >\n {{ slide.description }}\n </p>\n <div class=\"py-2 md:py-3 lg:py-4\">\n <ElButton v-bind=\"slide.button\" :size=\"buttonSize\" />\n </div>\n </div>\n </div>\n </swiper-slide>\n </swiper>\n <div v-if=\"slides.length > 1\" class=\"px-6 w-full mb-20 hidden md:absolute md:mt-0 lg:top-60 md:bottom-0 lg:flex justify-between\">\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallLeftIcon' }\" @click=\"swiperInstance?.slidePrev()\" />\n </div>\n <div class=\"w-9 h-9 flex justify-center items-center bg-white rounded-full z-10 overflow-hidden\">\n <ElIconButton :icon=\"{ name: 'ArrowSmallRightIcon' }\" @click=\"swiperInstance?.slideNext()\" />\n </div>\n </div>\n </div>\n</template>\n"],"names":["elCarouselSizes","device","useMatchDevice","buttonSize","computed","Device","swiperInstance","ref","modules","Navigation","Pagination","Keyboard"],"mappings":"onEACaA,GAAkB,CAAC,KAAM,KAAM,IAAI,sFA6BhD,MAAMC,EAASC,IAETC,EAAaC,EAAS,IAAM,CAChC,OAAQH,EAAO,MAAO,CACpB,KAAKI,EAAO,QACH,MAAA,KACT,KAAKA,EAAO,OACH,MAAA,IACT,QACS,MAAA,IACX,CAAA,CACD,EAEKC,EAAiBC,IACjBC,EAAUD,EAAI,CAACE,EAAYC,EAAYC,CAAQ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),u=require("../node_modules/@heroicons/vue/24/outline/esm/index.cjs.js"),i=require("../node_modules/@heroicons/vue/24/solid/esm/index.cjs.js"),l=["pink","yellow","orange","cyan","rose","green","brand-blue","brand-green","red","purple","indigo"],t=n.defineComponent({__name:"ElIcon",props:{name:{},color:{},solid:{type:Boolean},disabled:{type:Boolean}},setup(a){const o=a,s=n.computed(()=>r(o.name));function r(e){return l.includes(e)}const d=n.computed(()=>{if(!r(o.name))return o.solid?i[o.name]:u[o.name]});return(e,g)=>s.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["h-4 w-4 rounded-full",{"bg-yellow-500":e.name==="yellow","bg-orange-500":e.name==="orange","bg-cyan-500":e.name==="cyan","bg-rose-500":e.name==="rose","bg-green-500":e.name==="green","bg-brandBlue-500":e.name==="brand-blue","bg-brandGreen-500":e.name==="brand-green","bg-red-500":e.name==="red","bg-purple-500":e.name==="purple","bg-indigo-500":e.name==="indigo"}])},null,2)):(n.openBlock(),n.createBlock(n.resolveDynamicComponent(d.value),{key:1,class:n.normalizeClass({"text-yellow-500":e.color==="yellow","text-orange-500":e.color==="orange","text-cyan-500":e.color==="cyan","text-rose-500":e.color==="rose","text-green-500":e.color==="green","text-brandBlue-500":e.color==="brand-blue","text-brandGreen-500":e.color==="brand-green","text-red-500":e.color==="red","text-purple-500":e.color==="purple","text-indigo-500":e.color==="indigo"})},null,8,["class"]))}});exports.default=t;exports.elIconColors=l;
|
|
2
2
|
//# sourceMappingURL=ElIcon.vue.cjs2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElIcon.vue.cjs2.js","sources":["../../src/ElIcon.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elIconColors = [\n 'pink',\n 'yellow',\n 'orange',\n 'cyan',\n 'rose',\n 'green',\n 'brand-blue',\n 'brand-green',\n 'red',\n 'purple',\n 'indigo',\n] as const;\ntype ElIconColors = (typeof elIconColors)[number];\nexport type IconNames = keyof typeof outlineIcons | ElIconColors;\nexport type ElIconProps = {\n name: IconNames;\n solid?: boolean;\n cursorPointer?: boolean;\n disabled?: boolean;\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport * as outlineIcons from '@heroicons/vue/24/outline';\nimport * as solidIcons from '@heroicons/vue/24/solid';\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n name: IconNames;\n solid?: boolean;\n disabled?: boolean;\n}>();\n\nfunction isElIconColor(color: string): color is ElIconColors {\n return elIconColors.includes(color as ElIconColors);\n}\n\nconst
|
|
1
|
+
{"version":3,"file":"ElIcon.vue.cjs2.js","sources":["../../src/ElIcon.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elIconColors = [\n 'pink',\n 'yellow',\n 'orange',\n 'cyan',\n 'rose',\n 'green',\n 'brand-blue',\n 'brand-green',\n 'red',\n 'purple',\n 'indigo',\n] as const;\ntype ElIconColors = (typeof elIconColors)[number];\nexport type IconNames = keyof typeof outlineIcons | ElIconColors;\nexport type ElIconProps = {\n name: IconNames;\n color?: ElIconColors;\n solid?: boolean;\n cursorPointer?: boolean;\n disabled?: boolean;\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport * as outlineIcons from '@heroicons/vue/24/outline';\nimport * as solidIcons from '@heroicons/vue/24/solid';\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n name: IconNames;\n color?: ElIconColors;\n solid?: boolean;\n disabled?: boolean;\n}>();\n\n// Deprecated: this stuff is a mess, don't pass color as the name\nconst isColorDot = computed(() => isElIconColor(props.name));\nfunction isElIconColor(color: string): color is ElIconColors {\n return elIconColors.includes(color as ElIconColors);\n}\n\nconst iconComponent = computed(() => {\n if (isElIconColor(props.name)) return;\n return props.solid ? solidIcons[props.name] : outlineIcons[props.name];\n});\n</script>\n\n<template>\n <div\n v-if=\"isColorDot\"\n class=\"h-4 w-4 rounded-full\"\n :class=\"{\n 'bg-yellow-500': name === 'yellow',\n 'bg-orange-500': name === 'orange',\n 'bg-cyan-500': name === 'cyan',\n 'bg-rose-500': name === 'rose',\n 'bg-green-500': name === 'green',\n 'bg-brandBlue-500': name === 'brand-blue',\n 'bg-brandGreen-500': name === 'brand-green',\n 'bg-red-500': name === 'red',\n 'bg-purple-500': name === 'purple',\n 'bg-indigo-500': name === 'indigo',\n }\"\n ></div>\n <component\n :is=\"iconComponent\"\n v-else\n :class=\"{\n 'text-yellow-500': color === 'yellow',\n 'text-orange-500': color === 'orange',\n 'text-cyan-500': color === 'cyan',\n 'text-rose-500': color === 'rose',\n 'text-green-500': color === 'green',\n 'text-brandBlue-500': color === 'brand-blue',\n 'text-brandGreen-500': color === 'brand-green',\n 'text-red-500': color === 'red',\n 'text-purple-500': color === 'purple',\n 'text-indigo-500': color === 'indigo',\n }\"\n />\n</template>\n"],"names":["elIconColors","props","__props","isColorDot","computed","isElIconColor","color","iconComponent","solidIcons","outlineIcons"],"mappings":"iRACaA,EAAe,CAC1B,OACA,SACA,SACA,OACA,OACA,QACA,aACA,cACA,MACA,SACA,QACF,sHAiBA,MAAMC,EAAQC,EAQRC,EAAaC,EAAAA,SAAS,IAAMC,EAAcJ,EAAM,IAAI,CAAC,EAC3D,SAASI,EAAcC,EAAsC,CACpD,OAAAN,EAAa,SAASM,CAAqB,CACpD,CAEM,MAAAC,EAAgBH,EAAAA,SAAS,IAAM,CAC/B,GAAA,CAAAC,EAAcJ,EAAM,IAAI,EACrB,OAAAA,EAAM,MAAQO,EAAWP,EAAM,IAAI,EAAIQ,EAAaR,EAAM,IAAI,CAAA,CACtE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as m,computed as r,openBlock as l,createElementBlock as g,normalizeClass as a,createBlock as t,resolveDynamicComponent as p}from"vue";import*as u from"../node_modules/@heroicons/vue/24/outline/esm/index.esm.js";import*as b from"../node_modules/@heroicons/vue/24/solid/esm/index.esm.js";const c=["pink","yellow","orange","cyan","rose","green","brand-blue","brand-green","red","purple","indigo"],B=m({__name:"ElIcon",props:{name:{},color:{},solid:{type:Boolean},disabled:{type:Boolean}},setup(d){const n=d,s=r(()=>o(n.name));function o(e){return c.includes(e)}const i=r(()=>{if(!o(n.name))return n.solid?b[n.name]:u[n.name]});return(e,y)=>s.value?(l(),g("div",{key:0,class:a(["h-4 w-4 rounded-full",{"bg-yellow-500":e.name==="yellow","bg-orange-500":e.name==="orange","bg-cyan-500":e.name==="cyan","bg-rose-500":e.name==="rose","bg-green-500":e.name==="green","bg-brandBlue-500":e.name==="brand-blue","bg-brandGreen-500":e.name==="brand-green","bg-red-500":e.name==="red","bg-purple-500":e.name==="purple","bg-indigo-500":e.name==="indigo"}])},null,2)):(l(),t(p(i.value),{key:1,class:a({"text-yellow-500":e.color==="yellow","text-orange-500":e.color==="orange","text-cyan-500":e.color==="cyan","text-rose-500":e.color==="rose","text-green-500":e.color==="green","text-brandBlue-500":e.color==="brand-blue","text-brandGreen-500":e.color==="brand-green","text-red-500":e.color==="red","text-purple-500":e.color==="purple","text-indigo-500":e.color==="indigo"})},null,8,["class"]))}});export{B as default,c as elIconColors};
|
|
2
2
|
//# sourceMappingURL=ElIcon.vue.esm2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElIcon.vue.esm2.js","sources":["../../src/ElIcon.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elIconColors = [\n 'pink',\n 'yellow',\n 'orange',\n 'cyan',\n 'rose',\n 'green',\n 'brand-blue',\n 'brand-green',\n 'red',\n 'purple',\n 'indigo',\n] as const;\ntype ElIconColors = (typeof elIconColors)[number];\nexport type IconNames = keyof typeof outlineIcons | ElIconColors;\nexport type ElIconProps = {\n name: IconNames;\n solid?: boolean;\n cursorPointer?: boolean;\n disabled?: boolean;\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport * as outlineIcons from '@heroicons/vue/24/outline';\nimport * as solidIcons from '@heroicons/vue/24/solid';\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n name: IconNames;\n solid?: boolean;\n disabled?: boolean;\n}>();\n\nfunction isElIconColor(color: string): color is ElIconColors {\n return elIconColors.includes(color as ElIconColors);\n}\n\nconst
|
|
1
|
+
{"version":3,"file":"ElIcon.vue.esm2.js","sources":["../../src/ElIcon.vue"],"sourcesContent":["<script lang=\"ts\">\nexport const elIconColors = [\n 'pink',\n 'yellow',\n 'orange',\n 'cyan',\n 'rose',\n 'green',\n 'brand-blue',\n 'brand-green',\n 'red',\n 'purple',\n 'indigo',\n] as const;\ntype ElIconColors = (typeof elIconColors)[number];\nexport type IconNames = keyof typeof outlineIcons | ElIconColors;\nexport type ElIconProps = {\n name: IconNames;\n color?: ElIconColors;\n solid?: boolean;\n cursorPointer?: boolean;\n disabled?: boolean;\n};\n</script>\n\n<script lang=\"ts\" setup>\nimport * as outlineIcons from '@heroicons/vue/24/outline';\nimport * as solidIcons from '@heroicons/vue/24/solid';\nimport { computed } from 'vue';\n\nconst props = defineProps<{\n name: IconNames;\n color?: ElIconColors;\n solid?: boolean;\n disabled?: boolean;\n}>();\n\n// Deprecated: this stuff is a mess, don't pass color as the name\nconst isColorDot = computed(() => isElIconColor(props.name));\nfunction isElIconColor(color: string): color is ElIconColors {\n return elIconColors.includes(color as ElIconColors);\n}\n\nconst iconComponent = computed(() => {\n if (isElIconColor(props.name)) return;\n return props.solid ? solidIcons[props.name] : outlineIcons[props.name];\n});\n</script>\n\n<template>\n <div\n v-if=\"isColorDot\"\n class=\"h-4 w-4 rounded-full\"\n :class=\"{\n 'bg-yellow-500': name === 'yellow',\n 'bg-orange-500': name === 'orange',\n 'bg-cyan-500': name === 'cyan',\n 'bg-rose-500': name === 'rose',\n 'bg-green-500': name === 'green',\n 'bg-brandBlue-500': name === 'brand-blue',\n 'bg-brandGreen-500': name === 'brand-green',\n 'bg-red-500': name === 'red',\n 'bg-purple-500': name === 'purple',\n 'bg-indigo-500': name === 'indigo',\n }\"\n ></div>\n <component\n :is=\"iconComponent\"\n v-else\n :class=\"{\n 'text-yellow-500': color === 'yellow',\n 'text-orange-500': color === 'orange',\n 'text-cyan-500': color === 'cyan',\n 'text-rose-500': color === 'rose',\n 'text-green-500': color === 'green',\n 'text-brandBlue-500': color === 'brand-blue',\n 'text-brandGreen-500': color === 'brand-green',\n 'text-red-500': color === 'red',\n 'text-purple-500': color === 'purple',\n 'text-indigo-500': color === 'indigo',\n }\"\n />\n</template>\n"],"names":["elIconColors","props","__props","isColorDot","computed","isElIconColor","color","iconComponent","solidIcons","outlineIcons"],"mappings":"qTACO,MAAMA,EAAe,CAC1B,OACA,SACA,SACA,OACA,OACA,QACA,aACA,cACA,MACA,SACA,QACF,sGAiBA,MAAMC,EAAQC,EAQRC,EAAaC,EAAS,IAAMC,EAAcJ,EAAM,IAAI,CAAC,EAC3D,SAASI,EAAcC,EAAsC,CACpD,OAAAN,EAAa,SAASM,CAAqB,CACpD,CAEM,MAAAC,EAAgBH,EAAS,IAAM,CAC/B,GAAA,CAAAC,EAAcJ,EAAM,IAAI,EACrB,OAAAA,EAAM,MAAQO,EAAWP,EAAM,IAAI,EAAIQ,EAAaR,EAAM,IAAI,CAAA,CACtE"}
|