@workokay/atom 0.2.33 → 0.2.35

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/index.js CHANGED
@@ -12890,7 +12890,16 @@ const Oa = te(
12890
12890
  }
12891
12891
  }, [l, r, t, a, s, d, o]), y = g.useCallback(
12892
12892
  (C) => {
12893
- l || (C.key === "ArrowUp" ? (C.preventDefault(), b()) : C.key === "ArrowDown" && (C.preventDefault(), p()), f.onKeyDown?.(C));
12893
+ if (!l) {
12894
+ if (C.key === "ArrowUp") {
12895
+ C.preventDefault(), b();
12896
+ return;
12897
+ } else if (C.key === "ArrowDown") {
12898
+ C.preventDefault(), p();
12899
+ return;
12900
+ }
12901
+ f.onKeyDown?.(C);
12902
+ }
12894
12903
  },
12895
12904
  [l, b, p, f]
12896
12905
  ), v = g.useCallback(
@@ -19237,18 +19246,18 @@ const rE = te(
19237
19246
  "rounded-full transition-colors",
19238
19247
  "focus-visible:outline-none focus-visible:ring-2",
19239
19248
  "focus-visible:ring-[var(--atom-ring-color)]",
19240
- "disabled:cursor-not-allowed disabled:opacity-50"
19249
+ "disabled:cursor-not-allowed disabled:opacity-50border border-[var(--atom-theme-border-primary)] duration-300 ease-in-out focus-visible:ring-[var(--atom-ring-color)] focus-visible:ring-offset-2focus-visible:ring-offset-[var(--atom-ring-offset)] overflow-visible "
19241
19250
  ].join(" "),
19242
19251
  {
19243
19252
  variants: {
19244
19253
  variant: {
19245
- default: "bg-[color-mix(in_srgb,var(--atom-border)_40%,transparent)] data-[state=checked]:bg-[var(--atom-primary)]",
19254
+ default: "bg-[color-mix(in_srgb,var(--atom-border)_40%,transparent)] data-[state=checked]:bg-[var(--atom-primary)] ",
19246
19255
  theme: "bg-[color-mix(in_srgb,var(--atom-border)_35%,transparent)] data-[state=checked]:bg-[var(--atom-primary)]"
19247
19256
  },
19248
19257
  size: {
19249
- sm: "h-5 w-9",
19250
- md: "h-6 w-11",
19251
- lg: "h-7 w-14"
19258
+ sm: "h-5 w-8 p-0.5",
19259
+ md: "h-6 w-11 p-1",
19260
+ lg: "h-7 w-14 p-1.5"
19252
19261
  },
19253
19262
  fullWidth: {
19254
19263
  true: "w-full",
@@ -19262,9 +19271,9 @@ const rE = te(
19262
19271
  }
19263
19272
  }
19264
19273
  ), oE = {
19265
- sm: { size: "h-4 w-4", translateX: 16 },
19266
- md: { size: "h-5 w-5", translateX: 20 },
19267
- lg: { size: "h-6 w-6", translateX: 28 }
19274
+ sm: { size: "h-3 w-3", translateX: 14 },
19275
+ md: { size: "h-4 w-4", translateX: 20 },
19276
+ lg: { size: "h-5 w-5", translateX: 26 }
19268
19277
  }, sE = kt(nE), iE = ({ size: e = 12 }) => /* @__PURE__ */ h.jsxs("svg", { width: e, height: e, viewBox: "0 0 24 24", fill: "none", children: [
19269
19278
  /* @__PURE__ */ h.jsx("circle", { cx: "12", cy: "12", r: "4", fill: "white" }),
19270
19279
  /* @__PURE__ */ h.jsx(
@@ -19306,6 +19315,10 @@ const rE = te(
19306
19315
  initial: { opacity: 0, scale: 0.4 },
19307
19316
  animate: { opacity: 1, scale: 1 },
19308
19317
  exit: { opacity: 0, scale: 0 },
19318
+ transition: {
19319
+ duration: 0.4,
19320
+ ease: "easeOut"
19321
+ },
19309
19322
  children: /* @__PURE__ */ h.jsx(aE, { size: b })
19310
19323
  },
19311
19324
  "moon"
@@ -19316,6 +19329,12 @@ const rE = te(
19316
19329
  className: "absolute right-3 top-1 text-white/60",
19317
19330
  initial: { opacity: 0 },
19318
19331
  animate: { opacity: 1 },
19332
+ exit: { opacity: 0, scale: 0 },
19333
+ transition: {
19334
+ duration: 0.3,
19335
+ delay: 0.1,
19336
+ ease: "easeOut"
19337
+ },
19319
19338
  children: /* @__PURE__ */ h.jsx(cE, {})
19320
19339
  },
19321
19340
  "star"
@@ -19327,6 +19346,10 @@ const rE = te(
19327
19346
  initial: { opacity: 0, scale: 0.4, rotate: -180 },
19328
19347
  animate: { opacity: 1, scale: 1, rotate: 0 },
19329
19348
  exit: { opacity: 0, scale: 0, rotate: 180 },
19349
+ transition: {
19350
+ duration: 0.4,
19351
+ ease: "easeOut"
19352
+ },
19330
19353
  children: /* @__PURE__ */ h.jsx(iE, { size: b })
19331
19354
  },
19332
19355
  "sun"
@@ -19337,14 +19360,28 @@ const rE = te(
19337
19360
  "data-slot": "switch-thumb",
19338
19361
  className: M(
19339
19362
  m.size,
19340
- "block rounded-full bg-[var(--atom-bg)] shadow-md"
19363
+ "block rounded-full bg-white relative z-10 "
19341
19364
  ),
19342
19365
  animate: {
19343
19366
  x: c ? m.translateX : 0,
19344
- scaleX: u ? [1, 1.25, 1] : 1,
19367
+ scaleX: u ? [1, 1.3, 1] : 1,
19345
19368
  scaleY: u ? [1, 0.9, 1] : 1
19346
19369
  },
19347
- transition: { type: "spring", stiffness: 500, damping: 30 }
19370
+ transition: {
19371
+ x: {
19372
+ type: "spring",
19373
+ stiffness: 500,
19374
+ damping: 30
19375
+ },
19376
+ scaleX: {
19377
+ duration: 0.3,
19378
+ ease: "easeInOut"
19379
+ },
19380
+ scaleY: {
19381
+ duration: 0.3,
19382
+ ease: "easeInOut"
19383
+ }
19384
+ }
19348
19385
  }
19349
19386
  )
19350
19387
  ]
@@ -19380,6 +19417,7 @@ export {
19380
19417
  gE as DialogTrigger,
19381
19418
  ux as Drawer,
19382
19419
  hx as DrawerBody,
19420
+ gx as DrawerClose,
19383
19421
  mx as DrawerDescription,
19384
19422
  px as DrawerFooter,
19385
19423
  dx as DrawerHeader,