@nextlyhq/ui 0.0.2-alpha.57 → 0.0.2-alpha.58

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
@@ -187,6 +187,7 @@ __export(src_exports, {
187
187
  badgeVariants: () => badgeVariants,
188
188
  buttonVariants: () => buttonVariants,
189
189
  cardVariants: () => cardVariants,
190
+ commandDefaultFilter: () => commandDefaultFilter,
190
191
  createShortcutManager: () => createShortcutManager,
191
192
  dialogContentVariants: () => dialogContentVariants,
192
193
  inputVariants: () => inputVariants,
@@ -236,8 +237,9 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
236
237
  destructive: "bg-destructive-solid text-destructive-foreground border border-transparent hover:bg-destructive-600",
237
238
  // border-border is the decorative separator token, and it is the right
238
239
  // one here: a button is identified by its label and fill, so its edge
239
- // carries no meaning on its own and is not held to the 3:1 minimum that
240
- // border-input meets for controls identified by their boundary. It is
240
+ // carries no meaning on its own, unlike border-input, which is the
241
+ // token for controls identified by their boundary (that token is now
242
+ // below 1.4.11's 3:1 in light mode; see contrast/accepted.ts). It is
241
243
  // still used in preference to a faint primary alpha, which reads as a
242
244
  // tint of the brand colour rather than as an edge.
243
245
  outline: "border border-border text-foreground hover-unified bg-background",
@@ -294,11 +296,22 @@ var import_class_variance_authority2 = require("class-variance-authority");
294
296
  var import_react2 = require("react");
295
297
  var import_jsx_runtime2 = require("react/jsx-runtime");
296
298
  var inputVariants = (0, import_class_variance_authority2.cva)(
297
- "file:text-foreground placeholder:text-muted-foreground placeholder:opacity-50 selection:bg-primary selection:text-primary-foreground w-full min-w-0 rounded-md border border-input bg-background text-sm transition-all duration-150 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus:ring-0 focus:ring-offset-0 focus:outline-none focus:border-primary! focus-visible:border-primary! aria-invalid:border-destructive aria-invalid:focus:border-destructive! data-[invalid=true]:border-destructive data-[invalid=true]:focus:border-destructive!",
299
+ // `text-foreground` is explicit rather than inherited. Tailwind's preflight
300
+ // sets `color: inherit` on form controls, so without it the typed value takes
301
+ // whatever colour an ancestor happens to carry -- muted inside a
302
+ // `text-muted-foreground` block, red inside a `text-destructive` one. Select
303
+ // and Textarea have always pinned it; Input was the one control that did not,
304
+ // and callers were compensating by putting the token on a wrapper.
305
+ "file:text-foreground text-foreground placeholder:text-muted-foreground placeholder:opacity-50 selection:bg-primary selection:text-primary-foreground w-full min-w-0 rounded-md border border-input bg-background text-sm transition-all duration-150 outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 focus:ring-0 focus:ring-offset-0 focus:outline-none focus:border-primary! focus-visible:border-primary! aria-invalid:border-destructive aria-invalid:focus:border-destructive! data-[invalid=true]:border-destructive data-[invalid=true]:focus:border-destructive!",
298
306
  {
299
307
  variants: {
300
308
  size: {
301
- sm: "h-[var(--nx-control-height-sm)] px-2.5 py-2 text-sm",
309
+ // `-md` rather than `-sm`, so that a small input is the same height as
310
+ // a small button standing beside it in a toolbar or a filter row.
311
+ // Button's `sm` has always used this step; an input reading `-sm` made
312
+ // `size="sm"` mean 36px on one control and 32px on another, and a form
313
+ // row mixing them sat 4px out of line.
314
+ sm: "h-[var(--nx-control-height-md)] px-2.5 py-2 text-sm",
302
315
  default: "h-[var(--nx-control-height)] px-3 py-2.5 text-sm",
303
316
  lg: "h-[var(--nx-control-height-lg)] px-4 py-3 text-base"
304
317
  }
@@ -874,9 +887,12 @@ var Checkbox = (0, import_react9.forwardRef)(({ className, indeterminate, ...pro
874
887
  ref,
875
888
  "data-slot": "checkbox",
876
889
  className: cn(
877
- // Resting border uses border-input (a visible 3:1 boundary); the checked
878
- // state switches to border-primary below, keeping the two states distinct.
879
- "peer relative h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary transition-all duration-200",
890
+ // Resting border uses border-control-border, NOT border-input. An
891
+ // unchecked box has no label, value or focus ring to identify it -- the
892
+ // border is the whole control -- so it is held to 1.4.11's 3:1, which
893
+ // border-input deliberately no longer meets. The checked state switches
894
+ // to border-primary below, keeping the two states distinct.
895
+ "peer relative h-4 w-4 shrink-0 rounded-sm border border-control-border ring-offset-background before:absolute before:left-1/2 before:top-1/2 before:h-6 before:w-6 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary transition-all duration-200",
880
896
  className
881
897
  ),
882
898
  ...props,
@@ -916,13 +932,15 @@ var RadioGroupItem = (0, import_react10.forwardRef)(({ className, ...props }, re
916
932
  className: cn(
917
933
  // Unchecked outline uses primary/40 (clearly visible) instead of primary/5
918
934
  // (~5% opacity, effectively invisible); hover strengthens above the resting state.
919
- // Resting border uses border-input (a visible 3:1 boundary); the checked
920
- // state switches to border-primary below, keeping the two states distinct.
935
+ // Resting border uses border-control-border, NOT border-input. An
936
+ // unchecked radio is only its ring, with nothing else to identify it,
937
+ // so it is held to 1.4.11's 3:1 -- which border-input deliberately no
938
+ // longer meets. The checked state switches to border-primary below.
921
939
  // rounded-full is fixed rather than derived from --radius: the circle is
922
940
  // what tells the user only one option can be chosen. The thick checked
923
941
  // border leaves a background-coloured core, and because the border's
924
942
  // inner edge is curved too that core reads as a round dot.
925
- "peer h-4 w-4 shrink-0 rounded-full border border-input bg-background cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 hover:border-primary/70 data-[state=checked]:border-primary data-[state=checked]:border-[5px]",
943
+ "peer h-4 w-4 shrink-0 rounded-full border border-control-border bg-background cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none focus-visible:outline-none aria-invalid:border-destructive aria-invalid:focus:border-destructive! aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50 hover:border-primary/70 data-[state=checked]:border-primary data-[state=checked]:border-[5px]",
926
944
  className
927
945
  ),
928
946
  ...props,
@@ -943,7 +961,21 @@ function Switch({ className, ...props }) {
943
961
  className: cn(
944
962
  "peer inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-border transition-all outline-none focus-visible:border-primary aria-invalid:border-destructive aria-invalid:focus-visible:border-destructive! disabled:cursor-not-allowed disabled:opacity-50",
945
963
  "data-[state=checked]:bg-primary data-[state=checked]:border-primary!",
946
- "data-[state=unchecked]:bg-input data-[state=unchecked]:border-border dark:data-[state=unchecked]:bg-input/80",
964
+ // An unchecked switch is a track and a thumb and nothing else -- no
965
+ // label inside it, no value, no glyph -- so 1.4.11 applies to both the
966
+ // track against the page and the thumb against the track. `bg-input`
967
+ // cannot serve here: it is the FIELD border weight, deliberately below
968
+ // the minimum, and at that value the pill and its thumb both vanish
969
+ // into a light page. The control token is the same answer used for the
970
+ // checkbox and radio boundary, for the same reason.
971
+ // At full strength in both modes. A `/80` here read as a softening of
972
+ // the dark track and was in fact a removal of the guarantee the token
973
+ // carries: composited over the surfaces the switch renders on it
974
+ // measures 3.02 on the page, 2.94 on a card, 2.85 on a popover or the
975
+ // sidebar and 2.65 on muted, so three of the four fall under the 3:1
976
+ // this token exists to hold. Opaque, the same four are 4.23, 4.01,
977
+ // 3.79 and 3.40.
978
+ "data-[state=unchecked]:bg-control-border data-[state=unchecked]:border-control-border",
947
979
  className
948
980
  ),
949
981
  ...props,
@@ -1104,41 +1136,57 @@ AvatarFallback.displayName = "AvatarFallback";
1104
1136
 
1105
1137
  // src/components/tabs.tsx
1106
1138
  var import_react_tabs = require("@radix-ui/react-tabs");
1139
+ var import_class_variance_authority8 = require("class-variance-authority");
1107
1140
  var import_react13 = require("react");
1108
1141
  var import_jsx_runtime20 = require("react/jsx-runtime");
1109
1142
  var Tabs = import_react_tabs.Root;
1110
- var TabsList = (0, import_react13.forwardRef)(
1111
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1112
- import_react_tabs.List,
1113
- {
1114
- ref,
1115
- "data-slot": "tabs-list",
1116
- className: cn(
1117
- // Square corners: underline tabs, so the list never draws a rounded surface.
1118
- "inline-flex h-10 items-center justify-center gap-1 rounded-none p-0 text-muted-foreground",
1119
- className
1120
- ),
1121
- ...props
1122
- }
1123
- )
1143
+ var TABS_LIST_VARIANTS = {
1144
+ default: "h-10",
1145
+ ghost: "h-8 bg-transparent"
1146
+ };
1147
+ var tabsListVariants = (0, import_class_variance_authority8.cva)(
1148
+ // Square corners: underline tabs, so the list never draws a rounded surface.
1149
+ // `gap-1` and `p-0` are invariant across the variants, so they belong here —
1150
+ // repeating them in each arm gives any future adjustment two sites to change
1151
+ // and one to forget.
1152
+ "inline-flex items-center justify-center gap-1 rounded-none p-0 text-muted-foreground",
1153
+ {
1154
+ variants: { variant: TABS_LIST_VARIANTS },
1155
+ defaultVariants: { variant: "default" }
1156
+ }
1124
1157
  );
1158
+ var TabsList = (0, import_react13.forwardRef)(({ className, variant, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1159
+ import_react_tabs.List,
1160
+ {
1161
+ ref,
1162
+ "data-slot": "tabs-list",
1163
+ className: cn(tabsListVariants({ variant }), className),
1164
+ ...props
1165
+ }
1166
+ ));
1125
1167
  TabsList.displayName = import_react_tabs.List.displayName;
1126
- var TabsTrigger = (0, import_react13.forwardRef)(
1127
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1128
- import_react_tabs.Trigger,
1129
- {
1130
- ref,
1131
- "data-slot": "tabs-trigger",
1132
- className: cn(
1133
- // Square corners: the active state is a 2px bottom border that has to
1134
- // run the full width of the trigger.
1135
- "inline-flex items-center justify-center whitespace-nowrap rounded-none bg-transparent px-4 py-2 text-sm font-medium cursor-pointer transition-all duration-200 border-b-2 relative -mb-0.5 data-[state=active]:border-b-primary! data-[state=active]:text-primary data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground hover:text-primary hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
1136
- className
1137
- ),
1138
- ...props
1139
- }
1140
- )
1168
+ var TABS_TRIGGER_SIZES = {
1169
+ default: "text-sm",
1170
+ sm: "text-xs"
1171
+ };
1172
+ var tabsTriggerVariants = (0, import_class_variance_authority8.cva)(
1173
+ // Square corners: the active state is a 2px bottom border that has to run the
1174
+ // full width of the trigger.
1175
+ "inline-flex items-center justify-center whitespace-nowrap rounded-none bg-transparent px-4 py-2 font-medium cursor-pointer transition-all duration-200 border-b-2 relative -mb-0.5 data-[state=active]:border-b-primary! data-[state=active]:text-primary data-[state=inactive]:border-transparent data-[state=inactive]:text-muted-foreground hover:text-primary hover:border-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed",
1176
+ {
1177
+ variants: { size: TABS_TRIGGER_SIZES },
1178
+ defaultVariants: { size: "default" }
1179
+ }
1141
1180
  );
1181
+ var TabsTrigger = (0, import_react13.forwardRef)(({ className, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1182
+ import_react_tabs.Trigger,
1183
+ {
1184
+ ref,
1185
+ "data-slot": "tabs-trigger",
1186
+ className: cn(tabsTriggerVariants({ size }), className),
1187
+ ...props
1188
+ }
1189
+ ));
1142
1190
  TabsTrigger.displayName = import_react_tabs.Trigger.displayName;
1143
1191
  var TabsContent = (0, import_react13.forwardRef)(
1144
1192
  ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
@@ -1184,7 +1232,7 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
1184
1232
 
1185
1233
  // src/components/dialog.tsx
1186
1234
  var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
1187
- var import_class_variance_authority8 = require("class-variance-authority");
1235
+ var import_class_variance_authority9 = require("class-variance-authority");
1188
1236
  var import_lucide_react4 = require("lucide-react");
1189
1237
  var import_react14 = require("react");
1190
1238
  var import_jsx_runtime22 = require("react/jsx-runtime");
@@ -1210,7 +1258,7 @@ var DialogOverlay = (0, import_react14.forwardRef)(({ className, ...props }, ref
1210
1258
  }
1211
1259
  ));
1212
1260
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
1213
- var dialogContentVariants = (0, import_class_variance_authority8.cva)("", {
1261
+ var dialogContentVariants = (0, import_class_variance_authority9.cva)("", {
1214
1262
  variants: {
1215
1263
  size: {
1216
1264
  sm: "max-w-sm",
@@ -1567,7 +1615,7 @@ DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
1567
1615
 
1568
1616
  // src/components/select.tsx
1569
1617
  var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
1570
- var import_class_variance_authority9 = require("class-variance-authority");
1618
+ var import_class_variance_authority10 = require("class-variance-authority");
1571
1619
  var import_lucide_react6 = require("lucide-react");
1572
1620
  var import_react16 = require("react");
1573
1621
  var import_jsx_runtime25 = require("react/jsx-runtime");
@@ -1584,14 +1632,17 @@ function SelectValue({
1584
1632
  }) {
1585
1633
  return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
1586
1634
  }
1587
- var selectTriggerVariants = (0, import_class_variance_authority9.cva)(
1635
+ var selectTriggerVariants = (0, import_class_variance_authority10.cva)(
1588
1636
  // hover:border-primary (full strength) keeps the hover boundary more visible
1589
1637
  // than the resting border-input, not a fainter alpha of it.
1590
1638
  "flex w-full items-center justify-between gap-2 rounded-md border border-input bg-background px-3 text-sm text-foreground cursor-pointer transition-all duration-150 focus:border-primary! focus-visible:border-primary! focus:outline-none hover:border-primary disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-primary/5 data-[placeholder]:text-muted-foreground aria-[invalid=true]:border-destructive aria-[invalid=true]:focus:border-destructive! [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",
1591
1639
  {
1592
1640
  variants: {
1593
1641
  size: {
1594
- sm: "h-[var(--nx-control-height-sm)] text-sm",
1642
+ // `-md`, matching Button and Input: one height for one size name. A
1643
+ // select sitting beside a small button in a filter row is the case that
1644
+ // makes a 4px difference visible.
1645
+ sm: "h-[var(--nx-control-height-md)] text-sm",
1595
1646
  default: "h-[var(--nx-control-height)] text-sm",
1596
1647
  lg: "h-[var(--nx-control-height-lg)] text-base"
1597
1648
  }
@@ -1736,7 +1787,7 @@ function SelectScrollDownButton({
1736
1787
 
1737
1788
  // src/components/sheet.tsx
1738
1789
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"), 1);
1739
- var import_class_variance_authority10 = require("class-variance-authority");
1790
+ var import_class_variance_authority11 = require("class-variance-authority");
1740
1791
  var React7 = __toESM(require("react"), 1);
1741
1792
  var import_jsx_runtime26 = require("react/jsx-runtime");
1742
1793
  var Sheet = DialogPrimitive2.Root;
@@ -1762,7 +1813,7 @@ var SheetOverlay = React7.forwardRef(({ className, ...props }, ref) => /* @__PUR
1762
1813
  }
1763
1814
  ));
1764
1815
  SheetOverlay.displayName = DialogPrimitive2.Overlay.displayName;
1765
- var sheetVariants = (0, import_class_variance_authority10.cva)(
1816
+ var sheetVariants = (0, import_class_variance_authority11.cva)(
1766
1817
  "fixed z-50 gap-4 bg-background p-6 shadow-lg will-change-transform transition ease-in-out data-[state=closed]:duration-150 data-[state=open]:duration-150 data-[state=open]:animate-in data-[state=closed]:animate-out",
1767
1818
  {
1768
1819
  variants: {
@@ -1882,13 +1933,19 @@ var CommandDialogOverlay = (0, import_react17.forwardRef)(({ className, ...props
1882
1933
  }
1883
1934
  ));
1884
1935
  CommandDialogOverlay.displayName = "CommandDialogOverlay";
1885
- var CommandDialog = ({ children, ...props }) => {
1936
+ var CommandDialog = ({
1937
+ children,
1938
+ commandProps,
1939
+ contentProps,
1940
+ ...props
1941
+ }) => {
1886
1942
  const portalContainer = usePortalContainer();
1887
1943
  return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(DialogPrimitive3.Root, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(DialogPrimitive3.Portal, { container: portalContainer, children: [
1888
1944
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CommandDialogOverlay, {}),
1889
1945
  /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1890
1946
  DialogPrimitive3.Content,
1891
1947
  {
1948
+ ...contentProps,
1892
1949
  "data-slot": "command-content",
1893
1950
  className: cn(
1894
1951
  // Position
@@ -1914,7 +1971,19 @@ var CommandDialog = ({ children, ...props }) => {
1914
1971
  "data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
1915
1972
  "data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-top-[48%]"
1916
1973
  ),
1917
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Command, { className: "[&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:mb-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4", children })
1974
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1975
+ Command,
1976
+ {
1977
+ ...commandProps,
1978
+ className: cn(
1979
+ "[&_[cmdk-group-heading]]:px-3 [&_[cmdk-group-heading]]:py-2 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-semibold [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:mb-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-3 [&_[cmdk-item]]:py-2 [&_[cmdk-item]_svg]:h-4 [&_[cmdk-item]_svg]:w-4",
1980
+ // Merged rather than overridden: a caller passing `className` for its own reason
1981
+ // would otherwise silently drop every layout rule this dialog depends on.
1982
+ commandProps?.className
1983
+ ),
1984
+ children
1985
+ }
1986
+ )
1918
1987
  }
1919
1988
  )
1920
1989
  ] }) });
@@ -2052,13 +2121,14 @@ var CommandShortcut = (0, import_react17.forwardRef)(
2052
2121
  }
2053
2122
  );
2054
2123
  CommandShortcut.displayName = "CommandShortcut";
2124
+ var commandDefaultFilter = import_cmdk.defaultFilter;
2055
2125
 
2056
2126
  // src/components/spinner.tsx
2057
- var import_class_variance_authority11 = require("class-variance-authority");
2127
+ var import_class_variance_authority12 = require("class-variance-authority");
2058
2128
  var import_lucide_react8 = require("lucide-react");
2059
2129
  var import_react18 = require("react");
2060
2130
  var import_jsx_runtime28 = require("react/jsx-runtime");
2061
- var spinnerVariants = (0, import_class_variance_authority11.cva)("animate-spin motion-reduce:animate-none", {
2131
+ var spinnerVariants = (0, import_class_variance_authority12.cva)("animate-spin motion-reduce:animate-none", {
2062
2132
  variants: {
2063
2133
  size: {
2064
2134
  sm: "h-4 w-4",
@@ -3504,7 +3574,7 @@ function createShortcutManager(options = {}) {
3504
3574
  let pendingKey = null;
3505
3575
  function layerShape(bindings, options2) {
3506
3576
  const keys = bindings.map((b) => b.binding.keys).join("\0");
3507
- return `${keys}${options2.depth}${options2.blocking === true}${options2.enabled !== false}`;
3577
+ return `${keys}${options2.depth}${options2.priority ?? 0}${options2.blocking === true}${options2.enabled !== false}`;
3508
3578
  }
3509
3579
  function blocking() {
3510
3580
  return ordered().some((layer) => layer.options.blocking === true);
@@ -3523,7 +3593,7 @@ function createShortcutManager(options = {}) {
3523
3593
  }
3524
3594
  function ordered() {
3525
3595
  return [...layers].filter((layer) => layer.options.enabled !== false).sort(
3526
- (a, b) => b.options.depth - a.options.depth || b.sequence - a.sequence
3596
+ (a, b) => (b.options.priority ?? 0) - (a.options.priority ?? 0) || b.options.depth - a.options.depth || b.sequence - a.sequence
3527
3597
  );
3528
3598
  }
3529
3599
  function matchDepth(prepared, pressed) {
@@ -3974,7 +4044,8 @@ function useShortcuts(bindings, options) {
3974
4044
  name: options.name,
3975
4045
  depth,
3976
4046
  enabled: options.enabled,
3977
- blocking: options.blocking
4047
+ blocking: options.blocking,
4048
+ priority: options.priority
3978
4049
  });
3979
4050
  });
3980
4051
  }
@@ -4153,6 +4224,7 @@ function useActiveShortcuts() {
4153
4224
  badgeVariants,
4154
4225
  buttonVariants,
4155
4226
  cardVariants,
4227
+ commandDefaultFilter,
4156
4228
  createShortcutManager,
4157
4229
  dialogContentVariants,
4158
4230
  inputVariants,