@radix-ui/react-select 1.2.2-rc.9 → 2.0.0-rc.1

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.
@@ -0,0 +1,128 @@
1
+ import * as React from "react";
2
+ import { DismissableLayer } from "@radix-ui/react-dismissable-layer";
3
+ import { FocusScope } from "@radix-ui/react-focus-scope";
4
+ import * as PopperPrimitive from "@radix-ui/react-popper";
5
+ import { Portal as _Portal1 } from "@radix-ui/react-portal";
6
+ import * as Radix from "@radix-ui/react-primitive";
7
+ import { Primitive } from "@radix-ui/react-primitive";
8
+ type Direction = 'ltr' | 'rtl';
9
+ export const createSelectScope: import("@radix-ui/react-context").CreateScope;
10
+ export interface SelectProps {
11
+ children?: React.ReactNode;
12
+ value?: string;
13
+ defaultValue?: string;
14
+ onValueChange?(value: string): void;
15
+ open?: boolean;
16
+ defaultOpen?: boolean;
17
+ onOpenChange?(open: boolean): void;
18
+ dir?: Direction;
19
+ name?: string;
20
+ autoComplete?: string;
21
+ disabled?: boolean;
22
+ required?: boolean;
23
+ }
24
+ export const Select: React.FC<SelectProps>;
25
+ type PrimitiveButtonProps = Radix.ComponentPropsWithoutRef<typeof Primitive.button>;
26
+ export interface SelectTriggerProps extends PrimitiveButtonProps {
27
+ }
28
+ export const SelectTrigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
29
+ type PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;
30
+ export interface SelectValueProps extends Omit<PrimitiveSpanProps, 'placeholder'> {
31
+ placeholder?: React.ReactNode;
32
+ }
33
+ export const SelectValue: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
34
+ export interface SelectIconProps extends PrimitiveSpanProps {
35
+ }
36
+ export const SelectIcon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
37
+ type PortalProps = React.ComponentPropsWithoutRef<typeof _Portal1>;
38
+ export interface SelectPortalProps extends Omit<PortalProps, 'asChild'> {
39
+ children?: React.ReactNode;
40
+ }
41
+ export const SelectPortal: React.FC<SelectPortalProps>;
42
+ export interface SelectContentProps extends SelectContentImplProps {
43
+ }
44
+ export const SelectContent: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
45
+ type DismissableLayerProps = React.ComponentPropsWithoutRef<typeof DismissableLayer>;
46
+ type FocusScopeProps = Radix.ComponentPropsWithoutRef<typeof FocusScope>;
47
+ type SelectPopperPrivateProps = {
48
+ onPlaced?: PopperContentProps['onPlaced'];
49
+ };
50
+ interface SelectContentImplProps extends Omit<SelectPopperPositionProps, keyof SelectPopperPrivateProps>, Omit<SelectItemAlignedPositionProps, keyof SelectPopperPrivateProps> {
51
+ /**
52
+ * Event handler called when auto-focusing on close.
53
+ * Can be prevented.
54
+ */
55
+ onCloseAutoFocus?: FocusScopeProps['onUnmountAutoFocus'];
56
+ /**
57
+ * Event handler called when the escape key is down.
58
+ * Can be prevented.
59
+ */
60
+ onEscapeKeyDown?: DismissableLayerProps['onEscapeKeyDown'];
61
+ /**
62
+ * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.
63
+ * Can be prevented.
64
+ */
65
+ onPointerDownOutside?: DismissableLayerProps['onPointerDownOutside'];
66
+ position?: 'item-aligned' | 'popper';
67
+ }
68
+ interface SelectItemAlignedPositionProps extends PrimitiveDivProps, SelectPopperPrivateProps {
69
+ }
70
+ type PopperContentProps = React.ComponentPropsWithoutRef<typeof PopperPrimitive.Content>;
71
+ interface SelectPopperPositionProps extends PopperContentProps, SelectPopperPrivateProps {
72
+ }
73
+ type PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;
74
+ export interface SelectViewportProps extends PrimitiveDivProps {
75
+ }
76
+ export const SelectViewport: React.ForwardRefExoticComponent<SelectViewportProps & React.RefAttributes<HTMLDivElement>>;
77
+ export interface SelectGroupProps extends PrimitiveDivProps {
78
+ }
79
+ export const SelectGroup: React.ForwardRefExoticComponent<SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
80
+ export interface SelectLabelProps extends PrimitiveDivProps {
81
+ }
82
+ export const SelectLabel: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
83
+ export interface SelectItemProps extends PrimitiveDivProps {
84
+ value: string;
85
+ disabled?: boolean;
86
+ textValue?: string;
87
+ }
88
+ export const SelectItem: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
89
+ export interface SelectItemTextProps extends PrimitiveSpanProps {
90
+ }
91
+ export const SelectItemText: React.ForwardRefExoticComponent<SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
92
+ export interface SelectItemIndicatorProps extends PrimitiveSpanProps {
93
+ }
94
+ export const SelectItemIndicator: React.ForwardRefExoticComponent<SelectItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
95
+ export interface SelectScrollUpButtonProps extends Omit<SelectScrollButtonImplProps, 'onAutoScroll'> {
96
+ }
97
+ export const SelectScrollUpButton: React.ForwardRefExoticComponent<SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>>;
98
+ export interface SelectScrollDownButtonProps extends Omit<SelectScrollButtonImplProps, 'onAutoScroll'> {
99
+ }
100
+ export const SelectScrollDownButton: React.ForwardRefExoticComponent<SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>>;
101
+ interface SelectScrollButtonImplProps extends PrimitiveDivProps {
102
+ onAutoScroll(): void;
103
+ }
104
+ export interface SelectSeparatorProps extends PrimitiveDivProps {
105
+ }
106
+ export const SelectSeparator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
107
+ type PopperArrowProps = Radix.ComponentPropsWithoutRef<typeof PopperPrimitive.Arrow>;
108
+ export interface SelectArrowProps extends PopperArrowProps {
109
+ }
110
+ export const SelectArrow: React.ForwardRefExoticComponent<SelectArrowProps & React.RefAttributes<SVGSVGElement>>;
111
+ export const Root: React.FC<SelectProps>;
112
+ export const Trigger: React.ForwardRefExoticComponent<SelectTriggerProps & React.RefAttributes<HTMLButtonElement>>;
113
+ export const Value: React.ForwardRefExoticComponent<SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
114
+ export const Icon: React.ForwardRefExoticComponent<SelectIconProps & React.RefAttributes<HTMLSpanElement>>;
115
+ export const Portal: React.FC<SelectPortalProps>;
116
+ export const Content: React.ForwardRefExoticComponent<SelectContentProps & React.RefAttributes<HTMLDivElement>>;
117
+ export const Viewport: React.ForwardRefExoticComponent<SelectViewportProps & React.RefAttributes<HTMLDivElement>>;
118
+ export const Group: React.ForwardRefExoticComponent<SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
119
+ export const Label: React.ForwardRefExoticComponent<SelectLabelProps & React.RefAttributes<HTMLDivElement>>;
120
+ export const Item: React.ForwardRefExoticComponent<SelectItemProps & React.RefAttributes<HTMLDivElement>>;
121
+ export const ItemText: React.ForwardRefExoticComponent<SelectItemTextProps & React.RefAttributes<HTMLSpanElement>>;
122
+ export const ItemIndicator: React.ForwardRefExoticComponent<SelectItemIndicatorProps & React.RefAttributes<HTMLSpanElement>>;
123
+ export const ScrollUpButton: React.ForwardRefExoticComponent<SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>>;
124
+ export const ScrollDownButton: React.ForwardRefExoticComponent<SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>>;
125
+ export const Separator: React.ForwardRefExoticComponent<SelectSeparatorProps & React.RefAttributes<HTMLDivElement>>;
126
+ export const Arrow: React.ForwardRefExoticComponent<SelectArrowProps & React.RefAttributes<SVGSVGElement>>;
127
+
128
+ //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AA4BA,iBAAiB,KAAK,GAAG,KAAK,CAAC;AAkB/B,OAAA,wFAGE,CAAC;AAgCH;IACE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,KAAK,CAAC,E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M,2GA2CL,CAAC;AAWF,yCAAmC,SAAQ,kBAAkB;CAAG;AAEhE,OAAA,MAAM,qHAQL,CAAC;AAWF,0CAAoC,SAAQ,IAAI,CAAC,2BAA2B,EAAE,cAAc,CAAC;CAAG;AAEhG,OAAA,MAAM,sHAkCJ,CAAC;AAWH,4CAAsC,SAAQ,IAAI,CAAC,2BAA2B,EAAE,cAAc,CAAC;CAAG;AAElG,OAAA,MAAM,0HAqCJ,CAAC;AAKH,qCAAsC,SAAQ,iBAAiB;IAC7D,YAAY,IAAI,IAAI,CAAC;CACtB;AAyDD,qCAA+B,SAAQ,iBAAiB;CAAG;AAE3D,OAAA,MAAM,4GAKL,CAAC;AAWF,wBAAwB,MAAM,wBAAwB,CAAC,OAAO,gBAAgB,KAAK,CAAC,CAAC;AACrF,iCAA2B,SAAQ,gBAAgB;CAAG;AAEtD,OAAA,MAAM,mGAUL,CAAC;AA6HF,OAAA,MAAM,2BAAa,CAAC;AACpB,OAAA,MAAM,qGAAuB,CAAC;AAC9B,OAAA,MAAM,+FAAmB,CAAC;AAC1B,OAAA,MAAM,6FAAiB,CAAC;AACxB,OAAA,MAAM,mCAAqB,CAAC;AAC5B,OAAA,MAAM,kGAAuB,CAAC;AAC9B,OAAA,MAAM,oGAAyB,CAAC;AAChC,OAAA,MAAM,8FAAmB,CAAC;AAC1B,OAAA,MAAM,8FAAmB,CAAC;AAC1B,OAAA,MAAM,4FAAiB,CAAC;AACxB,OAAA,MAAM,qGAAyB,CAAC;AAChC,OAAA,MAAM,+GAAmC,CAAC;AAC1C,OAAA,MAAM,gHAAqC,CAAC;AAC5C,OAAA,MAAM,oHAAyC,CAAC;AAChD,OAAA,MAAM,sGAA2B,CAAC;AAClC,OAAA,MAAM,6FAAmB,CAAC","sources":["packages/react/select/src/packages/react/select/src/Select.tsx","packages/react/select/src/packages/react/select/src/index.ts","packages/react/select/src/index.ts"],"sourcesContent":[null,null,"export {\n createSelectScope,\n //\n Select,\n SelectTrigger,\n SelectValue,\n SelectIcon,\n SelectPortal,\n SelectContent,\n SelectViewport,\n SelectGroup,\n SelectLabel,\n SelectItem,\n SelectItemText,\n SelectItemIndicator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n SelectSeparator,\n SelectArrow,\n //\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Content,\n Viewport,\n Group,\n Label,\n Item,\n ItemText,\n ItemIndicator,\n ScrollUpButton,\n ScrollDownButton,\n Separator,\n Arrow,\n} from './Select';\nexport type {\n SelectProps,\n SelectTriggerProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectViewportProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectSeparatorProps,\n SelectArrowProps,\n} from './Select';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;;;;AA4BA,iBAAiB,KAAK,GAAG,KAAK,CAAC;AAkB/B,OAAA,wFAGE,CAAC;AAgCH;IACE,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,YAAY,CAAC,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,OAAA,MAAM,QAAQ,MAAM,EAAE,CAAC,WAAW,CAwGjC,CAAC;AAWF,4BA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B,SAAQ,gBAAgB;CAAG;AAEtD,OAAA,MAAM,mGAUL,CAAC;AAiIF,OAAA,MAAM,2BAAa,CAAC;AACpB,OAAA,MAAM,qGAAuB,CAAC;AAC9B,OAAA,MAAM,+FAAmB,CAAC;AAC1B,OAAA,MAAM,6FAAiB,CAAC;AACxB,OAAA,MAAM,mCAAqB,CAAC;AAC5B,OAAA,MAAM,kGAAuB,CAAC;AAC9B,OAAA,MAAM,oGAAyB,CAAC;AAChC,OAAA,MAAM,8FAAmB,CAAC;AAC1B,OAAA,MAAM,8FAAmB,CAAC;AAC1B,OAAA,MAAM,4FAAiB,CAAC;AACxB,OAAA,MAAM,qGAAyB,CAAC;AAChC,OAAA,MAAM,+GAAmC,CAAC;AAC1C,OAAA,MAAM,gHAAqC,CAAC;AAC5C,OAAA,MAAM,oHAAyC,CAAC;AAChD,OAAA,MAAM,sGAA2B,CAAC;AAClC,OAAA,MAAM,6FAAmB,CAAC","sources":["packages/react/select/src/packages/react/select/src/Select.tsx","packages/react/select/src/packages/react/select/src/index.ts","packages/react/select/src/index.ts"],"sourcesContent":[null,null,"export {\n createSelectScope,\n //\n Select,\n SelectTrigger,\n SelectValue,\n SelectIcon,\n SelectPortal,\n SelectContent,\n SelectViewport,\n SelectGroup,\n SelectLabel,\n SelectItem,\n SelectItemText,\n SelectItemIndicator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n SelectSeparator,\n SelectArrow,\n //\n Root,\n Trigger,\n Value,\n Icon,\n Portal,\n Content,\n Viewport,\n Group,\n Label,\n Item,\n ItemText,\n ItemIndicator,\n ScrollUpButton,\n ScrollDownButton,\n Separator,\n Arrow,\n} from './Select';\nexport type {\n SelectProps,\n SelectTriggerProps,\n SelectValueProps,\n SelectIconProps,\n SelectPortalProps,\n SelectContentProps,\n SelectViewportProps,\n SelectGroupProps,\n SelectLabelProps,\n SelectItemProps,\n SelectItemTextProps,\n SelectItemIndicatorProps,\n SelectScrollUpButtonProps,\n SelectScrollDownButtonProps,\n SelectSeparatorProps,\n SelectArrowProps,\n} from './Select';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -223,7 +223,7 @@ const $1345bda09ffc1bc6$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ $cg2C9$react.forw
223
223
  "data-state": context.open ? 'open' : 'closed',
