@sanity/ui 4.0.0-beta.0 → 4.0.0-beta.2

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 (68) hide show
  1. package/README.md +1 -1
  2. package/dist/index.d.ts +11 -0
  3. package/dist/index.js +6 -2
  4. package/dist/index.js.map +1 -1
  5. package/exports/index.ts +8 -0
  6. package/package.json +5 -23
  7. package/src/components/autocomplete/__workshop__/Custom.tsx +1 -1
  8. package/src/components/autocomplete/__workshop__/Example.tsx +1 -2
  9. package/src/components/breadcrumbs/__workshop__/Example.tsx +1 -2
  10. package/src/components/dialog/__workshop__/Props.tsx +11 -2
  11. package/src/components/menu/__workshop__/ClosableMenuButton.tsx +1 -1
  12. package/src/components/menu/__workshop__/ConstrainedInBoundary.tsx +1 -1
  13. package/src/components/menu/__workshop__/DataProps.tsx +1 -2
  14. package/src/components/menu/__workshop__/MenuButton.tsx +1 -1
  15. package/src/components/menu/__workshop__/Tones.tsx +1 -2
  16. package/src/components/tree/__workshop__/Basic.tsx +1 -2
  17. package/src/primitives/avatar/__workshop__/AsButton.tsx +1 -2
  18. package/src/primitives/avatar/__workshop__/PropsStory.tsx +1 -2
  19. package/src/primitives/avatar/__workshop__/Stack.tsx +1 -2
  20. package/src/primitives/badge/__workshop__/Props.tsx +1 -2
  21. package/src/primitives/badge/__workshop__/Tones.tsx +1 -2
  22. package/src/primitives/box/__workshop__/Props.tsx +1 -1
  23. package/src/primitives/box/__workshop__/Responsive.tsx +1 -2
  24. package/src/primitives/button/__workshop__/Custom.tsx +12 -2
  25. package/src/primitives/button/__workshop__/CustomIcons.tsx +1 -2
  26. package/src/primitives/button/__workshop__/DataProps.tsx +1 -2
  27. package/src/primitives/button/__workshop__/Props.tsx +1 -1
  28. package/src/primitives/button/__workshop__/Stacked.tsx +11 -2
  29. package/src/primitives/card/__workshop__/AsButton.tsx +1 -2
  30. package/src/primitives/card/__workshop__/Checkered.tsx +1 -2
  31. package/src/primitives/card/__workshop__/Props.tsx +12 -2
  32. package/src/primitives/card/__workshop__/Tones.tsx +1 -2
  33. package/src/primitives/checkbox/__workshop__/Tones.tsx +1 -2
  34. package/src/primitives/code/__workshop__/OpticalAlignment.tsx +1 -2
  35. package/src/primitives/code/__workshop__/Props.tsx +1 -2
  36. package/src/primitives/container/__workshop__/Example.tsx +1 -2
  37. package/src/primitives/heading/__workshop__/OpticalAlignment.tsx +1 -2
  38. package/src/primitives/heading/__workshop__/Plain.tsx +1 -2
  39. package/src/primitives/inline/__workshop__/Plain.tsx +1 -2
  40. package/src/primitives/label/__workshop__/OpticalAlignment.tsx +1 -2
  41. package/src/primitives/label/__workshop__/Plain.tsx +1 -2
  42. package/src/primitives/popover/__workshop__/AlignedStory.tsx +1 -2
  43. package/src/primitives/popover/__workshop__/PlainStory.tsx +1 -2
  44. package/src/primitives/popover/__workshop__/RecursiveStory.tsx +1 -1
  45. package/src/primitives/popover/__workshop__/SidePanelStory.tsx +2 -1
  46. package/src/primitives/popover/__workshop__/TestStory.tsx +1 -1
  47. package/src/primitives/select/__workshop__/Plain.tsx +1 -2
  48. package/src/primitives/skeleton/__workshop__/Delay.tsx +1 -1
  49. package/src/primitives/skeleton/__workshop__/Skeleton.tsx +1 -1
  50. package/src/primitives/spinner/__workshop__/Props.tsx +1 -2
  51. package/src/primitives/stack/__workshop__/Plain.tsx +1 -2
  52. package/src/primitives/text/__workshop__/Example.tsx +1 -2
  53. package/src/primitives/text/__workshop__/OpticalAlignment.tsx +1 -2
  54. package/src/primitives/textArea/__workshop__/Plain.tsx +1 -2
  55. package/src/primitives/textInput/__workshop__/Plain.tsx +1 -2
  56. package/src/primitives/textInput/__workshop__/Tones.tsx +1 -2
  57. package/src/primitives/tooltip/__workshop__/Props.tsx +10 -2
  58. package/src/utils/elementQuery/__workshop__/styles.css.ts +1 -1
  59. package/dist/css.d.ts +0 -11
  60. package/dist/css.js +0 -7
  61. package/dist/css.js.map +0 -1
  62. package/dist/tokens.d.ts +0 -4
  63. package/dist/tokens.js +0 -2
  64. package/dist/tokens.js.map +0 -1
  65. package/exports/css.ts +0 -2
  66. package/exports/tokens.ts +0 -2
  67. /package/dist/{css/index.css → index.css} +0 -0
  68. /package/exports/{css/index.css → index.css} +0 -0
