@clicktap/ui 0.5.0 → 0.7.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
1
  import { DividerProps } from './types';
2
- export declare function Divider(props: DividerProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Divider({ orientation, ...props }: DividerProps): import("react/jsx-runtime").JSX.Element;
3
3
  export default Divider;
@@ -1,3 +1,6 @@
1
1
  /// <reference types="react" />
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>>;
2
+ import { Orientation } 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: Orientation;
5
+ }>>;
3
6
  export default Root;
package/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export * from './Container/Container';
17
17
  export * from './ContextMenu/ContextMenu';
18
18
  export * from './DateInput/DateInput';
19
19
  export * from './Divider/Divider';
20
+ export * from './Divider/types';
20
21
  export * from './Input/Input';
21
22
  export * from './Link/Link';
22
23
  export * from './Meter/Meter';
package/index.js CHANGED
@@ -612,17 +612,11 @@ 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: 100%;
616
- height: 1px;
617
- margin: 1rem 0;
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"};
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
-
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)`
619
+ `;function J0({orientation:e="horizontal",...t}){const{separatorProps:r}=nc.useSeparator({...t,orientation:e}),o={...t,...r};return y.jsx(Z0,{...o,orientation:e})}const at=S.styled(W.Input)`
626
620
  border: 1px solid
627
621
  ${({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]}};
628
622
  font-size: 0.9rem;
@@ -1540,7 +1534,7 @@ Check the top-level render call using <`+I+">.")}return $}function Qn(l,$){if(!(
1540
1534
  `;default:return null}}}
1541
1535
  `,Ni=S.styled(W.Tab)`
1542
1536
  position: relative;
1543
- z-index: 3;
1537
+ z-index: 1;
1544
1538
  display: flex;
1545
1539
  align-items: center;
1546
1540
  justify-content: ${({orientation:e,variant:t})=>{switch(t){case"underline":return e==="horizontal"?"center":"flex-start";default:return"center"}}};
@@ -1554,6 +1548,8 @@ Check the top-level render call using <`+I+">.")}return $}function Qn(l,$){if(!(
1554
1548
  color: ${({variant:e,theme:t})=>{var r,o,n,a;switch(e){case"underline":case"enclosed":case"outline":return((o=(r=t==null?void 0:t.colors)==null?void 0:r.slate)==null?void 0:o[800])??f.colors.slate[800];case"solid":return((a=(n=t==null?void 0:t.colors)==null?void 0:n.slate)==null?void 0:a[400])??f.colors.slate[400];default:return null}}};
1555
1549
 
1556
1550
  &[data-selected] {
1551
+ z-index: 2;
1552
+
1557
1553
  color: ${({variant:e,theme:t})=>{var r,o,n,a;switch(e){case"underline":case"outline":return((o=(r=t==null?void 0:t.colors)==null?void 0:r.slate)==null?void 0:o[800])??f.colors.slate[800];case"solid":case"enclosed":return((a=(n=t==null?void 0:t.colors)==null?void 0:n.slate)==null?void 0:a[100])??f.colors.slate[100];default:return null}}};
1558
1554
  }
1559
1555
 
@@ -1573,7 +1569,7 @@ Check the top-level render call using <`+I+">.")}return $}function Qn(l,$){if(!(
1573
1569
  }
1574
1570
  `,mg=S.styled(me.motion.span).attrs({className:"tab-overlay"})`
1575
1571
  position: absolute;
1576
- z-index: 1;
1572
+ z-index: 0;
1577
1573
 
1578
1574
  ${({orientation:e,theme:t,variant:r})=>{var o,n,a,s,i,u,p,g,h,C,b;switch(r){case"solid":return S.css`
1579
1575
  inset: 0px;
package/index.mjs CHANGED
@@ -11926,23 +11926,20 @@ Dp.defaultProps = {
11926
11926
  errorMessage: void 0
11927
11927
  };
11928
11928
  const Np = _.div`
11929
- width: 100%;
11930
- height: 1px;
11931
- margin: 1rem 0;
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"};
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
- }
11942
11936
  `;
11943
- function p1(e) {
11944
- const { separatorProps: t } = od(e), r = { ...e, ...t };
11945
- return /* @__PURE__ */ h(Np, { ...r });
11937
+ function p1({
11938
+ orientation: e = "horizontal",
11939
+ ...t
11940
+ }) {
11941
+ const { separatorProps: r } = od({ ...t, orientation: e }), o = { ...t, ...r };
11942
+ return /* @__PURE__ */ h(Np, { ...o, orientation: e });
11946
11943
  }
11947
11944
  const vt = _(go)`
11948
11945
  border: 1px solid
@@ -13876,7 +13873,7 @@ const eb = _(Zc)`
13876
13873
  }}
13877
13874
  `, gl = _(Qc)`
13878
13875
  position: relative;
13879
- z-index: 3;
13876
+ z-index: 1;
13880
13877
  display: flex;
13881
13878
  align-items: center;
13882
13879
  justify-content: ${({ orientation: e, variant: t }) => {
@@ -13916,6 +13913,8 @@ const eb = _(Zc)`
13916
13913
  }};
13917
13914
 
13918
13915
  &[data-selected] {
13916
+ z-index: 2;
13917
+
13919
13918
  color: ${({ variant: e, theme: t }) => {
13920
13919
  var r, o, n, a;
13921
13920
  switch (e) {
@@ -13952,7 +13951,7 @@ const eb = _(Zc)`
13952
13951
  className: "tab-overlay"
13953
13952
  })`
13954
13953
  position: absolute;
13955
- z-index: 1;
13954
+ z-index: 0;
13956
13955
 
13957
13956
  ${({ orientation: e, theme: t, variant: r }) => {
13958
13957
  var o, n, a, i, s, d, f, p, $, E, g;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",