@xaui/native 0.9.1-alpha.4 → 0.9.1-alpha.40
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/chunk-2EGR4LWD.js +145 -0
- package/dist/chunk-2NRZKJG7.js +531 -0
- package/dist/chunk-2PMXMKS5.js +67 -0
- package/dist/chunk-2XPG2243.js +586 -0
- package/dist/chunk-36PRYGAM.js +13 -0
- package/dist/chunk-3E7CDKFO.cjs +696 -0
- package/dist/chunk-3GFRSZYR.js +54 -0
- package/dist/chunk-423RQBOX.js +21 -0
- package/dist/chunk-4CUZZWFW.js +92 -0
- package/dist/chunk-4GTAZM2C.js +174 -0
- package/dist/chunk-4KFKWBN5.cjs +89 -0
- package/dist/{chunk-3QBT3Q65.cjs → chunk-57SJ4LJF.cjs} +7 -2
- package/dist/chunk-5R26NM4M.cjs +402 -0
- package/dist/chunk-5VKYNBNA.js +607 -0
- package/dist/chunk-64MXEVT3.js +66 -0
- package/dist/chunk-6DOLGZVV.cjs +147 -0
- package/dist/chunk-6L2TS2R3.cjs +92 -0
- package/dist/chunk-6UEZJRVI.js +669 -0
- package/dist/chunk-734MFAX4.js +27 -0
- package/dist/chunk-73RKQC5X.js +104 -0
- package/dist/chunk-7DPL3ZDS.cjs +21 -0
- package/dist/chunk-7EIHHOHP.cjs +42 -0
- package/dist/chunk-7GHM4GKL.cjs +119 -0
- package/dist/chunk-7YF5NAHQ.cjs +74 -0
- package/dist/{chunk-X2K2FX3W.js → chunk-A3EGFI6T.js} +6 -1
- package/dist/chunk-ABAGZTXZ.cjs +736 -0
- package/dist/{chunk-AW63PTQ4.cjs → chunk-ACAPTWE3.cjs} +85 -81
- package/dist/chunk-AMCSSOJT.cjs +104 -0
- package/dist/chunk-BA2DBSAN.js +102 -0
- package/dist/chunk-BRRXFOBY.js +431 -0
- package/dist/chunk-C5YLPCFC.cjs +293 -0
- package/dist/chunk-DA3OKXHV.cjs +700 -0
- package/dist/chunk-DD4276RF.js +366 -0
- package/dist/chunk-DG2I4PJG.js +701 -0
- package/dist/chunk-DHGLGSH6.js +661 -0
- package/dist/chunk-DIBUQ46Y.js +346 -0
- package/dist/chunk-EGLLDKN6.js +9 -0
- package/dist/chunk-EJQCQPET.cjs +9 -0
- package/dist/chunk-EKS3W46M.cjs +66 -0
- package/dist/chunk-EZEYMLO3.js +402 -0
- package/dist/chunk-F6CQ6CBI.cjs +112 -0
- package/dist/chunk-F6W3JQ7K.js +42 -0
- package/dist/chunk-FHUYHV6J.js +89 -0
- package/dist/chunk-FNEUOBCV.cjs +174 -0
- package/dist/chunk-G7P3ERYF.cjs +478 -0
- package/dist/chunk-GA6PBWNT.js +147 -0
- package/dist/chunk-GFUZ3MUT.cjs +455 -0
- package/dist/chunk-GGW43Q37.cjs +1 -0
- package/dist/chunk-GTR5X65M.cjs +27 -0
- package/dist/chunk-H4E4HDEP.cjs +13 -0
- package/dist/chunk-H7DS4IO7.js +198 -0
- package/dist/chunk-HDVVZG4S.cjs +198 -0
- package/dist/chunk-IKJVLJKT.js +151 -0
- package/dist/chunk-J3MB4PI5.cjs +531 -0
- package/dist/chunk-K72UDPVN.js +119 -0
- package/dist/chunk-KCMYU7WF.js +86 -0
- package/dist/chunk-LRN3RNDO.js +940 -0
- package/dist/chunk-LTX6TB5I.js +124 -0
- package/dist/chunk-LUPCPLND.cjs +145 -0
- package/dist/chunk-M63GFNKV.js +194 -0
- package/dist/chunk-N3KTZMPG.js +293 -0
- package/dist/chunk-NCTOTTVW.js +13 -0
- package/dist/chunk-NWGLP6JX.cjs +410 -0
- package/dist/chunk-R73XQK7X.cjs +314 -0
- package/dist/chunk-RU7JCMWC.cjs +881 -0
- package/dist/chunk-SNIHUKDA.cjs +184 -0
- package/dist/chunk-T5FV5F7A.cjs +607 -0
- package/dist/chunk-TDTUAIFF.cjs +153 -0
- package/dist/chunk-TJ74XVZN.cjs +431 -0
- package/dist/chunk-TK44VBIE.cjs +194 -0
- package/dist/chunk-UAWBAD4E.cjs +346 -0
- package/dist/chunk-UFTCTTKK.js +381 -0
- package/dist/chunk-WDDXU3OH.cjs +67 -0
- package/dist/chunk-WFEMJCXO.cjs +13 -0
- package/dist/chunk-WHJTBTYM.js +0 -0
- package/dist/{chunk-2KXQATVL.js → chunk-WKCQ6VGW.js} +59 -55
- package/dist/chunk-XFPQFCEK.js +455 -0
- package/dist/chunk-XSQPVDFH.cjs +60 -0
- package/dist/chunk-XTC2SLFT.js +153 -0
- package/dist/chunk-XV735BSA.cjs +366 -0
- package/dist/chunk-XWNG2U4K.cjs +124 -0
- package/dist/chunk-YGYYJ3LQ.js +314 -0
- package/dist/chunk-YVHT2UVW.js +74 -0
- package/dist/chunk-ZFOOJK37.cjs +86 -0
- package/dist/close-button.type-BUYuoSt2.d.ts +36 -0
- package/dist/close-button.type-CHsgZ3wO.d.cts +36 -0
- package/dist/components/accordion/index.cjs +35 -0
- package/dist/components/accordion/index.d.cts +299 -0
- package/dist/components/accordion/index.d.ts +299 -0
- package/dist/components/accordion/index.js +35 -0
- package/dist/components/alert/index.cjs +20 -0
- package/dist/components/alert/index.d.cts +169 -0
- package/dist/components/alert/index.d.ts +169 -0
- package/dist/components/alert/index.js +20 -0
- package/dist/components/avatar/index.cjs +16 -0
- package/dist/components/avatar/index.d.cts +131 -0
- package/dist/components/avatar/index.d.ts +131 -0
- package/dist/components/avatar/index.js +16 -0
- package/dist/components/badge/index.cjs +15 -0
- package/dist/components/badge/index.d.cts +157 -0
- package/dist/components/badge/index.d.ts +157 -0
- package/dist/components/badge/index.js +15 -0
- package/dist/components/button/index.cjs +22 -0
- package/dist/components/button/index.d.cts +613 -0
- package/dist/components/button/index.d.ts +613 -0
- package/dist/components/button/index.js +22 -0
- package/dist/components/card/index.cjs +22 -0
- package/dist/components/card/index.d.cts +620 -0
- package/dist/components/card/index.d.ts +620 -0
- package/dist/components/card/index.js +22 -0
- package/dist/components/checkbox/index.cjs +26 -0
- package/dist/components/checkbox/index.d.cts +1136 -0
- package/dist/components/checkbox/index.d.ts +1136 -0
- package/dist/components/checkbox/index.js +26 -0
- package/dist/components/chip/index.cjs +20 -0
- package/dist/components/chip/index.d.cts +608 -0
- package/dist/components/chip/index.d.ts +608 -0
- package/dist/components/chip/index.js +20 -0
- package/dist/components/divider/index.cjs +13 -0
- package/dist/components/divider/index.d.cts +117 -0
- package/dist/components/divider/index.d.ts +117 -0
- package/dist/components/divider/index.js +13 -0
- package/dist/components/field-group/index.cjs +27 -0
- package/dist/components/field-group/index.d.cts +270 -0
- package/dist/components/field-group/index.d.ts +270 -0
- package/dist/components/field-group/index.js +27 -0
- package/dist/components/input-otp/index.cjs +29 -0
- package/dist/components/input-otp/index.d.cts +325 -0
- package/dist/components/input-otp/index.d.ts +325 -0
- package/dist/components/input-otp/index.js +29 -0
- package/dist/components/menu/index.cjs +49 -0
- package/dist/components/menu/index.d.cts +351 -0
- package/dist/components/menu/index.d.ts +351 -0
- package/dist/components/menu/index.js +49 -0
- package/dist/components/popover/index.cjs +38 -0
- package/dist/components/popover/index.d.cts +254 -0
- package/dist/components/popover/index.d.ts +254 -0
- package/dist/components/popover/index.js +38 -0
- package/dist/components/radio/index.cjs +26 -0
- package/dist/components/radio/index.d.cts +1102 -0
- package/dist/components/radio/index.d.ts +1102 -0
- package/dist/components/radio/index.js +26 -0
- package/dist/components/select/index.cjs +50 -0
- package/dist/components/select/index.d.cts +498 -0
- package/dist/components/select/index.d.ts +498 -0
- package/dist/components/select/index.js +50 -0
- package/dist/components/skeleton/index.cjs +11 -0
- package/dist/components/skeleton/index.d.cts +111 -0
- package/dist/components/skeleton/index.d.ts +111 -0
- package/dist/components/skeleton/index.js +11 -0
- package/dist/components/spinner/index.cjs +17 -0
- package/dist/components/spinner/index.d.cts +104 -0
- package/dist/components/spinner/index.d.ts +104 -0
- package/dist/components/spinner/index.js +17 -0
- package/dist/components/switch/index.cjs +27 -0
- package/dist/components/switch/index.d.cts +1154 -0
- package/dist/components/switch/index.d.ts +1154 -0
- package/dist/components/switch/index.js +27 -0
- package/dist/components/text-area/index.cjs +14 -0
- package/dist/components/text-area/index.d.cts +73 -0
- package/dist/components/text-area/index.d.ts +73 -0
- package/dist/components/text-area/index.js +14 -0
- package/dist/components/text-field/index.cjs +25 -0
- package/dist/components/text-field/index.d.cts +205 -0
- package/dist/components/text-field/index.d.ts +205 -0
- package/dist/components/text-field/index.js +25 -0
- package/dist/components/typography/index.cjs +15 -0
- package/dist/components/typography/index.d.cts +116 -0
- package/dist/components/typography/index.d.ts +116 -0
- package/dist/components/typography/index.js +15 -0
- package/dist/components/view/index.cjs +17 -0
- package/dist/components/view/index.d.cts +152 -0
- package/dist/components/view/index.d.ts +152 -0
- package/dist/components/view/index.js +17 -0
- package/dist/create-recipe-BdVd2ffi.d.ts +114 -0
- package/dist/create-recipe-dC7wMfnj.d.cts +114 -0
- package/dist/icon.type-Kml72iSz.d.ts +73 -0
- package/dist/icon.type-d_i9ma-i.d.cts +73 -0
- package/dist/index.cjs +400 -4
- package/dist/index.d.cts +118 -4
- package/dist/index.d.ts +118 -4
- package/dist/index.js +423 -27
- package/dist/placement-DHa0Rrh1.d.cts +38 -0
- package/dist/placement-DHa0Rrh1.d.ts +38 -0
- package/dist/pressable-feedback.type-BA2C9sSz.d.cts +127 -0
- package/dist/pressable-feedback.type-Bs4dQlGj.d.ts +127 -0
- package/dist/style-props.type-CfnoGEP7.d.cts +31 -0
- package/dist/style-props.type-CfnoGEP7.d.ts +31 -0
- package/dist/system/index.cjs +73 -4
- package/dist/system/index.d.cts +379 -193
- package/dist/system/index.d.ts +379 -193
- package/dist/system/index.js +87 -18
- package/dist/text-field.type-0l73acce.d.ts +167 -0
- package/dist/text-field.type-DBh06DU5.d.cts +167 -0
- package/dist/theme/index.cjs +5 -3
- package/dist/theme/index.d.cts +55 -24
- package/dist/theme/index.d.ts +55 -24
- package/dist/theme/index.js +4 -2
- package/dist/{theme.type-C9bFJKFm.d.cts → theme.type-C2gNHpEx.d.cts} +1 -1
- package/dist/{theme.type-C9bFJKFm.d.ts → theme.type-C2gNHpEx.d.ts} +1 -1
- package/package.json +254 -18
- package/dist/chunk-ECDWSSHJ.js +0 -688
- package/dist/chunk-IYFGO523.cjs +0 -688
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,120 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Accordion, AccordionContent, AccordionContentProps, AccordionContextValue, AccordionIndicator, AccordionIndicatorProps, AccordionItem, AccordionItemContextValue, AccordionItemProps, AccordionItemRenderState, AccordionProps, AccordionRoot, AccordionSelectionMode, AccordionSize, AccordionSlot, AccordionTrigger, AccordionTriggerProps, AccordionValue, AccordionVariant, accordionLayoutTransition, accordionRecipe, useAccordion, useAccordionItem } from './components/accordion/index.js';
|
|
2
|
+
export { Alert, AlertCloseProps, AlertContentProps, AlertContextValue, AlertDescriptionProps, AlertIconProps, AlertProps, AlertSize, AlertSlot, AlertTitleProps, AlertVariant, alertRecipe, useAlert } from './components/alert/index.js';
|
|
3
|
+
export { Avatar, AvatarContextValue, AvatarFallbackProps, AvatarImageProps, AvatarInitialsProps, AvatarProps, AvatarSize, AvatarSlot, AvatarVariant, avatarRecipe, useAvatar } from './components/avatar/index.js';
|
|
4
|
+
export { Badge, BadgePlacement, BadgeProps, BadgeSize, BadgeSlot, BadgeVariant, badgeRecipe, placementInsets } from './components/badge/index.js';
|
|
5
|
+
export { Button, ButtonContextValue, ButtonIconProps, ButtonLabelProps, ButtonProps, ButtonSize, ButtonSlot, ButtonSpinnerProps, ButtonVariant, buttonRecipe, useButton } from './components/button/index.js';
|
|
6
|
+
export { CARD_BACKGROUND, Card, CardBackgroundProps, CardBodyProps, CardContextValue, CardDescriptionProps, CardFooterProps, CardHeaderProps, CardProps, CardSize, CardSlot, CardTitleProps, CardVariant, cardRecipe, markBackground, useCard } from './components/card/index.js';
|
|
7
|
+
export { Checkbox, CheckboxContextValue, CheckboxIndicator, CheckboxIndicatorProps, CheckboxLabel, CheckboxLabelProps, CheckboxProps, CheckboxRoot, CheckboxSize, CheckboxSlot, CheckboxVariant, checkboxRecipe, useCheckbox } from './components/checkbox/index.js';
|
|
8
|
+
export { Chip, ChipAvatarProps, ChipCloseProps, ChipContextValue, ChipDotProps, ChipIconProps, ChipLabelProps, ChipProps, ChipSize, ChipSlot, ChipVariant, chipRecipe, useChip } from './components/chip/index.js';
|
|
9
|
+
export { Divider, DividerOrientation, DividerProps, DividerSize, DividerSlot, dividerRecipe } from './components/divider/index.js';
|
|
10
|
+
export { TextField, TextFieldDescription, TextFieldError, TextFieldField, TextFieldLabel, TextFieldRoot, textFieldRecipe, useTextField } from './components/text-field/index.js';
|
|
11
|
+
export { FieldGroup, FieldGroupContextValue, FieldGroupField, FieldGroupFieldProps, FieldGroupIcon, FieldGroupIconProps, FieldGroupPrefix, FieldGroupPrefixProps, FieldGroupProps, FieldGroupRoot, FieldGroupSide, FieldGroupSuffix, FieldGroupSuffixProps, decoratorPadding, useFieldGroup } from './components/field-group/index.js';
|
|
12
|
+
export { InputOTP, InputOTPBoxContextValue, InputOTPBoxProps, InputOTPCaretProps, InputOTPContextValue, InputOTPGroupProps, InputOTPHandle, InputOTPPattern, InputOTPPlaceholderProps, InputOTPProps, InputOTPRenderState, InputOTPSeparatorProps, InputOTPSize, InputOTPSlot, InputOTPValueProps, InputOTPVariant, OTPSlotState, OTP_ALPHANUMERIC, OTP_DIGITS, OTP_LETTERS, buildSlots, extractPastedCode, inputOTPRecipe, useInputOTP, useInputOTPBox } from './components/input-otp/index.js';
|
|
13
|
+
export { Menu, MenuAlign, MenuAnchor, MenuContent, MenuContentProps, MenuContextValue, MenuGroup, MenuGroupProps, MenuInsets, MenuItem, MenuItemContextValue, MenuItemDescription, MenuItemDescriptionProps, MenuItemIndicator, MenuItemIndicatorProps, MenuItemProps, MenuItemRenderState, MenuItemTitle, MenuItemTitleProps, MenuItemVariant, MenuLabel, MenuLabelProps, MenuOverlay, MenuOverlayProps, MenuPlacement, MenuProps, MenuRoot, MenuSeparator, MenuSeparatorProps, MenuSlot, MenuTrigger, MenuTriggerProps, MenuWidth, menuRecipe, useMenu, useMenuItem } from './components/menu/index.js';
|
|
14
|
+
export { Popover, PopoverAlign, PopoverAnchor, PopoverClose, PopoverCloseProps, PopoverContent, PopoverContentProps, PopoverContextValue, PopoverDescription, PopoverDescriptionProps, PopoverInsets, PopoverOverlay, PopoverOverlayProps, PopoverPlacement, PopoverProps, PopoverRoot, PopoverSlot, PopoverTitle, PopoverTitleProps, PopoverTrigger, PopoverTriggerProps, PopoverWidth, popoverRecipe, usePopover } from './components/popover/index.js';
|
|
15
|
+
export { Radio, RadioContextValue, RadioIndicator, RadioIndicatorProps, RadioLabel, RadioLabelProps, RadioProps, RadioRoot, RadioSize, RadioSlot, RadioVariant, radioRecipe, useRadio } from './components/radio/index.js';
|
|
16
|
+
export { CheckIcon, Select, SelectAlign, SelectAnchor, SelectContent, SelectContentProps, SelectContextValue, SelectIndicator, SelectIndicatorProps, SelectInsets, SelectItem, SelectItemContextValue, SelectItemDescription, SelectItemDescriptionProps, SelectItemIndicator, SelectItemIndicatorProps, SelectItemLabel, SelectItemLabelProps, SelectItemProps, SelectItemRenderState, SelectLabel, SelectLabelProps, SelectOverlay, SelectOverlayProps, SelectPlacement, SelectProps, SelectRoot, SelectSize, SelectSlot, SelectTrigger, SelectTriggerProps, SelectValue, SelectValueProps, SelectVariant, SelectWidth, selectRecipe, useSelect, useSelectItem } from './components/select/index.js';
|
|
17
|
+
export { Skeleton, SkeletonProps, SkeletonSlot, skeletonRecipe } from './components/skeleton/index.js';
|
|
18
|
+
export { Spinner, SpinnerProps, SpinnerSize, SpinnerSlot, SpinnerVariant, spinnerRecipe } from './components/spinner/index.js';
|
|
19
|
+
export { Switch, SwitchContextValue, SwitchLabel, SwitchLabelProps, SwitchProps, SwitchRoot, SwitchSize, SwitchSlot, SwitchThumb, SwitchThumbProps, SwitchTrack, SwitchTrackProps, SwitchVariant, switchRecipe, useSwitch } from './components/switch/index.js';
|
|
20
|
+
export { TextArea, TextAreaContextValue, TextAreaFieldProps, TextAreaProps, useTextArea } from './components/text-area/index.js';
|
|
21
|
+
export { TextSpan, TextSpanProps, Typography, TypographyProps, TypographySlot, TypographyVariant, typographyRecipe } from './components/typography/index.js';
|
|
22
|
+
export { AxisProps, Column, ColumnProps, Grid, GridContextValue, GridItemProps, GridProps, Row, RowProps, Stack, StackItemProps, StackProps, useGrid } from './components/view/index.js';
|
|
23
|
+
import { RefCallback } from 'react';
|
|
24
|
+
import { PossibleRef } from './system/index.js';
|
|
25
|
+
export { AsChildProps, ChevronDownIcon, CloseButton, CloseButtonSlots, FEEDBACK_OVERLAY, HIGHLIGHT_DURATION, HIGHLIGHT_OPACITY, INDICATOR_ROTATION, INDICATOR_SPRING, Icon, IconContext, MergeableProps, PRESS_DURATION, PRESS_SCALE, Portal, PortalContext, PortalHost, PortalHostProps, PortalMethods, PortalProps, PressableFeedback, PressableFeedbackHighlightProps, PressableFeedbackRippleProps, RIPPLE_CONFIRM_DURATION, RIPPLE_EXPAND_DURATION, RIPPLE_FADE_IN, RIPPLE_FADE_OUT, RIPPLE_FADE_OUT_DELAY, RIPPLE_OPACITY, RIPPLE_START_SCALE, SCALE_REFERENCE_WIDTH, SelectionFill, SelectionFillProps, Slot, SlotProps, anchoredEntering, anchoredExiting, childrenToString, closeButtonBase, createSlotContext, markOverlay, mergeProps, mergeRefs, overlayEntering, overlayExiting, pressScaleFor, radiusAxis, resolveAnimation, resolveSlotAnimation, rippleRadiusFor, useFeedback, useIconContext, useStyleProps } from './system/index.js';
|
|
26
|
+
import { GestureResponderEvent, ViewStyle } from 'react-native';
|
|
27
|
+
export { C as CloseButtonProps } from './close-button.type-BUYuoSt2.js';
|
|
28
|
+
export { b as IconComponentProps, I as IconContextValue, a as IconProps } from './icon.type-Kml72iSz.js';
|
|
29
|
+
export { A as Axes, C as CompoundVariant, R as Recipe, d as RecipeConfig, b as ResolveArgs, e as ResolvedSelection, f as ResolvedStyles, g as Selection, h as SlotStyle, S as SlotStyles, i as StateName, j as States, a as StyleFn, T as TintArgs, V as VariantColors, k as VariantRole, l as VariantTokens, c as createRecipe } from './create-recipe-BdVd2ffi.js';
|
|
30
|
+
export { D as DirectionalStyleKey, I as ImageStyleProps, S as StyleProps, T as TextStyleProps, V as ViewStyleProps } from './style-props.type-CfnoGEP7.js';
|
|
2
31
|
export { ColorModePreference, PaletteFamily, PaletteShade, ThemeContext, XAUIProvider, XAUIProviderProps, XAUITint, buildRadius, buildShadows, createTheme, defaultTheme, deriveColors, deriveTint, palette, primitives, sourceKeys, tokens, useColorMode, useThemeColor, useXAUITheme } from './theme/index.js';
|
|
3
|
-
export { C as ColorMode, F as FontSizeKey,
|
|
4
|
-
|
|
5
|
-
|
|
32
|
+
export { C as ColorMode, F as FontSizeKey, b as FontWeightKey, R as RadiusKey, S as Size, a as XAUIColors, c as XAUIDerivedColors, d as XAUIPrimitiveColors, e as XAUIRadius, f as XAUIShadow, g as XAUISourceColors, X as XAUITheme, h as XAUIThemeConfig, i as XAUIThemeSet } from './theme.type-C2gNHpEx.js';
|
|
33
|
+
export { b as TextFieldContextValue, c as TextFieldDescriptionProps, d as TextFieldErrorProps, T as TextFieldFieldProps, e as TextFieldLabelPlacement, f as TextFieldLabelProps, a as TextFieldProps, g as TextFieldSize, h as TextFieldSlot, i as TextFieldVariant } from './text-field.type-0l73acce.js';
|
|
34
|
+
export { A as AnimationConfig, a as AnimationProp, F as FeedbackContext, P as PressableFeedbackProps, R as RadiusStyle, b as ResolvedAnimation, c as RippleWave, S as SlotAnimation } from './pressable-feedback.type-Bs4dQlGj.js';
|
|
6
35
|
import 'react-native-reanimated';
|
|
36
|
+
import './placement-DHa0Rrh1.js';
|
|
37
|
+
|
|
38
|
+
type ControllableStateOptions<T> = {
|
|
39
|
+
/** Present means controlled: the caller owns the value and this never stores one. */
|
|
40
|
+
value?: T;
|
|
41
|
+
/** The starting value when uncontrolled. */
|
|
42
|
+
defaultValue: T;
|
|
43
|
+
/** Called with every new value, controlled or not. */
|
|
44
|
+
onChange?: (value: T) => void;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* One state that works both ways, so a component never has two code paths for "the
|
|
48
|
+
* caller drives this" and "we do".
|
|
49
|
+
*
|
|
50
|
+
* The setter is stable across renders and reads the current value from a ref, so a
|
|
51
|
+
* handler built on it can be passed to a memoized child without rebuilding it on every
|
|
52
|
+
* render — which is the whole reason components reach for this rather than a local
|
|
53
|
+
* `useState` plus an `if`.
|
|
54
|
+
*/
|
|
55
|
+
declare function useControllableState<T>({ value, defaultValue, onChange, }: ControllableStateOptions<T>): [T, (next: T | ((current: T) => T)) => void];
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* `mergeRefs` for a component that renders: memoized on the refs it was given, so React
|
|
59
|
+
* does not detach and reattach every one of them on each render — which it does whenever
|
|
60
|
+
* a ref callback changes identity, and which costs a node measurement every time.
|
|
61
|
+
*/
|
|
62
|
+
declare function useMergedRef<T>(...refs: Array<PossibleRef<T>>): RefCallback<T>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* `null` as much as `undefined`: that is how `PressableProps` types its handlers, and a
|
|
66
|
+
* root forwarding what it was given should not have to launder them first.
|
|
67
|
+
*/
|
|
68
|
+
type PressHandlers = {
|
|
69
|
+
onPressIn?: PressHandler | null;
|
|
70
|
+
onPressOut?: PressHandler | null;
|
|
71
|
+
};
|
|
72
|
+
type PressHandler = (event: GestureResponderEvent) => void;
|
|
73
|
+
/**
|
|
74
|
+
* The press state a root owns, with the handlers that maintain it.
|
|
75
|
+
*
|
|
76
|
+
* It exists because every pressable component needs the same three things and gets one
|
|
77
|
+
* of them wrong on its own: the state has to be *up here* — the recipe resolves on it
|
|
78
|
+
* (R5) — the caller's handlers must be **composed, never replaced**, and the returned
|
|
79
|
+
* handlers must keep their identity so passing them down does not defeat a memo.
|
|
80
|
+
*
|
|
81
|
+
* ```tsx
|
|
82
|
+
* const [isPressed, pressHandlers] = usePressState(props)
|
|
83
|
+
* const styles = recipe.resolve({ theme, selection, states: { pressed: isPressed } })
|
|
84
|
+
* <PressableFeedback isPressed={isPressed} {...pressHandlers} />
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
declare function usePressState(handlers?: PressHandlers): [boolean, {
|
|
88
|
+
onPressIn: PressHandler;
|
|
89
|
+
onPressOut: PressHandler;
|
|
90
|
+
}];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The value from the render before this one, `undefined` on the first.
|
|
94
|
+
*
|
|
95
|
+
* Written in an effect rather than during render on purpose: reading it mid-render would
|
|
96
|
+
* make "previous" mean something different depending on whether React re-ran the render,
|
|
97
|
+
* which under StrictMode it does.
|
|
98
|
+
*/
|
|
99
|
+
declare function usePrevious<T>(value: T): T | undefined;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* One turn. Slow enough to read as waiting, fast enough not to read as stuck — HeroUI
|
|
103
|
+
* arrives at the same figure from the other side, a 1000ms turn played at 1.1×.
|
|
104
|
+
*
|
|
105
|
+
* It is a constant rather than a parameter because the library turns at one speed: two
|
|
106
|
+
* spinners on one screen at two rates is a bug, and the only way to be sure of that is
|
|
107
|
+
* for there to be one number.
|
|
108
|
+
*/
|
|
109
|
+
declare const ROTATION_DURATION = 900;
|
|
110
|
+
/**
|
|
111
|
+
* A full turn, repeating, on the UI thread. Returns the animated style to merge onto the
|
|
112
|
+
* node that spins.
|
|
113
|
+
*
|
|
114
|
+
* **A caller that must animate nothing does not call it.** Hooks cannot be conditional,
|
|
115
|
+
* so "no animation" is only true if this one is never reached — which is why both call
|
|
116
|
+
* sites render two components rather than branch inside one.
|
|
117
|
+
*/
|
|
118
|
+
declare function useRotation(): ViewStyle;
|
|
119
|
+
|
|
120
|
+
export { type ControllableStateOptions, PossibleRef, type PressHandlers, ROTATION_DURATION, useControllableState, useMergedRef, usePressState, usePrevious, useRotation };
|
package/dist/index.js
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HIGHLIGHT_OPACITY,
|
|
3
|
-
PRESS_DURATION,
|
|
4
|
-
PRESS_SCALE,
|
|
5
|
-
Portal,
|
|
6
|
-
PortalContext,
|
|
7
|
-
PortalHost,
|
|
8
|
-
PressableFeedback,
|
|
9
|
-
RELEASE_DURATION,
|
|
10
|
-
RIPPLE_COVERAGE,
|
|
11
|
-
RIPPLE_DURATION,
|
|
12
|
-
RIPPLE_OPACITY,
|
|
13
|
-
Slot,
|
|
14
|
-
childrenToString,
|
|
15
|
-
createRecipe,
|
|
16
|
-
createSlotContext,
|
|
17
|
-
mergeProps,
|
|
18
|
-
mergeRefs,
|
|
19
|
-
resolveAnimation,
|
|
20
|
-
resolveSlotAnimation,
|
|
21
|
-
useFeedback
|
|
22
|
-
} from "./chunk-ECDWSSHJ.js";
|
|
23
1
|
import {
|
|
24
2
|
XAUIProvider,
|
|
25
3
|
buildRadius,
|
|
@@ -31,48 +9,466 @@ import {
|
|
|
31
9
|
primitives,
|
|
32
10
|
sourceKeys,
|
|
33
11
|
tokens
|
|
34
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WKCQ6VGW.js";
|
|
13
|
+
import {
|
|
14
|
+
Skeleton,
|
|
15
|
+
skeletonRecipe
|
|
16
|
+
} from "./chunk-IKJVLJKT.js";
|
|
17
|
+
import {
|
|
18
|
+
Spinner,
|
|
19
|
+
spinnerRecipe
|
|
20
|
+
} from "./chunk-LTX6TB5I.js";
|
|
21
|
+
import {
|
|
22
|
+
Switch,
|
|
23
|
+
SwitchLabel,
|
|
24
|
+
SwitchRoot,
|
|
25
|
+
SwitchThumb,
|
|
26
|
+
SwitchTrack,
|
|
27
|
+
switchRecipe,
|
|
28
|
+
useSwitch
|
|
29
|
+
} from "./chunk-DHGLGSH6.js";
|
|
30
|
+
import {
|
|
31
|
+
TextArea,
|
|
32
|
+
useTextArea
|
|
33
|
+
} from "./chunk-YVHT2UVW.js";
|
|
34
|
+
import {
|
|
35
|
+
TextSpan,
|
|
36
|
+
Typography,
|
|
37
|
+
typographyRecipe
|
|
38
|
+
} from "./chunk-73RKQC5X.js";
|
|
39
|
+
import {
|
|
40
|
+
Column,
|
|
41
|
+
Grid,
|
|
42
|
+
Row,
|
|
43
|
+
Stack,
|
|
44
|
+
useGrid
|
|
45
|
+
} from "./chunk-XTC2SLFT.js";
|
|
46
|
+
import "./chunk-WHJTBTYM.js";
|
|
47
|
+
import {
|
|
48
|
+
Chip,
|
|
49
|
+
chipRecipe,
|
|
50
|
+
useChip
|
|
51
|
+
} from "./chunk-BRRXFOBY.js";
|
|
52
|
+
import {
|
|
53
|
+
Divider,
|
|
54
|
+
dividerRecipe
|
|
55
|
+
} from "./chunk-4CUZZWFW.js";
|
|
56
|
+
import {
|
|
57
|
+
FieldGroup,
|
|
58
|
+
FieldGroupField,
|
|
59
|
+
FieldGroupIcon,
|
|
60
|
+
FieldGroupPrefix,
|
|
61
|
+
FieldGroupRoot,
|
|
62
|
+
FieldGroupSuffix,
|
|
63
|
+
decoratorPadding,
|
|
64
|
+
useFieldGroup
|
|
65
|
+
} from "./chunk-GA6PBWNT.js";
|
|
66
|
+
import {
|
|
67
|
+
TextField,
|
|
68
|
+
TextFieldDescription,
|
|
69
|
+
TextFieldError,
|
|
70
|
+
TextFieldField,
|
|
71
|
+
TextFieldLabel,
|
|
72
|
+
TextFieldRoot,
|
|
73
|
+
textFieldRecipe,
|
|
74
|
+
useTextField
|
|
75
|
+
} from "./chunk-2NRZKJG7.js";
|
|
76
|
+
import {
|
|
77
|
+
InputOTP,
|
|
78
|
+
OTP_ALPHANUMERIC,
|
|
79
|
+
OTP_DIGITS,
|
|
80
|
+
OTP_LETTERS,
|
|
81
|
+
buildSlots,
|
|
82
|
+
extractPastedCode,
|
|
83
|
+
inputOTPRecipe,
|
|
84
|
+
useInputOTP,
|
|
85
|
+
useInputOTPBox
|
|
86
|
+
} from "./chunk-DG2I4PJG.js";
|
|
87
|
+
import {
|
|
88
|
+
Menu,
|
|
89
|
+
Menu2,
|
|
90
|
+
MenuContent,
|
|
91
|
+
MenuGroup,
|
|
92
|
+
MenuItem,
|
|
93
|
+
MenuItemDescription,
|
|
94
|
+
MenuItemIndicator,
|
|
95
|
+
MenuItemTitle,
|
|
96
|
+
MenuLabel,
|
|
97
|
+
MenuOverlay,
|
|
98
|
+
MenuSeparator,
|
|
99
|
+
MenuTrigger,
|
|
100
|
+
menuRecipe,
|
|
101
|
+
useMenu,
|
|
102
|
+
useMenuItem
|
|
103
|
+
} from "./chunk-5VKYNBNA.js";
|
|
104
|
+
import {
|
|
105
|
+
Popover,
|
|
106
|
+
Popover2,
|
|
107
|
+
PopoverClose,
|
|
108
|
+
PopoverContent,
|
|
109
|
+
PopoverDescription,
|
|
110
|
+
PopoverOverlay,
|
|
111
|
+
PopoverTitle,
|
|
112
|
+
PopoverTrigger,
|
|
113
|
+
popoverRecipe,
|
|
114
|
+
usePopover
|
|
115
|
+
} from "./chunk-EZEYMLO3.js";
|
|
116
|
+
import "./chunk-734MFAX4.js";
|
|
117
|
+
import {
|
|
118
|
+
Radio,
|
|
119
|
+
RadioIndicator,
|
|
120
|
+
RadioLabel,
|
|
121
|
+
RadioRoot,
|
|
122
|
+
radioRecipe,
|
|
123
|
+
useRadio
|
|
124
|
+
} from "./chunk-N3KTZMPG.js";
|
|
125
|
+
import {
|
|
126
|
+
CheckIcon,
|
|
127
|
+
Select,
|
|
128
|
+
Select2,
|
|
129
|
+
SelectContent,
|
|
130
|
+
SelectIndicator,
|
|
131
|
+
SelectItem,
|
|
132
|
+
SelectItemDescription,
|
|
133
|
+
SelectItemIndicator,
|
|
134
|
+
SelectItemLabel,
|
|
135
|
+
SelectLabel,
|
|
136
|
+
SelectOverlay,
|
|
137
|
+
SelectTrigger,
|
|
138
|
+
SelectValue,
|
|
139
|
+
selectRecipe,
|
|
140
|
+
useSelect,
|
|
141
|
+
useSelectItem
|
|
142
|
+
} from "./chunk-LRN3RNDO.js";
|
|
143
|
+
import "./chunk-2EGR4LWD.js";
|
|
144
|
+
import {
|
|
145
|
+
Portal,
|
|
146
|
+
PortalContext,
|
|
147
|
+
PortalHost
|
|
148
|
+
} from "./chunk-2PMXMKS5.js";
|
|
149
|
+
import {
|
|
150
|
+
Accordion,
|
|
151
|
+
AccordionContent,
|
|
152
|
+
AccordionIndicator,
|
|
153
|
+
AccordionItem,
|
|
154
|
+
AccordionRoot,
|
|
155
|
+
AccordionTrigger,
|
|
156
|
+
LAYOUT,
|
|
157
|
+
accordionRecipe,
|
|
158
|
+
useAccordion,
|
|
159
|
+
useAccordionItem
|
|
160
|
+
} from "./chunk-2XPG2243.js";
|
|
161
|
+
import {
|
|
162
|
+
INDICATOR_ROTATION,
|
|
163
|
+
INDICATOR_SPRING,
|
|
164
|
+
anchoredEntering,
|
|
165
|
+
anchoredExiting,
|
|
166
|
+
overlayEntering,
|
|
167
|
+
overlayExiting
|
|
168
|
+
} from "./chunk-64MXEVT3.js";
|
|
169
|
+
import {
|
|
170
|
+
Alert,
|
|
171
|
+
alertRecipe,
|
|
172
|
+
useAlert
|
|
173
|
+
} from "./chunk-DD4276RF.js";
|
|
174
|
+
import {
|
|
175
|
+
CloseButton,
|
|
176
|
+
closeButtonBase
|
|
177
|
+
} from "./chunk-KCMYU7WF.js";
|
|
178
|
+
import {
|
|
179
|
+
Avatar,
|
|
180
|
+
avatarRecipe,
|
|
181
|
+
useAvatar
|
|
182
|
+
} from "./chunk-UFTCTTKK.js";
|
|
183
|
+
import {
|
|
184
|
+
Badge,
|
|
185
|
+
badgeRecipe,
|
|
186
|
+
placementInsets
|
|
187
|
+
} from "./chunk-H7DS4IO7.js";
|
|
188
|
+
import {
|
|
189
|
+
Button,
|
|
190
|
+
buttonRecipe,
|
|
191
|
+
useButton
|
|
192
|
+
} from "./chunk-YGYYJ3LQ.js";
|
|
193
|
+
import {
|
|
194
|
+
ROTATION_DURATION,
|
|
195
|
+
usePrevious,
|
|
196
|
+
useRotation
|
|
197
|
+
} from "./chunk-3GFRSZYR.js";
|
|
198
|
+
import {
|
|
199
|
+
useMergedRef
|
|
200
|
+
} from "./chunk-NCTOTTVW.js";
|
|
201
|
+
import {
|
|
202
|
+
ChevronDownIcon,
|
|
203
|
+
Icon,
|
|
204
|
+
IconContext,
|
|
205
|
+
useIconContext
|
|
206
|
+
} from "./chunk-FHUYHV6J.js";
|
|
207
|
+
import {
|
|
208
|
+
CARD_BACKGROUND,
|
|
209
|
+
Card,
|
|
210
|
+
cardRecipe,
|
|
211
|
+
markBackground,
|
|
212
|
+
useCard
|
|
213
|
+
} from "./chunk-XFPQFCEK.js";
|
|
214
|
+
import {
|
|
215
|
+
Checkbox,
|
|
216
|
+
CheckboxIndicator,
|
|
217
|
+
CheckboxLabel,
|
|
218
|
+
CheckboxRoot,
|
|
219
|
+
checkboxRecipe,
|
|
220
|
+
useCheckbox
|
|
221
|
+
} from "./chunk-DIBUQ46Y.js";
|
|
222
|
+
import {
|
|
223
|
+
SelectionFill
|
|
224
|
+
} from "./chunk-BA2DBSAN.js";
|
|
225
|
+
import {
|
|
226
|
+
useControllableState
|
|
227
|
+
} from "./chunk-F6W3JQ7K.js";
|
|
228
|
+
import {
|
|
229
|
+
FEEDBACK_OVERLAY,
|
|
230
|
+
HIGHLIGHT_DURATION,
|
|
231
|
+
HIGHLIGHT_OPACITY,
|
|
232
|
+
PRESS_DURATION,
|
|
233
|
+
PRESS_SCALE,
|
|
234
|
+
PressableFeedback,
|
|
235
|
+
RIPPLE_CONFIRM_DURATION,
|
|
236
|
+
RIPPLE_EXPAND_DURATION,
|
|
237
|
+
RIPPLE_FADE_IN,
|
|
238
|
+
RIPPLE_FADE_OUT,
|
|
239
|
+
RIPPLE_FADE_OUT_DELAY,
|
|
240
|
+
RIPPLE_OPACITY,
|
|
241
|
+
RIPPLE_START_SCALE,
|
|
242
|
+
SCALE_REFERENCE_WIDTH,
|
|
243
|
+
markOverlay,
|
|
244
|
+
pressScaleFor,
|
|
245
|
+
resolveAnimation,
|
|
246
|
+
resolveSlotAnimation,
|
|
247
|
+
rippleRadiusFor,
|
|
248
|
+
useFeedback
|
|
249
|
+
} from "./chunk-6UEZJRVI.js";
|
|
250
|
+
import {
|
|
251
|
+
usePressState
|
|
252
|
+
} from "./chunk-423RQBOX.js";
|
|
253
|
+
import "./chunk-EGLLDKN6.js";
|
|
254
|
+
import {
|
|
255
|
+
createRecipe,
|
|
256
|
+
radiusAxis
|
|
257
|
+
} from "./chunk-4GTAZM2C.js";
|
|
35
258
|
import {
|
|
36
259
|
ThemeContext,
|
|
37
260
|
deriveTint,
|
|
38
261
|
useColorMode,
|
|
39
262
|
useThemeColor,
|
|
40
263
|
useXAUITheme
|
|
41
|
-
} from "./chunk-
|
|
264
|
+
} from "./chunk-A3EGFI6T.js";
|
|
265
|
+
import {
|
|
266
|
+
Slot,
|
|
267
|
+
childrenToString,
|
|
268
|
+
createSlotContext,
|
|
269
|
+
mergeProps
|
|
270
|
+
} from "./chunk-K72UDPVN.js";
|
|
271
|
+
import {
|
|
272
|
+
mergeRefs
|
|
273
|
+
} from "./chunk-36PRYGAM.js";
|
|
274
|
+
import {
|
|
275
|
+
useStyleProps
|
|
276
|
+
} from "./chunk-M63GFNKV.js";
|
|
42
277
|
export {
|
|
278
|
+
Accordion,
|
|
279
|
+
AccordionContent,
|
|
280
|
+
AccordionIndicator,
|
|
281
|
+
AccordionItem,
|
|
282
|
+
AccordionRoot,
|
|
283
|
+
AccordionTrigger,
|
|
284
|
+
Alert,
|
|
285
|
+
Avatar,
|
|
286
|
+
Badge,
|
|
287
|
+
Button,
|
|
288
|
+
CARD_BACKGROUND,
|
|
289
|
+
Card,
|
|
290
|
+
CheckIcon,
|
|
291
|
+
Checkbox,
|
|
292
|
+
CheckboxIndicator,
|
|
293
|
+
CheckboxLabel,
|
|
294
|
+
CheckboxRoot,
|
|
295
|
+
ChevronDownIcon,
|
|
296
|
+
Chip,
|
|
297
|
+
CloseButton,
|
|
298
|
+
Column,
|
|
299
|
+
Divider,
|
|
300
|
+
FEEDBACK_OVERLAY,
|
|
301
|
+
FieldGroup,
|
|
302
|
+
FieldGroupField,
|
|
303
|
+
FieldGroupIcon,
|
|
304
|
+
FieldGroupPrefix,
|
|
305
|
+
FieldGroupRoot,
|
|
306
|
+
FieldGroupSuffix,
|
|
307
|
+
Grid,
|
|
308
|
+
HIGHLIGHT_DURATION,
|
|
43
309
|
HIGHLIGHT_OPACITY,
|
|
310
|
+
INDICATOR_ROTATION,
|
|
311
|
+
INDICATOR_SPRING,
|
|
312
|
+
Icon,
|
|
313
|
+
IconContext,
|
|
314
|
+
InputOTP,
|
|
315
|
+
Menu2 as Menu,
|
|
316
|
+
MenuContent,
|
|
317
|
+
MenuGroup,
|
|
318
|
+
MenuItem,
|
|
319
|
+
MenuItemDescription,
|
|
320
|
+
MenuItemIndicator,
|
|
321
|
+
MenuItemTitle,
|
|
322
|
+
MenuLabel,
|
|
323
|
+
MenuOverlay,
|
|
324
|
+
Menu as MenuRoot,
|
|
325
|
+
MenuSeparator,
|
|
326
|
+
MenuTrigger,
|
|
327
|
+
OTP_ALPHANUMERIC,
|
|
328
|
+
OTP_DIGITS,
|
|
329
|
+
OTP_LETTERS,
|
|
44
330
|
PRESS_DURATION,
|
|
45
331
|
PRESS_SCALE,
|
|
332
|
+
Popover2 as Popover,
|
|
333
|
+
PopoverClose,
|
|
334
|
+
PopoverContent,
|
|
335
|
+
PopoverDescription,
|
|
336
|
+
PopoverOverlay,
|
|
337
|
+
Popover as PopoverRoot,
|
|
338
|
+
PopoverTitle,
|
|
339
|
+
PopoverTrigger,
|
|
46
340
|
Portal,
|
|
47
341
|
PortalContext,
|
|
48
342
|
PortalHost,
|
|
49
343
|
PressableFeedback,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
344
|
+
RIPPLE_CONFIRM_DURATION,
|
|
345
|
+
RIPPLE_EXPAND_DURATION,
|
|
346
|
+
RIPPLE_FADE_IN,
|
|
347
|
+
RIPPLE_FADE_OUT,
|
|
348
|
+
RIPPLE_FADE_OUT_DELAY,
|
|
53
349
|
RIPPLE_OPACITY,
|
|
350
|
+
RIPPLE_START_SCALE,
|
|
351
|
+
ROTATION_DURATION,
|
|
352
|
+
Radio,
|
|
353
|
+
RadioIndicator,
|
|
354
|
+
RadioLabel,
|
|
355
|
+
RadioRoot,
|
|
356
|
+
Row,
|
|
357
|
+
SCALE_REFERENCE_WIDTH,
|
|
358
|
+
Select2 as Select,
|
|
359
|
+
SelectContent,
|
|
360
|
+
SelectIndicator,
|
|
361
|
+
SelectItem,
|
|
362
|
+
SelectItemDescription,
|
|
363
|
+
SelectItemIndicator,
|
|
364
|
+
SelectItemLabel,
|
|
365
|
+
SelectLabel,
|
|
366
|
+
SelectOverlay,
|
|
367
|
+
Select as SelectRoot,
|
|
368
|
+
SelectTrigger,
|
|
369
|
+
SelectValue,
|
|
370
|
+
SelectionFill,
|
|
371
|
+
Skeleton,
|
|
54
372
|
Slot,
|
|
373
|
+
Spinner,
|
|
374
|
+
Stack,
|
|
375
|
+
Switch,
|
|
376
|
+
SwitchLabel,
|
|
377
|
+
SwitchRoot,
|
|
378
|
+
SwitchThumb,
|
|
379
|
+
SwitchTrack,
|
|
380
|
+
TextArea,
|
|
381
|
+
TextField,
|
|
382
|
+
TextFieldDescription,
|
|
383
|
+
TextFieldError,
|
|
384
|
+
TextFieldField,
|
|
385
|
+
TextFieldLabel,
|
|
386
|
+
TextFieldRoot,
|
|
387
|
+
TextSpan,
|
|
55
388
|
ThemeContext,
|
|
389
|
+
Typography,
|
|
56
390
|
XAUIProvider,
|
|
391
|
+
LAYOUT as accordionLayoutTransition,
|
|
392
|
+
accordionRecipe,
|
|
393
|
+
alertRecipe,
|
|
394
|
+
anchoredEntering,
|
|
395
|
+
anchoredExiting,
|
|
396
|
+
avatarRecipe,
|
|
397
|
+
badgeRecipe,
|
|
57
398
|
buildRadius,
|
|
58
399
|
buildShadows,
|
|
400
|
+
buildSlots,
|
|
401
|
+
buttonRecipe,
|
|
402
|
+
cardRecipe,
|
|
403
|
+
checkboxRecipe,
|
|
59
404
|
childrenToString,
|
|
405
|
+
chipRecipe,
|
|
406
|
+
closeButtonBase,
|
|
60
407
|
createRecipe,
|
|
61
408
|
createSlotContext,
|
|
62
409
|
createTheme,
|
|
410
|
+
decoratorPadding,
|
|
63
411
|
defaultTheme,
|
|
64
412
|
deriveColors,
|
|
65
413
|
deriveTint,
|
|
414
|
+
dividerRecipe,
|
|
415
|
+
extractPastedCode,
|
|
416
|
+
inputOTPRecipe,
|
|
417
|
+
markBackground,
|
|
418
|
+
markOverlay,
|
|
419
|
+
menuRecipe,
|
|
66
420
|
mergeProps,
|
|
67
421
|
mergeRefs,
|
|
422
|
+
overlayEntering,
|
|
423
|
+
overlayExiting,
|
|
68
424
|
palette,
|
|
425
|
+
placementInsets,
|
|
426
|
+
popoverRecipe,
|
|
427
|
+
pressScaleFor,
|
|
69
428
|
primitives,
|
|
429
|
+
radioRecipe,
|
|
430
|
+
radiusAxis,
|
|
70
431
|
resolveAnimation,
|
|
71
432
|
resolveSlotAnimation,
|
|
433
|
+
rippleRadiusFor,
|
|
434
|
+
selectRecipe,
|
|
435
|
+
skeletonRecipe,
|
|
72
436
|
sourceKeys,
|
|
437
|
+
spinnerRecipe,
|
|
438
|
+
switchRecipe,
|
|
439
|
+
textFieldRecipe,
|
|
73
440
|
tokens,
|
|
441
|
+
typographyRecipe,
|
|
442
|
+
useAccordion,
|
|
443
|
+
useAccordionItem,
|
|
444
|
+
useAlert,
|
|
445
|
+
useAvatar,
|
|
446
|
+
useButton,
|
|
447
|
+
useCard,
|
|
448
|
+
useCheckbox,
|
|
449
|
+
useChip,
|
|
74
450
|
useColorMode,
|
|
451
|
+
useControllableState,
|
|
75
452
|
useFeedback,
|
|
453
|
+
useFieldGroup,
|
|
454
|
+
useGrid,
|
|
455
|
+
useIconContext,
|
|
456
|
+
useInputOTP,
|
|
457
|
+
useInputOTPBox,
|
|
458
|
+
useMenu,
|
|
459
|
+
useMenuItem,
|
|
460
|
+
useMergedRef,
|
|
461
|
+
usePopover,
|
|
462
|
+
usePressState,
|
|
463
|
+
usePrevious,
|
|
464
|
+
useRadio,
|
|
465
|
+
useRotation,
|
|
466
|
+
useSelect,
|
|
467
|
+
useSelectItem,
|
|
468
|
+
useStyleProps,
|
|
469
|
+
useSwitch,
|
|
470
|
+
useTextArea,
|
|
471
|
+
useTextField,
|
|
76
472
|
useThemeColor,
|
|
77
473
|
useXAUITheme
|
|
78
474
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a floating panel lands against the thing that opened it, as four numbers.
|
|
3
|
+
*
|
|
4
|
+
* Pure on purpose, and shared: positioning an overlay is the one part of a `Select`, a
|
|
5
|
+
* `Popover` or a `Menu` that is arithmetic rather than rendering, and arithmetic that runs
|
|
6
|
+
* once per open is arithmetic worth a test rather than a screenshot.
|
|
7
|
+
*
|
|
8
|
+
* Everything here is in the coordinate space of whatever the panel is laid out in — the
|
|
9
|
+
* caller subtracts the portal host's own origin before calling, because the trigger
|
|
10
|
+
* reports itself against the window and the panel is not laid out in the window.
|
|
11
|
+
*/
|
|
12
|
+
/** `start` and `end` rather than `left` and `right` (R13): the sides mirror in RTL. */
|
|
13
|
+
type Placement = 'top' | 'bottom' | 'start' | 'end';
|
|
14
|
+
/** Where the panel lines up along the edge it is pinned to. */
|
|
15
|
+
type Align = 'start' | 'center' | 'end';
|
|
16
|
+
/** The trigger's rectangle. */
|
|
17
|
+
type Anchor = {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* `trigger` matches the anchor exactly. `content-fit` hugs what the panel measured at,
|
|
25
|
+
* which the component bounds with a measure of its own. `full` is the screen less its
|
|
26
|
+
* insets — the way to say "yes, actually, all of it", which nothing else in the union can
|
|
27
|
+
* express: a number is a guess at the screen's width, and `content-fit` refuses on purpose.
|
|
28
|
+
*/
|
|
29
|
+
type AnchoredWidth = number | 'trigger' | 'content-fit' | 'full';
|
|
30
|
+
/** Screen edges the panel refuses to cross, in points. */
|
|
31
|
+
type Insets = {
|
|
32
|
+
top?: number;
|
|
33
|
+
bottom?: number;
|
|
34
|
+
start?: number;
|
|
35
|
+
end?: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type { Align as A, Insets as I, Placement as P, AnchoredWidth as a, Anchor as b };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where a floating panel lands against the thing that opened it, as four numbers.
|
|
3
|
+
*
|
|
4
|
+
* Pure on purpose, and shared: positioning an overlay is the one part of a `Select`, a
|
|
5
|
+
* `Popover` or a `Menu` that is arithmetic rather than rendering, and arithmetic that runs
|
|
6
|
+
* once per open is arithmetic worth a test rather than a screenshot.
|
|
7
|
+
*
|
|
8
|
+
* Everything here is in the coordinate space of whatever the panel is laid out in — the
|
|
9
|
+
* caller subtracts the portal host's own origin before calling, because the trigger
|
|
10
|
+
* reports itself against the window and the panel is not laid out in the window.
|
|
11
|
+
*/
|
|
12
|
+
/** `start` and `end` rather than `left` and `right` (R13): the sides mirror in RTL. */
|
|
13
|
+
type Placement = 'top' | 'bottom' | 'start' | 'end';
|
|
14
|
+
/** Where the panel lines up along the edge it is pinned to. */
|
|
15
|
+
type Align = 'start' | 'center' | 'end';
|
|
16
|
+
/** The trigger's rectangle. */
|
|
17
|
+
type Anchor = {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
width: number;
|
|
21
|
+
height: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* `trigger` matches the anchor exactly. `content-fit` hugs what the panel measured at,
|
|
25
|
+
* which the component bounds with a measure of its own. `full` is the screen less its
|
|
26
|
+
* insets — the way to say "yes, actually, all of it", which nothing else in the union can
|
|
27
|
+
* express: a number is a guess at the screen's width, and `content-fit` refuses on purpose.
|
|
28
|
+
*/
|
|
29
|
+
type AnchoredWidth = number | 'trigger' | 'content-fit' | 'full';
|
|
30
|
+
/** Screen edges the panel refuses to cross, in points. */
|
|
31
|
+
type Insets = {
|
|
32
|
+
top?: number;
|
|
33
|
+
bottom?: number;
|
|
34
|
+
start?: number;
|
|
35
|
+
end?: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export type { Align as A, Insets as I, Placement as P, AnchoredWidth as a, Anchor as b };
|