UNPKG

@dialpad/dialtone

Version:

Dialpad's Dialtone design system monorepo

82 lines (81 loc) 2.04 kB
import { t as e } from "../../_plugin-vue_export-helper-BTgDAbhb.js"; import { DT_STACK_ALIGN as t, DT_STACK_DIRECTION as n, DT_STACK_GAP as r, DT_STACK_JUSTIFY as i, DT_STACK_RESPONSIVE_BREAKPOINTS as a } from "./stack-constants.js"; import { alignValidator as o, directionValidator as s, gapValidator as c, justifyValidator as l } from "./validators.js"; import { getDefaultAlignClass as u, getDefaultDirectionClass as d, getDefaultGapClass as f, getDefaultJustifyClass as p, getResponsiveClasses as m } from "./utils.js"; import { createBlock as h, normalizeClass as g, openBlock as _, renderSlot as v, resolveDynamicComponent as y, withCtx as b } from "vue"; //#region components/stack/stack.vue var x = { compatConfig: { MODE: 3 }, name: "DtStack", props: { direction: { type: [String, Object], default: "column", validator: (e) => s(e) }, as: { type: String, default: "div" }, gap: { type: [String, Object], default: "0", validator: (e) => c(e) }, align: { type: [String, Object], validator: (e) => o(e) }, justify: { type: [String, Object], default: "start", validator: (e) => l(e) } }, data() { return { DT_STACK_DIRECTION: n, DT_STACK_GAP: r, DT_STACK_RESPONSIVE_BREAKPOINTS: a, DT_STACK_ALIGN: t, DT_STACK_JUSTIFY: i }; }, computed: { defaultGap() { return f(this.gap); }, defaultDirection() { return d(this.direction); }, defaultAlign() { return u(this.align); }, defaultJustify() { return p(this.justify); }, stackResponsive() { return m(this.direction, this.gap, this.align, this.justify); } } }; function S(e, t, n, r, i, a) { return _(), h(y(n.as), { "data-qa": "dt-stack", class: g([ "d-stack", a.defaultDirection, a.defaultGap, a.defaultAlign, a.defaultJustify, a.stackResponsive ]) }, { default: b(() => [v(e.$slots, "default")]), _: 3 }, 8, ["class"]); } var C = /* @__PURE__ */ e(x, [["render", S]]); //#endregion export { C as default }; //# sourceMappingURL=stack.js.map