@oracle/oraclejet-preact 20.0.2 → 20.0.4
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/amd/{BarChart-f429b382.js → BarChart-994cb8f0.js} +2 -2
- package/amd/{BarChart-f429b382.js.map → BarChart-994cb8f0.js.map} +1 -1
- package/amd/{Chart-57965de4.js → Chart-d9eafc7a.js} +2 -2
- package/amd/{Chart-57965de4.js.map → Chart-d9eafc7a.js.map} +1 -1
- package/amd/{ComboChart-c42ed049.js → ComboChart-5a6f6c8a.js} +2 -2
- package/amd/{ComboChart-c42ed049.js.map → ComboChart-5a6f6c8a.js.map} +1 -1
- package/amd/ExpandableList-233c279e.js +2 -0
- package/amd/{ExpandableList-a9a86ad8.js.map → ExpandableList-233c279e.js.map} +1 -1
- package/amd/{InlineSelectSingle-7c1cc5b5.js → InlineSelectSingle-87bc8a45.js} +2 -2
- package/amd/{InlineSelectSingle-7c1cc5b5.js.map → InlineSelectSingle-87bc8a45.js.map} +1 -1
- package/amd/{LineAreaChart-48efb7f7.js → LineAreaChart-47fc17d2.js} +2 -2
- package/amd/{LineAreaChart-48efb7f7.js.map → LineAreaChart-47fc17d2.js.map} +1 -1
- package/amd/ListView-02a92d18.js +2 -0
- package/amd/{ListView-6d21e8f9.js.map → ListView-02a92d18.js.map} +1 -1
- package/amd/PRIVATE_Chart.js +1 -1
- package/amd/PRIVATE_SelectCommon.js +1 -1
- package/amd/{ScatterChart-6427e7ec.js → ScatterChart-7bd0f601.js} +2 -2
- package/amd/{ScatterChart-6427e7ec.js.map → ScatterChart-7bd0f601.js.map} +1 -1
- package/amd/{SelectMobileFieldInput-d499ef86.js → SelectMobileFieldInput-4795a794.js} +2 -2
- package/amd/{SelectMobileFieldInput-d499ef86.js.map → SelectMobileFieldInput-4795a794.js.map} +1 -1
- package/amd/{SelectMultiple-cc9bffc6.js → SelectMultiple-e216b16c.js} +2 -2
- package/amd/{SelectMultiple-cc9bffc6.js.map → SelectMultiple-e216b16c.js.map} +1 -1
- package/amd/{SelectSingle-2bb35b67.js → SelectSingle-d53cf202.js} +2 -2
- package/amd/{SelectSingle-2bb35b67.js.map → SelectSingle-d53cf202.js.map} +1 -1
- package/amd/Theme-redwood/theme.css +209 -209
- package/amd/Theme-stable/theme.css +160 -160
- package/amd/UNSAFE_BarChart/__test__/BarChart.spec.js +1 -1
- package/amd/UNSAFE_BarChart.js +1 -1
- package/amd/UNSAFE_ComboChart.js +1 -1
- package/amd/UNSAFE_ExpandableList.js +1 -1
- package/amd/UNSAFE_InlineSelectSingle.js +1 -1
- package/amd/UNSAFE_LineAreaChart.js +1 -1
- package/amd/UNSAFE_ListView.js +1 -1
- package/amd/UNSAFE_ScatterChart.js +1 -1
- package/amd/UNSAFE_SelectMultiple.js +1 -1
- package/amd/UNSAFE_SelectSingle.js +1 -1
- package/amd/UNSAFE_VirtualizedListView.js +1 -1
- package/amd/VirtualizedListView-a0f338c2.js +2 -0
- package/amd/{VirtualizedListView-1ae7151d.js.map → VirtualizedListView-a0f338c2.js.map} +1 -1
- package/amd/{useDisplayValue-0e90bf4c.js → useDisplayValue-9b671893.js} +2 -2
- package/amd/{useDisplayValue-0e90bf4c.js.map → useDisplayValue-9b671893.js.map} +1 -1
- package/amd/useSelectCommon-f33709d2.js +2 -0
- package/amd/{useSelectCommon-a02ddf3c.js.map → useSelectCommon-f33709d2.js.map} +1 -1
- package/cjs/{BaseCardView-c0909427.js → BaseCardView-ba63723a.js} +4 -1
- package/cjs/{BaseCardView-c0909427.js.map → BaseCardView-ba63723a.js.map} +1 -1
- package/cjs/PRIVATE_BaseCardView.js +1 -1
- package/cjs/PRIVATE_TableList.js +4 -4
- package/cjs/SegmentStyles.styles.css +9 -12
- package/cjs/SegmentStyles.styles2.css +12 -9
- package/cjs/{TabBar-27ae2c21.js → TabBar-4bc753a9.js} +3 -1
- package/{es/TabBar-67ca442c.js.map → cjs/TabBar-4bc753a9.js.map} +1 -1
- package/cjs/Theme-redwood/theme.css +146 -146
- package/cjs/Theme-stable/theme.css +311 -311
- package/cjs/UNSAFE_CardFlexView.js +1 -1
- package/cjs/UNSAFE_CardGridView.js +1 -1
- package/cjs/UNSAFE_ListView.js +53 -53
- package/cjs/UNSAFE_OverflowTabBar.js +10 -10
- package/cjs/UNSAFE_ReorderableTabBar.js +12 -12
- package/cjs/UNSAFE_TabBar.js +10 -10
- package/cjs/UNSAFE_TabBarMixed.js +8 -8
- package/es/{BaseCardView-b3d8bae0.js → BaseCardView-85b9a71e.js} +1 -4
- package/es/{BaseCardView-b3d8bae0.js.map → BaseCardView-85b9a71e.js.map} +1 -1
- package/es/ButtonLayoutVariants.styles.css +2 -2
- package/es/ButtonLayoutVariants.styles2.css +2 -2
- package/es/{Chart-b866a74c.js → Chart-8c63da28.js} +2 -2
- package/es/{Chart-b866a74c.js.map → Chart-8c63da28.js.map} +1 -1
- package/es/CheckboxSetContext-1be56556.js +9 -0
- package/es/CheckboxSetContext-1be56556.js.map +1 -0
- package/es/{ColorPicker-ae648c4c.js → ColorPicker-fa103067.js} +2 -2
- package/es/{ColorPicker-ae648c4c.js.map → ColorPicker-fa103067.js.map} +1 -1
- package/es/PRIVATE_BaseCardView.js +1 -1
- package/es/PRIVATE_Chart.js +4 -4
- package/es/PRIVATE_CollapsibleNavigationList.js +25 -25
- package/es/PRIVATE_TableList.js +4 -4
- package/es/SegmentStyles.styles.css +12 -9
- package/es/SegmentStyles.styles2.css +9 -12
- package/es/{TabBar-67ca442c.js → TabBar-10488830.js} +1 -3
- package/{cjs/TabBar-27ae2c21.js.map → es/TabBar-10488830.js.map} +1 -1
- package/es/Theme-redwood/theme.css +506 -506
- package/es/Theme-stable/theme.css +427 -427
- package/es/UNSAFE_BarChart.js +4 -4
- package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutTheme.js +1 -1
- package/es/UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js +1 -1
- package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutTheme.js +1 -1
- package/es/UNSAFE_ButtonLayout/themes/stable/ButtonLayoutVariants.css.js +1 -1
- package/es/UNSAFE_ButtonLayout.js +1 -1
- package/es/UNSAFE_CardFlexView.js +1 -1
- package/es/UNSAFE_CardGridView.js +1 -1
- package/es/UNSAFE_CheckboxItem.js +61 -122
- package/es/UNSAFE_CheckboxItem.js.map +1 -1
- package/es/UNSAFE_CheckboxSet.js +49 -15
- package/es/UNSAFE_CheckboxSet.js.map +1 -1
- package/es/UNSAFE_ColorPicker.js +25 -25
- package/es/UNSAFE_ComboChart.js +4 -4
- package/es/UNSAFE_FlatTreeView.js +14 -14
- package/es/UNSAFE_InputColor.js +2 -2
- package/es/UNSAFE_InputDateMask/themes/SegmentStyles.css.js +1 -1
- package/es/UNSAFE_InputDateMask.js +1 -1
- package/es/UNSAFE_InputDatePicker.js +1 -1
- package/es/UNSAFE_InputTimeMask/themes/SegmentStyles.css.js +1 -1
- package/es/UNSAFE_InputTimeMask.js +1 -1
- package/es/UNSAFE_LineAreaChart.js +4 -4
- package/es/UNSAFE_ListView.js +53 -53
- package/es/UNSAFE_OverflowTabBar.js +10 -10
- package/es/UNSAFE_ReorderableTabBar.js +12 -12
- package/es/UNSAFE_RichCheckboxSet.js +42 -46
- package/es/UNSAFE_RichCheckboxSet.js.map +1 -1
- package/es/UNSAFE_RichSelectionItem.js +89 -152
- package/es/UNSAFE_RichSelectionItem.js.map +1 -1
- package/es/UNSAFE_ScatterChart.js +4 -4
- package/es/UNSAFE_TabBar.js +10 -10
- package/es/UNSAFE_TabBarMixed.js +8 -8
- package/es/UNSAFE_Toolbar.js +1 -1
- package/package.json +2 -2
- package/amd/ExpandableList-a9a86ad8.js +0 -2
- package/amd/ListView-6d21e8f9.js +0 -2
- package/amd/VirtualizedListView-1ae7151d.js +0 -2
- package/amd/useSelectCommon-a02ddf3c.js +0 -2
- package/es/CheckboxSet-3aab5935.js +0 -51
- package/es/CheckboxSet-3aab5935.js.map +0 -1
package/es/UNSAFE_TabBarMixed.js
CHANGED
|
@@ -38,8 +38,6 @@ import './CollectionInteractionContext-7cf19abc.js';
|
|
|
38
38
|
import './dropdownStyles.styles.css';
|
|
39
39
|
import './Sheet-f9f8a4a4.js';
|
|
40
40
|
import './OverflowTabBarItemStyles.styles.css';
|
|
41
|
-
import './StyledCheckbox-d6c8f557.js';
|
|
42
|
-
import './SelectorStyles.styles.css';
|
|
43
41
|
import { i as isMobile } from './clientUtils-71f2dbaf.js';
|
|
44
42
|
import { styles } from './UNSAFE_TabBarMixed/themes/TabBarMixedStyles.css.js';
|
|
45
43
|
import { u as useTabBar, g as getItemAttribute, R as REMOVABLE_ITEM_ATTRIBUTE } from './useTabBar-c5558e77.js';
|
|
@@ -152,11 +150,17 @@ import './useAnimationStatus-b881f39a.js';
|
|
|
152
150
|
import './useAnimation-fe39685e.js';
|
|
153
151
|
import './animationUtils-5f409a6c.js';
|
|
154
152
|
import './useTranslationBundle-4822502f.js';
|
|
153
|
+
import './TabBarMixedStyles.styles.css';
|
|
154
|
+
import './collectionUtils-5313629f.js';
|
|
155
|
+
import './keys-49c92dbb.js';
|
|
156
|
+
import './Selector-23bccbe7.js';
|
|
157
|
+
import './BaseSelector-7cbc48bc.js';
|
|
158
|
+
import './useFocus-38c95977.js';
|
|
159
|
+
import './StyledCheckbox-d6c8f557.js';
|
|
155
160
|
import './Check-ac39fe00.js';
|
|
156
161
|
import './Icon-4983d06e.js';
|
|
157
162
|
import './useTooltip-94af94d4.js';
|
|
158
163
|
import './useTooltipControlled-f2cfa454.js';
|
|
159
|
-
import './useFocus-38c95977.js';
|
|
160
164
|
import './useTouch-4828df25.js';
|
|
161
165
|
import './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentTheme.js';
|
|
162
166
|
import './hooks/UNSAFE_useTooltip/themes/TooltipContentStyles.css.js';
|
|
@@ -174,12 +178,8 @@ import './UNSAFE_Checkbox/themes/redwood/CheckboxIconBaseTheme.styles.css';
|
|
|
174
178
|
import './UNSAFE_Checkbox/themes/redwood/CheckboxIconVariants.css.js';
|
|
175
179
|
import './CheckboxIconVariants.styles.css';
|
|
176
180
|
import './StyledCheckbox.styles.css';
|
|
177
|
-
import './TabBarMixedStyles.styles.css';
|
|
178
|
-
import './collectionUtils-5313629f.js';
|
|
179
|
-
import './keys-49c92dbb.js';
|
|
180
|
-
import './Selector-23bccbe7.js';
|
|
181
|
-
import './BaseSelector-7cbc48bc.js';
|
|
182
181
|
import './PRIVATE_BaseSelector/themes/SelectorStyles.css.js';
|
|
182
|
+
import './SelectorStyles.styles.css';
|
|
183
183
|
import './useCollectionInteractionContext-3895c632.js';
|
|
184
184
|
import './useCollectionFocusRing-23ac7f97.js';
|
|
185
185
|
import './useCurrentKey-5f865bbd.js';
|
package/es/UNSAFE_Toolbar.js
CHANGED
|
@@ -22,7 +22,7 @@ import './ButtonLayoutStyles.styles.css';
|
|
|
22
22
|
import './UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutBaseTheme.css.js';
|
|
23
23
|
import './UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutBaseTheme.styles.css';
|
|
24
24
|
import './UNSAFE_ButtonLayout/themes/redwood/ButtonLayoutVariants.css.js';
|
|
25
|
-
import './ButtonLayoutVariants.
|
|
25
|
+
import './ButtonLayoutVariants.styles2.css';
|
|
26
26
|
import './vanilla-extract-recipes-createRuntimeFn.esm-2aaf8c98.js';
|
|
27
27
|
import './useComponentTheme-d2f9e47f.js';
|
|
28
28
|
import './logger-c92f309c.js';
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"devDependencies": {},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@oracle/oraclejet-testing": "20.0.
|
|
8
|
+
"@oracle/oraclejet-testing": "20.0.4",
|
|
9
9
|
"csstype": "3.1.1"
|
|
10
10
|
},
|
|
11
11
|
"peerDependencies": {
|
|
@@ -49,5 +49,5 @@
|
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
-
"version": "20.0.
|
|
52
|
+
"version": "20.0.4"
|
|
53
53
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', 'preact', 'preact/hooks', 'preact/compat', './classNames-08d99695', './useId-c9578d26', './useTranslationBundle-e4dd341e', './keys-4755c121', './Button-e5d7c0e3', './HiddenAccessible-037ef42d', './ChevronDown-d3ecbf6e', './CollapseIcon-f0d486e7', './List-daac1169', './GroupLoadingIndicator-b9518779', './PRIVATE_List/themes/ListStyles.css', './useNavigation-4d87e7e6', './LiveRegion-dbefb95b', './useUser-08901aba', './collectionUtils-77dc5fa1'], (function(e,t,n,a,s,i,o,r,d,l,c,u,p,x,g,y,m,k,f,h){"use strict";const v=e=>{"Enter"!==e.key&&" "!==e.key&&"ArrowLeft"!==e.key&&"ArrowRight"!==e.key||e.preventDefault()},b=(e,t,n,a,s)=>{const i=a(t);if(s&&i){const t=d.containsKey(n,i);(e&&t||!e&&!t)&&s({value:i})}},C=(e,t,n)=>{const a=t(e.target);n&&a&&(n({value:a}),"click"===e.type&&e.stopPropagation())};const L={all:!1,keys:new Set},I=s.memo((e=>{const n=i.classNames(["oj-listview-expander"]);return t.jsx("span",{class:n,role:"presentation",children:t.jsx(l.Button,{onAction:()=>{e.onToggle({value:e.itemKey})},variant:"ghost",startIcon:e.expanded?t.jsx(u.SvgChevronDown,{size:"6x"}):t.jsx(p.CollapseIcon,{size:"6x"})})})}),((e,t)=>e.itemKey===t.itemKey&&e.expanded===t.expanded&&e.onToggle===t.onToggle));e.ExpandableList=function({children:e,data:s,onSelectionChange:i,onToggle:l,onPersistCurrentItem:u,...p}){const[y,j]=a.useState(""),K=r.useTranslationBundle("@oracle/oraclejet-preact"),T=a.useRef(),A=a.useCallback((e=>{T.current=e.value,u?.(e)}),[u]),R=a.useCallback((e=>{if(l?.(e),s){const t=d.containsKey(s?.expanded,e.value);j(t?K.expandableList_groupCollapse():K.expandableList_groupExpand()),setTimeout((()=>{j("")}),1e3)}}),[l,s,K]),w=function(e,t,n){const{direction:s}=f.useUser(),i=a.useCallback((t=>{C(t,e,n)}),[e,n]),o=a.useCallback((a=>{if("Enter"===a.key||" "===a.key)C(a,e,n);else if("ArrowLeft"===a.key||"ArrowRight"===a.key){const i="rtl"===s,o="ArrowLeft"===a.key&&!i;b(o,a.target,t,e,n),a.preventDefault(),a.stopPropagation()}}),[e,n,t,s]);return n?{onClick:i,onKeyDown:v,onKeyUp:o}:{}}((e=>"treegrid"===e.getAttribute("role")?void 0===T.current?null:T.current:h.keyExtractor(e,g.GROUP_SELECTOR)),null==s?L:s.expanded,l&&R),D=o.useId(),E=a.useRef(D),S=a.useCallback((e=>{if(i&&s){const t=m.excludeGroup(s,e.value);d.isSameKey(t,e.value)?i(e):t.keys&&t.keys.size>0&&i({...e,value:t})}}),[i,s]);return t.jsxs(n.Fragment,{children:[t.jsx(x.List,{data:s,role:"treegrid",loadingIndicator:t.jsx(g.GroupLoadingIndicator,{}),onSelectionChange:S,customItemRenderer:n=>{const a=n.listItemContext.metadata.key,i=s&&l?{expanded:d.containsKey(s.expanded,a),onToggle:l}:void 0,o=((e,n)=>{const a=void 0!==n?()=>t.jsx(I,{itemKey:e.metadata.key,expanded:n.expanded,onToggle:n.onToggle}):void 0;return{...e,parentKey:e.metadata.parentKey,leaf:e.metadata.isLeaf??!0,depth:e.metadata.treeDepth??1,expander:a}})(n.listItemContext,i);return o.leaf?n.defaultListItem(o,{itemDepth:o.depth+1}):t.jsx(g.ListGroupHeader,{ariaDescribedBy:E.current,itemKey:o.metadata.key,itemIndex:o.index,itemDepth:o.depth,isFocused:n.isFocused,isFocusRingVisible:n.isFocusRingVisible,isActive:n.isActive,isGridlineVisible:!1,isExpandable:!0,expandedKeys:null==s?L:s.expanded,onToggle:l,children:e(o)},o.metadata.key)},onPersistCurrentItem:A,...p,...w,children:t=>e(t)}),l&&t.jsxs(n.Fragment,{children:[t.jsx(k.LiveRegion,{children:y}),t.jsx("span",{id:E.current,children:t.jsx(c.HiddenAccessible,{children:K.expandableList_expandCollapseInstructionText()})})]})]})}}));
|
|
2
|
-
//# sourceMappingURL=ExpandableList-a9a86ad8.js.map
|
package/amd/ListView-6d21e8f9.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', 'preact/compat', 'preact/hooks', './LayerHost-0b288129', './StyledCheckbox-368fed68', 'css!./SelectorStyles.styles.css', './CollectionInteractionContext-0b4ed98b', 'css!./DragAndDropStyles.styles.css', 'css!./ReorderableItemStyles.styles.css', './ReorderableContext-6d10a1b7', './HiddenAccessible-037ef42d', './List-daac1169', './TabbableModeContext-a9c97640', './logger-0f873e29', './flexitem-5db48325', './PRIVATE_List/themes/ListStyles.css', './UNSAFE_GroupedList/themes/GroupedListStyles.css', 'module', './Flex-4b81b412', './Skeleton-3e52c94a', './keys-4755c121', './useReorderableItem-7b4b2c3d', './classNames-08d99695', './useNavigation-4d87e7e6', './UNSAFE_ListView/themes/ListViewStyles.css', './mergeProps-bcfa6a92', './collectionUtils-77dc5fa1', './Menu-1b8fefc5', './MenuItem-85e4ffdc', 'preact', 'css!./TooltipContentStyles.styles.css', 'module', './hooks/UNSAFE_useTooltip/themes/redwood/TooltipContentVariants.css', './tooltipUtils-2bb62284', 'css!./IconStyle.styles.css', './SelectMenuGroupContext-67f24a8f', './UNSAFE_Menu/themes/MenuItemStyles.css', './UNSAFE_Separator/themes/SeparatorStyles.css', 'css!./MenuSeparatorStyles.styles.css', 'module', './UNSAFE_Menu/themes/redwood/MenuSeparatorVariants.css', './menuUtils-8e42385f', 'css!./MenuStyles.styles.css', './useItemAction-3616efde', './useContextMenuGesture-750ef2c6', './LoadMoreCollection-895f1ed5'], (function(e,t,r,o,s,n,i,a,l,c,d,u,m,f,y,I,S,p,C,g,x,R,b,h,M,v,L,T,E,P,k,O,_,K,w,A,D,F,j,N,U,V,G,B,H,z,Z){"use strict";const J=r.memo((function({children:e,dragKey:r,setDragKey:s,onReorder:n,rootRef:i,itemKey:a}){const l=o.useRef(null),c={itemOverlayFront:v.styles.reorderableItemOverlayFront,itemOverlayRear:v.styles.reorderableItemOverlayRear,itemDragger:v.styles.reorderableItemDragger},d=o.useCallback((e=>{e.dataTransfer?.setData("text/listview-items-key",JSON.stringify(a))}),[a]),{rootProps:u,isDragged:m,overlayZoneBeforeProps:f,overlayZoneAfterProps:y}=b.useReorderableItem({isDisabled:!n,dragKey:r,setDragKey:s,onReorder:n,rootRef:i,ref:l,getItem:()=>l?.current?.closest(M.LIST_ITEM_SELECTOR),setTransferData:d,itemStyles:c,itemSelector:M.LIST_ITEM_SELECTOR,isVertical:!0}),I=h.classNames([u?.class,v.styles.reorderableItemDnd]);return t.jsxs("div",{...u,class:I,children:[e,!m&&R.isKeyDefined(r)&&t.jsxs(t.Fragment,{children:[t.jsx("div",{...f}),t.jsx("div",{...y})]})]})}),((e,t)=>!(!e||!t)&&(e.children===t.children&&e.dragKey===t.dragKey)));function Y({contextMenuConfig:e,testId:r,contextMenuContext:o,...s}){const n=e.accessibleLabel;let i;if(s.isOpen){if(i=e.itemsRenderer(o),G.isMenuChildrenFalsy(i))return null}else i=null;return t.jsx(E.Menu,{...s,...n&&{"aria-label":n},testId:r,children:i})}const q={mouse:{initialFocus:"menu",placement:"bottom-start",offsetValue:0},keyboard:{initialFocus:"firstItem",placement:"bottom-start",offsetValue:0},touch:{initialFocus:"firstItem",placement:"end",offsetValue:40}},Q={isOpen:!1,initialFocus:"menu",placement:"bottom-start",offsetValue:0,anchorRef:{current:null}},W=r.forwardRef((({children:e,...r},s)=>{const{contextMenuConfig:n}=r,i=o.useRef(null),{currentItemOverride:a,updateCurrentItemOverride:l}=(e=>{const t=o.useRef(),r=o.useRef();r.current!==e&&(r.current=e,t.current=e);const s=o.useCallback((e=>{t.current={rowKey:e}}),[]);return{currentItemOverride:t.current,updateCurrentItemOverride:s}})(r.currentItemOverride),c=r.data?r.data.map((e=>({data:e,metadata:{key:r.getRowKey(e)}}))):null,f=r.onLoadMore?r.onLoadMore:()=>{},y=c?{offset:0,data:c,sizePrecision:r.hasMore?"atLeast":"exact",totalSize:c.length}:null;o.useImperativeHandle(s,(()=>({getScrollPosition:()=>i.current?m.getScrollPosition(i.current):{y:0},focus:()=>{i.current&&i.current.focus()}})));const I=null!=r.onReorder,{reorderProps:S,reorderItemProps:p,reorderContext:C,reorderInstructionsId:g,reorderInstructions:x}=(({onReorder:e,rootRef:t,viewportConfig:r})=>{const s=null!=e,[n,i]=o.useState(void 0),{reorderProps:a,reorderContext:l,reorderInstructionsId:c,reorderInstructions:d}=b.useReorderable({onReorder:e,rootRef:t,itemSelector:M.LIST_ITEM_SELECTOR,isDisabled:!s,columns:1}),u=o.useRef(!1);o.useEffect((()=>{if(s&&u.current){const e=t.current,o=T.findElementByKey(e,l.currentItemKey.current,M.LIST_ITEM_SELECTOR);if(o){const t=r?.scrollerRef.current||e;M.scrollToVisible(o,t,0),u.current=!1}}}));const m=o.useMemo((()=>({dragKey:n,setDragKey:i,onReorder:e,rootRef:t})),[n,e,t]);return s?{reorderProps:L.mergeProps({onKeyDown:e=>{s&&("ArrowUp"===e.key||"ArrowDown"===e.key)&&(e.metaKey||e.ctrlKey)&&e.shiftKey&&(u.current=!0,a.onKeyDown?.(e))},onDragOver:e=>{void 0!==n&&(u.current=!1,T.dragToScroll(e,void 0!==n,t.current))}}),reorderItemProps:m,reorderContext:l,reorderInstructionsId:c,reorderInstructions:d}:{reorderProps:a,reorderContext:l,reorderInstructionsId:c,reorderInstructions:d}})({onReorder:r.onReorder,rootRef:i,viewportConfig:r.viewportConfig}),{triggerProps:R,menuProps:h,contextMenuContext:v,notifyCurrentKeyChanged:E}=((e,t,r,s)=>{const[n,i]=o.useState(),[a,l]=o.useState(Q),c=o.useRef(),{triggerProps:d}=z.useContextMenuGesture((({gesture:t,anchor:o,target:n})=>{let a=o;if("keyboard"===t){a=T.findElementByKey(r.current,c.current,M.LIST_ITEM_SELECTOR)||o;const t=H.findItemContext(c.current,e);i(t)}else{const t=T.keyExtractor(n,M.LIST_ITEM_SELECTOR),r=H.findItemContext(t,e);i(r),s(t)}l({...q[t],anchorRef:{current:a},isOpen:!0})}),{isDisabled:!t}),u=o.useCallback((e=>{"dismissed"!==e.reason&&"itemAction"!==e.reason||r.current?.focus({preventScroll:!0}),l({...Q})}),[r]);return{menuProps:{...a,onClose:u},onClose:u,contextMenuContext:n,triggerProps:d,notifyCurrentKeyChanged:e=>{c.current=e.value}}})(y,n,i,l),P=e=>{r.onPersistCurrentItem?.(e),E(e)},k=o.useCallback((r=>t.jsx(J,{...p,itemKey:r.metadata.key,children:e(r)})),[e,p]);if(I&&p)return t.jsxs(t.Fragment,{children:[t.jsxs(d.ReorderableContext.Provider,{value:C,children:[t.jsx(m.List,{...r,"aria-describedby":g,contextMenuTriggerProps:R,reorderProps:S,onLoadRange:f,scrollerRef:i,data:y,currentItemOverride:a,onPersistCurrentItem:P,children:k}),t.jsx("span",{id:g,children:t.jsx(u.HiddenAccessible,{children:x})})]}),n&&t.jsx(Y,{...h,testId:r.testId?r.testId+"-menu":void 0,contextMenuConfig:n,contextMenuContext:v})]});return t.jsxs(t.Fragment,{children:[t.jsx(m.List,{...r,loadingIndicator:r.skeletonRenderer?(O=r.skeletonRenderer,t.jsx(m.SkeletonContainer,{minimumCount:25,children:e=>O({loadingStatus:"initial",index:e})})):void 0,loadMoreIndicator:r.skeletonRenderer?(e=>t.jsx("div",{class:Z.LOADMORE_STYLE_CLASS,children:t.jsx(m.SkeletonContainer,{minimumCount:3,children:t=>e({loadingStatus:"loadMore",index:t})})}))(r.skeletonRenderer):void 0,onLoadRange:f,scrollerRef:i,data:y,contextMenuTriggerProps:R,currentItemOverride:a,onPersistCurrentItem:P,children:e}),n&&t.jsx(Y,{...h,contextMenuConfig:n,contextMenuContext:v,testId:r.testId?r.testId+"-menu":void 0})]});var O}));e.ListView=W}));
|
|
2
|
-
//# sourceMappingURL=ListView-6d21e8f9.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', './List-daac1169', 'preact/hooks', './TabbableModeContext-a9c97640', './logger-0f873e29', './flexitem-5db48325', './PRIVATE_List/themes/ListStyles.css', './UNSAFE_GroupedList/themes/GroupedListStyles.css', 'module', './Flex-4b81b412', './Skeleton-3e52c94a'], (function(e,s,t,i,r,o,d,c,l,a,n,u){"use strict";e.VirtualizedListView=function(e){return s.jsx(t.List,{isVirtualized:!0,...e,children:e.children})}}));
|
|
2
|
-
//# sourceMappingURL=VirtualizedListView-1ae7151d.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
define(['exports', 'preact/jsx-runtime', './List-daac1169', 'preact/hooks', './TabbableModeContext-a9c97640', './logger-0f873e29', './flexitem-5db48325', './PRIVATE_List/themes/ListStyles.css', './UNSAFE_GroupedList/themes/GroupedListStyles.css', 'module', './Flex-4b81b412', './Skeleton-3e52c94a', './HighlightText-ee76c447', './Grid-caac1c86', 'css!./ListItemLayoutStyles.styles.css', './ListItemText-e9ce1931', './PRIVATE_SelectCommon/themes/dropdownStyles.css', './usePress-949a0d03', './CaretDown-9961d246', './classNames-08d99695', './useComponentTheme-5aa41a8f', './UNSAFE_ButtonLabelLayout/themes/redwood/ButtonLabelLayoutTheme', './useTestId-f4240cbd', './UNSAFE_BaseButton/themes/redwood/BaseButtonTheme', './CollectionInteractionContext-0b4ed98b', './Text-31cabc49', './useTranslationBundle-e4dd341e', './clientHints-6d361eaa', 'preact/compat', './keyboardUtils-fb6219eb', './tabbableUtils-f95361a6'], (function(e,t,n,s,a,o,r,l,i,c,d,u,p,m,h,y,b,w,f,S,C,v,x,T,D,g,K,k,I,L,E){"use strict";function R(e,t,n){if("string"!=typeof t)return t(e);{const s=e.data;if(null!=s&&Object.prototype.hasOwnProperty.call(s,t)){const e=s[t];return String(e)}o.error(`${n}: itemText specifies field that does not exist: ${t}`)}}const F=()=>{};const P=e=>0===e.button&&!e.ctrlKey,A=e=>{e.currentTarget===e.target&&e.preventDefault()},O=()=>{};e.DefaultList=function({"aria-label":e,componentName:a,currentItemVariant:o,currentKey:r,data:l,itemRenderer:i,itemText:c,onCurrentKeyChange:u,onItemAction:m,onLoadRange:h=F,onSelectionChange:w,searchText:f,selectedKeys:S,selectionMode:C}){const v=s.useCallback((e=>{const n={data:e.data,index:e.index,metadata:e.metadata,selector:e.selector,searchText:f,selectedKeys:S,onSelectionChange:({value:e})=>{w?.({value:e})}},s={data:e.data,key:e.metadata.key,metadata:e.metadata};return i?i(n):t.jsxs(d.Flex,{align:"center",children:[e.selector&&t.jsx("div",{class:b.dropdownStyles.selectorWrapper,children:e.selector()}),t.jsx("div",{class:"single"===C?b.dropdownStyles.singleSelectItem:b.dropdownStyles.multiSelectItem,children:t.jsx(y.ListItemText,{variant:"primary",children:t.jsx(p.HighlightText,{matchText:f,children:R(s,c,a)})})})]})}),[a,i,c,w,f,S,C]),x=s.useMemo((()=>({all:!1,keys:S??new Set})),[S]),T=s.useMemo((()=>void 0!==r?{rowKey:r}:void 0),[r]),D=s.useCallback((({context:{data:e,metadata:t}})=>{m?.({context:{data:e,key:t.key,metadata:t}})}),[m]),g=s.useCallback((({value:e})=>{w?.({value:new Set(e.keys?.values())})}),[w]);return t.jsx(n.List,{"aria-label":e,allowTabbableMode:!1,currentItemVariant:o,currentItemOverride:T,data:l??null,onPersistCurrentItem:u,onItemAction:D,onLoadRange:h,onSelectionChange:g,role:"listbox",selectedKeys:x,selectionMode:C,children:e=>v(e)})},e.DropdownArrow=function({isDisabled:e=!1,onClick:n,testId:a}){const{classes:o}=C.useComponentTheme(v.ButtonLabelLayoutRedwoodTheme,{size:"sm"}),{baseTheme:r}=C.useComponentTheme(T.BaseButtonRedwoodTheme),l=s.useCallback((e=>{e.preventDefault()}),[]),{pressProps:i}=w.usePress(n??O,{isDisabled:e}),c=S.classNames([o,r,b.dropdownStyles.arrow.base,e?b.dropdownStyles.arrow.disabled:b.dropdownStyles.arrow.enabled]),d=x.useTestId(a);return t.jsx("span",{"aria-hidden":"true",class:c,tabIndex:-1,onMouseDown:l,...d,...i,children:t.jsx(f.SvgCaretDown,{})})},e.DropdownList=function({children:e,id:n,dropdownListRef:s,hasTopGap:a=!0,hasBottomGap:o=!0,isLoading:r=!1,onKeyDown:l}){const i=S.classNames([b.dropdownStyles.list.base,a&&b.dropdownStyles.list.topGap,o&&b.dropdownStyles.list.bottomGap,r&&b.dropdownStyles.list.loading]);return t.jsx(D.CollectionInteractionContext.Provider,{value:"embedded",children:t.jsx("div",{ref:s,class:i,id:n,onMouseDown:A,onKeyDown:l,children:e})})},e.EmptyResults=function(){const e=K.useTranslationBundle("@oracle/oraclejet-preact");return t.jsx("div",{class:b.dropdownStyles.results.extraItem,onMouseDown:A,children:t.jsx(g.Text,{variant:"primary",children:e.select_noMatchesFound()})})},e.createKeysFromValueItems=function(e){const t=e?.reduce(((e,t)=>(e.add(t.key),e)),new Set);return t},e.isBeforeDataFetch=function(e){return"atLeast"===e.sizePrecision&&0===e.totalSize},e.isMobile=function(){const e=k.getClientHints().deviceType;return"phone"===e||"tablet"===e},e.isPhone=function(){return"phone"===k.getClientHints().deviceType},e.isSearchClearedFirstTime=function(e,t){return void 0===e&&""===t},e.isSearchTextEmptyOrUndefined=function(e){return void 0===e||0===e.length},e.isSimpleClick=P,e.isTablet=function(){return"tablet"===k.getClientHints().deviceType},e.preventDefault=e=>{e.preventDefault()},e.preventDefaultForCurrentTarget=A,e.renderItemText=R,e.useCollectionRenderer=function({currentKey:e,onCurrentKeyChange:t,onItemAction:n,onSelectedKeysChange:s,searchText:a,selectedKeys:o,selectedOnlyData:r}){return I.useMemo((()=>{const l={searchText:a,currentRowKeyOverride:e,onPersistCurrentRowKey:t,selected:o};return void 0!==n?{...l,onRowAction:n}:{...l,onSelectedChange:s,selectedOnlyData:r}}),[e,t,n,s,a,o,r])},e.useSelectCommon=function({data:e,inputRef:t,isFocused:n,onFilter:a}){const o=s.useRef(null),r=s.useRef(null),[l,i]=s.useState(!1),[c,d]=s.useState(!1),[u,p]=s.useState({rowKey:void 0}),m=s.useRef(),h=s.useCallback((e=>{m.current=e.rowKey,p(e)}),[]),[y,b]=s.useState(!1),[w,f]=s.useState(),[S,C]=s.useState(),[v,x]=s.useState(l),[T,D]=s.useState(n),[g,K]=s.useState(y),k=s.useCallback((e=>{!e.defaultPrevented&&P(e)&&(l||i(!0),setTimeout((function(){t.current?.focus()}),0))}),[t,l]),I=s.useCallback((()=>{i(!l),t.current?.focus()}),[t,l]),R=s.useCallback((e=>{if(l)switch(i(!1),e?.type){case"keydown":if(e.code===L.KEYS.ESC)t.current?.focus();break;case"mousedown":r.current?.contains(document.activeElement)&&t.current?.focus()}}),[t,l]),F=s.useCallback((e=>{d(e.placement.startsWith("top"))}),[]),A=s.useCallback((()=>l&&r.current?E.allTabbableElements(r.current):void 0),[l]),O=s.useCallback((t=>{if(l){if(null!=e){const t=A();t?.[0]?.focus(),void 0===u.rowKey&&h({rowKey:e.data[0]?.metadata?.key})}}else i(!0);t.preventDefault()}),[u,e,A,l,h]),j=s.useCallback((e=>{if(!L.isControlOrFunctionKey(e))switch(e.code){case L.KEYS.PAGE_UP:case L.KEYS.PAGE_DOWN:return void e.preventDefault();case L.KEYS.UP:case L.KEYS.DOWN:e.preventDefault();break;case L.KEYS.ESC:l&&(i(!1),e.preventDefault(),e.stopPropagation())}}),[l]),M=s.useCallback((e=>{if(!L.isControlOrFunctionKey(e))switch(e.code){case L.KEYS.UP:case L.KEYS.DOWN:O(e)}}),[O]),B=s.useCallback((e=>{l||i(!0),b(!0),f(e.value);const t=e.value;C(t),a?.({searchText:t})}),[l,a]),U=s.useCallback((e=>{m.current=e.value}),[]),G=s.useCallback((()=>{b(!1),f(""),C(void 0)}),[]),N=s.useCallback((e=>{b(!0),f(e),C(e)}),[]);return v===l&&T===n&&g===y||l||n||!y||G(),s.useEffect((()=>{l&&!y&&a?.({searchText:void 0})}),[l,y,a]),v!==l&&(l||d(!1),x(l)),T!==n&&D(n),g!==y&&K(y),{currentRowKeyRef:m,currentRowOverride:u,dropdownRef:r,getDropdownTabbableElems:A,handleDropdownArrowClick:I,handleDropdownAutoDismiss:R,handleDropdownPosition:F,handleInput:B,handleMainFieldKeyDown:j,handleMainFieldKeyUp:M,handleUpDownArrowKeys:O,isDropdownAbove:c,isDropdownOpen:l,isFocused:n||l,isUserFiltering:y,mainFieldRef:o,onCurrentKeyChange:U,onMouseDown:k,searchText:S,setCurrentRowOverride:h,setDropdownOpen:i,setUserInput:f,stopFiltering:G,updateFiltering:N,userInput:w}}}));
|
|
2
|
-
//# sourceMappingURL=useSelectCommon-a02ddf3c.js.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/* @oracle/oraclejet-preact: undefined */
|
|
2
|
-
import { jsx } from 'preact/jsx-runtime';
|
|
3
|
-
import { createContext, toChildArray } from 'preact';
|
|
4
|
-
import { useContext, useMemo } from 'preact/hooks';
|
|
5
|
-
import { forwardRef } from 'preact/compat';
|
|
6
|
-
import './FormContext-55fb8000.js';
|
|
7
|
-
import { u as useFormContext } from './useFormContext-bb9dc478.js';
|
|
8
|
-
import { F as FormFieldContext } from './FormFieldContext-47ca0c20.js';
|
|
9
|
-
import { u as useFormFieldContextProps } from './useFormFieldContextProps-31bbc12f.js';
|
|
10
|
-
import './CheckboxSetStyles.styles.css';
|
|
11
|
-
import { u as useId } from './useId-03dbfdf0.js';
|
|
12
|
-
import { F as Flex } from './Flex-03129963.js';
|
|
13
|
-
import { x as xUnits } from './utils-b1eb54f9.js';
|
|
14
|
-
import { C as CheckboxRadioField } from './CheckboxRadioField-a387b3cb.js';
|
|
15
|
-
|
|
16
|
-
const CheckboxSetContext = createContext({});
|
|
17
|
-
const useCheckboxSetContext = () => useContext(CheckboxSetContext);
|
|
18
|
-
|
|
19
|
-
var styles = {ul:'CheckboxSetStyles_styles_ul__68p6630'};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* A CheckboxSet allows the user to select one or more options from a set.
|
|
23
|
-
*/
|
|
24
|
-
const CheckboxSet = forwardRef(({ 'aria-describedby': ariaDescribedBy, assistiveText, columnSpan, direction = 'column', helpSourceLink, helpSourceText, isDisabled: propIsDisabled, isReadonly: propIsReadonly, isRequired = false, label, labelEdge: propLabelEdge, labelStartWidth: propLabelStartWidth, messages, onCommit, userAssistanceDensity: propUserAssistanceDensity, value, children, testId }, ref) => {
|
|
25
|
-
const hasValue = value !== undefined ? value.size > 0 : false;
|
|
26
|
-
const baseId = useId();
|
|
27
|
-
const { isDisabled: isFormDisabled, isReadonly: isFormReadonly, labelEdge: formLabelEdge, labelStartWidth: formLabelStartWidth, userAssistanceDensity: formUserAssistanceDensity } = useFormContext();
|
|
28
|
-
// default to FormContext values if component properties are not specified
|
|
29
|
-
const isDisabled = propIsDisabled ?? isFormDisabled;
|
|
30
|
-
const isReadonly = propIsReadonly ?? isFormReadonly;
|
|
31
|
-
const labelEdge = propLabelEdge ?? formLabelEdge;
|
|
32
|
-
const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;
|
|
33
|
-
const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;
|
|
34
|
-
const formFieldContext = useFormFieldContextProps({
|
|
35
|
-
hasValue,
|
|
36
|
-
isDisabled,
|
|
37
|
-
isReadonly
|
|
38
|
-
});
|
|
39
|
-
const checkboxSetContext = useMemo(() => ({
|
|
40
|
-
name: baseId,
|
|
41
|
-
value,
|
|
42
|
-
onCommit
|
|
43
|
-
}), [baseId, onCommit, value]);
|
|
44
|
-
// wrap each CheckboxItem in an <li> tag and the entire set with <ul>
|
|
45
|
-
const childrenArray = toChildArray(children).filter(Boolean);
|
|
46
|
-
const wrappedChildren = childrenArray.map((item) => jsx("li", { children: item }));
|
|
47
|
-
return (jsx(FormFieldContext.Provider, { value: formFieldContext, children: jsx(CheckboxRadioField, { "aria-describedby": ariaDescribedBy, assistiveText: assistiveText, baseId: baseId, columnSpan: columnSpan, helpSourceLink: helpSourceLink, helpSourceText: helpSourceText, isDisabled: isDisabled, isReadonly: isReadonly, isRequired: isRequired, label: label, labelEdge: labelEdge, labelStartWidth: labelStartWidth, parentComponentVariant: "checkboxSet", messages: messages, userAssistanceDensity: userAssistanceDensity, hasValue: hasValue, role: "group", testId: testId, ref: ref, children: jsx(CheckboxSetContext.Provider, { value: checkboxSetContext, children: jsx(Flex, { direction: direction, ...(direction === 'row' && { gap: [0, xUnits(8)], wrap: 'wrap' }), children: jsx("ul", { className: styles.ul, children: wrappedChildren }) }) }) }) }));
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
export { CheckboxSet as C, CheckboxSetContext as a, useCheckboxSetContext as u };
|
|
51
|
-
//# sourceMappingURL=CheckboxSet-3aab5935.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxSet-3aab5935.js","sources":["../../src/UNSAFE_CheckboxSet/CheckboxSetContext.ts","../../src/UNSAFE_CheckboxSet/CheckboxSet.tsx"],"sourcesContent":["import { createContext } from 'preact';\nimport { useContext } from 'preact/hooks';\n\nimport { ValueUpdateDetail } from '../utils/UNSAFE_valueUpdateDetail';\n\ntype CheckboxSetContextValue = {\n name: string;\n value?: Set<string | number>;\n onCommit?: (detail: ValueUpdateDetail<Set<string | number>>) => void;\n};\n\nconst CheckboxSetContext = createContext<CheckboxSetContextValue>({} as CheckboxSetContextValue);\nconst useCheckboxSetContext = () => useContext(CheckboxSetContext);\n\nexport { CheckboxSetContext, useCheckboxSetContext };\n","import { ComponentChildren, ComponentProps, Ref, toChildArray, JSX } from 'preact';\nimport { useMemo } from 'preact/hooks';\nimport { forwardRef } from 'preact/compat';\n\nimport { CheckboxSetContext } from './CheckboxSetContext';\nimport { CheckboxRadioField } from '#PRIVATE_CheckboxRadioField';\nimport { InlineUserAssistance, UserAssistanceDensityType } from '#UNSAFE_UserAssistance';\nimport { useFormContext } from '#hooks/UNSAFE_useFormContext';\nimport { FormFieldContext } from '#hooks/UNSAFE_useFormFieldContext';\nimport { useFormFieldContextProps } from '#hooks/UNSAFE_useFormFieldContextProps';\nimport { FlexboxProps } from '#utils/UNSAFE_interpolations/flexbox';\nimport { Size } from '#utils/UNSAFE_size';\nimport { ValueUpdateDetail } from '#utils/UNSAFE_valueUpdateDetail';\nimport { FocusableHandle } from '#hooks/UNSAFE_useFocusableTextField';\nimport { styles } from './CheckboxSetStyles.css';\nimport type { UnpackSignals } from '@oracle/oraclejet-internal-utilities/attributeUtils';\nimport { useId } from '#hooks/UNSAFE_useId';\nimport { LayoutColumnSpan } from '#utils/UNSAFE_styles/Layout';\nimport { TestIdProps } from '#hooks/UNSAFE_useTestId';\nimport { Flex } from '#UNSAFE_Flex';\nimport { xUnits } from '#UNSAFE_Theme';\n\ntype InlineUserAssistanceProps = ComponentProps<typeof InlineUserAssistance>;\n\ntype Props = {\n /**\n * The ID of an element (or space separated IDs of multiple elements) that\n * describes the input.\n */\n 'aria-describedby'?: UnpackSignals<JSX.AriaAttributes>['aria-describedby'];\n /**\n * Text to provide guidance to help the user understand what data to enter.\n */\n assistiveText?: InlineUserAssistanceProps['assistiveText'];\n /**\n * set of CheckboxItems\n */\n children: ComponentChildren;\n /**\n * Specifies how many columns to span in a FormLayout with direction === 'row'\n */\n columnSpan?: LayoutColumnSpan;\n /**\n * layout direction of the children elements\n */\n direction?: FlexboxProps['direction'];\n /**\n * Help source URL associated with the component.\n */\n helpSourceLink?: InlineUserAssistanceProps['helpSourceLink'];\n /**\n * Custom text to be rendered for the <code>helpSourceLink</code>.\n */\n helpSourceText?: InlineUserAssistanceProps['helpSourceText'];\n /**\n * Specifies whether the checkbox set requires a selection to be made.\n */\n isRequired?: boolean;\n /**\n * Specifies if the checkbox set is read-only.\n */\n isReadonly?: boolean;\n /**\n * Specifies if the checkbox set is disabled.\n */\n isDisabled?: boolean;\n /**\n * Label text for the group of checkbox items.\n */\n label: string;\n /**\n * Specifies where the label is positioned relative to the field.\n */\n labelEdge?: 'none' | 'top' | 'start' | 'inside';\n /**\n * Specifies the width of the label when <code>labelEdge</code> is <code>\"start\"</code>.\n */\n labelStartWidth?: Size;\n /**\n * Messages to show on screen that are associated with the component.\n */\n messages?: InlineUserAssistanceProps['messages'];\n /**\n * Callback invoked each time the user changes selected option.\n */\n onCommit: (detail: ValueUpdateDetail<Set<string | number>>) => void;\n /**\n * Specifies the density of the user assistance presentation. It can be set to:\n * <ul>\n * <li><code>'reflow'</code>: Show inline. Layout will reflow when text is displayed.</li>\n * <li><code>'efficient'</code>: Show inline and reserve space to prevent layout reflow when user\n * assistance text is displayed.</li>\n * <li><code>'compact'</code>: Show inline and reserve space to prevent layout reflow when user\n * assistance text is displayed.</li>\n * </ul>\n */\n userAssistanceDensity?: UserAssistanceDensityType;\n /**\n * Value of the selected checkbox option.\n */\n value?: Set<string | number>;\n} & TestIdProps;\n/**\n * A CheckboxSet allows the user to select one or more options from a set.\n */\nexport const CheckboxSet = forwardRef(\n (\n {\n 'aria-describedby': ariaDescribedBy,\n assistiveText,\n columnSpan,\n direction = 'column',\n helpSourceLink,\n helpSourceText,\n isDisabled: propIsDisabled,\n isReadonly: propIsReadonly,\n isRequired = false,\n label,\n labelEdge: propLabelEdge,\n labelStartWidth: propLabelStartWidth,\n messages,\n onCommit,\n userAssistanceDensity: propUserAssistanceDensity,\n value,\n children,\n testId\n }: Props,\n ref?: Ref<FocusableHandle>\n ) => {\n const hasValue = value !== undefined ? value.size > 0 : false;\n const baseId = useId();\n\n const {\n isDisabled: isFormDisabled,\n isReadonly: isFormReadonly,\n labelEdge: formLabelEdge,\n labelStartWidth: formLabelStartWidth,\n userAssistanceDensity: formUserAssistanceDensity\n } = useFormContext();\n\n // default to FormContext values if component properties are not specified\n const isDisabled = propIsDisabled ?? isFormDisabled;\n const isReadonly = propIsReadonly ?? isFormReadonly;\n const labelEdge = propLabelEdge ?? formLabelEdge;\n const labelStartWidth = propLabelStartWidth ?? formLabelStartWidth;\n const userAssistanceDensity = propUserAssistanceDensity ?? formUserAssistanceDensity;\n\n const formFieldContext = useFormFieldContextProps({\n hasValue,\n isDisabled,\n isReadonly\n });\n\n const checkboxSetContext = useMemo(\n () => ({\n name: baseId,\n value,\n onCommit\n }),\n [baseId, onCommit, value]\n );\n\n // wrap each CheckboxItem in an <li> tag and the entire set with <ul>\n const childrenArray = toChildArray(children).filter(Boolean);\n const wrappedChildren = childrenArray.map((item) => <li>{item}</li>);\n\n return (\n <FormFieldContext.Provider value={formFieldContext}>\n <CheckboxRadioField\n aria-describedby={ariaDescribedBy}\n assistiveText={assistiveText}\n baseId={baseId}\n columnSpan={columnSpan}\n helpSourceLink={helpSourceLink}\n helpSourceText={helpSourceText}\n isDisabled={isDisabled}\n isReadonly={isReadonly}\n isRequired={isRequired}\n label={label}\n labelEdge={labelEdge}\n labelStartWidth={labelStartWidth}\n parentComponentVariant=\"checkboxSet\"\n messages={messages}\n userAssistanceDensity={userAssistanceDensity}\n hasValue={hasValue}\n role=\"group\"\n testId={testId}\n ref={ref}>\n <CheckboxSetContext.Provider value={checkboxSetContext}>\n <Flex\n direction={direction}\n {...(direction === 'row' && { gap: [0, xUnits(8) as Size], wrap: 'wrap' })}>\n <ul className={styles.ul}>{wrappedChildren}</ul>\n </Flex>\n </CheckboxSetContext.Provider>\n </CheckboxRadioField>\n </FormFieldContext.Provider>\n );\n }\n);\n"],"names":["_jsx"],"mappings":"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"}
|