UNPKG

@uva-glass/component-library

Version:

React components UvA

62 lines (61 loc) 1.93 kB
import { jsx as e, jsxs as i, Fragment as m } from "react/jsx-runtime"; import { l as s } from "../../index-DvUwfXNb.js"; import { Sortable as l } from "./Sortable.js"; import { InputField as d } from "../InputField/InputField.js"; import { Icon as c } from "../Icon/Icon.js"; import { Button as b } from "../Buttons/Button.js"; import "../Buttons/LinkButton.js"; import "@react-aria/button"; const p = `<Sortable onSort={onSortFunction} ItemHandlePlacement={ItemHandlePlacement} scrollable={scrollable} disabled={ disabled } hideNumbers={ hideNumbers } sortableItemColor={ sortableItemColor } > { children } </ Sortable > `, F = { title: "Organisms/Sortable", component: l, argTypes: { children: { table: { disable: !0 } }, ItemHandlePlacement: { table: { disable: !0 } } }, parameters: { inspectComponent: l, codeString: p } }, r = { ItemHandlePlacement: "left", onSort: s() }, a = ["Item-1", "Item-2", "Item-3", "Item-4", "Item-5"], n = (o) => /* @__PURE__ */ e(l, { ...o, children: a }), h = n.bind({}); h.args = { ...r }; const I = n.bind({}); I.args = { ...r, ItemHandlePlacement: "right" }; const u = (o) => /* @__PURE__ */ e(l, { ...o, children: a.map((t) => /* @__PURE__ */ i(m, { children: [ /* @__PURE__ */ e("div", { style: { width: "100%" }, children: /* @__PURE__ */ e(d, { id: t, placeholder: t }, t) }), /* @__PURE__ */ e(b, { variant: "blank-icon", children: /* @__PURE__ */ e(c, { name: "Trash", color: "#a0002aff" }) }) ] }, t)) }), f = u.bind({}); f.args = { ...r, childrenData: [ { title: "item-1", value: 1 }, { title: "item-2", value: 2 }, { title: "item-3", value: 3 }, { title: "item-4", value: 4 }, { title: "item-5", value: 5 } ] }; export { h as SortableExample, f as WithComplexChildren, F as default, I as withHandleRight }; //# sourceMappingURL=Sortable.stories.js.map