@clicktap/ui 0.3.6 → 0.3.7

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,7 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SwitchProps as AriaSwitchProps } from 'react-aria-components';
3
- interface SwitchProps extends Omit<AriaSwitchProps, 'children'> {
4
- children: React.ReactNode;
5
- }
6
- export declare function Switch({ children, ...props }: SwitchProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Switch({ children, ...props }: AriaSwitchProps): import("react/jsx-runtime").JSX.Element;
7
3
  export default Switch;
package/index.js CHANGED
@@ -1474,7 +1474,7 @@ Check the top-level render call using <`+P+">.")}return y}function yn(l,y){if(!(
1474
1474
  }
1475
1475
  }
1476
1476
  }
1477
- `;function D0({children:e,...t}){return g.jsxs(K0,{...t,children:[g.jsx(He,{}),e]})}const N0=S.styled(W.Tabs)`
1477
+ `;function D0({children:e,...t}){return g.jsx(K0,{...t,children:r=>g.jsxs(g.Fragment,{children:[g.jsx(He,{className:"switch-indicator"}),typeof e=="function"?e({defaultChildren:void 0,...r}):e]})})}const N0=S.styled(W.Tabs)`
1478
1478
  width: 100%;
1479
1479
  display: flex;
1480
1480
  flex-direction: column;
package/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { jsxs as ee, jsx as y, Fragment as at } from "react/jsx-runtime";
1
+ import { jsxs as ee, jsx as y, Fragment as ot } from "react/jsx-runtime";
2
2
  import * as Pr from "react";
3
3
  import se, { useRef as Y, useImperativeHandle as Ya, useCallback as q, useContext as Ae, useState as ge, useEffect as ie, createContext as pt, useMemo as ue, useLayoutEffect as Xa, forwardRef as we, cloneElement as Zt, useId as Wt, Fragment as Tr, Children as ft, isValidElement as Gt, createElement as te, useReducer as xl } from "react";
4
4
  import { styled as _, css as _e, keyframes as Me, createGlobalStyle as qa } from "styled-components";
5
5
  import { useWillChange as Cl, LazyMotion as $o, domAnimation as ho, m as mo, AnimatePresence as qo, LayoutGroup as Sl, motion as Rt } from "framer-motion";
6
6
  import Za, { flushSync as Zo } from "react-dom";
7
- import { Breadcrumbs as El, Breadcrumb as Ja, Link as Fr, Button as Qa, Checkbox as Pl, Provider as Tl, Popover as ei, Menu as kl, DateField as Il, DateInput as ti, DateSegment as ri, Label as ot, FieldError as Jt, Text as Qt, Input as zr, TextField as Br, Meter as Ml, Modal as Ol, ModalOverlay as Al, Dialog as oi, NumberField as Rl, Group as ni, ProgressBar as ai, ComboBox as _l, ListBoxItem as Kl, ListBox as Ll, Slider as Dl, SliderOutput as Nl, SliderThumb as Fl, SliderTrack as zl, Switch as Bl, Tabs as jl, TabList as Vl, Tab as Hl, TabPanel as Ul, TimeField as Wl, ToggleButton as Gl } from "react-aria-components";
7
+ import { Breadcrumbs as El, Breadcrumb as Ja, Link as Fr, Button as Qa, Checkbox as Pl, Provider as Tl, Popover as ei, Menu as kl, DateField as Il, DateInput as ti, DateSegment as ri, Label as nt, FieldError as Jt, Text as Qt, Input as zr, TextField as Br, Meter as Ml, Modal as Ol, ModalOverlay as Al, Dialog as oi, NumberField as Rl, Group as ni, ProgressBar as ai, ComboBox as _l, ListBoxItem as Kl, ListBox as Ll, Slider as Dl, SliderOutput as Nl, SliderThumb as Fl, SliderTrack as zl, Switch as Bl, Tabs as jl, TabList as Vl, Tab as Hl, TabPanel as Ul, TimeField as Wl, ToggleButton as Gl } from "react-aria-components";
8
8
  import { useSeparator as Yl } from "react-aria";
9
9
  var Xl = () => /* @__PURE__ */ ee(
10
10
  "svg",
@@ -2119,7 +2119,7 @@ function ce(e) {
2119
2119
  function zt() {
2120
2120
  return !0;
2121
2121
  }
2122
- function nt(e) {
2122
+ function at(e) {
2123
2123
  return zc.test(e);
2124
2124
  }
2125
2125
  function Gc(e) {
@@ -2179,10 +2179,10 @@ function So() {
2179
2179
  theme: {
2180
2180
  colors: [zt],
2181
2181
  spacing: [Ve],
2182
- blur: ["none", "", nt, ce],
2182
+ blur: ["none", "", at, ce],
2183
2183
  brightness: h(),
2184
2184
  borderColor: [e],
2185
- borderRadius: ["none", "", "full", nt, ce],
2185
+ borderRadius: ["none", "", "full", at, ce],
2186
2186
  borderSpacing: T(),
2187
2187
  borderWidth: m(),
2188
2188
  contrast: h(),
@@ -2222,7 +2222,7 @@ function So() {
2222
2222
  * @see https://tailwindcss.com/docs/columns
2223
2223
  */
2224
2224
  columns: [{
2225
- columns: [nt]
2225
+ columns: [at]
2226
2226
  }],
2227
2227
  /**
2228
2228
  * Break After
@@ -2806,8 +2806,8 @@ function So() {
2806
2806
  */
2807
2807
  "max-w": [{
2808
2808
  "max-w": ["0", "none", "full", "min", "max", "fit", "prose", {
2809
- screen: [nt]
2810
- }, nt, ce]
2809
+ screen: [at]
2810
+ }, at, ce]
2811
2811
  }],
2812
2812
  /**
2813
2813
  * Height
@@ -2836,7 +2836,7 @@ function So() {
2836
2836
  * @see https://tailwindcss.com/docs/font-size
2837
2837
  */
2838
2838
  "font-size": [{
2839
- text: ["base", nt, Co]
2839
+ text: ["base", at, Co]
2840
2840
  }],
2841
2841
  /**
2842
2842
  * Font Smoothing
@@ -3517,7 +3517,7 @@ function So() {
3517
3517
  * @see https://tailwindcss.com/docs/box-shadow
3518
3518
  */
3519
3519
  shadow: [{
3520
- shadow: ["", "inner", "none", nt, Gc]
3520
+ shadow: ["", "inner", "none", at, Gc]
3521
3521
  }],
3522
3522
  /**
3523
3523
  * Box Shadow Color
@@ -3582,7 +3582,7 @@ function So() {
3582
3582
  * @see https://tailwindcss.com/docs/drop-shadow
3583
3583
  */
3584
3584
  "drop-shadow": [{
3585
- "drop-shadow": ["", "none", nt, ce]
3585
+ "drop-shadow": ["", "none", at, ce]
3586
3586
  }],
3587
3587
  /**
3588
3588
  * Grayscale
@@ -10730,7 +10730,7 @@ const Fe = _.div`
10730
10730
  function kb({ children: e, ...t }) {
10731
10731
  return (
10732
10732
  // eslint-disable-next-line react/jsx-props-no-spreading
10733
- /* @__PURE__ */ y(Uf, { ...t, children: ({ isIndeterminate: r }) => /* @__PURE__ */ ee(at, { children: [
10733
+ /* @__PURE__ */ y(Uf, { ...t, children: ({ isIndeterminate: r }) => /* @__PURE__ */ ee(ot, { children: [
10734
10734
  /* @__PURE__ */ y(Fe, { children: /* @__PURE__ */ y(Sr, { viewBox: "0 0 18 18", "aria-hidden": "true", children: r ? /* @__PURE__ */ y("rect", { x: 1, y: 7.5, width: 15, height: 3 }) : /* @__PURE__ */ y("polyline", { points: "1 9 7 14 15 4" }) }) }),
10735
10735
  e
10736
10736
  ] }) })
@@ -11047,7 +11047,7 @@ const Jf = _(Il)`
11047
11047
  }};
11048
11048
  }
11049
11049
  }
11050
- `, t0 = _(ot)`
11050
+ `, t0 = _(nt)`
11051
11051
  display: flex;
11052
11052
  font-size: 0.8rem;
11053
11053
  color: ${({ theme: e }) => {
@@ -11204,7 +11204,7 @@ const dt = _(zr)`
11204
11204
  return ((r = (t = e == null ? void 0 : e.colors) == null ? void 0 : t.slate) == null ? void 0 : r[400]) ?? d.colors.slate[400];
11205
11205
  }};
11206
11206
  }
11207
- `, ts = _(ot)`
11207
+ `, ts = _(nt)`
11208
11208
  display: flex;
11209
11209
  font-size: 0.8rem;
11210
11210
  color: ${({ theme: e }) => {
@@ -11286,7 +11286,7 @@ const c0 = _(Ml)`
11286
11286
  display: flex;
11287
11287
  justify-content: space-between;
11288
11288
  gap: 1rem;
11289
- `, u0 = _(ot)`
11289
+ `, u0 = _(nt)`
11290
11290
  font-size: 0.875rem;
11291
11291
  `, f0 = _.span`
11292
11292
  font-size: 0.875rem;
@@ -11325,7 +11325,7 @@ function _b({
11325
11325
  maxValue: n,
11326
11326
  formatOptions: a,
11327
11327
  ...i,
11328
- children: ({ percentage: s, valueText: c }) => /* @__PURE__ */ ee(at, { children: [
11328
+ children: ({ percentage: s, valueText: c }) => /* @__PURE__ */ ee(ot, { children: [
11329
11329
  (e || t) && /* @__PURE__ */ ee(d0, { children: [
11330
11330
  e && /* @__PURE__ */ y(u0, { children: e }),
11331
11331
  t && /* @__PURE__ */ y(f0, { children: c })
@@ -11436,7 +11436,7 @@ const Na = Me`
11436
11436
  }
11437
11437
  `;
11438
11438
  function Db(e) {
11439
- return /* @__PURE__ */ ee(at, { children: [
11439
+ return /* @__PURE__ */ ee(ot, { children: [
11440
11440
  /* @__PURE__ */ y(y0, {}),
11441
11441
  /* @__PURE__ */ y(
11442
11442
  Fo,
@@ -11525,7 +11525,7 @@ const $0 = Me`
11525
11525
  }
11526
11526
  `;
11527
11527
  function C0({ direction: e, ...t }) {
11528
- return /* @__PURE__ */ ee(at, { children: [
11528
+ return /* @__PURE__ */ ee(ot, { children: [
11529
11529
  /* @__PURE__ */ y(x0, {}),
11530
11530
  /* @__PURE__ */ y(
11531
11531
  zo,
@@ -11851,7 +11851,7 @@ const I0 = _(ni)`
11851
11851
  return ((r = (t = e == null ? void 0 : e.colors) == null ? void 0 : t.slate) == null ? void 0 : r[400]) ?? d.colors.slate[400];
11852
11852
  }};
11853
11853
  }
11854
- `, O0 = _(ot)`
11854
+ `, O0 = _(nt)`
11855
11855
  display: flex;
11856
11856
  flex: 1 0 100%;
11857
11857
  font-size: 0.8rem;
@@ -12063,7 +12063,7 @@ const D0 = _(ai)`
12063
12063
  display: flex;
12064
12064
  flex-direction: column;
12065
12065
  align-items: center;
12066
- `, F0 = _(ot)`
12066
+ `, F0 = _(nt)`
12067
12067
  font-size: 0.875rem;
12068
12068
  `, z0 = _.circle`
12069
12069
  stroke: ${({ theme: e }) => {
@@ -12137,7 +12137,7 @@ const V0 = _(ai)`
12137
12137
  justify-content: space-between;
12138
12138
  gap: 0.5rem;
12139
12139
  margin-bottom: 0.3rem;
12140
- `, U0 = _(ot)`
12140
+ `, U0 = _(nt)`
12141
12141
  font-size: 0.875rem;
12142
12142
  `, W0 = _.span`
12143
12143
  font-size: 0.875rem;
@@ -12181,7 +12181,7 @@ function Fb({
12181
12181
  }) {
12182
12182
  return (
12183
12183
  // eslint-disable-next-line react/jsx-props-no-spreading
12184
- /* @__PURE__ */ y(V0, { ...n, width: o, children: ({ percentage: a, valueText: i }) => /* @__PURE__ */ ee(at, { children: [
12184
+ /* @__PURE__ */ y(V0, { ...n, width: o, children: ({ percentage: a, valueText: i }) => /* @__PURE__ */ ee(ot, { children: [
12185
12185
  /* @__PURE__ */ ee(H0, { children: [
12186
12186
  /* @__PURE__ */ y(U0, { children: e }),
12187
12187
  r && /* @__PURE__ */ y(W0, { children: i })
@@ -12350,7 +12350,7 @@ const X0 = _(_l)`
12350
12350
  right: 0;
12351
12351
  border: none;
12352
12352
  background: none;
12353
- `, rp = _(ot)`
12353
+ `, rp = _(nt)`
12354
12354
  display: flex;
12355
12355
  font-size: 0.8rem;
12356
12356
  color: ${({ theme: e }) => {
@@ -12614,7 +12614,7 @@ function gp({
12614
12614
  },
12615
12615
  isDisabled: c.isDisabled || i,
12616
12616
  ...c,
12617
- children: (g) => /* @__PURE__ */ ee(at, { children: [
12617
+ children: (g) => /* @__PURE__ */ ee(ot, { children: [
12618
12618
  /* @__PURE__ */ y(rp, { children: e }),
12619
12619
  /* @__PURE__ */ ee(q0, { children: [
12620
12620
  /* @__PURE__ */ y(
@@ -12720,7 +12720,7 @@ const bp = _(Dl)`
12720
12720
  height: 100%;
12721
12721
  width: 2rem;
12722
12722
  }
12723
- `, vp = _(ot)`
12723
+ `, vp = _(nt)`
12724
12724
  display: flex;
12725
12725
  flex: 1 1 0;
12726
12726
  font-size: 0.8rem;
@@ -12952,12 +12952,18 @@ const Qe = _.div`
12952
12952
  }
12953
12953
  `;
12954
12954
  function jb({ children: e, ...t }) {
12955
- return (
12956
- // eslint-disable-next-line react/jsx-props-no-spreading
12957
- /* @__PURE__ */ ee(mp, { ...t, children: [
12958
- /* @__PURE__ */ y(Qe, {}),
12959
- e
12960
- ] })
12955
+ return /* @__PURE__ */ y(
12956
+ mp,
12957
+ {
12958
+ ...t,
12959
+ children: (r) => /* @__PURE__ */ ee(ot, { children: [
12960
+ /* @__PURE__ */ y(Qe, { className: "switch-indicator" }),
12961
+ typeof e == "function" ? e({
12962
+ defaultChildren: void 0,
12963
+ ...r
12964
+ }) : e
12965
+ ] })
12966
+ }
12961
12967
  );
12962
12968
  }
12963
12969
  const wp = _(jl)`
@@ -13175,7 +13181,7 @@ function Hb({ variant: e = "base", ...t }) {
13175
13181
  const r = Ae(vn);
13176
13182
  return (
13177
13183
  // eslint-disable-next-line react/jsx-props-no-spreading
13178
- /* @__PURE__ */ y(ns, { orientation: r, variant: e, ...t, children: ({ isSelected: o, isFocusVisible: n }) => /* @__PURE__ */ ee(at, { children: [
13184
+ /* @__PURE__ */ y(ns, { orientation: r, variant: e, ...t, children: ({ isSelected: o, isFocusVisible: n }) => /* @__PURE__ */ ee(ot, { children: [
13179
13185
  t.children,
13180
13186
  (n || o) && /* @__PURE__ */ y(
13181
13187
  Cp,
@@ -13389,7 +13395,7 @@ const Ep = _(Wl)`
13389
13395
  }};
13390
13396
  }
13391
13397
  }
13392
- `, kp = _(ot)`
13398
+ `, kp = _(nt)`
13393
13399
  display: flex;
13394
13400
  font-size: 0.8rem;
13395
13401
  color: ${({ theme: e }) => {
@@ -13897,7 +13903,7 @@ var as = mt((e, t) => {
13897
13903
  children: /* @__PURE__ */ y(r, { ...w(), children: n })
13898
13904
  }
13899
13905
  ) }) });
13900
- return /* @__PURE__ */ ee(at, { children: [
13906
+ return /* @__PURE__ */ ee(ot, { children: [
13901
13907
  g,
13902
13908
  c && a ? /* @__PURE__ */ y(Ma, { portalContainer: i, children: /* @__PURE__ */ y("div", { ref: $, id: x, style: E, ...I, children: /* @__PURE__ */ y(r, { ...w(), children: n }) }) }) : /* @__PURE__ */ y(qo, { children: a ? /* @__PURE__ */ y(Ma, { portalContainer: i, children: M }) : null })
13903
13909
  ] });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clicktap/ui",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "private": false,
5
5
  "author": "Clicktap",
6
6
  "description": "A library of React UI components and low-level hooks.",