@appica/ui-react 1.2.0 → 1.3.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.
Files changed (116) hide show
  1. package/CHANGELOG.md +37 -15
  2. package/appica.css +1 -1
  3. package/dist/components/alert-dialog/alert-dialog.js +1 -1
  4. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  5. package/dist/components/autocomplete/autocomplete.js +2 -2
  6. package/dist/components/autocomplete/autocomplete.js.map +1 -1
  7. package/dist/components/badge/badge.js +1 -1
  8. package/dist/components/badge/badge.js.map +1 -1
  9. package/dist/components/breadcrumb/breadcrumb.js +1 -1
  10. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  11. package/dist/components/button/button-variants.js +1 -1
  12. package/dist/components/button/button-variants.js.map +1 -1
  13. package/dist/components/calendar/calendar.js +1 -1
  14. package/dist/components/calendar/calendar.js.map +1 -1
  15. package/dist/components/carousel/carousel.d.ts +0 -8
  16. package/dist/components/carousel/carousel.d.ts.map +1 -1
  17. package/dist/components/carousel/carousel.js +2 -1
  18. package/dist/components/carousel/carousel.js.map +1 -1
  19. package/dist/components/color-area/color-area.d.ts.map +1 -1
  20. package/dist/components/color-area/color-area.js +1 -0
  21. package/dist/components/color-area/color-area.js.map +1 -1
  22. package/dist/components/color-slider/color-slider.d.ts.map +1 -1
  23. package/dist/components/color-slider/color-slider.js +1 -0
  24. package/dist/components/color-slider/color-slider.js.map +1 -1
  25. package/dist/components/color-swatch-picker/color-swatch-picker.js +1 -1
  26. package/dist/components/color-swatch-picker/color-swatch-picker.js.map +1 -1
  27. package/dist/components/combobox/combobox.d.ts +5 -4
  28. package/dist/components/combobox/combobox.d.ts.map +1 -1
  29. package/dist/components/combobox/combobox.js +4 -3
  30. package/dist/components/combobox/combobox.js.map +1 -1
  31. package/dist/components/compare-slider/compare-slider.d.ts +50 -0
  32. package/dist/components/compare-slider/compare-slider.d.ts.map +1 -0
  33. package/dist/components/compare-slider/compare-slider.js +321 -0
  34. package/dist/components/compare-slider/compare-slider.js.map +1 -0
  35. package/dist/components/context-menu/context-menu.js +1 -1
  36. package/dist/components/context-menu/context-menu.js.map +1 -1
  37. package/dist/components/dialog/dialog.js +1 -1
  38. package/dist/components/dialog/dialog.js.map +1 -1
  39. package/dist/components/dropdown-menu/dropdown-menu.d.ts +13 -2
  40. package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -1
  41. package/dist/components/dropdown-menu/dropdown-menu.js +109 -4
  42. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  43. package/dist/components/navigation/navigation-link-variants.js +1 -1
  44. package/dist/components/navigation/navigation-link-variants.js.map +1 -1
  45. package/dist/components/navigation-menu/navigation-menu.js +1 -1
  46. package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
  47. package/dist/components/popover/popover.js +1 -1
  48. package/dist/components/popover/popover.js.map +1 -1
  49. package/dist/components/preview-card/preview-card.js +1 -1
  50. package/dist/components/preview-card/preview-card.js.map +1 -1
  51. package/dist/components/select/select.js +2 -2
  52. package/dist/components/select/select.js.map +1 -1
  53. package/dist/components/slider/slider.d.ts.map +1 -1
  54. package/dist/components/slider/slider.js +2 -1
  55. package/dist/components/slider/slider.js.map +1 -1
  56. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  57. package/dist/components/sparkline/sparkline.js +1 -0
  58. package/dist/components/sparkline/sparkline.js.map +1 -1
  59. package/dist/components/tabs/tabs.js +1 -1
  60. package/dist/components/tabs/tabs.js.map +1 -1
  61. package/dist/components/thumbnail/thumbnail.d.ts +6 -1
  62. package/dist/components/thumbnail/thumbnail.d.ts.map +1 -1
  63. package/dist/components/thumbnail/thumbnail.js +2 -0
  64. package/dist/components/thumbnail/thumbnail.js.map +1 -1
  65. package/dist/components/tooltip/tooltip.js +1 -1
  66. package/dist/components/tooltip/tooltip.js.map +1 -1
  67. package/dist/hooks/use-media-query.d.ts +0 -4
  68. package/dist/hooks/use-media-query.d.ts.map +1 -1
  69. package/dist/hooks/use-media-query.js.map +1 -1
  70. package/dist/index.d.ts +1 -0
  71. package/dist/index.d.ts.map +1 -1
  72. package/dist/index.js +3 -2
  73. package/dist/index.js.map +1 -1
  74. package/dist/internal/utils.d.ts.map +1 -1
  75. package/dist/internal/utils.js +2 -1
  76. package/dist/internal/utils.js.map +1 -1
  77. package/package.json +25 -20
  78. package/src/components/alert-dialog/alert-dialog.tsx +1 -1
  79. package/src/components/autocomplete/autocomplete.tsx +2 -2
  80. package/src/components/badge/badge.tsx +1 -1
  81. package/src/components/breadcrumb/breadcrumb.tsx +1 -1
  82. package/src/components/button/button-variants.ts +1 -1
  83. package/src/components/calendar/calendar.tsx +1 -1
  84. package/src/components/carousel/carousel.test.tsx +14 -0
  85. package/src/components/carousel/carousel.tsx +2 -9
  86. package/src/components/color-area/color-area.test.tsx +5 -0
  87. package/src/components/color-area/color-area.tsx +1 -0
  88. package/src/components/color-slider/color-slider.test.tsx +5 -0
  89. package/src/components/color-slider/color-slider.tsx +1 -0
  90. package/src/components/color-swatch-picker/color-swatch-picker.tsx +1 -1
  91. package/src/components/combobox/combobox.test.tsx +33 -0
  92. package/src/components/combobox/combobox.tsx +13 -6
  93. package/src/components/compare-slider/compare-slider.test.tsx +261 -0
  94. package/src/components/compare-slider/compare-slider.tsx +397 -0
  95. package/src/components/context-menu/context-menu.tsx +1 -1
  96. package/src/components/dialog/dialog.tsx +1 -1
  97. package/src/components/dropdown-menu/dropdown-menu.test.tsx +188 -0
  98. package/src/components/dropdown-menu/dropdown-menu.tsx +129 -3
  99. package/src/components/navigation/navigation-link-variants.ts +1 -1
  100. package/src/components/navigation-menu/navigation-menu.tsx +2 -2
  101. package/src/components/popover/popover.tsx +1 -1
  102. package/src/components/preview-card/preview-card.tsx +1 -1
  103. package/src/components/select/select.tsx +2 -2
  104. package/src/components/slider/slider.test.tsx +5 -0
  105. package/src/components/slider/slider.tsx +2 -1
  106. package/src/components/sparkline/sparkline.test.tsx +16 -0
  107. package/src/components/sparkline/sparkline.tsx +1 -0
  108. package/src/components/tabs/tabs.tsx +1 -1
  109. package/src/components/thumbnail/thumbnail.test.tsx +8 -0
  110. package/src/components/thumbnail/thumbnail.tsx +7 -0
  111. package/src/components/tooltip/tooltip.tsx +1 -1
  112. package/src/hooks/use-media-query.ts +0 -4
  113. package/src/index.ts +1 -0
  114. package/src/internal/utils.test.tsx +8 -1
  115. package/src/internal/utils.ts +4 -1
  116. package/styles.css +4 -0
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,KAAK,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;AAU9C,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,UACxC,CAAC,KAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAyBtC;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,gBA3BxC,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CA8BtC;AAED,wBAAgB,cAAc,CAAC,QAAQ,UAAQ;uBAExB,CAAC,CAAC;;8BAA0C,EAAE;;;;uBAEhD,CAAC;EACrB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AAED,KAAK,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;AAU9C,wBAAgB,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,UACxC,CAAC,KAAG,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAyBtC;AAED,wBAAgB,eAAe,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,gBA3BxC,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CA8BtC;AAED,wBAAgB,cAAc,CAAC,QAAQ,UAAQ;uBAExB,CAAC,CAAC;;8BAA0C,EAAE;;;;uBAEhD,CAAC;EACrB"}
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
  import { clsx } from 'clsx';
