@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.
- package/README.md +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/exports/index.ts +8 -0
- package/package.json +5 -23
- package/src/components/autocomplete/__workshop__/Custom.tsx +1 -1
- package/src/components/autocomplete/__workshop__/Example.tsx +1 -2
- package/src/components/breadcrumbs/__workshop__/Example.tsx +1 -2
- package/src/components/dialog/__workshop__/Props.tsx +11 -2
- package/src/components/menu/__workshop__/ClosableMenuButton.tsx +1 -1
- package/src/components/menu/__workshop__/ConstrainedInBoundary.tsx +1 -1
- package/src/components/menu/__workshop__/DataProps.tsx +1 -2
- package/src/components/menu/__workshop__/MenuButton.tsx +1 -1
- package/src/components/menu/__workshop__/Tones.tsx +1 -2
- package/src/components/tree/__workshop__/Basic.tsx +1 -2
- package/src/primitives/avatar/__workshop__/AsButton.tsx +1 -2
- package/src/primitives/avatar/__workshop__/PropsStory.tsx +1 -2
- package/src/primitives/avatar/__workshop__/Stack.tsx +1 -2
- package/src/primitives/badge/__workshop__/Props.tsx +1 -2
- package/src/primitives/badge/__workshop__/Tones.tsx +1 -2
- package/src/primitives/box/__workshop__/Props.tsx +1 -1
- package/src/primitives/box/__workshop__/Responsive.tsx +1 -2
- package/src/primitives/button/__workshop__/Custom.tsx +12 -2
- package/src/primitives/button/__workshop__/CustomIcons.tsx +1 -2
- package/src/primitives/button/__workshop__/DataProps.tsx +1 -2
- package/src/primitives/button/__workshop__/Props.tsx +1 -1
- package/src/primitives/button/__workshop__/Stacked.tsx +11 -2
- package/src/primitives/card/__workshop__/AsButton.tsx +1 -2
- package/src/primitives/card/__workshop__/Checkered.tsx +1 -2
- package/src/primitives/card/__workshop__/Props.tsx +12 -2
- package/src/primitives/card/__workshop__/Tones.tsx +1 -2
- package/src/primitives/checkbox/__workshop__/Tones.tsx +1 -2
- package/src/primitives/code/__workshop__/OpticalAlignment.tsx +1 -2
- package/src/primitives/code/__workshop__/Props.tsx +1 -2
- package/src/primitives/container/__workshop__/Example.tsx +1 -2
- package/src/primitives/heading/__workshop__/OpticalAlignment.tsx +1 -2
- package/src/primitives/heading/__workshop__/Plain.tsx +1 -2
- package/src/primitives/inline/__workshop__/Plain.tsx +1 -2
- package/src/primitives/label/__workshop__/OpticalAlignment.tsx +1 -2
- package/src/primitives/label/__workshop__/Plain.tsx +1 -2
- package/src/primitives/popover/__workshop__/AlignedStory.tsx +1 -2
- package/src/primitives/popover/__workshop__/PlainStory.tsx +1 -2
- package/src/primitives/popover/__workshop__/RecursiveStory.tsx +1 -1
- package/src/primitives/popover/__workshop__/SidePanelStory.tsx +2 -1
- package/src/primitives/popover/__workshop__/TestStory.tsx +1 -1
- package/src/primitives/select/__workshop__/Plain.tsx +1 -2
- package/src/primitives/skeleton/__workshop__/Delay.tsx +1 -1
- package/src/primitives/skeleton/__workshop__/Skeleton.tsx +1 -1
- package/src/primitives/spinner/__workshop__/Props.tsx +1 -2
- package/src/primitives/stack/__workshop__/Plain.tsx +1 -2
- package/src/primitives/text/__workshop__/Example.tsx +1 -2
- package/src/primitives/text/__workshop__/OpticalAlignment.tsx +1 -2
- package/src/primitives/textArea/__workshop__/Plain.tsx +1 -2
- package/src/primitives/textInput/__workshop__/Plain.tsx +1 -2
- package/src/primitives/textInput/__workshop__/Tones.tsx +1 -2
- package/src/primitives/tooltip/__workshop__/Props.tsx +10 -2
- package/src/utils/elementQuery/__workshop__/styles.css.ts +1 -1
- package/dist/css.d.ts +0 -11
- package/dist/css.js +0 -7
- package/dist/css.js.map +0 -1
- package/dist/tokens.d.ts +0 -4
- package/dist/tokens.js +0 -2
- package/dist/tokens.js.map +0 -1
- package/exports/css.ts +0 -2
- package/exports/tokens.ts +0 -2
- /package/dist/{css/index.css → index.css} +0 -0
- /package/exports/{css/index.css → index.css} +0 -0
package/README.md
CHANGED
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
|