224
224
  disabled: isDisabled,
225
225
  "data-disabled": isDisabled ? '' : undefined,
226
- "data-placeholder": context.value === undefined ? '' : undefined
226
+ "data-placeholder": $1345bda09ffc1bc6$var$shouldShowPlaceholder(context.value) ? '' : undefined
227
227
  }, triggerProps, {
228
228
  ref: composedRefs // Enable compatibility with native label or custom `Label` "click" for Safari:
229
229
  ,
@@ -271,7 +271,7 @@ const $1345bda09ffc1bc6$export$3ac1e88a1c0b9f1 = /*#__PURE__*/ $cg2C9$react.forw
271
271
  * -----------------------------------------------------------------------------------------------*/ const $1345bda09ffc1bc6$var$VALUE_NAME = 'SelectValue';
272
272
  const $1345bda09ffc1bc6$export$e288731fd71264f0 = /*#__PURE__*/ $cg2C9$react.forwardRef((props, forwardedRef)=>{
273
273
  // We ignore `className` and `style` as this part shouldn't be styled.
274
- const { __scopeSelect: __scopeSelect , className: className , style: style , children: children , placeholder: placeholder , ...valueProps } = props;
274
+ const { __scopeSelect: __scopeSelect , className: className , style: style , children: children , placeholder: placeholder = '' , ...valueProps } = props;
275
275
  const context = $1345bda09ffc1bc6$var$useSelectContext($1345bda09ffc1bc6$var$VALUE_NAME, __scopeSelect);
276
276
  const { onValueNodeHasChildrenChange: onValueNodeHasChildrenChange } = context;
277
277
  const hasChildren = children !== undefined;
@@ -288,7 +288,7 @@ const $1345bda09ffc1bc6$export$e288731fd71264f0 = /*#__PURE__*/ $cg2C9$react.for
288
288
  style: {
289
289
  pointerEvents: 'none'
290
290
  }
291
- }), context.value === undefined && placeholder !== undefined ? placeholder : children);
291
+ }), $1345bda09ffc1bc6$var$shouldShowPlaceholder(context.value) ? /*#__PURE__*/ $cg2C9$react.createElement($cg2C9$react.Fragment, null, placeholder) : children);
292
292
  });
