@cloudscape-design/board-components 3.0.124 → 3.0.126
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/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/styles/tokens.d.ts +0 -4
- package/internal/generated/styles/tokens.js +0 -4
- package/internal/generated/theming/index.cjs +0 -84
- package/internal/generated/theming/index.js +0 -84
- package/internal/item-container/index.js +13 -8
- package/internal/item-container/index.js.map +1 -1
- package/internal/item-container/styles.css.js +8 -7
- package/internal/item-container/styles.scoped.css +11 -7
- package/internal/item-container/styles.selectors.js +8 -7
- package/internal/manifest.json +1 -1
- package/package.json +2 -2
package/internal/environment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "board-components";
|
|
2
|
-
export var PACKAGE_VERSION = "3.0.0 (
|
|
2
|
+
export var PACKAGE_VERSION = "3.0.0 (219c2858)";
|
|
3
3
|
export var THEME = "open-source-visual-refresh";
|
|
4
4
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
5
5
|
export var SYSTEM = "console";
|
|
@@ -465,7 +465,6 @@ export const colorShadowDefault: string;
|
|
|
465
465
|
export const colorShadowMedium: string;
|
|
466
466
|
export const colorShadowSide: string;
|
|
467
467
|
export const colorStrokeChartLine: string;
|
|
468
|
-
export const colorStrokeCodeEditorResizeHandler: string;
|
|
469
468
|
export const colorStrokeCodeEditorGutterActiveLineDefault: string;
|
|
470
469
|
export const colorStrokeCodeEditorGutterActiveLineHover: string;
|
|
471
470
|
export const colorTextAccent: string;
|
|
@@ -487,7 +486,6 @@ export const colorTextButtonPrimaryActive: string;
|
|
|
487
486
|
export const colorTextButtonPrimaryDefault: string;
|
|
488
487
|
export const colorTextButtonPrimaryHover: string;
|
|
489
488
|
export const colorTextCalendarDateHover: string;
|
|
490
|
-
export const colorTextCalendarDateSelected: string;
|
|
491
489
|
export const colorTextCalendarMonth: string;
|
|
492
490
|
export const colorTextCodeEditorGutterActiveLine: string;
|
|
493
491
|
export const colorTextCodeEditorGutterDefault: string;
|
|
@@ -753,7 +751,6 @@ export const spaceLayoutToggleDiameter: string;
|
|
|
753
751
|
export const spaceLayoutTogglePadding: string;
|
|
754
752
|
export const spaceModalContentBottom: string;
|
|
755
753
|
export const spaceModalHorizontal: string;
|
|
756
|
-
export const spaceOptionIconBigTop: string;
|
|
757
754
|
export const spacePanelContentBottom: string;
|
|
758
755
|
export const spacePanelContentTop: string;
|
|
759
756
|
export const spacePanelDividerMarginHorizontal: string;
|
|
@@ -815,7 +812,6 @@ export const spaceXl: string;
|
|
|
815
812
|
export const spaceXxl: string;
|
|
816
813
|
export const spaceXxxl: string;
|
|
817
814
|
export const shadowContainer: string;
|
|
818
|
-
export const shadowContainerStacked: string;
|
|
819
815
|
export const shadowContainerActive: string;
|
|
820
816
|
export const shadowDropdown: string;
|
|
821
817
|
export const shadowDropup: string;
|
|
@@ -465,7 +465,6 @@ export var colorShadowDefault = "var(--color-shadow-default-o7dmmm, rgba(15, 20,
|
|
|
465
465
|
export var colorShadowMedium = "var(--color-shadow-medium-x7of55, rgba(15, 20, 26, 0.12))";
|
|
466
466
|
export var colorShadowSide = "var(--color-shadow-side-rtsbda, rgba(15, 20, 26, 0.12))";
|
|
467
467
|
export var colorStrokeChartLine = "var(--color-stroke-chart-line-3nsnk6, #8c8c94)";
|
|
468
|
-
export var colorStrokeCodeEditorResizeHandler = "var(--color-stroke-code-editor-resize-handler-atdd8r, #424650)";
|
|
469
468
|
export var colorStrokeCodeEditorGutterActiveLineDefault = "var(--color-stroke-code-editor-gutter-active-line-default-5hrdmu, #dedee3)";
|
|
470
469
|
export var colorStrokeCodeEditorGutterActiveLineHover = "var(--color-stroke-code-editor-gutter-active-line-hover-vqrb6s, #f9f9fa)";
|
|
471
470
|
export var colorTextAccent = "var(--color-text-accent-n1kmht, #006ce0)";
|
|
@@ -487,7 +486,6 @@ export var colorTextButtonPrimaryActive = "var(--color-text-button-primary-activ
|
|
|
487
486
|
export var colorTextButtonPrimaryDefault = "var(--color-text-button-primary-default-mwl31m, #ffffff)";
|
|
488
487
|
export var colorTextButtonPrimaryHover = "var(--color-text-button-primary-hover-pw12ep, #ffffff)";
|
|
489
488
|
export var colorTextCalendarDateHover = "var(--color-text-calendar-date-hover-3fcriv, #0f141a)";
|
|
490
|
-
export var colorTextCalendarDateSelected = "var(--color-text-calendar-date-selected-wc8ffc, #006ce0)";
|
|
491
489
|
export var colorTextCalendarMonth = "var(--color-text-calendar-month-ea0e93, #656871)";
|
|
492
490
|
export var colorTextCodeEditorGutterActiveLine = "var(--color-text-code-editor-gutter-active-line-2addhd, #ffffff)";
|
|
493
491
|
export var colorTextCodeEditorGutterDefault = "var(--color-text-code-editor-gutter-default-nlshs8, #0f141a)";
|
|
@@ -753,7 +751,6 @@ export var spaceLayoutToggleDiameter = "var(--space-layout-toggle-diameter-j2qff
|
|
|
753
751
|
export var spaceLayoutTogglePadding = "var(--space-layout-toggle-padding-chwlhz, 12px)";
|
|
754
752
|
export var spaceModalContentBottom = "var(--space-modal-content-bottom-nl6ceq, 16px)";
|
|
755
753
|
export var spaceModalHorizontal = "var(--space-modal-horizontal-y5hnwp, 20px)";
|
|
756
|
-
export var spaceOptionIconBigTop = "var(--space-option-icon-big-top-rs5wgf, 0px)";
|
|
757
754
|
export var spacePanelContentBottom = "var(--space-panel-content-bottom-24c6lu, 40px)";
|
|
758
755
|
export var spacePanelContentTop = "var(--space-panel-content-top-qvd1dr, 20px)";
|
|
759
756
|
export var spacePanelDividerMarginHorizontal = "var(--space-panel-divider-margin-horizontal-yw31p0, 8px)";
|
|
@@ -815,7 +812,6 @@ export var spaceXl = "var(--space-xl-jfy3x4, 24px)";
|
|
|
815
812
|
export var spaceXxl = "var(--space-xxl-32srm4, 32px)";
|
|
816
813
|
export var spaceXxxl = "var(--space-xxxl-aut1u7, 40px)";
|
|
817
814
|
export var shadowContainer = "var(--shadow-container-53ltfv, 0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12))";
|
|
818
|
-
export var shadowContainerStacked = "var(--shadow-container-stacked-y4nc75, -1px 1px 1px 0px #e9ebed, 1px 1px 1px 0px #e9ebed, 0px 9px 8px -7px rgb(0 7 22 / 12%), 8px 0px 8px -7px rgb(0 7 22 / 12%), -8px 0px 8px -7px rgb(0 7 22 / 12%))";
|
|
819
815
|
export var shadowContainerActive = "var(--shadow-container-active-ypjjoc, 0px 1px 1px 1px #e9ebed, 0px 6px 36px #0007161a)";
|
|
820
816
|
export var shadowDropdown = "var(--shadow-dropdown-isf0w4, 0px 4px 20px 1px rgba(0, 7, 22, 0.10))";
|
|
821
817
|
export var shadowDropup = "var(--shadow-dropup-2r02r5, 0px 4px 20px 1px rgba(0, 7, 22, 0.10))";
|
|
@@ -1754,10 +1754,6 @@ module.exports.preset = {
|
|
|
1754
1754
|
"light": "{colorNeutral500}",
|
|
1755
1755
|
"dark": "{colorNeutral500}"
|
|
1756
1756
|
},
|
|
1757
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
1758
|
-
"light": "{colorNeutral650}",
|
|
1759
|
-
"dark": "{colorNeutral300}"
|
|
1760
|
-
},
|
|
1761
1757
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
1762
1758
|
"light": "{colorNeutral300}",
|
|
1763
1759
|
"dark": "{colorNeutral800}"
|
|
@@ -1842,10 +1838,6 @@ module.exports.preset = {
|
|
|
1842
1838
|
"light": "{colorTextDropdownItemDefault}",
|
|
1843
1839
|
"dark": "{colorTextDropdownItemDefault}"
|
|
1844
1840
|
},
|
|
1845
|
-
"colorTextCalendarDateSelected": {
|
|
1846
|
-
"light": "{colorTextAccent}",
|
|
1847
|
-
"dark": "{colorTextAccent}"
|
|
1848
|
-
},
|
|
1849
1841
|
"colorTextCalendarMonth": {
|
|
1850
1842
|
"light": "{colorNeutral600}",
|
|
1851
1843
|
"dark": "{colorNeutral450}"
|
|
@@ -2630,10 +2622,6 @@ module.exports.preset = {
|
|
|
2630
2622
|
"comfortable": "{spaceContainerHorizontal}",
|
|
2631
2623
|
"compact": "{spaceContainerHorizontal}"
|
|
2632
2624
|
},
|
|
2633
|
-
"spaceOptionIconBigTop": {
|
|
2634
|
-
"comfortable": "0px",
|
|
2635
|
-
"compact": "0px"
|
|
2636
|
-
},
|
|
2637
2625
|
"spacePanelContentBottom": {
|
|
2638
2626
|
"comfortable": "{spaceScaledXxxl}",
|
|
2639
2627
|
"compact": "{spaceScaledXxxl}"
|
|
@@ -2878,10 +2866,6 @@ module.exports.preset = {
|
|
|
2878
2866
|
"light": "0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12)",
|
|
2879
2867
|
"dark": "0px 1px 8px 2px rgba(0, 7, 22, 0.6)"
|
|
2880
2868
|
},
|
|
2881
|
-
"shadowContainerStacked": {
|
|
2882
|
-
"light": "-1px 1px 1px 0px #e9ebed, 1px 1px 1px 0px #e9ebed, 0px 9px 8px -7px rgb(0 7 22 / 12%), 8px 0px 8px -7px rgb(0 7 22 / 12%), -8px 0px 8px -7px rgb(0 7 22 / 12%)",
|
|
2883
|
-
"dark": "0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%)"
|
|
2884
|
-
},
|
|
2885
2869
|
"shadowContainerActive": {
|
|
2886
2870
|
"light": "0px 1px 1px 1px #e9ebed, 0px 6px 36px #0007161a",
|
|
2887
2871
|
"dark": "0px 1px 1px 1px #192534, 0px 6px 36px #00040c"
|
|
@@ -3104,10 +3088,6 @@ module.exports.preset = {
|
|
|
3104
3088
|
"comfortable": "{spaceContainerHorizontal}",
|
|
3105
3089
|
"compact": "{spaceContainerHorizontal}"
|
|
3106
3090
|
},
|
|
3107
|
-
"spaceOptionIconBigTop": {
|
|
3108
|
-
"comfortable": "0px",
|
|
3109
|
-
"compact": "0px"
|
|
3110
|
-
},
|
|
3111
3091
|
"spacePanelContentBottom": {
|
|
3112
3092
|
"comfortable": "{spaceScaledXxxl}",
|
|
3113
3093
|
"compact": "{spaceScaledXxxl}"
|
|
@@ -4042,10 +4022,6 @@ module.exports.preset = {
|
|
|
4042
4022
|
"light": "{colorNeutral500}",
|
|
4043
4023
|
"dark": "{colorNeutral500}"
|
|
4044
4024
|
},
|
|
4045
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
4046
|
-
"light": "{colorNeutral300}",
|
|
4047
|
-
"dark": "{colorNeutral300}"
|
|
4048
|
-
},
|
|
4049
4025
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
4050
4026
|
"light": "{colorNeutral800}",
|
|
4051
4027
|
"dark": "{colorNeutral800}"
|
|
@@ -4130,10 +4106,6 @@ module.exports.preset = {
|
|
|
4130
4106
|
"light": "{colorTextDropdownItemDefault}",
|
|
4131
4107
|
"dark": "{colorTextDropdownItemDefault}"
|
|
4132
4108
|
},
|
|
4133
|
-
"colorTextCalendarDateSelected": {
|
|
4134
|
-
"light": "{colorTextAccent}",
|
|
4135
|
-
"dark": "{colorTextAccent}"
|
|
4136
|
-
},
|
|
4137
4109
|
"colorTextCalendarMonth": {
|
|
4138
4110
|
"light": "{colorNeutral450}",
|
|
4139
4111
|
"dark": "{colorNeutral450}"
|
|
@@ -4480,10 +4452,6 @@ module.exports.preset = {
|
|
|
4480
4452
|
"light": "0px 1px 8px 2px rgba(0, 7, 22, 0.6)",
|
|
4481
4453
|
"dark": "0px 1px 8px 2px rgba(0, 7, 22, 0.6)"
|
|
4482
4454
|
},
|
|
4483
|
-
"shadowContainerStacked": {
|
|
4484
|
-
"light": "0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%)",
|
|
4485
|
-
"dark": "0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%)"
|
|
4486
|
-
},
|
|
4487
4455
|
"shadowContainerActive": {
|
|
4488
4456
|
"light": "0px 1px 1px 1px #192534, 0px 6px 36px #00040c",
|
|
4489
4457
|
"dark": "0px 1px 1px 1px #192534, 0px 6px 36px #00040c"
|
|
@@ -5228,10 +5196,6 @@ module.exports.preset = {
|
|
|
5228
5196
|
"light": "{colorNeutral500}",
|
|
5229
5197
|
"dark": "{colorNeutral500}"
|
|
5230
5198
|
},
|
|
5231
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
5232
|
-
"light": "{colorNeutral300}",
|
|
5233
|
-
"dark": "{colorNeutral300}"
|
|
5234
|
-
},
|
|
5235
5199
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
5236
5200
|
"light": "{colorNeutral800}",
|
|
5237
5201
|
"dark": "{colorNeutral800}"
|
|
@@ -5316,10 +5280,6 @@ module.exports.preset = {
|
|
|
5316
5280
|
"light": "{colorTextDropdownItemDefault}",
|
|
5317
5281
|
"dark": "{colorTextDropdownItemDefault}"
|
|
5318
5282
|
},
|
|
5319
|
-
"colorTextCalendarDateSelected": {
|
|
5320
|
-
"light": "{colorTextAccent}",
|
|
5321
|
-
"dark": "{colorTextAccent}"
|
|
5322
|
-
},
|
|
5323
5283
|
"colorTextCalendarMonth": {
|
|
5324
5284
|
"light": "{colorNeutral450}",
|
|
5325
5285
|
"dark": "{colorNeutral450}"
|
|
@@ -6346,10 +6306,6 @@ module.exports.preset = {
|
|
|
6346
6306
|
"light": "{colorNeutral500}",
|
|
6347
6307
|
"dark": "{colorNeutral500}"
|
|
6348
6308
|
},
|
|
6349
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
6350
|
-
"light": "{colorNeutral650}",
|
|
6351
|
-
"dark": "{colorNeutral300}"
|
|
6352
|
-
},
|
|
6353
6309
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
6354
6310
|
"light": "{colorNeutral300}",
|
|
6355
6311
|
"dark": "{colorNeutral800}"
|
|
@@ -6434,10 +6390,6 @@ module.exports.preset = {
|
|
|
6434
6390
|
"light": "{colorTextDropdownItemDefault}",
|
|
6435
6391
|
"dark": "{colorTextDropdownItemDefault}"
|
|
6436
6392
|
},
|
|
6437
|
-
"colorTextCalendarDateSelected": {
|
|
6438
|
-
"light": "{colorTextAccent}",
|
|
6439
|
-
"dark": "{colorTextAccent}"
|
|
6440
|
-
},
|
|
6441
6393
|
"colorTextCalendarMonth": {
|
|
6442
6394
|
"light": "{colorNeutral600}",
|
|
6443
6395
|
"dark": "{colorNeutral450}"
|
|
@@ -7464,10 +7416,6 @@ module.exports.preset = {
|
|
|
7464
7416
|
"light": "{colorNeutral500}",
|
|
7465
7417
|
"dark": "{colorNeutral500}"
|
|
7466
7418
|
},
|
|
7467
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
7468
|
-
"light": "{colorNeutral650}",
|
|
7469
|
-
"dark": "{colorNeutral300}"
|
|
7470
|
-
},
|
|
7471
7419
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
7472
7420
|
"light": "{colorNeutral300}",
|
|
7473
7421
|
"dark": "{colorNeutral800}"
|
|
@@ -7552,10 +7500,6 @@ module.exports.preset = {
|
|
|
7552
7500
|
"light": "{colorTextDropdownItemDefault}",
|
|
7553
7501
|
"dark": "{colorTextDropdownItemDefault}"
|
|
7554
7502
|
},
|
|
7555
|
-
"colorTextCalendarDateSelected": {
|
|
7556
|
-
"light": "{colorTextAccent}",
|
|
7557
|
-
"dark": "{colorTextAccent}"
|
|
7558
|
-
},
|
|
7559
7503
|
"colorTextCalendarMonth": {
|
|
7560
7504
|
"light": "{colorNeutral600}",
|
|
7561
7505
|
"dark": "{colorNeutral450}"
|
|
@@ -8582,10 +8526,6 @@ module.exports.preset = {
|
|
|
8582
8526
|
"light": "{colorNeutral500}",
|
|
8583
8527
|
"dark": "{colorNeutral500}"
|
|
8584
8528
|
},
|
|
8585
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
8586
|
-
"light": "{colorNeutral650}",
|
|
8587
|
-
"dark": "{colorNeutral300}"
|
|
8588
|
-
},
|
|
8589
8529
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
8590
8530
|
"light": "{colorNeutral300}",
|
|
8591
8531
|
"dark": "{colorNeutral800}"
|
|
@@ -8670,10 +8610,6 @@ module.exports.preset = {
|
|
|
8670
8610
|
"light": "{colorTextDropdownItemDefault}",
|
|
8671
8611
|
"dark": "{colorTextDropdownItemDefault}"
|
|
8672
8612
|
},
|
|
8673
|
-
"colorTextCalendarDateSelected": {
|
|
8674
|
-
"light": "{colorTextAccent}",
|
|
8675
|
-
"dark": "{colorTextAccent}"
|
|
8676
|
-
},
|
|
8677
8613
|
"colorTextCalendarMonth": {
|
|
8678
8614
|
"light": "{colorNeutral600}",
|
|
8679
8615
|
"dark": "{colorNeutral450}"
|
|
@@ -9702,10 +9638,6 @@ module.exports.preset = {
|
|
|
9702
9638
|
"light": "{colorNeutral500}",
|
|
9703
9639
|
"dark": "{colorNeutral500}"
|
|
9704
9640
|
},
|
|
9705
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
9706
|
-
"light": "{colorNeutral300}",
|
|
9707
|
-
"dark": "{colorNeutral300}"
|
|
9708
|
-
},
|
|
9709
9641
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
9710
9642
|
"light": "{colorNeutral800}",
|
|
9711
9643
|
"dark": "{colorNeutral800}"
|
|
@@ -9790,10 +9722,6 @@ module.exports.preset = {
|
|
|
9790
9722
|
"light": "{colorTextDropdownItemDefault}",
|
|
9791
9723
|
"dark": "{colorTextDropdownItemDefault}"
|
|
9792
9724
|
},
|
|
9793
|
-
"colorTextCalendarDateSelected": {
|
|
9794
|
-
"light": "{colorTextAccent}",
|
|
9795
|
-
"dark": "{colorTextAccent}"
|
|
9796
|
-
},
|
|
9797
9725
|
"colorTextCalendarMonth": {
|
|
9798
9726
|
"light": "{colorNeutral450}",
|
|
9799
9727
|
"dark": "{colorNeutral450}"
|
|
@@ -10611,7 +10539,6 @@ module.exports.preset = {
|
|
|
10611
10539
|
"colorShadowMedium": "color",
|
|
10612
10540
|
"colorShadowSide": "color",
|
|
10613
10541
|
"colorStrokeChartLine": "color",
|
|
10614
|
-
"colorStrokeCodeEditorResizeHandler": "color",
|
|
10615
10542
|
"colorStrokeCodeEditorGutterActiveLineDefault": "color",
|
|
10616
10543
|
"colorStrokeCodeEditorGutterActiveLineHover": "color",
|
|
10617
10544
|
"colorTextAccent": "color",
|
|
@@ -10633,7 +10560,6 @@ module.exports.preset = {
|
|
|
10633
10560
|
"colorTextButtonPrimaryDefault": "color",
|
|
10634
10561
|
"colorTextButtonPrimaryHover": "color",
|
|
10635
10562
|
"colorTextCalendarDateHover": "color",
|
|
10636
|
-
"colorTextCalendarDateSelected": "color",
|
|
10637
10563
|
"colorTextCalendarMonth": "color",
|
|
10638
10564
|
"colorTextCodeEditorGutterActiveLine": "color",
|
|
10639
10565
|
"colorTextCodeEditorGutterDefault": "color",
|
|
@@ -10807,7 +10733,6 @@ module.exports.preset = {
|
|
|
10807
10733
|
"spaceLayoutTogglePadding": "density",
|
|
10808
10734
|
"spaceModalContentBottom": "density",
|
|
10809
10735
|
"spaceModalHorizontal": "density",
|
|
10810
|
-
"spaceOptionIconBigTop": "density",
|
|
10811
10736
|
"spacePanelContentBottom": "density",
|
|
10812
10737
|
"spacePanelContentTop": "density",
|
|
10813
10738
|
"spacePanelDividerMarginHorizontal": "density",
|
|
@@ -10869,7 +10794,6 @@ module.exports.preset = {
|
|
|
10869
10794
|
"spaceXxl": "density",
|
|
10870
10795
|
"spaceXxxl": "density",
|
|
10871
10796
|
"shadowContainer": "color",
|
|
10872
|
-
"shadowContainerStacked": "color",
|
|
10873
10797
|
"shadowContainerActive": "color",
|
|
10874
10798
|
"shadowDropdown": "color",
|
|
10875
10799
|
"shadowDropup": "color",
|
|
@@ -12023,7 +11947,6 @@ module.exports.preset = {
|
|
|
12023
11947
|
"colorShadowMedium": "color-shadow-medium",
|
|
12024
11948
|
"colorShadowSide": "color-shadow-side",
|
|
12025
11949
|
"colorStrokeChartLine": "color-stroke-chart-line",
|
|
12026
|
-
"colorStrokeCodeEditorResizeHandler": "color-stroke-code-editor-resize-handler",
|
|
12027
11950
|
"colorStrokeCodeEditorGutterActiveLineDefault": "color-stroke-code-editor-gutter-active-line-default",
|
|
12028
11951
|
"colorStrokeCodeEditorGutterActiveLineHover": "color-stroke-code-editor-gutter-active-line-hover",
|
|
12029
11952
|
"colorTextAccent": "color-text-accent",
|
|
@@ -12045,7 +11968,6 @@ module.exports.preset = {
|
|
|
12045
11968
|
"colorTextButtonPrimaryDefault": "color-text-button-primary-default",
|
|
12046
11969
|
"colorTextButtonPrimaryHover": "color-text-button-primary-hover",
|
|
12047
11970
|
"colorTextCalendarDateHover": "color-text-calendar-date-hover",
|
|
12048
|
-
"colorTextCalendarDateSelected": "color-text-calendar-date-selected",
|
|
12049
11971
|
"colorTextCalendarMonth": "color-text-calendar-month",
|
|
12050
11972
|
"colorTextCodeEditorGutterActiveLine": "color-text-code-editor-gutter-active-line",
|
|
12051
11973
|
"colorTextCodeEditorGutterDefault": "color-text-code-editor-gutter-default",
|
|
@@ -12311,7 +12233,6 @@ module.exports.preset = {
|
|
|
12311
12233
|
"spaceLayoutTogglePadding": "space-layout-toggle-padding",
|
|
12312
12234
|
"spaceModalContentBottom": "space-modal-content-bottom",
|
|
12313
12235
|
"spaceModalHorizontal": "space-modal-horizontal",
|
|
12314
|
-
"spaceOptionIconBigTop": "space-option-icon-big-top",
|
|
12315
12236
|
"spacePanelContentBottom": "space-panel-content-bottom",
|
|
12316
12237
|
"spacePanelContentTop": "space-panel-content-top",
|
|
12317
12238
|
"spacePanelDividerMarginHorizontal": "space-panel-divider-margin-horizontal",
|
|
@@ -12373,7 +12294,6 @@ module.exports.preset = {
|
|
|
12373
12294
|
"spaceXxl": "space-xxl",
|
|
12374
12295
|
"spaceXxxl": "space-xxxl",
|
|
12375
12296
|
"shadowContainer": "shadow-container",
|
|
12376
|
-
"shadowContainerStacked": "shadow-container-stacked",
|
|
12377
12297
|
"shadowContainerActive": "shadow-container-active",
|
|
12378
12298
|
"shadowDropdown": "shadow-dropdown",
|
|
12379
12299
|
"shadowDropup": "shadow-dropup",
|
|
@@ -12858,7 +12778,6 @@ module.exports.preset = {
|
|
|
12858
12778
|
"colorShadowMedium": "--color-shadow-medium-x7of55",
|
|
12859
12779
|
"colorShadowSide": "--color-shadow-side-rtsbda",
|
|
12860
12780
|
"colorStrokeChartLine": "--color-stroke-chart-line-3nsnk6",
|
|
12861
|
-
"colorStrokeCodeEditorResizeHandler": "--color-stroke-code-editor-resize-handler-atdd8r",
|
|
12862
12781
|
"colorStrokeCodeEditorGutterActiveLineDefault": "--color-stroke-code-editor-gutter-active-line-default-5hrdmu",
|
|
12863
12782
|
"colorStrokeCodeEditorGutterActiveLineHover": "--color-stroke-code-editor-gutter-active-line-hover-vqrb6s",
|
|
12864
12783
|
"colorTextAccent": "--color-text-accent-n1kmht",
|
|
@@ -12880,7 +12799,6 @@ module.exports.preset = {
|
|
|
12880
12799
|
"colorTextButtonPrimaryDefault": "--color-text-button-primary-default-mwl31m",
|
|
12881
12800
|
"colorTextButtonPrimaryHover": "--color-text-button-primary-hover-pw12ep",
|
|
12882
12801
|
"colorTextCalendarDateHover": "--color-text-calendar-date-hover-3fcriv",
|
|
12883
|
-
"colorTextCalendarDateSelected": "--color-text-calendar-date-selected-wc8ffc",
|
|
12884
12802
|
"colorTextCalendarMonth": "--color-text-calendar-month-ea0e93",
|
|
12885
12803
|
"colorTextCodeEditorGutterActiveLine": "--color-text-code-editor-gutter-active-line-2addhd",
|
|
12886
12804
|
"colorTextCodeEditorGutterDefault": "--color-text-code-editor-gutter-default-nlshs8",
|
|
@@ -13146,7 +13064,6 @@ module.exports.preset = {
|
|
|
13146
13064
|
"spaceLayoutTogglePadding": "--space-layout-toggle-padding-chwlhz",
|
|
13147
13065
|
"spaceModalContentBottom": "--space-modal-content-bottom-nl6ceq",
|
|
13148
13066
|
"spaceModalHorizontal": "--space-modal-horizontal-y5hnwp",
|
|
13149
|
-
"spaceOptionIconBigTop": "--space-option-icon-big-top-rs5wgf",
|
|
13150
13067
|
"spacePanelContentBottom": "--space-panel-content-bottom-24c6lu",
|
|
13151
13068
|
"spacePanelContentTop": "--space-panel-content-top-qvd1dr",
|
|
13152
13069
|
"spacePanelDividerMarginHorizontal": "--space-panel-divider-margin-horizontal-yw31p0",
|
|
@@ -13208,7 +13125,6 @@ module.exports.preset = {
|
|
|
13208
13125
|
"spaceXxl": "--space-xxl-32srm4",
|
|
13209
13126
|
"spaceXxxl": "--space-xxxl-aut1u7",
|
|
13210
13127
|
"shadowContainer": "--shadow-container-53ltfv",
|
|
13211
|
-
"shadowContainerStacked": "--shadow-container-stacked-y4nc75",
|
|
13212
13128
|
"shadowContainerActive": "--shadow-container-active-ypjjoc",
|
|
13213
13129
|
"shadowDropdown": "--shadow-dropdown-isf0w4",
|
|
13214
13130
|
"shadowDropup": "--shadow-dropup-2r02r5",
|
|
@@ -1754,10 +1754,6 @@ export var preset = {
|
|
|
1754
1754
|
"light": "{colorNeutral500}",
|
|
1755
1755
|
"dark": "{colorNeutral500}"
|
|
1756
1756
|
},
|
|
1757
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
1758
|
-
"light": "{colorNeutral650}",
|
|
1759
|
-
"dark": "{colorNeutral300}"
|
|
1760
|
-
},
|
|
1761
1757
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
1762
1758
|
"light": "{colorNeutral300}",
|
|
1763
1759
|
"dark": "{colorNeutral800}"
|
|
@@ -1842,10 +1838,6 @@ export var preset = {
|
|
|
1842
1838
|
"light": "{colorTextDropdownItemDefault}",
|
|
1843
1839
|
"dark": "{colorTextDropdownItemDefault}"
|
|
1844
1840
|
},
|
|
1845
|
-
"colorTextCalendarDateSelected": {
|
|
1846
|
-
"light": "{colorTextAccent}",
|
|
1847
|
-
"dark": "{colorTextAccent}"
|
|
1848
|
-
},
|
|
1849
1841
|
"colorTextCalendarMonth": {
|
|
1850
1842
|
"light": "{colorNeutral600}",
|
|
1851
1843
|
"dark": "{colorNeutral450}"
|
|
@@ -2630,10 +2622,6 @@ export var preset = {
|
|
|
2630
2622
|
"comfortable": "{spaceContainerHorizontal}",
|
|
2631
2623
|
"compact": "{spaceContainerHorizontal}"
|
|
2632
2624
|
},
|
|
2633
|
-
"spaceOptionIconBigTop": {
|
|
2634
|
-
"comfortable": "0px",
|
|
2635
|
-
"compact": "0px"
|
|
2636
|
-
},
|
|
2637
2625
|
"spacePanelContentBottom": {
|
|
2638
2626
|
"comfortable": "{spaceScaledXxxl}",
|
|
2639
2627
|
"compact": "{spaceScaledXxxl}"
|
|
@@ -2878,10 +2866,6 @@ export var preset = {
|
|
|
2878
2866
|
"light": "0px 0px 1px 1px #e9ebed, 0px 1px 8px 2px rgba(0, 7, 22, 0.12)",
|
|
2879
2867
|
"dark": "0px 1px 8px 2px rgba(0, 7, 22, 0.6)"
|
|
2880
2868
|
},
|
|
2881
|
-
"shadowContainerStacked": {
|
|
2882
|
-
"light": "-1px 1px 1px 0px #e9ebed, 1px 1px 1px 0px #e9ebed, 0px 9px 8px -7px rgb(0 7 22 / 12%), 8px 0px 8px -7px rgb(0 7 22 / 12%), -8px 0px 8px -7px rgb(0 7 22 / 12%)",
|
|
2883
|
-
"dark": "0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%)"
|
|
2884
|
-
},
|
|
2885
2869
|
"shadowContainerActive": {
|
|
2886
2870
|
"light": "0px 1px 1px 1px #e9ebed, 0px 6px 36px #0007161a",
|
|
2887
2871
|
"dark": "0px 1px 1px 1px #192534, 0px 6px 36px #00040c"
|
|
@@ -3104,10 +3088,6 @@ export var preset = {
|
|
|
3104
3088
|
"comfortable": "{spaceContainerHorizontal}",
|
|
3105
3089
|
"compact": "{spaceContainerHorizontal}"
|
|
3106
3090
|
},
|
|
3107
|
-
"spaceOptionIconBigTop": {
|
|
3108
|
-
"comfortable": "0px",
|
|
3109
|
-
"compact": "0px"
|
|
3110
|
-
},
|
|
3111
3091
|
"spacePanelContentBottom": {
|
|
3112
3092
|
"comfortable": "{spaceScaledXxxl}",
|
|
3113
3093
|
"compact": "{spaceScaledXxxl}"
|
|
@@ -4042,10 +4022,6 @@ export var preset = {
|
|
|
4042
4022
|
"light": "{colorNeutral500}",
|
|
4043
4023
|
"dark": "{colorNeutral500}"
|
|
4044
4024
|
},
|
|
4045
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
4046
|
-
"light": "{colorNeutral300}",
|
|
4047
|
-
"dark": "{colorNeutral300}"
|
|
4048
|
-
},
|
|
4049
4025
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
4050
4026
|
"light": "{colorNeutral800}",
|
|
4051
4027
|
"dark": "{colorNeutral800}"
|
|
@@ -4130,10 +4106,6 @@ export var preset = {
|
|
|
4130
4106
|
"light": "{colorTextDropdownItemDefault}",
|
|
4131
4107
|
"dark": "{colorTextDropdownItemDefault}"
|
|
4132
4108
|
},
|
|
4133
|
-
"colorTextCalendarDateSelected": {
|
|
4134
|
-
"light": "{colorTextAccent}",
|
|
4135
|
-
"dark": "{colorTextAccent}"
|
|
4136
|
-
},
|
|
4137
4109
|
"colorTextCalendarMonth": {
|
|
4138
4110
|
"light": "{colorNeutral450}",
|
|
4139
4111
|
"dark": "{colorNeutral450}"
|
|
@@ -4480,10 +4452,6 @@ export var preset = {
|
|
|
4480
4452
|
"light": "0px 1px 8px 2px rgba(0, 7, 22, 0.6)",
|
|
4481
4453
|
"dark": "0px 1px 8px 2px rgba(0, 7, 22, 0.6)"
|
|
4482
4454
|
},
|
|
4483
|
-
"shadowContainerStacked": {
|
|
4484
|
-
"light": "0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%)",
|
|
4485
|
-
"dark": "0px 9px 8px -7px rgb(0 7 22 / 60%), 8px 0px 8px -7px rgb(0 7 22 / 60%), -8px 0px 8px -7px rgb(0 7 22 / 60%)"
|
|
4486
|
-
},
|
|
4487
4455
|
"shadowContainerActive": {
|
|
4488
4456
|
"light": "0px 1px 1px 1px #192534, 0px 6px 36px #00040c",
|
|
4489
4457
|
"dark": "0px 1px 1px 1px #192534, 0px 6px 36px #00040c"
|
|
@@ -5228,10 +5196,6 @@ export var preset = {
|
|
|
5228
5196
|
"light": "{colorNeutral500}",
|
|
5229
5197
|
"dark": "{colorNeutral500}"
|
|
5230
5198
|
},
|
|
5231
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
5232
|
-
"light": "{colorNeutral300}",
|
|
5233
|
-
"dark": "{colorNeutral300}"
|
|
5234
|
-
},
|
|
5235
5199
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
5236
5200
|
"light": "{colorNeutral800}",
|
|
5237
5201
|
"dark": "{colorNeutral800}"
|
|
@@ -5316,10 +5280,6 @@ export var preset = {
|
|
|
5316
5280
|
"light": "{colorTextDropdownItemDefault}",
|
|
5317
5281
|
"dark": "{colorTextDropdownItemDefault}"
|
|
5318
5282
|
},
|
|
5319
|
-
"colorTextCalendarDateSelected": {
|
|
5320
|
-
"light": "{colorTextAccent}",
|
|
5321
|
-
"dark": "{colorTextAccent}"
|
|
5322
|
-
},
|
|
5323
5283
|
"colorTextCalendarMonth": {
|
|
5324
5284
|
"light": "{colorNeutral450}",
|
|
5325
5285
|
"dark": "{colorNeutral450}"
|
|
@@ -6346,10 +6306,6 @@ export var preset = {
|
|
|
6346
6306
|
"light": "{colorNeutral500}",
|
|
6347
6307
|
"dark": "{colorNeutral500}"
|
|
6348
6308
|
},
|
|
6349
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
6350
|
-
"light": "{colorNeutral650}",
|
|
6351
|
-
"dark": "{colorNeutral300}"
|
|
6352
|
-
},
|
|
6353
6309
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
6354
6310
|
"light": "{colorNeutral300}",
|
|
6355
6311
|
"dark": "{colorNeutral800}"
|
|
@@ -6434,10 +6390,6 @@ export var preset = {
|
|
|
6434
6390
|
"light": "{colorTextDropdownItemDefault}",
|
|
6435
6391
|
"dark": "{colorTextDropdownItemDefault}"
|
|
6436
6392
|
},
|
|
6437
|
-
"colorTextCalendarDateSelected": {
|
|
6438
|
-
"light": "{colorTextAccent}",
|
|
6439
|
-
"dark": "{colorTextAccent}"
|
|
6440
|
-
},
|
|
6441
6393
|
"colorTextCalendarMonth": {
|
|
6442
6394
|
"light": "{colorNeutral600}",
|
|
6443
6395
|
"dark": "{colorNeutral450}"
|
|
@@ -7464,10 +7416,6 @@ export var preset = {
|
|
|
7464
7416
|
"light": "{colorNeutral500}",
|
|
7465
7417
|
"dark": "{colorNeutral500}"
|
|
7466
7418
|
},
|
|
7467
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
7468
|
-
"light": "{colorNeutral650}",
|
|
7469
|
-
"dark": "{colorNeutral300}"
|
|
7470
|
-
},
|
|
7471
7419
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
7472
7420
|
"light": "{colorNeutral300}",
|
|
7473
7421
|
"dark": "{colorNeutral800}"
|
|
@@ -7552,10 +7500,6 @@ export var preset = {
|
|
|
7552
7500
|
"light": "{colorTextDropdownItemDefault}",
|
|
7553
7501
|
"dark": "{colorTextDropdownItemDefault}"
|
|
7554
7502
|
},
|
|
7555
|
-
"colorTextCalendarDateSelected": {
|
|
7556
|
-
"light": "{colorTextAccent}",
|
|
7557
|
-
"dark": "{colorTextAccent}"
|
|
7558
|
-
},
|
|
7559
7503
|
"colorTextCalendarMonth": {
|
|
7560
7504
|
"light": "{colorNeutral600}",
|
|
7561
7505
|
"dark": "{colorNeutral450}"
|
|
@@ -8582,10 +8526,6 @@ export var preset = {
|
|
|
8582
8526
|
"light": "{colorNeutral500}",
|
|
8583
8527
|
"dark": "{colorNeutral500}"
|
|
8584
8528
|
},
|
|
8585
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
8586
|
-
"light": "{colorNeutral650}",
|
|
8587
|
-
"dark": "{colorNeutral300}"
|
|
8588
|
-
},
|
|
8589
8529
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
8590
8530
|
"light": "{colorNeutral300}",
|
|
8591
8531
|
"dark": "{colorNeutral800}"
|
|
@@ -8670,10 +8610,6 @@ export var preset = {
|
|
|
8670
8610
|
"light": "{colorTextDropdownItemDefault}",
|
|
8671
8611
|
"dark": "{colorTextDropdownItemDefault}"
|
|
8672
8612
|
},
|
|
8673
|
-
"colorTextCalendarDateSelected": {
|
|
8674
|
-
"light": "{colorTextAccent}",
|
|
8675
|
-
"dark": "{colorTextAccent}"
|
|
8676
|
-
},
|
|
8677
8613
|
"colorTextCalendarMonth": {
|
|
8678
8614
|
"light": "{colorNeutral600}",
|
|
8679
8615
|
"dark": "{colorNeutral450}"
|
|
@@ -9702,10 +9638,6 @@ export var preset = {
|
|
|
9702
9638
|
"light": "{colorNeutral500}",
|
|
9703
9639
|
"dark": "{colorNeutral500}"
|
|
9704
9640
|
},
|
|
9705
|
-
"colorStrokeCodeEditorResizeHandler": {
|
|
9706
|
-
"light": "{colorNeutral300}",
|
|
9707
|
-
"dark": "{colorNeutral300}"
|
|
9708
|
-
},
|
|
9709
9641
|
"colorStrokeCodeEditorGutterActiveLineDefault": {
|
|
9710
9642
|
"light": "{colorNeutral800}",
|
|
9711
9643
|
"dark": "{colorNeutral800}"
|
|
@@ -9790,10 +9722,6 @@ export var preset = {
|
|
|
9790
9722
|
"light": "{colorTextDropdownItemDefault}",
|
|
9791
9723
|
"dark": "{colorTextDropdownItemDefault}"
|
|
9792
9724
|
},
|
|
9793
|
-
"colorTextCalendarDateSelected": {
|
|
9794
|
-
"light": "{colorTextAccent}",
|
|
9795
|
-
"dark": "{colorTextAccent}"
|
|
9796
|
-
},
|
|
9797
9725
|
"colorTextCalendarMonth": {
|
|
9798
9726
|
"light": "{colorNeutral450}",
|
|
9799
9727
|
"dark": "{colorNeutral450}"
|
|
@@ -10611,7 +10539,6 @@ export var preset = {
|
|
|
10611
10539
|
"colorShadowMedium": "color",
|
|
10612
10540
|
"colorShadowSide": "color",
|
|
10613
10541
|
"colorStrokeChartLine": "color",
|
|
10614
|
-
"colorStrokeCodeEditorResizeHandler": "color",
|
|
10615
10542
|
"colorStrokeCodeEditorGutterActiveLineDefault": "color",
|
|
10616
10543
|
"colorStrokeCodeEditorGutterActiveLineHover": "color",
|
|
10617
10544
|
"colorTextAccent": "color",
|
|
@@ -10633,7 +10560,6 @@ export var preset = {
|
|
|
10633
10560
|
"colorTextButtonPrimaryDefault": "color",
|
|
10634
10561
|
"colorTextButtonPrimaryHover": "color",
|
|
10635
10562
|
"colorTextCalendarDateHover": "color",
|
|
10636
|
-
"colorTextCalendarDateSelected": "color",
|
|
10637
10563
|
"colorTextCalendarMonth": "color",
|
|
10638
10564
|
"colorTextCodeEditorGutterActiveLine": "color",
|
|
10639
10565
|
"colorTextCodeEditorGutterDefault": "color",
|
|
@@ -10807,7 +10733,6 @@ export var preset = {
|
|
|
10807
10733
|
"spaceLayoutTogglePadding": "density",
|
|
10808
10734
|
"spaceModalContentBottom": "density",
|
|
10809
10735
|
"spaceModalHorizontal": "density",
|
|
10810
|
-
"spaceOptionIconBigTop": "density",
|
|
10811
10736
|
"spacePanelContentBottom": "density",
|
|
10812
10737
|
"spacePanelContentTop": "density",
|
|
10813
10738
|
"spacePanelDividerMarginHorizontal": "density",
|
|
@@ -10869,7 +10794,6 @@ export var preset = {
|
|
|
10869
10794
|
"spaceXxl": "density",
|
|
10870
10795
|
"spaceXxxl": "density",
|
|
10871
10796
|
"shadowContainer": "color",
|
|
10872
|
-
"shadowContainerStacked": "color",
|
|
10873
10797
|
"shadowContainerActive": "color",
|
|
10874
10798
|
"shadowDropdown": "color",
|
|
10875
10799
|
"shadowDropup": "color",
|
|
@@ -12023,7 +11947,6 @@ export var preset = {
|
|
|
12023
11947
|
"colorShadowMedium": "color-shadow-medium",
|
|
12024
11948
|
"colorShadowSide": "color-shadow-side",
|
|
12025
11949
|
"colorStrokeChartLine": "color-stroke-chart-line",
|
|
12026
|
-
"colorStrokeCodeEditorResizeHandler": "color-stroke-code-editor-resize-handler",
|
|
12027
11950
|
"colorStrokeCodeEditorGutterActiveLineDefault": "color-stroke-code-editor-gutter-active-line-default",
|
|
12028
11951
|
"colorStrokeCodeEditorGutterActiveLineHover": "color-stroke-code-editor-gutter-active-line-hover",
|
|
12029
11952
|
"colorTextAccent": "color-text-accent",
|
|
@@ -12045,7 +11968,6 @@ export var preset = {
|
|
|
12045
11968
|
"colorTextButtonPrimaryDefault": "color-text-button-primary-default",
|
|
12046
11969
|
"colorTextButtonPrimaryHover": "color-text-button-primary-hover",
|
|
12047
11970
|
"colorTextCalendarDateHover": "color-text-calendar-date-hover",
|
|
12048
|
-
"colorTextCalendarDateSelected": "color-text-calendar-date-selected",
|
|
12049
11971
|
"colorTextCalendarMonth": "color-text-calendar-month",
|
|
12050
11972
|
"colorTextCodeEditorGutterActiveLine": "color-text-code-editor-gutter-active-line",
|
|
12051
11973
|
"colorTextCodeEditorGutterDefault": "color-text-code-editor-gutter-default",
|
|
@@ -12311,7 +12233,6 @@ export var preset = {
|
|
|
12311
12233
|
"spaceLayoutTogglePadding": "space-layout-toggle-padding",
|
|
12312
12234
|
"spaceModalContentBottom": "space-modal-content-bottom",
|
|
12313
12235
|
"spaceModalHorizontal": "space-modal-horizontal",
|
|
12314
|
-
"spaceOptionIconBigTop": "space-option-icon-big-top",
|
|
12315
12236
|
"spacePanelContentBottom": "space-panel-content-bottom",
|
|
12316
12237
|
"spacePanelContentTop": "space-panel-content-top",
|
|
12317
12238
|
"spacePanelDividerMarginHorizontal": "space-panel-divider-margin-horizontal",
|
|
@@ -12373,7 +12294,6 @@ export var preset = {
|
|
|
12373
12294
|
"spaceXxl": "space-xxl",
|
|
12374
12295
|
"spaceXxxl": "space-xxxl",
|
|
12375
12296
|
"shadowContainer": "shadow-container",
|
|
12376
|
-
"shadowContainerStacked": "shadow-container-stacked",
|
|
12377
12297
|
"shadowContainerActive": "shadow-container-active",
|
|
12378
12298
|
"shadowDropdown": "shadow-dropdown",
|
|
12379
12299
|
"shadowDropup": "shadow-dropup",
|
|
@@ -12858,7 +12778,6 @@ export var preset = {
|
|
|
12858
12778
|
"colorShadowMedium": "--color-shadow-medium-x7of55",
|
|
12859
12779
|
"colorShadowSide": "--color-shadow-side-rtsbda",
|
|
12860
12780
|
"colorStrokeChartLine": "--color-stroke-chart-line-3nsnk6",
|
|
12861
|
-
"colorStrokeCodeEditorResizeHandler": "--color-stroke-code-editor-resize-handler-atdd8r",
|
|
12862
12781
|
"colorStrokeCodeEditorGutterActiveLineDefault": "--color-stroke-code-editor-gutter-active-line-default-5hrdmu",
|
|
12863
12782
|
"colorStrokeCodeEditorGutterActiveLineHover": "--color-stroke-code-editor-gutter-active-line-hover-vqrb6s",
|
|
12864
12783
|
"colorTextAccent": "--color-text-accent-n1kmht",
|
|
@@ -12880,7 +12799,6 @@ export var preset = {
|
|
|
12880
12799
|
"colorTextButtonPrimaryDefault": "--color-text-button-primary-default-mwl31m",
|
|
12881
12800
|
"colorTextButtonPrimaryHover": "--color-text-button-primary-hover-pw12ep",
|
|
12882
12801
|
"colorTextCalendarDateHover": "--color-text-calendar-date-hover-3fcriv",
|
|
12883
|
-
"colorTextCalendarDateSelected": "--color-text-calendar-date-selected-wc8ffc",
|
|
12884
12802
|
"colorTextCalendarMonth": "--color-text-calendar-month-ea0e93",
|
|
12885
12803
|
"colorTextCodeEditorGutterActiveLine": "--color-text-code-editor-gutter-active-line-2addhd",
|
|
12886
12804
|
"colorTextCodeEditorGutterDefault": "--color-text-code-editor-gutter-default-nlshs8",
|
|
@@ -13146,7 +13064,6 @@ export var preset = {
|
|
|
13146
13064
|
"spaceLayoutTogglePadding": "--space-layout-toggle-padding-chwlhz",
|
|
13147
13065
|
"spaceModalContentBottom": "--space-modal-content-bottom-nl6ceq",
|
|
13148
13066
|
"spaceModalHorizontal": "--space-modal-horizontal-y5hnwp",
|
|
13149
|
-
"spaceOptionIconBigTop": "--space-option-icon-big-top-rs5wgf",
|
|
13150
13067
|
"spacePanelContentBottom": "--space-panel-content-bottom-24c6lu",
|
|
13151
13068
|
"spacePanelContentTop": "--space-panel-content-top-qvd1dr",
|
|
13152
13069
|
"spacePanelDividerMarginHorizontal": "--space-panel-divider-margin-horizontal-yw31p0",
|
|
@@ -13208,7 +13125,6 @@ export var preset = {
|
|
|
13208
13125
|
"spaceXxl": "--space-xxl-32srm4",
|
|
13209
13126
|
"spaceXxxl": "--space-xxxl-aut1u7",
|
|
13210
13127
|
"shadowContainer": "--shadow-container-53ltfv",
|
|
13211
|
-
"shadowContainerStacked": "--shadow-container-stacked-y4nc75",
|
|
13212
13128
|
"shadowContainerActive": "--shadow-container-active-ypjjoc",
|
|
13213
13129
|
"shadowDropdown": "--shadow-dropdown-isf0w4",
|
|
13214
13130
|
"shadowDropup": "--shadow-dropup-2r02r5",
|
|
@@ -262,14 +262,19 @@ function ItemContainerComponent({ item, placed, acquired, inTransition, transfor
|
|
|
262
262
|
if (inTransition) {
|
|
263
263
|
itemTransitionClassNames.push(styles.inTransition);
|
|
264
264
|
}
|
|
265
|
-
if (transition
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
265
|
+
if (transition) {
|
|
266
|
+
if (transition.interactionType === "pointer") {
|
|
267
|
+
// Adjust the dragged/resized item to the pointer's location.
|
|
268
|
+
itemTransitionClassNames.push(transition.operation === "resize" ? styles.resized : styles.dragged);
|
|
269
|
+
itemTransitionStyle.insetInlineStart = (_a = transition.positionTransform) === null || _a === void 0 ? void 0 : _a.x;
|
|
270
|
+
itemTransitionStyle.insetBlockStart = (_b = transition.positionTransform) === null || _b === void 0 ? void 0 : _b.y;
|
|
271
|
+
itemTransitionStyle.inlineSize = (_c = transition.sizeTransform) === null || _c === void 0 ? void 0 : _c.width;
|
|
272
|
+
itemTransitionStyle.blockSize = (_d = transition.sizeTransform) === null || _d === void 0 ? void 0 : _d.height;
|
|
273
|
+
itemTransitionStyle.pointerEvents = "none";
|
|
274
|
+
}
|
|
275
|
+
if (transition.interactionType === "keyboard") {
|
|
276
|
+
itemTransitionClassNames.push(styles.keyboardDragged);
|
|
277
|
+
}
|
|
273
278
|
}
|
|
274
279
|
if (isHidden) {
|
|
275
280
|
itemTransitionClassNames.push(styles.hidden);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/item-container/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EACL,aAAa,EAEb,UAAU,EAMV,UAAU,EACV,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AACrH,OAAO,EACL,qCAAqC,GAEtC,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EAKL,YAAY,EACZ,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,m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,KAAK,CAAC;oBACnE,WAAW,EAAE,0BAA0B,CAAC;wBACtC,cAAc,EAAE,QAAQ;wBACxB,iBAAiB,EAAE,UAAU;wBAC7B,oBAAoB,EAAE,mBAAmB,CAAC,WAAW,CAAC,KAAK;wBAC3D,eAAe,EAAE,SAAS;qBAC3B,CAAC;oBACF,gBAAgB,EAAE,yBAAyB;oBAC3C,kBAAkB,EAChB,mBAAmB,CAAC,WAAW,CAAC,KAAK,KAAK,kBAAkB,IAAI,CAAC,YAAY,IAAI,QAAQ,CAAC;iBAC7F;gBACD,YAAY,EAAE,MAAM;oBAClB,CAAC,CAAC;wBACE,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ,CAAC;wBACtD,SAAS,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC;wBACrE,WAAW,EAAE,0BAA0B,CAAC;4BACtC,cAAc,EAAE,QAAQ;4BACxB,iBAAiB,EAAE,UAAU;4BAC7B,oBAAoB,EAAE,qBAAqB,CAAC,WAAW,CAAC,KAAK;4BAC7D,eAAe,EAAE,QAAQ;yBAC1B,CAAC;wBACF,gBAAgB,EAAE,yBAAyB;qBAC5C;oBACH,CAAC,CAAC,IAAI;aACT,YAEA,WAAW,CAAC,OAAO,GACC,GACnB,CACP,CAAC;IAEF,OAAO,eAAe,CAAC,CAAC,CAAC,wBAAM,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAO,CAAC,CAAC,CAAC,OAAO,CAAC;AACvF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport {\n createContext,\n CSSProperties,\n forwardRef,\n KeyboardEvent,\n PointerEvent as ReactPointerEvent,\n ReactNode,\n Ref,\n RefObject,\n useContext,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { CSS as CSSUtil } from \"@dnd-kit/utilities\";\nimport clsx from \"clsx\";\n\nimport { createSingletonHandler, getLogicalBoundingClientRect } from \"@cloudscape-design/component-toolkit/internal\";\nimport {\n useInternalDragHandleInteractionState,\n UseInternalDragHandleInteractionStateProps,\n} from \"@cloudscape-design/components/internal/do-not-use/drag-handle\";\n\nimport {\n DragAndDropData,\n DropTargetContext,\n InteractionType,\n Operation,\n useDraggable,\n useDragSubscription,\n} from \"../dnd-controller/controller\";\nimport { BoardItemDefinitionBase, Direction, ItemId, Transform } from \"../interfaces\";\nimport { Coordinates } from \"../utils/coordinates\";\nimport { getNormalizedElementRect } from \"../utils/screen\";\nimport { throttle } from \"../utils/throttle\";\nimport { getCollisionRect } from \"./get-collision-rect\";\nimport { getNextDroppable } from \"./get-next-droppable\";\nimport {\n calculateInitialPointerData,\n determineHandleActiveState,\n getDndOperationType,\n hasPointerMovedBeyondThreshold,\n} from \"./utils\";\n\nimport styles from \"./styles.css.js\";\n\nexport interface ItemContainerRef {\n focusDragHandle(): void;\n}\n\nexport type HandleActiveState = null | \"pointer\" | \"uap\";\n\ninterface ItemContextType {\n /**\n * Flag indicating if a drag or resize interaction is currently active.\n */\n isActive: boolean;\n /**\n * Flag indicating if the item is currently hidden.\n * (When a board item is moved from the palette to the board and the transition is not submitted)\n */\n isHidden: boolean;\n dragHandle: {\n /**\n * Ref to the drag button. Used to focus the drag handle when moving an item\n * from the palette to the board via keyboard or UAP actions.\n */\n ref: RefObject<HTMLDivElement>;\n /**\n * Listen to pointerDown events on the drag handle.\n * Used to start a transition and attach global event handlers.\n */\n onPointerDown(event: ReactPointerEvent): void;\n /**\n * Listen to keyDown events on the drag handle.\n */\n onKeyDown(event: KeyboardEvent): void;\n /**\n * Indicating if drag handle is active.\n */\n activeState: HandleActiveState;\n /**\n * Listen to UAP direction button clicks.\n */\n onDirectionClick(direction: KeyboardEvent[\"key\"], operation: HandleOperation): void;\n /**\n * Flag indicating if the UAP buttons should be shown. E.g. when a item is moved from\n * the palette via keyboard or UAP to the board.\n */\n initialShowButtons?: boolean;\n };\n resizeHandle: null | {\n /**\n * Listen to pointerDown events on the drag handle.\n * Used to start a transition and attach global event handlers.\n */\n onPointerDown(event: ReactPointerEvent): void;\n /**\n * Listen to keyDown events on the drag handle.\n */\n onKeyDown(event: KeyboardEvent): void;\n /**\n * Indicating if resize handle is active.\n */\n activeState: HandleActiveState;\n /**\n * Listen to UAP direction button clicks.\n */\n onDirectionClick(direction: KeyboardEvent[\"key\"], operation: HandleOperation): void;\n };\n}\n\nexport interface Transition {\n itemId: ItemId;\n operation: Operation;\n interactionType: InteractionType;\n sizeTransform: null | { width: number; height: number };\n positionTransform: null | { x: number; y: number };\n hasDropTarget?: boolean;\n}\n\nexport type HandleOperation = \"drag\" | \"resize\";\n\nexport const ItemContext = createContext<ItemContextType | null>(null);\n\nexport function useItemContext() {\n const ctx = useContext(ItemContext);\n if (!ctx) {\n throw new Error(\"Invariant violation: no board item context.\");\n }\n return ctx;\n}\n\n/**\n * Defines item's parameters and its relation with the layout.\n *\n * `item` - the unique board item base object to be used in d&d context.\n * `placed` - specifies if the item already belongs to the board.\n * `acquired` - specifies if the item is essentially a copy temporarily acquired by a droppable but not submitted yet.\n * `inTransition` - specifies if the item is currently being moved.\n * `transform` - specifies if the item's position needs to be altered.\n * `getItemSize` - item size getter that takes droppable context as argument.\n * `onKeyMove` - a callback that fires when arrow keys are pressed in drag- or resize handle.\n */\nexport interface ItemContainerProps {\n item: BoardItemDefinitionBase<unknown>;\n placed: boolean;\n acquired: boolean;\n inTransition: boolean;\n transform: Transform | undefined;\n getItemSize: (context: null | DropTargetContext) => {\n width: number;\n minWidth: number;\n maxWidth: number;\n height: number;\n minHeight: number;\n maxHeight: number;\n };\n\n onKeyMove?(direction: Direction): void;\n\n children: (hasDropTarget: boolean) => ReactNode;\n isRtl: () => boolean;\n}\n\nexport const ItemContainer = forwardRef(ItemContainerComponent);\n\n// The amount of distance after pointer down that the cursor is allowed to\n// jitter for a subsequent mouseup to still register as a \"press\" instead of\n// a drag. A little allowance is needed for usability reasons, but this number\n// isn't set in stone.\nexport const CLICK_DRAG_THRESHOLD = 3;\n\n// We use singleton helper to avoid creating event listeners per each board item.\nconst usePointerEventListeners = createSingletonHandler<\n { type: \"move\"; event: PointerEvent } | { type: \"up\"; event: PointerEvent }\n>((setEvent) => {\n const handleGlobalPointerMove = (event: PointerEvent) => setEvent({ type: \"move\", event });\n const handleGlobalPointerUp = (event: PointerEvent) => setEvent({ type: \"up\", event });\n const controller = new AbortController();\n window.addEventListener(\"pointermove\", handleGlobalPointerMove, { signal: controller.signal });\n window.addEventListener(\"pointerup\", handleGlobalPointerUp, { signal: controller.signal });\n return () => controller.abort();\n});\n\nfunction ItemContainerComponent(\n { item, placed, acquired, inTransition, transform, getItemSize, onKeyMove, children, isRtl }: ItemContainerProps,\n ref: Ref<ItemContainerRef>,\n) {\n const originalSizeRef = useRef({ width: 0, height: 0 });\n const pointerOffsetRef = useRef(new Coordinates({ x: 0, y: 0 }));\n const pointerBoundariesRef = useRef<null | Coordinates>(null);\n const [transition, setTransition] = useState<null | Transition>(null);\n const [isHidden, setIsHidden] = useState(false);\n const muteEventsRef = useRef(false);\n const itemRef = useRef<HTMLDivElement>(null);\n // Keeps the starting position of active pointer-based d&d transition.\n // If undefined - it means the pointer-based d&d is not engaged.\n const initialPointerDownPosition = useRef<{ x: number; y: number } | undefined>();\n const draggableApi = useDraggable({\n draggableItem: item,\n getCollisionRect: (operation, coordinates, dropTarget) => {\n const sizeOverride = operation === \"insert\" && dropTarget ? getItemSize(dropTarget) : null;\n return getCollisionRect(operation, itemRef.current!, coordinates, sizeOverride);\n },\n });\n\n function updateTransition({\n operation,\n interactionType,\n draggableItem,\n collisionRect,\n coordinates,\n dropTarget,\n }: DragAndDropData) {\n if (item.id === draggableItem.id) {\n const [width, height] = [collisionRect.right - collisionRect.left, collisionRect.bottom - collisionRect.top];\n const pointerOffset = pointerOffsetRef.current;\n\n if (operation === \"resize\") {\n setTransition({\n operation,\n interactionType,\n itemId: draggableItem.id,\n sizeTransform: {\n width: Math.max(getItemSize(null).minWidth, Math.min(getItemSize(null).maxWidth, width - pointerOffset.x)),\n height: Math.max(getItemSize(null).minHeight, height - pointerOffset.y),\n },\n positionTransform: null,\n });\n } else if (operation === \"insert\" || operation === \"reorder\") {\n setTransition({\n operation,\n interactionType,\n itemId: draggableItem.id,\n sizeTransform: dropTarget ? getItemSize(dropTarget) : originalSizeRef.current,\n positionTransform: { x: coordinates.x - pointerOffset.x, y: coordinates.y - pointerOffset.y },\n hasDropTarget: !!dropTarget,\n });\n }\n }\n }\n\n useDragSubscription(\"start\", (detail) => updateTransition(detail));\n useDragSubscription(\"update\", (detail) => updateTransition(detail));\n useDragSubscription(\"submit\", () => {\n setTransition(null);\n setIsHidden(false);\n muteEventsRef.current = false;\n });\n useDragSubscription(\"discard\", () => {\n setTransition(null);\n setIsHidden(false);\n muteEventsRef.current = false;\n });\n\n // Handles incremental transition logic shared between different keyboard and UAP interactions.\n function handleIncrementalTransition(operation: HandleOperation, submitExisting = false) {\n // The acquired item is a copy and does not have the transition state.\n // However, pressing \"Space\" or \"Enter\" on the acquired item must submit the active transition.\n if (acquired) {\n return draggableApi.submitTransition();\n }\n\n // Submit existing transition if requested and one exists\n if (submitExisting && transition) {\n return draggableApi.submitTransition();\n }\n\n const rect = getNormalizedElementRect(itemRef.current!);\n const coordinates = new Coordinates({\n x: operation === \"drag\" ? rect.left : rect.right,\n y: operation === \"drag\" ? rect.top : rect.bottom,\n });\n\n if (operation === \"drag\" && !placed) {\n draggableApi.start(\"insert\", \"keyboard\", coordinates);\n } else if (operation === \"drag\") {\n draggableApi.start(\"reorder\", \"keyboard\", coordinates);\n } else {\n draggableApi.start(\"resize\", \"keyboard\", coordinates);\n }\n }\n\n function handleInsert(direction: Direction) {\n // Find the closest droppable (in the direction) to the item.\n const droppables = draggableApi.getDroppables();\n const nextDroppable = getNextDroppable({\n draggableElement: itemRef.current!,\n droppables,\n direction,\n isRtl: isRtl(),\n });\n\n if (!nextDroppable) {\n // TODO: add announcement\n // Context: the keyboard insertion only works when there is some droppable area in the specified direction.\n // That means that only some arrow keys might work which is confusing for a screen-reader user.\n // Alternatively, we can consider a multi-step insertion where the user would first explicitly select the desired board.\n return;\n }\n\n // Notify the respective droppable of the intention to insert the item in it.\n draggableApi.acquire(nextDroppable, () => children(true));\n setIsHidden(true);\n muteEventsRef.current = true;\n }\n\n function handleDirectionalMovement(direction: Direction, operation: HandleOperation) {\n const canInsert = transition && operation === \"drag\" && !placed;\n const canNavigate = transition || operation === \"drag\";\n if (canInsert) {\n handleInsert(direction);\n } else if (canNavigate) {\n onKeyMove?.(direction);\n }\n }\n\n function onHandleKeyDown(operation: HandleOperation, event: KeyboardEvent) {\n // We do not expect keyboard input when pointer-based d&d is performed.\n // Upon receiving any, we discard the current transition immediately.\n if (transition && initialPointerDownPosition.current) {\n initialPointerDownPosition.current = undefined;\n draggableApi.discardTransition();\n return;\n }\n\n const discard = () => {\n if (transition || acquired) {\n draggableApi.discardTransition();\n }\n };\n switch (event.key) {\n case \"ArrowUp\":\n return handleDirectionalMovement(\"up\", operation);\n case \"ArrowDown\":\n return handleDirectionalMovement(\"down\", operation);\n case \"ArrowLeft\":\n return handleDirectionalMovement(\"left\", operation);\n case \"ArrowRight\":\n return handleDirectionalMovement(\"right\", operation);\n case \" \":\n case \"Enter\":\n return handleIncrementalTransition(operation, true);\n case \"Escape\":\n return discard();\n }\n }\n\n function onBlur() {\n // When drag- or resize handle on palette or board item loses focus the transition must be submitted with two exceptions:\n // 1. If the last interaction is not \"keyboard\" (the user clicked on another handle issuing a new transition);\n // 2. If the item is acquired by the board (in that case the focus moves to the board item which is expected, palette item is hidden and all events handlers must be muted).\n selectedHook.current.processBlur();\n\n if (acquired || (transition && transition.interactionType === \"keyboard\" && !muteEventsRef.current)) {\n initialPointerDownPosition.current = undefined;\n draggableApi.submitTransition();\n }\n }\n\n // Pointer-down handler, added to each drag- and resize handle.\n function onHandlePointerDown(event: ReactPointerEvent, operation: HandleOperation) {\n // Prevent UI issues when right-clicking: in such a case the OS context menu will be shown and\n // the board while the board-item is active. Because of the context menu under the pointer,\n // onPointerUp is not called anymore. In such a case the board item would stuck in onPointerUp.\n if (event.button !== 0) {\n return;\n }\n initialPointerDownPosition.current = { x: event.clientX, y: event.clientY };\n\n if (operation === \"drag\") {\n selectedHook.current = dragInteractionHook;\n } else {\n selectedHook.current = resizeInteractionHook;\n }\n selectedHook.current.processPointerDown(event.nativeEvent);\n }\n // Global pointer-move and pointer-up handlers.\n usePointerEventListeners(({ type, event }) => {\n switch (type) {\n case \"move\": {\n if (hasPointerMovedBeyondThreshold(event, initialPointerDownPosition.current)) {\n selectedHook.current.processPointerMove(event);\n }\n break;\n }\n case \"up\": {\n if (initialPointerDownPosition.current) {\n selectedHook.current.processPointerUp(event);\n }\n initialPointerDownPosition.current = undefined;\n break;\n }\n }\n });\n\n function handlePointerInteractionStart(event: PointerEvent, operation: \"drag\" | \"resize\") {\n const currentItemElement = itemRef.current;\n if (!currentItemElement) {\n console.warn(\"ItemContainer: itemRef.current is not available on interaction start.\");\n return;\n }\n\n const rect = getLogicalBoundingClientRect(currentItemElement);\n originalSizeRef.current = { width: rect.inlineSize, height: rect.blockSize };\n\n const { pointerOffset, pointerBoundaries } = calculateInitialPointerData({\n event,\n operation,\n rect,\n getMinSize: () => getItemSize(null),\n isRtl: isRtl(),\n });\n pointerOffsetRef.current = pointerOffset;\n pointerBoundariesRef.current = pointerBoundaries;\n\n const dndOperation = getDndOperationType(operation, placed);\n const startCoordinates = Coordinates.fromEvent(event, { isRtl: isRtl() });\n draggableApi.start(dndOperation, \"pointer\", startCoordinates);\n }\n\n const onHandleDndTransitionActive = throttle((event: PointerEvent) => {\n const coordinates = Coordinates.fromEvent(event, { isRtl: isRtl() });\n draggableApi.updateTransition(\n new Coordinates({\n x: Math.max(coordinates.x, pointerBoundariesRef.current?.x ?? Number.NEGATIVE_INFINITY),\n y: Math.max(coordinates.y, pointerBoundariesRef.current?.y ?? Number.NEGATIVE_INFINITY),\n }),\n );\n }, 10) as (event: PointerEvent) => void;\n\n const itemTransitionStyle: CSSProperties = {};\n const itemTransitionClassNames: string[] = [];\n\n if (inTransition) {\n itemTransitionClassNames.push(styles.inTransition);\n }\n\n if (transition && transition.interactionType === \"pointer\") {\n // Adjust the dragged/resized item to the pointer's location.\n itemTransitionClassNames.push(transition.operation === \"resize\" ? styles.resized : styles.dragged);\n itemTransitionStyle.insetInlineStart = transition.positionTransform?.x;\n itemTransitionStyle.insetBlockStart = transition.positionTransform?.y;\n itemTransitionStyle.inlineSize = transition.sizeTransform?.width;\n itemTransitionStyle.blockSize = transition.sizeTransform?.height;\n itemTransitionStyle.pointerEvents = \"none\";\n }\n\n if (isHidden) {\n itemTransitionClassNames.push(styles.hidden);\n }\n\n if (transform) {\n // The moved items positions are altered with CSS transform.\n if (transform.type === \"move\") {\n itemTransitionClassNames.push(styles.transformed);\n itemTransitionStyle.transform = CSSUtil.Transform.toString({\n x: transform.x,\n y: transform.y,\n scaleX: 1,\n scaleY: 1,\n });\n itemTransitionStyle.width = transform.width + \"px\";\n itemTransitionStyle.height = transform.height + \"px\";\n }\n // The item is removed from the DOM after animations play.\n // During the animations the removed item is hidden with styles.\n if (transform.type === \"remove\") {\n itemTransitionClassNames.push(styles.removed);\n }\n }\n\n const dragHandleRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => ({\n focusDragHandle: () => {\n return dragHandleRef.current?.focus();\n },\n }));\n\n const dragHookProps: UseInternalDragHandleInteractionStateProps = {\n onDndStartAction: (event) => handlePointerInteractionStart(event, \"drag\"),\n onDndActiveAction: onHandleDndTransitionActive,\n onDndEndAction: () => transition && draggableApi.submitTransition(),\n onUapActionStartAction: () => handleIncrementalTransition(\"drag\"),\n };\n const resizeHookProps: UseInternalDragHandleInteractionStateProps = {\n onDndStartAction: (event) => handlePointerInteractionStart(event, \"resize\"),\n onDndActiveAction: onHandleDndTransitionActive,\n onDndEndAction: () => transition && draggableApi.submitTransition(),\n onUapActionStartAction: () => handleIncrementalTransition(\"resize\"),\n };\n\n // When d&d is active, either drag- or resize hook should be used.\n // We determine the correct one in the onHandlePointerDown handler, and store it to the selectedHook ref.\n const dragInteractionHook = useInternalDragHandleInteractionState(dragHookProps);\n const resizeInteractionHook = useInternalDragHandleInteractionState(resizeHookProps);\n const selectedHook = useRef(dragInteractionHook);\n\n const isActive = (!!transition && !isHidden) || !!acquired;\n const shouldUsePortal =\n transition?.operation === \"insert\" &&\n transition?.interactionType === \"pointer\" &&\n selectedHook.current.interaction.value === \"dnd-active\";\n const childrenRef = useRef<ReactNode>(null);\n if (!inTransition || isActive) {\n childrenRef.current = children(!!transition?.hasDropTarget);\n }\n\n const content = (\n <div\n ref={itemRef}\n className={clsx(styles.root, ...itemTransitionClassNames)}\n style={itemTransitionStyle}\n data-item-id={item.id}\n onBlur={onBlur}\n >\n <ItemContext.Provider\n value={{\n isActive,\n isHidden,\n dragHandle: {\n ref: dragHandleRef,\n onPointerDown: (e) => onHandlePointerDown(e, \"drag\"),\n onKeyDown: (event: KeyboardEvent) => onHandleKeyDown(\"drag\", event),\n activeState: determineHandleActiveState({\n isHandleActive: isActive,\n currentTransition: transition,\n interactionHookValue: dragInteractionHook.interaction.value,\n targetOperation: \"reorder\",\n }),\n onDirectionClick: handleDirectionalMovement,\n initialShowButtons:\n dragInteractionHook.interaction.value === \"uap-action-start\" || (inTransition && acquired),\n },\n resizeHandle: placed\n ? {\n onPointerDown: (e) => onHandlePointerDown(e, \"resize\"),\n onKeyDown: (event: KeyboardEvent) => onHandleKeyDown(\"resize\", event),\n activeState: determineHandleActiveState({\n isHandleActive: isActive,\n currentTransition: transition,\n interactionHookValue: resizeInteractionHook.interaction.value,\n targetOperation: \"resize\",\n }),\n onDirectionClick: handleDirectionalMovement,\n }\n : null,\n }}\n >\n {childrenRef.current}\n </ItemContext.Provider>\n </div>\n );\n\n return shouldUsePortal ? <div>{createPortal(content, document.body)}</div> : content;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/internal/item-container/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EACL,aAAa,EAEb,UAAU,EAMV,UAAU,EACV,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,GAAG,IAAI,OAAO,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AACrH,OAAO,EACL,qCAAqC,GAEtC,MAAM,+DAA+D,CAAC;AAEvE,OAAO,EAKL,YAAY,EACZ,mBAAmB,GACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,8BAA8B,GAC/B,MAAM,SAAS,CAAC;AAEjB,OAAO,MAAM,MAAM,iBAAiB,CAAC;AA+ErC,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAyB,IAAI,CAAC,CAAC;AAEvE,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACpC,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;KAChE;IACD,OAA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BACF,gBAAgB,EAAE,yBAAyB;oBAC3C,kBAAkB,EAChB,mBAAmB,CAAC,WAAW,CAAC,KAAK,KAAK,kBAAkB,IAAI,CAAC,YAAY,IAAI,QAAQ,CAAC;iBAC7F;gBACD,YAAY,EAAE,MAAM;oBAClB,CAAC,CAAC;wBACE,aAAa,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,mBAAmB,CAAC,CAAC,EAAE,QAAQ,CAAC;wBACtD,SAAS,EAAE,CAAC,KAAoB,EAAE,EAAE,CAAC,eAAe,CAAC,QAAQ,EAAE,KAAK,CAAC;wBACrE,WAAW,EAAE,0BAA0B,CAAC;4BACtC,cAAc,EAAE,QAAQ;4BACxB,iBAAiB,EAAE,UAAU;4BAC7B,oBAAoB,EAAE,qBAAqB,CAAC,WAAW,CAAC,KAAK;4BAC7D,eAAe,EAAE,QAAQ;yBAC1B,CAAC;wBACF,gBAAgB,EAAE,yBAAyB;qBAC5C;oBACH,CAAC,CAAC,IAAI;aACT,YAEA,WAAW,CAAC,OAAO,GACC,GACnB,CACP,CAAC;IAEF,OAAO,eAAe,CAAC,CAAC,CAAC,wBAAM,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,GAAO,CAAC,CAAC,CAAC,OAAO,CAAC;AACvF,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport {\n createContext,\n CSSProperties,\n forwardRef,\n KeyboardEvent,\n PointerEvent as ReactPointerEvent,\n ReactNode,\n Ref,\n RefObject,\n useContext,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\nimport { createPortal } from \"react-dom\";\nimport { CSS as CSSUtil } from \"@dnd-kit/utilities\";\nimport clsx from \"clsx\";\n\nimport { createSingletonHandler, getLogicalBoundingClientRect } from \"@cloudscape-design/component-toolkit/internal\";\nimport {\n useInternalDragHandleInteractionState,\n UseInternalDragHandleInteractionStateProps,\n} from \"@cloudscape-design/components/internal/do-not-use/drag-handle\";\n\nimport {\n DragAndDropData,\n DropTargetContext,\n InteractionType,\n Operation,\n useDraggable,\n useDragSubscription,\n} from \"../dnd-controller/controller\";\nimport { BoardItemDefinitionBase, Direction, ItemId, Transform } from \"../interfaces\";\nimport { Coordinates } from \"../utils/coordinates\";\nimport { getNormalizedElementRect } from \"../utils/screen\";\nimport { throttle } from \"../utils/throttle\";\nimport { getCollisionRect } from \"./get-collision-rect\";\nimport { getNextDroppable } from \"./get-next-droppable\";\nimport {\n calculateInitialPointerData,\n determineHandleActiveState,\n getDndOperationType,\n hasPointerMovedBeyondThreshold,\n} from \"./utils\";\n\nimport styles from \"./styles.css.js\";\n\nexport interface ItemContainerRef {\n focusDragHandle(): void;\n}\n\nexport type HandleActiveState = null | \"pointer\" | \"uap\";\n\ninterface ItemContextType {\n /**\n * Flag indicating if a drag or resize interaction is currently active.\n */\n isActive: boolean;\n /**\n * Flag indicating if the item is currently hidden.\n * (When a board item is moved from the palette to the board and the transition is not submitted)\n */\n isHidden: boolean;\n dragHandle: {\n /**\n * Ref to the drag button. Used to focus the drag handle when moving an item\n * from the palette to the board via keyboard or UAP actions.\n */\n ref: RefObject<HTMLDivElement>;\n /**\n * Listen to pointerDown events on the drag handle.\n * Used to start a transition and attach global event handlers.\n */\n onPointerDown(event: ReactPointerEvent): void;\n /**\n * Listen to keyDown events on the drag handle.\n */\n onKeyDown(event: KeyboardEvent): void;\n /**\n * Indicating if drag handle is active.\n */\n activeState: HandleActiveState;\n /**\n * Listen to UAP direction button clicks.\n */\n onDirectionClick(direction: KeyboardEvent[\"key\"], operation: HandleOperation): void;\n /**\n * Flag indicating if the UAP buttons should be shown. E.g. when a item is moved from\n * the palette via keyboard or UAP to the board.\n */\n initialShowButtons?: boolean;\n };\n resizeHandle: null | {\n /**\n * Listen to pointerDown events on the drag handle.\n * Used to start a transition and attach global event handlers.\n */\n onPointerDown(event: ReactPointerEvent): void;\n /**\n * Listen to keyDown events on the drag handle.\n */\n onKeyDown(event: KeyboardEvent): void;\n /**\n * Indicating if resize handle is active.\n */\n activeState: HandleActiveState;\n /**\n * Listen to UAP direction button clicks.\n */\n onDirectionClick(direction: KeyboardEvent[\"key\"], operation: HandleOperation): void;\n };\n}\n\nexport interface Transition {\n itemId: ItemId;\n operation: Operation;\n interactionType: InteractionType;\n sizeTransform: null | { width: number; height: number };\n positionTransform: null | { x: number; y: number };\n hasDropTarget?: boolean;\n}\n\nexport type HandleOperation = \"drag\" | \"resize\";\n\nexport const ItemContext = createContext<ItemContextType | null>(null);\n\nexport function useItemContext() {\n const ctx = useContext(ItemContext);\n if (!ctx) {\n throw new Error(\"Invariant violation: no board item context.\");\n }\n return ctx;\n}\n\n/**\n * Defines item's parameters and its relation with the layout.\n *\n * `item` - the unique board item base object to be used in d&d context.\n * `placed` - specifies if the item already belongs to the board.\n * `acquired` - specifies if the item is essentially a copy temporarily acquired by a droppable but not submitted yet.\n * `inTransition` - specifies if the item is currently being moved.\n * `transform` - specifies if the item's position needs to be altered.\n * `getItemSize` - item size getter that takes droppable context as argument.\n * `onKeyMove` - a callback that fires when arrow keys are pressed in drag- or resize handle.\n */\nexport interface ItemContainerProps {\n item: BoardItemDefinitionBase<unknown>;\n placed: boolean;\n acquired: boolean;\n inTransition: boolean;\n transform: Transform | undefined;\n getItemSize: (context: null | DropTargetContext) => {\n width: number;\n minWidth: number;\n maxWidth: number;\n height: number;\n minHeight: number;\n maxHeight: number;\n };\n\n onKeyMove?(direction: Direction): void;\n\n children: (hasDropTarget: boolean) => ReactNode;\n isRtl: () => boolean;\n}\n\nexport const ItemContainer = forwardRef(ItemContainerComponent);\n\n// The amount of distance after pointer down that the cursor is allowed to\n// jitter for a subsequent mouseup to still register as a \"press\" instead of\n// a drag. A little allowance is needed for usability reasons, but this number\n// isn't set in stone.\nexport const CLICK_DRAG_THRESHOLD = 3;\n\n// We use singleton helper to avoid creating event listeners per each board item.\nconst usePointerEventListeners = createSingletonHandler<\n { type: \"move\"; event: PointerEvent } | { type: \"up\"; event: PointerEvent }\n>((setEvent) => {\n const handleGlobalPointerMove = (event: PointerEvent) => setEvent({ type: \"move\", event });\n const handleGlobalPointerUp = (event: PointerEvent) => setEvent({ type: \"up\", event });\n const controller = new AbortController();\n window.addEventListener(\"pointermove\", handleGlobalPointerMove, { signal: controller.signal });\n window.addEventListener(\"pointerup\", handleGlobalPointerUp, { signal: controller.signal });\n return () => controller.abort();\n});\n\nfunction ItemContainerComponent(\n { item, placed, acquired, inTransition, transform, getItemSize, onKeyMove, children, isRtl }: ItemContainerProps,\n ref: Ref<ItemContainerRef>,\n) {\n const originalSizeRef = useRef({ width: 0, height: 0 });\n const pointerOffsetRef = useRef(new Coordinates({ x: 0, y: 0 }));\n const pointerBoundariesRef = useRef<null | Coordinates>(null);\n const [transition, setTransition] = useState<null | Transition>(null);\n const [isHidden, setIsHidden] = useState(false);\n const muteEventsRef = useRef(false);\n const itemRef = useRef<HTMLDivElement>(null);\n // Keeps the starting position of active pointer-based d&d transition.\n // If undefined - it means the pointer-based d&d is not engaged.\n const initialPointerDownPosition = useRef<{ x: number; y: number } | undefined>();\n const draggableApi = useDraggable({\n draggableItem: item,\n getCollisionRect: (operation, coordinates, dropTarget) => {\n const sizeOverride = operation === \"insert\" && dropTarget ? getItemSize(dropTarget) : null;\n return getCollisionRect(operation, itemRef.current!, coordinates, sizeOverride);\n },\n });\n\n function updateTransition({\n operation,\n interactionType,\n draggableItem,\n collisionRect,\n coordinates,\n dropTarget,\n }: DragAndDropData) {\n if (item.id === draggableItem.id) {\n const [width, height] = [collisionRect.right - collisionRect.left, collisionRect.bottom - collisionRect.top];\n const pointerOffset = pointerOffsetRef.current;\n\n if (operation === \"resize\") {\n setTransition({\n operation,\n interactionType,\n itemId: draggableItem.id,\n sizeTransform: {\n width: Math.max(getItemSize(null).minWidth, Math.min(getItemSize(null).maxWidth, width - pointerOffset.x)),\n height: Math.max(getItemSize(null).minHeight, height - pointerOffset.y),\n },\n positionTransform: null,\n });\n } else if (operation === \"insert\" || operation === \"reorder\") {\n setTransition({\n operation,\n interactionType,\n itemId: draggableItem.id,\n sizeTransform: dropTarget ? getItemSize(dropTarget) : originalSizeRef.current,\n positionTransform: { x: coordinates.x - pointerOffset.x, y: coordinates.y - pointerOffset.y },\n hasDropTarget: !!dropTarget,\n });\n }\n }\n }\n\n useDragSubscription(\"start\", (detail) => updateTransition(detail));\n useDragSubscription(\"update\", (detail) => updateTransition(detail));\n useDragSubscription(\"submit\", () => {\n setTransition(null);\n setIsHidden(false);\n muteEventsRef.current = false;\n });\n useDragSubscription(\"discard\", () => {\n setTransition(null);\n setIsHidden(false);\n muteEventsRef.current = false;\n });\n\n // Handles incremental transition logic shared between different keyboard and UAP interactions.\n function handleIncrementalTransition(operation: HandleOperation, submitExisting = false) {\n // The acquired item is a copy and does not have the transition state.\n // However, pressing \"Space\" or \"Enter\" on the acquired item must submit the active transition.\n if (acquired) {\n return draggableApi.submitTransition();\n }\n\n // Submit existing transition if requested and one exists\n if (submitExisting && transition) {\n return draggableApi.submitTransition();\n }\n\n const rect = getNormalizedElementRect(itemRef.current!);\n const coordinates = new Coordinates({\n x: operation === \"drag\" ? rect.left : rect.right,\n y: operation === \"drag\" ? rect.top : rect.bottom,\n });\n\n if (operation === \"drag\" && !placed) {\n draggableApi.start(\"insert\", \"keyboard\", coordinates);\n } else if (operation === \"drag\") {\n draggableApi.start(\"reorder\", \"keyboard\", coordinates);\n } else {\n draggableApi.start(\"resize\", \"keyboard\", coordinates);\n }\n }\n\n function handleInsert(direction: Direction) {\n // Find the closest droppable (in the direction) to the item.\n const droppables = draggableApi.getDroppables();\n const nextDroppable = getNextDroppable({\n draggableElement: itemRef.current!,\n droppables,\n direction,\n isRtl: isRtl(),\n });\n\n if (!nextDroppable) {\n // TODO: add announcement\n // Context: the keyboard insertion only works when there is some droppable area in the specified direction.\n // That means that only some arrow keys might work which is confusing for a screen-reader user.\n // Alternatively, we can consider a multi-step insertion where the user would first explicitly select the desired board.\n return;\n }\n\n // Notify the respective droppable of the intention to insert the item in it.\n draggableApi.acquire(nextDroppable, () => children(true));\n setIsHidden(true);\n muteEventsRef.current = true;\n }\n\n function handleDirectionalMovement(direction: Direction, operation: HandleOperation) {\n const canInsert = transition && operation === \"drag\" && !placed;\n const canNavigate = transition || operation === \"drag\";\n if (canInsert) {\n handleInsert(direction);\n } else if (canNavigate) {\n onKeyMove?.(direction);\n }\n }\n\n function onHandleKeyDown(operation: HandleOperation, event: KeyboardEvent) {\n // We do not expect keyboard input when pointer-based d&d is performed.\n // Upon receiving any, we discard the current transition immediately.\n if (transition && initialPointerDownPosition.current) {\n initialPointerDownPosition.current = undefined;\n draggableApi.discardTransition();\n return;\n }\n\n const discard = () => {\n if (transition || acquired) {\n draggableApi.discardTransition();\n }\n };\n switch (event.key) {\n case \"ArrowUp\":\n return handleDirectionalMovement(\"up\", operation);\n case \"ArrowDown\":\n return handleDirectionalMovement(\"down\", operation);\n case \"ArrowLeft\":\n return handleDirectionalMovement(\"left\", operation);\n case \"ArrowRight\":\n return handleDirectionalMovement(\"right\", operation);\n case \" \":\n case \"Enter\":\n return handleIncrementalTransition(operation, true);\n case \"Escape\":\n return discard();\n }\n }\n\n function onBlur() {\n // When drag- or resize handle on palette or board item loses focus the transition must be submitted with two exceptions:\n // 1. If the last interaction is not \"keyboard\" (the user clicked on another handle issuing a new transition);\n // 2. If the item is acquired by the board (in that case the focus moves to the board item which is expected, palette item is hidden and all events handlers must be muted).\n selectedHook.current.processBlur();\n\n if (acquired || (transition && transition.interactionType === \"keyboard\" && !muteEventsRef.current)) {\n initialPointerDownPosition.current = undefined;\n draggableApi.submitTransition();\n }\n }\n\n // Pointer-down handler, added to each drag- and resize handle.\n function onHandlePointerDown(event: ReactPointerEvent, operation: HandleOperation) {\n // Prevent UI issues when right-clicking: in such a case the OS context menu will be shown and\n // the board while the board-item is active. Because of the context menu under the pointer,\n // onPointerUp is not called anymore. In such a case the board item would stuck in onPointerUp.\n if (event.button !== 0) {\n return;\n }\n initialPointerDownPosition.current = { x: event.clientX, y: event.clientY };\n\n if (operation === \"drag\") {\n selectedHook.current = dragInteractionHook;\n } else {\n selectedHook.current = resizeInteractionHook;\n }\n selectedHook.current.processPointerDown(event.nativeEvent);\n }\n // Global pointer-move and pointer-up handlers.\n usePointerEventListeners(({ type, event }) => {\n switch (type) {\n case \"move\": {\n if (hasPointerMovedBeyondThreshold(event, initialPointerDownPosition.current)) {\n selectedHook.current.processPointerMove(event);\n }\n break;\n }\n case \"up\": {\n if (initialPointerDownPosition.current) {\n selectedHook.current.processPointerUp(event);\n }\n initialPointerDownPosition.current = undefined;\n break;\n }\n }\n });\n\n function handlePointerInteractionStart(event: PointerEvent, operation: \"drag\" | \"resize\") {\n const currentItemElement = itemRef.current;\n if (!currentItemElement) {\n console.warn(\"ItemContainer: itemRef.current is not available on interaction start.\");\n return;\n }\n\n const rect = getLogicalBoundingClientRect(currentItemElement);\n originalSizeRef.current = { width: rect.inlineSize, height: rect.blockSize };\n\n const { pointerOffset, pointerBoundaries } = calculateInitialPointerData({\n event,\n operation,\n rect,\n getMinSize: () => getItemSize(null),\n isRtl: isRtl(),\n });\n pointerOffsetRef.current = pointerOffset;\n pointerBoundariesRef.current = pointerBoundaries;\n\n const dndOperation = getDndOperationType(operation, placed);\n const startCoordinates = Coordinates.fromEvent(event, { isRtl: isRtl() });\n draggableApi.start(dndOperation, \"pointer\", startCoordinates);\n }\n\n const onHandleDndTransitionActive = throttle((event: PointerEvent) => {\n const coordinates = Coordinates.fromEvent(event, { isRtl: isRtl() });\n draggableApi.updateTransition(\n new Coordinates({\n x: Math.max(coordinates.x, pointerBoundariesRef.current?.x ?? Number.NEGATIVE_INFINITY),\n y: Math.max(coordinates.y, pointerBoundariesRef.current?.y ?? Number.NEGATIVE_INFINITY),\n }),\n );\n }, 10) as (event: PointerEvent) => void;\n\n const itemTransitionStyle: CSSProperties = {};\n const itemTransitionClassNames: string[] = [];\n\n if (inTransition) {\n itemTransitionClassNames.push(styles.inTransition);\n }\n\n if (transition) {\n if (transition.interactionType === \"pointer\") {\n // Adjust the dragged/resized item to the pointer's location.\n itemTransitionClassNames.push(transition.operation === \"resize\" ? styles.resized : styles.dragged);\n itemTransitionStyle.insetInlineStart = transition.positionTransform?.x;\n itemTransitionStyle.insetBlockStart = transition.positionTransform?.y;\n itemTransitionStyle.inlineSize = transition.sizeTransform?.width;\n itemTransitionStyle.blockSize = transition.sizeTransform?.height;\n itemTransitionStyle.pointerEvents = \"none\";\n }\n if (transition.interactionType === \"keyboard\") {\n itemTransitionClassNames.push(styles.keyboardDragged);\n }\n }\n\n if (isHidden) {\n itemTransitionClassNames.push(styles.hidden);\n }\n\n if (transform) {\n // The moved items positions are altered with CSS transform.\n if (transform.type === \"move\") {\n itemTransitionClassNames.push(styles.transformed);\n itemTransitionStyle.transform = CSSUtil.Transform.toString({\n x: transform.x,\n y: transform.y,\n scaleX: 1,\n scaleY: 1,\n });\n itemTransitionStyle.width = transform.width + \"px\";\n itemTransitionStyle.height = transform.height + \"px\";\n }\n // The item is removed from the DOM after animations play.\n // During the animations the removed item is hidden with styles.\n if (transform.type === \"remove\") {\n itemTransitionClassNames.push(styles.removed);\n }\n }\n\n const dragHandleRef = useRef<HTMLDivElement>(null);\n useImperativeHandle(ref, () => ({\n focusDragHandle: () => {\n return dragHandleRef.current?.focus();\n },\n }));\n\n const dragHookProps: UseInternalDragHandleInteractionStateProps = {\n onDndStartAction: (event) => handlePointerInteractionStart(event, \"drag\"),\n onDndActiveAction: onHandleDndTransitionActive,\n onDndEndAction: () => transition && draggableApi.submitTransition(),\n onUapActionStartAction: () => handleIncrementalTransition(\"drag\"),\n };\n const resizeHookProps: UseInternalDragHandleInteractionStateProps = {\n onDndStartAction: (event) => handlePointerInteractionStart(event, \"resize\"),\n onDndActiveAction: onHandleDndTransitionActive,\n onDndEndAction: () => transition && draggableApi.submitTransition(),\n onUapActionStartAction: () => handleIncrementalTransition(\"resize\"),\n };\n\n // When d&d is active, either drag- or resize hook should be used.\n // We determine the correct one in the onHandlePointerDown handler, and store it to the selectedHook ref.\n const dragInteractionHook = useInternalDragHandleInteractionState(dragHookProps);\n const resizeInteractionHook = useInternalDragHandleInteractionState(resizeHookProps);\n const selectedHook = useRef(dragInteractionHook);\n\n const isActive = (!!transition && !isHidden) || !!acquired;\n const shouldUsePortal =\n transition?.operation === \"insert\" &&\n transition?.interactionType === \"pointer\" &&\n selectedHook.current.interaction.value === \"dnd-active\";\n const childrenRef = useRef<ReactNode>(null);\n if (!inTransition || isActive) {\n childrenRef.current = children(!!transition?.hasDropTarget);\n }\n\n const content = (\n <div\n ref={itemRef}\n className={clsx(styles.root, ...itemTransitionClassNames)}\n style={itemTransitionStyle}\n data-item-id={item.id}\n onBlur={onBlur}\n >\n <ItemContext.Provider\n value={{\n isActive,\n isHidden,\n dragHandle: {\n ref: dragHandleRef,\n onPointerDown: (e) => onHandlePointerDown(e, \"drag\"),\n onKeyDown: (event: KeyboardEvent) => onHandleKeyDown(\"drag\", event),\n activeState: determineHandleActiveState({\n isHandleActive: isActive,\n currentTransition: transition,\n interactionHookValue: dragInteractionHook.interaction.value,\n targetOperation: \"reorder\",\n }),\n onDirectionClick: handleDirectionalMovement,\n initialShowButtons:\n dragInteractionHook.interaction.value === \"uap-action-start\" || (inTransition && acquired),\n },\n resizeHandle: placed\n ? {\n onPointerDown: (e) => onHandlePointerDown(e, \"resize\"),\n onKeyDown: (event: KeyboardEvent) => onHandleKeyDown(\"resize\", event),\n activeState: determineHandleActiveState({\n isHandleActive: isActive,\n currentTransition: transition,\n interactionHookValue: resizeInteractionHook.interaction.value,\n targetOperation: \"resize\",\n }),\n onDirectionClick: handleDirectionalMovement,\n }\n : null,\n }}\n >\n {childrenRef.current}\n </ItemContext.Provider>\n </div>\n );\n\n return shouldUsePortal ? <div>{createPortal(content, document.body)}</div> : content;\n}\n"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"inTransition": "
|
|
6
|
-
"transformed": "
|
|
7
|
-
"removed": "
|
|
8
|
-
"dragged": "
|
|
9
|
-
"
|
|
10
|
-
"
|
|
4
|
+
"root": "awsui_root_lljvd_1y0lv_5",
|
|
5
|
+
"inTransition": "awsui_inTransition_lljvd_1y0lv_11",
|
|
6
|
+
"transformed": "awsui_transformed_lljvd_1y0lv_16",
|
|
7
|
+
"removed": "awsui_removed_lljvd_1y0lv_21",
|
|
8
|
+
"dragged": "awsui_dragged_lljvd_1y0lv_25",
|
|
9
|
+
"keyboardDragged": "awsui_keyboardDragged_lljvd_1y0lv_30",
|
|
10
|
+
"resized": "awsui_resized_lljvd_1y0lv_34",
|
|
11
|
+
"hidden": "awsui_hidden_lljvd_1y0lv_39"
|
|
11
12
|
};
|
|
12
13
|
|
|
@@ -2,36 +2,40 @@
|
|
|
2
2
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
.
|
|
5
|
+
.awsui_root_lljvd_1y0lv_5:not(#\9) {
|
|
6
6
|
touch-action: none;
|
|
7
7
|
position: relative;
|
|
8
8
|
block-size: 100%;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.
|
|
11
|
+
.awsui_inTransition_lljvd_1y0lv_11:not(#\9) {
|
|
12
12
|
transition: transform 200ms;
|
|
13
13
|
transition-timing-function: ease;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.
|
|
16
|
+
.awsui_transformed_lljvd_1y0lv_16:not(#\9) {
|
|
17
17
|
position: absolute;
|
|
18
18
|
z-index: 1;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
21
|
+
.awsui_removed_lljvd_1y0lv_21:not(#\9) {
|
|
22
22
|
display: none;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
.
|
|
25
|
+
.awsui_dragged_lljvd_1y0lv_25:not(#\9) {
|
|
26
26
|
z-index: 2000;
|
|
27
27
|
position: fixed;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
30
|
+
.awsui_transformed_lljvd_1y0lv_16.awsui_keyboardDragged_lljvd_1y0lv_30:not(#\9) {
|
|
31
|
+
z-index: 2000;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.awsui_resized_lljvd_1y0lv_34:not(#\9) {
|
|
31
35
|
z-index: 2000;
|
|
32
36
|
position: absolute;
|
|
33
37
|
}
|
|
34
38
|
|
|
35
|
-
.
|
|
39
|
+
.awsui_hidden_lljvd_1y0lv_39:not(#\9) {
|
|
36
40
|
display: none;
|
|
37
41
|
}
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"inTransition": "
|
|
7
|
-
"transformed": "
|
|
8
|
-
"removed": "
|
|
9
|
-
"dragged": "
|
|
10
|
-
"
|
|
11
|
-
"
|
|
5
|
+
"root": "awsui_root_lljvd_1y0lv_5",
|
|
6
|
+
"inTransition": "awsui_inTransition_lljvd_1y0lv_11",
|
|
7
|
+
"transformed": "awsui_transformed_lljvd_1y0lv_16",
|
|
8
|
+
"removed": "awsui_removed_lljvd_1y0lv_21",
|
|
9
|
+
"dragged": "awsui_dragged_lljvd_1y0lv_25",
|
|
10
|
+
"keyboardDragged": "awsui_keyboardDragged_lljvd_1y0lv_30",
|
|
11
|
+
"resized": "awsui_resized_lljvd_1y0lv_34",
|
|
12
|
+
"hidden": "awsui_hidden_lljvd_1y0lv_39"
|
|
12
13
|
};
|
|
13
14
|
|
package/internal/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudscape-design/board-components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.126",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/cloudscape-design/board-components.git"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
77
77
|
"stylelint-prettier": "^5.0.2",
|
|
78
78
|
"typescript": "^4.9.4",
|
|
79
|
-
"vite": "^6.
|
|
79
|
+
"vite": "^6.4.1",
|
|
80
80
|
"vitest": "^3.2.4"
|
|
81
81
|
},
|
|
82
82
|
"//": "ensure that typedoc uses latest typescript. It prints a warning, but works",
|