@htmlos-next/ui 0.0.5 → 0.0.6

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.
@@ -3,7 +3,8 @@ interface ButtonProps {
3
3
  disabled?: boolean;
4
4
  onClick?: () => void;
5
5
  children: React.ReactNode;
6
+ style?: React.CSSProperties;
6
7
  }
7
- export declare function Button({ disabled, type, onClick, children, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Button({ disabled, type, onClick, children, style, }: ButtonProps): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=Button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAgB,EAChB,IAAgB,EAChB,OAAO,EACP,QAAQ,GACT,EAAE,WAAW,2CAUb"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAEA,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC/B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,MAAM,CAAC,EACrB,QAAgB,EAChB,IAAgB,EAChB,OAAO,EACP,QAAQ,EACR,KAAK,GACN,EAAE,WAAW,2CAWb"}
@@ -7,4 +7,4 @@
7
7
  ${y.contextMenu}
8
8
  ${t?y.contextMenuOpen:""}
9
9
  ${a?y.contextMenuMobile:""}
10
- `,style:x,children:c})}const Dt="_listItem_7ga7e_1",At="_selected_7ga7e_23",v={listItem:Dt,selected:At};function wt({onClick:t,onContextMenu:e,selected:o=!1,children:n}){const c=i.useRef(null),a=r=>{c.current=setTimeout(()=>{e&&(r.preventDefault(),e(r))},500)},l=()=>{c.current&&clearTimeout(c.current)};return s.jsx("div",{className:`${v.listItem} ${o?v.selected:""}`,onClick:t,onContextMenu:r=>{r.preventDefault(),e&&e(r)},onTouchStart:a,onTouchEnd:l,onTouchMove:l,children:n})}function N({icon:t,size:e="default",color:o="default",className:n}){const{isMobile:c}=d(),a=e==="default"?c?24:18:e,l=o==="selected"?"var(--icon-color)":o;return o==="default"?s.jsx(t,{size:a,className:n,strokeWidth:c?2.5:2}):s.jsx(t,{size:a,color:l,className:n,strokeWidth:c?2.5:2})}const Rt="_emptyView_1synn_1",Ot={emptyView:Rt};function Vt({icon:t,label:e}){const{isMobile:o}=d(),n=o?64:48;return s.jsxs("div",{className:Ot.emptyView,children:[s.jsx(N,{icon:t,size:n,color:"var(--text-secondary)"}),s.jsx("h2",{children:e})]})}const kt="_card_zjz9h_1",qt={card:kt};function Ht({children:t}){return s.jsx("div",{className:qt.card,children:t})}const Ft="_textInput_on5q4_1",Lt={textInput:Ft},Wt=i.forwardRef(({placeholder:t,value:e,onChange:o,onFocus:n,onBlur:c,disabled:a=!1,type:l="text",className:r},p)=>s.jsx("input",{ref:p,type:l,className:`${Lt.textInput} ${r||""}`,placeholder:t,value:e,onChange:x=>o?.(x.target.value),onFocus:n,onBlur:c,disabled:a})),Kt="_selectInput_3f04b_1",Gt={selectInput:Kt},Jt=i.forwardRef(({className:t,children:e,...o},n)=>s.jsx("select",{ref:n,className:`${Gt.selectInput} ${t||""}`,...o,children:e})),Qt="_button_g5rur_1",Ut="_secondary_g5rur_27",T={button:Qt,secondary:Ut};function Xt({disabled:t=!1,type:e="primary",onClick:o,children:n}){return s.jsx("button",{className:`${T.button} ${e=="secondary"?T.secondary:""}`,onClick:o,disabled:t,children:n})}const Yt="_balloon_1jdjr_1",Zt="_balloonOpen_1jdjr_22",h={balloon:Yt,balloonOpen:Zt};function te({open:t,x:e,y:o,children:n,className:c,style:a,...l}){const r={};typeof e=="number"&&(r.left=e),typeof o=="number"&&(r.top=o);const p=[h.balloon,t?h.balloonOpen:"",c??""].filter(Boolean).join(" ");return s.jsx("div",{...l,className:p,style:{...a,...r},children:n})}exports.AppShell=B;exports.Balloon=te;exports.Button=Xt;exports.Card=Ht;exports.Content=gt;exports.ContextMenu=zt;exports.EmptyView=Vt;exports.Icon=N;exports.ListItem=wt;exports.Popup=Q;exports.PopupActions=lt;exports.PopupButton=pt;exports.PopupDescription=et;exports.PopupInput=st;exports.PopupTitle=Y;exports.SelectInput=Jt;exports.Sidebar=A;exports.SidebarButton=L;exports.SidebarItem=q;exports.SidebarTitle=O;exports.TextInput=Wt;exports.Toolbar=_t;exports.ToolbarActions=jt;exports.ToolbarButton=M;exports.ToolbarExpandSidebarButton=Mt;exports.ToolbarTitle=yt;
10
+ `,style:x,children:c})}const Dt="_listItem_7ga7e_1",At="_selected_7ga7e_23",v={listItem:Dt,selected:At};function wt({onClick:t,onContextMenu:e,selected:o=!1,children:n}){const c=i.useRef(null),a=r=>{c.current=setTimeout(()=>{e&&(r.preventDefault(),e(r))},500)},l=()=>{c.current&&clearTimeout(c.current)};return s.jsx("div",{className:`${v.listItem} ${o?v.selected:""}`,onClick:t,onContextMenu:r=>{r.preventDefault(),e&&e(r)},onTouchStart:a,onTouchEnd:l,onTouchMove:l,children:n})}function N({icon:t,size:e="default",color:o="default",className:n}){const{isMobile:c}=d(),a=e==="default"?c?24:18:e,l=o==="selected"?"var(--icon-color)":o;return o==="default"?s.jsx(t,{size:a,className:n,strokeWidth:c?2.5:2}):s.jsx(t,{size:a,color:l,className:n,strokeWidth:c?2.5:2})}const Rt="_emptyView_1synn_1",Ot={emptyView:Rt};function Vt({icon:t,label:e}){const{isMobile:o}=d(),n=o?64:48;return s.jsxs("div",{className:Ot.emptyView,children:[s.jsx(N,{icon:t,size:n,color:"var(--text-secondary)"}),s.jsx("h2",{children:e})]})}const kt="_card_zjz9h_1",qt={card:kt};function Ht({children:t}){return s.jsx("div",{className:qt.card,children:t})}const Ft="_textInput_on5q4_1",Lt={textInput:Ft},Wt=i.forwardRef(({placeholder:t,value:e,onChange:o,onFocus:n,onBlur:c,disabled:a=!1,type:l="text",className:r},p)=>s.jsx("input",{ref:p,type:l,className:`${Lt.textInput} ${r||""}`,placeholder:t,value:e,onChange:x=>o?.(x.target.value),onFocus:n,onBlur:c,disabled:a})),Kt="_selectInput_3f04b_1",Gt={selectInput:Kt},Jt=i.forwardRef(({className:t,children:e,...o},n)=>s.jsx("select",{ref:n,className:`${Gt.selectInput} ${t||""}`,...o,children:e})),Qt="_button_g5rur_1",Ut="_secondary_g5rur_27",T={button:Qt,secondary:Ut};function Xt({disabled:t=!1,type:e="primary",onClick:o,children:n,style:c}){return s.jsx("button",{className:`${T.button} ${e=="secondary"?T.secondary:""}`,onClick:o,disabled:t,style:c,children:n})}const Yt="_balloon_1jdjr_1",Zt="_balloonOpen_1jdjr_22",h={balloon:Yt,balloonOpen:Zt};function te({open:t,x:e,y:o,children:n,className:c,style:a,...l}){const r={};typeof e=="number"&&(r.left=e),typeof o=="number"&&(r.top=o);const p=[h.balloon,t?h.balloonOpen:"",c??""].filter(Boolean).join(" ");return s.jsx("div",{...l,className:p,style:{...a,...r},children:n})}exports.AppShell=B;exports.Balloon=te;exports.Button=Xt;exports.Card=Ht;exports.Content=gt;exports.ContextMenu=zt;exports.EmptyView=Vt;exports.Icon=N;exports.ListItem=wt;exports.Popup=Q;exports.PopupActions=lt;exports.PopupButton=pt;exports.PopupDescription=et;exports.PopupInput=st;exports.PopupTitle=Y;exports.SelectInput=Jt;exports.Sidebar=A;exports.SidebarButton=L;exports.SidebarItem=q;exports.SidebarTitle=O;exports.TextInput=Wt;exports.Toolbar=_t;exports.ToolbarActions=jt;exports.ToolbarButton=M;exports.ToolbarExpandSidebarButton=Mt;exports.ToolbarTitle=yt;
package/dist/htmlos-ui.js CHANGED
@@ -408,7 +408,8 @@ function ae({
408
408
  disabled: t = !1,
409
409
  type: e = "primary",
410
410
  onClick: o,
411
- children: n
411
+ children: n,
412
+ style: r
412
413
  }) {
413
414
  return /* @__PURE__ */ s(
414
415
  "button",
@@ -416,6 +417,7 @@ function ae({
416
417
  className: `${I.button} ${e == "secondary" ? I.secondary : ""}`,
417
418
  onClick: o,
418
419
  disabled: t,
420
+ style: r,
419
421
  children: n
420
422
  }
421
423
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlos-next/ui",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "main": "./dist/htmlos-ui.cjs",
6
6
  "module": "./dist/htmlos-ui.js",