@particle-academy/react-fancy 5.4.0 → 5.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.
package/dist/index.cjs CHANGED
@@ -4116,7 +4116,7 @@ var Checkbox = react.forwardRef(
4116
4116
  el.indeterminate = indeterminate ?? false;
4117
4117
  }
4118
4118
  }, [indeterminate]);
4119
- const sizeClasses7 = {
4119
+ const sizeClasses8 = {
4120
4120
  xs: "h-3.5 w-3.5",
4121
4121
  sm: "h-4 w-4",
4122
4122
  md: "h-[18px] w-[18px]",
@@ -4142,7 +4142,7 @@ var Checkbox = react.forwardRef(
4142
4142
  } : void 0,
4143
4143
  className: cn(
4144
4144
  "flex shrink-0 items-center justify-center text-zinc-700 dark:text-zinc-200",
4145
- sizeClasses7,
4145
+ sizeClasses8,
4146
4146
  interactive && "cursor-pointer rounded outline-none transition-colors hover:text-zinc-900 focus-visible:ring-2 focus-visible:ring-blue-500/40 dark:hover:text-white"
4147
4147
  ),
4148
4148
  "aria-hidden": interactive ? void 0 : "true",
@@ -4171,7 +4171,7 @@ var Checkbox = react.forwardRef(
4171
4171
  },
4172
4172
  onChange: (e) => setChecked(e.target.checked),
4173
4173
  className: cn(
4174
- sizeClasses7,
4174
+ sizeClasses8,
4175
4175
  "cursor-pointer rounded border border-zinc-300 bg-white text-blue-600 transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:ring-blue-500/40 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:border-zinc-700 dark:bg-[#1e1e24]",
4176
4176
  dirtyRingClasses(dirty),
4177
4177
  error && "border-red-500"
@@ -4229,7 +4229,7 @@ function CheckboxGroup({
4229
4229
  const next = value.includes(optionValue) ? value.filter((v) => v !== optionValue) : [...value, optionValue];
4230
4230
  setValue(next);
4231
4231
  };
4232
- const sizeClasses7 = {
4232
+ const sizeClasses8 = {
4233
4233
  xs: "h-3.5 w-3.5",
4234
4234
  sm: "h-4 w-4",
4235
4235
  md: "h-[18px] w-[18px]",
@@ -4265,7 +4265,7 @@ function CheckboxGroup({
4265
4265
  autoFocus: interactive && index === 0,
4266
4266
  onChange: () => handleToggle(resolved.value),
4267
4267
  className: cn(
4268
- sizeClasses7,
4268
+ sizeClasses8,
4269
4269
  "cursor-pointer rounded border border-zinc-300 bg-white text-blue-600 transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:ring-blue-500/40 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:border-zinc-700 dark:bg-[#1e1e24]",
4270
4270
  dirtyRingClasses(dirty),
4271
4271
  error && "border-red-500"
@@ -4332,7 +4332,7 @@ function RadioGroup({
4332
4332
  defaultValue,
4333
4333
  onValueChange
4334
4334
  );
4335
- const sizeClasses7 = {
4335
+ const sizeClasses8 = {
4336
4336
  xs: "h-3.5 w-3.5",
4337
4337
  sm: "h-4 w-4",
4338
4338
  md: "h-[18px] w-[18px]",
@@ -4371,7 +4371,7 @@ function RadioGroup({
4371
4371
  autoFocus: shouldAutoFocus,
4372
4372
  onChange: () => setValue(resolved.value),
4373
4373
  className: cn(
4374
- sizeClasses7,
4374
+ sizeClasses8,
4375
4375
  "cursor-pointer border border-zinc-300 bg-white text-blue-600 transition-[border-color,box-shadow] duration-150 focus:ring-2 focus:ring-blue-500/40 focus:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 dark:border-zinc-700 dark:bg-[#1e1e24]",
4376
4376
  dirtyRingClasses(dirty),
4377
4377
  error && "border-red-500"
@@ -6979,6 +6979,47 @@ var Eyebrow = react.forwardRef(
6979
6979
  }
6980
6980
  );
6981
6981
  Eyebrow.displayName = "Eyebrow";
6982
+ var sizeClasses7 = {
6983
+ xs: "min-w-[1.25rem] px-1 py-px text-[9px]",
6984
+ sm: "min-w-[1.4rem] px-1 py-0.5 text-[10px]",
6985
+ md: "min-w-[1.6rem] px-1.5 py-0.5 text-xs"
6986
+ };
6987
+ var capClasses = "inline-grid place-items-center rounded border border-zinc-300 bg-zinc-50 font-mono leading-none text-zinc-700 dark:border-zinc-700 dark:bg-zinc-800 dark:text-zinc-300";
6988
+ var Kbd = react.forwardRef(
6989
+ ({ keys, separator = "+", size = "sm", className, children, ...props }, ref) => {
6990
+ if (keys?.length) {
6991
+ return (
6992
+ // The chord is ONE <kbd> containing per-key caps: a screen reader
6993
+ // announces "Cmd + K" as a unit, which is what it is, rather than as
6994
+ // two unrelated keys.
6995
+ /* @__PURE__ */ jsxRuntime.jsx(
6996
+ "kbd",
6997
+ {
6998
+ ref,
6999
+ "data-react-fancy-kbd": "",
7000
+ className: cn("inline-flex items-center gap-1 font-mono not-italic", className),
7001
+ ...props,
7002
+ children: keys.map((k, i) => /* @__PURE__ */ jsxRuntime.jsxs(react.Fragment, { children: [
7003
+ i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-zinc-400 dark:text-zinc-500", children: separator }),
7004
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(capClasses, sizeClasses7[size]), children: k })
7005
+ ] }, i))
7006
+ }
7007
+ )
7008
+ );
7009
+ }
7010
+ return /* @__PURE__ */ jsxRuntime.jsx(
7011
+ "kbd",
7012
+ {
7013
+ ref,
7014
+ "data-react-fancy-kbd": "",
7015
+ className: cn(capClasses, sizeClasses7[size], "not-italic", className),
7016
+ ...props,
7017
+ children
7018
+ }
7019
+ );
7020
+ }
7021
+ );
7022
+ Kbd.displayName = "Kbd";
6982
7023
  var gapClasses2 = {
6983
7024
  sm: "gap-2",
6984
7025
  md: "gap-3",
@@ -16554,6 +16595,7 @@ exports.ImageViewer = ImageViewer;
16554
16595
  exports.Input = Input;
16555
16596
  exports.InputTag = InputTag;
16556
16597
  exports.Kanban = Kanban;
16598
+ exports.Kbd = Kbd;
16557
16599
  exports.MagicWand = MagicWand;
16558
16600
  exports.Marquee = Marquee;
16559
16601
  exports.MediaViewer = MediaViewer;