@clicktap/ui 0.4.0 → 0.5.0

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.
@@ -1,3 +1,3 @@
1
- import { SeparatorProps } from 'react-aria';
2
- export declare function Divider(props: SeparatorProps): import("react/jsx-runtime").JSX.Element;
1
+ import { DividerProps } from './types';
2
+ export declare function Divider(props: DividerProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default Divider;
@@ -1,6 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { SeparatorProps } from 'react-aria';
3
- export declare const Root: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
4
- orientation: SeparatorProps['orientation'];
5
- }>>;
2
+ export declare const Root: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
6
3
  export default Root;
@@ -0,0 +1,4 @@
1
+ import { SeparatorProps } from 'react-aria';
2
+ export type DividerProps = SeparatorProps & {
3
+ className?: string;
4
+ };
package/index.js CHANGED
@@ -612,11 +612,17 @@ Check the top-level render call using <`+I+">.")}return $}function Qn(l,$){if(!(
612
612
  color: ${({theme:e})=>{var t,r;return((r=(t=e==null?void 0:e.colors)==null?void 0:t.slate)==null?void 0:r[500])??f.colors.slate[500]}};
613
613
  font-size: 0.8rem;
614
614
  `;function ki({label:e,description:t,errorMessage:r,...o}){return y.jsxs(U0,{...o,children:[y.jsx(Y0,{children:e}),y.jsx(W0,{children:n=>y.jsx(G0,{segment:n})}),y.jsx(q0,{slot:"description",children:t}),y.jsx(X0,{children:r})]})}ki.defaultProps={label:void 0,description:void 0,errorMessage:void 0};const Z0=S.styled.div`
615
- width: ${({orientation:e})=>e==="vertical"?"1px":"100%"};
616
- height: ${({orientation:e})=>e==="vertical"?"auto":"1px"};
617
- margin: ${({orientation:e})=>e==="vertical"?"0 1rem":"1rem 0"};
615
+ width: 100%;
616
+ height: 1px;
617
+ margin: 1rem 0;
618
618
  background: ${({theme:e})=>{var t,r;return((r=(t=e==null?void 0:e.colors)==null?void 0:t.slate)==null?void 0:r[200])??f.colors.slate[200]}};
619
- `;function J0(e){const{orientation:t}=e,{separatorProps:r}=nc.useSeparator(e);return y.jsx(Z0,{...r,orientation:t})}const at=S.styled(W.Input)`
619
+
620
+ &[aria-orientation='vertical'] {
621
+ width: 1px;
622
+ height: 100%;
623
+ margin: 0 1rem;
624
+ }
625
+ `;function J0(e){const{separatorProps:t}=nc.useSeparator(e),r={...e,...t};return y.jsx(Z0,{...r})}const at=S.styled(W.Input)`
620
626
  border: 1px solid
621
627
  ${({theme:e})=>{var t,r;return((r=(t=e==null?void 0:e.colors)==null?void 0:t.slate)==null?void 0:r[300])??f.colors.slate[300]}};
622
628
  font-size: 0.9rem;
package/index.mjs CHANGED
@@ -11926,17 +11926,23 @@ Dp.defaultProps = {
11926
11926
  errorMessage: void 0
11927
11927
  };
11928
11928
  const Np = _.div`
11929
- width: ${({ orientation: e }) => e === "vertical" ? "1px" : "100%"};
11930
- height: ${({ orientation: e }) => e === "vertical" ? "auto" : "1px"};
11931
- margin: ${({ orientation: e }) => e === "vertical" ? "0 1rem" : "1rem 0"};
11929
+ width: 100%;
11930
+ height: 1px;
11931
+ margin: 1rem 0;
11932
11932
  background: ${({ theme: e }) => {
11933
11933
  var t, r;
11934
11934
  return ((r = (t = e == null ? void 0 : e.colors) == null ? void 0 : t.slate) == null ? void 0 : r[200]) ?? u.colors.slate[200];
11935
11935
  }};
11936
+
11937
+ &[aria-orientation='vertical'] {
11938
+ width: 1px;
11939
+ height: 100%;
11940
+ margin: 0 1rem;
11941
+ }
11936
11942
  `;
11937
11943
  function p1(e) {
11938
- const { orientation: t } = e, { separatorProps: r } = od(e);
11939
- return /* @__PURE__ */ h(Np, { ...r, orientation: t });
11944
+ const { separatorProps: t } = od(e), r = { ...e, ...t };
11945
+ return /* @__PURE__ */ h(Np, { ...r });
11940
11946
  }
11941
11947
  const vt = _(go)`
11942
11948
  border: 1px solid
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",