@coinloger/dev-ui 0.1.1 → 0.1.3
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/cjs/components/Badge/Badge.cjs +1 -1
- package/dist/cjs/components/Button/Button.cjs +1 -1
- package/dist/cjs/components/Card/Card.cjs +1 -1
- package/dist/cjs/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/cjs/components/Container/Container.cjs +1 -1
- package/dist/cjs/components/Flex/Flex.cjs +1 -1
- package/dist/cjs/components/Flex/FlexItem.cjs +1 -1
- package/dist/cjs/components/Input/Input.cjs +1 -1
- package/dist/cjs/components/Modal/Modal.cjs +1 -1
- package/dist/cjs/components/Radio/Radio.cjs +1 -1
- package/dist/cjs/components/Select/Select.cjs +1 -1
- package/dist/cjs/components/Switch/Switch.cjs +1 -1
- package/dist/cjs/components/Table/Table.cjs +1 -1
- package/dist/cjs/components/Tabs/Tabs.cjs +1 -1
- package/dist/cjs/components/Typography/Heading.cjs +1 -1
- package/dist/cjs/components/Typography/Text.cjs +1 -1
- package/dist/cjs/theme.cjs +1 -1
- package/dist/esm/components/Badge/Badge.js +14 -22
- package/dist/esm/components/Button/Button.js +12 -24
- package/dist/esm/components/Card/Card.js +10 -18
- package/dist/esm/components/Checkbox/Checkbox.js +17 -33
- package/dist/esm/components/Container/Container.js +11 -18
- package/dist/esm/components/Flex/Flex.js +26 -44
- package/dist/esm/components/Flex/FlexItem.js +24 -38
- package/dist/esm/components/Input/Input.js +16 -46
- package/dist/esm/components/Modal/Modal.d.ts +0 -35
- package/dist/esm/components/Modal/Modal.js +60 -83
- package/dist/esm/components/Radio/Radio.js +16 -32
- package/dist/esm/components/Select/Select.d.ts +1 -17
- package/dist/esm/components/Select/Select.js +62 -79
- package/dist/esm/components/Switch/Switch.js +18 -34
- package/dist/esm/components/Table/Table.js +13 -22
- package/dist/esm/components/Tabs/Tabs.d.ts +0 -25
- package/dist/esm/components/Tabs/Tabs.js +45 -70
- package/dist/esm/components/Typography/Heading.js +15 -25
- package/dist/esm/components/Typography/Text.js +19 -32
- package/dist/esm/theme.d.ts +0 -5
- package/dist/esm/theme.js +11 -16
- package/package.json +15 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),n=require("react"),o=require("clsx");;/* empty css */const e=n.forwardRef(({className:r,children:a,variant:d="primary",size:i="md",shape:s="rounded",...u},t)=>c.jsx("span",{ref:t,className:o.clsx("ui-badge",`ui-badge-${d}`,`ui-badge-${i}`,`ui-badge-${s}`,r),...u,children:a}));e.displayName="Badge";exports.Badge=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),a=require("clsx");;/* empty css */const t=c.forwardRef(({className:e,variant:r="primary",size:s="md",...n},u)=>{const o=a.clsx("ui-btn",`ui-btn-${r}`,`ui-btn-${s}`,e);return i.jsx("button",{ref:u,className:o,...n})});t.displayName="Button";exports.Button=t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),n=require("clsx");;/* empty css */const a=l.forwardRef(({className:c,title:r,footer:s,children:d,...i},u)=>e.jsxs("div",{ref:u,className:n.clsx("ui-card",c),...i,children:[r&&e.jsx("div",{className:"ui-card__header",children:r}),e.jsx("div",{className:"ui-card__body",children:d}),s&&e.jsx("div",{className:"ui-card__footer",children:s})]}));a.displayName="Card";exports.Card=a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),l=require("clsx");;/* empty css */const s=x.forwardRef(({className:r,label:c,error:a,disabled:o,size:i="md",variant:n="primary",...t},u)=>e.jsxs("label",{className:l.clsx("ui-checkbox-label",`ui-checkbox-${i}`,`ui-checkbox-${n}`,o&&"ui-checkbox-disabled",r),children:[e.jsx("input",{type:"checkbox",className:"ui-checkbox-input",disabled:o,ref:u,...t}),e.jsx("span",{className:"ui-checkbox-custom",children:e.jsx("svg",{className:"ui-checkbox-icon",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})})}),c&&e.jsx("span",{className:"ui-checkbox-text",children:c})]}));s.displayName="Checkbox";exports.Checkbox=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),u=require("react"),l=require("clsx");;/* empty css */const e=u.forwardRef(({className:r,children:n,fluid:s=!1,as:t="div",...i},a)=>{const o=l.clsx("ui-container",s&&"ui-container--fluid",r);return c.jsx(t,{ref:a,className:o,...i,children:n})});e.displayName="Container";exports.Container=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react/jsx-runtime"),F=require("react"),$=require("clsx"),j=require("./FlexItem.cjs");;/* empty css */const s=F.forwardRef(({className:l,children:r,direction:i="row",justify:u="start",align:n="stretch",wrap:o="nowrap",gap:e="md",inline:c=!1,as:x="div",style:f,...m},a)=>{const t=typeof e=="number"||typeof e=="string"&&!["sm","md","lg","xl"].includes(e),d=$.clsx(c?"ui-flex--inline":"ui-flex",`ui-flex--dir-${i}`,`ui-flex--justify-${u}`,`ui-flex--align-${n}`,`ui-flex--wrap-${o}`,!t&&e&&`ui-flex--gap-${e}`,l),y={...f,...t?{gap:e}:{}};return q.jsx(x,{ref:a,className:d,style:y,...m,children:r})});s.displayName="Flex";s.Item=j.FlexItem;exports.Flex=s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("react/jsx-runtime"),n=require("react"),y=require("clsx"),c=n.forwardRef(({className:u,children:a,grow:e,shrink:t,basis:l,flex:s,width:i,order:o,as:r="div",style:x,...d},m)=>{const f={...x,...e!==void 0&&{flexGrow:e===!0?1:e===!1?0:e},...t!==void 0&&{flexShrink:t===!0?1:t===!1?0:t},...l!==void 0&&{flexBasis:l},...s!==void 0&&{flex:s},...i!==void 0&&{width:i},...o!==void 0&&{order:o}};return v.jsx(r,{ref:m,className:y.clsx("ui-flex-item",u),style:f,...d,children:a})});c.displayName="Flex.Item";exports.FlexItem=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),i=require("clsx");;/* empty css */const l=n.forwardRef(({className:c,label:r,error:u,helperText:s,fullWidth:a,size:p="md",id:d,...o},x)=>{const t=d||n.useId();return e.jsxs("div",{className:i.clsx("ui-input-wrapper",a&&"ui-input-wrapper-full"),children:[r&&e.jsx("label",{htmlFor:t,className:"ui-label",children:r}),e.jsx("input",{ref:x,id:t,className:i.clsx("ui-input",`ui-input-${p}`,u&&"ui-input-error",c),...o}),s&&e.jsx("span",{className:i.clsx("ui-helper-text",u&&"ui-helper-text-error"),children:s})]})});l.displayName="Input";exports.Input=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),l=require("react"),g=require("react-dom"),a=require("clsx");;/* empty css */const y=l.createContext(void 0),w=()=>{const e=l.useContext(y);if(!e)throw new Error("Modal compound components must be used within a Modal");return e},r=({children:e,className:t})=>{const{onClose:d}=w();return o.jsxs("div",{className:a.clsx("ui-modal-header",t),children:[o.jsx("h3",{className:"ui-modal-title",children:e}),o.jsx("button",{className:"ui-modal-close",onClick:d,"aria-label":"Close modal",children:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})},n=({children:e,className:t})=>o.jsx("div",{className:a.clsx("ui-modal-body",t),children:e}),i=({children:e,className:t})=>o.jsx("div",{className:a.clsx("ui-modal-footer",t),children:e}),h=({isOpen:e,onClose:t,title:d,children:c,footer:u,size:f="md",className:j,closeOnBackdropClick:v=!0})=>{const m=l.useRef(null),[M,x]=l.useState(e);l.useEffect(()=>{e&&x(!0)},[e]);const b=()=>{e||x(!1)};if(l.useEffect(()=>{const s=N=>{N.key==="Escape"&&t()};return e&&(document.addEventListener("keydown",s),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",s),document.body.style.overflow=""}},[e,t]),!M)return null;const k=s=>{v&&s.target===m.current&&t()};return g.createPortal(o.jsx(y.Provider,{value:{onClose:t},children:o.jsx("div",{className:a.clsx("ui-modal-overlay",!e&&"ui-modal-closing"),ref:m,onClick:k,onAnimationEnd:b,children:o.jsx("div",{className:a.clsx("ui-modal",`ui-modal-${f}`,!e&&"ui-modal-closing",j),role:"dialog","aria-modal":"true",children:d?o.jsxs(o.Fragment,{children:[o.jsx(r,{children:d}),o.jsx(n,{children:c}),u&&o.jsx(i,{children:u})]}):c})})}),document.body)},E=Object.assign(h,{Header:r,Body:n,Footer:i});h.displayName="Modal";r.displayName="ModalHeader";n.displayName="ModalBody";i.displayName="ModalFooter";exports.Modal=E;exports.ModalBody=n;exports.ModalFooter=i;exports.ModalHeader=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),c=require("react"),l=require("clsx");;/* empty css */const e=c.forwardRef(({className:s,label:r,error:n,disabled:a,size:o="md",variant:d="primary",...t},u)=>i.jsxs("label",{className:l.clsx("ui-radio-label",`ui-radio-${o}`,`ui-radio-${d}`,a&&"ui-radio-disabled",s),children:[i.jsx("input",{type:"radio",className:"ui-radio-input",disabled:a,ref:u,...t}),i.jsx("span",{className:"ui-radio-custom",children:i.jsx("span",{className:"ui-radio-dot"})}),r&&i.jsx("span",{className:"ui-radio-text",children:r})]}));e.displayName="Radio";exports.Radio=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),c=require("react"),l=require("clsx");;/* empty css */const b=({options:o,value:a,onChange:p,placeholder:j="Select an option",label:x,error:f,helperText:h,disabled:u,fullWidth:v,size:g="md",className:N})=>{const[s,d]=c.useState(!1),[y,w]=c.useState("bottom"),n=c.useRef(null),m=o.find(e=>e.value===a),i=()=>{if(n.current){const e=n.current.getBoundingClientRect(),r=window.innerHeight-e.bottom,E=e.top;r<250&&E>r?w("top"):w("bottom")}},k=()=>{u||(s||i(),d(!s))},S=e=>{p&&p(e),d(!1)};return c.useEffect(()=>(s&&(window.addEventListener("resize",i),window.addEventListener("scroll",i,{capture:!0})),()=>{window.removeEventListener("resize",i),window.removeEventListener("scroll",i,{capture:!0})}),[s]),c.useEffect(()=>{const e=r=>{n.current&&!n.current.contains(r.target)&&d(!1)};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s]),t.jsxs("div",{className:l.clsx("ui-select-wrapper",v&&"ui-w-full",N),ref:n,style:{width:v?"100%":"auto"},children:[x&&t.jsx("label",{className:"ui-label",style:{marginBottom:"0.375rem",display:"block"},children:x}),t.jsxs("div",{className:"ui-select-input-container",children:[t.jsxs("button",{type:"button",className:l.clsx("ui-select-trigger",`ui-select-${g}`,f&&"ui-select-error",u&&"ui-select-disabled",s&&"ui-select-open"),onClick:k,disabled:u,"aria-haspopup":"listbox","aria-expanded":s,children:[t.jsx("span",{className:l.clsx(!m&&"ui-select-placeholder"),children:m?m.label:j}),t.jsx("svg",{className:"ui-select-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),s&&t.jsxs("ul",{className:l.clsx("ui-select-menu",y==="top"&&"ui-select-menu-top"),role:"listbox",children:[o.map(e=>t.jsx("li",{className:l.clsx("ui-select-option",e.value===a&&"ui-select-selected"),onClick:()=>S(e.value),role:"option","aria-selected":e.value===a,children:e.label},e.value)),o.length===0&&t.jsx("li",{className:"ui-select-option",style:{color:"var(--ui-text-muted)",cursor:"default"},children:"No options"})]})]}),h&&t.jsx("span",{className:l.clsx("ui-helper-text",f&&"ui-helper-text-error"),style:{marginTop:"0.375rem",display:"block"},children:h})]})};b.displayName="Select";exports.Select=b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),l=require("react"),n=require("clsx");;/* empty css */const c=l.forwardRef(({className:t,label:i,error:w,disabled:e,size:r="md",variant:a="primary",...u},h)=>s.jsxs("label",{className:n.clsx("ui-switch-label",`ui-switch-${r}`,`ui-switch-${a}`,e&&"ui-switch-disabled",t),children:[s.jsx("input",{type:"checkbox",className:"ui-switch-input",disabled:e,ref:h,role:"switch",...u}),s.jsx("span",{className:"ui-switch-track",children:s.jsx("span",{className:"ui-switch-thumb"})}),i&&s.jsx("span",{className:"ui-switch-text",children:i})]}));c.displayName="Switch";exports.Switch=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react");;/* empty css */const r=c.forwardRef(({className:t,bordered:a=!0,striped:s,hover:i,size:l="md",children:o,...u},b)=>{const n=["ui-table",a&&"ui-table-bordered",s&&"ui-table-striped",i&&"ui-table-hover",l==="sm"&&"ui-table-sm",t].filter(Boolean).join(" ");return e.jsx("div",{className:"ui-table-responsive",children:e.jsx("table",{ref:b,className:n,...u,children:o})})});r.displayName="Table";exports.Table=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),l=require("react"),b=require("clsx");;/* empty css */const T=l.createContext(null),C=({defaultValue:t,value:s,onValueChange:a,children:r,className:n})=>{const[e,i]=l.useState(t||""),o=s!==void 0,d=o?s:e,u=l.useId(),g=x=>{o||i(x),a?.(x)};return c.jsx(T.Provider,{value:{value:d,onChange:g,baseId:u},children:c.jsx("div",{className:b.clsx("ui-tabs",n),children:r})})},I=({className:t,children:s,variant:a="line",...r})=>c.jsx("div",{role:"tablist",className:b.clsx("ui-tabs-list",`ui-tabs-list-${a}`,t),...r,children:s}),m=({value:t,className:s,children:a,onClick:r,...n})=>{const e=l.useContext(T);if(!e)throw new Error("TabsTrigger must be used within Tabs");const i=e.value===t,o=`${e.baseId}-trigger-${t}`,d=`${e.baseId}-content-${t}`,u=g=>{e.onChange(t),r?.(g)};return c.jsx("button",{type:"button",role:"tab","aria-selected":i,"aria-controls":d,id:o,tabIndex:i?0:-1,"data-state":i?"active":"inactive",className:b.clsx("ui-tabs-trigger",s),onClick:u,...n,children:a})},h=({value:t,className:s,children:a,...r})=>{const n=l.useContext(T);if(!n)throw new Error("TabsContent must be used within Tabs");const e=n.value===t,i=`${n.baseId}-trigger-${t}`,o=`${n.baseId}-content-${t}`;return e?c.jsx("div",{role:"tabpanel",id:o,"aria-labelledby":i,tabIndex:0,className:b.clsx("ui-tabs-content",s),...r,children:a}):null},$=Object.assign(C,{List:I,Trigger:m,Content:h});C.displayName="Tabs";I.displayName="TabsList";m.displayName="TabsTrigger";h.displayName="TabsContent";exports.Tabs=$;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),l=require("react"),m=require("clsx");;/* empty css */const r=l.forwardRef(({className:a,children:n,level:t=1,truncate:c,lines:e,style:i,...u},o)=>{const s=`h${t}`,d=e?{...i,"--ui-line-clamp":e}:i;return g.jsx(s,{ref:o,className:m.clsx("ui-heading",`ui-heading-h${t}`,c&&"ui-text-truncate",e&&"ui-text-clamp",a),style:d,...u,children:n})});r.displayName="Heading";exports.Heading=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),p=require("react"),y=require("clsx");;/* empty css */const u=p.forwardRef(({className:c,children:i,variant:o="body",weight:e,muted:s,truncate:x,lines:t,as:a="p",style:r,...n},l)=>{const m=t?{...r,"--ui-line-clamp":t}:r;return d.jsx(a,{ref:l,className:y.clsx("ui-text",`ui-text-${o}`,e&&`ui-text-weight-${e}`,s&&"ui-text-muted",x&&"ui-text-truncate",t&&"ui-text-clamp",c),style:m,...n,children:i})});u.displayName="Text";exports.Text=u;
|
package/dist/cjs/theme.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),y=require("react");function f(s){return s&&typeof s=="object"&&!Array.isArray(s)}function p(s){const i={},o=(r,n)=>{Object.keys(r).forEach(a=>{const c=r[a],t=`${n}-${a}`;f(c)?o(c,t):i[`-${t}`]=c})};return s.colors&&Object.keys(s.colors).forEach(r=>{i[`--ui-${r}`]=s.colors[r]}),s.components&&Object.keys(s.components).forEach(r=>{const n=s.components[r];n&&o(n,`-ui-${r.toLowerCase()}`)}),s.spacing&&o(s.spacing,"-ui-spacing"),s.radius&&o(s.radius,"-ui-radius"),s.shadows&&o(s.shadows,"-ui-shadow"),s.typography&&o(s.typography,"-ui-typography"),i}const e=({theme:s,children:i})=>{const o=y.useMemo(()=>p(s),[s]);return u.jsx("div",{style:{display:"contents",...o},children:i})};e.displayName="ThemeProvider";exports.ThemeProvider=e;
|
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as r from "prop-types";
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { clsx as t } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
5
|
+
const g = s(
|
|
6
|
+
({ className: r, children: a, variant: e = "primary", size: d = "md", shape: m = "rounded", ...o }, i) => /* @__PURE__ */ p(
|
|
8
7
|
"span",
|
|
9
8
|
{
|
|
10
|
-
ref:
|
|
11
|
-
className:
|
|
9
|
+
ref: i,
|
|
10
|
+
className: t(
|
|
12
11
|
"ui-badge",
|
|
13
|
-
`ui-badge-${
|
|
14
|
-
`ui-badge-${i}`,
|
|
12
|
+
`ui-badge-${e}`,
|
|
15
13
|
`ui-badge-${d}`,
|
|
16
|
-
|
|
14
|
+
`ui-badge-${m}`,
|
|
15
|
+
r
|
|
17
16
|
),
|
|
18
|
-
...
|
|
19
|
-
children:
|
|
17
|
+
...o,
|
|
18
|
+
children: a
|
|
20
19
|
}
|
|
21
20
|
)
|
|
22
21
|
);
|
|
23
|
-
|
|
24
|
-
e.propTypes = {
|
|
25
|
-
variant: r.oneOf(["primary", "success", "warning", "danger", "neutral"]),
|
|
26
|
-
size: r.oneOf(["sm", "md", "lg"]),
|
|
27
|
-
shape: r.oneOf(["rounded", "pill"]),
|
|
28
|
-
children: r.node,
|
|
29
|
-
className: r.string
|
|
30
|
-
};
|
|
22
|
+
g.displayName = "Badge";
|
|
31
23
|
export {
|
|
32
|
-
|
|
24
|
+
g as Badge
|
|
33
25
|
};
|
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as o from "prop-types";
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as a } from "react";
|
|
3
|
+
import { clsx as p } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
8
|
-
const
|
|
5
|
+
const u = a(
|
|
6
|
+
({ className: t, variant: o = "primary", size: r = "md", ...m }, s) => {
|
|
7
|
+
const i = p(
|
|
9
8
|
"ui-btn",
|
|
10
|
-
`ui-btn-${
|
|
11
|
-
`ui-btn-${
|
|
12
|
-
|
|
9
|
+
`ui-btn-${o}`,
|
|
10
|
+
`ui-btn-${r}`,
|
|
11
|
+
t
|
|
13
12
|
);
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
return /* @__PURE__ */ n("button", { ref: s, className: i, ...m });
|
|
15
14
|
}
|
|
16
15
|
);
|
|
17
|
-
|
|
18
|
-
t.propTypes = {
|
|
19
|
-
variant: o.oneOf(["primary", "secondary", "outline", "danger", "success", "warning", "ghost", "outline-danger", "outline-success", "outline-warning"]),
|
|
20
|
-
size: o.oneOf(["sm", "md", "lg", "xl"]),
|
|
21
|
-
children: o.node,
|
|
22
|
-
onClick: o.func,
|
|
23
|
-
className: o.string,
|
|
24
|
-
type: o.oneOf(["button", "submit", "reset"]),
|
|
25
|
-
disabled: o.bool,
|
|
26
|
-
autoFocus: o.bool,
|
|
27
|
-
style: o.object
|
|
28
|
-
};
|
|
16
|
+
u.displayName = "Button";
|
|
29
17
|
export {
|
|
30
|
-
|
|
18
|
+
u as Button
|
|
31
19
|
};
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as r from "prop-types";
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as o } from "react";
|
|
3
|
+
import { clsx as l } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
8
|
-
a && /* @__PURE__ */
|
|
9
|
-
/* @__PURE__ */
|
|
10
|
-
d && /* @__PURE__ */
|
|
5
|
+
const p = o(
|
|
6
|
+
({ className: i, title: a, footer: d, children: s, ...c }, e) => /* @__PURE__ */ m("div", { ref: e, className: l("ui-card", i), ...c, children: [
|
|
7
|
+
a && /* @__PURE__ */ r("div", { className: "ui-card__header", children: a }),
|
|
8
|
+
/* @__PURE__ */ r("div", { className: "ui-card__body", children: s }),
|
|
9
|
+
d && /* @__PURE__ */ r("div", { className: "ui-card__footer", children: d })
|
|
11
10
|
] })
|
|
12
11
|
);
|
|
13
|
-
|
|
14
|
-
o.propTypes = {
|
|
15
|
-
title: r.node,
|
|
16
|
-
footer: r.node,
|
|
17
|
-
children: r.node,
|
|
18
|
-
className: r.string,
|
|
19
|
-
style: r.object
|
|
20
|
-
};
|
|
12
|
+
p.displayName = "Card";
|
|
21
13
|
export {
|
|
22
|
-
|
|
14
|
+
p as Card
|
|
23
15
|
};
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import * as e from "prop-types";
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { clsx as x } from "clsx";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
7
|
-
({ className:
|
|
5
|
+
const m = t(
|
|
6
|
+
({ className: r, label: o, error: h, disabled: c, size: i = "md", variant: s = "primary", ...n }, a) => /* @__PURE__ */ l(
|
|
8
7
|
"label",
|
|
9
8
|
{
|
|
10
|
-
className:
|
|
9
|
+
className: x(
|
|
11
10
|
"ui-checkbox-label",
|
|
12
|
-
`ui-checkbox-${
|
|
13
|
-
`ui-checkbox-${
|
|
11
|
+
`ui-checkbox-${i}`,
|
|
12
|
+
`ui-checkbox-${s}`,
|
|
14
13
|
c && "ui-checkbox-disabled",
|
|
15
|
-
|
|
14
|
+
r
|
|
16
15
|
),
|
|
17
16
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
17
|
+
/* @__PURE__ */ e(
|
|
19
18
|
"input",
|
|
20
19
|
{
|
|
21
20
|
type: "checkbox",
|
|
22
21
|
className: "ui-checkbox-input",
|
|
23
22
|
disabled: c,
|
|
24
|
-
ref:
|
|
25
|
-
...
|
|
23
|
+
ref: a,
|
|
24
|
+
...n
|
|
26
25
|
}
|
|
27
26
|
),
|
|
28
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ e("span", { className: "ui-checkbox-custom", children: /* @__PURE__ */ e(
|
|
29
28
|
"svg",
|
|
30
29
|
{
|
|
31
30
|
className: "ui-checkbox-icon",
|
|
@@ -34,30 +33,15 @@ const i = p(
|
|
|
34
33
|
stroke: "currentColor",
|
|
35
34
|
strokeLinecap: "round",
|
|
36
35
|
strokeLinejoin: "round",
|
|
37
|
-
children: /* @__PURE__ */
|
|
36
|
+
children: /* @__PURE__ */ e("polyline", { points: "20 6 9 17 4 12" })
|
|
38
37
|
}
|
|
39
38
|
) }),
|
|
40
|
-
|
|
39
|
+
o && /* @__PURE__ */ e("span", { className: "ui-checkbox-text", children: o })
|
|
41
40
|
]
|
|
42
41
|
}
|
|
43
42
|
)
|
|
44
43
|
);
|
|
45
|
-
|
|
46
|
-
i.propTypes = {
|
|
47
|
-
label: e.node,
|
|
48
|
-
error: e.bool,
|
|
49
|
-
size: e.oneOf(["sm", "md", "lg", "xl"]),
|
|
50
|
-
variant: e.oneOf(["primary", "success", "warning", "danger"]),
|
|
51
|
-
checked: e.bool,
|
|
52
|
-
defaultChecked: e.bool,
|
|
53
|
-
onChange: e.func,
|
|
54
|
-
name: e.string,
|
|
55
|
-
value: e.oneOfType([e.string, e.number]),
|
|
56
|
-
disabled: e.bool,
|
|
57
|
-
required: e.bool,
|
|
58
|
-
id: e.string,
|
|
59
|
-
className: e.string
|
|
60
|
-
};
|
|
44
|
+
m.displayName = "Checkbox";
|
|
61
45
|
export {
|
|
62
|
-
|
|
46
|
+
m as Checkbox
|
|
63
47
|
};
|
|
@@ -1,31 +1,24 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as m } from "react";
|
|
3
3
|
import { clsx as c } from "clsx";
|
|
4
|
-
import * as o from "prop-types";
|
|
5
4
|
/* empty css */
|
|
6
|
-
const
|
|
5
|
+
const f = m(
|
|
7
6
|
({
|
|
8
|
-
className:
|
|
9
|
-
children:
|
|
7
|
+
className: r,
|
|
8
|
+
children: o,
|
|
10
9
|
fluid: i = !1,
|
|
11
10
|
as: a = "div",
|
|
12
|
-
...
|
|
11
|
+
...s
|
|
13
12
|
}, t) => {
|
|
14
|
-
const
|
|
13
|
+
const e = c(
|
|
15
14
|
"ui-container",
|
|
16
15
|
i && "ui-container--fluid",
|
|
17
|
-
|
|
16
|
+
r
|
|
18
17
|
);
|
|
19
|
-
return /* @__PURE__ */
|
|
18
|
+
return /* @__PURE__ */ n(a, { ref: t, className: e, ...s, children: o });
|
|
20
19
|
}
|
|
21
20
|
);
|
|
22
|
-
|
|
23
|
-
r.propTypes = {
|
|
24
|
-
fluid: o.bool,
|
|
25
|
-
as: o.elementType,
|
|
26
|
-
children: o.node,
|
|
27
|
-
className: o.string
|
|
28
|
-
};
|
|
21
|
+
f.displayName = "Container";
|
|
29
22
|
export {
|
|
30
|
-
|
|
23
|
+
f as Container
|
|
31
24
|
};
|
|
@@ -1,57 +1,39 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
import
|
|
5
|
-
import { FlexItem as g } from "./FlexItem.js";
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as $ } from "react";
|
|
3
|
+
import { clsx as w } from "clsx";
|
|
4
|
+
import { FlexItem as F } from "./FlexItem.js";
|
|
6
5
|
/* empty css */
|
|
7
|
-
const s =
|
|
6
|
+
const s = $(
|
|
8
7
|
({
|
|
9
|
-
className:
|
|
10
|
-
children:
|
|
11
|
-
direction:
|
|
12
|
-
justify:
|
|
8
|
+
className: i,
|
|
9
|
+
children: l,
|
|
10
|
+
direction: r = "row",
|
|
11
|
+
justify: o = "start",
|
|
13
12
|
align: m = "stretch",
|
|
14
13
|
wrap: f = "nowrap",
|
|
15
|
-
gap:
|
|
16
|
-
inline:
|
|
17
|
-
as:
|
|
18
|
-
style:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
const t = typeof
|
|
22
|
-
|
|
23
|
-
`ui-flex--dir-${
|
|
24
|
-
`ui-flex--justify-${
|
|
14
|
+
gap: e = "md",
|
|
15
|
+
inline: x = !1,
|
|
16
|
+
as: u = "div",
|
|
17
|
+
style: n,
|
|
18
|
+
...c
|
|
19
|
+
}, a) => {
|
|
20
|
+
const t = typeof e == "number" || typeof e == "string" && !["sm", "md", "lg", "xl"].includes(e), p = w(
|
|
21
|
+
x ? "ui-flex--inline" : "ui-flex",
|
|
22
|
+
`ui-flex--dir-${r}`,
|
|
23
|
+
`ui-flex--justify-${o}`,
|
|
25
24
|
`ui-flex--align-${m}`,
|
|
26
25
|
`ui-flex--wrap-${f}`,
|
|
27
|
-
!t &&
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
...
|
|
31
|
-
...t ? { gap:
|
|
26
|
+
!t && e && `ui-flex--gap-${e}`,
|
|
27
|
+
i
|
|
28
|
+
), d = {
|
|
29
|
+
...n,
|
|
30
|
+
...t ? { gap: e } : {}
|
|
32
31
|
};
|
|
33
|
-
return /* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ y(u, { ref: a, className: p, style: d, ...c, children: l });
|
|
34
33
|
}
|
|
35
34
|
);
|
|
36
35
|
s.displayName = "Flex";
|
|
37
|
-
s.Item =
|
|
38
|
-
s.propTypes = {
|
|
39
|
-
direction: e.oneOf(["row", "column", "row-reverse", "column-reverse"]),
|
|
40
|
-
justify: e.oneOf(["start", "center", "end", "between", "around", "evenly"]),
|
|
41
|
-
align: e.oneOf(["start", "center", "end", "stretch", "baseline"]),
|
|
42
|
-
wrap: e.oneOf(["nowrap", "wrap", "wrap-reverse"]),
|
|
43
|
-
gap: e.oneOfType([
|
|
44
|
-
e.oneOf(["sm", "md", "lg", "xl"]),
|
|
45
|
-
e.number,
|
|
46
|
-
e.string
|
|
47
|
-
]),
|
|
48
|
-
inline: e.bool,
|
|
49
|
-
as: e.elementType,
|
|
50
|
-
children: e.node,
|
|
51
|
-
className: e.string,
|
|
52
|
-
style: e.object,
|
|
53
|
-
id: e.string
|
|
54
|
-
};
|
|
36
|
+
s.Item = F;
|
|
55
37
|
export {
|
|
56
38
|
s as Flex
|
|
57
39
|
};
|
|
@@ -1,47 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { clsx as
|
|
4
|
-
|
|
5
|
-
const n = x(
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { clsx as u } from "clsx";
|
|
4
|
+
const y = p(
|
|
6
5
|
({
|
|
7
|
-
className:
|
|
8
|
-
children:
|
|
9
|
-
grow:
|
|
10
|
-
shrink:
|
|
11
|
-
basis:
|
|
12
|
-
flex:
|
|
6
|
+
className: i,
|
|
7
|
+
children: s,
|
|
8
|
+
grow: e,
|
|
9
|
+
shrink: o,
|
|
10
|
+
basis: t,
|
|
11
|
+
flex: l,
|
|
13
12
|
width: m,
|
|
14
|
-
order:
|
|
15
|
-
as:
|
|
16
|
-
style:
|
|
13
|
+
order: f,
|
|
14
|
+
as: a = "div",
|
|
15
|
+
style: x,
|
|
17
16
|
...d
|
|
18
|
-
},
|
|
19
|
-
const
|
|
20
|
-
...
|
|
21
|
-
...
|
|
22
|
-
...
|
|
23
|
-
...
|
|
24
|
-
...
|
|
17
|
+
}, r) => {
|
|
18
|
+
const v = {
|
|
19
|
+
...x,
|
|
20
|
+
...e !== void 0 && { flexGrow: e === !0 ? 1 : e === !1 ? 0 : e },
|
|
21
|
+
...o !== void 0 && { flexShrink: o === !0 ? 1 : o === !1 ? 0 : o },
|
|
22
|
+
...t !== void 0 && { flexBasis: t },
|
|
23
|
+
...l !== void 0 && { flex: l },
|
|
25
24
|
...m !== void 0 && { width: m },
|
|
26
|
-
...
|
|
25
|
+
...f !== void 0 && { order: f }
|
|
27
26
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ c(a, { ref: r, className: u("ui-flex-item", i), style: v, ...d, children: s });
|
|
29
28
|
}
|
|
30
29
|
);
|
|
31
|
-
|
|
32
|
-
n.propTypes = {
|
|
33
|
-
grow: e.oneOfType([e.bool, e.number]),
|
|
34
|
-
shrink: e.oneOfType([e.bool, e.number]),
|
|
35
|
-
basis: e.oneOfType([e.string, e.number]),
|
|
36
|
-
flex: e.oneOfType([e.string, e.number]),
|
|
37
|
-
width: e.oneOfType([e.string, e.number]),
|
|
38
|
-
order: e.number,
|
|
39
|
-
as: e.elementType,
|
|
40
|
-
children: e.node,
|
|
41
|
-
className: e.string,
|
|
42
|
-
style: e.object,
|
|
43
|
-
id: e.string
|
|
44
|
-
};
|
|
30
|
+
y.displayName = "Flex.Item";
|
|
45
31
|
export {
|
|
46
|
-
|
|
32
|
+
y as FlexItem
|
|
47
33
|
};
|