3
- import { twMerge } from 'tailwind-merge';
3
+ import { extendTailwindMerge } from 'tailwind-merge';
4
4
  import * as React from 'react';
5
5
 
6
+ const twMerge = extendTailwindMerge({ extend: { theme: { ease: ["spring"] } } });
6
7
  function cn(...inputs) {
7
8
  return twMerge(clsx(inputs));
8
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../src/internal/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\nimport * as React from 'react'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\ntype PossibleRef<T> = React.Ref<T> | undefined\n\nfunction setRef<T>(ref: PossibleRef<T>, value: T): (() => void) | void {\n if (typeof ref === 'function') {\n return ref(value) as (() => void) | void\n } else if (ref != null) {\n ;(ref as React.RefObject<T>).current = value\n }\n}\n\nexport function composeRefs<T>(...refs: PossibleRef<T>[]) {\n return (node: T): void | (() => void) => {\n let hasCleanup = false\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node)\n if (!hasCleanup && typeof cleanup === 'function') {\n hasCleanup = true\n }\n return cleanup\n })\n\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i]\n if (typeof cleanup === 'function') {\n cleanup()\n } else {\n setRef(refs[i], null as T)\n }\n }\n }\n }\n\n return undefined\n }\n}\n\nexport function useComposedRefs<T>(...refs: PossibleRef<T>[]) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs)\n}\n\nexport function focusableProps(disabled = false) {\n if (disabled) {\n return { tabIndex: -1, 'aria-disabled': true, 'data-disabled': '' } as const\n }\n return { tabIndex: 0 } as const\n}\n"],"names":[],"mappings":";;;;;AAIO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,KAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB;AAC1C,CAAA,CAAA,OAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,IAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAC,CAAA;AAC7B;AAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAAA,GAAqB,KAAA,CAAA,CAA+B;AACrE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,MAAQ,UAAA,CAAA,CAAY;AAC7B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,EAAI,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA;AAAA,CAAA,CAClB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAA,CAAA,KAAO,IAAA,CAAA,CAAM;AACrB,CAAA,CAAA,CAAA,CAAC,CAAA,CAAA,E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CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAW,KAAA,CAAA,CAAO;AAC/C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,QAAA,CAAA,CAAU;AACZ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAiB,EAAA,CAAA,CAAG;AAAA,CAAA,CACpE;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAU,CAAA,CAAA,CAAE;AACvB;;"}
1
+ {"version":3,"file":"utils.js","sources":["../../src/internal/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\nimport * as React from 'react'\n\n// Custom theme keys must be registered, or `ease-linear` would sit beside `ease-spring` instead of replacing it.\nconst twMerge = extendTailwindMerge({ extend: { theme: { ease: ['spring'] } } })\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\ntype PossibleRef<T> = React.Ref<T> | undefined\n\nfunction setRef<T>(ref: PossibleRef<T>, value: T): (() => void) | void {\n if (typeof ref === 'function') {\n return ref(value) as (() => void) | void\n } else if (ref != null) {\n ;(ref as React.RefObject<T>).current = value\n }\n}\n\nexport function composeRefs<T>(...refs: PossibleRef<T>[]) {\n return (node: T): void | (() => void) => {\n let hasCleanup = false\n const cleanups = refs.map((ref) => {\n const cleanup = setRef(ref, node)\n if (!hasCleanup && typeof cleanup === 'function') {\n hasCleanup = true\n }\n return cleanup\n })\n\n if (hasCleanup) {\n return () => {\n for (let i = 0; i < cleanups.length; i++) {\n const cleanup = cleanups[i]\n if (typeof cleanup === 'function') {\n cleanup()\n } else {\n setRef(refs[i], null as T)\n }\n }\n }\n }\n\n return undefined\n }\n}\n\nexport function useComposedRefs<T>(...refs: PossibleRef<T>[]) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return React.useCallback(composeRefs(...refs), refs)\n}\n\nexport function focusableProps(disabled = false) {\n if (disabled) {\n return { tabIndex: -1, 'aria-disabled': true, 'data-disabled': '' } as const\n }\n return { tabIndex: 0 } as const\n}\n"],"names":[],"mappings":";;;;;AAKA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,OAAA,CAAA,CAAA,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAQ,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,EAAM,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAE,CAAA,GAAK,CAAA;AAExE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,KAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAsB;AAC1C,CAAA,CAAA,OAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,IAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAC,CAAA;AAC7B;AAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS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6 @@
1
1
  {
2
2
  "name": "@appica/ui-react",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Appica UI components library for React applications",
5
5
  "license": "MIT",
6
6
  "author": "Appica UI",
@@ -163,6 +163,11 @@
163
163
  "import": "./dist/components/combobox/combobox.js",
164
164
  "default": "./dist/components/combobox/combobox.js"
165
165
  },
166
+ "./compare-slider": {
167
+ "types": "./dist/components/compare-slider/compare-slider.d.ts",
168
+ "import": "./dist/components/compare-slider/compare-slider.js",
169
+ "default": "./dist/components/compare-slider/compare-slider.js"
170
+ },
166
171
  "./context-menu": {
167
172
  "types": "./dist/components/context-menu/context-menu.d.ts",
168
173
  "import": "./dist/components/context-menu/context-menu.js",
@@ -466,21 +471,21 @@
466
471
  "CHANGELOG.md"
467
472
  ],
468
473
  "dependencies": {
469
- "@base-ui/react": "^1.8.0",
474
+ "@base-ui/react": "^1.9.0",
470
475
  "class-variance-authority": "^0.7.1",
471
476
  "clsx": "^2.1.1",
472
477
  "date-fns": "^4.4.0",
473
- "embla-carousel": "9.0.0-rc03",
474
- "embla-carousel-accessibility": "9.0.0-rc03",
475
- "embla-carousel-auto-height": "9.0.0-rc03",
476
- "embla-carousel-auto-scroll": "9.0.0-rc03",
477
- "embla-carousel-autoplay": "9.0.0-rc03",
478
- "embla-carousel-class-names": "9.0.0-rc03",
479
- "embla-carousel-fade": "9.0.0-rc03",
480
- "embla-carousel-react": "9.0.0-rc03",
478
+ "embla-carousel": "9.0.0-rc04",
479
+ "embla-carousel-accessibility": "9.0.0-rc04",
480
+ "embla-carousel-auto-height": "9.0.0-rc04",
481
+ "embla-carousel-auto-scroll": "9.0.0-rc04",
482
+ "embla-carousel-autoplay": "9.0.0-rc04",
483
+ "embla-carousel-class-names": "9.0.0-rc04",
484
+ "embla-carousel-fade": "9.0.0-rc04",
485
+ "embla-carousel-react": "9.0.0-rc04",
481
486
  "embla-carousel-wheel-gestures": "9.0.0-rc02",
482
- "motion": "^13.4.1",
483
- "react-day-picker": "^10.0.1",
487
+ "motion": "^14.1.0",
488
+ "react-day-picker": "^10.0.2",
484
489
  "tailwind-merge": "^3.7.0"
485
490
  },
486
491
  "devDependencies": {
@@ -492,20 +497,20 @@
492
497
  "@types/react": "^19.3.0",
493
498
  "@types/react-dom": "^19.3.0",
494
499
  "@typescript/native": "npm:typescript@^7.0.2",
495
- "@vitejs/plugin-react": "^6.1.1",
496
- "@vitest/coverage-v8": "^5.0.1",
497
- "axe-core": "^4.13.0",
498
- "jsdom": "^30.1.1",
499
- "postcss": "^8.5.28",
500
+ "@vitejs/plugin-react": "^6.1.2",
501
+ "@vitest/coverage-v8": "^5.0.3",
502
+ "axe-core": "^4.14.0",
503
+ "jsdom": "^30.1.2",
504
+ "postcss": "^8.5.29",
500
505
  "react": "^19.3.0",
501
506
  "react-dom": "^19.3.0",
502
- "rollup": "^4.63.4",
507
+ "rollup": "^4.64.4",
503
508
  "rollup-plugin-esbuild": "^6.2.1",
504
509
  "rollup-preserve-directives": "^1.1.3",
505
510
  "tailwindcss": "^4.3.3",
506
511
  "typescript": "npm:@typescript/typescript6@^6.0.2",
507
- "vite": "^8.3.0",
508
- "vitest": "^5.0.1",
512
+ "vite": "^8.3.4",
513
+ "vitest": "^5.0.3",
509
514
  "vitest-axe": "^0.1.0"
510
515
  },
511
516
  "peerDependencies": {
@@ -88,7 +88,7 @@ function AlertDialogContent({
88
88
  : 'bg-background border-border-overlay',
89
89
  !showFrame && 'shadow-2xl',
90
90
  'isolate transform-gpu outline-none',
91
- 'motion-safe:transition-[opacity,scale] motion-safe:duration-250 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
91
+ 'motion-safe:ease-spring motion-safe:transition-[opacity,scale] motion-safe:duration-250',
92
92
  'data-starting-style:motion-safe:scale-95 data-starting-style:motion-safe:opacity-0',
93
93
  'data-ending-style:motion-safe:scale-95 data-ending-style:motion-safe:opacity-0 data-ending-style:motion-safe:duration-100 data-ending-style:motion-safe:ease-out',
94
94
  className,
@@ -205,7 +205,7 @@ function AutocompleteContent({ className, children, ...props }: AutocompleteCont
205
205
  'w-(--anchor-width) min-w-36',
206
206
  'max-h-(--available-height) overflow-hidden',
207
207
  'origin-(--transform-origin)',
208
- 'motion-safe:transition-[opacity,scale] motion-safe:duration-200 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
208
+ 'motion-safe:ease-spring motion-safe:transition-[opacity,scale] motion-safe:duration-200',
209
209
  'data-starting-style:motion-safe:scale-90 data-starting-style:motion-safe:opacity-0',
210
210
  'data-ending-style:motion-safe:scale-95 data-ending-style:motion-safe:opacity-0 data-ending-style:motion-safe:duration-100 data-ending-style:motion-safe:ease-out',
211
211
  className,
@@ -319,7 +319,7 @@ function AutocompleteItem({ className, children, ...props }: AutocompleteItemPro
319
319
  'before:bg-background-muted before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:opacity-0',
320
320
  'active:translate-y-px active:scale-[0.98]',
321
321
  'data-highlighted:not-data-disabled:text-foreground-intense data-highlighted:not-data-disabled:before:opacity-100',
322
- 'motion-safe:transition motion-safe:duration-250 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
322
+ 'motion-safe:ease-spring motion-safe:transition motion-safe:duration-250',
323
323
  'motion-safe:active:duration-100 motion-safe:active:ease-in-out',
324
324
  'motion-safe:before:transition-opacity motion-safe:before:duration-200 motion-safe:before:ease-out',
325
325
  'data-disabled:opacity-disabled data-disabled:pointer-events-none',
@@ -18,7 +18,7 @@ const backgroundLayer = [
18
18
  ]
19
19
 
20
20
  const badgeVariants = cva(
21
- 'relative isolate inline-flex shrink-0 items-center justify-center rounded-full whitespace-nowrap outline-offset-1 select-none [&_svg]:shrink-0 [a,button]:transform-gpu [a,button]:cursor-pointer [a,button]:transition [a,button]:duration-250 [a,button]:ease-[cubic-bezier(0.175,0.885,0.32,1.5)] [a,button]:not-data-popup-open:active:translate-y-px [a,button]:not-data-popup-open:active:scale-[0.97] [a,button]:not-data-popup-open:active:duration-100 [a,button]:not-data-popup-open:active:ease-in-out motion-reduce:[a,button]:transition-none',
21
+ 'relative isolate inline-flex shrink-0 items-center justify-center rounded-full whitespace-nowrap outline-offset-1 select-none [&_svg]:shrink-0 [a,button]:transform-gpu [a,button]:cursor-pointer [a,button]:transition [a,button]:duration-250 [a,button]:ease-spring [a,button]:not-data-popup-open:active:translate-y-px [a,button]:not-data-popup-open:active:scale-[0.97] [a,button]:not-data-popup-open:active:duration-100 [a,button]:not-data-popup-open:active:ease-in-out motion-reduce:[a,button]:transition-none',
22
22
  {
23
23
  variants: {
24
24
  variant: {
@@ -80,7 +80,7 @@ function BreadcrumbLink({ className, active = false, disabled = false, render, .
80
80
  'transition duration-250 motion-reduce:transition-none',
81
81
  active
82
82
  ? 'text-foreground-intense pointer-events-none'
83
- : 'hover:text-foreground-intense ease-[cubic-bezier(0.175,0.885,0.32,1.5)] active:scale-[0.97] active:duration-100 active:ease-in-out active:translate-y-px',
83
+ : 'hover:text-foreground-intense ease-spring active:scale-[0.97] active:duration-100 active:ease-in-out active:translate-y-px',
84
84
  disabled && 'opacity-disabled pointer-events-none',
85
85
  className,
86
86
  ),
@@ -13,7 +13,7 @@ const backgroundLayer = [
13
13
  ]
14
14
 
15
15
  const buttonVariants = cva(
16
- "relative isolate inline-flex shrink-0 transform-gpu cursor-pointer items-center justify-center font-medium whitespace-nowrap outline-offset-1 transition duration-250 ease-[cubic-bezier(0.175,0.885,0.32,1.5)] select-none not-data-popup-open:active:scale-[0.97] not-data-popup-open:active:duration-100 not-data-popup-open:active:ease-in-out not-data-popup-open:active:translate-y-px data-disabled:opacity-disabled data-disabled:pointer-events-none motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='stroke-'])]:stroke-[1.85]",
16
+ "relative isolate inline-flex shrink-0 transform-gpu cursor-pointer items-center justify-center font-medium whitespace-nowrap outline-offset-1 transition duration-250 ease-spring select-none not-data-popup-open:active:scale-[0.97] not-data-popup-open:active:duration-100 not-data-popup-open:active:ease-in-out not-data-popup-open:active:translate-y-px data-disabled:opacity-disabled data-disabled:pointer-events-none motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='stroke-'])]:stroke-[1.85]",
17
17
  {
18
18
  variants: {
19
19
  variant: {
@@ -182,7 +182,7 @@ interface CalendarDayButtonProps extends DayButtonProps {
182
182
  const DAY_BUTTON_BASE = cn(
183
183
  'relative isolate flex size-(--cell-size) cursor-pointer items-center justify-center',
184
184
  'font-normal whitespace-nowrap outline-offset-1 outline-ring',
185
- 'transform-gpu transition duration-250 ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
185
+ 'transform-gpu transition duration-250 ease-spring',
186
186
  'active:scale-[0.97] active:translate-y-px active:duration-100 active:ease-in-out',
187
187
  'motion-reduce:transition-none',
188
188
  'before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit]',
@@ -184,6 +184,13 @@ describe('Carousel', () => {
184
184
  expect(container.querySelector('[data-slot="carousel-content"]')?.getAttribute('data-orientation')).toBe('vertical')
185
185
  })
186
186
 
187
+ it('claims touch drags along its own axis from a surrounding Drawer', () => {
188
+ const { container: row } = render(<Basic />)
189
+ expect(row.querySelector('[data-slot="carousel-viewport"]')).toHaveAttribute('data-base-ui-swipe-ignore', 'x')
190
+ const { container: column } = render(<Basic orientation="vertical" />)
191
+ expect(column.querySelector('[data-slot="carousel-viewport"]')).toHaveAttribute('data-base-ui-swipe-ignore', 'y')
192
+ })
193
+
187
194
  it('forwards className on the root and other elements', () => {
188
195
  const { container } = render(
189
196
  <Carousel className="root-cls">
@@ -449,6 +456,13 @@ describe('CarouselThumbs / CarouselThumb', () => {
449
456
  expect(track.getAttribute('data-orientation')).toBe('vertical')
450
457
  })
451
458
 
459
+ it('claims drags along the rail axis, independent of the carousel axis', () => {
460
+ const { container } = render(<WithThumbs orientation="vertical" />)
461
+ const [main, rail] = container.querySelectorAll('[data-slot="carousel-viewport"]')
462
+ expect(main).toHaveAttribute('data-base-ui-swipe-ignore', 'x')
463
+ expect(rail).toHaveAttribute('data-base-ui-swipe-ignore', 'y')
464
+ })
465
+
452
466
  it('applies the light variant to the thumbnails and the indicator', () => {
453
467
  const { container } = render(<WithThumbs light />)
454
468
  const thumb = container.querySelector('[data-slot="carousel-thumb"]') as HTMLElement
@@ -557,6 +557,7 @@ function CarouselContent({ className, children, viewportProps, ...rest }: Carous
557
557
  const { viewportRef, orientation, autoHeight } = useCarousel()
558
558
  return (
559
559
  <div
560
+ data-base-ui-swipe-ignore={orientation === 'vertical' ? 'y' : 'x'}
560
561
  {...viewportProps}
561
562
  ref={viewportRef}
562
563
  data-slot="carousel-viewport"
@@ -641,7 +642,7 @@ const CAROUSEL_THUMB_OPTIONS: CarouselOptions = { slides: ':scope > [data-slot=c
641
642
  const CAROUSEL_THUMB_TRANSITION = cn(
642
643
  'transition-[opacity,translate,scale] motion-reduce:transition-none',
643
644
  'duration-[300ms,250ms,250ms]',
644
- 'ease-[ease-out,cubic-bezier(0.175,0.885,0.32,1.5),cubic-bezier(0.175,0.885,0.32,1.5)]',
645
+ 'ease-[ease-out,var(--ease-spring),var(--ease-spring)]',
645
646
  'active:duration-[300ms,100ms,100ms] active:ease-[ease-out,ease-in-out,ease-in-out]',
646
647
  )
647
648
 
@@ -1262,14 +1263,6 @@ function CarouselAutoplayCircularIndicator({
1262
1263
  * "main + thumbnails" pattern. Wires `select` on each so navigating either
1263
1264
  * one drives the other. Both apis can be undefined initially (e.g. waiting on
1264
1265
  * `setApi`); the effect re-runs once both resolve.
1265
- *
1266
- * @example
1267
- * const [mainApi, setMainApi] = useState<CarouselApi>()
1268
- * const [thumbsApi, setThumbsApi] = useState<CarouselApi>()
1269
- * useLinkedCarousels(mainApi, thumbsApi)
1270
- *
1271
- * <Carousel setApi={setMainApi}>…</Carousel>
1272
- * <Carousel setApi={setThumbsApi} align="start" containScroll="keepSnaps">…</Carousel>
1273
1266
  */
1274
1267
  function useLinkedCarousels(mainApi: CarouselApi | undefined, thumbsApi: CarouselApi | undefined): void {
1275
1268
  React.useEffect(() => {
@@ -20,6 +20,11 @@ function inputs() {
20
20
  }
21
21
 
22
22
  describe('ColorArea', () => {
23
+ it('keeps a surrounding Drawer from swiping on any drag that starts on the area', () => {
24
+ const { container } = render(<ColorArea defaultValue="#3b82f6" />)
25
+ expect(container.querySelector('[data-slot="color-area"]')).toHaveAttribute('data-base-ui-swipe-ignore', '')
26
+ })
27
+
23
28
  it('exposes one range input per axis, labeled by channel', () => {
24
29
  render(<ColorArea defaultValue="hsb(0, 100%, 100%)" xChannel="saturation" yChannel="brightness" />)
25
30
  const [x, y] = inputs()
@@ -318,6 +318,7 @@ function ColorArea({
318
318
  ref={containerRef}
319
319
  role="group"
320
320
  aria-label={ariaLabel}
321
+ data-base-ui-swipe-ignore=""
321
322
  {...props}
322
323
  data-slot="color-area"
323
324
  data-space={space}
@@ -36,6 +36,11 @@ const thumb = () => document.querySelector('[data-slot="color-slider-thumb"]') a
36
36
  const stopCount = () => (track().style.backgroundImage.match(/rgba?\(/g) ?? []).length
37
37
 
38
38
  describe('ColorSlider', () => {
39
+ it('keeps a surrounding Drawer from swiping on any drag that starts on the slider', () => {
40
+ const { container } = renderSlider({ channel: 'hue', defaultValue: '#3b82f6' })
41
+ expect(container.querySelector('[data-slot="color-slider"]')).toHaveAttribute('data-base-ui-swipe-ignore', '')
42
+ })
43
+
39
44
  it('exposes the channel as a labeled range input', () => {
40
45
  renderSlider({ channel: 'hue', defaultValue: 'hsb(120, 50%, 50%)' })
41
46
  expect(slider()).toHaveAttribute('aria-label', 'Hue')
@@ -271,6 +271,7 @@ function ColorSlider({
271
271
  return (
272
272
  <div
273
273
  ref={containerRef}
274
+ data-base-ui-swipe-ignore=""
274
275
  {...props}
275
276
  data-slot="color-slider"
276
277
  data-orientation={orientation}
@@ -26,7 +26,7 @@ const pickerVariants = cva('relative isolate flex gap-1', {
26
26
  // The button is the outer ring's box, so the swatch has to sit inside it. At 0.8em
27
27
  // the gap either side is 0.1em, which holds at every size because both are ems.
28
28
  const itemVariants = cva(
29
- 'outline-ring relative flex size-[1em] shrink-0 transform-gpu cursor-pointer items-center justify-center focus-visible:outline-3 motion-safe:transition motion-safe:duration-250 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)] motion-safe:active:translate-y-px motion-safe:active:scale-90 motion-safe:active:duration-100 motion-safe:active:ease-in-out data-disabled:pointer-events-none data-disabled:cursor-default',
29
+ 'outline-ring relative flex size-[1em] shrink-0 transform-gpu cursor-pointer items-center justify-center focus-visible:outline-3 motion-safe:transition motion-safe:duration-250 motion-safe:ease-spring motion-safe:active:translate-y-px motion-safe:active:scale-90 motion-safe:active:duration-100 motion-safe:active:ease-in-out data-disabled:pointer-events-none data-disabled:cursor-default',
30
30
  { variants: { shape: COLOR_SWATCH_SHAPES } },
31
31
  )
32
32
 
@@ -13,6 +13,7 @@ import {
13
13
  ComboboxItem,
14
14
  ComboboxList,
15
15
  ComboboxValue,
16
+ createComboboxItems,
16
17
  } from './combobox'
17
18
 
18
19
  const FRAMEWORKS = ['Next.js', 'SvelteKit', 'Nuxt.js', 'Remix', 'Astro']
@@ -161,6 +162,38 @@ describe('Combobox', () => {
161
162
  expect(onValueChange).toHaveBeenCalledWith('Remix', expect.anything())
162
163
  })
163
164
 
165
+ it('selects by ID from a createComboboxItems collection and shows the label', async () => {
166
+ const user = setupUser()
167
+ const onValueChange = vi.fn()
168
+ const people = [
169
+ { id: 'liam', name: 'Liam Hudson' },
170
+ { id: 'sarah', name: 'Sarah Jenkins' },
171
+ ]
172
+ const items = createComboboxItems(people, { getValue: (person) => person.id, getLabel: (person) => person.name })
173
+ render(
174
+ <Combobox items={items} onValueChange={onValueChange}>
175
+ <ComboboxInput aria-label="Assign to" />
176
+ <ComboboxContent>
177
+ <ComboboxList>
178
+ {(person: (typeof people)[number]) => (
179
+ <ComboboxItem key={person.id} value={person.id}>
180
+ {person.name}
181
+ </ComboboxItem>
182
+ )}
183
+ </ComboboxList>
184
+ </ComboboxContent>
185
+ </Combobox>,
186
+ )
187
+
188
+ const input = screen.getByRole('combobox', { name: 'Assign to' })
189
+ await user.type(input, 'sar')
190
+ expect(screen.queryByRole('option', { name: 'Liam Hudson' })).toBeNull()
191
+ await user.click(await screen.findByRole('option', { name: 'Sarah Jenkins' }))
192
+
193
+ expect(onValueChange).toHaveBeenCalledWith('sarah', expect.anything())
194
+ await waitFor(() => expect(input).toHaveValue('Sarah Jenkins'))
195
+ })
196
+
164
197
  it('renders the check indicator on the selected item', async () => {
165
198
  const user = setupUser()
166
199
  renderSingle({ defaultValue: 'Astro' })
@@ -30,9 +30,13 @@ function useComboboxContext() {
30
30
  return ctx
31
31
  }
32
32
 
33
- type BaseComboboxRootProps = React.ComponentProps<typeof BaseCombobox.Root>
33
+ type ComboboxProps<
34
+ Value = unknown,
35
+ Multiple extends boolean | undefined = false,
36
+ Item = Value,
37
+ > = BaseCombobox.Root.Props<Value, Multiple, Item> & ComboboxOwnProps
34
38
 
35
- interface ComboboxProps extends BaseComboboxRootProps {
39
+ interface ComboboxOwnProps {
36
40
  /**
37
41
  * Input height, popup radius, and item sizing.
38
42
  * @default 'md'
@@ -55,7 +59,7 @@ interface ComboboxProps extends BaseComboboxRootProps {
55
59
  icon?: boolean
56
60
  }
57
61
 
58
- function Combobox({
62
+ function Combobox<Value, Multiple extends boolean | undefined = false, Item = Value>({
59
63
  size = 'md',
60
64
  variant = 'outline',
61
65
  clearable = false,
@@ -63,7 +67,7 @@ function Combobox({
63
67
  grid = false,
64
68
  children,
65
69
  ...rest
66
- }: ComboboxProps) {
70
+ }: ComboboxProps<Value, Multiple, Item>) {
67
71
  const reducedMotion = useReducedMotion()
68
72
  const ctx = React.useMemo<ComboboxContextValue>(
69
73
  () => ({ size, variant, clearable, icon, grid, reducedMotion }),
@@ -346,7 +350,7 @@ function ComboboxContent({ className, children, ...props }: ComboboxContentProps
346
350
  'w-(--anchor-width) min-w-36',
347
351
  'max-h-(--available-height) overflow-hidden',
348
352
  'origin-(--transform-origin)',
349
- 'motion-safe:transition-[opacity,scale] motion-safe:duration-200 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
353
+ 'motion-safe:ease-spring motion-safe:transition-[opacity,scale] motion-safe:duration-200',
350
354
  'data-starting-style:motion-safe:scale-90 data-starting-style:motion-safe:opacity-0',
351
355
  'data-ending-style:motion-safe:scale-95 data-ending-style:motion-safe:opacity-0 data-ending-style:motion-safe:duration-100 data-ending-style:motion-safe:ease-out',
352
356
  className,
@@ -454,7 +458,7 @@ function ComboboxItem({ className, children, ...props }: ComboboxItemProps) {
454
458
  'before:bg-background-muted before:absolute before:inset-0 before:-z-10 before:rounded-[inherit] before:opacity-0',
455
459
  'active:translate-y-px active:scale-[0.98]',
456
460
  'data-highlighted:not-data-disabled:text-foreground-intense data-highlighted:not-data-disabled:before:opacity-100',
457
- 'motion-safe:transition motion-safe:duration-250 motion-safe:ease-[cubic-bezier(0.175,0.885,0.32,1.5)]',
461
+ 'motion-safe:ease-spring motion-safe:transition motion-safe:duration-250',
458
462
  'motion-safe:active:duration-100 motion-safe:active:ease-in-out',
459
463
  'motion-safe:before:transition-opacity motion-safe:before:duration-200 motion-safe:before:ease-out',
460
464
  'data-disabled:opacity-disabled data-disabled:pointer-events-none',
@@ -588,6 +592,8 @@ function ClearIcon(props: IconProps) {
588
592
  )
589
593
  }
590
594
 
595
+ const createComboboxItems = BaseCombobox.createItems
596
+
591
597
  export {
592
598
  Combobox,
593
599
  ComboboxInput,
@@ -603,6 +609,7 @@ export {
603
609
  ComboboxLabel,
604
610
  ComboboxCollection,
605
611
  ComboboxSeparator,
612
+ createComboboxItems,
606
613
  }
607
614
  export type {
608
615
  ComboboxProps,