UNPKG

@trail-ui/react

Version:
106 lines (102 loc) 5.34 kB
"use strict"; var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( // If the importer is in node compatibility mode or this is not an ESM // file that has been converted to a CommonJS file using a Babel- // compatible transform (i.e. "__esModule" has not been set), then set // "default" to the CommonJS "module.exports" for node compatibility. isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod )); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/multiselect/tw-spinner.tsx var tw_spinner_exports = {}; __export(tw_spinner_exports, { Spinner: () => Spinner }); module.exports = __toCommonJS(tw_spinner_exports); var import_tailwind_merge = require("tailwind-merge"); // src/multiselect/tw-icon.tsx var import_react = __toESM(require("react")); var import_jsx_runtime = require("react/jsx-runtime"); function Icon({ children, "aria-label": ariaLabel, ...props }) { const child = import_react.default.Children.only(children); return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [ import_react.default.cloneElement(child, { "aria-hidden": "true", "aria-label": void 0, focusable: "false", ...props }), ariaLabel ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: ariaLabel }) : null ] }); } // src/multiselect/tw-spinner.tsx var import_jsx_runtime2 = require("react/jsx-runtime"); function Spinner({ className, "aria-label": ariaLabel, ...props }) { return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Icon, { "aria-label": ariaLabel != null ? ariaLabel : "Loading", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( "svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0px", y: "0px", viewBox: "0 0 2400 2400", className: (0, import_tailwind_merge.twMerge)("size-6 stroke-zinc-400", className), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { strokeWidth: "200", strokeLinecap: "round", fill: "none", children: [ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { x1: "1200", y1: "600", x2: "1200", y2: "100" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.5", x1: "1200", y1: "2300", x2: "1200", y2: "1800" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.917", x1: "900", y1: "680.4", x2: "650", y2: "247.4" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.417", x1: "1750", y1: "2152.6", x2: "1500", y2: "1719.6" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.833", x1: "680.4", y1: "900", x2: "247.4", y2: "650" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.333", x1: "2152.6", y1: "1750", x2: "1719.6", y2: "1500" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.75", x1: "600", y1: "1200", x2: "100", y2: "1200" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.25", x1: "2300", y1: "1200", x2: "1800", y2: "1200" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.667", x1: "680.4", y1: "1500", x2: "247.4", y2: "1750" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.167", x1: "2152.6", y1: "650", x2: "1719.6", y2: "900" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.583", x1: "900", y1: "1719.6", x2: "650", y2: "2152.6" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("line", { opacity: "0.083", x1: "1750", y1: "247.4", x2: "1500", y2: "680.4" }), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)( "animateTransform", { attributeName: "transform", attributeType: "XML", type: "rotate", keyTimes: "0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667", values: "0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199", dur: "0.83333s", begin: "0.08333s", repeatCount: "indefinite", calcMode: "discrete" } ) ] }) } ) }); } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { Spinner });