@arc-ui/components 11.2.0 → 11.4.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/Button/Button.cjs.d.ts +1 -1
- package/dist/Button/Button.cjs.js +1 -1
- package/dist/Button/Button.esm.d.ts +1 -1
- package/dist/Button/Button.esm.js +1 -1
- package/dist/Card/Card.cjs.js +1 -1
- package/dist/Card/Card.esm.js +1 -1
- 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/ProgressBar/ProgressBar.cjs.d.ts +47 -0
- package/dist/ProgressBar/ProgressBar.cjs.js +113 -0
- package/dist/ProgressBar/ProgressBar.esm.d.ts +47 -0
- package/dist/ProgressBar/ProgressBar.esm.js +105 -0
- package/dist/ProgressBar/package.json +7 -0
- 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 +75 -74
- package/dist/Select/Select.esm.d.ts +2 -2
- package/dist/Select/Select.esm.js +3 -2
- package/dist/SiteHeader/SiteHeader.cjs.js +1 -1
- package/dist/SiteHeader/SiteHeader.esm.js +1 -1
- package/dist/Switch/Switch.cjs.d.ts +1 -1
- package/dist/Switch/Switch.cjs.js +13 -12
- package/dist/Switch/Switch.esm.d.ts +1 -1
- package/dist/Switch/Switch.esm.js +4 -3
- package/dist/Tag/Tag.cjs.d.ts +33 -0
- package/dist/Tag/Tag.cjs.js +73 -0
- package/dist/Tag/Tag.esm.d.ts +33 -0
- package/dist/Tag/Tag.esm.js +65 -0
- package/dist/Tag/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 -1
- package/dist/VerticalSpace/VerticalSpace.cjs.js +1 -1
- package/dist/VerticalSpace/VerticalSpace.esm.d.ts +1 -1
- package/dist/VerticalSpace/VerticalSpace.esm.js +1 -1
- package/dist/_shared/cjs/BtIconTickAlt2Px-bdf06f8c.js +29 -0
- package/dist/_shared/cjs/{Button-b3a69953.js → Button-1af6868c.js} +1 -4
- package/dist/_shared/{esm/FormControl-84c9ace6.d.ts → cjs/FormControl-d4d9c665.d.ts} +4 -0
- package/dist/_shared/cjs/{FormControl-e6b7d7c5.js → FormControl-d4d9c665.js} +6 -5
- package/dist/_shared/cjs/VerticalSpace-7aed88ab.d.ts +34 -0
- package/dist/_shared/cjs/{VerticalSpace-65ad083c.js → VerticalSpace-7aed88ab.js} +6 -2
- package/dist/_shared/cjs/index-c81c9401.d.ts +1 -1
- package/dist/_shared/cjs/{BtIconTickAlt2Px-b12ecc78.js → index.module-af7c85f2.js} +34 -59
- package/dist/_shared/esm/BtIconTickAlt2Px-da97e9ae.js +23 -0
- package/dist/_shared/esm/{Button-69439f8f.js → Button-10700df4.js} +1 -4
- package/dist/_shared/{cjs/FormControl-e6b7d7c5.d.ts → esm/FormControl-2cb96de7.d.ts} +4 -0
- package/dist/_shared/esm/{FormControl-84c9ace6.js → FormControl-2cb96de7.js} +6 -5
- package/dist/_shared/esm/VerticalSpace-3579b20e.d.ts +34 -0
- package/dist/_shared/esm/{VerticalSpace-6b4f5e50.js → VerticalSpace-3579b20e.js} +6 -2
- package/dist/_shared/esm/index-c81c9401.d.ts +1 -1
- package/dist/_shared/esm/{BtIconTickAlt2Px-2c4ec3be.js → index.module-599b86dd.js} +2 -22
- package/dist/index.es.js +77 -38
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +77 -37
- 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/ProgressBar/ProgressBar.d.ts +46 -0
- package/dist/types/components/ProgressBar/constants/progress-bar-icon-map.d.ts +3 -0
- package/dist/types/components/ProgressBar/index.d.ts +1 -0
- package/dist/types/components/ProgressBar/types/progress-bar-icons.d.ts +1 -0
- package/dist/types/components/ProgressBar/types/progress-bar-state.d.ts +1 -0
- package/dist/types/components/ProgressBar/utils/get-progress-bar-props.d.ts +1 -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/Tag/Tag.d.ts +32 -0
- package/dist/types/components/Tag/index.d.ts +1 -0
- package/dist/types/components/TextInput/TextInput.d.ts +1 -1
- package/dist/types/components/VerticalSpace/VerticalSpace.d.ts +17 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/styles.d.ts +2 -0
- package/package.json +4 -4
- package/dist/_shared/cjs/VerticalSpace-65ad083c.d.ts +0 -18
- package/dist/_shared/esm/VerticalSpace-6b4f5e50.d.ts +0 -18
- /package/dist/_shared/cjs/{Button-b3a69953.d.ts → Button-1af6868c.d.ts} +0 -0
- /package/dist/_shared/esm/{Button-69439f8f.d.ts → Button-10700df4.d.ts} +0 -0
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var React
|
|
3
|
+
var React = require('react');
|
|
4
4
|
var $7SXl2$reactdom = require('react-dom');
|
|
5
5
|
|
|
6
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
-
|
|
8
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$1);
|
|
9
|
-
|
|
10
6
|
function _extends() {
|
|
11
7
|
_extends = Object.assign || function (target) {
|
|
12
8
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -39,7 +35,7 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
39
35
|
/* -----------------------------------------------------------------------------------------------
|
|
40
36
|
* createContext
|
|
41
37
|
* ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
42
|
-
const BaseContext = /*#__PURE__*/ React
|
|
38
|
+
const BaseContext = /*#__PURE__*/ React.createContext(defaultContext);
|
|
43
39
|
const index = defaultContexts.length;
|
|
44
40
|
defaultContexts = [
|
|
45
41
|
...defaultContexts,
|
|
@@ -49,15 +45,15 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
49
45
|
const { scope: scope , children: children , ...context } = props;
|
|
50
46
|
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
|
|
51
47
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
|
-
const value = React
|
|
48
|
+
const value = React.useMemo(()=>context
|
|
53
49
|
, Object.values(context));
|
|
54
|
-
return /*#__PURE__*/ React
|
|
50
|
+
return /*#__PURE__*/ React.createElement(Context.Provider, {
|
|
55
51
|
value: value
|
|
56
52
|
}, children);
|
|
57
53
|
}
|
|
58
54
|
function useContext(consumerName, scope) {
|
|
59
55
|
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
60
|
-
const context = React
|
|
56
|
+
const context = React.useContext(Context);
|
|
61
57
|
if (context) return context;
|
|
62
58
|
if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
|
|
63
59
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
@@ -72,11 +68,11 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
72
68
|
* createScope
|
|
73
69
|
* ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
|
|
74
70
|
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
75
|
-
return /*#__PURE__*/ React
|
|
71
|
+
return /*#__PURE__*/ React.createContext(defaultContext);
|
|
76
72
|
});
|
|
77
73
|
return function useScope(scope) {
|
|
78
74
|
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
79
|
-
return React
|
|
75
|
+
return React.useMemo(()=>({
|
|
80
76
|
[`__scope${scopeName}`]: {
|
|
81
77
|
...scope,
|
|
82
78
|
[scopeName]: contexts
|
|
@@ -117,7 +113,7 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
117
113
|
...currentScope
|
|
118
114
|
};
|
|
119
115
|
}, {});
|
|
120
|
-
return React
|
|
116
|
+
return React.useMemo(()=>({
|
|
121
117
|
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
122
118
|
})
|
|
123
119
|
, [
|
|
@@ -149,14 +145,14 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
149
145
|
* Accepts callback refs and RefObject(s)
|
|
150
146
|
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
151
147
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
152
|
-
return React
|
|
148
|
+
return React.useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
153
149
|
}
|
|
154
150
|
|
|
155
151
|
/* -------------------------------------------------------------------------------------------------
|
|
156
152
|
* Slot
|
|
157
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React
|
|
153
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
158
154
|
const { children: children , ...slotProps } = props;
|
|
159
|
-
const childrenArray = React
|
|
155
|
+
const childrenArray = React.Children.toArray(children);
|
|
160
156
|
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
161
157
|
if (slottable) {
|
|
162
158
|
// the new element to render is the one passed as a child of `Slottable`
|
|
@@ -165,37 +161,37 @@ function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEven
|
|
|
165
161
|
if (child === slottable) {
|
|
166
162
|
// because the new element will be the one rendered, we are only interested
|
|
167
163
|
// in grabbing its children (`newElement.props.children`)
|
|
168
|
-
if (React
|
|
169
|
-
return /*#__PURE__*/ React
|
|
164
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
165
|
+
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
170
166
|
} else return child;
|
|
171
167
|
});
|
|
172
|
-
return /*#__PURE__*/ React
|
|
168
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
173
169
|
ref: forwardedRef
|
|
174
|
-
}), /*#__PURE__*/ React
|
|
170
|
+
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
|
175
171
|
}
|
|
176
|
-
return /*#__PURE__*/ React
|
|
172
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
177
173
|
ref: forwardedRef
|
|
178
174
|
}), children);
|
|
179
175
|
});
|
|
180
176
|
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
181
177
|
/* -------------------------------------------------------------------------------------------------
|
|
182
178
|
* SlotClone
|
|
183
|
-
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React
|
|
179
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
184
180
|
const { children: children , ...slotProps } = props;
|
|
185
|
-
if (/*#__PURE__*/ React
|
|
181
|
+
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
|
186
182
|
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
187
183
|
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
188
184
|
});
|
|
189
|
-
return React
|
|
185
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
190
186
|
});
|
|
191
187
|
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
192
188
|
/* -------------------------------------------------------------------------------------------------
|
|
193
189
|
* Slottable
|
|
194
190
|
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
195
|
-
return /*#__PURE__*/ React
|
|
191
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
196
192
|
};
|
|
197
193
|
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
198
|
-
return /*#__PURE__*/ React
|
|
194
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
199
195
|
}
|
|
200
196
|
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
201
197
|
// all child props should override
|
|
@@ -249,13 +245,13 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
249
245
|
/* -------------------------------------------------------------------------------------------------
|
|
250
246
|
* Primitive
|
|
251
247
|
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
252
|
-
const Node = /*#__PURE__*/ React
|
|
248
|
+
const Node = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
253
249
|
const { asChild: asChild , ...primitiveProps } = props;
|
|
254
250
|
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
255
|
-
React
|
|
251
|
+
React.useEffect(()=>{
|
|
256
252
|
window[Symbol.for('radix-ui')] = true;
|
|
257
253
|
}, []);
|
|
258
|
-
return /*#__PURE__*/ React
|
|
254
|
+
return /*#__PURE__*/ React.createElement(Comp, _extends({}, primitiveProps, {
|
|
259
255
|
ref: forwardedRef
|
|
260
256
|
}));
|
|
261
257
|
});
|
|
@@ -311,11 +307,11 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
311
307
|
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
312
308
|
* prop or avoid re-executing effects when passed as a dependency
|
|
313
309
|
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
314
|
-
const callbackRef = React
|
|
315
|
-
React
|
|
310
|
+
const callbackRef = React.useRef(callback);
|
|
311
|
+
React.useEffect(()=>{
|
|
316
312
|
callbackRef.current = callback;
|
|
317
313
|
}); // https://github.com/facebook/react/issues/19240
|
|
318
|
-
return React
|
|
314
|
+
return React.useMemo(()=>(...args)=>{
|
|
319
315
|
var _callbackRef$current;
|
|
320
316
|
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
321
317
|
}
|
|
@@ -328,7 +324,7 @@ const $8927f6f2acc4f386$var$NODES = [
|
|
|
328
324
|
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
329
325
|
*
|
|
330
326
|
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
331
|
-
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React
|
|
327
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : ()=>{};
|
|
332
328
|
|
|
333
329
|
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
334
330
|
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
@@ -338,7 +334,7 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: de
|
|
|
338
334
|
const isControlled = prop !== undefined;
|
|
339
335
|
const value1 = isControlled ? prop : uncontrolledProp;
|
|
340
336
|
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
341
|
-
const setValue = React
|
|
337
|
+
const setValue = React.useCallback((nextValue)=>{
|
|
342
338
|
if (isControlled) {
|
|
343
339
|
const setter = nextValue;
|
|
344
340
|
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
@@ -356,11 +352,11 @@ function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: de
|
|
|
356
352
|
];
|
|
357
353
|
}
|
|
358
354
|
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
359
|
-
const uncontrolledState = React
|
|
355
|
+
const uncontrolledState = React.useState(defaultProp);
|
|
360
356
|
const [value] = uncontrolledState;
|
|
361
|
-
const prevValueRef = React
|
|
357
|
+
const prevValueRef = React.useRef(value);
|
|
362
358
|
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
363
|
-
React
|
|
359
|
+
React.useEffect(()=>{
|
|
364
360
|
if (prevValueRef.current !== value) {
|
|
365
361
|
handleChange(value);
|
|
366
362
|
prevValueRef.current = value;
|
|
@@ -374,13 +370,13 @@ function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp ,
|
|
|
374
370
|
}
|
|
375
371
|
|
|
376
372
|
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
377
|
-
const ref = React
|
|
373
|
+
const ref = React.useRef({
|
|
378
374
|
value: value,
|
|
379
375
|
previous: value
|
|
380
376
|
}); // We compare values before making an update to ensure that
|
|
381
377
|
// a change has been made. This ensures the previous value is
|
|
382
378
|
// persisted correctly between renders.
|
|
383
|
-
return React
|
|
379
|
+
return React.useMemo(()=>{
|
|
384
380
|
if (ref.current.value !== value) {
|
|
385
381
|
ref.current.previous = ref.current.value;
|
|
386
382
|
ref.current.value = value;
|
|
@@ -391,26 +387,6 @@ function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
|
391
387
|
]);
|
|
392
388
|
}
|
|
393
389
|
|
|
394
|
-
const React = React__default["default"];
|
|
395
|
-
const BtIconTickAlt2Px = props =>
|
|
396
|
-
/*#__PURE__*/ React.createElement(
|
|
397
|
-
"svg",
|
|
398
|
-
Object.assign(
|
|
399
|
-
{
|
|
400
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
401
|
-
viewBox: "0 0 32 32"
|
|
402
|
-
},
|
|
403
|
-
props
|
|
404
|
-
),
|
|
405
|
-
/*#__PURE__*/ React.createElement("defs", null),
|
|
406
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
407
|
-
d:
|
|
408
|
-
"M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
|
|
409
|
-
fill: "currentColor"
|
|
410
|
-
})
|
|
411
|
-
);
|
|
412
|
-
var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
|
|
413
|
-
|
|
414
390
|
exports.$010c2913dbd2fe3d$export$5cae361ad82dce8b = $010c2913dbd2fe3d$export$5cae361ad82dce8b;
|
|
415
391
|
exports.$5e63c961fc1ce211$export$8c6ed5c666ac1360 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;
|
|
416
392
|
exports.$6ed0406888f73fc4$export$c7b2cbe3552a0d05 = $6ed0406888f73fc4$export$c7b2cbe3552a0d05;
|
|
@@ -421,5 +397,4 @@ exports.$9f79659886946c16$export$e5c5a5f917a5871c = $9f79659886946c16$export$e5c
|
|
|
421
397
|
exports.$b1b2314f5f9a1d84$export$25bec8c6f54ee79a = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a;
|
|
422
398
|
exports.$c512c27ab02ef895$export$50c7b4e9d9f19c1 = $c512c27ab02ef895$export$50c7b4e9d9f19c1;
|
|
423
399
|
exports.$e42e1063c40fb3ef$export$b9ecd428b558ff10 = $e42e1063c40fb3ef$export$b9ecd428b558ff10;
|
|
424
|
-
exports.BtIconTickAlt2Px_2 = BtIconTickAlt2Px_2;
|
|
425
400
|
exports._extends = _extends;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
const React = React__default;
|
|
4
|
+
const BtIconTickAlt2Px = props =>
|
|
5
|
+
/*#__PURE__*/ React.createElement(
|
|
6
|
+
"svg",
|
|
7
|
+
Object.assign(
|
|
8
|
+
{
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
viewBox: "0 0 32 32"
|
|
11
|
+
},
|
|
12
|
+
props
|
|
13
|
+
),
|
|
14
|
+
/*#__PURE__*/ React.createElement("defs", null),
|
|
15
|
+
/*#__PURE__*/ React.createElement("path", {
|
|
16
|
+
d:
|
|
17
|
+
"M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
|
|
22
|
+
|
|
23
|
+
export { BtIconTickAlt2Px_2 as B };
|
|
@@ -65,10 +65,7 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
65
65
|
});
|
|
66
66
|
var ButtonIcon = function (_a) {
|
|
67
67
|
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
68
|
-
return (React__default.createElement("span", { className:
|
|
69
|
-
"arc-Button-icon": true,
|
|
70
|
-
"arc-Button-icon--chevron": isChevron
|
|
71
|
-
}) }, isChevron ? (React__default.createElement(Icon, { icon: isBeforeText ? BtIconChevronLeftMid_2 : BtIconChevronRightMid_2 })) : (React__default.createElement(Icon, { icon: icon }))));
|
|
68
|
+
return (React__default.createElement("span", { className: "arc-Button-icon" }, isChevron ? (React__default.createElement(Icon, { icon: isBeforeText ? BtIconChevronLeftMid_2 : BtIconChevronRightMid_2 })) : (React__default.createElement(Icon, { icon: icon }))));
|
|
72
69
|
};
|
|
73
70
|
|
|
74
71
|
export { Button as B };
|
|
@@ -114,5 +114,9 @@ interface FormControlProps {
|
|
|
114
114
|
* onClick handler for FormControlDisclosure
|
|
115
115
|
*/
|
|
116
116
|
onClickDisclosure?: () => void;
|
|
117
|
+
/**
|
|
118
|
+
* Position helper text under label. This is set to `false` by default.
|
|
119
|
+
*/
|
|
120
|
+
helperUnderLabel?: boolean;
|
|
117
121
|
}
|
|
118
122
|
export { FormControlDisclosure, FormControlDisclosureProps, useAriaDescribedby, FormControl, FormControlProps, Context as FormControlContext };
|
|
@@ -95,14 +95,14 @@ var Provider = Context.Provider;
|
|
|
95
95
|
* Use `FormControl` to provide inputs with labels, helper text and error messages
|
|
96
96
|
*/
|
|
97
97
|
var FormControl = function (_a) {
|
|
98
|
-
var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
98
|
+
var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, _e = _a.helperUnderLabel, helperUnderLabel = _e === void 0 ? false : _e, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "helperUnderLabel", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
99
99
|
var surface = useContext(Context$1).surface;
|
|
100
|
-
var
|
|
100
|
+
var _f = useAriaDescribedby({
|
|
101
101
|
disclosureText: disclosureText,
|
|
102
102
|
errorMessage: errorMessage,
|
|
103
103
|
helper: helper,
|
|
104
104
|
id: htmlFor || id // `htmlFor` is preference to keep this deterministic with TextInput
|
|
105
|
-
}), ariaDescribedby =
|
|
105
|
+
}), ariaDescribedby = _f.ariaDescribedby, idError = _f.idError, idHelper = _f.idHelper, idDisclosure = _f.idDisclosure;
|
|
106
106
|
var LabelType = ElementType === "div" ? "label" : "legend";
|
|
107
107
|
var elementProps = {};
|
|
108
108
|
var labelProps = {};
|
|
@@ -128,11 +128,12 @@ var FormControl = function (_a) {
|
|
|
128
128
|
React__default.createElement(LabelType, __assign({ className: "arc-FormControl-label" }, labelProps),
|
|
129
129
|
label,
|
|
130
130
|
requirementStatus === "optional" && (React__default.createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))),
|
|
131
|
+
helperUnderLabel && (React__default.createElement(React__default.Fragment, null, helper && (React__default.createElement("div", { className: "arc-FormControl-helper arc-FormControl-helper--underLabel", id: idHelper }, helper)))),
|
|
131
132
|
children,
|
|
132
|
-
errorMessage ? (React__default.createElement("div", { className: "arc-FormControl-error", id: idError },
|
|
133
|
+
!helperUnderLabel && (React__default.createElement(React__default.Fragment, null, errorMessage ? (React__default.createElement("div", { className: "arc-FormControl-error", id: idError },
|
|
133
134
|
React__default.createElement("span", { className: "arc-FormControl-error--icon" },
|
|
134
135
|
React__default.createElement(BtIconAlert_2, null)),
|
|
135
|
-
errorMessage)) : disclosureTitle ? (React__default.createElement(FormControlDisclosure, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText)) : (helper && (React__default.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))));
|
|
136
|
+
errorMessage)) : disclosureTitle ? (React__default.createElement(FormControlDisclosure, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText)) : (helper && (React__default.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))))));
|
|
136
137
|
};
|
|
137
138
|
|
|
138
139
|
export { BtIconAlert_2 as B, Context as C, FormControl as F, useAriaDescribedby as u };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Use `VerticalSpace` to create vertical space between components.
|
|
4
|
+
*/
|
|
5
|
+
declare const VerticalSpace: FC<VerticalSpaceProps>;
|
|
6
|
+
type VerticalSpaceSize = "4" | "8" | "12" | "16" | "20" | "24" | "28" | "32" | "40" | "48" | "64" | "96" | "128";
|
|
7
|
+
interface VerticalSpaceProps {
|
|
8
|
+
/**
|
|
9
|
+
* Should the VerticalSpace be visible for debugging and documentation
|
|
10
|
+
* purposes?
|
|
11
|
+
*/
|
|
12
|
+
isDebugVisible?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Size of the VerticalSpace.
|
|
15
|
+
*/
|
|
16
|
+
size?: VerticalSpaceSize;
|
|
17
|
+
/**
|
|
18
|
+
* Size of the VerticalSpace from the small breakpoint upwards.
|
|
19
|
+
*/
|
|
20
|
+
sizeS?: VerticalSpaceSize;
|
|
21
|
+
/**
|
|
22
|
+
* Size of the VerticalSpace from the medium breakpoint upwards.
|
|
23
|
+
*/
|
|
24
|
+
sizeM?: VerticalSpaceSize;
|
|
25
|
+
/**
|
|
26
|
+
* Size of the VerticalSpace from the large breakpoint upwards.
|
|
27
|
+
*/
|
|
28
|
+
sizeL?: VerticalSpaceSize;
|
|
29
|
+
/**
|
|
30
|
+
* Size of the VerticalSpace from the extra large breakpoint upwards.
|
|
31
|
+
*/
|
|
32
|
+
sizeXL?: VerticalSpaceSize;
|
|
33
|
+
}
|
|
34
|
+
export { VerticalSpace, VerticalSpaceSize, VerticalSpaceProps };
|
|
@@ -7,11 +7,15 @@ import React__default from 'react';
|
|
|
7
7
|
*/
|
|
8
8
|
var VerticalSpace = function (_a) {
|
|
9
9
|
var _b;
|
|
10
|
-
var _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "24" : _d, props = __rest(_a, ["isDebugVisible", "size"]);
|
|
10
|
+
var _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "24" : _d, sizeS = _a.sizeS, sizeM = _a.sizeM, sizeL = _a.sizeL, sizeXL = _a.sizeXL, props = __rest(_a, ["isDebugVisible", "size", "sizeS", "sizeM", "sizeL", "sizeXL"]);
|
|
11
11
|
return (React__default.createElement("div", __assign({ className: classNames((_b = {
|
|
12
12
|
"arc-VerticalSpace": true
|
|
13
13
|
},
|
|
14
|
-
_b["arc-VerticalSpace--size".concat(size)] = size
|
|
14
|
+
_b["arc-VerticalSpace--size".concat(size)] = size,
|
|
15
|
+
_b["arc-VerticalSpace--sizeS".concat(sizeS)] = sizeS && sizeS,
|
|
16
|
+
_b["arc-VerticalSpace--sizeM".concat(sizeM)] = sizeM && sizeM,
|
|
17
|
+
_b["arc-VerticalSpace--sizeL".concat(sizeL)] = sizeL && sizeL,
|
|
18
|
+
_b["arc-VerticalSpace--sizeXL".concat(sizeXL)] = sizeXL && sizeXL,
|
|
15
19
|
_b["arc-VerticalSpace--debugVisible"] = isDebugVisible,
|
|
16
20
|
_b)) }, filterDataAttrs(props))));
|
|
17
21
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createContext, useMemo, createElement, useContext, useCallback, forwardRef, Children, isValidElement, cloneElement, Fragment, useEffect, useRef, useLayoutEffect, useState } from 'react';
|
|
2
2
|
import { flushSync } from 'react-dom';
|
|
3
3
|
|
|
4
4
|
function _extends() {
|
|
@@ -385,24 +385,4 @@ function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
|
385
385
|
]);
|
|
386
386
|
}
|
|
387
387
|
|
|
388
|
-
|
|
389
|
-
const BtIconTickAlt2Px = props =>
|
|
390
|
-
/*#__PURE__*/ React.createElement(
|
|
391
|
-
"svg",
|
|
392
|
-
Object.assign(
|
|
393
|
-
{
|
|
394
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
395
|
-
viewBox: "0 0 32 32"
|
|
396
|
-
},
|
|
397
|
-
props
|
|
398
|
-
),
|
|
399
|
-
/*#__PURE__*/ React.createElement("defs", null),
|
|
400
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
401
|
-
d:
|
|
402
|
-
"M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
|
|
403
|
-
fill: "currentColor"
|
|
404
|
-
})
|
|
405
|
-
);
|
|
406
|
-
var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
|
|
407
|
-
|
|
408
|
-
export { $c512c27ab02ef895$export$50c7b4e9d9f19c1 as $, BtIconTickAlt2Px_2 as B, _extends as _, $6ed0406888f73fc4$export$c7b2cbe3552a0d05 as a, $5e63c961fc1ce211$export$8c6ed5c666ac1360 as b, $b1b2314f5f9a1d84$export$25bec8c6f54ee79a as c, $8927f6f2acc4f386$export$250ffa63cdc0d034 as d, $e42e1063c40fb3ef$export$b9ecd428b558ff10 as e, $8927f6f2acc4f386$export$6d1a0317bde7de7f as f, $9f79659886946c16$export$e5c5a5f917a5871c as g, $71cd76cc60e0454e$export$6f32135080cb4c3 as h, $010c2913dbd2fe3d$export$5cae361ad82dce8b as i };
|
|
388
|
+
export { $c512c27ab02ef895$export$50c7b4e9d9f19c1 as $, _extends as _, $6ed0406888f73fc4$export$c7b2cbe3552a0d05 as a, $5e63c961fc1ce211$export$8c6ed5c666ac1360 as b, $b1b2314f5f9a1d84$export$25bec8c6f54ee79a as c, $8927f6f2acc4f386$export$250ffa63cdc0d034 as d, $e42e1063c40fb3ef$export$b9ecd428b558ff10 as e, $8927f6f2acc4f386$export$6d1a0317bde7de7f as f, $9f79659886946c16$export$e5c5a5f917a5871c as g, $71cd76cc60e0454e$export$6f32135080cb4c3 as h, $010c2913dbd2fe3d$export$5cae361ad82dce8b as i };
|
package/dist/index.es.js
CHANGED
|
@@ -1178,10 +1178,7 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
1178
1178
|
});
|
|
1179
1179
|
var ButtonIcon = function (_a) {
|
|
1180
1180
|
var icon = _a.icon, isChevron = _a.isChevron, isBeforeText = _a.isBeforeText;
|
|
1181
|
-
return (React__default.createElement("span", { className:
|
|
1182
|
-
"arc-Button-icon": true,
|
|
1183
|
-
"arc-Button-icon--chevron": isChevron
|
|
1184
|
-
}) }, isChevron ? (React__default.createElement(Icon, { icon: isBeforeText ? BtIconChevronLeftMid_2 : BtIconChevronRightMid_2 })) : (React__default.createElement(Icon, { icon: icon }))));
|
|
1181
|
+
return (React__default.createElement("span", { className: "arc-Button-icon" }, isChevron ? (React__default.createElement(Icon, { icon: isBeforeText ? BtIconChevronLeftMid_2 : BtIconChevronRightMid_2 })) : (React__default.createElement(Icon, { icon: icon }))));
|
|
1185
1182
|
};
|
|
1186
1183
|
|
|
1187
1184
|
/**
|
|
@@ -1438,11 +1435,11 @@ var CardLink = function (_a) {
|
|
|
1438
1435
|
}), href: href, rel: target === "_blank" ? "noopener noreferrer" : undefined, tabIndex: isButton ? -1 : undefined, target: target }, filterDataAttrs(linkData)),
|
|
1439
1436
|
React__default.createElement("span", { className: "arc-Card-linkText" }, children),
|
|
1440
1437
|
isButton && (React__default.createElement("span", { className: "arc-Card-linkIcon" },
|
|
1441
|
-
React__default.createElement(Icon, { testId: "cardIcon", icon: BtIconChevronRightMid_2, size:
|
|
1438
|
+
React__default.createElement(Icon, { testId: "cardIcon", icon: BtIconChevronRightMid_2, size: 24 })))));
|
|
1442
1439
|
};
|
|
1443
1440
|
|
|
1444
1441
|
const React$4 = React__default;
|
|
1445
|
-
const
|
|
1442
|
+
const BtIconTickAlt2Px = props =>
|
|
1446
1443
|
/*#__PURE__*/ React$4.createElement(
|
|
1447
1444
|
"svg",
|
|
1448
1445
|
Object.assign(
|
|
@@ -1455,11 +1452,11 @@ const BtIconTickVariant = props =>
|
|
|
1455
1452
|
/*#__PURE__*/ React$4.createElement("defs", null),
|
|
1456
1453
|
/*#__PURE__*/ React$4.createElement("path", {
|
|
1457
1454
|
d:
|
|
1458
|
-
"M13.
|
|
1455
|
+
"M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
|
|
1459
1456
|
fill: "currentColor"
|
|
1460
1457
|
})
|
|
1461
1458
|
);
|
|
1462
|
-
var
|
|
1459
|
+
var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
|
|
1463
1460
|
|
|
1464
1461
|
const React$3 = React__default;
|
|
1465
1462
|
const BtIconAlert = props =>
|
|
@@ -1543,14 +1540,14 @@ var Provider$3 = Context$2.Provider;
|
|
|
1543
1540
|
* Use `FormControl` to provide inputs with labels, helper text and error messages
|
|
1544
1541
|
*/
|
|
1545
1542
|
var FormControl = function (_a) {
|
|
1546
|
-
var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest$2(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
1543
|
+
var children = _a.children, _b = _a.elementType, ElementType = _b === void 0 ? "div" : _b, errorMessage = _a.errorMessage, helper = _a.helper, htmlFor = _a.htmlFor, id = _a.id, label = _a.label, _c = _a.labelSize, labelSize = _c === void 0 ? "l" : _c, _d = _a.requirementStatus, requirementStatus = _d === void 0 ? "optional" : _d, _e = _a.helperUnderLabel, helperUnderLabel = _e === void 0 ? false : _e, isDisabled = _a.isDisabled, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure, props = __rest$2(_a, ["children", "elementType", "errorMessage", "helper", "htmlFor", "id", "label", "labelSize", "requirementStatus", "helperUnderLabel", "isDisabled", "disclosureTitle", "disclosureText", "onClickDisclosure"]);
|
|
1547
1544
|
var surface = useContext(Context$3).surface;
|
|
1548
|
-
var
|
|
1545
|
+
var _f = useAriaDescribedby({
|
|
1549
1546
|
disclosureText: disclosureText,
|
|
1550
1547
|
errorMessage: errorMessage,
|
|
1551
1548
|
helper: helper,
|
|
1552
1549
|
id: htmlFor || id // `htmlFor` is preference to keep this deterministic with TextInput
|
|
1553
|
-
}), ariaDescribedby =
|
|
1550
|
+
}), ariaDescribedby = _f.ariaDescribedby, idError = _f.idError, idHelper = _f.idHelper, idDisclosure = _f.idDisclosure;
|
|
1554
1551
|
var LabelType = ElementType === "div" ? "label" : "legend";
|
|
1555
1552
|
var elementProps = {};
|
|
1556
1553
|
var labelProps = {};
|
|
@@ -1576,11 +1573,12 @@ var FormControl = function (_a) {
|
|
|
1576
1573
|
React__default.createElement(LabelType, __assign$2({ className: "arc-FormControl-label" }, labelProps),
|
|
1577
1574
|
label,
|
|
1578
1575
|
requirementStatus === "optional" && (React__default.createElement("span", { className: "arc-FormControl-labelOptional" }, "(optional)"))),
|
|
1576
|
+
helperUnderLabel && (React__default.createElement(React__default.Fragment, null, helper && (React__default.createElement("div", { className: "arc-FormControl-helper arc-FormControl-helper--underLabel", id: idHelper }, helper)))),
|
|
1579
1577
|
children,
|
|
1580
|
-
errorMessage ? (React__default.createElement("div", { className: "arc-FormControl-error", id: idError },
|
|
1578
|
+
!helperUnderLabel && (React__default.createElement(React__default.Fragment, null, errorMessage ? (React__default.createElement("div", { className: "arc-FormControl-error", id: idError },
|
|
1581
1579
|
React__default.createElement("span", { className: "arc-FormControl-error--icon" },
|
|
1582
1580
|
React__default.createElement(BtIconAlert_2, null)),
|
|
1583
|
-
errorMessage)) : disclosureTitle ? (React__default.createElement(FormControlDisclosure, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText)) : (helper && (React__default.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))));
|
|
1581
|
+
errorMessage)) : disclosureTitle ? (React__default.createElement(FormControlDisclosure, { onClick: onClickDisclosure, summary: disclosureTitle, size: labelSize, id: idDisclosure }, disclosureText)) : (helper && (React__default.createElement("div", { className: "arc-FormControl-helper", id: idHelper }, helper))))))));
|
|
1584
1582
|
};
|
|
1585
1583
|
|
|
1586
1584
|
/**
|
|
@@ -1615,7 +1613,7 @@ var Checkbox = forwardRef(function (_a, ref) {
|
|
|
1615
1613
|
React__default.createElement("label", { id: idLabel, htmlFor: id, className: "arc-Checkbox-label" },
|
|
1616
1614
|
React__default.createElement("input", __assign$2({ "aria-describedby": ariaDescribedby, "aria-invalid": errorMessage ? "true" : "false", className: "arc-Checkbox-input" }, checkedProps, { disabled: isDisabled, id: id, name: name, onBlur: onBlur, onChange: onChange, ref: ref, required: isRequired, type: "checkbox", value: value }, filterDataAttrs(props))),
|
|
1617
1615
|
React__default.createElement("span", { className: "arc-Checkbox-box" },
|
|
1618
|
-
React__default.createElement(
|
|
1616
|
+
React__default.createElement(BtIconTickAlt2Px_2, null)),
|
|
1619
1617
|
React__default.createElement("span", null,
|
|
1620
1618
|
label,
|
|
1621
1619
|
!isRequired && requirementStatus !== "optional" ? (React__default.createElement("span", { className: "arc-Checkbox-labelOptional" }, "(optional)")) : null,
|
|
@@ -1931,7 +1929,7 @@ var RadioGroup = function (_a) {
|
|
|
1931
1929
|
size: size
|
|
1932
1930
|
} },
|
|
1933
1931
|
React__default.createElement("div", __assign$2({ className: "arc-RadioGroup" }, filterDataAttrs(props)),
|
|
1934
|
-
React__default.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable" }, children))));
|
|
1932
|
+
React__default.createElement(FormControl, { elementType: "fieldset", label: label, labelSize: labelSize, helper: helper, id: id, requirementStatus: "not-applicable", helperUnderLabel: true }, children))));
|
|
1935
1933
|
};
|
|
1936
1934
|
RadioButton.displayName = "RadioGroup.RadioButton";
|
|
1937
1935
|
RadioGroup.RadioButton = RadioButton;
|
|
@@ -35728,26 +35726,6 @@ const BtIconChevronUp2Px = props =>
|
|
|
35728
35726
|
);
|
|
35729
35727
|
var BtIconChevronUp2Px_2 = BtIconChevronUp2Px;
|
|
35730
35728
|
|
|
35731
|
-
const React = React__default;
|
|
35732
|
-
const BtIconTickAlt2Px = props =>
|
|
35733
|
-
/*#__PURE__*/ React.createElement(
|
|
35734
|
-
"svg",
|
|
35735
|
-
Object.assign(
|
|
35736
|
-
{
|
|
35737
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
35738
|
-
viewBox: "0 0 32 32"
|
|
35739
|
-
},
|
|
35740
|
-
props
|
|
35741
|
-
),
|
|
35742
|
-
/*#__PURE__*/ React.createElement("defs", null),
|
|
35743
|
-
/*#__PURE__*/ React.createElement("path", {
|
|
35744
|
-
d:
|
|
35745
|
-
"M13.49963,21.91418l-4.707-4.707a1.0014,1.0014,0,0,1,0-1.41406,1.02353,1.02353,0,0,1,1.41406,0l3.293,3.293,8.293-8.293a.99989.99989,0,1,1,1.41406,1.41406Z",
|
|
35746
|
-
fill: "currentColor"
|
|
35747
|
-
})
|
|
35748
|
-
);
|
|
35749
|
-
var BtIconTickAlt2Px_2 = BtIconTickAlt2Px;
|
|
35750
|
-
|
|
35751
35729
|
/** Use `Select` to choose from a dropdown list of options. */
|
|
35752
35730
|
var Select = function (_a) {
|
|
35753
35731
|
var isRequired = _a.isRequired, isDisabled = _a.isDisabled, placeholder = _a.placeholder, label = _a.label, options = _a.options, onOpenChange = _a.onOpenChange, isDefaultOpen = _a.isDefaultOpen, defaultValue = _a.defaultValue, errorMessage = _a.errorMessage, labelSize = _a.labelSize, helper = _a.helper, name = _a.name, isFluid = _a.isFluid, onBlur = _a.onBlur, onChange = _a.onChange, disclosureTitle = _a.disclosureTitle, disclosureText = _a.disclosureText, onClickDisclosure = _a.onClickDisclosure;
|
|
@@ -36686,11 +36664,15 @@ const $6be4966fd9bbc698$export$6521433ed15a34db = $6be4966fd9bbc698$export$4d07b
|
|
|
36686
36664
|
*/
|
|
36687
36665
|
var VerticalSpace = function (_a) {
|
|
36688
36666
|
var _b;
|
|
36689
|
-
var _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "24" : _d, props = __rest$2(_a, ["isDebugVisible", "size"]);
|
|
36667
|
+
var _c = _a.isDebugVisible, isDebugVisible = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? "24" : _d, sizeS = _a.sizeS, sizeM = _a.sizeM, sizeL = _a.sizeL, sizeXL = _a.sizeXL, props = __rest$2(_a, ["isDebugVisible", "size", "sizeS", "sizeM", "sizeL", "sizeXL"]);
|
|
36690
36668
|
return (React__default.createElement("div", __assign$2({ className: classNames((_b = {
|
|
36691
36669
|
"arc-VerticalSpace": true
|
|
36692
36670
|
},
|
|
36693
|
-
_b["arc-VerticalSpace--size".concat(size)] = size
|
|
36671
|
+
_b["arc-VerticalSpace--size".concat(size)] = size,
|
|
36672
|
+
_b["arc-VerticalSpace--sizeS".concat(sizeS)] = sizeS && sizeS,
|
|
36673
|
+
_b["arc-VerticalSpace--sizeM".concat(sizeM)] = sizeM && sizeM,
|
|
36674
|
+
_b["arc-VerticalSpace--sizeL".concat(sizeL)] = sizeL && sizeL,
|
|
36675
|
+
_b["arc-VerticalSpace--sizeXL".concat(sizeXL)] = sizeXL && sizeXL,
|
|
36694
36676
|
_b["arc-VerticalSpace--debugVisible"] = isDebugVisible,
|
|
36695
36677
|
_b)) }, filterDataAttrs(props))));
|
|
36696
36678
|
};
|
|
@@ -36743,6 +36725,63 @@ var Badge = function (_a) {
|
|
|
36743
36725
|
React__default.createElement(Text, { size: size === "default" ? "xs" : "m" }, children))));
|
|
36744
36726
|
};
|
|
36745
36727
|
|
|
36728
|
+
const React = React__default;
|
|
36729
|
+
const BtIconCross = props =>
|
|
36730
|
+
/*#__PURE__*/ React.createElement(
|
|
36731
|
+
"svg",
|
|
36732
|
+
Object.assign(
|
|
36733
|
+
{
|
|
36734
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
36735
|
+
viewBox: "0 0 32 32"
|
|
36736
|
+
},
|
|
36737
|
+
props
|
|
36738
|
+
),
|
|
36739
|
+
/*#__PURE__*/ React.createElement("defs", null),
|
|
36740
|
+
/*#__PURE__*/ React.createElement("path", {
|
|
36741
|
+
d:
|
|
36742
|
+
"M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,27A13,13,0,1,1,29,16,13.01474,13.01474,0,0,1,16,29Z",
|
|
36743
|
+
fill: "currentColor"
|
|
36744
|
+
}),
|
|
36745
|
+
/*#__PURE__*/ React.createElement("path", {
|
|
36746
|
+
d:
|
|
36747
|
+
"M20.85352,11.14648a.49983.49983,0,0,0-.707,0L16,15.293l-4.14648-4.14649a.5.5,0,0,0-.707.707L15.293,16l-4.14649,4.14648a.5.5,0,1,0,.707.707L16,16.707l4.14648,4.14649a.5.5,0,0,0,.707-.707L16.707,16l4.14649-4.14648A.49983.49983,0,0,0,20.85352,11.14648Z",
|
|
36748
|
+
fill: "currentColor"
|
|
36749
|
+
})
|
|
36750
|
+
);
|
|
36751
|
+
var BtIconCross_2 = BtIconCross;
|
|
36752
|
+
|
|
36753
|
+
/**
|
|
36754
|
+
* use `Tag` to promote features and manage filtering.
|
|
36755
|
+
*/
|
|
36756
|
+
var Tag = function (_a) {
|
|
36757
|
+
var children = _a.children, isRemovable = _a.isRemovable, link = _a.link, icon = _a.icon, onClick = _a.onClick, onRemove = _a.onRemove, props = __rest$2(_a, ["children", "isRemovable", "link", "icon", "onClick", "onRemove"]);
|
|
36758
|
+
var surface = useContext(Context$3).surface;
|
|
36759
|
+
var _b = useState(false), isRemoved = _b[0], setIsRemoved = _b[1];
|
|
36760
|
+
var onRemoveHandler = function () {
|
|
36761
|
+
setIsRemoved(function (p) { return !p; });
|
|
36762
|
+
onRemove && onRemove();
|
|
36763
|
+
};
|
|
36764
|
+
return (React__default.createElement("div", __assign$2({ className: classNames("arc-Tag", {
|
|
36765
|
+
"arc-Tag--onDarkSurface": surface === "dark",
|
|
36766
|
+
"arc-Tag--isRemovable": isRemovable,
|
|
36767
|
+
"arc-Tag--hasIcon": icon,
|
|
36768
|
+
"arc-Tag--hasLink": link || onClick,
|
|
36769
|
+
"arc-Tag--removed": isRemoved
|
|
36770
|
+
}) }, (isRemoved && { "aria-hidden": true }), filterDataAttrs(props)),
|
|
36771
|
+
link ? (React__default.createElement("a", { className: "arc-Tag-content", href: link, tabIndex: 0 },
|
|
36772
|
+
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
36773
|
+
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
36774
|
+
React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement(React__default.Fragment, null, onClick ? (React__default.createElement("button", { className: "arc-Tag-content", onClick: onClick, "data-testid": "arc-Tag-content" },
|
|
36775
|
+
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
36776
|
+
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
36777
|
+
React__default.createElement("div", { className: "arc-Tag-label" }, children))) : (React__default.createElement("div", { className: "arc-Tag-content", "data-testid": "arc-Tag-content" },
|
|
36778
|
+
icon && (React__default.createElement("span", { className: "arc-Tag-icon" },
|
|
36779
|
+
React__default.createElement(Icon, { "data-testid": "arc-Tag-icon", icon: icon, size: 16 }))),
|
|
36780
|
+
React__default.createElement("div", { className: "arc-Tag-label" }, children))))),
|
|
36781
|
+
isRemovable && (React__default.createElement("button", { className: "arc-Tag-icon arc-Tag-icon--removable", onClick: onRemoveHandler, "data-testid": "arc-Tag-icon-removable", "aria-live": "polite", "aria-roledescription": "remove tag" },
|
|
36782
|
+
React__default.createElement(Icon, { icon: BtIconCross_2, color: "brand", size: 20 })))));
|
|
36783
|
+
};
|
|
36784
|
+
|
|
36746
36785
|
/**
|
|
36747
36786
|
* Provides text for screen readers that is visually hidden.
|
|
36748
36787
|
*/
|
|
@@ -36794,5 +36833,5 @@ var Truncate = function (_a) {
|
|
|
36794
36833
|
return (React__default.createElement("div", { className: "arc-Truncate", style: { maxWidth: "".concat(maxWidth, "%") }, title: title }, children));
|
|
36795
36834
|
};
|
|
36796
36835
|
|
|
36797
|
-
export { Align, Badge, Base, BrandLogo, Breadcrumbs, Button, Card, Checkbox, Clock, Clock_rehydrator as ClockRehydrator, Columns, Curve, Disclosure, Elevation, FormControl, Group, Heading, Icon, Image, Markup, Poster, RadioGroup, Rule, Section, Select, SiteFooter, SiteFooter_rehydrator as SiteFooterRehydrator, SiteHeader, SiteHeaderRehydrator, Surface, Context$3 as SurfaceContext, Switch, Text, TextInput, Truncate, UniversalHeader, VerticalSpace, VisuallyHidden };
|
|
36836
|
+
export { Align, Badge, Base, BrandLogo, Breadcrumbs, Button, Card, Checkbox, Clock, Clock_rehydrator as ClockRehydrator, Columns, Curve, Disclosure, Elevation, FormControl, Group, Heading, Icon, Image, Markup, Poster, RadioGroup, Rule, Section, Select, SiteFooter, SiteFooter_rehydrator as SiteFooterRehydrator, SiteHeader, SiteHeaderRehydrator, Surface, Context$3 as SurfaceContext, Switch, Tag, Text, TextInput, Truncate, UniversalHeader, VerticalSpace, VisuallyHidden };
|
|
36798
36837
|
//# sourceMappingURL=index.es.js.map
|