@react-spectrum/s2 1.4.0 → 1.5.1
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/exports/CenterBaseline.cjs +12 -0
- package/dist/exports/CenterBaseline.cjs.map +1 -0
- package/dist/exports/CenterBaseline.mjs +7 -0
- package/dist/exports/CenterBaseline.mjs.map +1 -0
- package/dist/exports/Skeleton.cjs +1 -0
- package/dist/exports/Skeleton.cjs.map +1 -1
- package/dist/exports/Skeleton.mjs +2 -2
- package/dist/exports/Skeleton.mjs.map +1 -1
- package/dist/exports/index.cjs +3 -0
- package/dist/exports/index.cjs.map +1 -1
- package/dist/exports/index.mjs +3 -1
- package/dist/exports/index.mjs.map +1 -1
- package/dist/private/Accordion.cjs +2 -2
- package/dist/private/Accordion.css +2 -2
- package/dist/private/Accordion.mjs +2 -2
- package/dist/private/ActionBar.cjs +59 -59
- package/dist/private/ActionBar.cjs.map +1 -1
- package/dist/private/ActionBar.css +58 -58
- package/dist/private/ActionBar.css.map +1 -1
- package/dist/private/ActionBar.mjs +59 -59
- package/dist/private/ActionBar.mjs.map +1 -1
- package/dist/private/ActionButton.cjs +247 -247
- package/dist/private/ActionButton.cjs.map +1 -1
- package/dist/private/ActionButton.css +169 -169
- package/dist/private/ActionButton.css.map +1 -1
- package/dist/private/ActionButton.mjs +247 -247
- package/dist/private/ActionButton.mjs.map +1 -1
- package/dist/private/ActionButtonGroup.cjs +15 -15
- package/dist/private/ActionButtonGroup.css +9 -9
- package/dist/private/ActionButtonGroup.mjs +15 -15
- package/dist/private/ActionMenu.cjs.map +1 -1
- package/dist/private/ActionMenu.mjs.map +1 -1
- package/dist/private/Add.cjs +10 -10
- package/dist/private/Add.css +6 -6
- package/dist/private/Add.mjs +10 -10
- package/dist/private/AlertDialog.cjs +3 -3
- package/dist/private/AlertDialog.cjs.map +1 -1
- package/dist/private/AlertDialog.css +3 -3
- package/dist/private/AlertDialog.css.map +1 -1
- package/dist/private/AlertDialog.mjs +3 -3
- package/dist/private/AlertDialog.mjs.map +1 -1
- package/dist/private/Asterisk.cjs +6 -6
- package/dist/private/Asterisk.css +4 -4
- package/dist/private/Asterisk.mjs +6 -6
- package/dist/private/Avatar.cjs +16 -16
- package/dist/private/Avatar.css +16 -16
- package/dist/private/Avatar.mjs +16 -16
- package/dist/private/AvatarGroup.cjs +120 -120
- package/dist/private/AvatarGroup.css +31 -31
- package/dist/private/AvatarGroup.mjs +120 -120
- package/dist/private/Badge.cjs +197 -197
- package/dist/private/Badge.css +125 -125
- package/dist/private/Badge.mjs +197 -197
- package/dist/private/Breadcrumbs.cjs +234 -234
- package/dist/private/Breadcrumbs.cjs.map +1 -1
- package/dist/private/Breadcrumbs.css +100 -100
- package/dist/private/Breadcrumbs.css.map +1 -1
- package/dist/private/Breadcrumbs.mjs +234 -234
- package/dist/private/Breadcrumbs.mjs.map +1 -1
- package/dist/private/Button.cjs +335 -326
- package/dist/private/Button.cjs.map +1 -1
- package/dist/private/Button.css +176 -172
- package/dist/private/Button.css.map +1 -1
- package/dist/private/Button.mjs +335 -326
- package/dist/private/Button.mjs.map +1 -1
- package/dist/private/ButtonGroup.cjs +23 -20
- package/dist/private/ButtonGroup.cjs.map +1 -1
- package/dist/private/ButtonGroup.css +19 -15
- package/dist/private/ButtonGroup.css.map +1 -1
- package/dist/private/ButtonGroup.mjs +23 -20
- package/dist/private/ButtonGroup.mjs.map +1 -1
- package/dist/private/Calendar.cjs +232 -232
- package/dist/private/Calendar.cjs.map +1 -1
- package/dist/private/Calendar.css +149 -149
- package/dist/private/Calendar.css.map +1 -1
- package/dist/private/Calendar.mjs +232 -232
- package/dist/private/Calendar.mjs.map +1 -1
- package/dist/private/Card.cjs +309 -309
- package/dist/private/Card.css +206 -206
- package/dist/private/Card.mjs +309 -309
- package/dist/private/CardView.cjs +17 -17
- package/dist/private/CardView.css +17 -17
- package/dist/private/CardView.mjs +17 -17
- package/dist/private/CenterBaseline.cjs +1 -1
- package/dist/private/CenterBaseline.cjs.map +1 -1
- package/dist/private/CenterBaseline.css +2 -2
- package/dist/private/CenterBaseline.css.map +1 -1
- package/dist/private/CenterBaseline.mjs +1 -1
- package/dist/private/CenterBaseline.mjs.map +1 -1
- package/dist/private/Checkbox.cjs +188 -188
- package/dist/private/Checkbox.css +110 -110
- package/dist/private/Checkbox.mjs +188 -188
- package/dist/private/CheckboxGroup.cjs +43 -43
- package/dist/private/CheckboxGroup.css +37 -37
- package/dist/private/CheckboxGroup.mjs +43 -43
- package/dist/private/Checkmark.cjs +12 -12
- package/dist/private/Checkmark.css +8 -8
- package/dist/private/Checkmark.mjs +12 -12
- package/dist/private/Chevron.cjs +12 -12
- package/dist/private/Chevron.css +10 -10
- package/dist/private/Chevron.mjs +12 -12
- package/dist/private/ClearButton.cjs +30 -30
- package/dist/private/ClearButton.css +30 -30
- package/dist/private/ClearButton.mjs +30 -30
- package/dist/private/CloseButton.cjs +52 -52
- package/dist/private/CloseButton.cjs.map +1 -1
- package/dist/private/CloseButton.css +46 -46
- package/dist/private/CloseButton.css.map +1 -1
- package/dist/private/CloseButton.mjs +52 -52
- package/dist/private/CloseButton.mjs.map +1 -1
- package/dist/private/ColorArea.cjs +16 -16
- package/dist/private/ColorArea.css +16 -16
- package/dist/private/ColorArea.mjs +16 -16
- package/dist/private/ColorField.cjs +31 -31
- package/dist/private/ColorField.css +27 -27
- package/dist/private/ColorField.mjs +31 -31
- package/dist/private/ColorHandle.cjs +27 -27
- package/dist/private/ColorHandle.css +42 -42
- package/dist/private/ColorHandle.mjs +27 -27
- package/dist/private/ColorSlider.cjs +108 -108
- package/dist/private/ColorSlider.css +52 -52
- package/dist/private/ColorSlider.mjs +108 -108
- package/dist/private/ColorSwatch.cjs +29 -29
- package/dist/private/ColorSwatch.css +29 -29
- package/dist/private/ColorSwatch.mjs +29 -29
- package/dist/private/ColorSwatchPicker.cjs +29 -29
- package/dist/private/ColorSwatchPicker.css +48 -48
- package/dist/private/ColorSwatchPicker.mjs +29 -29
- package/dist/private/ColorWheel.cjs +26 -26
- package/dist/private/ColorWheel.css +17 -17
- package/dist/private/ColorWheel.mjs +26 -26
- package/dist/private/ComboBox.cjs +381 -381
- package/dist/private/ComboBox.cjs.map +1 -1
- package/dist/private/ComboBox.css +188 -188
- package/dist/private/ComboBox.css.map +1 -1
- package/dist/private/ComboBox.mjs +381 -381
- package/dist/private/ComboBox.mjs.map +1 -1
- package/dist/private/ContextualHelp.cjs +5 -5
- package/dist/private/ContextualHelp.cjs.map +1 -1
- package/dist/private/ContextualHelp.css +50 -50
- package/dist/private/ContextualHelp.css.map +1 -1
- package/dist/private/ContextualHelp.mjs +5 -5
- package/dist/private/ContextualHelp.mjs.map +1 -1
- package/dist/private/CornerTriangle.cjs +8 -8
- package/dist/private/CornerTriangle.css +6 -6
- package/dist/private/CornerTriangle.mjs +8 -8
- package/dist/private/Cross.cjs +14 -14
- package/dist/private/Cross.css +10 -10
- package/dist/private/Cross.mjs +14 -14
- package/dist/private/CustomDialog.cjs +25 -25
- package/dist/private/CustomDialog.css +25 -25
- package/dist/private/CustomDialog.mjs +25 -25
- package/dist/private/Dash.cjs +10 -10
- package/dist/private/Dash.css +6 -6
- package/dist/private/Dash.mjs +10 -10
- package/dist/private/DateField.cjs +73 -73
- package/dist/private/DateField.css +77 -77
- package/dist/private/DateField.mjs +73 -73
- package/dist/private/DatePicker.cjs +172 -172
- package/dist/private/DatePicker.cjs.map +1 -1
- package/dist/private/DatePicker.css +128 -128
- package/dist/private/DatePicker.css.map +1 -1
- package/dist/private/DatePicker.mjs +172 -172
- package/dist/private/DatePicker.mjs.map +1 -1
- package/dist/private/DateRangePicker.cjs +55 -55
- package/dist/private/DateRangePicker.cjs.map +1 -1
- package/dist/private/DateRangePicker.css +59 -59
- package/dist/private/DateRangePicker.css.map +1 -1
- package/dist/private/DateRangePicker.mjs +55 -55
- package/dist/private/DateRangePicker.mjs.map +1 -1
- package/dist/private/Dialog.cjs +17 -17
- package/dist/private/Dialog.css +70 -70
- package/dist/private/Dialog.mjs +17 -17
- package/dist/private/Disclosure.cjs +144 -122
- package/dist/private/Disclosure.cjs.map +1 -1
- package/dist/private/Disclosure.css +112 -112
- package/dist/private/Disclosure.css.map +1 -1
- package/dist/private/Disclosure.mjs +144 -122
- package/dist/private/Disclosure.mjs.map +1 -1
- package/dist/private/Divider.cjs +25 -25
- package/dist/private/Divider.css +25 -25
- package/dist/private/Divider.mjs +25 -25
- package/dist/private/DragHandle.cjs +8 -8
- package/dist/private/DragHandle.css +6 -6
- package/dist/private/DragHandle.mjs +8 -8
- package/dist/private/DragPreview.cjs +154 -154
- package/dist/private/DragPreview.css +106 -106
- package/dist/private/DragPreview.mjs +154 -154
- package/dist/private/DropZone.cjs +61 -61
- package/dist/private/DropZone.cjs.map +1 -1
- package/dist/private/DropZone.css +57 -57
- package/dist/private/DropZone.css.map +1 -1
- package/dist/private/DropZone.mjs +61 -61
- package/dist/private/DropZone.mjs.map +1 -1
- package/dist/private/Field.cjs +360 -360
- package/dist/private/Field.cjs.map +1 -1
- package/dist/private/Field.css +160 -160
- package/dist/private/Field.css.map +1 -1
- package/dist/private/Field.mjs +360 -360
- package/dist/private/Field.mjs.map +1 -1
- package/dist/private/Form.cjs +9 -9
- package/dist/private/Form.css +9 -9
- package/dist/private/Form.mjs +9 -9
- package/dist/private/FullscreenDialog.cjs +5 -5
- package/dist/private/FullscreenDialog.css +78 -78
- package/dist/private/FullscreenDialog.mjs +5 -5
- package/dist/private/IllustratedMessage.cjs +228 -228
- package/dist/private/IllustratedMessage.css +72 -72
- package/dist/private/IllustratedMessage.mjs +228 -228
- package/dist/private/Image.cjs +14 -14
- package/dist/private/Image.css +14 -14
- package/dist/private/Image.mjs +14 -14
- package/dist/private/InlineAlert.cjs +100 -100
- package/dist/private/InlineAlert.cjs.map +1 -1
- package/dist/private/InlineAlert.css +76 -76
- package/dist/private/InlineAlert.css.map +1 -1
- package/dist/private/InlineAlert.mjs +100 -100
- package/dist/private/InlineAlert.mjs.map +1 -1
- package/dist/private/LabeledValue.cjs +134 -134
- package/dist/private/LabeledValue.css +63 -63
- package/dist/private/LabeledValue.mjs +134 -134
- package/dist/private/Link.cjs +49 -49
- package/dist/private/Link.css +41 -41
- package/dist/private/Link.mjs +49 -49
- package/dist/private/LinkOut.cjs +8 -8
- package/dist/private/LinkOut.css +8 -8
- package/dist/private/LinkOut.mjs +8 -8
- package/dist/private/ListView.cjs +245 -245
- package/dist/private/ListView.cjs.map +1 -1
- package/dist/private/ListView.css +177 -177
- package/dist/private/ListView.css.map +1 -1
- package/dist/private/ListView.mjs +245 -245
- package/dist/private/ListView.mjs.map +1 -1
- package/dist/private/Menu.cjs +446 -446
- package/dist/private/Menu.cjs.map +1 -1
- package/dist/private/Menu.css +196 -196
- package/dist/private/Menu.css.map +1 -1
- package/dist/private/Menu.mjs +446 -446
- package/dist/private/Menu.mjs.map +1 -1
- package/dist/private/Meter.cjs +153 -153
- package/dist/private/Meter.css +91 -91
- package/dist/private/Meter.mjs +153 -153
- package/dist/private/Modal.cjs +74 -74
- package/dist/private/Modal.css +59 -59
- package/dist/private/Modal.mjs +74 -74
- package/dist/private/NotificationBadge.cjs +56 -56
- package/dist/private/NotificationBadge.cjs.map +1 -1
- package/dist/private/NotificationBadge.css +49 -49
- package/dist/private/NotificationBadge.css.map +1 -1
- package/dist/private/NotificationBadge.mjs +56 -56
- package/dist/private/NotificationBadge.mjs.map +1 -1
- package/dist/private/NumberField.cjs +114 -114
- package/dist/private/NumberField.css +99 -99
- package/dist/private/NumberField.mjs +114 -114
- package/dist/private/Picker.cjs +275 -275
- package/dist/private/Picker.cjs.map +1 -1
- package/dist/private/Picker.css +173 -173
- package/dist/private/Picker.css.map +1 -1
- package/dist/private/Picker.mjs +275 -275
- package/dist/private/Picker.mjs.map +1 -1
- package/dist/private/Popover.cjs +95 -95
- package/dist/private/Popover.cjs.map +1 -1
- package/dist/private/Popover.css +75 -75
- package/dist/private/Popover.css.map +1 -1
- package/dist/private/Popover.mjs +95 -95
- package/dist/private/Popover.mjs.map +1 -1
- package/dist/private/ProgressBar.cjs +163 -163
- package/dist/private/ProgressBar.css +99 -99
- package/dist/private/ProgressBar.mjs +163 -163
- package/dist/private/ProgressCircle.cjs +34 -31
- package/dist/private/ProgressCircle.cjs.map +1 -1
- package/dist/private/ProgressCircle.css +24 -24
- package/dist/private/ProgressCircle.css.map +1 -1
- package/dist/private/ProgressCircle.mjs +34 -31
- package/dist/private/ProgressCircle.mjs.map +1 -1
- package/dist/private/Provider.cjs +19 -19
- package/dist/private/Provider.css +15 -15
- package/dist/private/Provider.mjs +19 -19
- package/dist/private/RadioGroup.cjs +208 -208
- package/dist/private/RadioGroup.css +113 -113
- package/dist/private/RadioGroup.mjs +208 -208
- package/dist/private/RangeCalendar.cjs +16 -16
- package/dist/private/RangeCalendar.cjs.map +1 -1
- package/dist/private/RangeCalendar.css +17 -17
- package/dist/private/RangeCalendar.css.map +1 -1
- package/dist/private/RangeCalendar.mjs +16 -16
- package/dist/private/RangeCalendar.mjs.map +1 -1
- package/dist/private/RangeSlider.cjs.map +1 -1
- package/dist/private/RangeSlider.mjs.map +1 -1
- package/dist/private/SearchField.cjs +41 -41
- package/dist/private/SearchField.css +45 -45
- package/dist/private/SearchField.mjs +41 -41
- package/dist/private/SegmentedControl.cjs +178 -178
- package/dist/private/SegmentedControl.css +123 -123
- package/dist/private/SegmentedControl.mjs +178 -178
- package/dist/private/SelectBoxGroup.cjs +142 -142
- package/dist/private/SelectBoxGroup.css +120 -120
- package/dist/private/SelectBoxGroup.mjs +142 -142
- package/dist/private/Slider.cjs +292 -292
- package/dist/private/Slider.css +159 -159
- package/dist/private/Slider.mjs +292 -292
- package/dist/private/StatusLight.cjs +115 -115
- package/dist/private/StatusLight.css +59 -59
- package/dist/private/StatusLight.mjs +115 -115
- package/dist/private/Switch.cjs +171 -171
- package/dist/private/Switch.css +85 -85
- package/dist/private/Switch.mjs +171 -171
- package/dist/private/TableView.cjs +551 -534
- package/dist/private/TableView.cjs.map +1 -1
- package/dist/private/TableView.css +329 -303
- package/dist/private/TableView.css.map +1 -1
- package/dist/private/TableView.mjs +551 -534
- package/dist/private/TableView.mjs.map +1 -1
- package/dist/private/Tabs.cjs +131 -125
- package/dist/private/Tabs.cjs.map +1 -1
- package/dist/private/Tabs.css +105 -105
- package/dist/private/Tabs.css.map +1 -1
- package/dist/private/Tabs.mjs +131 -125
- package/dist/private/Tabs.mjs.map +1 -1
- package/dist/private/TabsPicker.cjs +127 -127
- package/dist/private/TabsPicker.css +108 -108
- package/dist/private/TabsPicker.mjs +127 -127
- package/dist/private/TagGroup.cjs +203 -203
- package/dist/private/TagGroup.cjs.map +1 -1
- package/dist/private/TagGroup.css +146 -146
- package/dist/private/TagGroup.css.map +1 -1
- package/dist/private/TagGroup.mjs +203 -203
- package/dist/private/TagGroup.mjs.map +1 -1
- package/dist/private/TextField.cjs +58 -58
- package/dist/private/TextField.css +54 -54
- package/dist/private/TextField.mjs +58 -58
- package/dist/private/TimeField.cjs +51 -51
- package/dist/private/TimeField.css +47 -47
- package/dist/private/TimeField.mjs +51 -51
- package/dist/private/Toast.cjs +120 -120
- package/dist/private/Toast.cjs.map +1 -1
- package/dist/private/Toast.css +110 -110
- package/dist/private/Toast.css.map +1 -1
- package/dist/private/Toast.mjs +120 -120
- package/dist/private/Toast.mjs.map +1 -1
- package/dist/private/ToggleButton.cjs +16 -16
- package/dist/private/ToggleButton.css +23 -23
- package/dist/private/ToggleButton.mjs +16 -16
- package/dist/private/Tooltip.cjs +86 -86
- package/dist/private/Tooltip.css +70 -70
- package/dist/private/Tooltip.mjs +86 -86
- package/dist/private/TreeView.cjs +229 -229
- package/dist/private/TreeView.cjs.map +1 -1
- package/dist/private/TreeView.css +184 -184
- package/dist/private/TreeView.css.map +1 -1
- package/dist/private/TreeView.mjs +229 -229
- package/dist/private/TreeView.mjs.map +1 -1
- package/dist/private/dnd-utils.cjs +42 -42
- package/dist/private/dnd-utils.css +39 -39
- package/dist/private/dnd-utils.mjs +42 -42
- package/dist/types/exports/CenterBaseline.d.ts +1 -0
- package/dist/types/exports/Skeleton.d.ts +1 -1
- package/dist/types/exports/index.d.ts +1 -0
- package/dist/types/src/CenterBaseline.d.ts +17 -0
- package/dist/types/src/ContextualHelp.d.ts +1 -1
- package/dist/types/src/Disclosure.d.ts +6 -1
- package/dist/types/src/ListView.d.ts +1 -1
- package/dist/types/src/Menu.d.ts +1 -1
- package/dist/types/src/Popover.d.ts +2 -2
- package/dist/types/src/style-utils.d.ts +4 -1
- package/exports/CenterBaseline.ts +1 -0
- package/exports/Skeleton.ts +1 -1
- package/exports/index.ts +2 -0
- package/icons/Icon.cjs +10 -10
- package/icons/Icon.css +9 -9
- package/icons/Icon.mjs +10 -10
- package/icons/Skeleton.cjs +2 -2
- package/icons/Skeleton.css +6 -6
- package/icons/Skeleton.mjs +2 -2
- package/package.json +6 -6
- package/src/ActionBar.tsx +0 -1
- package/src/ActionButton.tsx +0 -1
- package/src/ActionMenu.tsx +0 -1
- package/src/AlertDialog.tsx +0 -1
- package/src/Breadcrumbs.tsx +0 -4
- package/src/Button.tsx +12 -3
- package/src/ButtonGroup.tsx +1 -0
- package/src/Calendar.tsx +0 -1
- package/src/CenterBaseline.tsx +17 -0
- package/src/CloseButton.tsx +0 -1
- package/src/ComboBox.tsx +0 -1
- package/src/ContextualHelp.tsx +1 -2
- package/src/DatePicker.tsx +0 -1
- package/src/DateRangePicker.tsx +0 -1
- package/src/Disclosure.tsx +92 -79
- package/src/DropZone.tsx +0 -1
- package/src/Field.tsx +0 -1
- package/src/InlineAlert.tsx +0 -1
- package/src/ListView.tsx +0 -2
- package/src/Menu.tsx +1 -8
- package/src/NotificationBadge.tsx +0 -1
- package/src/Picker.tsx +0 -1
- package/src/Popover.tsx +2 -1
- package/src/ProgressCircle.tsx +1 -1
- package/src/RangeCalendar.tsx +0 -1
- package/src/RangeSlider.tsx +0 -1
- package/src/TableView.tsx +75 -37
- package/src/Tabs.tsx +9 -2
- package/src/TagGroup.tsx +0 -1
- package/src/Toast.tsx +0 -3
- package/src/TreeView.tsx +0 -1
- package/src/style-utils.ts +13 -2
- package/style/__tests__/style-macro.test.js +73 -71
- package/style/dist/main.cjs +25 -25
- package/style/dist/module.mjs +13 -13
- package/style/dist/properties.mjs +3 -3
- package/style/dist/spectrum-theme.cjs +224 -224
- package/style/dist/spectrum-theme.mjs +217 -217
- package/style/dist/style-macro.cjs +100 -100
- package/style/dist/style-macro.mjs +94 -94
- package/style/dist/style-utils.cjs +51 -39
- package/style/dist/style-utils.cjs.map +1 -1
- package/style/dist/style-utils.mjs +50 -38
- package/style/dist/style-utils.mjs.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwIM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA0E;AAExF,IAAI,8DAA0B,CAAA,GAAA,oBAAY,EAMvC,CAAC;AAEJ,MAAM;;;;;;;;;;;;;;;;;;;;;;;AAkBN,oGAAoG;AACpG,8FAA8F;AAC9F,6FAA6F;AAC7F,MAAM;AAiBN,oEAAoE;AACpE,MAAM,4CAAsB;AAE5B,MAAM;AACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CC,MAAM,kDAAwB,CAAA,GAAA,iBAAS;IAC5C,wBAAwB,MAAsB,EAAc;QAC1D,IAAI,aAAa,KAAK,CAAC,wBAAwB;QAC/C,WAAW,MAAM,GAAG;QACpB,WAAW,aAAa,GAAG;QAC3B,OAAO;IACT;AACF;AAMO,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAA2B;IAE3B,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAA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,OAAO,KAAK,GAAG,KAAK,KAAK;AAClC","sources":["packages/@react-spectrum/s2/src/ListView.tsx"],"sourcesContent":["/*\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {ActionMenuContext} from './ActionMenu';\nimport {\n baseColor,\n color,\n colorMix,\n focusRing,\n fontRelative,\n space,\n style\n} from '../style' with {type: 'macro'};\nimport {centerBaseline} from './CenterBaseline';\nimport {Checkbox} from './Checkbox';\nimport {CheckboxContext} from 'react-aria-components/Checkbox';\nimport Chevron from '../ui-icons/Chevron';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionRendererContext,\n DefaultCollectionRenderer\n} from 'react-aria-components/CollectionBuilder';\nimport {\n ContextValue,\n DEFAULT_SLOT,\n Provider,\n SlotProps,\n useSlottedContext\n} from 'react-aria-components/slots';\nimport {\n controlFont,\n getAllowedOverrides,\n StylesPropWithHeight,\n UnsafeStyles\n} from './style-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactElement, ReactNode, useContext, useRef} from 'react';\nimport {css} from '../style/style-macro' with {type: 'macro'};\nimport {description, DragPreview, icon, iconCenterWrapper, label} from './DragPreview';\nimport {\n DOMProps,\n DOMRef,\n DOMRefValue,\n forwardRefType,\n GlobalDOMAttributes,\n ItemDropTarget,\n LoadingState\n} from '@react-types/shared';\nimport {DragHandleButton, InsertionIndicator} from './dnd-utils';\nimport {\n GridList,\n GridListItem,\n GridListItemProps,\n GridListItemRenderProps,\n GridListLoadMoreItem,\n GridListProps,\n GridListRenderProps\n} from 'react-aria-components/GridList';\nimport {IconContext} from './Icon';\nimport {ImageContext} from './Image';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {Key} from '@react-types/shared';\nimport {LayoutInfo, Virtualizer} from 'react-aria-components/Virtualizer';\nimport LinkOutIcon from '../ui-icons/LinkOut';\nimport {ListLayout} from 'react-stately/useVirtualizerState';\nimport type {ListState} from 'react-stately/useListState';\nimport {ProgressCircle} from './ProgressCircle';\nimport {Text, TextContext} from './Content';\nimport {useActionBarContainer} from './ActionBar';\nimport {useDOMRef} from './useDOMRef';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useScale} from './utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ListViewProps<T>\n extends\n Omit<\n GridListProps<T>,\n | 'className'\n | 'style'\n | 'children'\n | 'selectionBehavior'\n | 'layout'\n | 'render'\n | 'keyboardNavigationBehavior'\n | 'orientation'\n | keyof GlobalDOMAttributes\n >,\n DOMProps,\n UnsafeStyles,\n ListViewStylesProps,\n SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight;\n /** The current loading state of the ListView. */\n loadingState?: LoadingState;\n /** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */\n onLoadMore?: () => void;\n /** The children of the ListView. */\n children: ReactNode | ((item: T) => ReactNode);\n /** Provides the ActionBar to display when items are selected in the ListView. */\n renderActionBar?: (selectedKeys: 'all' | Set<Key>) => ReactElement;\n /** Hides the default link out icons on items that open links in a new tab. */\n hideLinkOutIcon?: boolean;\n}\n\ninterface ListViewStylesProps {\n /** Whether the ListView should be displayed with a quiet style. */\n isQuiet?: boolean;\n /**\n * How selection should be displayed.\n *\n * @default 'checkbox'\n */\n selectionStyle?: 'highlight' | 'checkbox';\n /**\n * Sets the overflow behavior for item contents.\n *\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate';\n}\n\nexport interface ListViewItemProps extends Omit<\n GridListItemProps,\n 'children' | 'className' | 'style' | 'render' | 'onClick' | keyof GlobalDOMAttributes\n> {\n /**\n * The contents of the item.\n */\n children: ReactNode;\n /** Whether the item has child items (renders a chevron indicator). */\n hasChildItems?: boolean;\n}\n\nexport const ListViewContext =\n createContext<ContextValue<Partial<ListViewProps<any>>, DOMRefValue<HTMLDivElement>>>(null);\n\nlet InternalListViewContext = createContext<{\n isQuiet?: boolean;\n selectionStyle?: 'highlight' | 'checkbox';\n overflowMode?: 'wrap' | 'truncate';\n scale?: 'medium' | 'large';\n hideLinkOutIcon?: boolean;\n}>({});\n\nconst listViewWrapper = style(\n {\n minHeight: 0,\n minWidth: 200,\n display: 'flex',\n isolation: 'isolate',\n disableTapHighlight: true,\n position: 'relative',\n // Clip ActionBar animation.\n overflow: 'clip',\n '--root-drop-radius': {\n type: 'borderTopStartRadius',\n value: 'default'\n }\n },\n getAllowedOverrides({height: true})\n);\n\n// similar to tableview, use this approach so we can actually have a 2px outline when root dropping.\n// cant do a external box shadow due to the clipping that is applied on the wrapper element...\n// an inset box shadow runs into problems with the item background clipping the box shadow...\nconst rootDropOutline = css(`\n &:has([role=\"grid\"][data-drop-target])::after {\n content: \"\";\n position: absolute;\n inset: 0;\n pointer-events: none;\n border: 2px solid ${color('blue-800')};\n border-radius: var(--root-drop-radius);\n z-index: 2;\n }\n @media (forced-colors: active) {\n &:has([role=\"grid\"][data-drop-target])::after {\n border-color: Highlight;\n }\n }\n`);\n\n// When any row has a trailing icon, reserve space so actions align.\nconst hasTrailingIconRows = ':has([data-has-trailing-icon]) [role=\"row\"]';\n\nconst dropTargetBackground = colorMix('gray-25', 'blue-900', 10);\nconst listView = style<GridListRenderProps & {isQuiet?: boolean; isDropTarget?: boolean}>({\n ...focusRing(),\n outlineOffset: {\n default: -2,\n isQuiet: -1\n },\n userSelect: 'none',\n minHeight: 0,\n minWidth: 0,\n width: 'full',\n height: 'full',\n boxSizing: 'border-box',\n overflow: 'auto',\n fontSize: controlFont(),\n backgroundColor: {\n default: 'gray-25',\n isQuiet: 'transparent',\n isDropTarget: {\n default: dropTargetBackground,\n forcedColors: 'Background'\n }\n },\n borderRadius: {\n default: 'default',\n isQuiet: 'none'\n },\n borderColor: {\n default: 'gray-300',\n forcedColors: 'ButtonBorder'\n },\n borderWidth: {\n default: 1,\n isQuiet: 0\n },\n borderStyle: 'solid',\n forcedColorAdjust: 'none',\n '--trailing-icon-width': {\n type: 'width',\n value: {\n default: 'auto',\n [hasTrailingIconRows]: fontRelative(20)\n }\n }\n});\n\nexport class S2ListLayout<T> extends ListLayout<T> {\n getDropTargetLayoutInfo(target: ItemDropTarget): LayoutInfo {\n let layoutInfo = super.getDropTargetLayoutInfo(target);\n layoutInfo.zIndex = 1;\n layoutInfo.allowOverflow = true;\n return layoutInfo;\n }\n}\n\n/**\n * A ListView displays a list of interactive items, and allows a user to navigate, select, or\n * perform an action.\n */\nexport const ListView = /*#__PURE__*/ (forwardRef as forwardRefType)(function ListView<T>(\n props: ListViewProps<T>,\n ref: DOMRef<HTMLDivElement>\n) {\n [props, ref] = useSpectrumContextProps(props, ref, ListViewContext);\n let {\n children,\n isQuiet,\n selectionStyle = 'checkbox',\n overflowMode = 'truncate',\n loadingState,\n onLoadMore,\n renderEmptyState: userRenderEmptyState,\n hideLinkOutIcon = false,\n dragAndDropHooks,\n ...otherProps\n } = props;\n let scale = useScale();\n\n if (dragAndDropHooks && dragAndDropHooks.renderDragPreview == null) {\n dragAndDropHooks.renderDragPreview = items => (\n <DragPreview items={items} overflowMode={overflowMode} />\n );\n }\n\n if (dragAndDropHooks) {\n dragAndDropHooks.renderDropIndicator = target => (\n <InsertionIndicator target={target as ItemDropTarget} />\n );\n }\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let rowHeight = scale === 'large' ? 50 : 40;\n\n let domRef = useDOMRef(ref);\n let scrollRef = useRef<HTMLElement | null>(null);\n\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let renderEmptyState: ListViewProps<T>['renderEmptyState'] | undefined;\n if (userRenderEmptyState != null && !isLoading) {\n renderEmptyState = renderProps => (\n <div className={emptyStateWrapper}>\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {userRenderEmptyState!(renderProps)}\n </CollectionRendererContext.Provider>\n </div>\n );\n } else if (loadingState === 'loading') {\n renderEmptyState = () => (\n <div className={centeredWrapper}>\n <div className={loadingSpinnerWrapper}>\n <ProgressCircle isIndeterminate aria-label={stringFormatter.format('table.loading')} />\n </div>\n </div>\n );\n }\n\n let loadMoreSpinner = onLoadMore ? (\n <GridListLoadMoreItem\n isLoading={loadingState === 'loadingMore'}\n onLoadMore={onLoadMore}\n className={style({height: 'full', width: 'full', paddingY: 8})}>\n <div className={centeredWrapper}>\n <div className={loadingSpinnerWrapper}>\n <ProgressCircle\n isIndeterminate\n aria-label={stringFormatter.format('table.loadingMore')}\n />\n </div>\n </div>\n </GridListLoadMoreItem>\n ) : null;\n\n let wrappedChildren: ReactNode;\n let gridListProps = otherProps;\n if (typeof children === 'function' && otherProps.items) {\n let {items, dependencies = [], ...rest} = otherProps;\n gridListProps = rest;\n wrappedChildren = (\n <>\n <Collection items={items} dependencies={dependencies}>\n {children}\n </Collection>\n {loadMoreSpinner}\n </>\n );\n } else {\n wrappedChildren = (\n <>\n {children}\n {loadMoreSpinner}\n </>\n );\n }\n\n let {selectedKeys, onSelectionChange, actionBar, actionBarHeight} = useActionBarContainer({\n ...props,\n scrollRef\n });\n\n return (\n <div\n ref={domRef}\n className={\n (props.UNSAFE_className || '') + listViewWrapper(null, props.styles) + ' ' + rootDropOutline\n }\n style={props.UNSAFE_style}>\n <Virtualizer\n layout={S2ListLayout}\n layoutOptions={{\n estimatedRowHeight: rowHeight,\n loaderHeight: 60,\n dropIndicatorThickness: 0\n }}>\n <InternalListViewContext.Provider\n value={{isQuiet, selectionStyle, overflowMode, scale, hideLinkOutIcon}}>\n <GridList\n ref={scrollRef as any}\n {...gridListProps}\n dragAndDropHooks={dragAndDropHooks}\n selectionBehavior={selectionStyle === 'highlight' ? 'replace' : 'toggle'}\n selectionMode={gridListProps.selectionMode}\n renderEmptyState={renderEmptyState}\n style={{\n paddingBottom: actionBarHeight > 0 ? actionBarHeight + 8 : 0,\n scrollPaddingBottom: actionBarHeight > 0 ? actionBarHeight + 8 : 0\n }}\n className={renderProps =>\n listView({\n ...renderProps,\n isQuiet,\n isDropTarget: renderProps.isDropTarget\n })\n }\n selectedKeys={selectedKeys}\n defaultSelectedKeys={undefined}\n onSelectionChange={onSelectionChange}>\n {wrappedChildren}\n </GridList>\n </InternalListViewContext.Provider>\n </Virtualizer>\n {actionBar}\n </div>\n );\n});\n\nconst selectedBackground = colorMix('gray-25', 'gray-900', 7);\nconst selectedActiveBackground = colorMix('gray-25', 'gray-900', 10);\n\n// TODO: removed the background color in HCM for highlight selection since it made it hard to see the focus\n// ring of the drag button, this matches v3 anyways. thoughts?\nconst listitem = style<\n GridListItemRenderProps & {\n isFocused: boolean;\n isLink?: boolean;\n isQuiet?: boolean;\n isFirstItem?: boolean;\n isLastItem?: boolean;\n isSelected?: boolean;\n isDisabled?: boolean;\n isNextSelected?: boolean;\n isPrevSelected?: boolean;\n isPrevNotSelected?: boolean;\n isNextNotSelected?: boolean;\n selectionStyle?: 'highlight' | 'checkbox';\n scale?: 'medium' | 'large';\n isDropTarget?: boolean;\n }\n>({\n outlineStyle: {\n default: 'none'\n },\n boxSizing: 'border-box',\n columnGap: 0,\n paddingX: 0,\n paddingY: 8,\n backgroundColor: 'transparent',\n color: {\n default: baseColor('neutral-subdued'),\n isSelected: baseColor('neutral'),\n isDisabled: 'disabled',\n forcedColors: {\n default: 'ButtonText',\n isSelected: {\n selectionStyle: {\n highlight: 'HighlightText'\n }\n },\n isDisabled: 'GrayText'\n }\n },\n position: 'relative',\n gridColumnStart: 1,\n gridColumnEnd: -1,\n display: 'grid',\n gridTemplateAreas: [\n '. dragbutton . checkmark icon label actions actionmenu trailing-icon .',\n '. . . . . description actions actionmenu trailing-icon .'\n ],\n gridTemplateColumns: [\n 4,\n 'auto',\n 8,\n 'auto',\n 'auto',\n 'minmax(0, 1fr)',\n 'auto',\n 'auto',\n 'var(--trailing-icon-width)',\n 6\n ],\n gridTemplateRows: '1fr auto',\n rowGap: {\n ':has([slot=description])': space(1)\n },\n alignItems: 'baseline',\n minHeight: {\n default: 40,\n scale: {\n large: 50\n }\n },\n textDecoration: 'none',\n cursor: {\n default: 'default',\n isLink: 'pointer'\n },\n '--borderColor': {\n type: 'borderColor',\n value: {\n default: 'gray-300',\n forcedColors: 'ButtonBorder',\n isSelected: {\n selectionStyle: {\n highlight: {\n default: 'blue-900',\n forcedColors: 'Highlight'\n },\n checkbox: 'gray-300'\n }\n }\n }\n },\n borderTopWidth: 0,\n borderBottomWidth: {\n default: 1,\n isLastItem: {\n default: 1,\n isQuiet: 0\n }\n },\n borderStartWidth: 0,\n borderEndWidth: 0,\n borderStyle: 'solid',\n borderColor: {\n default: '--borderColor',\n isNextSelected: 'transparent',\n isSelected: 'transparent',\n forcedColors: 'ButtonBorder'\n },\n '--radius': {\n type: 'borderTopStartRadius',\n value: 'default'\n },\n forcedColorAdjust: 'none'\n});\n\nconst insetBorderRadius = 'calc(var(--radius) - 1px)';\nconst rootDropSelectedRowBackground = colorMix('gray-25', 'blue-900', 28);\nconst rowDropBackground = colorMix('gray-25', 'blue-900', 10);\nconst rootRowDropStyles = {\n // Unlike v3 tableview, v3 listview has the same background color for the listview itself and the rows when\n // dropping on root\n default: dropTargetBackground,\n isSelected: rootDropSelectedRowBackground,\n forcedColors: 'Background'\n} as const;\nconst rowDropStyles = {\n // Also unlike v3, dropping on a selected row vs a non selected row doesn't have any difference in background color\n default: rowDropBackground,\n isSelected: rowDropBackground,\n forcedColors: 'Background'\n} as const;\n\nconst listRowBackground = style<\n GridListItemRenderProps & {\n isFirstItem?: boolean;\n isLastItem?: boolean;\n isQuiet?: boolean;\n isPrevSelected?: boolean;\n isNextSelected?: boolean;\n isPrevNotSelected?: boolean;\n isNextNotSelected?: boolean;\n selectionStyle?: 'highlight' | 'checkbox';\n isDropTarget?: boolean;\n }\n>({\n position: 'absolute',\n zIndex: -1,\n top: {\n default: 0,\n isSelected: '[-1px]',\n // Don't overlap focus ring of row above.\n isPrevSelected: 0,\n isFirstItem: 0,\n forcedColors: 0\n },\n left: 0,\n right: 0,\n bottom: {\n default: 0,\n isSelected: '[-1px]'\n },\n backgroundColor: {\n default: '--rowBackgroundColor',\n isHovered: {\n default: 'gray-900/5',\n selectionStyle: {\n checkbox: selectedBackground\n }\n },\n isPressed: {\n default: 'gray-900/10',\n selectionStyle: {\n checkbox: selectedActiveBackground\n }\n },\n isSelected: {\n selectionStyle: {\n checkbox: {\n default: selectedBackground,\n isHovered: selectedActiveBackground,\n isPressed: selectedActiveBackground,\n isFocusVisible: selectedActiveBackground\n },\n highlight: {\n // Use solid colors rather than transparent because the rows overlap.\n default: colorMix('gray-25', 'blue-900', 10),\n isHovered: colorMix('gray-25', 'blue-900', 15),\n isPressed: colorMix('gray-25', 'blue-900', 15)\n }\n }\n },\n forcedColors: {\n default: 'transparent',\n selectionStyle: {\n highlight: {\n isSelected: 'Highlight'\n }\n }\n },\n ':is([role=\"grid\"][data-drop-target] *)': rootRowDropStyles,\n isDropTarget: rowDropStyles\n },\n borderTopStartRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isPrevNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderTopEndRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isPrevNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderBottomStartRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isNextNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderBottomEndRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isNextNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderTopWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isPrevSelected: 0,\n isDropTarget: 2\n },\n borderBottomWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isNextSelected: 0,\n isDropTarget: 2\n },\n borderStartWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isDropTarget: 2\n },\n borderEndWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isDropTarget: 2\n },\n borderStyle: 'solid',\n borderColor: {\n default: 'transparent',\n isSelected: {\n selectionStyle: {\n checkbox: 'transparent',\n highlight: '--borderColor'\n }\n },\n isDropTarget: 'blue-800',\n forcedColors: {\n isDropTarget: 'Highlight'\n }\n }\n});\n\nlet listRowFocusRing = style<\n GridListItemRenderProps & {\n selectionStyle?: 'highlight' | 'checkbox';\n isFirstItem?: boolean;\n isPrevSelected?: boolean;\n isPrevNotSelected?: boolean;\n isNextSelected?: boolean;\n isNextNotSelected?: boolean;\n isLastItem?: boolean;\n isQuiet?: boolean;\n }\n>({\n ...focusRing(),\n outlineOffset: {\n default: -2,\n forcedColors: -3\n },\n outlineWidth: {\n default: 2,\n forcedColors: '[3px]'\n },\n outlineColor: {\n default: 'focus-ring',\n forcedColors: {\n default: 'Highlight',\n selectionStyle: {\n highlight: 'ButtonBorder'\n }\n }\n },\n position: 'absolute',\n inset: 0,\n top: {\n default: '[-1px]',\n isFirstItem: 0\n },\n bottom: {\n selectionStyle: {\n checkbox: {\n default: '[-1px]',\n // Avoid the next row's selected background covering this row's focus ring.\n isNextSelected: 0\n },\n highlight: '[-1px]'\n }\n },\n borderRadius: {\n default: insetBorderRadius,\n isQuiet: 'default'\n },\n zIndex: 1,\n pointerEvents: 'none'\n});\n\nlet rowWrapper = style({\n display: 'contents'\n});\n\nlet image = style({\n gridArea: 'icon',\n gridRowEnd: 'span 2',\n marginEnd: 'text-to-visual',\n alignSelf: 'center',\n borderRadius: 'sm',\n width: 32,\n aspectRatio: 'square',\n objectFit: 'cover'\n});\n\nlet actionButtonGroup = style({\n gridArea: 'actions',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n justifySelf: 'end',\n marginStart: 'text-to-visual'\n});\n\nlet listActionMenu = style({\n gridArea: 'actionmenu',\n gridRowEnd: 'span 2',\n alignSelf: 'center'\n});\n\nconst listCheckbox = style({\n gridArea: 'checkmark',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n marginEnd: 8,\n visibility: {\n default: 'visible',\n isDisabled: 'hidden'\n }\n});\n\nconst listTrailingIcon = style({\n gridArea: 'trailing-icon',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n display: 'flex',\n alignItems: 'center',\n marginStart: 'text-to-visual'\n});\n\nlet dragButtonContainer = style({\n gridArea: 'dragbutton',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n display: 'flex',\n alignItems: 'center',\n width: 10\n});\n\nconst centeredWrapper = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 'full',\n height: 'full'\n});\n\nconst loadingSpinnerWrapper = style({\n padding: space(4)\n});\n\nconst emptyStateWrapper = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 'full',\n height: 'full',\n boxSizing: 'border-box',\n padding: 16\n});\n\nfunction ListSelectionCheckbox({isDisabled}: {isDisabled: boolean}) {\n let selectionContext = useSlottedContext(CheckboxContext, 'selection');\n let isSelectionDisabled = isDisabled || !!selectionContext?.isDisabled;\n return (\n <div className={listCheckbox({isDisabled: isSelectionDisabled})}>\n <Checkbox slot=\"selection\" />\n </div>\n );\n}\n\nexport function ListViewItem(props: ListViewItemProps): ReactNode {\n let ref = useRef(null);\n let {hasChildItems, ...otherProps} = props;\n let isLink = props.href != null;\n let isLinkOut = isLink && props.target === '_blank';\n let {\n isQuiet,\n selectionStyle,\n overflowMode,\n scale,\n hideLinkOutIcon = false\n } = useContext(InternalListViewContext);\n let textValue =\n props.textValue || (typeof props.children === 'string' ? props.children : undefined);\n let {direction} = useLocale();\n let hasTrailingIcon = hasChildItems || (isLinkOut && !hideLinkOutIcon);\n\n return (\n <GridListItem\n {...otherProps}\n textValue={textValue}\n ref={ref}\n {...(hasTrailingIcon ? {'data-has-trailing-icon': ''} : {})}\n className={renderProps =>\n listitem({\n ...renderProps,\n isLink,\n isQuiet,\n scale,\n selectionStyle,\n isPrevNotSelected: !isPrevSelected(renderProps.id, renderProps.state),\n isNextSelected: isNextSelected(renderProps.id, renderProps.state),\n isNextNotSelected: !isNextSelected(renderProps.id, renderProps.state),\n isFirstItem: isFirstItem(renderProps.id, renderProps.state),\n isLastItem: isLastItem(renderProps.id, renderProps.state)\n })\n }>\n {renderProps => {\n let {children} = props;\n let {\n selectionMode,\n selectionBehavior,\n isDisabled,\n id,\n state,\n allowsDragging,\n isFocusVisibleWithin\n } = renderProps;\n return (\n <Provider\n values={[\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {styles: label({...renderProps, overflowMode})},\n label: {styles: label({...renderProps, overflowMode})},\n description: {styles: description({...renderProps, overflowMode})}\n }\n }\n ],\n [\n IconContext,\n {\n slots: {\n icon: {\n render: centerBaseline({slot: 'icon', styles: iconCenterWrapper}),\n styles: icon\n }\n }\n }\n ],\n [ImageContext, {styles: image}],\n [\n ActionButtonGroupContext,\n {\n styles: actionButtonGroup,\n size: 'S',\n isQuiet: true\n }\n ],\n [\n ActionMenuContext,\n {\n styles: listActionMenu,\n isQuiet: true,\n size: 'S',\n isDisabled\n }\n ]\n ]}>\n <div className={rowWrapper}>\n <div\n className={listRowBackground({\n ...renderProps,\n selectionStyle,\n isQuiet,\n isDropTarget: renderProps.isDropTarget,\n isPrevSelected: isPrevSelected(id, state),\n isNextSelected: isNextSelected(id, state),\n isPrevNotSelected: !isPrevSelected(id, state),\n isNextNotSelected: !isNextSelected(id, state),\n isFirstItem: isFirstItem(id, state),\n isLastItem: isLastItem(id, state)\n })}\n />\n {renderProps.isFocusVisible && (\n <div\n className={listRowFocusRing({\n ...renderProps,\n selectionStyle,\n isQuiet,\n isPrevSelected: isPrevSelected(id, state),\n isNextSelected: isNextSelected(id, state),\n isPrevNotSelected: !isPrevSelected(id, state),\n isNextNotSelected: !isNextSelected(id, state),\n isFirstItem: isFirstItem(id, state),\n isLastItem: isLastItem(id, state)\n })}\n />\n )}\n {allowsDragging && (\n <div className={dragButtonContainer}>\n {!isDisabled && <DragHandleButton isFocusVisibleWithin={isFocusVisibleWithin} />}\n </div>\n )}\n {selectionMode !== 'none' && selectionBehavior === 'toggle' && (\n <ListSelectionCheckbox isDisabled={isDisabled} />\n )}\n {typeof children === 'string' ? <Text slot=\"label\">{children}</Text> : children}\n {isLinkOut && !hideLinkOutIcon && (\n <div className={listTrailingIcon}>\n <LinkOutIcon\n size=\"M\"\n className={style({\n scaleX: {\n direction: {\n rtl: -1\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({direction})}\n />\n </div>\n )}\n {hasChildItems && !isLinkOut && (\n <div className={listTrailingIcon}>\n <Chevron\n className={style({\n scale: {\n direction: {\n ltr: '1',\n rtl: '-1'\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({direction})}\n />\n </div>\n )}\n </div>\n </Provider>\n );\n }}\n </GridListItem>\n );\n}\n\nfunction isNextSelected(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n let keyAfter = state.collection.getKeyAfter(id);\n return keyAfter != null && state.selectionManager.isSelected(keyAfter);\n}\n\nfunction isPrevSelected(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n let keyBefore = state.collection.getKeyBefore(id);\n return keyBefore != null && state.selectionManager.isSelected(keyBefore);\n}\n\nfunction isFirstItem(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n return state.collection.getFirstKey() === id;\n}\n\nfunction isLastItem(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n\n let key = state.collection.getLastKey();\n let node = key ? state.collection.getItem(key) : null;\n\n return node ? node.key === id : false;\n}\n"],"names":[],"version":3,"file":"ListView.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsIM,MAAM,0DACX,CAAA,GAAA,oBAAY,EAA0E;AAExF,IAAI,8DAA0B,CAAA,GAAA,oBAAY,EAMvC,CAAC;AAEJ,MAAM;;;;;;;;;;;;;;;;;;;;;;;AAkBN,oGAAoG;AACpG,8FAA8F;AAC9F,6FAA6F;AAC7F,MAAM;AAiBN,oEAAoE;AACpE,MAAM,4CAAsB;AAE5B,MAAM;AACN,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CC,MAAM,kDAAwB,CAAA,GAAA,iBAAS;IAC5C,wBAAwB,MAAsB,EAAc;QAC1D,IAAI,aAAa,KAAK,CAAC,wBAAwB;QAC/C,WAAW,MAAM,GAAG;QACpB,WAAW,aAAa,GAAG;QAC3B,OAAO;IACT;AACF;AAMO,MAAM,4CAAyB,AAAd,WAAW,GAAI,CAAA,GAAA,iBAAS,EAAqB,SAAS,SAC5E,KAAuB,EACvB,GAA2B;IAE3B,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,YACF,QAAQ,WACR,OAAO,kBACP,iBAAiB,0BACjB,eAAe,0BACf,YAAY,cACZ,UAA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View.tsx"],"sourcesContent":["/*\n * Copyright 2026 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ActionButtonGroupContext} from './ActionButtonGroup';\nimport {ActionMenuContext} from './ActionMenu';\nimport {\n baseColor,\n color,\n colorMix,\n focusRing,\n fontRelative,\n space,\n style\n} from '../style' with {type: 'macro'};\nimport {centerBaseline} from './CenterBaseline';\nimport {Checkbox} from './Checkbox';\nimport {CheckboxContext} from 'react-aria-components/Checkbox';\nimport Chevron from '../ui-icons/Chevron';\nimport {Collection} from 'react-aria/Collection';\nimport {\n CollectionRendererContext,\n DefaultCollectionRenderer\n} from 'react-aria-components/CollectionBuilder';\nimport {\n ContextValue,\n DEFAULT_SLOT,\n Provider,\n SlotProps,\n useSlottedContext\n} from 'react-aria-components/slots';\nimport {\n controlFont,\n getAllowedOverrides,\n StylesPropWithHeight,\n UnsafeStyles\n} from './style-utils' with {type: 'macro'};\nimport {createContext, forwardRef, ReactElement, ReactNode, useContext, useRef} from 'react';\nimport {css} from '../style/style-macro' with {type: 'macro'};\nimport {description, DragPreview, icon, iconCenterWrapper, label} from './DragPreview';\nimport {\n DOMProps,\n DOMRef,\n DOMRefValue,\n forwardRefType,\n GlobalDOMAttributes,\n ItemDropTarget,\n LoadingState\n} from '@react-types/shared';\nimport {DragHandleButton, InsertionIndicator} from './dnd-utils';\nimport {\n GridList,\n GridListItem,\n GridListItemProps,\n GridListItemRenderProps,\n GridListLoadMoreItem,\n GridListProps,\n GridListRenderProps\n} from 'react-aria-components/GridList';\nimport {IconContext} from './Icon';\nimport {ImageContext} from './Image';\nimport intlMessages from '../intl/*.json';\nimport {Key} from '@react-types/shared';\nimport {LayoutInfo, Virtualizer} from 'react-aria-components/Virtualizer';\nimport LinkOutIcon from '../ui-icons/LinkOut';\nimport {ListLayout} from 'react-stately/useVirtualizerState';\nimport type {ListState} from 'react-stately/useListState';\nimport {ProgressCircle} from './ProgressCircle';\nimport {Text, TextContext} from './Content';\nimport {useActionBarContainer} from './ActionBar';\nimport {useDOMRef} from './useDOMRef';\nimport {useLocale} from 'react-aria/I18nProvider';\nimport {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatter';\nimport {useScale} from './utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface ListViewProps<T>\n extends\n Omit<\n GridListProps<T>,\n | 'className'\n | 'style'\n | 'children'\n | 'selectionBehavior'\n | 'layout'\n | 'render'\n | 'orientation'\n | keyof GlobalDOMAttributes\n >,\n DOMProps,\n UnsafeStyles,\n ListViewStylesProps,\n SlotProps {\n /** Spectrum-defined styles, returned by the `style()` macro. */\n styles?: StylesPropWithHeight;\n /** The current loading state of the ListView. */\n loadingState?: LoadingState;\n /** Handler that is called when more items should be loaded, e.g. while scrolling near the bottom. */\n onLoadMore?: () => void;\n /** The children of the ListView. */\n children: ReactNode | ((item: T) => ReactNode);\n /** Provides the ActionBar to display when items are selected in the ListView. */\n renderActionBar?: (selectedKeys: 'all' | Set<Key>) => ReactElement;\n /** Hides the default link out icons on items that open links in a new tab. */\n hideLinkOutIcon?: boolean;\n}\n\ninterface ListViewStylesProps {\n /** Whether the ListView should be displayed with a quiet style. */\n isQuiet?: boolean;\n /**\n * How selection should be displayed.\n *\n * @default 'checkbox'\n */\n selectionStyle?: 'highlight' | 'checkbox';\n /**\n * Sets the overflow behavior for item contents.\n *\n * @default 'truncate'\n */\n overflowMode?: 'wrap' | 'truncate';\n}\n\nexport interface ListViewItemProps extends Omit<\n GridListItemProps,\n 'children' | 'className' | 'style' | 'render' | 'onClick' | keyof GlobalDOMAttributes\n> {\n /**\n * The contents of the item.\n */\n children: ReactNode;\n /** Whether the item has child items (renders a chevron indicator). */\n hasChildItems?: boolean;\n}\n\nexport const ListViewContext =\n createContext<ContextValue<Partial<ListViewProps<any>>, DOMRefValue<HTMLDivElement>>>(null);\n\nlet InternalListViewContext = createContext<{\n isQuiet?: boolean;\n selectionStyle?: 'highlight' | 'checkbox';\n overflowMode?: 'wrap' | 'truncate';\n scale?: 'medium' | 'large';\n hideLinkOutIcon?: boolean;\n}>({});\n\nconst listViewWrapper = style(\n {\n minHeight: 0,\n minWidth: 200,\n display: 'flex',\n isolation: 'isolate',\n disableTapHighlight: true,\n position: 'relative',\n // Clip ActionBar animation.\n overflow: 'clip',\n '--root-drop-radius': {\n type: 'borderTopStartRadius',\n value: 'default'\n }\n },\n getAllowedOverrides({height: true})\n);\n\n// similar to tableview, use this approach so we can actually have a 2px outline when root dropping.\n// cant do a external box shadow due to the clipping that is applied on the wrapper element...\n// an inset box shadow runs into problems with the item background clipping the box shadow...\nconst rootDropOutline = css(`\n &:has([role=\"grid\"][data-drop-target])::after {\n content: \"\";\n position: absolute;\n inset: 0;\n pointer-events: none;\n border: 2px solid ${color('blue-800')};\n border-radius: var(--root-drop-radius);\n z-index: 2;\n }\n @media (forced-colors: active) {\n &:has([role=\"grid\"][data-drop-target])::after {\n border-color: Highlight;\n }\n }\n`);\n\n// When any row has a trailing icon, reserve space so actions align.\nconst hasTrailingIconRows = ':has([data-has-trailing-icon]) [role=\"row\"]';\n\nconst dropTargetBackground = colorMix('gray-25', 'blue-900', 10);\nconst listView = style<GridListRenderProps & {isQuiet?: boolean; isDropTarget?: boolean}>({\n ...focusRing(),\n outlineOffset: {\n default: -2,\n isQuiet: -1\n },\n userSelect: 'none',\n minHeight: 0,\n minWidth: 0,\n width: 'full',\n height: 'full',\n boxSizing: 'border-box',\n overflow: 'auto',\n fontSize: controlFont(),\n backgroundColor: {\n default: 'gray-25',\n isQuiet: 'transparent',\n isDropTarget: {\n default: dropTargetBackground,\n forcedColors: 'Background'\n }\n },\n borderRadius: {\n default: 'default',\n isQuiet: 'none'\n },\n borderColor: {\n default: 'gray-300',\n forcedColors: 'ButtonBorder'\n },\n borderWidth: {\n default: 1,\n isQuiet: 0\n },\n borderStyle: 'solid',\n forcedColorAdjust: 'none',\n '--trailing-icon-width': {\n type: 'width',\n value: {\n default: 'auto',\n [hasTrailingIconRows]: fontRelative(20)\n }\n }\n});\n\nexport class S2ListLayout<T> extends ListLayout<T> {\n getDropTargetLayoutInfo(target: ItemDropTarget): LayoutInfo {\n let layoutInfo = super.getDropTargetLayoutInfo(target);\n layoutInfo.zIndex = 1;\n layoutInfo.allowOverflow = true;\n return layoutInfo;\n }\n}\n\n/**\n * A ListView displays a list of interactive items, and allows a user to navigate, select, or\n * perform an action.\n */\nexport const ListView = /*#__PURE__*/ (forwardRef as forwardRefType)(function ListView<T>(\n props: ListViewProps<T>,\n ref: DOMRef<HTMLDivElement>\n) {\n [props, ref] = useSpectrumContextProps(props, ref, ListViewContext);\n let {\n children,\n isQuiet,\n selectionStyle = 'checkbox',\n overflowMode = 'truncate',\n loadingState,\n onLoadMore,\n renderEmptyState: userRenderEmptyState,\n hideLinkOutIcon = false,\n dragAndDropHooks,\n ...otherProps\n } = props;\n let scale = useScale();\n\n if (dragAndDropHooks && dragAndDropHooks.renderDragPreview == null) {\n dragAndDropHooks.renderDragPreview = items => (\n <DragPreview items={items} overflowMode={overflowMode} />\n );\n }\n\n if (dragAndDropHooks) {\n dragAndDropHooks.renderDropIndicator = target => (\n <InsertionIndicator target={target as ItemDropTarget} />\n );\n }\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2');\n let rowHeight = scale === 'large' ? 50 : 40;\n\n let domRef = useDOMRef(ref);\n let scrollRef = useRef<HTMLElement | null>(null);\n\n let isLoading = loadingState === 'loading' || loadingState === 'loadingMore';\n let renderEmptyState: ListViewProps<T>['renderEmptyState'] | undefined;\n if (userRenderEmptyState != null && !isLoading) {\n renderEmptyState = renderProps => (\n <div className={emptyStateWrapper}>\n <CollectionRendererContext.Provider value={DefaultCollectionRenderer}>\n {userRenderEmptyState!(renderProps)}\n </CollectionRendererContext.Provider>\n </div>\n );\n } else if (loadingState === 'loading') {\n renderEmptyState = () => (\n <div className={centeredWrapper}>\n <div className={loadingSpinnerWrapper}>\n <ProgressCircle isIndeterminate aria-label={stringFormatter.format('table.loading')} />\n </div>\n </div>\n );\n }\n\n let loadMoreSpinner = onLoadMore ? (\n <GridListLoadMoreItem\n isLoading={loadingState === 'loadingMore'}\n onLoadMore={onLoadMore}\n className={style({height: 'full', width: 'full', paddingY: 8})}>\n <div className={centeredWrapper}>\n <div className={loadingSpinnerWrapper}>\n <ProgressCircle\n isIndeterminate\n aria-label={stringFormatter.format('table.loadingMore')}\n />\n </div>\n </div>\n </GridListLoadMoreItem>\n ) : null;\n\n let wrappedChildren: ReactNode;\n let gridListProps = otherProps;\n if (typeof children === 'function' && otherProps.items) {\n let {items, dependencies = [], ...rest} = otherProps;\n gridListProps = rest;\n wrappedChildren = (\n <>\n <Collection items={items} dependencies={dependencies}>\n {children}\n </Collection>\n {loadMoreSpinner}\n </>\n );\n } else {\n wrappedChildren = (\n <>\n {children}\n {loadMoreSpinner}\n </>\n );\n }\n\n let {selectedKeys, onSelectionChange, actionBar, actionBarHeight} = useActionBarContainer({\n ...props,\n scrollRef\n });\n\n return (\n <div\n ref={domRef}\n className={\n (props.UNSAFE_className || '') + listViewWrapper(null, props.styles) + ' ' + rootDropOutline\n }\n style={props.UNSAFE_style}>\n <Virtualizer\n layout={S2ListLayout}\n layoutOptions={{\n estimatedRowHeight: rowHeight,\n loaderHeight: 60,\n dropIndicatorThickness: 0\n }}>\n <InternalListViewContext.Provider\n value={{isQuiet, selectionStyle, overflowMode, scale, hideLinkOutIcon}}>\n <GridList\n ref={scrollRef as any}\n {...gridListProps}\n dragAndDropHooks={dragAndDropHooks}\n selectionBehavior={selectionStyle === 'highlight' ? 'replace' : 'toggle'}\n selectionMode={gridListProps.selectionMode}\n renderEmptyState={renderEmptyState}\n style={{\n paddingBottom: actionBarHeight > 0 ? actionBarHeight + 8 : 0,\n scrollPaddingBottom: actionBarHeight > 0 ? actionBarHeight + 8 : 0\n }}\n className={renderProps =>\n listView({\n ...renderProps,\n isQuiet,\n isDropTarget: renderProps.isDropTarget\n })\n }\n selectedKeys={selectedKeys}\n defaultSelectedKeys={undefined}\n onSelectionChange={onSelectionChange}>\n {wrappedChildren}\n </GridList>\n </InternalListViewContext.Provider>\n </Virtualizer>\n {actionBar}\n </div>\n );\n});\n\nconst selectedBackground = colorMix('gray-25', 'gray-900', 7);\nconst selectedActiveBackground = colorMix('gray-25', 'gray-900', 10);\n\n// TODO: removed the background color in HCM for highlight selection since it made it hard to see the focus\n// ring of the drag button, this matches v3 anyways. thoughts?\nconst listitem = style<\n GridListItemRenderProps & {\n isFocused: boolean;\n isLink?: boolean;\n isQuiet?: boolean;\n isFirstItem?: boolean;\n isLastItem?: boolean;\n isSelected?: boolean;\n isDisabled?: boolean;\n isNextSelected?: boolean;\n isPrevSelected?: boolean;\n isPrevNotSelected?: boolean;\n isNextNotSelected?: boolean;\n selectionStyle?: 'highlight' | 'checkbox';\n scale?: 'medium' | 'large';\n isDropTarget?: boolean;\n }\n>({\n outlineStyle: {\n default: 'none'\n },\n boxSizing: 'border-box',\n columnGap: 0,\n paddingX: 0,\n paddingY: 8,\n backgroundColor: 'transparent',\n color: {\n default: baseColor('neutral-subdued'),\n isSelected: baseColor('neutral'),\n isDisabled: 'disabled',\n forcedColors: {\n default: 'ButtonText',\n isSelected: {\n selectionStyle: {\n highlight: 'HighlightText'\n }\n },\n isDisabled: 'GrayText'\n }\n },\n position: 'relative',\n gridColumnStart: 1,\n gridColumnEnd: -1,\n display: 'grid',\n gridTemplateAreas: [\n '. dragbutton . checkmark icon label actions actionmenu trailing-icon .',\n '. . . . . description actions actionmenu trailing-icon .'\n ],\n gridTemplateColumns: [\n 4,\n 'auto',\n 8,\n 'auto',\n 'auto',\n 'minmax(0, 1fr)',\n 'auto',\n 'auto',\n 'var(--trailing-icon-width)',\n 6\n ],\n gridTemplateRows: '1fr auto',\n rowGap: {\n ':has([slot=description])': space(1)\n },\n alignItems: 'baseline',\n minHeight: {\n default: 40,\n scale: {\n large: 50\n }\n },\n textDecoration: 'none',\n cursor: {\n default: 'default',\n isLink: 'pointer'\n },\n '--borderColor': {\n type: 'borderColor',\n value: {\n default: 'gray-300',\n forcedColors: 'ButtonBorder',\n isSelected: {\n selectionStyle: {\n highlight: {\n default: 'blue-900',\n forcedColors: 'Highlight'\n },\n checkbox: 'gray-300'\n }\n }\n }\n },\n borderTopWidth: 0,\n borderBottomWidth: {\n default: 1,\n isLastItem: {\n default: 1,\n isQuiet: 0\n }\n },\n borderStartWidth: 0,\n borderEndWidth: 0,\n borderStyle: 'solid',\n borderColor: {\n default: '--borderColor',\n isNextSelected: 'transparent',\n isSelected: 'transparent',\n forcedColors: 'ButtonBorder'\n },\n '--radius': {\n type: 'borderTopStartRadius',\n value: 'default'\n },\n forcedColorAdjust: 'none'\n});\n\nconst insetBorderRadius = 'calc(var(--radius) - 1px)';\nconst rootDropSelectedRowBackground = colorMix('gray-25', 'blue-900', 28);\nconst rowDropBackground = colorMix('gray-25', 'blue-900', 10);\nconst rootRowDropStyles = {\n // Unlike v3 tableview, v3 listview has the same background color for the listview itself and the rows when\n // dropping on root\n default: dropTargetBackground,\n isSelected: rootDropSelectedRowBackground,\n forcedColors: 'Background'\n} as const;\nconst rowDropStyles = {\n // Also unlike v3, dropping on a selected row vs a non selected row doesn't have any difference in background color\n default: rowDropBackground,\n isSelected: rowDropBackground,\n forcedColors: 'Background'\n} as const;\n\nconst listRowBackground = style<\n GridListItemRenderProps & {\n isFirstItem?: boolean;\n isLastItem?: boolean;\n isQuiet?: boolean;\n isPrevSelected?: boolean;\n isNextSelected?: boolean;\n isPrevNotSelected?: boolean;\n isNextNotSelected?: boolean;\n selectionStyle?: 'highlight' | 'checkbox';\n isDropTarget?: boolean;\n }\n>({\n position: 'absolute',\n zIndex: -1,\n top: {\n default: 0,\n isSelected: '[-1px]',\n // Don't overlap focus ring of row above.\n isPrevSelected: 0,\n isFirstItem: 0,\n forcedColors: 0\n },\n left: 0,\n right: 0,\n bottom: {\n default: 0,\n isSelected: '[-1px]'\n },\n backgroundColor: {\n default: '--rowBackgroundColor',\n isHovered: {\n default: 'gray-900/5',\n selectionStyle: {\n checkbox: selectedBackground\n }\n },\n isPressed: {\n default: 'gray-900/10',\n selectionStyle: {\n checkbox: selectedActiveBackground\n }\n },\n isSelected: {\n selectionStyle: {\n checkbox: {\n default: selectedBackground,\n isHovered: selectedActiveBackground,\n isPressed: selectedActiveBackground,\n isFocusVisible: selectedActiveBackground\n },\n highlight: {\n // Use solid colors rather than transparent because the rows overlap.\n default: colorMix('gray-25', 'blue-900', 10),\n isHovered: colorMix('gray-25', 'blue-900', 15),\n isPressed: colorMix('gray-25', 'blue-900', 15)\n }\n }\n },\n forcedColors: {\n default: 'transparent',\n selectionStyle: {\n highlight: {\n isSelected: 'Highlight'\n }\n }\n },\n ':is([role=\"grid\"][data-drop-target] *)': rootRowDropStyles,\n isDropTarget: rowDropStyles\n },\n borderTopStartRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isPrevNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderTopEndRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isPrevNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderBottomStartRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isNextNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderBottomEndRadius: {\n isQuiet: 'default',\n isSelected: 'none',\n isNextNotSelected: {\n isSelected: {\n selectionStyle: {\n checkbox: 'none',\n highlight: insetBorderRadius\n }\n },\n isQuiet: 'default'\n },\n isDropTarget: insetBorderRadius\n },\n borderTopWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isPrevSelected: 0,\n isDropTarget: 2\n },\n borderBottomWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isNextSelected: 0,\n isDropTarget: 2\n },\n borderStartWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isDropTarget: 2\n },\n borderEndWidth: {\n default: {\n selectionStyle: {\n checkbox: 0,\n highlight: 1\n }\n },\n isDropTarget: 2\n },\n borderStyle: 'solid',\n borderColor: {\n default: 'transparent',\n isSelected: {\n selectionStyle: {\n checkbox: 'transparent',\n highlight: '--borderColor'\n }\n },\n isDropTarget: 'blue-800',\n forcedColors: {\n isDropTarget: 'Highlight'\n }\n }\n});\n\nlet listRowFocusRing = style<\n GridListItemRenderProps & {\n selectionStyle?: 'highlight' | 'checkbox';\n isFirstItem?: boolean;\n isPrevSelected?: boolean;\n isPrevNotSelected?: boolean;\n isNextSelected?: boolean;\n isNextNotSelected?: boolean;\n isLastItem?: boolean;\n isQuiet?: boolean;\n }\n>({\n ...focusRing(),\n outlineOffset: {\n default: -2,\n forcedColors: -3\n },\n outlineWidth: {\n default: 2,\n forcedColors: '[3px]'\n },\n outlineColor: {\n default: 'focus-ring',\n forcedColors: {\n default: 'Highlight',\n selectionStyle: {\n highlight: 'ButtonBorder'\n }\n }\n },\n position: 'absolute',\n inset: 0,\n top: {\n default: '[-1px]',\n isFirstItem: 0\n },\n bottom: {\n selectionStyle: {\n checkbox: {\n default: '[-1px]',\n // Avoid the next row's selected background covering this row's focus ring.\n isNextSelected: 0\n },\n highlight: '[-1px]'\n }\n },\n borderRadius: {\n default: insetBorderRadius,\n isQuiet: 'default'\n },\n zIndex: 1,\n pointerEvents: 'none'\n});\n\nlet rowWrapper = style({\n display: 'contents'\n});\n\nlet image = style({\n gridArea: 'icon',\n gridRowEnd: 'span 2',\n marginEnd: 'text-to-visual',\n alignSelf: 'center',\n borderRadius: 'sm',\n width: 32,\n aspectRatio: 'square',\n objectFit: 'cover'\n});\n\nlet actionButtonGroup = style({\n gridArea: 'actions',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n justifySelf: 'end',\n marginStart: 'text-to-visual'\n});\n\nlet listActionMenu = style({\n gridArea: 'actionmenu',\n gridRowEnd: 'span 2',\n alignSelf: 'center'\n});\n\nconst listCheckbox = style({\n gridArea: 'checkmark',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n marginEnd: 8,\n visibility: {\n default: 'visible',\n isDisabled: 'hidden'\n }\n});\n\nconst listTrailingIcon = style({\n gridArea: 'trailing-icon',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n display: 'flex',\n alignItems: 'center',\n marginStart: 'text-to-visual'\n});\n\nlet dragButtonContainer = style({\n gridArea: 'dragbutton',\n gridRowEnd: 'span 2',\n alignSelf: 'center',\n display: 'flex',\n alignItems: 'center',\n width: 10\n});\n\nconst centeredWrapper = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 'full',\n height: 'full'\n});\n\nconst loadingSpinnerWrapper = style({\n padding: space(4)\n});\n\nconst emptyStateWrapper = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 'full',\n height: 'full',\n boxSizing: 'border-box',\n padding: 16\n});\n\nfunction ListSelectionCheckbox({isDisabled}: {isDisabled: boolean}) {\n let selectionContext = useSlottedContext(CheckboxContext, 'selection');\n let isSelectionDisabled = isDisabled || !!selectionContext?.isDisabled;\n return (\n <div className={listCheckbox({isDisabled: isSelectionDisabled})}>\n <Checkbox slot=\"selection\" />\n </div>\n );\n}\n\nexport function ListViewItem(props: ListViewItemProps): ReactNode {\n let ref = useRef(null);\n let {hasChildItems, ...otherProps} = props;\n let isLink = props.href != null;\n let isLinkOut = isLink && props.target === '_blank';\n let {\n isQuiet,\n selectionStyle,\n overflowMode,\n scale,\n hideLinkOutIcon = false\n } = useContext(InternalListViewContext);\n let textValue =\n props.textValue || (typeof props.children === 'string' ? props.children : undefined);\n let {direction} = useLocale();\n let hasTrailingIcon = hasChildItems || (isLinkOut && !hideLinkOutIcon);\n\n return (\n <GridListItem\n {...otherProps}\n textValue={textValue}\n ref={ref}\n {...(hasTrailingIcon ? {'data-has-trailing-icon': ''} : {})}\n className={renderProps =>\n listitem({\n ...renderProps,\n isLink,\n isQuiet,\n scale,\n selectionStyle,\n isPrevNotSelected: !isPrevSelected(renderProps.id, renderProps.state),\n isNextSelected: isNextSelected(renderProps.id, renderProps.state),\n isNextNotSelected: !isNextSelected(renderProps.id, renderProps.state),\n isFirstItem: isFirstItem(renderProps.id, renderProps.state),\n isLastItem: isLastItem(renderProps.id, renderProps.state)\n })\n }>\n {renderProps => {\n let {children} = props;\n let {\n selectionMode,\n selectionBehavior,\n isDisabled,\n id,\n state,\n allowsDragging,\n isFocusVisibleWithin\n } = renderProps;\n return (\n <Provider\n values={[\n [\n TextContext,\n {\n slots: {\n [DEFAULT_SLOT]: {styles: label({...renderProps, overflowMode})},\n label: {styles: label({...renderProps, overflowMode})},\n description: {styles: description({...renderProps, overflowMode})}\n }\n }\n ],\n [\n IconContext,\n {\n slots: {\n icon: {\n render: centerBaseline({slot: 'icon', styles: iconCenterWrapper}),\n styles: icon\n }\n }\n }\n ],\n [ImageContext, {styles: image}],\n [\n ActionButtonGroupContext,\n {\n styles: actionButtonGroup,\n size: 'S',\n isQuiet: true\n }\n ],\n [\n ActionMenuContext,\n {\n styles: listActionMenu,\n isQuiet: true,\n size: 'S',\n isDisabled\n }\n ]\n ]}>\n <div className={rowWrapper}>\n <div\n className={listRowBackground({\n ...renderProps,\n selectionStyle,\n isQuiet,\n isDropTarget: renderProps.isDropTarget,\n isPrevSelected: isPrevSelected(id, state),\n isNextSelected: isNextSelected(id, state),\n isPrevNotSelected: !isPrevSelected(id, state),\n isNextNotSelected: !isNextSelected(id, state),\n isFirstItem: isFirstItem(id, state),\n isLastItem: isLastItem(id, state)\n })}\n />\n {renderProps.isFocusVisible && (\n <div\n className={listRowFocusRing({\n ...renderProps,\n selectionStyle,\n isQuiet,\n isPrevSelected: isPrevSelected(id, state),\n isNextSelected: isNextSelected(id, state),\n isPrevNotSelected: !isPrevSelected(id, state),\n isNextNotSelected: !isNextSelected(id, state),\n isFirstItem: isFirstItem(id, state),\n isLastItem: isLastItem(id, state)\n })}\n />\n )}\n {allowsDragging && (\n <div className={dragButtonContainer}>\n {!isDisabled && <DragHandleButton isFocusVisibleWithin={isFocusVisibleWithin} />}\n </div>\n )}\n {selectionMode !== 'none' && selectionBehavior === 'toggle' && (\n <ListSelectionCheckbox isDisabled={isDisabled} />\n )}\n {typeof children === 'string' ? <Text slot=\"label\">{children}</Text> : children}\n {isLinkOut && !hideLinkOutIcon && (\n <div className={listTrailingIcon}>\n <LinkOutIcon\n size=\"M\"\n className={style({\n scaleX: {\n direction: {\n rtl: -1\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({direction})}\n />\n </div>\n )}\n {hasChildItems && !isLinkOut && (\n <div className={listTrailingIcon}>\n <Chevron\n className={style({\n scale: {\n direction: {\n ltr: '1',\n rtl: '-1'\n }\n },\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({direction})}\n />\n </div>\n )}\n </div>\n </Provider>\n );\n }}\n </GridListItem>\n );\n}\n\nfunction isNextSelected(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n let keyAfter = state.collection.getKeyAfter(id);\n return keyAfter != null && state.selectionManager.isSelected(keyAfter);\n}\n\nfunction isPrevSelected(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n let keyBefore = state.collection.getKeyBefore(id);\n return keyBefore != null && state.selectionManager.isSelected(keyBefore);\n}\n\nfunction isFirstItem(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n return state.collection.getFirstKey() === id;\n}\n\nfunction isLastItem(id: Key | undefined, state: ListState<unknown>) {\n if (id == null || !state) {\n return false;\n }\n\n let key = state.collection.getLastKey();\n let node = key ? state.collection.getItem(key) : null;\n\n return node ? node.key === id : false;\n}\n"],"names":[],"version":3,"file":"ListView.mjs.map"}
|