293
293
  /*#__PURE__*/ Object.assign($1345bda09ffc1bc6$export$e288731fd71264f0, {
294
294
  displayName: $1345bda09ffc1bc6$var$VALUE_NAME
@@ -902,6 +902,7 @@ const $1345bda09ffc1bc6$export$13ef48a934230896 = /*#__PURE__*/ $cg2C9$react.for
902
902
  context.onOpenChange(false);
903
903
  }
904
904
  };
905
+ if (value === '') throw new Error('A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.');
905
906
  return /*#__PURE__*/ $cg2C9$react.createElement($1345bda09ffc1bc6$var$SelectItemContextProvider, {
906
907
  scope: __scopeSelect,
907
908
  value: value,
@@ -1135,6 +1136,9 @@ const $1345bda09ffc1bc6$var$SelectScrollButtonImpl = /*#__PURE__*/ $cg2C9$react.
1135
1136
  flexShrink: 0,
1136
1137
  ...scrollIndicatorProps.style
1137
1138
  },
1139
+ onPointerDown: $cg2C9$radixuiprimitive.composeEventHandlers(scrollIndicatorProps.onPointerDown, ()=>{
1140
+ if (autoScrollTimerRef.current === null) autoScrollTimerRef.current = window.setInterval(onAutoScroll, 50);
1141
+ }),
1138
1142
  onPointerMove: $cg2C9$radixuiprimitive.composeEventHandlers(scrollIndicatorProps.onPointerMove, ()=>{
1139
1143
  var _contentContext$onIte3;
1140
1144
  (_contentContext$onIte3 = contentContext.onItemLeave) === null || _contentContext$onIte3 === void 0 || _contentContext$onIte3.call(contentContext);
@@ -1174,7 +1178,10 @@ const $1345bda09ffc1bc6$export$314f4cb8f8099628 = /*#__PURE__*/ $cg2C9$react.for
1174
1178
  /*#__PURE__*/ Object.assign($1345bda09ffc1bc6$export$314f4cb8f8099628, {
1175
1179
  displayName: $1345bda09ffc1bc6$var$ARROW_NAME
1176
1180
  });
1177
- /* -----------------------------------------------------------------------------------------------*/ const $1345bda09ffc1bc6$var$BubbleSelect = /*#__PURE__*/ $cg2C9$react.forwardRef((props, forwardedRef)=>{
1181
+ /* -----------------------------------------------------------------------------------------------*/ function $1345bda09ffc1bc6$var$shouldShowPlaceholder(value) {
1182
+ return value === '' || value === undefined;
1183
+ }
1184
+ const $1345bda09ffc1bc6$var$BubbleSelect = /*#__PURE__*/ $cg2C9$react.forwardRef((props, forwardedRef)=>{
1178
1185
  const { value: value , ...selectProps } = props;
1179
1186
  const ref = $cg2C9$react.useRef(null);
1180
1187
  const composedRefs = $cg2C9$radixuireactcomposerefs.useComposedRefs(forwardedRef, ref);