@arc-ui/components 11.7.0 → 11.8.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/Alert/Alert.cjs.d.ts +1 -1
- package/dist/Alert/Alert.cjs.js +10 -89
- package/dist/Alert/Alert.esm.d.ts +1 -1
- package/dist/Alert/Alert.esm.js +3 -82
- package/dist/Badge/Badge.cjs.js +3 -3
- package/dist/Badge/Badge.esm.js +4 -4
- package/dist/Box/Box.cjs.d.ts +40 -1
- package/dist/Box/Box.cjs.js +25 -6
- package/dist/Box/Box.esm.d.ts +40 -1
- package/dist/Box/Box.esm.js +24 -5
- package/dist/Breadcrumbs/Breadcrumbs.cjs.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.cjs.js +2 -2
- package/dist/Breadcrumbs/Breadcrumbs.esm.d.ts +1 -1
- package/dist/Breadcrumbs/Breadcrumbs.esm.js +2 -2
- 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.d.ts +1 -1
- package/dist/Card/Card.cjs.js +2 -2
- package/dist/Card/Card.esm.d.ts +1 -1
- package/dist/Card/Card.esm.js +2 -2
- package/dist/Checkbox/Checkbox.cjs.d.ts +1 -1
- package/dist/Checkbox/Checkbox.cjs.js +4 -4
- package/dist/Checkbox/Checkbox.esm.d.ts +1 -1
- package/dist/Checkbox/Checkbox.esm.js +4 -4
- package/dist/Columns/Columns.cjs.d.ts +1 -1
- package/dist/Columns/Columns.esm.d.ts +1 -1
- package/dist/Curve/Curve.cjs.d.ts +1 -1
- package/dist/Curve/Curve.cjs.js +1 -1
- package/dist/Curve/Curve.esm.d.ts +1 -1
- package/dist/Curve/Curve.esm.js +1 -1
- package/dist/Disclosure/Disclosure.cjs.d.ts +1 -1
- package/dist/Disclosure/Disclosure.cjs.js +1 -1
- package/dist/Disclosure/Disclosure.esm.d.ts +1 -1
- package/dist/Disclosure/Disclosure.esm.js +1 -1
- package/dist/DisclosureMini/DisclosureMini.cjs.d.ts +1 -1
- package/dist/DisclosureMini/DisclosureMini.cjs.js +2 -2
- package/dist/DisclosureMini/DisclosureMini.esm.d.ts +1 -1
- package/dist/DisclosureMini/DisclosureMini.esm.js +2 -2
- package/dist/FormControl/FormControl.cjs.d.ts +1 -1
- package/dist/FormControl/FormControl.cjs.js +3 -3
- package/dist/FormControl/FormControl.esm.d.ts +1 -1
- package/dist/FormControl/FormControl.esm.js +3 -3
- package/dist/Heading/Heading.cjs.d.ts +1 -1
- package/dist/Heading/Heading.cjs.js +1 -1
- package/dist/Heading/Heading.esm.d.ts +1 -1
- package/dist/Heading/Heading.esm.js +1 -1
- package/dist/Modal/Modal.cjs.d.ts +31 -9
- package/dist/Modal/Modal.cjs.js +450 -161
- package/dist/Modal/Modal.esm.d.ts +31 -9
- package/dist/Modal/Modal.esm.js +423 -134
- package/dist/Pagination/Pagination.cjs.js +4 -4
- package/dist/Pagination/Pagination.esm.js +4 -4
- package/dist/PaginationSimple/PaginationSimple.cjs.js +4 -4
- package/dist/PaginationSimple/PaginationSimple.esm.js +4 -4
- package/dist/ProgressBar/ProgressBar.cjs.js +5 -5
- package/dist/ProgressBar/ProgressBar.esm.js +6 -6
- package/dist/RadioGroup/RadioGroup.cjs.d.ts +1 -1
- package/dist/RadioGroup/RadioGroup.cjs.js +4 -4
- package/dist/RadioGroup/RadioGroup.esm.d.ts +1 -1
- package/dist/RadioGroup/RadioGroup.esm.js +4 -4
- package/dist/Select/Select.cjs.d.ts +1 -1
- package/dist/Select/Select.cjs.js +995 -60
- package/dist/Select/Select.esm.d.ts +1 -1
- package/dist/Select/Select.esm.js +948 -32
- package/dist/SiteFooter/SiteFooter.cjs.d.ts +1 -1
- package/dist/SiteFooter/SiteFooter.cjs.js +2 -2
- package/dist/SiteFooter/SiteFooter.esm.d.ts +1 -1
- package/dist/SiteFooter/SiteFooter.esm.js +3 -3
- package/dist/SiteHeader/SiteHeader.cjs.d.ts +1 -1
- package/dist/SiteHeader/SiteHeader.cjs.js +3 -3
- package/dist/SiteHeader/SiteHeader.esm.d.ts +1 -1
- package/dist/SiteHeader/SiteHeader.esm.js +3 -3
- package/dist/Switch/Switch.cjs.d.ts +1 -1
- package/dist/Switch/Switch.cjs.js +241 -18
- package/dist/Switch/Switch.esm.d.ts +1 -1
- package/dist/Switch/Switch.esm.js +234 -11
- package/dist/Tabs/Tabs.cjs.d.ts +75 -0
- package/dist/Tabs/Tabs.cjs.js +514 -0
- package/dist/Tabs/Tabs.esm.d.ts +75 -0
- package/dist/Tabs/Tabs.esm.js +506 -0
- package/dist/Tabs/package.json +7 -0
- package/dist/Text/Text.cjs.d.ts +1 -1
- package/dist/Text/Text.cjs.js +1 -1
- package/dist/Text/Text.esm.d.ts +1 -1
- package/dist/Text/Text.esm.js +1 -1
- package/dist/TextArea/TextArea.cjs.d.ts +4 -1
- package/dist/TextArea/TextArea.cjs.js +14 -13
- package/dist/TextArea/TextArea.esm.d.ts +4 -1
- package/dist/TextArea/TextArea.esm.js +14 -13
- package/dist/TextInput/TextInput.cjs.d.ts +1 -1
- package/dist/TextInput/TextInput.cjs.js +4 -4
- package/dist/TextInput/TextInput.esm.d.ts +1 -1
- package/dist/TextInput/TextInput.esm.js +4 -4
- package/dist/Toast/Toast.cjs.d.ts +52 -0
- package/dist/Toast/Toast.cjs.js +743 -0
- package/dist/Toast/Toast.esm.d.ts +52 -0
- package/dist/Toast/Toast.esm.js +735 -0
- package/dist/Toast/package.json +7 -0
- package/dist/Truncate/Truncate.cjs.js +3 -2
- package/dist/Truncate/Truncate.esm.js +3 -2
- package/dist/_shared/cjs/{Breadcrumbs-9f580f69.js → Breadcrumbs-0906dd10.js} +9 -9
- package/dist/_shared/cjs/BtIconTick-42fcc5ec.js +91 -0
- package/dist/_shared/{esm/Button-9c3b0b11.d.ts → cjs/Button-5aaa6776.d.ts} +4 -0
- package/dist/_shared/cjs/{Button-b4d6ccc8.js → Button-5aaa6776.js} +2 -2
- package/dist/_shared/cjs/{Card-f1108bfe.js → Card-fd189ba8.js} +1 -1
- package/dist/_shared/cjs/{Checkbox-c927b62f.js → Checkbox-02c546ca.js} +1 -1
- package/dist/_shared/cjs/Columns-e90798f8.d.ts +1 -1
- package/dist/_shared/cjs/{Curve-b05589d8.d.ts → Curve-781ef633.d.ts} +5 -2
- package/dist/_shared/cjs/{Curve-b05589d8.js → Curve-781ef633.js} +5 -2
- package/dist/_shared/cjs/{DisclosureMini-2a10006e.js → DisclosureMini-52706ee6.js} +1 -1
- package/dist/_shared/cjs/{FormControl-78b007b7.js → FormControl-1e1bf2bf.js} +1 -1
- package/dist/_shared/cjs/{Heading-ed1cb455.d.ts → Heading-e3332dcf.d.ts} +4 -0
- package/dist/_shared/cjs/{Heading-ed1cb455.js → Heading-e3332dcf.js} +2 -2
- package/dist/_shared/{esm/RadioGroup-65b8c8bf.d.ts → cjs/RadioGroup-d7664b0c.d.ts} +1 -1
- package/dist/_shared/cjs/{RadioGroup-8e17de70.js → RadioGroup-d7664b0c.js} +1 -1
- package/dist/_shared/cjs/{SiteFooter-9f7f9c2d.js → SiteFooter-5da774e1.js} +1 -1
- package/dist/_shared/cjs/SiteHeader-c25ee36e.d.ts +2 -2
- package/dist/_shared/cjs/{SiteHeader.rehydrator-ccbebde6.js → SiteHeader.rehydrator-acc9d8c4.js} +2 -2
- package/dist/_shared/{esm/Text-14deb70e.d.ts → cjs/Text-fa447e2d.d.ts} +4 -0
- package/dist/_shared/cjs/{Text-555a29a4.js → Text-fa447e2d.js} +2 -2
- package/dist/_shared/cjs/{TextInput-7ed03a48.d.ts → TextInput-13050538.d.ts} +3 -1
- package/dist/_shared/{esm/TextInput-62bb7dee.d.ts → cjs/TextInput-f4549637.d.ts} +1 -1
- package/dist/_shared/cjs/{TextInput-b768e346.js → TextInput-f4549637.js} +1 -1
- package/dist/_shared/cjs/extends-bb8ffacd.js +21 -0
- package/dist/_shared/cjs/index-27b53d49.js +174 -0
- package/dist/_shared/cjs/index-699086a7.d.ts +1 -1
- package/dist/_shared/cjs/index-74488a9f.d.ts +1 -1
- package/dist/_shared/cjs/{index.module-9b87a34d.js → index-952918c9.js} +141 -33
- package/dist/_shared/cjs/index-96c4d581.js +289 -0
- package/dist/_shared/cjs/index-c81c9401.d.ts +3 -3
- package/dist/_shared/cjs/index-e340924e.d.ts +1 -1
- package/dist/_shared/cjs/index-e6d20018.d.ts +1 -1
- package/dist/_shared/cjs/index-eb06f640.d.ts +1 -1
- package/dist/_shared/cjs/{index-31fbb076.js → index-ec260f5e.js} +0 -547
- package/dist/_shared/cjs/index-f419cf04.d.ts +1 -1
- package/dist/_shared/cjs/index-fb4b8fda.js +47 -0
- package/dist/_shared/cjs/index.module-bbcc4e18.js +126 -0
- package/dist/_shared/esm/{Breadcrumbs-5dc0afa7.js → Breadcrumbs-dafa8dde.js} +9 -9
- package/dist/_shared/esm/BtIconTick-5fe50cc7.js +83 -0
- package/dist/_shared/{cjs/Button-b4d6ccc8.d.ts → esm/Button-d1dbcf79.d.ts} +4 -0
- package/dist/_shared/esm/{Button-9c3b0b11.js → Button-d1dbcf79.js} +2 -2
- package/dist/_shared/esm/{Card-79b6eae0.js → Card-e62c3ff6.js} +1 -1
- package/dist/_shared/esm/{Checkbox-2d144384.js → Checkbox-d8891198.js} +1 -1
- package/dist/_shared/esm/Columns-8704515b.d.ts +1 -1
- package/dist/_shared/esm/{Curve-3e87b1bc.d.ts → Curve-bbc5589c.d.ts} +5 -2
- package/dist/_shared/esm/{Curve-3e87b1bc.js → Curve-bbc5589c.js} +5 -2
- package/dist/_shared/esm/{DisclosureMini-78a8f392.js → DisclosureMini-9b819941.js} +1 -1
- package/dist/_shared/esm/{FormControl-2fa7aae5.js → FormControl-f18e2f59.js} +1 -1
- package/dist/_shared/esm/{Heading-ee6bec51.d.ts → Heading-0f629151.d.ts} +4 -0
- package/dist/_shared/esm/{Heading-ee6bec51.js → Heading-0f629151.js} +2 -2
- package/dist/_shared/{cjs/RadioGroup-8e17de70.d.ts → esm/RadioGroup-be16d5d3.d.ts} +1 -1
- package/dist/_shared/esm/{RadioGroup-65b8c8bf.js → RadioGroup-be16d5d3.js} +1 -1
- package/dist/_shared/esm/{SiteFooter-51bdc7df.js → SiteFooter-a182cb18.js} +1 -1
- package/dist/_shared/esm/SiteHeader-c25ee36e.d.ts +2 -2
- package/dist/_shared/esm/{SiteHeader.rehydrator-382d1c03.js → SiteHeader.rehydrator-023b7b76.js} +2 -2
- package/dist/_shared/{cjs/Text-555a29a4.d.ts → esm/Text-40457811.d.ts} +4 -0
- package/dist/_shared/esm/{Text-14deb70e.js → Text-40457811.js} +2 -2
- package/dist/_shared/esm/{TextInput-7ed03a48.d.ts → TextInput-13050538.d.ts} +3 -1
- package/dist/_shared/{cjs/TextInput-b768e346.d.ts → esm/TextInput-4424c195.d.ts} +3 -3
- package/dist/_shared/esm/{TextInput-62bb7dee.js → TextInput-4424c195.js} +1 -1
- package/dist/_shared/esm/extends-4575346e.js +19 -0
- package/dist/_shared/esm/{index.module-216016b5.js → index-22aad354.js} +138 -29
- package/dist/_shared/esm/{index-4fa635bd.js → index-369dce7f.js} +2 -541
- package/dist/_shared/esm/index-699086a7.d.ts +1 -1
- package/dist/_shared/esm/index-74488a9f.d.ts +1 -1
- package/dist/_shared/esm/index-8000d9e3.js +168 -0
- package/dist/_shared/esm/index-94ecc5f8.js +280 -0
- package/dist/_shared/esm/index-bed18a88.js +26 -0
- package/dist/_shared/esm/index-c81c9401.d.ts +3 -3
- package/dist/_shared/esm/index-e340924e.d.ts +1 -1
- package/dist/_shared/esm/index-e6d20018.d.ts +1 -1
- package/dist/_shared/esm/index-eb06f640.d.ts +1 -1
- package/dist/_shared/esm/index-f419cf04.d.ts +1 -1
- package/dist/_shared/esm/index.module-5ed90b21.js +122 -0
- package/dist/index.es.js +2807 -1034
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3014 -1240
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Button/Button.d.ts +4 -0
- package/dist/types/components/Columns/Columns.d.ts +1 -1
- package/dist/types/components/Columns/index.d.ts +1 -1
- package/dist/types/components/Curve/Curve.d.ts +5 -2
- package/dist/types/components/Heading/Heading.d.ts +4 -0
- package/dist/types/components/Modal/Modal.d.ts +31 -9
- package/dist/types/components/Tabs/Tab/Tab.d.ts +22 -0
- package/dist/types/components/Tabs/Tab/index.d.ts +1 -0
- package/dist/types/components/Tabs/TabContent/TabContent.d.ts +12 -0
- package/dist/types/components/Tabs/TabContent/index.d.ts +1 -0
- package/dist/types/components/Tabs/Tabs.d.ts +27 -0
- package/dist/types/components/Tabs/TabsList/TabsList.d.ts +20 -0
- package/dist/types/components/Tabs/TabsList/index.d.ts +1 -0
- package/dist/types/components/Tabs/index.d.ts +1 -0
- package/dist/types/components/Text/Text.d.ts +4 -0
- package/dist/types/components/TextArea/TextArea.d.ts +3 -0
- package/dist/types/components/TextInput/TextInput.d.ts +2 -0
- package/dist/types/components/Toast/Toast.d.ts +14 -0
- package/dist/types/components/Toast/ToastNotification.d.ts +39 -0
- package/dist/types/components/Toast/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/styles.d.ts +3 -2
- package/package.json +8 -6
- package/dist/MediaCard/MediaCard.cjs.d.ts +0 -61
- package/dist/MediaCard/MediaCard.cjs.js +0 -31
- package/dist/MediaCard/MediaCard.esm.d.ts +0 -61
- package/dist/MediaCard/MediaCard.esm.js +0 -23
- package/dist/MediaCard/package.json +0 -7
- package/dist/_shared/cjs/Box-ebe2b7be.d.ts +0 -39
- package/dist/_shared/cjs/Box-ebe2b7be.js +0 -30
- package/dist/_shared/cjs/index.module-5ea728f4.js +0 -23
- package/dist/_shared/esm/Box-06d99d8a.d.ts +0 -39
- package/dist/_shared/esm/Box-06d99d8a.js +0 -24
- package/dist/_shared/esm/index.module-88179159.js +0 -21
- package/dist/types/components/Modal/Modal.stories-wip.d.ts +0 -9
- /package/dist/_shared/cjs/{Breadcrumbs-9f580f69.d.ts → Breadcrumbs-0906dd10.d.ts} +0 -0
- /package/dist/_shared/cjs/{Card-f1108bfe.d.ts → Card-fd189ba8.d.ts} +0 -0
- /package/dist/_shared/cjs/{Checkbox-c927b62f.d.ts → Checkbox-02c546ca.d.ts} +0 -0
- /package/dist/_shared/cjs/{DisclosureMini-2a10006e.d.ts → DisclosureMini-52706ee6.d.ts} +0 -0
- /package/dist/_shared/cjs/{FormControl-78b007b7.d.ts → FormControl-1e1bf2bf.d.ts} +0 -0
- /package/dist/_shared/cjs/{SiteFooter-9f7f9c2d.d.ts → SiteFooter-5da774e1.d.ts} +0 -0
- /package/dist/_shared/cjs/{SiteHeader.rehydrator-ccbebde6.d.ts → SiteHeader.rehydrator-acc9d8c4.d.ts} +0 -0
- /package/dist/_shared/esm/{Breadcrumbs-5dc0afa7.d.ts → Breadcrumbs-dafa8dde.d.ts} +0 -0
- /package/dist/_shared/esm/{Card-79b6eae0.d.ts → Card-e62c3ff6.d.ts} +0 -0
- /package/dist/_shared/esm/{Checkbox-2d144384.d.ts → Checkbox-d8891198.d.ts} +0 -0
- /package/dist/_shared/esm/{DisclosureMini-78a8f392.d.ts → DisclosureMini-9b819941.d.ts} +0 -0
- /package/dist/_shared/esm/{FormControl-2fa7aae5.d.ts → FormControl-f18e2f59.d.ts} +0 -0
- /package/dist/_shared/esm/{SiteFooter-51bdc7df.d.ts → SiteFooter-a182cb18.d.ts} +0 -0
- /package/dist/_shared/esm/{SiteHeader.rehydrator-382d1c03.d.ts → SiteHeader.rehydrator-023b7b76.d.ts} +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _extends = require('./extends-bb8ffacd.js');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Set a given ref to a given value
|
|
8
|
+
* This utility takes care of different types of refs: callback refs and RefObject(s)
|
|
9
|
+
*/ function $6ed0406888f73fc4$var$setRef(ref, value) {
|
|
10
|
+
if (typeof ref === 'function') ref(value);
|
|
11
|
+
else if (ref !== null && ref !== undefined) ref.current = value;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A utility to compose multiple refs together
|
|
15
|
+
* Accepts callback refs and RefObject(s)
|
|
16
|
+
*/ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {
|
|
17
|
+
return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)
|
|
18
|
+
)
|
|
19
|
+
;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/* -------------------------------------------------------------------------------------------------
|
|
23
|
+
* Slot
|
|
24
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
25
|
+
const { children: children , ...slotProps } = props;
|
|
26
|
+
const childrenArray = React.Children.toArray(children);
|
|
27
|
+
const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);
|
|
28
|
+
if (slottable) {
|
|
29
|
+
// the new element to render is the one passed as a child of `Slottable`
|
|
30
|
+
const newElement = slottable.props.children;
|
|
31
|
+
const newChildren = childrenArray.map((child)=>{
|
|
32
|
+
if (child === slottable) {
|
|
33
|
+
// because the new element will be the one rendered, we are only interested
|
|
34
|
+
// in grabbing its children (`newElement.props.children`)
|
|
35
|
+
if (React.Children.count(newElement) > 1) return React.Children.only(null);
|
|
36
|
+
return /*#__PURE__*/ React.isValidElement(newElement) ? newElement.props.children : null;
|
|
37
|
+
} else return child;
|
|
38
|
+
});
|
|
39
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends._extends({}, slotProps, {
|
|
40
|
+
ref: forwardedRef
|
|
41
|
+
}), /*#__PURE__*/ React.isValidElement(newElement) ? /*#__PURE__*/ React.cloneElement(newElement, undefined, newChildren) : null);
|
|
42
|
+
}
|
|
43
|
+
return /*#__PURE__*/ React.createElement($5e63c961fc1ce211$var$SlotClone, _extends._extends({}, slotProps, {
|
|
44
|
+
ref: forwardedRef
|
|
45
|
+
}), children);
|
|
46
|
+
});
|
|
47
|
+
$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';
|
|
48
|
+
/* -------------------------------------------------------------------------------------------------
|
|
49
|
+
* SlotClone
|
|
50
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ React.forwardRef((props, forwardedRef)=>{
|
|
51
|
+
const { children: children , ...slotProps } = props;
|
|
52
|
+
if (/*#__PURE__*/ React.isValidElement(children)) return /*#__PURE__*/ React.cloneElement(children, {
|
|
53
|
+
...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),
|
|
54
|
+
ref: $6ed0406888f73fc4$export$43e446d32b3d21af(forwardedRef, children.ref)
|
|
55
|
+
});
|
|
56
|
+
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
57
|
+
});
|
|
58
|
+
$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';
|
|
59
|
+
/* -------------------------------------------------------------------------------------------------
|
|
60
|
+
* Slottable
|
|
61
|
+
* -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{
|
|
62
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, children);
|
|
63
|
+
};
|
|
64
|
+
/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {
|
|
65
|
+
return /*#__PURE__*/ React.isValidElement(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;
|
|
66
|
+
}
|
|
67
|
+
function $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {
|
|
68
|
+
// all child props should override
|
|
69
|
+
const overrideProps = {
|
|
70
|
+
...childProps
|
|
71
|
+
};
|
|
72
|
+
for(const propName in childProps){
|
|
73
|
+
const slotPropValue = slotProps[propName];
|
|
74
|
+
const childPropValue = childProps[propName];
|
|
75
|
+
const isHandler = /^on[A-Z]/.test(propName);
|
|
76
|
+
if (isHandler) {
|
|
77
|
+
// if the handler exists on both, we compose them
|
|
78
|
+
if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{
|
|
79
|
+
childPropValue(...args);
|
|
80
|
+
slotPropValue(...args);
|
|
81
|
+
};
|
|
82
|
+
else if (slotPropValue) overrideProps[propName] = slotPropValue;
|
|
83
|
+
} else if (propName === 'style') overrideProps[propName] = {
|
|
84
|
+
...slotPropValue,
|
|
85
|
+
...childPropValue
|
|
86
|
+
};
|
|
87
|
+
else if (propName === 'className') overrideProps[propName] = [
|
|
88
|
+
slotPropValue,
|
|
89
|
+
childPropValue
|
|
90
|
+
].filter(Boolean).join(' ');
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
...slotProps,
|
|
94
|
+
...overrideProps
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
100
|
+
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
101
|
+
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
102
|
+
*
|
|
103
|
+
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
104
|
+
*/ const $9f79659886946c16$export$e5c5a5f917a5871c = Boolean(globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) ? React.useLayoutEffect : ()=>{};
|
|
105
|
+
|
|
106
|
+
function $010c2913dbd2fe3d$export$5cae361ad82dce8b(value) {
|
|
107
|
+
const ref = React.useRef({
|
|
108
|
+
value: value,
|
|
109
|
+
previous: value
|
|
110
|
+
}); // We compare values before making an update to ensure that
|
|
111
|
+
// a change has been made. This ensures the previous value is
|
|
112
|
+
// persisted correctly between renders.
|
|
113
|
+
return React.useMemo(()=>{
|
|
114
|
+
if (ref.current.value !== value) {
|
|
115
|
+
ref.current.previous = ref.current.value;
|
|
116
|
+
ref.current.value = value;
|
|
117
|
+
}
|
|
118
|
+
return ref.current.previous;
|
|
119
|
+
}, [
|
|
120
|
+
value
|
|
121
|
+
]);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
exports.$010c2913dbd2fe3d$export$5cae361ad82dce8b = $010c2913dbd2fe3d$export$5cae361ad82dce8b;
|
|
125
|
+
exports.$5e63c961fc1ce211$export$8c6ed5c666ac1360 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;
|
|
126
|
+
exports.$9f79659886946c16$export$e5c5a5f917a5871c = $9f79659886946c16$export$e5c5a5f917a5871c;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-afdb7d32.js';
|
|
1
2
|
import React__default, { useRef, useState, useEffect } from 'react';
|
|
2
3
|
import { d as debounce_1 } from './debounce-e228705f.js';
|
|
3
4
|
import { B as BtIconChevronLeft2Px_2, a as BtIconChevronRight2Px_2 } from './BtIconChevronRight2Px-b8e7b4ad.js';
|
|
4
5
|
import { I as Icon } from './Icon-c1af47bc.js';
|
|
5
|
-
import { a as __assign } from './filter-data-attrs-afdb7d32.js';
|
|
6
6
|
import { c as classNames } from './index-2ae58626.js';
|
|
7
7
|
import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
8
8
|
|
|
9
9
|
var BreadcrumbsItem = function (_a) {
|
|
10
|
-
var spacerIconAfter = _a.spacerIconAfter, spacerIconBefore = _a.spacerIconBefore, children = _a.children;
|
|
11
|
-
return (React__default.createElement("li", { className: "arc-Breadcrumbs-item" },
|
|
10
|
+
var spacerIconAfter = _a.spacerIconAfter, spacerIconBefore = _a.spacerIconBefore, children = _a.children, props = __rest(_a, ["spacerIconAfter", "spacerIconBefore", "children"]);
|
|
11
|
+
return (React__default.createElement("li", __assign({ className: "arc-Breadcrumbs-item" }, filterDataAttrs(props)),
|
|
12
12
|
spacerIconBefore && (React__default.createElement("div", { className: "arc-Breadcrumbs-spacerIcon", "data-testid": "arc-chevron-left-2px" },
|
|
13
13
|
React__default.createElement(Icon, { icon: BtIconChevronLeft2Px_2 }))),
|
|
14
14
|
children,
|
|
@@ -17,18 +17,18 @@ var BreadcrumbsItem = function (_a) {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
var BreadcrumbsLink = React__default.forwardRef(function (_a, ref) {
|
|
20
|
-
var onClick = _a.onClick, href = _a.href, isActive = _a.isActive, children = _a.children;
|
|
20
|
+
var onClick = _a.onClick, href = _a.href, isActive = _a.isActive, children = _a.children, props = __rest(_a, ["onClick", "href", "isActive", "children"]);
|
|
21
21
|
return (React__default.createElement(React__default.Fragment, null, isActive || href === undefined ? (React__default.createElement("span", __assign({}, (isActive && { "aria-hidden": "true" }), { onClick: onClick, className: classNames({
|
|
22
22
|
"arc-Breadcrumbs-text": true,
|
|
23
23
|
"arc-Breadcrumbs-text--active": isActive
|
|
24
|
-
}) }), children)) : (React__default.createElement("a", __assign({}, (onClick && ref
|
|
24
|
+
}) }, filterDataAttrs(props)), children)) : (React__default.createElement("a", __assign({}, (onClick && ref
|
|
25
25
|
? { onClick: onClick }
|
|
26
|
-
: { onClick: handleLinkClick({ handler: onClick }) }), { className: "arc-Breadcrumbs-text", ref: ref, href: href }), children))));
|
|
26
|
+
: { onClick: handleLinkClick({ handler: onClick }) }), { className: "arc-Breadcrumbs-text", ref: ref, href: href }, filterDataAttrs(props)), children))));
|
|
27
27
|
});
|
|
28
28
|
|
|
29
29
|
/** Use `Breadcrumbs` to add a secondary navigation scheme that reveals the user’s location. Each item should be wrapped with `Breadcrumbs.Item` */
|
|
30
30
|
var Breadcrumbs = function (_a) {
|
|
31
|
-
var isLight = _a.isLight, children = _a.children;
|
|
31
|
+
var isLight = _a.isLight, children = _a.children, props = __rest(_a, ["isLight", "children"]);
|
|
32
32
|
var breadcrumbsList = useRef(null);
|
|
33
33
|
var _b = useState(false), isCompressed = _b[0], setIsCompressed = _b[1];
|
|
34
34
|
var _c = useState(false), showBackTrail = _c[0], setShowBackTrail = _c[1];
|
|
@@ -67,10 +67,10 @@ var Breadcrumbs = function (_a) {
|
|
|
67
67
|
// eslint-disable-next-line
|
|
68
68
|
}, []);
|
|
69
69
|
var items = React__default.Children.toArray(children);
|
|
70
|
-
return (React__default.createElement("nav", { "aria-label": "Breadcrumbs", role: "navigation", className: classNames({
|
|
70
|
+
return (React__default.createElement("nav", __assign({ "aria-label": "Breadcrumbs", role: "navigation", className: classNames({
|
|
71
71
|
"arc-Breadcrumbs": true,
|
|
72
72
|
"arc-Breadcrumbs--dark": isLight
|
|
73
|
-
}) },
|
|
73
|
+
}) }, filterDataAttrs(props)),
|
|
74
74
|
React__default.createElement("ul", { className: "arc-Breadcrumbs-list", ref: breadcrumbsList }, showBackTrail ? (React__default.createElement(React__default.Fragment, null, items.length < 3 ? (React__default.createElement(Breadcrumbs.Item, { spacerIconBefore: true }, items[0].props.children)) : (React__default.createElement(Breadcrumbs.Item, { spacerIconBefore: true }, items[items.length - 2].props.children)))) : (React__default.createElement(React__default.Fragment, null, isCompressed ? (React__default.createElement(React__default.Fragment, null,
|
|
75
75
|
React__default.createElement(Breadcrumbs.Item, { spacerIconAfter: true }, items[0].props.children),
|
|
76
76
|
React__default.createElement(Breadcrumbs.Item, { spacerIconAfter: true },
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
const React$2 = React__default;
|
|
4
|
+
const BtIconNotification = props =>
|
|
5
|
+
/*#__PURE__*/ React$2.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$2.createElement("defs", null),
|
|
15
|
+
/*#__PURE__*/ React$2.createElement("path", {
|
|
16
|
+
d:
|
|
17
|
+
"M24.50977,21.98867,24,21.99014,23.99414,13.975a7.98466,7.98466,0,0,0-6.66046-7.86011,1.46733,1.46733,0,0,0,.15655-.65063,1.48633,1.48633,0,1,0-2.97265,0,1.46732,1.46732,0,0,0,.15826.65369,7.9849,7.9849,0,0,0-6.63971,7.857v8.0166l-.50781-.00293a1.50464,1.50464,0,1,0,0,3.00928h3.45679a1.997,1.997,0,0,0,3.99365,0h9.532a1.50464,1.50464,0,1,0-.001-3.00928ZM16.00391,4.97793a.48633.48633,0,1,1-.48633.48633A.48668.48668,0,0,1,16.00391,4.97793ZM12.98242,25.97158a.998.998,0,0,1-.99469-.97363h1.98841A.99785.99785,0,0,1,12.98242,25.97158ZM24.51074,23.998H7.52832a.50465.50465,0,0,1-.00488-1.00928l1.51269.00293V13.975a6.979,6.979,0,0,1,13.958.00049L23,22.99209l1.51074-.00342a.50464.50464,0,1,1,0,1.00928Z",
|
|
18
|
+
fill: "currentColor"
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
var BtIconNotification_2 = BtIconNotification;
|
|
22
|
+
|
|
23
|
+
const React$1 = React__default;
|
|
24
|
+
const BtIconAlertTriangle = props =>
|
|
25
|
+
/*#__PURE__*/ React$1.createElement(
|
|
26
|
+
"svg",
|
|
27
|
+
Object.assign(
|
|
28
|
+
{
|
|
29
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
+
viewBox: "0 0 32 32"
|
|
31
|
+
},
|
|
32
|
+
props
|
|
33
|
+
),
|
|
34
|
+
/*#__PURE__*/ React$1.createElement("defs", null),
|
|
35
|
+
/*#__PURE__*/ React$1.createElement("path", {
|
|
36
|
+
fill: "currentColor",
|
|
37
|
+
d: "M16 21.99335A1 1 0 1 0 16 23.99335 1 1 0 1 0 16 21.99335z"
|
|
38
|
+
}),
|
|
39
|
+
/*#__PURE__*/ React$1.createElement("path", {
|
|
40
|
+
d:
|
|
41
|
+
"M16.00488,20.00977a.49972.49972,0,0,0,.5-.5l.002-9.00977a.5.5,0,0,0-1,0l-.002,9.00977A.5.5,0,0,0,16.00488,20.00977Z",
|
|
42
|
+
fill: "currentColor"
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ React$1.createElement("path", {
|
|
45
|
+
d:
|
|
46
|
+
"M29.83691,26.21,17.041,4.5332A1.15617,1.15617,0,0,0,16.03711,3.959h-.001a1.159,1.159,0,0,0-1.00586.57373L2.23535,26.21045a1.16676,1.16676,0,0,0,1.00488,1.76074H28.83105A1.16843,1.16843,0,0,0,29.83691,26.21Zm-.86035.67725a.164.164,0,0,1-.14551.084H3.24023a.16737.16737,0,0,1-.14355-.25244L15.8916,5.0415a.167.167,0,0,1,.28809,0l12.7959,21.67627A.16531.16531,0,0,1,28.97656,26.88721Z",
|
|
47
|
+
fill: "currentColor"
|
|
48
|
+
})
|
|
49
|
+
);
|
|
50
|
+
var BtIconAlertTriangle_2 = BtIconAlertTriangle;
|
|
51
|
+
|
|
52
|
+
const React = React__default;
|
|
53
|
+
const BtIconTick = props =>
|
|
54
|
+
/*#__PURE__*/ React.createElement(
|
|
55
|
+
"svg",
|
|
56
|
+
Object.assign(
|
|
57
|
+
{
|
|
58
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
+
viewBox: "0 0 32 32"
|
|
60
|
+
},
|
|
61
|
+
props
|
|
62
|
+
),
|
|
63
|
+
/*#__PURE__*/ React.createElement("defs", null),
|
|
64
|
+
/*#__PURE__*/ React.createElement(
|
|
65
|
+
"g",
|
|
66
|
+
{
|
|
67
|
+
"data-name": "Icons"
|
|
68
|
+
},
|
|
69
|
+
/*#__PURE__*/ React.createElement("path", {
|
|
70
|
+
d:
|
|
71
|
+
"M16,3A13,13,0,1,1,3,16,12.9741,12.9741,0,0,1,16,3m0-1A14,14,0,1,0,30,16,14.04116,14.04116,0,0,0,16,2Z",
|
|
72
|
+
fill: "currentColor"
|
|
73
|
+
}),
|
|
74
|
+
/*#__PURE__*/ React.createElement("path", {
|
|
75
|
+
d:
|
|
76
|
+
"M13.5,21.2,9.1,16.8a.495.495,0,1,1,.7-.7l3.6,3.6L22,11.1a.495.495,0,1,1,.7.7Z",
|
|
77
|
+
fill: "currentColor"
|
|
78
|
+
})
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
var BtIconTick_2 = BtIconTick;
|
|
82
|
+
|
|
83
|
+
export { BtIconNotification_2 as B, BtIconAlertTriangle_2 as a, BtIconTick_2 as b };
|
|
@@ -28,6 +28,10 @@ interface ButtonElementProps {
|
|
|
28
28
|
* be inferred. Type 'reset' deliberately excluded.
|
|
29
29
|
*/
|
|
30
30
|
type?: "button" | "submit";
|
|
31
|
+
/**
|
|
32
|
+
* Refers to the id of a form so it can be submitted if the button exists outside of it.
|
|
33
|
+
*/
|
|
34
|
+
form?: string;
|
|
31
35
|
}
|
|
32
36
|
interface LinkElementProps {
|
|
33
37
|
/**
|
|
@@ -12,7 +12,7 @@ import { C as Context } from './Surface-dde51789.js';
|
|
|
12
12
|
*/
|
|
13
13
|
var Button = forwardRef(function (_a, ref) {
|
|
14
14
|
var _b;
|
|
15
|
-
var ariaLabel = _a.ariaLabel, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, supportingText = _a.supportingText, target = _a.target, type = _a.type, props = __rest(_a, ["ariaLabel", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "supportingText", "target", "type"]);
|
|
15
|
+
var ariaLabel = _a.ariaLabel, _c = _a.fill, fill = _c === void 0 ? "solid" : _c, href = _a.href, icon = _a.icon, _d = _a.iconPosition, iconPosition = _d === void 0 ? "afterText" : _d, id = _a.id, _e = _a.isDisabled, isDisabled = _e === void 0 ? false : _e, _f = _a.isDisplayBlock, isDisplayBlock = _f === void 0 ? false : _f, _g = _a.isFullWidth, isFullWidth = _g === void 0 ? false : _g, label = _a.label, onClick = _a.onClick, rel = _a.rel, supportingText = _a.supportingText, target = _a.target, type = _a.type, form = _a.form, props = __rest(_a, ["ariaLabel", "fill", "href", "icon", "iconPosition", "id", "isDisabled", "isDisplayBlock", "isFullWidth", "label", "onClick", "rel", "supportingText", "target", "type", "form"]);
|
|
16
16
|
var surface = useContext(Context).surface;
|
|
17
17
|
var buttonClasses = classNames((_b = {
|
|
18
18
|
"arc-Button": true,
|
|
@@ -37,7 +37,7 @@ var Button = forwardRef(function (_a, ref) {
|
|
|
37
37
|
buttonText,
|
|
38
38
|
buttonIcon)));
|
|
39
39
|
}
|
|
40
|
-
return (React__default.createElement("button", __assign({}, commonProps, { "aria-label": ariaLabel, className: buttonClasses, disabled: isDisabled, type: type }),
|
|
40
|
+
return (React__default.createElement("button", __assign({}, commonProps, { "aria-label": ariaLabel, className: buttonClasses, disabled: isDisabled, type: type, form: form }),
|
|
41
41
|
React__default.createElement("span", { className: "arc-Button-inner" },
|
|
42
42
|
buttonText,
|
|
43
43
|
buttonIcon)));
|
|
@@ -4,7 +4,7 @@ import React__default, { useState, useEffect, useContext } from 'react';
|
|
|
4
4
|
import { B as BtIconChevronRightMid_2 } from './BtIconChevronRightMid-d9b11761.js';
|
|
5
5
|
import { I as Icon } from './Icon-c1af47bc.js';
|
|
6
6
|
import { I as Image } from './Image-3ed3863c.js';
|
|
7
|
-
import { H as Heading } from './Heading-
|
|
7
|
+
import { H as Heading } from './Heading-0f629151.js';
|
|
8
8
|
import { s as suffixModifier } from './suffix-modifier-7e640670.js';
|
|
9
9
|
import { C as Context, S as Surface } from './Surface-dde51789.js';
|
|
10
10
|
import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
@@ -3,7 +3,7 @@ import React__default, { forwardRef, useContext } from 'react';
|
|
|
3
3
|
import { B as BtIconTickAlt2Px_2 } from './BtIconTickAlt2Px-da97e9ae.js';
|
|
4
4
|
import { B as BtIconAlert_2 } from './BtIconAlert-55a6ed5c.js';
|
|
5
5
|
import { c as classNames } from './index-2ae58626.js';
|
|
6
|
-
import { C as Context, u as useAriaDescribedby } from './FormControl-
|
|
6
|
+
import { C as Context, u as useAriaDescribedby } from './FormControl-f18e2f59.js';
|
|
7
7
|
import { C as Context$1 } from './Surface-dde51789.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { FC } from "react";
|
|
2
2
|
import { backgroundsBT } from "../../Surface/Surface.esm";
|
|
3
3
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
#### Deprecation Notice
|
|
5
|
+
|
|
6
|
+
The `Curve` component is an outdated brand feature and is being deprecated from Arc as a standalone component or sub-component within other components. Do not use Curve for any new work, and prepare to update any design that features it to remove it.
|
|
7
|
+
|
|
8
|
+
`Curve` will be removed from Arc in a subsequent release
|
|
6
9
|
*/
|
|
7
10
|
declare const Curve: FC<CurveProps>;
|
|
8
11
|
declare const sizes: readonly ["s", "m", "l"];
|
|
@@ -4,8 +4,11 @@ import React__default from 'react';
|
|
|
4
4
|
import { s as suffixModifier } from './suffix-modifier-7e640670.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
#### Deprecation Notice
|
|
8
|
+
|
|
9
|
+
The `Curve` component is an outdated brand feature and is being deprecated from Arc as a standalone component or sub-component within other components. Do not use Curve for any new work, and prepare to update any design that features it to remove it.
|
|
10
|
+
|
|
11
|
+
`Curve` will be removed from Arc in a subsequent release
|
|
9
12
|
*/
|
|
10
13
|
var Curve = function (_a) {
|
|
11
14
|
var _b;
|
|
@@ -2,7 +2,7 @@ import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-
|
|
|
2
2
|
import { c as classNames } from './index-2ae58626.js';
|
|
3
3
|
import React__default, { useContext, useState } from 'react';
|
|
4
4
|
import { B as BtIconChevronDown2Px_2 } from './BtIconChevronDown2Px-782876e2.js';
|
|
5
|
-
import { T as Text } from './Text-
|
|
5
|
+
import { T as Text } from './Text-40457811.js';
|
|
6
6
|
import { C as Context } from './Surface-dde51789.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -3,7 +3,7 @@ import { c as classNames } from './index-2ae58626.js';
|
|
|
3
3
|
import React__default, { createContext, useContext } from 'react';
|
|
4
4
|
import { B as BtIconAlert_2 } from './BtIconAlert-55a6ed5c.js';
|
|
5
5
|
import { C as Context$1 } from './Surface-dde51789.js';
|
|
6
|
-
import { D as DisclosureMini } from './DisclosureMini-
|
|
6
|
+
import { D as DisclosureMini } from './DisclosureMini-9b819941.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Optionally define ariaDescribedBy if errorMessage or helper exist.
|
|
@@ -9,13 +9,13 @@ import { C as Context } from './Surface-dde51789.js';
|
|
|
9
9
|
*/
|
|
10
10
|
var Heading = function (_a) {
|
|
11
11
|
var _b;
|
|
12
|
-
var _c = _a.align, align = _c === void 0 ? "left" : _c, _d = _a.casing, casing = _d === void 0 ? "auto" : _d, children = _a.children, _e = _a.color, color = _e === void 0 ? "auto" : _e, level = _a.level, size = _a.size, props = __rest(_a, ["align", "casing", "children", "color", "level", "size"]);
|
|
12
|
+
var _c = _a.align, align = _c === void 0 ? "left" : _c, _d = _a.casing, casing = _d === void 0 ? "auto" : _d, children = _a.children, _e = _a.color, color = _e === void 0 ? "auto" : _e, level = _a.level, size = _a.size, id = _a.id, props = __rest(_a, ["align", "casing", "children", "color", "level", "size", "id"]);
|
|
13
13
|
var surface = useContext(Context).surface;
|
|
14
14
|
var Element = "span";
|
|
15
15
|
if (level) {
|
|
16
16
|
Element = "h".concat(level);
|
|
17
17
|
}
|
|
18
|
-
return (React__default.createElement(Element, __assign({ className: classNames((_b = {
|
|
18
|
+
return (React__default.createElement(Element, __assign({ id: id, className: classNames((_b = {
|
|
19
19
|
"arc-Heading": true
|
|
20
20
|
},
|
|
21
21
|
_b[suffixModifier("arc-Heading--align", align)] = align && align !== "left",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-afdb7d32.js';
|
|
2
2
|
import React__default, { createContext, useContext, forwardRef, useEffect } from 'react';
|
|
3
|
-
import { F as FormControl } from './FormControl-
|
|
3
|
+
import { F as FormControl } from './FormControl-f18e2f59.js';
|
|
4
4
|
import { c as classNames } from './index-2ae58626.js';
|
|
5
5
|
import { C as Context } from './Surface-dde51789.js';
|
|
6
6
|
|
|
@@ -3,7 +3,7 @@ import { u as useMediaQuery, A as ArcBreakpointM } from './index.es-00cb3bcb.js'
|
|
|
3
3
|
import { B as BtIconChevronDown2Px_2 } from './BtIconChevronDown2Px-782876e2.js';
|
|
4
4
|
import React__default, { useEffect, Fragment } from 'react';
|
|
5
5
|
import { B as BrandLogo } from './BrandLogo-9ec620e8.js';
|
|
6
|
-
import { C as Curve } from './Curve-
|
|
6
|
+
import { C as Curve } from './Curve-bbc5589c.js';
|
|
7
7
|
import { S as Section } from './Section-b8038d66.js';
|
|
8
8
|
import { S as Surface } from './Surface-dde51789.js';
|
|
9
9
|
import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
@@ -6,7 +6,7 @@ import { Column } from "./index-f419cf04";
|
|
|
6
6
|
import { Item } from "./index-699086a7";
|
|
7
7
|
import { ItemGroup } from "./index-e340924e";
|
|
8
8
|
import { NavItem, NavItemWithSubNav } from "./index-e6d20018";
|
|
9
|
-
import { NodeItem } from "./SiteHeader.rehydrator-
|
|
9
|
+
import { NodeItem } from "./SiteHeader.rehydrator-023b7b76";
|
|
10
10
|
import { SubNavItem } from "./index-74488a9f";
|
|
11
11
|
declare const Context: React.Context<{
|
|
12
12
|
transparent: boolean;
|
|
@@ -74,5 +74,5 @@ interface SiteHeaderProps {
|
|
|
74
74
|
*/
|
|
75
75
|
subBrand?: typeof subBrands[number];
|
|
76
76
|
}
|
|
77
|
-
export { MenuButton } from "./SiteHeader.rehydrator-
|
|
77
|
+
export { MenuButton } from "./SiteHeader.rehydrator-023b7b76";
|
|
78
78
|
export { SiteHeader, SiteHeaderProps, Context as SiteHeaderContext };
|
package/dist/_shared/esm/{SiteHeader.rehydrator-382d1c03.js → SiteHeader.rehydrator-023b7b76.js}
RENAMED
|
@@ -7,9 +7,9 @@ import { h as handleLinkClick } from './handle-link-click-f64f55a2.js';
|
|
|
7
7
|
import { a as BtIconChevronRight2Px_2, B as BtIconChevronLeft2Px_2 } from './BtIconChevronRight2Px-b8e7b4ad.js';
|
|
8
8
|
import { S as Surface } from './Surface-dde51789.js';
|
|
9
9
|
import { B as BrandLogo } from './BrandLogo-9ec620e8.js';
|
|
10
|
-
import { B as Button } from './Button-
|
|
10
|
+
import { B as Button } from './Button-d1dbcf79.js';
|
|
11
11
|
import { s as suffixModifier } from './suffix-modifier-7e640670.js';
|
|
12
|
-
import { T as Text } from './Text-
|
|
12
|
+
import { T as Text } from './Text-40457811.js';
|
|
13
13
|
|
|
14
14
|
var Item = function (_a) {
|
|
15
15
|
var _b;
|
|
@@ -9,9 +9,9 @@ import { C as Context } from './Surface-dde51789.js';
|
|
|
9
9
|
*/
|
|
10
10
|
var Text = function (_a) {
|
|
11
11
|
var _b;
|
|
12
|
-
var _c = _a.align, align = _c === void 0 ? "left" : _c, children = _a.children, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isMeasured, isMeasured = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "m" : _f, _g = _a.tone, tone = _g === void 0 ? "default" : _g, props = __rest(_a, ["align", "children", "isInline", "isMeasured", "size", "tone"]);
|
|
12
|
+
var _c = _a.align, align = _c === void 0 ? "left" : _c, children = _a.children, id = _a.id, _d = _a.isInline, isInline = _d === void 0 ? false : _d, _e = _a.isMeasured, isMeasured = _e === void 0 ? false : _e, _f = _a.size, size = _f === void 0 ? "m" : _f, _g = _a.tone, tone = _g === void 0 ? "default" : _g, props = __rest(_a, ["align", "children", "id", "isInline", "isMeasured", "size", "tone"]);
|
|
13
13
|
var surface = useContext(Context).surface;
|
|
14
|
-
return (React__default.createElement("span", __assign({ className: classNames((_b = {
|
|
14
|
+
return (React__default.createElement("span", __assign({ id: id, className: classNames((_b = {
|
|
15
15
|
"arc-Text": true
|
|
16
16
|
},
|
|
17
17
|
_b[suffixModifier("arc-Text--align", align)] = align !== "left",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { FC } from "react";
|
|
4
|
-
import { FormControlProps } from "./FormControl-
|
|
4
|
+
import { FormControlProps } from "./FormControl-f18e2f59";
|
|
5
5
|
type EventType = React.ChangeEvent<HTMLInputElement>;
|
|
6
6
|
/**
|
|
7
7
|
* Use `TextInput` to allow custom user text entry with a keyboard.
|
|
@@ -11,6 +11,8 @@ interface TextInputProps extends Omit<FormControlProps, "children" | "elementTyp
|
|
|
11
11
|
/**
|
|
12
12
|
* Uncontrolled default value of the TextInput. If the TextInput is controlled
|
|
13
13
|
* via `value`/`onChange`, `defaultValue` will be ignored.
|
|
14
|
+
*
|
|
15
|
+
* `defaultValue` is not to be used instead of helper text.
|
|
14
16
|
*/
|
|
15
17
|
defaultValue?: string;
|
|
16
18
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TextInputProps } from "./TextInput-
|
|
1
|
+
import { TextInputProps } from "./TextInput-13050538";
|
|
2
2
|
/**
|
|
3
3
|
* Infer the correct inputMode, pattern and type if specifying a `number` type.
|
|
4
4
|
*/
|
|
5
5
|
declare const useNumericInput: (props: Pick<TextInputProps, "inputMode" | "pattern" | "type">) => {
|
|
6
|
-
inputMode: "
|
|
6
|
+
inputMode: "tel" | "url" | "email" | "numeric" | undefined;
|
|
7
7
|
pattern: string | undefined;
|
|
8
|
-
type: "text" | "
|
|
8
|
+
type: "text" | "tel" | "url" | "email" | "password" | undefined;
|
|
9
9
|
};
|
|
10
10
|
export { useNumericInput };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __rest, a as __assign, f as filterDataAttrs } from './filter-data-attrs-afdb7d32.js';
|
|
2
2
|
import { c as classNames } from './index-2ae58626.js';
|
|
3
3
|
import React__default, { forwardRef, useContext, useState } from 'react';
|
|
4
|
-
import { u as useAriaDescribedby, F as FormControl } from './FormControl-
|
|
4
|
+
import { u as useAriaDescribedby, F as FormControl } from './FormControl-f18e2f59.js';
|
|
5
5
|
import { C as Context } from './Surface-dde51789.js';
|
|
6
6
|
import { V as VisuallyHidden } from './VisuallyHidden-b9eebf71.js';
|
|
7
7
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function _extends() {
|
|
2
|
+
_extends = Object.assign || function (target) {
|
|
3
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
4
|
+
var source = arguments[i];
|
|
5
|
+
|
|
6
|
+
for (var key in source) {
|
|
7
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
8
|
+
target[key] = source[key];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
return _extends.apply(this, arguments);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { _extends as _ };
|