package/README.md CHANGED
@@ -14,7 +14,7 @@ npm install react react-dom react-is
14
14
  ## Usage
15
15
 
16
16
  ```jsx
17
- import '@sanity/ui/css/index.css'
17
+ import '@sanity/ui/index.css'
18
18
 
19
19
  import {Button, Root} from '@sanity/ui'
20
20
  import {createRoot} from 'react-dom/client'
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import type {AvatarSize} from '@sanity/ui-tokens'
3
3
  import {BadgeStyleProps} from '@sanity/ui-css'
4
4
  import {BoxStyleProps} from '@sanity/ui-css'
5
5
  import {Breakpoint} from '@sanity/ui-css'
6
+ import {BREAKPOINTS} from '@sanity/ui-css'
6
7
  import {ButtonStyleProps} from '@sanity/ui-css'
7
8
  import {CardStyleProps} from '@sanity/ui-css'
8
9
  import type {CardTone} from '@sanity/ui-tokens'
@@ -56,6 +57,7 @@ import type {Strategy} from '@floating-ui/react-dom'
56
57
  import {TextAreaStyleProps} from '@sanity/ui-css'
57
58
  import {TextOverflowStyleProps} from '@sanity/ui-css'
58
59
  import {TextStyleProps} from '@sanity/ui-css'
60
+ import {vars} from '@sanity/ui-css'
59
61
 
60
62
  /**
61
63
  * Assign properties from `U` to `T`, excluding properties that already exist in `T`.
@@ -426,6 +428,8 @@ export declare type BreadcrumbsOwnProps = GapStyleProps & {
426
428
  export declare type BreadcrumbsProps<E extends BreadcrumbsElementType = BreadcrumbsElementType> =
427
429
  Props<BreadcrumbsOwnProps, E>
428
430
 
431
+ export {BREAKPOINTS}
432
+
429
433
  /** @public */
430
434
  export declare function Button<E extends ButtonElementType = typeof DEFAULT_BUTTON_ELEMENT>(
431
435
  props: ButtonProps<E>,
@@ -1671,6 +1675,8 @@ export declare function _raf(fn: () => void): () => void
1671
1675
  */
1672
1676
  export declare function _raf2(fn: () => void): () => void
1673
1677
 
1678
+ export {ResponsiveProp}
1679
+
1674
1680
  /**
1675
1681
  * @internal
1676
1682
  */
@@ -2439,6 +2445,8 @@ export declare function useTooltipDelayGroup(): TooltipDelayGroupContextValue |
2439
2445
  */
2440
2446
  export declare function useTree(): TreeContextValue
2441
2447
 
2448
+ export {vars}
2449
+
2442
2450
  /** @beta */
2443
2451
  export declare function VirtualList<
2444
2452
  E extends VirtualListElementType = typeof DEFAULT_VIRTUAL_LIST_ELEMENT,
@@ -2473,4 +2481,7 @@ export declare type VirtualListProps<
2473
2481
  Item = any,
2474
2482
  > = Props<VirtualListOwnProps<Item>, E>
2475
2483
 
2484
+ export * from '@sanity/ui-tokens'
2485
+ export * from '@sanity/ui-tokens/constants'
2486
+
2476
2487
  export {}
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
+ import { BREAKPOINT_KEYS, BOX_STYLE_PROP_KEYS, box, textOverflow, text, TEXT_STYLE_PROP_KEYS, spinner_animatedIcon, spinner, KBD_STYLE_PROP_KEYS, kbd, HOTKEYS_STYLE_PROP_KEYS, hotkeys, card, CARD_STYLE_PROP_KEYS, BREAKPOINTS, tooltip, BUTTON_STYLE_PROP_KEYS, button, button_loadingBox, flex, FLEX_STYLE_PROP_KEYS, popover_card, popover, SELECTABLE_STYLE_PROP_KEYS, selectable, STACK_STYLE_PROP_KEYS, stack, textInput, textInput_prefix, textInput_element, _input_element, _input_presentation, textInput_suffix, CONTAINER_STYLE_PROP_KEYS, container as container$1, dialog_card, dialog_header, dialog_content, dialog_scrollerShadowTop, dialog_scroller, dialog_scrollerShadowBottom, dialog_footer, dialog, dialog_container, menu, menu_divider, selectable_hotkeys, tab_panel, toast, GRID_STYLE_PROP_KEYS, grid, toast_layer, tree, tree_item, vars, LABEL_STYLE_PROP_KEYS, label, avatar, avatar_arrow, avatar_arrowSvg, avatar_initials, avatar_imageOutline, avatar_image, avatar_counter, avatar_stack, BADGE_STYLE_PROP_KEYS, badge, checkbox, checkbox_input, checkbox_presentation, CODE_STYLE_PROP_KEYS, code, HEADING_STYLE_PROP_KEYS, heading, INLINE_STYLE_PROP_KEYS, inline, radio, radio_input, radio_presentation, select, select_presentation, skeleton, code_skeleton, heading_skeleton, label_skeleton, text_skeleton, srOnly, _switch, _switch_element, _switch_track, _switch_thumb, _switch_presentation, textArea, textArea_element, textArea_presentation, ROOT_STYLE_PROP_KEYS, root_body, root } from "@sanity/ui-css";
2
+ import { BREAKPOINTS as BREAKPOINTS2, vars as vars2 } from "@sanity/ui-css";
3
+ export * from "@sanity/ui-tokens/constants";
1
4
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
5
  import { c } from "react/compiler-runtime";
3
6
  import { SpinnerIcon, CloseIcon, ChevronDownIcon, ChevronRightIcon, ToggleArrowRightIcon, CheckmarkIcon, RemoveIcon, SelectIcon } from "@sanity/icons";
4
7
  import { useDebugValue, useSyncExternalStore, useRef, useMemo, createContext, use, useImperativeHandle, useEffect, useState, useId, useLayoutEffect, cloneElement, useEffectEvent, startTransition, isValidElement, useReducer, Children, Fragment as Fragment$1, lazy, Suspense, Component } from "react";
5
- import { BREAKPOINT_KEYS, BOX_STYLE_PROP_KEYS, box, textOverflow, text, TEXT_STYLE_PROP_KEYS, spinner_animatedIcon, spinner, KBD_STYLE_PROP_KEYS, kbd, HOTKEYS_STYLE_PROP_KEYS, hotkeys, card, CARD_STYLE_PROP_KEYS, BREAKPOINTS, tooltip, BUTTON_STYLE_PROP_KEYS, button, button_loadingBox, flex, FLEX_STYLE_PROP_KEYS, popover_card, popover, SELECTABLE_STYLE_PROP_KEYS, selectable, STACK_STYLE_PROP_KEYS, stack, textInput, textInput_prefix, textInput_element, _input_element, _input_presentation, textInput_suffix, CONTAINER_STYLE_PROP_KEYS, container as container$1, dialog_card, dialog_header, dialog_content, dialog_scrollerShadowTop, dialog_scroller, dialog_scrollerShadowBottom, dialog_footer, dialog, dialog_container, menu, menu_divider, selectable_hotkeys, tab_panel, toast, GRID_STYLE_PROP_KEYS, grid, toast_layer, tree, tree_item, vars, LABEL_STYLE_PROP_KEYS, label, avatar, avatar_arrow, avatar_arrowSvg, avatar_initials, avatar_imageOutline, avatar_image, avatar_counter, avatar_stack, BADGE_STYLE_PROP_KEYS, badge, checkbox, checkbox_input, checkbox_presentation, CODE_STYLE_PROP_KEYS, code, HEADING_STYLE_PROP_KEYS, heading, INLINE_STYLE_PROP_KEYS, inline, radio, radio_input, radio_presentation, select, select_presentation, skeleton, code_skeleton, heading_skeleton, label_skeleton, text_skeleton, srOnly, _switch, _switch_element, _switch_track, _switch_thumb, _switch_presentation, textArea, textArea_element, textArea_presentation, ROOT_STYLE_PROP_KEYS, root_body, root } from "@sanity/ui-css";
6
8
  import { isValidElementType } from "react-is";
7
9
  import { useFloating, flip, offset, shift, autoUpdate, detectOverflow, autoPlacement, hide } from "@floating-ui/react-dom";
8
10
  import { motion, AnimatePresence } from "motion/react";
@@ -4676,6 +4678,7 @@ export {
4676
4678
  Avatar,
4677
4679
  AvatarCounter,
4678
4680
  AvatarStack,
4681
+ BREAKPOINTS2 as BREAKPOINTS,
4679
4682
  Badge,
4680
4683
  BoundaryElementProvider,
4681
4684
  Box,
@@ -4822,6 +4825,7 @@ export {
4822
4825
  usePrefersReducedMotion,
4823
4826
  useToast,
4824
4827
  useTooltipDelayGroup,
4825
- useTree
4828
+ useTree,
4829
+ vars2 as vars
4826
4830
  };
4827
4831
  //# sourceMappingURL=index.js.map