UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

1 lines 1.55 kB
{"version":3,"file":"time-pill.cjs","sources":["../../../recipes/conversation_view/time_pill/time_pill.vue"],"sourcesContent":["<template>\n <time\n data-qa=\"dt-recipe-time-pill\"\n :dateTime=\"dateTime\"\n class=\"d-recipe-time-pill\"\n >\n {{ dateTimeDisplay }}\n </time>\n</template>\n\n<script>\nimport {} from './time_pill_constants';\n\nexport default {\n compatConfig: { MODE: 3 },\n name: 'DtRecipeTimePill',\n\n props: {\n /**\n * Date time display value\n */\n dateTimeDisplay: {\n type: String,\n required: true,\n },\n\n /**\n * Machine-readable attribute\n * Accepts a string value of YYYY-MM-DD or YYYY-MM-DDThh:mm:ssTZD\n */\n dateTime: {\n type: String,\n required: true,\n validator: (t) => {\n // Since this will only ever be used in the context of a date, we're rejecting non date inputs\n const x = new Date(t);\n if (x instanceof Date && !isNaN(x)) {\n return true;\n }\n return false;\n },\n },\n },\n};\n</script>\n"],"names":["_sfc_main","t","x","_hoisted_1","_createElementBlock","$props","_toDisplayString"],"mappings":"6LAaKA,EAAU,CACb,aAAc,CAAE,KAAM,CAAG,EACzB,KAAM,mBAEN,MAAO,CAIL,gBAAiB,CACf,KAAM,OACN,SAAU,EACX,EAMD,SAAU,CACR,KAAM,OACN,SAAU,GACV,UAAYC,GAAM,CAEhB,MAAMC,EAAI,IAAI,KAAKD,CAAC,EACpB,OAAIC,aAAa,MAAQ,CAAC,MAAMA,CAAC,CAIlC,CACF,CACF,CACH,EA3CAC,EAAA,CAAA,UAAA,+CACEC,EAMO,mBAAA,OAAA,CALL,UAAQ,sBACP,SAAUC,EAAQ,SACnB,MAAM,oBAEH,EAAAC,EAAAA,gBAAAD,EAAA,eAAe,EANtB,EAAAF,CAAA"}