@cloudscape-design/components 3.0.1281 → 3.0.1283

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.
Files changed (100) hide show
  1. package/button-dropdown/category-elements/styles.css.js +18 -18
  2. package/button-dropdown/category-elements/styles.scoped.css +30 -30
  3. package/button-dropdown/category-elements/styles.selectors.js +18 -18
  4. package/button-dropdown/interfaces.d.ts +0 -2
  5. package/button-dropdown/interfaces.d.ts.map +1 -1
  6. package/button-dropdown/interfaces.js.map +1 -1
  7. package/button-dropdown/item-element/styles.css.js +21 -21
  8. package/button-dropdown/item-element/styles.scoped.css +38 -38
  9. package/button-dropdown/item-element/styles.selectors.js +21 -21
  10. package/drawer/interfaces.d.ts +2 -11
  11. package/drawer/interfaces.d.ts.map +1 -1
  12. package/drawer/interfaces.js.map +1 -1
  13. package/file-token-group/styles.css.js +23 -23
  14. package/file-token-group/styles.scoped.css +35 -35
  15. package/file-token-group/styles.selectors.js +23 -23
  16. package/flashbar/styles.css.js +50 -50
  17. package/flashbar/styles.scoped.css +165 -165
  18. package/flashbar/styles.selectors.js +50 -50
  19. package/input/internal.d.ts +2 -0
  20. package/input/internal.d.ts.map +1 -1
  21. package/input/internal.js +5 -2
  22. package/input/internal.js.map +1 -1
  23. package/input/styles.css.js +18 -13
  24. package/input/styles.scoped.css +67 -31
  25. package/input/styles.selectors.js +18 -13
  26. package/internal/base-component/styles.scoped.css +5 -1
  27. package/internal/components/button-trigger/styles.css.js +14 -14
  28. package/internal/components/button-trigger/styles.scoped.css +29 -29
  29. package/internal/components/button-trigger/styles.selectors.js +14 -14
  30. package/internal/components/dropdown-status/styles.css.js +2 -2
  31. package/internal/components/dropdown-status/styles.scoped.css +4 -4
  32. package/internal/components/dropdown-status/styles.selectors.js +2 -2
  33. package/internal/components/radio-button/index.d.ts +5 -1
  34. package/internal/components/radio-button/index.d.ts.map +1 -1
  35. package/internal/components/radio-button/index.js +2 -2
  36. package/internal/components/radio-button/index.js.map +1 -1
  37. package/internal/components/selectable-item/styles.css.js +22 -22
  38. package/internal/components/selectable-item/styles.scoped.css +51 -51
  39. package/internal/components/selectable-item/styles.selectors.js +22 -22
  40. package/internal/environment.js +2 -2
  41. package/internal/environment.json +2 -2
  42. package/internal/generated/styles/tokens.d.ts +3 -0
  43. package/internal/generated/styles/tokens.js +3 -0
  44. package/internal/generated/theming/index.cjs +39 -0
  45. package/internal/generated/theming/index.cjs.d.ts +18 -0
  46. package/internal/generated/theming/index.d.ts +18 -0
  47. package/internal/generated/theming/index.js +39 -0
  48. package/internal/manifest.json +1 -1
  49. package/package.json +1 -1
  50. package/pagination/index.d.ts +3 -1
  51. package/pagination/index.d.ts.map +1 -1
  52. package/pagination/index.js +4 -3
  53. package/pagination/index.js.map +1 -1
  54. package/pagination/interfaces.d.ts +31 -2
  55. package/pagination/interfaces.d.ts.map +1 -1
  56. package/pagination/interfaces.js.map +1 -1
  57. package/pagination/internal.d.ts +3 -14
  58. package/pagination/internal.d.ts.map +1 -1
  59. package/pagination/internal.js +78 -19
  60. package/pagination/internal.js.map +1 -1
  61. package/pagination/styles.css.js +11 -9
  62. package/pagination/styles.scoped.css +39 -24
  63. package/pagination/styles.selectors.js +11 -9
  64. package/popover/internal.d.ts +4 -0
  65. package/popover/internal.d.ts.map +1 -1
  66. package/popover/internal.js +23 -13
  67. package/popover/internal.js.map +1 -1
  68. package/prompt-input/internal.js +1 -1
  69. package/prompt-input/internal.js.map +1 -1
  70. package/prompt-input/styles.css.js +26 -26
  71. package/prompt-input/styles.scoped.css +55 -55
  72. package/prompt-input/styles.selectors.js +26 -26
  73. package/property-filter/filtering-token/styles.css.js +18 -18
  74. package/property-filter/filtering-token/styles.scoped.css +42 -42
  75. package/property-filter/filtering-token/styles.selectors.js +18 -18
  76. package/property-filter/styles.css.js +39 -39
  77. package/property-filter/styles.scoped.css +43 -43
  78. package/property-filter/styles.selectors.js +39 -39
  79. package/segmented-control/styles.css.js +16 -16
  80. package/segmented-control/styles.scoped.css +33 -33
  81. package/segmented-control/styles.selectors.js +16 -16
  82. package/select/parts/filter.d.ts +1 -1
  83. package/select/parts/filter.d.ts.map +1 -1
  84. package/side-navigation/parts.js +3 -3
  85. package/side-navigation/parts.js.map +1 -1
  86. package/table/selection/selection-control.d.ts.map +1 -1
  87. package/table/selection/selection-control.js +1 -1
  88. package/table/selection/selection-control.js.map +1 -1
  89. package/test-utils/dom/pagination/index.d.ts +15 -0
  90. package/test-utils/dom/pagination/index.js +22 -0
  91. package/test-utils/dom/pagination/index.js.map +1 -1
  92. package/test-utils/selectors/pagination/index.d.ts +15 -0
  93. package/test-utils/selectors/pagination/index.js +22 -0
  94. package/test-utils/selectors/pagination/index.js.map +1 -1
  95. package/textarea/styles.css.js +5 -5
  96. package/textarea/styles.scoped.css +14 -14
  97. package/textarea/styles.selectors.js +5 -5
  98. package/token/styles.css.js +14 -14
  99. package/token/styles.scoped.css +30 -30
  100. package/token/styles.selectors.js +14 -14
