@arc-ui/components 11.1.0 → 11.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.
- package/dist/Checkbox/Checkbox.cjs.js +8 -27
- package/dist/Checkbox/Checkbox.esm.js +3 -22
- package/dist/FormControl/FormControl.cjs.d.ts +1 -1
- package/dist/FormControl/FormControl.cjs.js +1 -1
- package/dist/FormControl/FormControl.esm.d.ts +1 -1
- package/dist/FormControl/FormControl.esm.js +1 -1
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +2 -2
- package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
- package/dist/RadioGroup/RadioGroup.esm.d.ts +2 -2
- package/dist/RadioGroup/RadioGroup.esm.js +2 -2
- package/dist/Select/Select.cjs.d.ts +2 -2
- package/dist/Select/Select.cjs.js +209 -607
- package/dist/Select/Select.esm.d.ts +2 -2
- package/dist/Select/Select.esm.js +45 -443
- package/dist/Switch/Switch.cjs.d.ts +40 -0
- package/dist/Switch/Switch.cjs.js +211 -0
- package/dist/Switch/Switch.esm.d.ts +40 -0
- package/dist/Switch/Switch.esm.js +203 -0
- package/dist/Switch/package.json +7 -0
- package/dist/TextInput/TextInput.cjs.d.ts +2 -2
- package/dist/TextInput/TextInput.cjs.js +1 -1
- package/dist/TextInput/TextInput.esm.d.ts +2 -2
- package/dist/TextInput/TextInput.esm.js +1 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.d.ts +1 -18
- package/dist/VerticalSpace/VerticalSpace.cjs.js +5 -20
- package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -18
- package/dist/VerticalSpace/VerticalSpace.esm.js +4 -19
- package/dist/_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js +29 -0
- package/dist/_shared/cjs/{FormControl-e6b7d7c5.d.ts → FormControl-d4d9c665.d.ts} +4 -0
- package/dist/_shared/cjs/{FormControl-e6b7d7c5.js → FormControl-d4d9c665.js} +6 -5
- package/dist/_shared/cjs/VerticalSpace-65ad083c.d.ts +18 -0
- package/dist/_shared/cjs/VerticalSpace-65ad083c.js +25 -0
- package/dist/_shared/cjs/index-c81c9401.d.ts +1 -1
- package/dist/_shared/cjs/index.module-af7c85f2.js +400 -0
- package/dist/_shared/esm/BtIconTickAlt2Px-da97e9ae.js +23 -0
- package/dist/_shared/esm/{FormControl-84c9ace6.d.ts → FormControl-2cb96de7.d.ts} +4 -0
- package/dist/_shared/esm/{FormControl-84c9ace6.js → FormControl-2cb96de7.js} +6 -5
- package/dist/_shared/esm/VerticalSpace-6b4f5e50.d.ts +18 -0
- package/dist/_shared/esm/VerticalSpace-6b4f5e50.js +19 -0
- package/dist/_shared/esm/index-c81c9401.d.ts +1 -1
- package/dist/_shared/esm/index.module-599b86dd.js +388 -0
- package/dist/index.es.js +285 -112
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +500 -326
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/FormControl/FormControl.d.ts +4 -0
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +13 -8
- package/dist/types/components/TextInput/TextInput.d.ts +1 -1
- package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +1 -1
- package/dist/types/components/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FocusEvent } from "react";
|
|
4
|
-
import { FormControlProps } from "../_shared/esm/FormControl-
|
|
4
|
+
import { FormControlProps } from "../_shared/esm/FormControl-2cb96de7";
|
|
5
5
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
6
6
|
declare const Select: React.FC<SelectProps>;
|
|
7
|
-
interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id"> {
|
|
7
|
+
interface SelectProps extends Omit<FormControlProps, "children" | "elementType" | "htmlFor" | "requirementStatus" | "id" | "helperUnderLabel"> {
|
|
8
8
|
name: string;
|
|
9
9
|
label: string;
|
|
10
10
|
placeholder: string;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { c as classNames } from '../_shared/esm/index-2ae58626.js';
|
|
2
|
-
import * as React$
|
|
3
|
-
import React__default, {
|
|
4
|
-
import $
|
|
2
|
+
import * as React$1 from 'react';
|
|
3
|
+
import React__default, { useContext, createContext, useEffect, forwardRef, useState, createElement, useRef, useCallback, Fragment, useMemo, useId } from 'react';
|
|
4
|
+
import { $ as $c512c27ab02ef895$export$50c7b4e9d9f19c1, a as $6ed0406888f73fc4$export$c7b2cbe3552a0d05, b as $5e63c961fc1ce211$export$8c6ed5c666ac1360, c as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a, d as $8927f6f2acc4f386$export$250ffa63cdc0d034, _ as _extends, e as $e42e1063c40fb3ef$export$b9ecd428b558ff10, f as $8927f6f2acc4f386$export$6d1a0317bde7de7f, g as $9f79659886946c16$export$e5c5a5f917a5871c, h as $71cd76cc60e0454e$export$6f32135080cb4c3, i as $010c2913dbd2fe3d$export$5cae361ad82dce8b } from '../_shared/esm/index.module-599b86dd.js';
|
|
5
|
+
import $7SXl2$reactdom, { createPortal } from 'react-dom';
|
|
5
6
|
import { B as BtIconChevronDown2Px_2 } from '../_shared/esm/BtIconChevronDown2Px-782876e2.js';
|
|
7
|
+
import { B as BtIconTickAlt2Px_2 } from '../_shared/esm/BtIconTickAlt2Px-da97e9ae.js';
|
|
6
8
|
import { I as Icon } from '../_shared/esm/Icon-61f7237a.js';
|
|
7
|
-
import { F as FormControl } from '../_shared/esm/FormControl-
|
|
9
|
+
import { F as FormControl } from '../_shared/esm/FormControl-2cb96de7.js';
|
|
8
10
|
import { C as Context } from '../_shared/esm/Surface-bf201530.js';
|
|
9
11
|
import { A as ArcRootElementContext } from '../_shared/esm/Base-c235dc45.js';
|
|
10
12
|
import '../_shared/esm/index-229fc864.js';
|
|
@@ -12,231 +14,10 @@ import '../_shared/esm/suffix-modifier-f5e28822.js';
|
|
|
12
14
|
import '../_shared/esm/Text-6b958ad8.js';
|
|
13
15
|
import '../_shared/esm/BtIconChevronRightMid-d9b11761.js';
|
|
14
16
|
|
|
15
|
-
function _extends() {
|
|
16
|
-
_extends = Object.assign || function (target) {
|
|
17
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
18
|
-
var source = arguments[i];
|
|
19
|
-
|
|
20
|
-
for (var key in source) {
|
|
21
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
22
|
-
target[key] = source[key];
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return target;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
return _extends.apply(this, arguments);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
17
|
function $ae6933e535247d3d$export$7d15b64cf5a3a4c4(value, [min, max]) {
|
|
34
18
|
return Math.min(max, Math.max(min, value));
|
|
35
19
|
}
|
|
36
20
|
|
|
37
|
-
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
38
|
-
return function handleEvent(event) {
|
|
39
|
-
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
40
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* -------------------------------------------------------------------------------------------------
|
|
45
|
-
* createContextScope
|
|
46
|
-
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
47
|
-
let defaultContexts = [];
|
|
48
|
-
/* -----------------------------------------------------------------------------------------------
|
|
49
|
-
* createContext
|
|
50
|
-
* ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
51
|
-
const BaseContext = /*#__PURE__*/ createContext(defaultContext);
|
|
52
|
-
const index = defaultContexts.length;
|
|
53
|
-
defaultContexts = [
|
|
54
|
-
...defaultContexts,
|
|
55
|
-
defaultContext
|
|
56
|
-
];
|
|
57
|
-
function Provider(props) {
|
|
58
|
-
const { scope: scope , children: children , ...context } = props;
|
|
59
|
-
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
|
|
60
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
|
-
const value = useMemo(()=>context
|
|
62
|
-
, Object.values(context));
|
|
63
|
-
return /*#__PURE__*/ createElement(Context.Provider, {
|
|
64
|
-
value: value
|
|
65
|
-
}, children);
|
|
66
|
-
}
|
|
67
|
-
function useContext$1(consumerName, scope) {
|
|
68
|
-
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
69
|
-
const context = useContext(Context);
|
|
70
|
-
if (context) return context;
|
|
71
|
-
if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
|
|
72
|
-
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
73
|
-
}
|
|
74
|
-
Provider.displayName = rootComponentName + 'Provider';
|
|
75
|
-
return [
|
|
76
|
-
Provider,
|
|
77
|
-
useContext$1
|
|
78
|
-
];
|
|
79
|
-
}
|
|
80
|
-
/* -----------------------------------------------------------------------------------------------
|
|
81
|
-
* createScope
|
|
82
|
-
* ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
|
|
83
|
-
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
84
|
-
return /*#__PURE__*/ createContext(defaultContext);
|
|
85
|
-
});
|
|
86
|
-
return function useScope(scope) {
|
|
87
|
-
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
88
|
-
return useMemo(()=>({
|
|
89
|
-
[`__scope${scopeName}`]: {
|
|
90
|
-
...scope,
|
|
91
|
-
[scopeName]: contexts
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
, [
|
|
95
|
-
scope,
|
|
96
|
-
contexts
|
|
97
|
-
]);
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
createScope.scopeName = scopeName;
|
|
101
|
-
return [
|
|
102
|
-
$c512c27ab02ef895$export$fd42f52fd3ae1109,
|
|
103
|
-
$c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
|
|
104
|
-
];
|
|
105
|
-
}
|
|
106
|
-
/* -------------------------------------------------------------------------------------------------
|
|
107
|
-
* composeContextScopes
|
|
108
|
-
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
109
|
-
const baseScope = scopes[0];
|
|
110
|
-
if (scopes.length === 1) return baseScope;
|
|
111
|
-
const createScope1 = ()=>{
|
|
112
|
-
const scopeHooks = scopes.map((createScope)=>({
|
|
113
|
-
useScope: createScope(),
|
|
114
|
-
scopeName: createScope.scopeName
|
|
115
|
-
})
|
|
116
|
-
);
|
|
117
|
-
return function useComposedScopes(overrideScopes) {
|
|
118
|
-
const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName })=>{
|
|
119
|
-
// We are calling a hook inside a callback which React warns against to avoid inconsistent
|
|
120
|
-
// renders, however, scoping doesn't have render side effects so we ignore the rule.
|
|
121
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
122
|
-
const scopeProps = useScope(overrideScopes);
|
|
123
|
-
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
124
|
-
return {
|
|
125
|
-
...nextScopes,
|
|
126
|
-
...currentScope
|
|
127
|
-
};
|
|
128
|
-
}, {});
|
|
129
|
-
return useMemo(()=>({
|
|
130
|
-
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
131
|
-
})
|
|
132
|
-
, [
|
|
133
|
-
nextScopes1
|
|
134
|
-
]);
|
|
135
|
-
};
|
|
136
|
-
};
|
|
137
|
-
createScope1.scopeName = baseScope.scopeName;
|
|
138
|
-
return createScope1;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Set a given ref to a given value
|
|
143
|
-
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
144
|
-
*/ function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
145
|
-
if (typeof ref === 'function') ref(value);
|
|
146
|
-
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* A utility to compose multiple refs together
|
|
150
|
-
* Accepts callback refs and RefObject(s)
|
|
151
|
-
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
152
|
-
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
|
|
153
|
-
)
|
|
154
|
-
;
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* A custom hook that composes multiple refs
|
|
158
|
-
* Accepts callback refs and RefObject(s)
|
|
159
|
-
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
160
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
161
|
-
return useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
/* -------------------------------------------------------------------------------------------------
|
|
165
|
-
* Slot
|
|
166
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
167
|
-
const { children: children , ...slotProps } = props;
|
|
168
|
-
const childrenArray = Children.toArray(children);
|
|
169
|
-
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
170
|
-
if (slottable) {
|
|
171
|
-
// the new element to render is the one passed as a child of `Slottable`
|
|
172
|
-
const newElement = slottable.props.children;
|
|
173
|
-
const newChildren = childrenArray.map((child)=>{
|
|
174
|
-
if (child === slottable) {
|
|
175
|
-
// because the new element will be the one rendered, we are only interested
|
|
176
|
-
// in grabbing its children (`newElement.props.children`)
|
|
177
|
-
if (Children.count(newElement) > 1) return Children.only(null);
|
|
178
|
-
return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
|
|
179
|
-
} else return child;
|
|
180
|
-
});
|
|
181
|
-
return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
182
|
-
ref: forwardedRef
|
|
183
|
-
}), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
|
|
184
|
-
}
|
|
185
|
-
return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
186
|
-
ref: forwardedRef
|
|
187
|
-
}), children);
|
|
188
|
-
});
|
|
189
|
-
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
190
|
-
/* -------------------------------------------------------------------------------------------------
|
|
191
|
-
* SlotClone
|
|
192
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
193
|
-
const { children: children , ...slotProps } = props;
|
|
194
|
-
if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
|
|
195
|
-
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
196
|
-
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
197
|
-
});
|
|
198
|
-
return Children.count(children) > 1 ? Children.only(null) : null;
|
|
199
|
-
});
|
|
200
|
-
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
201
|
-
/* -------------------------------------------------------------------------------------------------
|
|
202
|
-
* Slottable
|
|
203
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
204
|
-
return /*#__PURE__*/ createElement(Fragment, null, children);
|
|
205
|
-
};
|
|
206
|
-
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
207
|
-
return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
208
|
-
}
|
|
209
|
-
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
210
|
-
// all child props should override
|
|
211
|
-
const overrideProps = {
|
|
212
|
-
...childProps
|
|
213
|
-
};
|
|
214
|
-
for(const propName in childProps){
|
|
215
|
-
const slotPropValue = slotProps[propName];
|
|
216
|
-
const childPropValue = childProps[propName];
|
|
217
|
-
const isHandler = /^on[A-Z]/.test(propName);
|
|
218
|
-
if (isHandler) {
|
|
219
|
-
// if the handler exists on both, we compose them
|
|
220
|
-
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
|
221
|
-
childPropValue(...args);
|
|
222
|
-
slotPropValue(...args);
|
|
223
|
-
};
|
|
224
|
-
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
225
|
-
} else if (propName === 'style') overrideProps[propName] = {
|
|
226
|
-
...slotPropValue,
|
|
227
|
-
...childPropValue
|
|
228
|
-
};
|
|
229
|
-
else if (propName === 'className') overrideProps[propName] = [
|
|
230
|
-
slotPropValue,
|
|
231
|
-
childPropValue
|
|
232
|
-
].filter(Boolean).join(' ');
|
|
233
|
-
}
|
|
234
|
-
return {
|
|
235
|
-
...slotProps,
|
|
236
|
-
...overrideProps
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
|
|
240
21
|
// We have resorted to returning slots directly rather than exposing primitives that can then
|
|
241
22
|
// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.
|
|
242
23
|
// This is because we encountered issues with generic types that cannot be statically analysed
|
|
@@ -330,100 +111,6 @@ const $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ createContext(undef
|
|
|
330
111
|
return localDir || globalDir || 'ltr';
|
|
331
112
|
}
|
|
332
113
|
|
|
333
|
-
const $8927f6f2acc4f386$var$NODES = [
|
|
334
|
-
'a',
|
|
335
|
-
'button',
|
|
336
|
-
'div',
|
|
337
|
-
'h2',
|
|
338
|
-
'h3',
|
|
339
|
-
'img',
|
|
340
|
-
'label',
|
|
341
|
-
'li',
|
|
342
|
-
'nav',
|
|
343
|
-
'ol',
|
|
344
|
-
'p',
|
|
345
|
-
'span',
|
|
346
|
-
'svg',
|
|
347
|
-
'ul'
|
|
348
|
-
]; // Temporary while we await merge of this fix:
|
|
349
|
-
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
350
|
-
// prettier-ignore
|
|
351
|
-
/* -------------------------------------------------------------------------------------------------
|
|
352
|
-
* Primitive
|
|
353
|
-
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
354
|
-
const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
355
|
-
const { asChild: asChild , ...primitiveProps } = props;
|
|
356
|
-
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
357
|
-
useEffect(()=>{
|
|
358
|
-
window[Symbol.for('radix-ui')] = true;
|
|
359
|
-
}, []);
|
|
360
|
-
return /*#__PURE__*/ createElement(Comp, _extends({}, primitiveProps, {
|
|
361
|
-
ref: forwardedRef
|
|
362
|
-
}));
|
|
363
|
-
});
|
|
364
|
-
Node.displayName = `Primitive.${node}`;
|
|
365
|
-
return {
|
|
366
|
-
...primitive,
|
|
367
|
-
[node]: Node
|
|
368
|
-
};
|
|
369
|
-
}, {});
|
|
370
|
-
/* -------------------------------------------------------------------------------------------------
|
|
371
|
-
* Utils
|
|
372
|
-
* -----------------------------------------------------------------------------------------------*/ /**
|
|
373
|
-
* Flush custom event dispatch
|
|
374
|
-
* https://github.com/radix-ui/primitives/pull/1378
|
|
375
|
-
*
|
|
376
|
-
* React batches *all* event handlers since version 18, this introduces certain considerations when using custom event types.
|
|
377
|
-
*
|
|
378
|
-
* Internally, React prioritises events in the following order:
|
|
379
|
-
* - discrete
|
|
380
|
-
* - continuous
|
|
381
|
-
* - default
|
|
382
|
-
*
|
|
383
|
-
* https://github.com/facebook/react/blob/a8a4742f1c54493df00da648a3f9d26e3db9c8b5/packages/react-dom/src/events/ReactDOMEventListener.js#L294-L350
|
|
384
|
-
*
|
|
385
|
-
* `discrete` is an important distinction as updates within these events are applied immediately.
|
|
386
|
-
* React however, is not able to infer the priority of custom event types due to how they are detected internally.
|
|
387
|
-
* Because of this, it's possible for updates from custom events to be unexpectedly batched when
|
|
388
|
-
* dispatched by another `discrete` event.
|
|
389
|
-
*
|
|
390
|
-
* In order to ensure that updates from custom events are applied predictably, we need to manually flush the batch.
|
|
391
|
-
* This utility should be used when dispatching a custom event from within another `discrete` event, this utility
|
|
392
|
-
* is not nessesary when dispatching known event types, or if dispatching a custom type inside a non-discrete event.
|
|
393
|
-
* For example:
|
|
394
|
-
*
|
|
395
|
-
* dispatching a known click 👎
|
|
396
|
-
* target.dispatchEvent(new Event(‘click’))
|
|
397
|
-
*
|
|
398
|
-
* dispatching a custom type within a non-discrete event 👎
|
|
399
|
-
* onScroll={(event) => event.target.dispatchEvent(new CustomEvent(‘customType’))}
|
|
400
|
-
*
|
|
401
|
-
* dispatching a custom type within a `discrete` event 👍
|
|
402
|
-
* onPointerDown={(event) => dispatchDiscreteCustomEvent(event.target, new CustomEvent(‘customType’))}
|
|
403
|
-
*
|
|
404
|
-
* Note: though React classifies `focus`, `focusin` and `focusout` events as `discrete`, it's not recommended to use
|
|
405
|
-
* this utility with them. This is because it's possible for those handlers to be called implicitly during render
|
|
406
|
-
* e.g. when focus is within a component as it is unmounted, or when managing focus on mount.
|
|
407
|
-
*/ function $8927f6f2acc4f386$export$6d1a0317bde7de7f(target, event) {
|
|
408
|
-
if (target) flushSync(()=>target.dispatchEvent(event)
|
|
409
|
-
);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
/**
|
|
413
|
-
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
414
|
-
* prop or avoid re-executing effects when passed as a dependency
|
|
415
|
-
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
416
|
-
const callbackRef = useRef(callback);
|
|
417
|
-
useEffect(()=>{
|
|
418
|
-
callbackRef.current = callback;
|
|
419
|
-
}); // https://github.com/facebook/react/issues/19240
|
|
420
|
-
return useMemo(()=>(...args)=>{
|
|
421
|
-
var _callbackRef$current;
|
|
422
|
-
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
423
|
-
}
|
|
424
|
-
, []);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
114
|
/**
|
|
428
115
|
* Listens for when the escape key is down
|
|
429
116
|
*/ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {
|
|
@@ -939,19 +626,11 @@ function $d3863c46a17e8a28$var$removeLinks(items) {
|
|
|
939
626
|
);
|
|
940
627
|
}
|
|
941
628
|
|
|
942
|
-
|
|
943
|
-
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
944
|
-
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
945
|
-
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
946
|
-
*
|
|
947
|
-
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
948
|
-
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
|
|
949
|
-
|
|
950
|
-
const $1746a345f3d73bb7$var$useReactId = React$2['useId'.toString()] || (()=>undefined
|
|
629
|
+
const $1746a345f3d73bb7$var$useReactId = React$1['useId'.toString()] || (()=>undefined
|
|
951
630
|
);
|
|
952
631
|
let $1746a345f3d73bb7$var$count = 0;
|
|
953
632
|
function $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {
|
|
954
|
-
const [id, setId] = React$
|
|
633
|
+
const [id, setId] = React$1.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.
|
|
955
634
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
956
635
|
if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)
|
|
957
636
|
);
|
|
@@ -969,67 +648,6 @@ const $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ forwardRef((prop
|
|
|
969
648
|
})), container) : null;
|
|
970
649
|
});
|
|
971
650
|
|
|
972
|
-
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
973
|
-
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
974
|
-
defaultProp: defaultProp,
|
|
975
|
-
onChange: onChange
|
|
976
|
-
});
|
|
977
|
-
const isControlled = prop !== undefined;
|
|
978
|
-
const value1 = isControlled ? prop : uncontrolledProp;
|
|
979
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
980
|
-
const setValue = useCallback((nextValue)=>{
|
|
981
|
-
if (isControlled) {
|
|
982
|
-
const setter = nextValue;
|
|
983
|
-
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
984
|
-
if (value !== prop) handleChange(value);
|
|
985
|
-
} else setUncontrolledProp(nextValue);
|
|
986
|
-
}, [
|
|
987
|
-
isControlled,
|
|
988
|
-
prop,
|
|
989
|
-
setUncontrolledProp,
|
|
990
|
-
handleChange
|
|
991
|
-
]);
|
|
992
|
-
return [
|
|
993
|
-
value1,
|
|
994
|
-
setValue
|
|
995
|
-
];
|
|
996
|
-
}
|
|
997
|
-
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
998
|
-
const uncontrolledState = useState(defaultProp);
|
|
999
|
-
const [value] = uncontrolledState;
|
|
1000
|
-
const prevValueRef = useRef(value);
|
|
1001
|
-
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
1002
|
-
useEffect(()=>{
|
|
1003
|
-
if (prevValueRef.current !== value) {
|
|
1004
|
-
handleChange(value);
|
|
1005
|
-
prevValueRef.current = value;
|
|
1006
|
-
}
|
|
1007
|
-
}, [
|
|
1008
|
-
value,
|
|
1009
|
-
prevValueRef,
|
|
1010
|
-
handleChange
|
|
1011
|
-
]);
|
|
1012
|
-
return uncontrolledState;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
1016
|
-
const ref = useRef({
|
|
1017
|
-
value: value,
|
|
1018
|
-
previous: value
|
|
1019
|
-
}); // We compare values before making an update to ensure that
|
|
1020
|
-
// a change has been made. This ensures the previous value is
|
|
1021
|
-
// persisted correctly between renders.
|
|
1022
|
-
return useMemo(()=>{
|
|
1023
|
-
if (ref.current.value !== value) {
|
|
1024
|
-
ref.current.previous = ref.current.value;
|
|
1025
|
-
ref.current.value = value;
|
|
1026
|
-
}
|
|
1027
|
-
return ref.current.previous;
|
|
1028
|
-
}, [
|
|
1029
|
-
value
|
|
1030
|
-
]);
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
651
|
const $ea1ef594cf570d83$export$439d29a4e110a164 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
1034
652
|
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({}, props, {
|
|
1035
653
|
ref: forwardedRef,
|
|
@@ -1436,7 +1054,7 @@ var SideCar$1 = function (_a) {
|
|
|
1436
1054
|
if (!Target) {
|
|
1437
1055
|
throw new Error('Sidecar medium not found');
|
|
1438
1056
|
}
|
|
1439
|
-
return React$
|
|
1057
|
+
return React$1.createElement(Target, __assign({}, rest));
|
|
1440
1058
|
};
|
|
1441
1059
|
SideCar$1.isSideCarExport = true;
|
|
1442
1060
|
function exportSidecar(medium, exported) {
|
|
@@ -1452,9 +1070,9 @@ var nothing = function () {
|
|
|
1452
1070
|
/**
|
|
1453
1071
|
* Removes scrollbar from the page and contain the scroll within the Lock
|
|
1454
1072
|
*/
|
|
1455
|
-
var RemoveScroll = React$
|
|
1456
|
-
var ref = React$
|
|
1457
|
-
var _a = React$
|
|
1073
|
+
var RemoveScroll = React$1.forwardRef(function (props, parentRef) {
|
|
1074
|
+
var ref = React$1.useRef(null);
|
|
1075
|
+
var _a = React$1.useState({
|
|
1458
1076
|
onScrollCapture: nothing,
|
|
1459
1077
|
onWheelCapture: nothing,
|
|
1460
1078
|
onTouchMoveCapture: nothing,
|
|
@@ -1463,9 +1081,9 @@ var RemoveScroll = React$2.forwardRef(function (props, parentRef) {
|
|
|
1463
1081
|
var SideCar = sideCar;
|
|
1464
1082
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
1465
1083
|
var containerProps = __assign$1(__assign$1({}, rest), callbacks);
|
|
1466
|
-
return (React$
|
|
1467
|
-
enabled && (React$
|
|
1468
|
-
forwardProps ? (React$
|
|
1084
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
1085
|
+
enabled && (React$1.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
|
|
1086
|
+
forwardProps ? (React$1.cloneElement(React$1.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef }))) : (React$1.createElement(Container, __assign$1({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
1469
1087
|
});
|
|
1470
1088
|
RemoveScroll.defaultProps = {
|
|
1471
1089
|
enabled: true,
|
|
@@ -1544,7 +1162,7 @@ var stylesheetSingleton = function () {
|
|
|
1544
1162
|
var styleHookSingleton = function () {
|
|
1545
1163
|
var sheet = stylesheetSingleton();
|
|
1546
1164
|
return function (styles, isDynamic) {
|
|
1547
|
-
React$
|
|
1165
|
+
React$1.useEffect(function () {
|
|
1548
1166
|
sheet.add(styles);
|
|
1549
1167
|
return function () {
|
|
1550
1168
|
sheet.remove();
|
|
@@ -1625,8 +1243,8 @@ var RemoveScrollBar = function (props) {
|
|
|
1625
1243
|
however it will be used only by the "first" invocation
|
|
1626
1244
|
due to singleton nature of <Style
|
|
1627
1245
|
*/
|
|
1628
|
-
var gap = React$
|
|
1629
|
-
return React$
|
|
1246
|
+
var gap = React$1.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
|
|
1247
|
+
return React$1.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
|
|
1630
1248
|
};
|
|
1631
1249
|
|
|
1632
1250
|
var passiveSupported = false;
|
|
@@ -1758,16 +1376,16 @@ var generateStyle = function (id) { return "\n .block-interactivity-".concat(id
|
|
|
1758
1376
|
var idCounter = 0;
|
|
1759
1377
|
var lockStack = [];
|
|
1760
1378
|
function RemoveScrollSideCar(props) {
|
|
1761
|
-
var shouldPreventQueue = React$
|
|
1762
|
-
var touchStartRef = React$
|
|
1763
|
-
var activeAxis = React$
|
|
1764
|
-
var id = React$
|
|
1765
|
-
var Style = React$
|
|
1766
|
-
var lastProps = React$
|
|
1767
|
-
React$
|
|
1379
|
+
var shouldPreventQueue = React$1.useRef([]);
|
|
1380
|
+
var touchStartRef = React$1.useRef([0, 0]);
|
|
1381
|
+
var activeAxis = React$1.useRef();
|
|
1382
|
+
var id = React$1.useState(idCounter++)[0];
|
|
1383
|
+
var Style = React$1.useState(function () { return styleSingleton(); })[0];
|
|
1384
|
+
var lastProps = React$1.useRef(props);
|
|
1385
|
+
React$1.useEffect(function () {
|
|
1768
1386
|
lastProps.current = props;
|
|
1769
1387
|
}, [props]);
|
|
1770
|
-
React$
|
|
1388
|
+
React$1.useEffect(function () {
|
|
1771
1389
|
if (props.inert) {
|
|
1772
1390
|
document.body.classList.add("block-interactivity-".concat(id));
|
|
1773
1391
|
var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
|
|
@@ -1779,7 +1397,7 @@ function RemoveScrollSideCar(props) {
|
|
|
1779
1397
|
}
|
|
1780
1398
|
return;
|
|
1781
1399
|
}, [props.inert, props.lockRef.current, props.shards]);
|
|
1782
|
-
var shouldCancelEvent = React$
|
|
1400
|
+
var shouldCancelEvent = React$1.useCallback(function (event, parent) {
|
|
1783
1401
|
if ('touches' in event && event.touches.length === 2) {
|
|
1784
1402
|
return !lastProps.current.allowPinchZoom;
|
|
1785
1403
|
}
|
|
@@ -1818,7 +1436,7 @@ function RemoveScrollSideCar(props) {
|
|
|
1818
1436
|
var cancelingAxis = activeAxis.current || currentAxis;
|
|
1819
1437
|
return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);
|
|
1820
1438
|
}, []);
|
|
1821
|
-
var shouldPrevent = React$
|
|
1439
|
+
var shouldPrevent = React$1.useCallback(function (_event) {
|
|
1822
1440
|
var event = _event;
|
|
1823
1441
|
if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
|
|
1824
1442
|
// not the last active
|
|
@@ -1847,24 +1465,24 @@ function RemoveScrollSideCar(props) {
|
|
|
1847
1465
|
}
|
|
1848
1466
|
}
|
|
1849
1467
|
}, []);
|
|
1850
|
-
var shouldCancel = React$
|
|
1468
|
+
var shouldCancel = React$1.useCallback(function (name, delta, target, should) {
|
|
1851
1469
|
var event = { name: name, delta: delta, target: target, should: should };
|
|
1852
1470
|
shouldPreventQueue.current.push(event);
|
|
1853
1471
|
setTimeout(function () {
|
|
1854
1472
|
shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
|
|
1855
1473
|
}, 1);
|
|
1856
1474
|
}, []);
|
|
1857
|
-
var scrollTouchStart = React$
|
|
1475
|
+
var scrollTouchStart = React$1.useCallback(function (event) {
|
|
1858
1476
|
touchStartRef.current = getTouchXY(event);
|
|
1859
1477
|
activeAxis.current = undefined;
|
|
1860
1478
|
}, []);
|
|
1861
|
-
var scrollWheel = React$
|
|
1479
|
+
var scrollWheel = React$1.useCallback(function (event) {
|
|
1862
1480
|
shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1863
1481
|
}, []);
|
|
1864
|
-
var scrollTouchMove = React$
|
|
1482
|
+
var scrollTouchMove = React$1.useCallback(function (event) {
|
|
1865
1483
|
shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
|
|
1866
1484
|
}, []);
|
|
1867
|
-
React$
|
|
1485
|
+
React$1.useEffect(function () {
|
|
1868
1486
|
lockStack.push(Style);
|
|
1869
1487
|
props.setCallbacks({
|
|
1870
1488
|
onScrollCapture: scrollWheel,
|
|
@@ -1882,14 +1500,14 @@ function RemoveScrollSideCar(props) {
|
|
|
1882
1500
|
};
|
|
1883
1501
|
}, []);
|
|
1884
1502
|
var removeScrollBar = props.removeScrollBar, inert = props.inert;
|
|
1885
|
-
return (React$
|
|
1886
|
-
inert ? React$
|
|
1887
|
-
removeScrollBar ? React$
|
|
1503
|
+
return (React$1.createElement(React$1.Fragment, null,
|
|
1504
|
+
inert ? React$1.createElement(Style, { styles: generateStyle(id) }) : null,
|
|
1505
|
+
removeScrollBar ? React$1.createElement(RemoveScrollBar, { gapMode: "margin" }) : null));
|
|
1888
1506
|
}
|
|
1889
1507
|
|
|
1890
1508
|
var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
1891
1509
|
|
|
1892
|
-
var ReactRemoveScroll = React$
|
|
1510
|
+
var ReactRemoveScroll = React$1.forwardRef(function (props, ref) { return (React$1.createElement(RemoveScroll, __assign$1({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
1893
1511
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
1894
1512
|
var $01b9c$RemoveScroll = ReactRemoveScroll;
|
|
1895
1513
|
|
|
@@ -2900,28 +2518,8 @@ const $cc7e05a45900e73f$export$c3468e2714d175fa = $cc7e05a45900e73f$export$6b919
|
|
|
2900
2518
|
const $cc7e05a45900e73f$export$2f60d3ec9ad468f2 = $cc7e05a45900e73f$export$d8117927658af6d7;
|
|
2901
2519
|
const $cc7e05a45900e73f$export$bf1aedc3039c8d63 = $cc7e05a45900e73f$export$ff951e476c12189;
|
|
2902
2520
|
|
|
2903
|
-
const React$1 = React__default;
|
|
2904
|
-
const BtIconChevronUp2Px = props =>
|
|
2905
|
-
/*#__PURE__*/ React$1.createElement(
|
|
2906
|
-
"svg",
|
|
2907
|
-
Object.assign(
|
|
2908
|
-
{
|
|
2909
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
2910
|
-
viewBox: "0 0 32 32"
|
|
2911
|
-
},
|
|
2912
|
-
props
|
|
2913
|
-
),
|
|
2914
|
-
/*#__PURE__*/ React$1.createElement("defs", null),
|
|
2915
|
-
/*#__PURE__*/ React$1.createElement("path", {
|
|
2916
|
-
d:
|
|
2917
|
-
"M28.999,23.5a.99676.99676,0,0,1-.707-.293l-12.28515-12.293L3.708,23.207A.99989.99989,0,0,1,2.294,21.793l13.71289-13.707L29.70605,21.793a.99976.99976,0,0,1-.707,1.707Z",
|
|
2918
|
-
fill: "currentColor"
|
|
2919
|
-
})
|
|
2920
|
-
);
|
|
2921
|
-
var BtIconChevronUp2Px_2 = BtIconChevronUp2Px;
|
|
2922
|
-
|
|
2923
2521
|
const React = React__default;
|
|
2924
|
-
const
|
|
2522
|
+
const BtIconChevronUp2Px = props =>
|
|
2925
2523
|
/*#__PURE__*/ React.createElement(
|
|
2926
2524
|
"svg",
|
|
2927
2525
|
Object.assign(
|
|
@@ -2934,11 +2532,11 @@ const BtIconTickAlt2Px = props =>
|
|
|
2934
2532
|
/*#__PURE__*/ React.createElement("defs", null),
|
|
2935
2533
|
/*#__PURE__*/ React.createElement("path", {
|
|
2936
2534
|
d:
|
|
2937
|
-
"
|
|
2535
|
+
"M28.999,23.5a.99676.99676,0,0,1-.707-.293l-12.28515-12.293L3.708,23.207A.99989.99989,0,0,1,2.294,21.793l13.71289-13.707L29.70605,21.793a.99976.99976,0,0,1-.707,1.707Z",
|
|
2938
2536
|
fill: "currentColor"
|
|
2939
2537
|
})
|
|
2940
2538
|
);
|
|
2941
|
-
var
|
|
2539
|
+
var BtIconChevronUp2Px_2 = BtIconChevronUp2Px;
|
|
2942
2540
|
|
|
2943
2541
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
2944
2542
|
var Select = function (_a) {
|
|
@@ -2951,6 +2549,10 @@ var Select = function (_a) {
|
|
|
2951
2549
|
onChange && onChange(value);
|
|
2952
2550
|
setSelectedValue(value);
|
|
2953
2551
|
};
|
|
2552
|
+
var getSelectedValueName = function (value) {
|
|
2553
|
+
var _a;
|
|
2554
|
+
return (_a = options.find(function (option) { return option.value === value; })) === null || _a === void 0 ? void 0 : _a.name;
|
|
2555
|
+
};
|
|
2954
2556
|
return (React__default.createElement(FormControl, { errorMessage: errorMessage, helper: helper, htmlFor: id, label: label, labelSize: labelSize, requirementStatus: isRequired ? "required" : "optional", isDisabled: isDisabled, disclosureText: disclosureText, disclosureTitle: disclosureTitle, onClickDisclosure: onClickDisclosure },
|
|
2955
2557
|
React__default.createElement($cc7e05a45900e73f$export$be92b6f5f03c0fe9, { name: name, required: isRequired, disabled: isDisabled, defaultOpen: isDefaultOpen, value: selectedValue, onOpenChange: onOpenChange, onValueChange: function (value) { return onValueChange(value); } },
|
|
2956
2558
|
React__default.createElement($cc7e05a45900e73f$export$41fb9f06171c75f4, { id: id, name: name, onBlur: onBlur, className: classNames("arc-Select-trigger", {
|
|
@@ -2958,7 +2560,7 @@ var Select = function (_a) {
|
|
|
2958
2560
|
"arc-Select-trigger--onDarkSurface": surface === "dark",
|
|
2959
2561
|
"arc-Select-trigger--invalid": errorMessage
|
|
2960
2562
|
}) },
|
|
2961
|
-
React__default.createElement($cc7e05a45900e73f$export$4c8d1a57a761ef94, { asChild: true, "aria-label": selectedValue }, !selectedValue ? (React__default.createElement("span", { "aria-hidden": true, className: "arc-Select-placeHolder" }, placeholder)) : (React__default.createElement("span", { className: "arc-Select-valueItem" }, selectedValue))),
|
|
2563
|
+
React__default.createElement($cc7e05a45900e73f$export$4c8d1a57a761ef94, { asChild: true, "aria-label": getSelectedValueName(selectedValue) }, !selectedValue ? (React__default.createElement("span", { "aria-hidden": true, className: "arc-Select-placeHolder" }, placeholder)) : (React__default.createElement("span", { className: "arc-Select-valueItem" }, getSelectedValueName(selectedValue)))),
|
|
2962
2564
|
React__default.createElement($cc7e05a45900e73f$export$f04a61298a47a40f, { className: "arc-Select-triggerIcon" },
|
|
2963
2565
|
React__default.createElement(Icon, { icon: BtIconChevronDown2Px_2, size: 20 }))),
|
|
2964
2566
|
React__default.createElement($cc7e05a45900e73f$export$602eac185826482c, { container: arcRootElement },
|