@arc-ui/components 11.14.0 → 11.16.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/Breadcrumbs/Breadcrumbs.cjs.js +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +1 -1
- package/dist/Checkbox/Checkbox.cjs.js +2 -2
- package/dist/Checkbox/Checkbox.esm.js +2 -2
- package/dist/FormControl/FormControl.cjs.js +1 -1
- package/dist/FormControl/FormControl.esm.js +1 -1
- package/dist/InformationCard/InformationCard.cjs.js +25 -43
- package/dist/InformationCard/InformationCard.esm.js +24 -42
- package/dist/Modal/Modal.cjs.js +16 -40
- package/dist/Modal/Modal.esm.js +6 -30
- package/dist/PaginationSimple/PaginationSimple.cjs.js +19 -16
- package/dist/PaginationSimple/PaginationSimple.esm.js +19 -16
- package/dist/RadioGroup/RadioGroup.cjs.js +2 -2
- package/dist/RadioGroup/RadioGroup.esm.js +2 -2
- package/dist/Select/Select.cjs.js +2736 -619
- package/dist/Select/Select.esm.js +2535 -418
- package/dist/Switch/Switch.cjs.js +335 -11
- package/dist/Switch/Switch.esm.js +328 -4
- package/dist/Tabs/Tabs.cjs.js +7 -4
- package/dist/Tabs/Tabs.esm.js +7 -4
- package/dist/TextArea/TextArea.cjs.js +17 -12
- package/dist/TextArea/TextArea.esm.js +17 -12
- package/dist/TextInput/TextInput.cjs.js +2 -2
- package/dist/TextInput/TextInput.esm.js +2 -2
- package/dist/Toast/Toast.cjs.js +7 -4
- package/dist/Toast/Toast.esm.js +7 -4
- package/dist/TypographyCard/TypographyCard.cjs.js +93 -0
- package/dist/TypographyCard/TypographyCard.esm.js +85 -0
- package/dist/TypographyCard/package.json +7 -0
- package/dist/UniversalHeader/UniversalHeader.cjs.js +1 -1
- package/dist/UniversalHeader/UniversalHeader.esm.js +1 -1
- package/dist/_shared/cjs/{Breadcrumbs-ed70e75a.js → Breadcrumbs-ef659d2b.js} +5 -5
- package/dist/_shared/cjs/BtIconArrowRight.esm-8e8ac316.js +30 -0
- package/dist/_shared/cjs/BtIconArrowRightFill.esm-435cf4bd.js +26 -0
- package/dist/_shared/cjs/{Checkbox-b126194e.js → Checkbox-904ad028.js} +1 -1
- package/dist/_shared/cjs/{FormControl-7daf8110.js → FormControl-166e0957.js} +5 -1
- package/dist/_shared/cjs/{RadioGroup-56e3b0e5.js → RadioGroup-1eddf86f.js} +1 -1
- package/dist/_shared/cjs/{Tabs-2d2a517d.js → Tabs-cc77dabb.js} +17 -37
- package/dist/_shared/cjs/{TextInput-bf1fe052.js → TextInput-fd9c756f.js} +10 -4
- package/dist/_shared/cjs/{Toast-69108261.js → Toast-91e96744.js} +36 -54
- package/dist/_shared/cjs/{UniversalHeader-5e43d320.js → UniversalHeader-b8389447.js} +4 -2
- package/dist/_shared/cjs/index-1641d0b4.js +27 -0
- package/dist/_shared/cjs/{index-43458549.js → index-3d69ea00.js} +28 -1
- package/dist/_shared/cjs/index-49c72a87.js +131 -0
- package/dist/_shared/cjs/{index-6b2a9ac3.js → index-4ecad2dd.js} +6 -22
- package/dist/_shared/cjs/{index.module-dd1d7d0b.js → index-56a040f4.js} +87 -104
- package/dist/_shared/cjs/index-6542b467.js +23 -0
- package/dist/_shared/cjs/{index-adbb63da.js → index-84e6a68f.js} +1 -1
- package/dist/_shared/cjs/{index-b2fd6338.js → index-d31f2b65.js} +1 -1
- package/dist/_shared/cjs/index-dcfdd5da.js +11 -0
- package/dist/_shared/esm/{Breadcrumbs-87e2bd46.js → Breadcrumbs-36edfb3d.js} +5 -5
- package/dist/_shared/esm/BtIconArrowRight.esm-267916a4.js +24 -0
- package/dist/_shared/esm/BtIconArrowRightFill.esm-99019d1a.js +20 -0
- package/dist/_shared/esm/{Checkbox-d6ec5024.js → Checkbox-8a5bb9a1.js} +1 -1
- package/dist/_shared/esm/{FormControl-351e5f1b.js → FormControl-9d4ddfec.js} +5 -1
- package/dist/_shared/esm/{RadioGroup-c838764c.js → RadioGroup-238db88d.js} +1 -1
- package/dist/_shared/esm/{Tabs-f903187a.js → Tabs-8719d952.js} +7 -27
- package/dist/_shared/esm/{TextInput-991804b6.js → TextInput-c1e2a1dd.js} +10 -4
- package/dist/_shared/esm/{Toast-37549e68.js → Toast-7cb1e544.js} +6 -24
- package/dist/_shared/esm/{UniversalHeader-b4c1577c.js → UniversalHeader-80c7313f.js} +4 -2
- package/dist/_shared/esm/{index.module-44714d3f.js → index-12f3a407.js} +89 -105
- package/dist/_shared/esm/index-246b4f18.js +21 -0
- package/dist/_shared/esm/{index-a1d2d9b3.js → index-39019a9b.js} +1 -1
- package/dist/_shared/esm/{index-41d7af2b.js → index-3e2bc99d.js} +29 -3
- package/dist/_shared/esm/index-6b7b075c.js +25 -0
- package/dist/_shared/esm/{index-efd9ef1c.js → index-936b5179.js} +1 -1
- package/dist/_shared/esm/index-a624de47.js +9 -0
- package/dist/_shared/esm/{index-3797d77e.js → index-d0307140.js} +5 -21
- package/dist/_shared/esm/index-db47e95a.js +129 -0
- package/dist/index.es.js +3062 -865
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3062 -864
- package/dist/index.js.map +1 -1
- package/dist/styles.css +5 -5
- package/dist/types/components/MediaCard/MediaCard.d.ts +24 -30
- package/dist/types/components/Select/Select.d.ts +49 -0
- package/dist/types/components/TextInput/TextInput.d.ts +12 -1
- package/dist/types/components/TypographyCard/TypographyCard.d.ts +48 -0
- package/dist/types/components/TypographyCard/index.d.ts +1 -0
- package/dist/types/components/UniversalHeader/UniversalHeader.d.ts +4 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/internal-components/ConditionalWrapper/ConditionalWrapper.d.ts +6 -0
- package/dist/types/internal-components/ConditionalWrapper/index.d.ts +1 -0
- package/dist/types/internal-components/index.d.ts +1 -0
- package/dist/types/styles.d.ts +2 -1
- package/package.json +2 -2
- package/dist/_shared/cjs/index-c575a255.js +0 -490
- package/dist/_shared/esm/index-13d575cc.js +0 -479
- package/dist/types/components/MediaCard/MediaCard.stories-wip.d.ts +0 -15
|
@@ -1,20 +1,230 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
2
|
-
import React__default, {
|
|
2
|
+
import React__default, { useCallback, createContext, useMemo, createElement, useContext, useRef, useEffect, useState, useLayoutEffect, forwardRef, Children, isValidElement, cloneElement, Fragment } from 'react';
|
|
3
3
|
import { c as classNames } from '../_shared/esm/index-2e73c2e9.js';
|
|
4
4
|
import { _ as _extends } from '../_shared/esm/extends-8cc61aad.js';
|
|
5
|
-
import
|
|
5
|
+
import 'react-dom';
|
|
6
6
|
import { I as Icon } from '../_shared/esm/Icon-abd0d990.js';
|
|
7
7
|
import { B as BtIconTickAlt2Px } from '../_shared/esm/BtIconTickAlt2Px.esm-0bc2ded0.js';
|
|
8
8
|
import { C as Context } from '../_shared/esm/Surface-0ca6817d.js';
|
|
9
|
-
import { F as FormControl } from '../_shared/esm/FormControl-
|
|
9
|
+
import { F as FormControl } from '../_shared/esm/FormControl-9d4ddfec.js';
|
|
10
10
|
import { V as VerticalSpace } from '../_shared/esm/VerticalSpace-43cd9138.js';
|
|
11
11
|
import { T as Text } from '../_shared/esm/Text-14f586ac.js';
|
|
12
|
-
import 'react-dom';
|
|
13
12
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
14
13
|
import '../_shared/esm/BtIconAlert.esm-a4608d47.js';
|
|
15
14
|
import '../_shared/esm/DisclosureMini-ec17b008.js';
|
|
16
15
|
import '../_shared/esm/BtIconChevronDown2Px.esm-217276c2.js';
|
|
17
16
|
|
|
17
|
+
function $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {
|
|
18
|
+
return function handleEvent(event) {
|
|
19
|
+
originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);
|
|
20
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Set a given ref to a given value
|
|
26
|
+
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
27
|
+
*/ function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
28
|
+
if (typeof ref === 'function') ref(value);
|
|
29
|
+
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A utility to compose multiple refs together
|
|
33
|
+
* Accepts callback refs and RefObject(s)
|
|
34
|
+
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
35
|
+
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
|
|
36
|
+
)
|
|
37
|
+
;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A custom hook that composes multiple refs
|
|
41
|
+
* Accepts callback refs and RefObject(s)
|
|
42
|
+
*/ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {
|
|
43
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
44
|
+
return useCallback($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* -------------------------------------------------------------------------------------------------
|
|
48
|
+
* createContextScope
|
|
49
|
+
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$50c7b4e9d9f19c1(scopeName, createContextScopeDeps = []) {
|
|
50
|
+
let defaultContexts = [];
|
|
51
|
+
/* -----------------------------------------------------------------------------------------------
|
|
52
|
+
* createContext
|
|
53
|
+
* ---------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$export$fd42f52fd3ae1109(rootComponentName, defaultContext) {
|
|
54
|
+
const BaseContext = /*#__PURE__*/ createContext(defaultContext);
|
|
55
|
+
const index = defaultContexts.length;
|
|
56
|
+
defaultContexts = [
|
|
57
|
+
...defaultContexts,
|
|
58
|
+
defaultContext
|
|
59
|
+
];
|
|
60
|
+
function Provider(props) {
|
|
61
|
+
const { scope: scope , children: children , ...context } = props;
|
|
62
|
+
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext; // Only re-memoize when prop values change
|
|
63
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
+
const value = useMemo(()=>context
|
|
65
|
+
, Object.values(context));
|
|
66
|
+
return /*#__PURE__*/ createElement(Context.Provider, {
|
|
67
|
+
value: value
|
|
68
|
+
}, children);
|
|
69
|
+
}
|
|
70
|
+
function useContext$1(consumerName, scope) {
|
|
71
|
+
const Context = (scope === null || scope === void 0 ? void 0 : scope[scopeName][index]) || BaseContext;
|
|
72
|
+
const context = useContext(Context);
|
|
73
|
+
if (context) return context;
|
|
74
|
+
if (defaultContext !== undefined) return defaultContext; // if a defaultContext wasn't specified, it's a required context.
|
|
75
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
76
|
+
}
|
|
77
|
+
Provider.displayName = rootComponentName + 'Provider';
|
|
78
|
+
return [
|
|
79
|
+
Provider,
|
|
80
|
+
useContext$1
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
/* -----------------------------------------------------------------------------------------------
|
|
84
|
+
* createScope
|
|
85
|
+
* ---------------------------------------------------------------------------------------------*/ const createScope = ()=>{
|
|
86
|
+
const scopeContexts = defaultContexts.map((defaultContext)=>{
|
|
87
|
+
return /*#__PURE__*/ createContext(defaultContext);
|
|
88
|
+
});
|
|
89
|
+
return function useScope(scope) {
|
|
90
|
+
const contexts = (scope === null || scope === void 0 ? void 0 : scope[scopeName]) || scopeContexts;
|
|
91
|
+
return useMemo(()=>({
|
|
92
|
+
[`__scope${scopeName}`]: {
|
|
93
|
+
...scope,
|
|
94
|
+
[scopeName]: contexts
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
, [
|
|
98
|
+
scope,
|
|
99
|
+
contexts
|
|
100
|
+
]);
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
createScope.scopeName = scopeName;
|
|
104
|
+
return [
|
|
105
|
+
$c512c27ab02ef895$export$fd42f52fd3ae1109,
|
|
106
|
+
$c512c27ab02ef895$var$composeContextScopes(createScope, ...createContextScopeDeps)
|
|
107
|
+
];
|
|
108
|
+
}
|
|
109
|
+
/* -------------------------------------------------------------------------------------------------
|
|
110
|
+
* composeContextScopes
|
|
111
|
+
* -----------------------------------------------------------------------------------------------*/ function $c512c27ab02ef895$var$composeContextScopes(...scopes) {
|
|
112
|
+
const baseScope = scopes[0];
|
|
113
|
+
if (scopes.length === 1) return baseScope;
|
|
114
|
+
const createScope1 = ()=>{
|
|
115
|
+
const scopeHooks = scopes.map((createScope)=>({
|
|
116
|
+
useScope: createScope(),
|
|
117
|
+
scopeName: createScope.scopeName
|
|
118
|
+
})
|
|
119
|
+
);
|
|
120
|
+
return function useComposedScopes(overrideScopes) {
|
|
121
|
+
const nextScopes1 = scopeHooks.reduce((nextScopes, { useScope: useScope , scopeName: scopeName })=>{
|
|
122
|
+
// We are calling a hook inside a callback which React warns against to avoid inconsistent
|
|
123
|
+
// renders, however, scoping doesn't have render side effects so we ignore the rule.
|
|
124
|
+
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
125
|
+
const scopeProps = useScope(overrideScopes);
|
|
126
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
127
|
+
return {
|
|
128
|
+
...nextScopes,
|
|
129
|
+
...currentScope
|
|
130
|
+
};
|
|
131
|
+
}, {});
|
|
132
|
+
return useMemo(()=>({
|
|
133
|
+
[`__scope${baseScope.scopeName}`]: nextScopes1
|
|
134
|
+
})
|
|
135
|
+
, [
|
|
136
|
+
nextScopes1
|
|
137
|
+
]);
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
createScope1.scopeName = baseScope.scopeName;
|
|
141
|
+
return createScope1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a
|
|
146
|
+
* prop or avoid re-executing effects when passed as a dependency
|
|
147
|
+
*/ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {
|
|
148
|
+
const callbackRef = useRef(callback);
|
|
149
|
+
useEffect(()=>{
|
|
150
|
+
callbackRef.current = callback;
|
|
151
|
+
}); // https://github.com/facebook/react/issues/19240
|
|
152
|
+
return useMemo(()=>(...args)=>{
|
|
153
|
+
var _callbackRef$current;
|
|
154
|
+
return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);
|
|
155
|
+
}
|
|
156
|
+
, []);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {
|
|
160
|
+
const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({
|
|
161
|
+
defaultProp: defaultProp,
|
|
162
|
+
onChange: onChange
|
|
163
|
+
});
|
|
164
|
+
const isControlled = prop !== undefined;
|
|
165
|
+
const value1 = isControlled ? prop : uncontrolledProp;
|
|
166
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
167
|
+
const setValue = useCallback((nextValue)=>{
|
|
168
|
+
if (isControlled) {
|
|
169
|
+
const setter = nextValue;
|
|
170
|
+
const value = typeof nextValue === 'function' ? setter(prop) : nextValue;
|
|
171
|
+
if (value !== prop) handleChange(value);
|
|
172
|
+
} else setUncontrolledProp(nextValue);
|
|
173
|
+
}, [
|
|
174
|
+
isControlled,
|
|
175
|
+
prop,
|
|
176
|
+
setUncontrolledProp,
|
|
177
|
+
handleChange
|
|
178
|
+
]);
|
|
179
|
+
return [
|
|
180
|
+
value1,
|
|
181
|
+
setValue
|
|
182
|
+
];
|
|
183
|
+
}
|
|
184
|
+
function $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {
|
|
185
|
+
const uncontrolledState = useState(defaultProp);
|
|
186
|
+
const [value] = uncontrolledState;
|
|
187
|
+
const prevValueRef = useRef(value);
|
|
188
|
+
const handleChange = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onChange);
|
|
189
|
+
useEffect(()=>{
|
|
190
|
+
if (prevValueRef.current !== value) {
|
|
191
|
+
handleChange(value);
|
|
192
|
+
prevValueRef.current = value;
|
|
193
|
+
}
|
|
194
|
+
}, [
|
|
195
|
+
value,
|
|
196
|
+
prevValueRef,
|
|
197
|
+
handleChange
|
|
198
|
+
]);
|
|
199
|
+
return uncontrolledState;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
203
|
+
const ref = useRef({
|
|
204
|
+
value: value,
|
|
205
|
+
previous: value
|
|
206
|
+
}); // We compare values before making an update to ensure that
|
|
207
|
+
// a change has been made. This ensures the previous value is
|
|
208
|
+
// persisted correctly between renders.
|
|
209
|
+
return useMemo(()=>{
|
|
210
|
+
if (ref.current.value !== value) {
|
|
211
|
+
ref.current.previous = ref.current.value;
|
|
212
|
+
ref.current.value = value;
|
|
213
|
+
}
|
|
214
|
+
return ref.current.previous;
|
|
215
|
+
}, [
|
|
216
|
+
value
|
|
217
|
+
]);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
222
|
+
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
223
|
+
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
224
|
+
*
|
|
225
|
+
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
226
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? useLayoutEffect : ()=>{};
|
|
227
|
+
|
|
18
228
|
function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
19
229
|
const [size, setSize] = useState(undefined);
|
|
20
230
|
$9f79659886946c16$export$e5c5a5f917a5871c(()=>{
|
|
@@ -62,6 +272,120 @@ function $db6c3485150b8e66$export$1ab7ae714698c4b8(element) {
|
|
|
62
272
|
return size;
|
|
63
273
|
}
|
|
64
274
|
|
|
275
|
+
/* -------------------------------------------------------------------------------------------------
|
|
276
|
+
* Slot
|
|
277
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
278
|
+
const { children: children , ...slotProps } = props;
|
|
279
|
+
const childrenArray = Children.toArray(children);
|
|
280
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
281
|
+
if (slottable) {
|
|
282
|
+
// the new element to render is the one passed as a child of `Slottable`
|
|
283
|
+
const newElement = slottable.props.children;
|
|
284
|
+
const newChildren = childrenArray.map((child)=>{
|
|
285
|
+
if (child === slottable) {
|
|
286
|
+
// because the new element will be the one rendered, we are only interested
|
|
287
|
+
// in grabbing its children (`newElement.props.children`)
|
|
288
|
+
if (Children.count(newElement) > 1) return Children.only(null);
|
|
289
|
+
return /*#__PURE__*/ isValidElement(newElement) ? newElement.props.children : null;
|
|
290
|
+
} else return child;
|
|
291
|
+
});
|
|
292
|
+
return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
293
|
+
ref: forwardedRef
|
|
294
|
+
}), /*#__PURE__*/ isValidElement(newElement) ? /*#__PURE__*/ cloneElement(newElement, undefined, newChildren) : null);
|
|
295
|
+
}
|
|
296
|
+
return /*#__PURE__*/ createElement($5e63c961fc1ce211$var$SlotClone, _extends({}, slotProps, {
|
|
297
|
+
ref: forwardedRef
|
|
298
|
+
}), children);
|
|
299
|
+
});
|
|
300
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
301
|
+
/* -------------------------------------------------------------------------------------------------
|
|
302
|
+
* SlotClone
|
|
303
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
304
|
+
const { children: children , ...slotProps } = props;
|
|
305
|
+
if (/*#__PURE__*/ isValidElement(children)) return /*#__PURE__*/ cloneElement(children, {
|
|
306
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
307
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
308
|
+
});
|
|
309
|
+
return Children.count(children) > 1 ? Children.only(null) : null;
|
|
310
|
+
});
|
|
311
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
312
|
+
/* -------------------------------------------------------------------------------------------------
|
|
313
|
+
* Slottable
|
|
314
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
315
|
+
return /*#__PURE__*/ createElement(Fragment, null, children);
|
|
316
|
+
};
|
|
317
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
318
|
+
return /*#__PURE__*/ isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
319
|
+
}
|
|
320
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
321
|
+
// all child props should override
|
|
322
|
+
const overrideProps = {
|
|
323
|
+
...childProps
|
|
324
|
+
};
|
|
325
|
+
for(const propName in childProps){
|
|
326
|
+
const slotPropValue = slotProps[propName];
|
|
327
|
+
const childPropValue = childProps[propName];
|
|
328
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
329
|
+
if (isHandler) {
|
|
330
|
+
// if the handler exists on both, we compose them
|
|
331
|
+
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
|
332
|
+
childPropValue(...args);
|
|
333
|
+
slotPropValue(...args);
|
|
334
|
+
};
|
|
335
|
+
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
336
|
+
} else if (propName === 'style') overrideProps[propName] = {
|
|
337
|
+
...slotPropValue,
|
|
338
|
+
...childPropValue
|
|
339
|
+
};
|
|
340
|
+
else if (propName === 'className') overrideProps[propName] = [
|
|
341
|
+
slotPropValue,
|
|
342
|
+
childPropValue
|
|
343
|
+
].filter(Boolean).join(' ');
|
|
344
|
+
}
|
|
345
|
+
return {
|
|
346
|
+
...slotProps,
|
|
347
|
+
...overrideProps
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const $8927f6f2acc4f386$var$NODES = [
|
|
352
|
+
'a',
|
|
353
|
+
'button',
|
|
354
|
+
'div',
|
|
355
|
+
'h2',
|
|
356
|
+
'h3',
|
|
357
|
+
'img',
|
|
358
|
+
'label',
|
|
359
|
+
'li',
|
|
360
|
+
'nav',
|
|
361
|
+
'ol',
|
|
362
|
+
'p',
|
|
363
|
+
'span',
|
|
364
|
+
'svg',
|
|
365
|
+
'ul'
|
|
366
|
+
]; // Temporary while we await merge of this fix:
|
|
367
|
+
// https://github.com/DefinitelyTyped/DefinitelyTyped/pull/55396
|
|
368
|
+
// prettier-ignore
|
|
369
|
+
/* -------------------------------------------------------------------------------------------------
|
|
370
|
+
* Primitive
|
|
371
|
+
* -----------------------------------------------------------------------------------------------*/ const $8927f6f2acc4f386$export$250ffa63cdc0d034 = $8927f6f2acc4f386$var$NODES.reduce((primitive, node)=>{
|
|
372
|
+
const Node = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
373
|
+
const { asChild: asChild , ...primitiveProps } = props;
|
|
374
|
+
const Comp = asChild ? $5e63c961fc1ce211$export$8c6ed5c666ac1360 : node;
|
|
375
|
+
useEffect(()=>{
|
|
376
|
+
window[Symbol.for('radix-ui')] = true;
|
|
377
|
+
}, []);
|
|
378
|
+
return /*#__PURE__*/ createElement(Comp, _extends({}, primitiveProps, {
|
|
379
|
+
ref: forwardedRef
|
|
380
|
+
}));
|
|
381
|
+
});
|
|
382
|
+
Node.displayName = `Primitive.${node}`;
|
|
383
|
+
return {
|
|
384
|
+
...primitive,
|
|
385
|
+
[node]: Node
|
|
386
|
+
};
|
|
387
|
+
}, {});
|
|
388
|
+
|
|
65
389
|
/* -------------------------------------------------------------------------------------------------
|
|
66
390
|
* Switch
|
|
67
391
|
* -----------------------------------------------------------------------------------------------*/ const $6be4966fd9bbc698$var$SWITCH_NAME = 'Switch';
|
package/dist/Tabs/Tabs.cjs.js
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Tabs = require('../_shared/cjs/Tabs-
|
|
5
|
+
var Tabs = require('../_shared/cjs/Tabs-cc77dabb.js');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('../_shared/cjs/extends-8c5e4b48.js');
|
|
9
|
-
require('../_shared/cjs/index-
|
|
9
|
+
require('../_shared/cjs/index-56a040f4.js');
|
|
10
10
|
require('react-dom');
|
|
11
|
-
require('../_shared/cjs/index-
|
|
12
|
-
require('../_shared/cjs/index-
|
|
11
|
+
require('../_shared/cjs/index-d31f2b65.js');
|
|
12
|
+
require('../_shared/cjs/index-84e6a68f.js');
|
|
13
|
+
require('../_shared/cjs/index-dcfdd5da.js');
|
|
14
|
+
require('../_shared/cjs/index-49c72a87.js');
|
|
13
15
|
require('../_shared/cjs/Icon-a9801f05.js');
|
|
14
16
|
require('../_shared/cjs/index-9947ac13.js');
|
|
15
17
|
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
16
18
|
require('../_shared/cjs/Surface-038db6e1.js');
|
|
19
|
+
require('../_shared/cjs/BtIconArrowRightFill.esm-435cf4bd.js');
|
|
17
20
|
|
|
18
21
|
|
|
19
22
|
|
package/dist/Tabs/Tabs.esm.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
export { T as Tabs } from '../_shared/esm/Tabs-
|
|
1
|
+
export { T as Tabs } from '../_shared/esm/Tabs-8719d952.js';
|
|
2
2
|
import '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../_shared/esm/extends-8cc61aad.js';
|
|
5
|
-
import '../_shared/esm/index-
|
|
5
|
+
import '../_shared/esm/index-12f3a407.js';
|
|
6
6
|
import 'react-dom';
|
|
7
|
-
import '../_shared/esm/index-
|
|
8
|
-
import '../_shared/esm/index-
|
|
7
|
+
import '../_shared/esm/index-39019a9b.js';
|
|
8
|
+
import '../_shared/esm/index-936b5179.js';
|
|
9
|
+
import '../_shared/esm/index-a624de47.js';
|
|
10
|
+
import '../_shared/esm/index-db47e95a.js';
|
|
9
11
|
import '../_shared/esm/Icon-abd0d990.js';
|
|
10
12
|
import '../_shared/esm/index-2e73c2e9.js';
|
|
11
13
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
12
14
|
import '../_shared/esm/Surface-0ca6817d.js';
|
|
15
|
+
import '../_shared/esm/BtIconArrowRightFill.esm-99019d1a.js';
|
|
@@ -9,25 +9,25 @@ var Surface = require('../_shared/cjs/Surface-038db6e1.js');
|
|
|
9
9
|
require('../_shared/cjs/Heading-27cba320.js');
|
|
10
10
|
var Text = require('../_shared/cjs/Text-606ca3a2.js');
|
|
11
11
|
require('../_shared/cjs/Base-f5a86eed.js');
|
|
12
|
-
require('../_shared/cjs/Breadcrumbs-
|
|
12
|
+
require('../_shared/cjs/Breadcrumbs-ef659d2b.js');
|
|
13
13
|
require('../_shared/cjs/Button-4fed080a.js');
|
|
14
14
|
require('../_shared/cjs/Card-17dcc171.js');
|
|
15
|
-
require('../_shared/cjs/Checkbox-
|
|
15
|
+
require('../_shared/cjs/Checkbox-904ad028.js');
|
|
16
16
|
require('../_shared/cjs/Columns-ae4f8cef.js');
|
|
17
17
|
require('../_shared/cjs/Filter-1bde635c.js');
|
|
18
|
-
var FormControl = require('../_shared/cjs/FormControl-
|
|
18
|
+
var FormControl = require('../_shared/cjs/FormControl-166e0957.js');
|
|
19
19
|
require('../_shared/cjs/Group-0429741a.js');
|
|
20
20
|
require('../_shared/cjs/Image-e873b8fc.js');
|
|
21
21
|
require('../_shared/cjs/Poster-9b48fd61.js');
|
|
22
22
|
require('../_shared/cjs/ProgressStepper-9cdc0afe.js');
|
|
23
|
-
require('../_shared/cjs/RadioGroup-
|
|
23
|
+
require('../_shared/cjs/RadioGroup-1eddf86f.js');
|
|
24
24
|
require('../_shared/cjs/debounce-123468fb.js');
|
|
25
25
|
require('../_shared/cjs/SiteFooter-97c27b29.js');
|
|
26
26
|
require('../_shared/cjs/SiteHeader.rehydrator-af3dddef.js');
|
|
27
|
-
require('../_shared/cjs/Tabs-
|
|
28
|
-
require('../_shared/cjs/TextInput-
|
|
29
|
-
require('../_shared/cjs/Toast-
|
|
30
|
-
require('../_shared/cjs/UniversalHeader-
|
|
27
|
+
require('../_shared/cjs/Tabs-cc77dabb.js');
|
|
28
|
+
require('../_shared/cjs/TextInput-fd9c756f.js');
|
|
29
|
+
require('../_shared/cjs/Toast-91e96744.js');
|
|
30
|
+
require('../_shared/cjs/UniversalHeader-b8389447.js');
|
|
31
31
|
require('../_shared/cjs/suffix-modifier-64dcd338.js');
|
|
32
32
|
require('../_shared/cjs/BtIconChevronRight2Px.esm-dbf8cbee.js');
|
|
33
33
|
require('../_shared/cjs/Icon-a9801f05.js');
|
|
@@ -45,11 +45,16 @@ require('../_shared/cjs/BrandLogo-aea340c8.js');
|
|
|
45
45
|
require('../_shared/cjs/Curve-d038052b.js');
|
|
46
46
|
require('../_shared/cjs/Section-59804166.js');
|
|
47
47
|
require('../_shared/cjs/extends-8c5e4b48.js');
|
|
48
|
-
require('../_shared/cjs/index-
|
|
48
|
+
require('../_shared/cjs/index-56a040f4.js');
|
|
49
49
|
require('react-dom');
|
|
50
|
-
require('../_shared/cjs/index-
|
|
51
|
-
require('../_shared/cjs/index-
|
|
52
|
-
require('../_shared/cjs/index-
|
|
50
|
+
require('../_shared/cjs/index-d31f2b65.js');
|
|
51
|
+
require('../_shared/cjs/index-84e6a68f.js');
|
|
52
|
+
require('../_shared/cjs/index-dcfdd5da.js');
|
|
53
|
+
require('../_shared/cjs/index-49c72a87.js');
|
|
54
|
+
require('../_shared/cjs/BtIconArrowRightFill.esm-435cf4bd.js');
|
|
55
|
+
require('../_shared/cjs/index-4ecad2dd.js');
|
|
56
|
+
require('../_shared/cjs/index-6542b467.js');
|
|
57
|
+
require('../_shared/cjs/index-1641d0b4.js');
|
|
53
58
|
require('../_shared/cjs/BtIconCrossAlt2Px.esm-1452b14b.js');
|
|
54
59
|
require('../_shared/cjs/BtIconTick.esm-844eac6c.js');
|
|
55
60
|
|
|
@@ -5,25 +5,25 @@ import { C as Context } from '../_shared/esm/Surface-0ca6817d.js';
|
|
|
5
5
|
import '../_shared/esm/Heading-d16e0e53.js';
|
|
6
6
|
import { T as Text } from '../_shared/esm/Text-14f586ac.js';
|
|
7
7
|
import '../_shared/esm/Base-f200653c.js';
|
|
8
|
-
import '../_shared/esm/Breadcrumbs-
|
|
8
|
+
import '../_shared/esm/Breadcrumbs-36edfb3d.js';
|
|
9
9
|
import '../_shared/esm/Button-a453e8e4.js';
|
|
10
10
|
import '../_shared/esm/Card-201e9f28.js';
|
|
11
|
-
import '../_shared/esm/Checkbox-
|
|
11
|
+
import '../_shared/esm/Checkbox-8a5bb9a1.js';
|
|
12
12
|
import '../_shared/esm/Columns-d96b7425.js';
|
|
13
13
|
import '../_shared/esm/Filter-58a42358.js';
|
|
14
|
-
import { F as FormControl } from '../_shared/esm/FormControl-
|
|
14
|
+
import { F as FormControl } from '../_shared/esm/FormControl-9d4ddfec.js';
|
|
15
15
|
import '../_shared/esm/Group-73fdb896.js';
|
|
16
16
|
import '../_shared/esm/Image-12fbd327.js';
|
|
17
17
|
import '../_shared/esm/Poster-4ec2f679.js';
|
|
18
18
|
import '../_shared/esm/ProgressStepper-f51f86c3.js';
|
|
19
|
-
import '../_shared/esm/RadioGroup-
|
|
19
|
+
import '../_shared/esm/RadioGroup-238db88d.js';
|
|
20
20
|
import '../_shared/esm/debounce-6fed6b84.js';
|
|
21
21
|
import '../_shared/esm/SiteFooter-94316b8b.js';
|
|
22
22
|
import '../_shared/esm/SiteHeader.rehydrator-1b507253.js';
|
|
23
|
-
import '../_shared/esm/Tabs-
|
|
24
|
-
import '../_shared/esm/TextInput-
|
|
25
|
-
import '../_shared/esm/Toast-
|
|
26
|
-
import '../_shared/esm/UniversalHeader-
|
|
23
|
+
import '../_shared/esm/Tabs-8719d952.js';
|
|
24
|
+
import '../_shared/esm/TextInput-c1e2a1dd.js';
|
|
25
|
+
import '../_shared/esm/Toast-7cb1e544.js';
|
|
26
|
+
import '../_shared/esm/UniversalHeader-80c7313f.js';
|
|
27
27
|
import '../_shared/esm/suffix-modifier-3d548e45.js';
|
|
28
28
|
import '../_shared/esm/BtIconChevronRight2Px.esm-75e92636.js';
|
|
29
29
|
import '../_shared/esm/Icon-abd0d990.js';
|
|
@@ -41,11 +41,16 @@ import '../_shared/esm/BrandLogo-1af78f76.js';
|
|
|
41
41
|
import '../_shared/esm/Curve-d8679dde.js';
|
|
42
42
|
import '../_shared/esm/Section-73781b56.js';
|
|
43
43
|
import '../_shared/esm/extends-8cc61aad.js';
|
|
44
|
-
import '../_shared/esm/index-
|
|
44
|
+
import '../_shared/esm/index-12f3a407.js';
|
|
45
45
|
import 'react-dom';
|
|
46
|
-
import '../_shared/esm/index-
|
|
47
|
-
import '../_shared/esm/index-
|
|
48
|
-
import '../_shared/esm/index-
|
|
46
|
+
import '../_shared/esm/index-39019a9b.js';
|
|
47
|
+
import '../_shared/esm/index-936b5179.js';
|
|
48
|
+
import '../_shared/esm/index-a624de47.js';
|
|
49
|
+
import '../_shared/esm/index-db47e95a.js';
|
|
50
|
+
import '../_shared/esm/BtIconArrowRightFill.esm-99019d1a.js';
|
|
51
|
+
import '../_shared/esm/index-d0307140.js';
|
|
52
|
+
import '../_shared/esm/index-246b4f18.js';
|
|
53
|
+
import '../_shared/esm/index-6b7b075c.js';
|
|
49
54
|
import '../_shared/esm/BtIconCrossAlt2Px.esm-7165ab1a.js';
|
|
50
55
|
import '../_shared/esm/BtIconTick.esm-e265098f.js';
|
|
51
56
|
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var TextInput = require('../_shared/cjs/TextInput-
|
|
5
|
+
var TextInput = require('../_shared/cjs/TextInput-fd9c756f.js');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
require('../_shared/cjs/index-9947ac13.js');
|
|
8
8
|
require('react');
|
|
9
|
-
require('../_shared/cjs/FormControl-
|
|
9
|
+
require('../_shared/cjs/FormControl-166e0957.js');
|
|
10
10
|
require('../_shared/cjs/BtIconAlert.esm-1a0ff9f0.js');
|
|
11
11
|
require('../_shared/cjs/Surface-038db6e1.js');
|
|
12
12
|
require('../_shared/cjs/DisclosureMini-d0eeb6bb.js');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { T as TextInput } from '../_shared/esm/TextInput-
|
|
1
|
+
export { T as TextInput } from '../_shared/esm/TextInput-c1e2a1dd.js';
|
|
2
2
|
import '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
3
3
|
import '../_shared/esm/index-2e73c2e9.js';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../_shared/esm/FormControl-
|
|
5
|
+
import '../_shared/esm/FormControl-9d4ddfec.js';
|
|
6
6
|
import '../_shared/esm/BtIconAlert.esm-a4608d47.js';
|
|
7
7
|
import '../_shared/esm/Surface-0ca6817d.js';
|
|
8
8
|
import '../_shared/esm/DisclosureMini-ec17b008.js';
|
package/dist/Toast/Toast.cjs.js
CHANGED
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Toast = require('../_shared/cjs/Toast-
|
|
5
|
+
var Toast = require('../_shared/cjs/Toast-91e96744.js');
|
|
6
6
|
require('../_shared/cjs/filter-data-attrs-1c9a530c.js');
|
|
7
7
|
require('react');
|
|
8
8
|
require('../_shared/cjs/extends-8c5e4b48.js');
|
|
9
9
|
require('react-dom');
|
|
10
|
-
require('../_shared/cjs/index-
|
|
11
|
-
require('../_shared/cjs/index-
|
|
12
|
-
require('../_shared/cjs/index-
|
|
10
|
+
require('../_shared/cjs/index-56a040f4.js');
|
|
11
|
+
require('../_shared/cjs/index-d31f2b65.js');
|
|
12
|
+
require('../_shared/cjs/index-4ecad2dd.js');
|
|
13
|
+
require('../_shared/cjs/index-6542b467.js');
|
|
14
|
+
require('../_shared/cjs/index-49c72a87.js');
|
|
15
|
+
require('../_shared/cjs/index-1641d0b4.js');
|
|
13
16
|
require('../_shared/cjs/index-9947ac13.js');
|
|
14
17
|
require('../_shared/cjs/BtIconCrossAlt2Px.esm-1452b14b.js');
|
|
15
18
|
require('../_shared/cjs/BtIconTick.esm-844eac6c.js');
|
package/dist/Toast/Toast.esm.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
export { T as Toast } from '../_shared/esm/Toast-
|
|
1
|
+
export { T as Toast } from '../_shared/esm/Toast-7cb1e544.js';
|
|
2
2
|
import '../_shared/esm/filter-data-attrs-ea8f4ed4.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../_shared/esm/extends-8cc61aad.js';
|
|
5
5
|
import 'react-dom';
|
|
6
|
-
import '../_shared/esm/index-
|
|
7
|
-
import '../_shared/esm/index-
|
|
8
|
-
import '../_shared/esm/index-
|
|
6
|
+
import '../_shared/esm/index-12f3a407.js';
|
|
7
|
+
import '../_shared/esm/index-39019a9b.js';
|
|
8
|
+
import '../_shared/esm/index-d0307140.js';
|
|
9
|
+
import '../_shared/esm/index-246b4f18.js';
|
|
10
|
+
import '../_shared/esm/index-db47e95a.js';
|
|
11
|
+
import '../_shared/esm/index-6b7b075c.js';
|
|
9
12
|
import '../_shared/esm/index-2e73c2e9.js';
|
|
10
13
|
import '../_shared/esm/BtIconCrossAlt2Px.esm-7165ab1a.js';
|
|
11
14
|
import '../_shared/esm/BtIconTick.esm-e265098f.js';
|