@@ -322,9 +322,11 @@ export declare interface TypedOverride {
322
322
  borderWidthIconLarge?: GlobalValue;
323
323
  borderRadiusActionCardDefault?: GlobalValue;
324
324
  borderRadiusActionCardEmbedded?: GlobalValue;
325
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
325
326
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
326
327
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
327
328
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
329
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
328
330
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
329
331
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
330
332
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -655,9 +657,11 @@ export declare interface TypedOverride {
655
657
  borderWidthIconLarge?: GlobalValue;
656
658
  borderRadiusActionCardDefault?: GlobalValue;
657
659
  borderRadiusActionCardEmbedded?: GlobalValue;
660
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
658
661
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
659
662
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
660
663
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
664
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
661
665
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
662
666
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
663
667
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -988,9 +992,11 @@ export declare interface TypedOverride {
988
992
  borderWidthIconLarge?: GlobalValue;
989
993
  borderRadiusActionCardDefault?: GlobalValue;
990
994
  borderRadiusActionCardEmbedded?: GlobalValue;
995
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
991
996
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
992
997
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
993
998
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
999
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
994
1000
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
995
1001
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
996
1002
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -1321,9 +1327,11 @@ export declare interface TypedOverride {
1321
1327
  borderWidthIconLarge?: GlobalValue;
1322
1328
  borderRadiusActionCardDefault?: GlobalValue;
1323
1329
  borderRadiusActionCardEmbedded?: GlobalValue;
1330
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1324
1331
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1325
1332
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1326
1333
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1334
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1327
1335
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1328
1336
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1329
1337
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -1654,9 +1662,11 @@ export declare interface TypedOverride {
1654
1662
  borderWidthIconLarge?: GlobalValue;
1655
1663
  borderRadiusActionCardDefault?: GlobalValue;
1656
1664
  borderRadiusActionCardEmbedded?: GlobalValue;
1665
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1657
1666
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1658
1667
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1659
1668
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1669
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1660
1670
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1661
1671
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1662
1672
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -1987,9 +1997,11 @@ export declare interface TypedOverride {
1987
1997
  borderWidthIconLarge?: GlobalValue;
1988
1998
  borderRadiusActionCardDefault?: GlobalValue;
1989
1999
  borderRadiusActionCardEmbedded?: GlobalValue;
2000
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1990
2001
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1991
2002
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1992
2003
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2004
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1993
2005
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1994
2006
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
1995
2007
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -2320,9 +2332,11 @@ export declare interface TypedOverride {
2320
2332
  borderWidthIconLarge?: GlobalValue;
2321
2333
  borderRadiusActionCardDefault?: GlobalValue;
2322
2334
  borderRadiusActionCardEmbedded?: GlobalValue;
2335
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2323
2336
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2324
2337
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2325
2338
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2339
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2326
2340
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2327
2341
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2328
2342
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -2653,9 +2667,11 @@ export declare interface TypedOverride {
2653
2667
  borderWidthIconLarge?: GlobalValue;
2654
2668
  borderRadiusActionCardDefault?: GlobalValue;
2655
2669
  borderRadiusActionCardEmbedded?: GlobalValue;
2670
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2656
2671
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2657
2672
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2658
2673
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2674
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2659
2675
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2660
2676
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2661
2677
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -2986,9 +3002,11 @@ export declare interface TypedOverride {
2986
3002
  borderWidthIconLarge?: GlobalValue;
2987
3003
  borderRadiusActionCardDefault?: GlobalValue;
2988
3004
  borderRadiusActionCardEmbedded?: GlobalValue;
3005
+ sizeVerticalInput?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2989
3006
  spaceAlertVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2990
3007
  spaceButtonHorizontal?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2991
3008
  spaceButtonVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
3009
+ spaceFieldVertical?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2992
3010
  spaceCardHorizontalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2993
3011
  spaceCardHorizontalEmbedded?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
2994
3012
  spaceCardVerticalDefault?: GlobalValue | TypedModeValueOverride<'comfortable' | 'compact'>;
@@ -2730,6 +2730,10 @@ export var preset = {
2730
2730
  "comfortable": "{spaceScaledXxs}",
2731
2731
  "compact": "{spaceScaledXxs}"
2732
2732
  },
2733
+ "spaceFieldVertical": {
2734
+ "comfortable": "5px",
2735
+ "compact": "3px"
2736
+ },
2733
2737
  "spaceButtonIconFocusOutlineGutterVertical": {
2734
2738
  "comfortable": "0px",
2735
2739
  "compact": "0px"
@@ -3002,6 +3006,14 @@ export var preset = {
3002
3006
  "comfortable": "{spaceScaledXs}",
3003
3007
  "compact": "{spaceScaledXs}"
3004
3008
  },
3009
+ "spaceOptionPaddingVertical": {
3010
+ "comfortable": "{spaceXxs}",
3011
+ "compact": "{spaceXxs}"
3012
+ },
3013
+ "spaceOptionPaddingHorizontal": {
3014
+ "comfortable": "{spaceL}",
3015
+ "compact": "{spaceL}"
3016
+ },
3005
3017
  "spaceScaled2xNone": {
3006
3018
  "comfortable": "{spaceNone}",
3007
3019
  "compact": "{spaceNone}"
@@ -3264,6 +3276,10 @@ export var preset = {
3264
3276
  "comfortable": "{spaceScaledXxs}",
3265
3277
  "compact": "{spaceScaledXxs}"
3266
3278
  },
3279
+ "spaceFieldVertical": {
3280
+ "comfortable": "5px",
3281
+ "compact": "3px"
3282
+ },
3267
3283
  "spaceButtonIconFocusOutlineGutterVertical": {
3268
3284
  "comfortable": "0px",
3269
3285
  "compact": "0px"
@@ -3536,6 +3552,14 @@ export var preset = {
3536
3552
  "comfortable": "{spaceScaledXs}",
3537
3553
  "compact": "{spaceScaledXs}"
3538
3554
  },
3555
+ "spaceOptionPaddingVertical": {
3556
+ "comfortable": "{spaceXxs}",
3557
+ "compact": "{spaceXxs}"
3558
+ },
3559
+ "spaceOptionPaddingHorizontal": {
3560
+ "comfortable": "{spaceL}",
3561
+ "compact": "{spaceL}"
3562
+ },
3539
3563
  "spaceScaled2xNone": {
3540
3564
  "comfortable": "{spaceNone}",
3541
3565
  "compact": "{spaceNone}"
@@ -12228,6 +12252,7 @@ export var preset = {
12228
12252
  "spaceButtonFocusOutlineGutter": "density",
12229
12253
  "spaceButtonHorizontal": "density",
12230
12254
  "spaceButtonVertical": "density",
12255
+ "spaceFieldVertical": "density",
12231
12256
  "spaceButtonIconFocusOutlineGutterVertical": "density",
12232
12257
  "spaceButtonIconOnlyHorizontal": "density",
12233
12258
  "spaceButtonInlineIconFocusOutlineGutter": "density",
@@ -12296,6 +12321,8 @@ export var preset = {
12296
12321
  "spaceActionCardVerticalEmbedded": "density",
12297
12322
  "spaceActionCardDescriptionPaddingTop": "density",
12298
12323
  "spaceActionCardContentPaddingTop": "density",
12324
+ "spaceOptionPaddingVertical": "density",
12325
+ "spaceOptionPaddingHorizontal": "density",
12299
12326
  "spaceScaled2xNone": "density",
12300
12327
  "spaceScaled2xXxxs": "density",
12301
12328
  "spaceScaled2xXxs": "density",
@@ -12893,9 +12920,11 @@ export var preset = {
12893
12920
  "borderWidthIconLarge",
12894
12921
  "borderRadiusActionCardDefault",
12895
12922
  "borderRadiusActionCardEmbedded",
12923
+ "sizeVerticalInput",
12896
12924
  "spaceAlertVertical",
12897
12925
  "spaceButtonHorizontal",
12898
12926
  "spaceButtonVertical",
12927
+ "spaceFieldVertical",
12899
12928
  "spaceCardHorizontalDefault",
12900
12929
  "spaceCardHorizontalEmbedded",
12901
12930
  "spaceCardVerticalDefault",
@@ -13336,9 +13365,11 @@ export var preset = {
13336
13365
  "motionKeyframesFadeOut",
13337
13366
  "motionKeyframesStatusIconError",
13338
13367
  "motionKeyframesScalePopup",
13368
+ "sizeVerticalInput",
13339
13369
  "spaceAlertVertical",
13340
13370
  "spaceButtonHorizontal",
13341
13371
  "spaceButtonVertical",
13372
+ "spaceFieldVertical",
13342
13373
  "spaceCardHorizontalDefault",
13343
13374
  "spaceCardHorizontalEmbedded",
13344
13375
  "spaceCardVerticalDefault",
@@ -13347,6 +13378,8 @@ export var preset = {
13347
13378
  "spaceFieldHorizontal",
13348
13379
  "spaceTabsVertical",
13349
13380
  "spaceTreeViewIndentation",
13381
+ "spaceOptionPaddingVertical",
13382
+ "spaceOptionPaddingHorizontal",
13350
13383
  "spaceScaledXxxs",
13351
13384
  "spaceScaledXxs",
13352
13385
  "spaceScaledXs",
@@ -14134,6 +14167,7 @@ export var preset = {
14134
14167
  "spaceButtonFocusOutlineGutter": "space-button-focus-outline-gutter",
14135
14168
  "spaceButtonHorizontal": "space-button-horizontal",
14136
14169
  "spaceButtonVertical": "space-button-vertical",
14170
+ "spaceFieldVertical": "space-field-vertical",
14137
14171
  "spaceButtonIconFocusOutlineGutterVertical": "space-button-icon-focus-outline-gutter-vertical",
14138
14172
  "spaceButtonIconOnlyHorizontal": "space-button-icon-only-horizontal",
14139
14173
  "spaceButtonInlineIconFocusOutlineGutter": "space-button-inline-icon-focus-outline-gutter",
@@ -14202,6 +14236,8 @@ export var preset = {
14202
14236
  "spaceActionCardVerticalEmbedded": "space-action-card-vertical-embedded",
14203
14237
  "spaceActionCardDescriptionPaddingTop": "space-action-card-description-padding-top",
14204
14238
  "spaceActionCardContentPaddingTop": "space-action-card-content-padding-top",
14239
+ "spaceOptionPaddingVertical": "space-option-padding-vertical",
14240
+ "spaceOptionPaddingHorizontal": "space-option-padding-horizontal",
14205
14241
  "spaceScaled2xNone": "space-scaled-2x-none",
14206
14242
  "spaceScaled2xXxxs": "space-scaled-2x-xxxs",
14207
14243
  "spaceScaled2xXxs": "space-scaled-2x-xxs",
@@ -15026,6 +15062,7 @@ export var preset = {
15026
15062
  "spaceButtonFocusOutlineGutter": "--space-button-focus-outline-gutter-jj138g",
15027
15063
  "spaceButtonHorizontal": "--space-button-horizontal-k0c786",
15028
15064
  "spaceButtonVertical": "--space-button-vertical-xaxp6x",
15065
+ "spaceFieldVertical": "--space-field-vertical-vm99qz",
15029
15066
  "spaceButtonIconFocusOutlineGutterVertical": "--space-button-icon-focus-outline-gutter-vertical-r44mtq",
15030
15067
  "spaceButtonIconOnlyHorizontal": "--space-button-icon-only-horizontal-i85hxi",
15031
15068
  "spaceButtonInlineIconFocusOutlineGutter": "--space-button-inline-icon-focus-outline-gutter-zbfgku",
@@ -15094,6 +15131,8 @@ export var preset = {
15094
15131
  "spaceActionCardVerticalEmbedded": "--space-action-card-vertical-embedded-f1rm8a",
15095
15132
  "spaceActionCardDescriptionPaddingTop": "--space-action-card-description-padding-top-qw1sd7",
15096
15133
  "spaceActionCardContentPaddingTop": "--space-action-card-content-padding-top-bew8kj",
15134
+ "spaceOptionPaddingVertical": "--space-option-padding-vertical-d2srv9",
15135
+ "spaceOptionPaddingHorizontal": "--space-option-padding-horizontal-4taa4b",
15097
15136
  "spaceScaled2xNone": "--space-scaled-2x-none-987dp7",
15098
15137
  "spaceScaled2xXxxs": "--space-scaled-2x-xxxs-reumxj",
15099
15138
  "spaceScaled2xXxs": "--space-scaled-2x-xxs-e79hr1",
@@ -1,3 +1,3 @@
1
1
  {
2
- "commit": "ae2d3449a5fa77cb773182061391878389902001"
2
+ "commit": "4fcc3f6a3a1bb673bc15efd2c5ac72f6645690a1"
3
3
  }
package/package.json CHANGED
@@ -164,7 +164,7 @@
164
164
  "./internal/base-component/index.js",
165
165
  "./internal/base-component/styles.css.js"
166
166
  ],
167
- "version": "3.0.1281",
167
+ "version": "3.0.1283",
168
168
  "repository": {
169
169
  "type": "git",
170
170
  "url": "https://github.com/cloudscape-design/components.git"
@@ -1,3 +1,5 @@
1
+ import React from 'react';
1
2
  import { PaginationProps } from './interfaces';
2
3
  export { PaginationProps };
3
- export default function Pagination(props: PaginationProps): JSX.Element;
4
+ declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<PaginationProps.Ref>>;
5
+ export default Pagination;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pagination/index.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,eAAe,eAmBxD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pagination/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,QAAA,MAAM,UAAU,6FAoBd,CAAC;AAIH,eAAe,UAAU,CAAC"}
@@ -6,9 +6,9 @@ import { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-tool
6
6
  import useBaseComponent from '../internal/hooks/use-base-component';
7
7
  import { applyDisplayName } from '../internal/utils/apply-display-name';
8
8
  import InternalPagination from './internal';
9
- export default function Pagination(props) {
9
+ const Pagination = React.forwardRef((props, ref) => {
10
10
  const baseComponentProps = useBaseComponent('Pagination', { props: { openEnd: props.openEnd } });
11
- return (React.createElement(InternalPagination, { ...props, ...baseComponentProps, ...getAnalyticsMetadataAttribute({
11
+ return (React.createElement(InternalPagination, { ...props, ...baseComponentProps, ref: ref, ...getAnalyticsMetadataAttribute({
12
12
  component: {
13
13
  name: 'awsui.Pagination',
14
14
  label: { root: 'self' },
@@ -19,6 +19,7 @@ export default function Pagination(props) {
19
19
  },
20
20
  },
21
21
  }) }));
22
- }
22
+ });
23
23
  applyDisplayName(Pagination, 'Pagination');
24
+ export default Pagination;
24
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pagination/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,kBAAkB,MAAM,YAAY,CAAC;AAI5C,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAsB;IACvD,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjG,OAAO,CACL,oBAAC,kBAAkB,OACb,KAAK,KACL,kBAAkB,KAClB,6BAA6B,CAAC;YAChC,SAAS,EAAE;gBACT,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACvB,UAAU,EAAE;oBACV,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE;oBAC7B,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE;oBACvC,gBAAgB,EAAE,GAAG,KAAK,CAAC,gBAAgB,EAAE;iBAC9C;aAC+C;SACnD,CAAC,GACF,CACH,CAAC;AACJ,CAAC;AAED,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataPaginationComponent } from './analytics-metadata/interfaces';\nimport { PaginationProps } from './interfaces';\nimport InternalPagination from './internal';\n\nexport { PaginationProps };\n\nexport default function Pagination(props: PaginationProps) {\n const baseComponentProps = useBaseComponent('Pagination', { props: { openEnd: props.openEnd } });\n return (\n <InternalPagination\n {...props}\n {...baseComponentProps}\n {...getAnalyticsMetadataAttribute({\n component: {\n name: 'awsui.Pagination',\n label: { root: 'self' },\n properties: {\n openEnd: `${!!props.openEnd}`,\n pagesCount: `${props.pagesCount || ''}`,\n currentPageIndex: `${props.currentPageIndex}`,\n },\n } as GeneratedAnalyticsMetadataPaginationComponent,\n })}\n />\n );\n}\n\napplyDisplayName(Pagination, 'Pagination');\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pagination/index.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,YAAY,CAAC;AACb,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,kEAAkE,CAAC;AAEjH,OAAO,gBAAgB,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAGxE,OAAO,kBAAkB,MAAM,YAAY,CAAC;AAI5C,MAAM,UAAU,GAAG,KAAK,CAAC,UAAU,CAAuC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IACvF,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACjG,OAAO,CACL,oBAAC,kBAAkB,OACb,KAAK,KACL,kBAAkB,EACtB,GAAG,EAAE,GAAG,KACJ,6BAA6B,CAAC;YAChC,SAAS,EAAE;gBACT,IAAI,EAAE,kBAAkB;gBACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;gBACvB,UAAU,EAAE;oBACV,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE;oBAC7B,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,IAAI,EAAE,EAAE;oBACvC,gBAAgB,EAAE,GAAG,KAAK,CAAC,gBAAgB,EAAE;iBAC9C;aAC+C;SACnD,CAAC,GACF,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,gBAAgB,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAE3C,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n'use client';\nimport React from 'react';\n\nimport { getAnalyticsMetadataAttribute } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport useBaseComponent from '../internal/hooks/use-base-component';\nimport { applyDisplayName } from '../internal/utils/apply-display-name';\nimport { GeneratedAnalyticsMetadataPaginationComponent } from './analytics-metadata/interfaces';\nimport { PaginationProps } from './interfaces';\nimport InternalPagination from './internal';\n\nexport { PaginationProps };\n\nconst Pagination = React.forwardRef<PaginationProps.Ref, PaginationProps>((props, ref) => {\n const baseComponentProps = useBaseComponent('Pagination', { props: { openEnd: props.openEnd } });\n return (\n <InternalPagination\n {...props}\n {...baseComponentProps}\n ref={ref}\n {...getAnalyticsMetadataAttribute({\n component: {\n name: 'awsui.Pagination',\n label: { root: 'self' },\n properties: {\n openEnd: `${!!props.openEnd}`,\n pagesCount: `${props.pagesCount || ''}`,\n currentPageIndex: `${props.currentPageIndex}`,\n },\n } as GeneratedAnalyticsMetadataPaginationComponent,\n })}\n />\n );\n});\n\napplyDisplayName(Pagination, 'Pagination');\n\nexport default Pagination;\n"]}
@@ -41,6 +41,10 @@ export interface PaginationProps {
41
41
  * @i18n
42
42
  */
43
43
  ariaLabels?: PaginationProps.Labels;
44
+ /**
45
+ * @i18n
46
+ */
47
+ i18nStrings?: PaginationProps.I18nStrings;
44
48
  /**
45
49
  * Called when a user interaction causes a pagination change. The event `detail` contains the new `currentPageIndex`.
46
50
  */
@@ -58,6 +62,10 @@ export interface PaginationProps {
58
62
  * * `requestedPageIndex` (integer) - The index of the requested page.
59
63
  */
60
64
  onNextPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;
65
+ /**
66
+ * Jump to page configuration
67
+ */
68
+ jumpToPage?: PaginationProps.JumpToPageProps;
61
69
  }
62
70
  export declare namespace PaginationProps {
63
71
  interface Labels {
@@ -65,12 +73,33 @@ export declare namespace PaginationProps {
65
73
  paginationLabel?: string;
66
74
  previousPageLabel?: string;
67
75
  pageLabel?: (pageNumber: number) => string;
76
+ jumpToPageButton?: string;
77
+ }
78
+ interface I18nStrings {
79
+ /** @i18n */
80
+ jumpToPageInputLabel?: string;
81
+ /** @i18n */
82
+ jumpToPageError?: string;
83
+ /** @i18n */
84
+ jumpToPageLoadingText?: string;
85
+ }
86
+ interface ChangeDetail {
87
+ currentPageIndex: number;
68
88
  }
69
89
  interface PageClickDetail {
70
90
  requestedPageAvailable: boolean;
71
91
  requestedPageIndex: number;
72
92
  }
73
- interface ChangeDetail {
74
- currentPageIndex: number;
93
+ interface JumpToPageProps {
94
+ /**
95
+ * User controlled loading state when jump to page callback is executing
96
+ */
97
+ loading?: boolean;
98
+ }
99
+ interface Ref {
100
+ /**
101
+ * Set error state for jump to page. Component will auto-clear when user types or navigates.
102
+ */
103
+ setError: (hasError: boolean) => void;
75
104
  }
76
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAEnE;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAEjF;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;CAC9E;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,MAAM;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;KAC5C;IAED,UAAiB,eAAe;QAC9B,sBAAsB,EAAE,OAAO,CAAC;QAChC,kBAAkB,EAAE,MAAM,CAAC;KAC5B;IAED,UAAiB,YAAY;QAC3B,gBAAgB,EAAE,MAAM,CAAC;KAC1B;CACF"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;;;;;;;;;;;;;;OAkBG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC;IACpC;;OAEG;IACH,WAAW,CAAC,EAAE,eAAe,CAAC,WAAW,CAAC;IAE1C;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC;IAEnE;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAEjF;;;;;OAKG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAC7E;;OAEG;IACH,UAAU,CAAC,EAAE,eAAe,CAAC,eAAe,CAAC;CAC9C;AAED,yBAAiB,eAAe,CAAC;IAC/B,UAAiB,MAAM;QACrB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,MAAM,CAAC;QAC3C,gBAAgB,CAAC,EAAE,MAAM,CAAC;KAC3B;IAED,UAAiB,WAAW;QAC1B,YAAY;QACZ,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,YAAY;QACZ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,YAAY;QACZ,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC;IAED,UAAiB,YAAY;QAC3B,gBAAgB,EAAE,MAAM,CAAC;KAC1B;IAED,UAAiB,eAAe;QAC9B,sBAAsB,EAAE,OAAO,CAAC;QAChC,kBAAkB,EAAE,MAAM,CAAC;KAC5B;IAED,UAAiB,eAAe;QAC9B;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB;IAED,UAAiB,GAAG;QAClB;;WAEG;QACH,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;KACvC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface PaginationProps {\n /**\n * Index of the current page. The first page has an index of 1.\n */\n currentPageIndex: number;\n\n /**\n * Sets the total number of pages. Only positive integers are allowed.\n */\n pagesCount: number;\n\n /**\n * Sets the pagination variant. It can be either default (when setting it to `false`) or open ended (when setting it\n * to `true`). Default pagination navigates you through the items list. The open-end variant enables you\n * to lazy-load your items because it always displays three dots before the next page icon. The next page button is\n * never disabled. When the user clicks on it but there are no more items to show, the\n * `onNextPageClick` handler is called with `requestedPageAvailable: false` in the event detail.\n */\n openEnd?: boolean;\n\n /**\n * If set to `true`, the pagination links will be disabled. Use it, for example, if you want to prevent the user\n * from changing page before items are loaded.\n */\n disabled?: boolean;\n\n /**\n * Adds aria-labels to the pagination buttons:\n * * `paginationLabel` (string) - Label for the entire pagination group. It allows users to distinguish context\n * * in cases of multiple pagination components in a page.\n * * `previousPageLabel` (string) - Previous page button.\n * * `pageLabel` (number => string) - Individual page button, this function is called for every page number that's rendered.\n * * `nextPageLabel` (string) - Next page button\n *\n * Example:\n * ```\n * {\n * nextPageLabel: 'Next page',\n * paginationLabel: 'Table pagination',\n * previousPageLabel: 'Previous page',\n * pageLabel: pageNumber => `Page ${pageNumber}`\n * }\n * ```\n * @i18n\n */\n ariaLabels?: PaginationProps.Labels;\n\n /**\n * Called when a user interaction causes a pagination change. The event `detail` contains the new `currentPageIndex`.\n */\n onChange?: NonCancelableEventHandler<PaginationProps.ChangeDetail>;\n\n /**\n * Called when the previous page arrow is clicked. The event `detail` contains the following:\n * * `requestedPageAvailable` (boolean) - Always set to `true`.\n * * `requestedPageIndex` (integer) - The index of the requested page.\n */\n onPreviousPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;\n\n /**\n * Called when the next page arrow is clicked. The event `detail` contains the following:\n * * `requestedPageAvailable` (boolean) - Indicates whether the requested page is available for display.\n * The value can be `false` when the `openEnd` property is set to `true`.\n * * `requestedPageIndex` (integer) - The index of the requested page.\n */\n onNextPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;\n}\n\nexport namespace PaginationProps {\n export interface Labels {\n nextPageLabel?: string;\n paginationLabel?: string;\n previousPageLabel?: string;\n pageLabel?: (pageNumber: number) => string;\n }\n\n export interface PageClickDetail {\n requestedPageAvailable: boolean;\n requestedPageIndex: number;\n }\n\n export interface ChangeDetail {\n currentPageIndex: number;\n }\n}\n"]}
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/pagination/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface PaginationProps {\n /**\n * Index of the current page. The first page has an index of 1.\n */\n currentPageIndex: number;\n\n /**\n * Sets the total number of pages. Only positive integers are allowed.\n */\n pagesCount: number;\n\n /**\n * Sets the pagination variant. It can be either default (when setting it to `false`) or open ended (when setting it\n * to `true`). Default pagination navigates you through the items list. The open-end variant enables you\n * to lazy-load your items because it always displays three dots before the next page icon. The next page button is\n * never disabled. When the user clicks on it but there are no more items to show, the\n * `onNextPageClick` handler is called with `requestedPageAvailable: false` in the event detail.\n */\n openEnd?: boolean;\n\n /**\n * If set to `true`, the pagination links will be disabled. Use it, for example, if you want to prevent the user\n * from changing page before items are loaded.\n */\n disabled?: boolean;\n\n /**\n * Adds aria-labels to the pagination buttons:\n * * `paginationLabel` (string) - Label for the entire pagination group. It allows users to distinguish context\n * * in cases of multiple pagination components in a page.\n * * `previousPageLabel` (string) - Previous page button.\n * * `pageLabel` (number => string) - Individual page button, this function is called for every page number that's rendered.\n * * `nextPageLabel` (string) - Next page button\n *\n * Example:\n * ```\n * {\n * nextPageLabel: 'Next page',\n * paginationLabel: 'Table pagination',\n * previousPageLabel: 'Previous page',\n * pageLabel: pageNumber => `Page ${pageNumber}`\n * }\n * ```\n * @i18n\n */\n ariaLabels?: PaginationProps.Labels;\n /**\n * @i18n\n */\n i18nStrings?: PaginationProps.I18nStrings;\n\n /**\n * Called when a user interaction causes a pagination change. The event `detail` contains the new `currentPageIndex`.\n */\n onChange?: NonCancelableEventHandler<PaginationProps.ChangeDetail>;\n\n /**\n * Called when the previous page arrow is clicked. The event `detail` contains the following:\n * * `requestedPageAvailable` (boolean) - Always set to `true`.\n * * `requestedPageIndex` (integer) - The index of the requested page.\n */\n onPreviousPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;\n\n /**\n * Called when the next page arrow is clicked. The event `detail` contains the following:\n * * `requestedPageAvailable` (boolean) - Indicates whether the requested page is available for display.\n * The value can be `false` when the `openEnd` property is set to `true`.\n * * `requestedPageIndex` (integer) - The index of the requested page.\n */\n onNextPageClick?: NonCancelableEventHandler<PaginationProps.PageClickDetail>;\n /**\n * Jump to page configuration\n */\n jumpToPage?: PaginationProps.JumpToPageProps;\n}\n\nexport namespace PaginationProps {\n export interface Labels {\n nextPageLabel?: string;\n paginationLabel?: string;\n previousPageLabel?: string;\n pageLabel?: (pageNumber: number) => string;\n jumpToPageButton?: string;\n }\n\n export interface I18nStrings {\n /** @i18n */\n jumpToPageInputLabel?: string;\n /** @i18n */\n jumpToPageError?: string;\n /** @i18n */\n jumpToPageLoadingText?: string;\n }\n\n export interface ChangeDetail {\n currentPageIndex: number;\n }\n\n export interface PageClickDetail {\n requestedPageAvailable: boolean;\n requestedPageIndex: number;\n }\n\n export interface JumpToPageProps {\n /**\n * User controlled loading state when jump to page callback is executing\n */\n loading?: boolean;\n }\n\n export interface Ref {\n /**\n * Set error state for jump to page. Component will auto-clear when user types or navigates.\n */\n setError: (hasError: boolean) => void;\n }\n}\n"]}
@@ -1,16 +1,5 @@
1
+ import React from 'react';
1
2
  import { InternalBaseComponentProps } from '../internal/hooks/use-base-component';
2
3
  import { PaginationProps } from './interfaces';
3
- type InternalPaginationProps = PaginationProps & InternalBaseComponentProps;
4
- export default function InternalPagination({
5
- openEnd,
6
- currentPageIndex,
7
- ariaLabels,
8
- pagesCount,
9
- disabled,
10
- onChange,
11
- onNextPageClick,
12
- onPreviousPageClick,
13
- __internalRootRef,
14
- ...rest
15
- }: InternalPaginationProps): JSX.Element;
16
- export {};
4
+ declare const InternalPagination: React.ForwardRefExoticComponent<PaginationProps & InternalBaseComponentProps & React.RefAttributes<PaginationProps.Ref>>;
5
+ export default InternalPagination;
@@ -1 +1 @@
1
- {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/pagination/internal.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAoF/C,KAAK,uBAAuB,GAAG,eAAe,GAAG,0BAA0B,CAAC;AAC5E,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,GAAG,IAAI,EACR,EAAE,uBAAuB,eA+GzB"}
1
+ {"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/pagination/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAgBhD,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAKlF,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AA+E/C,QAAA,MAAM,kBAAkB,0HAwOvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,21 +1,20 @@
1
1
  // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import React from 'react';
3
+ import React, { useRef, useState } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { copyAnalyticsMetadataAttribute, getAnalyticsMetadataAttribute, } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';
6
+ import InternalButton from '../button/internal';
6
7
  import { useInternalI18n } from '../i18n/context';
7
8
  import InternalIcon from '../icon/internal';
9
+ import InternalInput from '../input/internal';
8
10
  import { getBaseProps } from '../internal/base-component';
9
11
  import { useTableComponentsContext } from '../internal/context/table-component-context';
10
12
  import { fireNonCancelableEvent } from '../internal/events';
13
+ import { usePrevious } from '../internal/hooks/use-previous';
14
+ import InternalPopover from '../popover/internal';
15
+ import InternalSpaceBetween from '../space-between/internal';
11
16
  import { getPaginationState, range } from './utils';
12
17
  import styles from './styles.css.js';
13
- const defaultAriaLabels = {
14
- nextPageLabel: '',
15
- paginationLabel: '',
16
- previousPageLabel: '',
17
- pageLabel: pageNumber => `${pageNumber}`,
18
- };
19
18
  function PageButton({ className, ariaLabel, disabled, pageIndex, isCurrent = false, children, onClick, ...rest }) {
20
19
  function handleClick(event) {
21
20
  event.preventDefault();
@@ -40,15 +39,33 @@ function PageNumber({ pageIndex, ...rest }) {
40
39
  },
41
40
  })) }, pageIndex));
42
41
  }
43
- export default function InternalPagination({ openEnd, currentPageIndex, ariaLabels, pagesCount, disabled, onChange, onNextPageClick, onPreviousPageClick, __internalRootRef, ...rest }) {
44
- var _a, _b, _c, _d;
42
+ const InternalPagination = React.forwardRef(({ openEnd, currentPageIndex, ariaLabels, i18nStrings, pagesCount, disabled, onChange, onNextPageClick, onPreviousPageClick, __internalRootRef, jumpToPage, ...rest }, ref) => {
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
45
44
  const baseProps = getBaseProps(rest);
46
45
  const { leftDots, leftIndex, rightIndex, rightDots } = getPaginationState(currentPageIndex, pagesCount, openEnd);
46
+ const [jumpToPageValue, setJumpToPageValue] = useState(currentPageIndex === null || currentPageIndex === void 0 ? void 0 : currentPageIndex.toString());
47
+ const previousLoading = usePrevious(jumpToPage === null || jumpToPage === void 0 ? void 0 : jumpToPage.loading);
48
+ const jumpToPageInputRef = useRef(null);
49
+ const [hasError, setHasError] = useState(false);
47
50
  const i18n = useInternalI18n('pagination');
48
- const paginationLabel = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.paginationLabel;
49
- const nextPageLabel = (_a = i18n('ariaLabels.nextPageLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.nextPageLabel)) !== null && _a !== void 0 ? _a : defaultAriaLabels.nextPageLabel;
50
- const previousPageLabel = (_b = i18n('ariaLabels.previousPageLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.previousPageLabel)) !== null && _b !== void 0 ? _b : defaultAriaLabels.previousPageLabel;
51
- const pageNumberLabelFn = (_c = i18n('ariaLabels.pageLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.pageLabel, format => pageNumber => format({ pageNumber }))) !== null && _c !== void 0 ? _c : defaultAriaLabels.pageLabel;
51
+ // Expose setError function via ref
52
+ React.useImperativeHandle(ref, () => ({
53
+ setError: (error) => setHasError(error),
54
+ }));
55
+ // Sync input with currentPageIndex after loading completes
56
+ React.useEffect(() => {
57
+ if (previousLoading && !(jumpToPage === null || jumpToPage === void 0 ? void 0 : jumpToPage.loading)) {
58
+ setJumpToPageValue(String(currentPageIndex));
59
+ }
60
+ }, [previousLoading, jumpToPage === null || jumpToPage === void 0 ? void 0 : jumpToPage.loading, currentPageIndex]);
61
+ const paginationLabel = (_a = ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.paginationLabel) !== null && _a !== void 0 ? _a : '';
62
+ const nextPageLabel = (_b = i18n('ariaLabels.nextPageLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.nextPageLabel)) !== null && _b !== void 0 ? _b : '';
63
+ const previousPageLabel = (_c = i18n('ariaLabels.previousPageLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.previousPageLabel)) !== null && _c !== void 0 ? _c : '';
64
+ const pageNumberLabelFn = (_d = i18n('ariaLabels.pageLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.pageLabel, format => pageNumber => format({ pageNumber }))) !== null && _d !== void 0 ? _d : ((pageNumber) => `${pageNumber}`);
65
+ const jumpToPageLabel = (_e = i18n('i18nStrings.jumpToPageInputLabel', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.jumpToPageInputLabel)) !== null && _e !== void 0 ? _e : '';
66
+ const jumpToPageButtonLabel = (_f = i18n('ariaLabels.jumpToPageButtonLabel', ariaLabels === null || ariaLabels === void 0 ? void 0 : ariaLabels.jumpToPageButton)) !== null && _f !== void 0 ? _f : '';
67
+ const jumpToPageError = (_g = i18n('i18nStrings.jumpToPageError', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.jumpToPageError)) !== null && _g !== void 0 ? _g : '';
68
+ const jumpToPageLoadingText = (_h = i18n('i18nStrings.jumpToPageLoadingText', i18nStrings === null || i18nStrings === void 0 ? void 0 : i18nStrings.jumpToPageLoadingText)) !== null && _h !== void 0 ? _h : '';
52
69
  function handlePrevPageClick(requestedPageIndex) {
53
70
  handlePageClick(requestedPageIndex);
54
71
  fireNonCancelableEvent(onPreviousPageClick, {
@@ -63,19 +80,48 @@ export default function InternalPagination({ openEnd, currentPageIndex, ariaLabe
63
80
  requestedPageIndex: requestedPageIndex,
64
81
  });
65
82
  }
66
- function handlePageClick(requestedPageIndex) {
83
+ function handlePageClick(requestedPageIndex, errorState) {
84
+ setJumpToPageValue(String(requestedPageIndex));
85
+ setHasError(!!errorState); // Clear error on successful navigation
67
86
  fireNonCancelableEvent(onChange, { currentPageIndex: requestedPageIndex });
68
87
  }
88
+ function handleJumpToPageClick(requestedPageIndex) {
89
+ var _a;
90
+ const adjustedIndex = Math.max(1, Math.floor(requestedPageIndex));
91
+ if (openEnd) {
92
+ // Open-end: always navigate, parent will handle async loading
93
+ handlePageClick(adjustedIndex);
94
+ }
95
+ else {
96
+ // Closed-end: validate range
97
+ if (adjustedIndex >= 1 && adjustedIndex <= pagesCount) {
98
+ handlePageClick(adjustedIndex);
99
+ }
100
+ else {
101
+ // Out of range - set error and navigate to last page
102
+ handlePageClick(pagesCount, true);
103
+ }
104
+ }
105
+ (_a = jumpToPageInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
106
+ }
107
+ // Auto-clear error when user types in the input
108
+ const handleInputChange = (e) => {
109
+ setJumpToPageValue(e.detail.value);
110
+ if (hasError) {
111
+ setHasError(false);
112
+ }
113
+ };
69
114
  const previousButtonDisabled = disabled || currentPageIndex === 1;
70
115
  const nextButtonDisabled = disabled || (!openEnd && (pagesCount === 0 || currentPageIndex === pagesCount));
71
116
  const tableComponentContext = useTableComponentsContext();
72
- if ((_d = tableComponentContext === null || tableComponentContext === void 0 ? void 0 : tableComponentContext.paginationRef) === null || _d === void 0 ? void 0 : _d.current) {
117
+ if ((_j = tableComponentContext === null || tableComponentContext === void 0 ? void 0 : tableComponentContext.paginationRef) === null || _j === void 0 ? void 0 : _j.current) {
73
118
  tableComponentContext.paginationRef.current.currentPageIndex = currentPageIndex;
74
119
  tableComponentContext.paginationRef.current.totalPageCount = pagesCount;
75
120
  tableComponentContext.paginationRef.current.openEnd = openEnd;
76
121
  }
122
+ const jumpToPageButton = (React.createElement(InternalButton, { iconName: "arrow-right", variant: "icon", loading: jumpToPage === null || jumpToPage === void 0 ? void 0 : jumpToPage.loading, loadingText: jumpToPageLoadingText, ariaLabel: (jumpToPage === null || jumpToPage === void 0 ? void 0 : jumpToPage.loading) ? jumpToPageLoadingText : jumpToPageButtonLabel, onClick: () => handleJumpToPageClick(Number(jumpToPageValue)), disabled: !jumpToPageValue || Number(jumpToPageValue) === currentPageIndex }));
77
123
  return (React.createElement("ul", { "aria-label": paginationLabel, ...baseProps, className: clsx(baseProps.className, styles.root, disabled && styles['root-disabled']), ref: __internalRootRef },
78
- React.createElement(PageButton, { className: styles.arrow, pageIndex: currentPageIndex - 1, ariaLabel: previousPageLabel !== null && previousPageLabel !== void 0 ? previousPageLabel : defaultAriaLabels.nextPageLabel, disabled: previousButtonDisabled, onClick: handlePrevPageClick, ...(previousButtonDisabled
124
+ React.createElement(PageButton, { className: styles.arrow, pageIndex: currentPageIndex - 1, ariaLabel: previousPageLabel, disabled: previousButtonDisabled, onClick: handlePrevPageClick, ...(previousButtonDisabled
79
125
  ? {}
80
126
  : getAnalyticsMetadataAttribute({
81
127
  detail: {
@@ -88,13 +134,26 @@ export default function InternalPagination({ openEnd, currentPageIndex, ariaLabe
88
134
  range(leftIndex, rightIndex).map(pageIndex => (React.createElement(PageNumber, { key: pageIndex, isCurrent: currentPageIndex === pageIndex, pageIndex: pageIndex, disabled: disabled, ariaLabel: pageNumberLabelFn(pageIndex), onClick: handlePageClick }))),
89
135
  rightDots && React.createElement("li", { className: styles.dots }, "..."),
90
136
  !openEnd && pagesCount > 1 && (React.createElement(PageNumber, { isCurrent: currentPageIndex === pagesCount, pageIndex: pagesCount, disabled: disabled, ariaLabel: pageNumberLabelFn(pagesCount), onClick: handlePageClick })),
91
- React.createElement(PageButton, { className: styles.arrow, pageIndex: currentPageIndex + 1, ariaLabel: nextPageLabel !== null && nextPageLabel !== void 0 ? nextPageLabel : defaultAriaLabels.nextPageLabel, disabled: nextButtonDisabled, onClick: handleNextPageClick, ...(nextButtonDisabled
137
+ React.createElement(PageButton, { className: styles.arrow, pageIndex: currentPageIndex + 1, ariaLabel: nextPageLabel, disabled: nextButtonDisabled, onClick: handleNextPageClick, ...(nextButtonDisabled
92
138
  ? {}
93
139
  : getAnalyticsMetadataAttribute({
94
140
  detail: {
95
141
  position: 'next',
96
142
  },
97
143
  })) },
98
- React.createElement(InternalIcon, { name: "angle-right", variant: disabled ? 'disabled' : 'normal' }))));
99
- }
144
+ React.createElement(InternalIcon, { name: "angle-right", variant: disabled ? 'disabled' : 'normal' })),
145
+ jumpToPage && (React.createElement("li", { className: styles['jump-to-page'] },
146
+ React.createElement(InternalSpaceBetween, { size: "xxs", direction: "horizontal", alignItems: "end" },
147
+ React.createElement("div", { className: styles['jump-to-page-input'] },
148
+ React.createElement(InternalInput, { ref: jumpToPageInputRef, type: "number", value: jumpToPageValue, __inlineLabelText: jumpToPageLabel || undefined, __fullWidth: true, ariaLabel: jumpToPageLabel || undefined, nativeInputAttributes: {
149
+ min: 1,
150
+ max: !openEnd ? pagesCount : undefined,
151
+ }, onChange: handleInputChange, onBlur: () => setHasError(false), onKeyDown: e => {
152
+ if (e.detail.keyCode === 13 && jumpToPageValue && Number(jumpToPageValue) !== currentPageIndex) {
153
+ handleJumpToPageClick(Number(jumpToPageValue));
154
+ }
155
+ } })),
156
+ hasError && !(jumpToPage === null || jumpToPage === void 0 ? void 0 : jumpToPage.loading) ? (React.createElement(InternalPopover, { size: "medium", dismissButton: false, __visible: true, content: jumpToPageError, position: "bottom", triggerType: "custom", __onVisibleChange: ({ detail }) => !detail.visible && setHasError(false) }, jumpToPageButton)) : (jumpToPageButton))))));
157
+ });
158
+ export default InternalPagination;
100
159
  //# sourceMappingURL=internal.js.map