@riverty/web-components 6.0.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/custom-elements.json +259 -2
- package/dist/cjs/{index-DJ4H_bFj.js → index-BnETQtSf.js} +9 -382
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/r-accordion-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-section.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-accordion.cjs.entry.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +9 -6
- package/dist/cjs/r-badge.cjs.entry.js +1 -1
- package/dist/cjs/r-button.cjs.entry.js +6 -2
- package/dist/cjs/r-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox.cjs.entry.js +4 -4
- package/dist/cjs/r-design-system-devtools.cjs.entry.js +1 -1
- package/dist/cjs/r-dialog.cjs.entry.js +1 -1
- package/dist/cjs/r-hint_2.cjs.entry.js +3 -3
- package/dist/cjs/r-icon-button_2.cjs.entry.js +27 -7
- package/dist/cjs/r-icon.cjs.entry.js +2 -2
- package/dist/cjs/r-illustration.cjs.entry.js +396 -0
- package/dist/cjs/r-input-code.cjs.entry.js +34 -12
- package/dist/cjs/r-input-date.cjs.entry.js +7 -7
- package/dist/cjs/r-input-password.cjs.entry.js +3 -3
- package/dist/cjs/r-input-phone-number.cjs.entry.js +4 -4
- package/dist/cjs/r-input.cjs.entry.js +8 -5
- package/dist/cjs/r-list-item.cjs.entry.js +17 -16
- package/dist/cjs/r-pagination.cjs.entry.js +56 -50
- package/dist/cjs/r-panel.cjs.entry.js +6 -6
- package/dist/cjs/r-popover-action.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-content.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-headline.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-trigger.cjs.entry.js +2 -2
- package/dist/cjs/r-popover.cjs.entry.js +46 -5
- package/dist/cjs/r-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-description.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-title.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +2 -2
- package/dist/cjs/r-radio-button.cjs.entry.js +8 -7
- package/dist/cjs/r-radio-group.cjs.entry.js +83 -10
- package/dist/cjs/r-select-option.cjs.entry.js +2 -2
- package/dist/cjs/r-select.cjs.entry.js +6 -4
- package/dist/cjs/r-skip-link.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper-item.cjs.entry.js +19 -4
- package/dist/cjs/r-stepper.cjs.entry.js +76 -3
- package/dist/cjs/r-tab-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-tab.cjs.entry.js +7 -3
- package/dist/cjs/r-tabs-list.cjs.entry.js +161 -3
- package/dist/cjs/r-tabs.cjs.entry.js +35 -7
- package/dist/cjs/r-textarea.cjs.entry.js +2 -2
- package/dist/cjs/r-toast-group.cjs.entry.js +13 -4
- package/dist/cjs/r-toast.cjs.entry.js +104 -15
- package/dist/cjs/web-components.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/alert/alert.css +6 -6
- package/dist/collection/components/alert/alert.js +7 -4
- package/dist/collection/components/button/button.js +30 -1
- package/dist/collection/components/button/exports.js +1 -0
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/icon/exports.js +1 -1
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/icon/riverty-kit.js +1 -1
- package/dist/collection/components/icon-button/icon-button.js +22 -3
- package/dist/collection/components/illustration/data.js +112 -0
- package/dist/collection/components/illustration/exports.js +3 -0
- package/dist/collection/components/illustration/illustration.js +540 -0
- package/dist/collection/components/illustration/illustration.scss +56 -0
- package/dist/collection/components/illustration/illustrations-ui-kit.js +2 -0
- package/dist/collection/components/input/exports.js +3 -0
- package/dist/collection/components/input/input.css +3 -0
- package/dist/collection/components/input/input.js +100 -3
- package/dist/collection/components/input-code/exports.js +2 -2
- package/dist/collection/components/input-code/input-code.css +6 -0
- package/dist/collection/components/input-code/input-code.js +54 -16
- package/dist/collection/components/input-date/input-date.js +6 -6
- package/dist/collection/components/input-password/input-password.js +2 -2
- package/dist/collection/components/input-phone-number/input-phone-number.js +3 -3
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/list-item/list-item/list-item.css +46 -12
- package/dist/collection/components/list-item/list-item/list-item.js +34 -14
- package/dist/collection/components/pagination/pagination.css +33 -72
- package/dist/collection/components/pagination/pagination.js +194 -48
- package/dist/collection/components/panel/panel.css +40 -17
- package/dist/collection/components/panel/panel.js +6 -6
- package/dist/collection/components/popover/popover.css +0 -1
- package/dist/collection/components/popover/popover.js +44 -3
- package/dist/collection/components/popover-action/popover-action.js +1 -1
- package/dist/collection/components/popover-content/popover-content.js +1 -1
- package/dist/collection/components/popover-headline/popover-headline.js +1 -1
- package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +7 -6
- package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
- package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
- package/dist/collection/components/radio-group/radio-group.css +4 -1
- package/dist/collection/components/radio-group/radio-group.js +100 -8
- package/dist/collection/components/select/select.js +5 -3
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/skip-link/skip-link.js +1 -1
- package/dist/collection/components/stepper/stepper.css +5 -2
- package/dist/collection/components/stepper/stepper.js +125 -1
- package/dist/collection/components/stepper-item/stepper-item.css +25 -12
- package/dist/collection/components/stepper-item/stepper-item.js +36 -2
- package/dist/collection/components/tab/tab.css +29 -29
- package/dist/collection/components/tab/tab.js +5 -1
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +34 -6
- package/dist/collection/components/tabs-list/exports.js +2 -0
- package/dist/collection/components/tabs-list/tabs-list.css +43 -2
- package/dist/collection/components/tabs-list/tabs-list.js +277 -1
- package/dist/collection/components/textarea/textarea.css +1 -1
- package/dist/collection/components/toast/toast.css +37 -11
- package/dist/collection/components/toast/toast.js +140 -18
- package/dist/collection/components/toast-group/toast-group.css +5 -11
- package/dist/collection/components/toast-group/toast-group.js +12 -3
- package/dist/collection/components/tooltip/tooltip.js +24 -4
- package/dist/esm/{index-Da7qOBFr.js → index-CTxpqopm.js} +9 -382
- package/dist/esm/loader.js +3 -3
- package/dist/esm/r-accordion-panel.entry.js +1 -1
- package/dist/esm/r-accordion-section.entry.js +1 -1
- package/dist/esm/r-accordion-trigger.entry.js +1 -1
- package/dist/esm/r-accordion.entry.js +1 -1
- package/dist/esm/r-alert.entry.js +9 -6
- package/dist/esm/r-badge.entry.js +1 -1
- package/dist/esm/r-button.entry.js +6 -2
- package/dist/esm/r-checkbox-group.entry.js +1 -1
- package/dist/esm/r-checkbox.entry.js +4 -4
- package/dist/esm/r-design-system-devtools.entry.js +1 -1
- package/dist/esm/r-dialog.entry.js +1 -1
- package/dist/esm/r-hint_2.entry.js +3 -3
- package/dist/esm/r-icon-button_2.entry.js +27 -7
- package/dist/esm/r-icon.entry.js +2 -2
- package/dist/esm/r-illustration.entry.js +394 -0
- package/dist/esm/r-input-code.entry.js +34 -12
- package/dist/esm/r-input-date.entry.js +7 -7
- package/dist/esm/r-input-password.entry.js +3 -3
- package/dist/esm/r-input-phone-number.entry.js +4 -4
- package/dist/esm/r-input.entry.js +8 -5
- package/dist/esm/r-list-item.entry.js +17 -16
- package/dist/esm/r-pagination.entry.js +56 -50
- package/dist/esm/r-panel.entry.js +6 -6
- package/dist/esm/r-popover-action.entry.js +2 -2
- package/dist/esm/r-popover-content.entry.js +2 -2
- package/dist/esm/r-popover-headline.entry.js +2 -2
- package/dist/esm/r-popover-trigger.entry.js +2 -2
- package/dist/esm/r-popover.entry.js +46 -5
- package/dist/esm/r-progress-bar.entry.js +2 -2
- package/dist/esm/r-radio-button-description.entry.js +2 -2
- package/dist/esm/r-radio-button-leading.entry.js +2 -2
- package/dist/esm/r-radio-button-title.entry.js +2 -2
- package/dist/esm/r-radio-button-trailing.entry.js +2 -2
- package/dist/esm/r-radio-button.entry.js +8 -7
- package/dist/esm/r-radio-group.entry.js +83 -10
- package/dist/esm/r-select-option.entry.js +2 -2
- package/dist/esm/r-select.entry.js +6 -4
- package/dist/esm/r-skip-link.entry.js +2 -2
- package/dist/esm/r-stepper-item.entry.js +19 -4
- package/dist/esm/r-stepper.entry.js +76 -3
- package/dist/esm/r-tab-panel.entry.js +2 -2
- package/dist/esm/r-tab.entry.js +7 -3
- package/dist/esm/r-tabs-list.entry.js +161 -3
- package/dist/esm/r-tabs.entry.js +35 -7
- package/dist/esm/r-textarea.entry.js +2 -2
- package/dist/esm/r-toast-group.entry.js +13 -4
- package/dist/esm/r-toast.entry.js +104 -15
- package/dist/esm/web-components.js +3 -3
- package/dist/types/components/alert/alert.d.ts +1 -0
- package/dist/types/components/button/button.d.ts +8 -1
- package/dist/types/components/button/exports.d.ts +2 -0
- package/dist/types/components/icon/{icon-data.d.ts → data.d.ts} +2 -1
- package/dist/types/components/icon/exports.d.ts +2 -1
- package/dist/types/components/icon/riverty-kit.d.ts +2 -1
- package/dist/types/components/icon-button/icon-button.d.ts +4 -0
- package/dist/types/components/illustration/data.d.ts +52 -0
- package/dist/types/components/illustration/exports.d.ts +23 -0
- package/dist/types/components/illustration/illustration.d.ts +51 -0
- package/dist/types/components/illustration/illustrations-ui-kit.d.ts +21 -0
- package/dist/types/components/input/exports.d.ts +6 -0
- package/dist/types/components/input/input.d.ts +31 -1
- package/dist/types/components/input-code/exports.d.ts +4 -4
- package/dist/types/components/input-code/input-code.d.ts +18 -4
- package/dist/types/components/list-item/list-item/list-item.d.ts +5 -3
- package/dist/types/components/pagination/pagination.d.ts +19 -0
- package/dist/types/components/popover/popover.d.ts +9 -0
- package/dist/types/components/radio-group/radio-group.d.ts +16 -0
- package/dist/types/components/stepper/stepper.d.ts +11 -0
- package/dist/types/components/stepper-item/stepper-item.d.ts +7 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -0
- package/dist/types/components/tabs-list/exports.d.ts +4 -0
- package/dist/types/components/tabs-list/tabs-list.d.ts +38 -0
- package/dist/types/components/toast/toast.d.ts +20 -3
- package/dist/types/components/tooltip/tooltip.d.ts +5 -0
- package/dist/types/components.d.ts +360 -17
- package/dist/web-components/p-02b22f8e.entry.js +1 -0
- package/dist/web-components/{p-d054eb4d.entry.js → p-075a8dc8.entry.js} +1 -1
- package/dist/web-components/{p-8a66d20c.entry.js → p-0a34d33b.entry.js} +1 -1
- package/dist/web-components/{p-8c31cbd5.entry.js → p-10cc9983.entry.js} +1 -1
- package/dist/web-components/{p-d7726e46.entry.js → p-253068b9.entry.js} +1 -1
- package/dist/web-components/{p-3884c6e7.entry.js → p-3b8c8951.entry.js} +1 -1
- package/dist/web-components/{p-550e2237.entry.js → p-3beacdab.entry.js} +1 -1
- package/dist/web-components/{p-e2188953.entry.js → p-4214867d.entry.js} +1 -1
- package/dist/web-components/{p-3f60c6c0.entry.js → p-42c857e9.entry.js} +1 -1
- package/dist/web-components/{p-7fed6f4d.entry.js → p-44f87e16.entry.js} +1 -1
- package/dist/web-components/p-477614c5.entry.js +1 -0
- package/dist/web-components/{p-1da75540.entry.js → p-495ba3d2.entry.js} +1 -1
- package/dist/web-components/p-4de76291.entry.js +1 -0
- package/dist/web-components/{p-05738503.entry.js → p-55600d47.entry.js} +1 -1
- package/dist/web-components/p-562051aa.entry.js +1 -0
- package/dist/web-components/p-5b850e0f.entry.js +1 -0
- package/dist/web-components/p-6013dfc8.entry.js +1 -0
- package/dist/web-components/{p-6cc2ea2c.entry.js → p-62e7ae04.entry.js} +1 -1
- package/dist/web-components/p-71519d37.entry.js +1 -0
- package/dist/web-components/p-88f7b47f.entry.js +1 -0
- package/dist/web-components/p-8975a6a3.entry.js +1 -0
- package/dist/web-components/p-8e125826.entry.js +1 -0
- package/dist/web-components/p-91cc0bde.entry.js +1 -0
- package/dist/web-components/{p-0347feff.entry.js → p-93435fcd.entry.js} +1 -1
- package/dist/web-components/p-947969d7.entry.js +1 -0
- package/dist/web-components/p-95396b5c.entry.js +1 -0
- package/dist/web-components/p-9de3a1a5.entry.js +1 -0
- package/dist/web-components/p-9f583ed1.entry.js +1 -0
- package/dist/web-components/p-CTxpqopm.js +2 -0
- package/dist/web-components/{p-e5945c01.entry.js → p-a1086abe.entry.js} +1 -1
- package/dist/web-components/{p-f9d5004c.entry.js → p-bbba6d79.entry.js} +1 -1
- package/dist/web-components/{p-c478712b.entry.js → p-bde44ec4.entry.js} +1 -1
- package/dist/web-components/p-bfc7e6c0.entry.js +1 -0
- package/dist/web-components/p-c1030394.entry.js +1 -0
- package/dist/web-components/p-c1f59ed1.entry.js +1 -0
- package/dist/web-components/{p-26ef77d6.entry.js → p-c80a5541.entry.js} +1 -1
- package/dist/web-components/{p-9ef1bbee.entry.js → p-c96ee61a.entry.js} +1 -1
- package/dist/web-components/{p-8dac326b.entry.js → p-caf8f067.entry.js} +1 -1
- package/dist/web-components/p-cc363c3d.entry.js +1 -0
- package/dist/web-components/p-cf4ff357.entry.js +1 -0
- package/dist/web-components/p-d0310ed4.entry.js +1 -0
- package/dist/web-components/p-d1412932.entry.js +1 -0
- package/dist/web-components/{p-62b788bf.entry.js → p-d2447e30.entry.js} +1 -1
- package/dist/web-components/p-dc9cca06.entry.js +1 -0
- package/dist/web-components/p-e5b943a2.entry.js +1 -0
- package/dist/web-components/{p-4cc58c6a.entry.js → p-e67b13df.entry.js} +1 -1
- package/dist/web-components/p-efec231a.entry.js +1 -0
- package/dist/web-components/{p-4595fa8e.entry.js → p-f867e4c3.entry.js} +1 -1
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +5 -2
- package/dist/collection/components/icon/bundled-icons/all-kit.json +0 -1
- package/dist/collection/components/icon/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/bundled-icons/all-kit.json +0 -1
- package/dist/web-components/bundled-icons/riverty-kit.json +0 -1
- package/dist/web-components/p-0e4c8bf1.entry.js +0 -1
- package/dist/web-components/p-3a5a67e7.entry.js +0 -1
- package/dist/web-components/p-4254a383.entry.js +0 -1
- package/dist/web-components/p-5441b746.entry.js +0 -1
- package/dist/web-components/p-589baaf9.entry.js +0 -1
- package/dist/web-components/p-60341de2.entry.js +0 -1
- package/dist/web-components/p-60ca994e.entry.js +0 -1
- package/dist/web-components/p-6303b9fe.entry.js +0 -1
- package/dist/web-components/p-63fd817d.entry.js +0 -1
- package/dist/web-components/p-673dbfd0.entry.js +0 -1
- package/dist/web-components/p-67fa3f84.entry.js +0 -1
- package/dist/web-components/p-6a4f3836.entry.js +0 -1
- package/dist/web-components/p-70784685.entry.js +0 -1
- package/dist/web-components/p-8b4d2448.entry.js +0 -1
- package/dist/web-components/p-Da7qOBFr.js +0 -2
- package/dist/web-components/p-a0dbde7c.entry.js +0 -1
- package/dist/web-components/p-a71485d8.entry.js +0 -1
- package/dist/web-components/p-a7d22c76.entry.js +0 -1
- package/dist/web-components/p-ae251d2f.entry.js +0 -1
- package/dist/web-components/p-b98ab649.entry.js +0 -1
- package/dist/web-components/p-b9e3b3d6.entry.js +0 -1
- package/dist/web-components/p-c1e748f2.entry.js +0 -1
- package/dist/web-components/p-d433a828.entry.js +0 -1
- package/dist/web-components/p-d819c8e5.entry.js +0 -1
- package/dist/web-components/p-f7adb875.entry.js +0 -1
- /package/dist/collection/components/icon/{icon-data.js → data.js} +0 -0
|
@@ -9,26 +9,17 @@
|
|
|
9
9
|
--r-pagination--width: 100%;
|
|
10
10
|
--r-pagination--max-width: 664px;
|
|
11
11
|
--r-pagination--margin: 0 auto;
|
|
12
|
-
--r-pagination--
|
|
13
|
-
--r-
|
|
14
|
-
--r-
|
|
15
|
-
--r-
|
|
16
|
-
--r-
|
|
17
|
-
--r-
|
|
18
|
-
--r-pagination--item--width:
|
|
19
|
-
--r-pagination--item--height:
|
|
20
|
-
--r-pagination--item--border-
|
|
21
|
-
--r-pagination--item--border-style: solid;
|
|
22
|
-
--r-pagination--item--border-color: var(--r-border-softer);
|
|
23
|
-
--r-pagination--item--z-index: 0;
|
|
24
|
-
--r-pagination--item--font-family: inherit;
|
|
25
|
-
--r-pagination--button--width: 100%;
|
|
26
|
-
--r-pagination--button--height: 100%;
|
|
27
|
-
--r-pagination--button--color: var(--r-text-regular);
|
|
28
|
-
--r-pagination--button--background-color: transparent;
|
|
12
|
+
--r-pagination--items-list--display: flex;
|
|
13
|
+
--r-paginaition--items-list--justify-content: center;
|
|
14
|
+
--r-paginaition--items-list--align-items: center;
|
|
15
|
+
--r-paginaition--items-list--list-style-type: none;
|
|
16
|
+
--r-paginaition--items-list--padding: 0;
|
|
17
|
+
--r-paginaition--items-list--margin: 0;
|
|
18
|
+
--r-pagination--item--width: var(--r-spacing-300, 3rem);
|
|
19
|
+
--r-pagination--item--height: var(--r-spacing-300, 3rem);
|
|
20
|
+
--r-pagination--item--border-radius: 0;
|
|
29
21
|
--r-pagination--button--border-width: 0;
|
|
30
22
|
--r-pagination--button--padding: 0;
|
|
31
|
-
--r-pagination--button--font-size: var(--r-font-size-300);
|
|
32
23
|
--r-pagination--header--display: flex;
|
|
33
24
|
--r-pagination--header--align-items: center;
|
|
34
25
|
--r-pagination--header--justify-content: space-between;
|
|
@@ -90,68 +81,38 @@
|
|
|
90
81
|
.r-pagination--header label {
|
|
91
82
|
font-size: var(--r-pagination--font-size);
|
|
92
83
|
}
|
|
93
|
-
.r-pagination--
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
--r-
|
|
100
|
-
}
|
|
101
|
-
.r-pagination--item:active {
|
|
102
|
-
--r-pagination--item--background-color: var(--r-background-interactive-pressed);
|
|
103
|
-
}
|
|
104
|
-
.r-pagination--item.stepper {
|
|
105
|
-
--r-pagination--item--background-color: transparent;
|
|
84
|
+
.r-pagination--items-list {
|
|
85
|
+
display: var(--r-pagination--items-list--display);
|
|
86
|
+
justify-content: var(--r-paginaition--items-list--justify-content);
|
|
87
|
+
align-items: var(--r-paginaition--items-list--align-items);
|
|
88
|
+
list-style-type: var(--r-paginaition--items-list--list-style-type);
|
|
89
|
+
padding: var(--r-paginaition--items-list--padding);
|
|
90
|
+
margin: var(--r-paginaition--items-list--margin);
|
|
106
91
|
}
|
|
107
92
|
.r-pagination--item.active {
|
|
108
|
-
--r-
|
|
109
|
-
--r-
|
|
93
|
+
--r-button--color: var(--r-text-regular);
|
|
94
|
+
--r-button--background-color: var(--r-background-interactive-activated);
|
|
110
95
|
font-weight: var(--r-font-weight-semibold);
|
|
111
96
|
}
|
|
112
|
-
.r-pagination--item.arrow.previous {
|
|
113
|
-
--r-pagination--item--margin-left: 0;
|
|
114
|
-
--r-pagination--item--margin-right: 16px;
|
|
115
|
-
}
|
|
116
|
-
.r-pagination--item.arrow.next {
|
|
117
|
-
--r-pagination--item--margin-left: 16px;
|
|
118
|
-
--r-pagination--item--margin-right: 0;
|
|
119
|
-
}
|
|
120
|
-
.r-pagination--item.arrow.first {
|
|
121
|
-
--r-pagination--item--margin-left: 0;
|
|
122
|
-
--r-pagination--item--margin-right: 8px;
|
|
123
|
-
}
|
|
124
|
-
.r-pagination--item.arrow.last {
|
|
125
|
-
--r-pagination--item--margin-left: 8px;
|
|
126
|
-
--r-pagination--item--margin-right: 0;
|
|
127
|
-
}
|
|
128
|
-
.r-pagination--item.disabled, .r-pagination--item.disabled:hover {
|
|
129
|
-
--r-pagination--item--opacity: 0.4;
|
|
130
|
-
--r-pagination--item--background-color: transparent;
|
|
131
|
-
}
|
|
132
97
|
.r-pagination--item.number {
|
|
133
98
|
--r-button--font-size: 0.813rem;
|
|
134
99
|
}
|
|
135
100
|
.r-pagination--item {
|
|
136
|
-
--r-button--
|
|
137
|
-
--r-button--width: var(--r-pagination--
|
|
138
|
-
--r-button--
|
|
139
|
-
--r-button--
|
|
140
|
-
--r-button--
|
|
101
|
+
--r-icon-button--height: var(--r-pagination--item--height);
|
|
102
|
+
--r-icon-button--width: var(--r-pagination--item--width);
|
|
103
|
+
--r-icon-button--border-radius: var(--r-pagination--item--border-radius);
|
|
104
|
+
--r-button--width: var(--r-pagination--item--width);
|
|
105
|
+
--r-button--height: var(--r-pagination--item--height);
|
|
141
106
|
--r-button--border-width: var(--r-pagination--button--border-width);
|
|
142
107
|
--r-button--padding: var(--r-pagination--button--padding);
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
margin-right: var(--r-pagination--item--margin-right);
|
|
154
|
-
opacity: var(--r-pagination--item--opacity);
|
|
155
|
-
width: var(--r-pagination--item--width);
|
|
156
|
-
z-index: var(--r-pagination--item--z-index);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.visually-hidden {
|
|
111
|
+
position: absolute;
|
|
112
|
+
width: 1px;
|
|
113
|
+
height: 1px;
|
|
114
|
+
clip: rect(0 0 0 0);
|
|
115
|
+
clip-path: inset(50%);
|
|
116
|
+
overflow: hidden;
|
|
117
|
+
white-space: nowrap;
|
|
157
118
|
}
|
|
@@ -26,6 +26,20 @@ export class RPagination {
|
|
|
26
26
|
this.selectText = 'page';
|
|
27
27
|
/** Position of the list box */
|
|
28
28
|
this.listBoxPosition = 'top';
|
|
29
|
+
/** Label for Previous Page button. Important to ensure accessibility for screen reader users. */
|
|
30
|
+
this.previousPageButtonLabel = 'Go to the previous page';
|
|
31
|
+
/** Label for Next Page button. Important to ensure accessibility for screen reader users.*/
|
|
32
|
+
this.nextPageButtonLabel = 'Go to the next page';
|
|
33
|
+
/** Label for First Page button. Important to ensure accessibility for screen reader users.*/
|
|
34
|
+
this.firstPageButtonLabel = 'Go to the first page';
|
|
35
|
+
/** Label for Last Page button. Important to ensure accessibility for screen reader users.*/
|
|
36
|
+
this.lastPageButtonLabel = 'Go to the last page';
|
|
37
|
+
/** Label for Page number buttons. Important to ensure accessibility for screen reader users.*/
|
|
38
|
+
this.pageLabel = 'Page';
|
|
39
|
+
/** Label for Ellipsis stepper. Important to ensure accessibility for screen reader users.*/
|
|
40
|
+
this.ellipsisLabel = 'Ellipsis indicating skipped pages';
|
|
41
|
+
/** Label for Items per page select. */
|
|
42
|
+
this.itemsPerPageLabel = 'Items per page';
|
|
29
43
|
this.resizeObserver = null;
|
|
30
44
|
this.handleItemsPerPageChange = (event) => {
|
|
31
45
|
const newItemsPerPage = parseInt(event.detail.value, 10);
|
|
@@ -50,28 +64,17 @@ export class RPagination {
|
|
|
50
64
|
});
|
|
51
65
|
};
|
|
52
66
|
this.handleItemChange = e => {
|
|
53
|
-
const
|
|
54
|
-
const isEnter = e.code === 'Enter';
|
|
55
|
-
const isSpace = e.code === 'Space';
|
|
56
|
-
if (isKeyup && !isEnter && !isSpace)
|
|
57
|
-
return;
|
|
58
|
-
const buttonElement = e.target.closest('r-button');
|
|
59
|
-
if (buttonElement === null)
|
|
60
|
-
return;
|
|
67
|
+
const buttonElement = e.target.closest('r-icon-button') || e.target.closest('r-button');
|
|
61
68
|
const index = Number(buttonElement.getAttribute('data-index'));
|
|
62
69
|
if (index === null)
|
|
63
70
|
return;
|
|
64
71
|
this._activateStep(index);
|
|
65
72
|
requestAnimationFrame(() => {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if (newActiveButton) {
|
|
69
|
-
newActiveButton.focus(); // Ensure focus is set correctly
|
|
70
|
-
}
|
|
73
|
+
const focusTarget = this.getFocusTargetAfterNavigation(buttonElement);
|
|
74
|
+
focusTarget === null || focusTarget === void 0 ? void 0 : focusTarget.setFocus();
|
|
71
75
|
});
|
|
72
76
|
if (buttonElement.classList.contains('number')) {
|
|
73
77
|
this.rNumberClick.emit(this.paginationState);
|
|
74
|
-
buttonElement.blur();
|
|
75
78
|
}
|
|
76
79
|
if (buttonElement.classList.contains('arrow')) {
|
|
77
80
|
const direction = buttonElement.classList.contains('next') ? 'next' : 'previous';
|
|
@@ -150,6 +153,35 @@ export class RPagination {
|
|
|
150
153
|
// Emit updated pagination state
|
|
151
154
|
this.rChange.emit(this.paginationState);
|
|
152
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Determines the appropriate focus target after navigation based on button states.
|
|
158
|
+
* Handles edge cases where navigation buttons become disabled.
|
|
159
|
+
*/
|
|
160
|
+
getFocusTargetAfterNavigation(buttonElement) {
|
|
161
|
+
var _a, _b, _c, _d, _e;
|
|
162
|
+
const isArrowButton = buttonElement.classList.contains('arrow');
|
|
163
|
+
const isNextButton = buttonElement.classList.contains('next');
|
|
164
|
+
const isPrevButton = buttonElement.classList.contains('previous');
|
|
165
|
+
const isFirstButton = buttonElement.classList.contains('first');
|
|
166
|
+
const isLastButton = buttonElement.classList.contains('last');
|
|
167
|
+
const willNextBeDisabled = this.next === null;
|
|
168
|
+
const willPrevBeDisabled = this.previous === null;
|
|
169
|
+
const willLastBeDisabled = this.active === this.total;
|
|
170
|
+
const willFirstBeDisabled = this.first === null;
|
|
171
|
+
if (isNextButton && willNextBeDisabled) {
|
|
172
|
+
return (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`.r-pagination--item.number[data-index="${this.total}"]`);
|
|
173
|
+
}
|
|
174
|
+
if (isPrevButton && willPrevBeDisabled) {
|
|
175
|
+
return (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(`.r-pagination--item.number[data-index="1"]`);
|
|
176
|
+
}
|
|
177
|
+
if (isLastButton && willLastBeDisabled) {
|
|
178
|
+
return (_c = this.el.shadowRoot) === null || _c === void 0 ? void 0 : _c.querySelector(`.r-pagination--item.number[data-index="${this.total}"]`);
|
|
179
|
+
}
|
|
180
|
+
if (isFirstButton && willFirstBeDisabled) {
|
|
181
|
+
return (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('.r-pagination--item.number[data-index="1"]');
|
|
182
|
+
}
|
|
183
|
+
return isArrowButton ? buttonElement : (_e = this.el.shadowRoot) === null || _e === void 0 ? void 0 : _e.querySelector(`.r-pagination--item[data-index="${this.pageActive}"]`);
|
|
184
|
+
}
|
|
153
185
|
componentWillLoad() {
|
|
154
186
|
this.setPaginationState();
|
|
155
187
|
}
|
|
@@ -168,13 +200,13 @@ export class RPagination {
|
|
|
168
200
|
const { active, previous, next, first, itemsPerPage, itemsPerPageOptions, startText, middleText, endText, selectText, listBoxPosition } = this;
|
|
169
201
|
const itemTemplate = (type, index) => {
|
|
170
202
|
if (type === 'number') {
|
|
171
|
-
return (h("r-button", { class: "r-pagination--item number", "data-index": index,
|
|
203
|
+
return (h("li", null, h("r-button", { class: "r-pagination--item number", "data-index": index, variant: "secondary", onRClick: this.handleItemChange }, h("span", { class: "visually-hidden" }, this.pageLabel), " ", index)));
|
|
172
204
|
}
|
|
173
205
|
if (type === 'active') {
|
|
174
|
-
return (h("
|
|
206
|
+
return (h("li", null, h("r-button", { "data-index": index, class: "r-pagination--item number active", rAriaCurrent: "page" }, h("span", { class: "visually-hidden" }, this.pageLabel), " ", index)));
|
|
175
207
|
}
|
|
176
208
|
if (type === 'stepper') {
|
|
177
|
-
return (h("
|
|
209
|
+
return (h("li", { "aria-label": this.ellipsisLabel, class: "r-pagination--item stepper" }, "..."));
|
|
178
210
|
}
|
|
179
211
|
};
|
|
180
212
|
const renderNumbers = () => {
|
|
@@ -190,7 +222,7 @@ export class RPagination {
|
|
|
190
222
|
};
|
|
191
223
|
// Case: total pages are less than or equal to maxVisiblePages
|
|
192
224
|
if (totalPages <= maxVisiblePages) {
|
|
193
|
-
return h(
|
|
225
|
+
return h("ul", { class: "r-pagination--items-list" }, [...Array(totalPages).keys()].map(_createItem));
|
|
194
226
|
}
|
|
195
227
|
// Always add startEdge
|
|
196
228
|
items.push(itemTemplate(active === startEdge ? 'active' : 'number', startEdge));
|
|
@@ -249,47 +281,21 @@ export class RPagination {
|
|
|
249
281
|
}
|
|
250
282
|
}
|
|
251
283
|
}
|
|
252
|
-
return h(
|
|
284
|
+
return h("ul", { class: "r-pagination--items-list" }, items);
|
|
253
285
|
};
|
|
254
286
|
const renderHeader = () => {
|
|
255
287
|
const startItem = Math.min((active - 1) * itemsPerPage + 1, this.totalResults);
|
|
256
288
|
const endItem = Math.min(active * itemsPerPage, this.totalResults);
|
|
257
|
-
return (h(Fragment, null, h("div", { ref: el => (this.headerRef = el), class: "r-pagination--header" }, h("div", { class: "results-info", "aria-live": "polite" }, startText ? startText : 'Showing', " ", startItem, "\u2013", endItem, " ", middleText ? middleText : 'of', " ", this.totalResults, " ", endText ? endText : 'results'), h("div", null, h("r-select", { class: "r-pagination--header--select", value: this.itemsPerPage.toString(), id: "items-per-page", onRChange: this.handleItemsPerPageChange, label:
|
|
258
|
-
};
|
|
259
|
-
const getTagName = isNoPage => isNoPage ? 'div' : 'r-button';
|
|
260
|
-
const PrevTagName = getTagName(this.isNoPreviousPage);
|
|
261
|
-
const NextTagName = getTagName(this.isNoNextPage);
|
|
262
|
-
const FirstTagName = getTagName(this.isNotFirstPage);
|
|
263
|
-
const LastTagName = getTagName(this.isNotLastPage);
|
|
264
|
-
const prevArrowAttrs = {
|
|
265
|
-
class: `r-pagination--item arrow previous ${this.isNoPreviousPage ? 'disabled' : ''}`,
|
|
266
|
-
'data-index': previous,
|
|
267
|
-
'aria-label': `${PrevTagName === 'r-button' ? 'Previous Page' : ''}`
|
|
268
|
-
};
|
|
269
|
-
const nextArrowAttrs = {
|
|
270
|
-
class: `r-pagination--item arrow next ${this.isNoNextPage ? 'disabled' : ''}`,
|
|
271
|
-
'data-index': next,
|
|
272
|
-
'aria-label': `${NextTagName === 'r-button' ? 'Next Page' : ''}`
|
|
273
|
-
};
|
|
274
|
-
const firstArrowAttrs = {
|
|
275
|
-
class: `r-pagination--item arrow first ${first === null ? 'disabled' : ''}`,
|
|
276
|
-
'data-index': first,
|
|
277
|
-
'aria-label': `${first === null ? '' : 'First Page'}`
|
|
289
|
+
return (h(Fragment, null, h("div", { ref: el => (this.headerRef = el), class: "r-pagination--header" }, h("div", { class: "results-info", "aria-live": "polite" }, startText ? startText : 'Showing', " ", startItem, "\u2013", endItem, " ", middleText ? middleText : 'of', " ", this.totalResults, " ", endText ? endText : 'results'), h("div", null, h("r-select", { class: "r-pagination--header--select", value: this.itemsPerPage.toString(), id: "items-per-page", onRChange: this.handleItemsPerPageChange, label: this.itemsPerPageLabel, "listbox-position": listBoxPosition }, itemsPerPageOptions.map(option => (h("r-select-option", { value: option.toString() }, option, "/", selectText ? selectText : 'page'))))))));
|
|
278
290
|
};
|
|
279
291
|
const isLastPage = active === this.total;
|
|
280
|
-
const lastArrowAttrs = {
|
|
281
|
-
class: `r-pagination--item arrow last ${isLastPage ? 'disabled' : ''}`,
|
|
282
|
-
'data-index': isLastPage ? null : this.total,
|
|
283
|
-
'aria-label': isLastPage ? '' : 'Last Page',
|
|
284
|
-
tabindex: isLastPage ? '-1' : '0' // Make unfocusable when disabled
|
|
285
|
-
};
|
|
286
292
|
const renderList = () => {
|
|
287
293
|
if (this.variant === 'minimized') {
|
|
288
294
|
return (h(Fragment, null, h("div", { ref: el => (this.footerRef = el), class: "r-pagination--footer" }, renderNumbers())));
|
|
289
295
|
}
|
|
290
|
-
return (h(Fragment, null, h("div", { ref: el => (this.footerRef = el), class: "r-pagination--footer" }, this.variant === 'maximized' && (h(
|
|
296
|
+
return (h(Fragment, null, h("div", { ref: el => (this.footerRef = el), class: "r-pagination--footer" }, this.variant === 'maximized' && (h("r-icon-button", { "data-index": first, name: "angle-left-with-vertical-line", size: "s", disabled: this.isNotFirstPage, label: this.firstPageButtonLabel, class: "r-pagination--item arrow first", onRClick: this.handleItemChange })), h("r-icon-button", { "data-index": previous, name: "angle-left", size: "s", disabled: this.isNoPreviousPage, label: this.previousPageButtonLabel, class: "r-pagination--item arrow previous", onRClick: this.handleItemChange }), renderNumbers(), h("r-icon-button", { "data-index": next, name: "angle-right", size: "s", disabled: this.isNoNextPage, label: this.nextPageButtonLabel, class: "r-pagination--item arrow next", onRClick: this.handleItemChange }), this.variant === 'maximized' && (h("r-icon-button", { "data-index": this.total, name: "angle-right-with-vertical-line", size: "s", disabled: isLastPage, label: this.lastPageButtonLabel, class: "r-pagination--item arrow last", onRClick: this.handleItemChange })))));
|
|
291
297
|
};
|
|
292
|
-
return (h(Host,
|
|
298
|
+
return (h(Host, { role: "navigation" }, h("div", { class: "r-pagination" }, this.resultsLine && renderHeader(), renderList())));
|
|
293
299
|
}
|
|
294
300
|
static get is() { return "r-pagination"; }
|
|
295
301
|
static get encapsulation() { return "shadow"; }
|
|
@@ -561,6 +567,146 @@ export class RPagination {
|
|
|
561
567
|
"setter": false,
|
|
562
568
|
"reflect": false,
|
|
563
569
|
"defaultValue": "'top'"
|
|
570
|
+
},
|
|
571
|
+
"previousPageButtonLabel": {
|
|
572
|
+
"type": "string",
|
|
573
|
+
"attribute": "previous-page-button-label",
|
|
574
|
+
"mutable": false,
|
|
575
|
+
"complexType": {
|
|
576
|
+
"original": "string",
|
|
577
|
+
"resolved": "string",
|
|
578
|
+
"references": {}
|
|
579
|
+
},
|
|
580
|
+
"required": false,
|
|
581
|
+
"optional": false,
|
|
582
|
+
"docs": {
|
|
583
|
+
"tags": [],
|
|
584
|
+
"text": "Label for Previous Page button. Important to ensure accessibility for screen reader users."
|
|
585
|
+
},
|
|
586
|
+
"getter": false,
|
|
587
|
+
"setter": false,
|
|
588
|
+
"reflect": false,
|
|
589
|
+
"defaultValue": "'Go to the previous page'"
|
|
590
|
+
},
|
|
591
|
+
"nextPageButtonLabel": {
|
|
592
|
+
"type": "string",
|
|
593
|
+
"attribute": "next-page-button-label",
|
|
594
|
+
"mutable": false,
|
|
595
|
+
"complexType": {
|
|
596
|
+
"original": "string",
|
|
597
|
+
"resolved": "string",
|
|
598
|
+
"references": {}
|
|
599
|
+
},
|
|
600
|
+
"required": false,
|
|
601
|
+
"optional": false,
|
|
602
|
+
"docs": {
|
|
603
|
+
"tags": [],
|
|
604
|
+
"text": "Label for Next Page button. Important to ensure accessibility for screen reader users."
|
|
605
|
+
},
|
|
606
|
+
"getter": false,
|
|
607
|
+
"setter": false,
|
|
608
|
+
"reflect": false,
|
|
609
|
+
"defaultValue": "'Go to the next page'"
|
|
610
|
+
},
|
|
611
|
+
"firstPageButtonLabel": {
|
|
612
|
+
"type": "string",
|
|
613
|
+
"attribute": "first-page-button-label",
|
|
614
|
+
"mutable": false,
|
|
615
|
+
"complexType": {
|
|
616
|
+
"original": "string",
|
|
617
|
+
"resolved": "string",
|
|
618
|
+
"references": {}
|
|
619
|
+
},
|
|
620
|
+
"required": false,
|
|
621
|
+
"optional": false,
|
|
622
|
+
"docs": {
|
|
623
|
+
"tags": [],
|
|
624
|
+
"text": "Label for First Page button. Important to ensure accessibility for screen reader users."
|
|
625
|
+
},
|
|
626
|
+
"getter": false,
|
|
627
|
+
"setter": false,
|
|
628
|
+
"reflect": false,
|
|
629
|
+
"defaultValue": "'Go to the first page'"
|
|
630
|
+
},
|
|
631
|
+
"lastPageButtonLabel": {
|
|
632
|
+
"type": "string",
|
|
633
|
+
"attribute": "last-page-button-label",
|
|
634
|
+
"mutable": false,
|
|
635
|
+
"complexType": {
|
|
636
|
+
"original": "string",
|
|
637
|
+
"resolved": "string",
|
|
638
|
+
"references": {}
|
|
639
|
+
},
|
|
640
|
+
"required": false,
|
|
641
|
+
"optional": false,
|
|
642
|
+
"docs": {
|
|
643
|
+
"tags": [],
|
|
644
|
+
"text": "Label for Last Page button. Important to ensure accessibility for screen reader users."
|
|
645
|
+
},
|
|
646
|
+
"getter": false,
|
|
647
|
+
"setter": false,
|
|
648
|
+
"reflect": false,
|
|
649
|
+
"defaultValue": "'Go to the last page'"
|
|
650
|
+
},
|
|
651
|
+
"pageLabel": {
|
|
652
|
+
"type": "string",
|
|
653
|
+
"attribute": "page-label",
|
|
654
|
+
"mutable": false,
|
|
655
|
+
"complexType": {
|
|
656
|
+
"original": "string",
|
|
657
|
+
"resolved": "string",
|
|
658
|
+
"references": {}
|
|
659
|
+
},
|
|
660
|
+
"required": false,
|
|
661
|
+
"optional": false,
|
|
662
|
+
"docs": {
|
|
663
|
+
"tags": [],
|
|
664
|
+
"text": "Label for Page number buttons. Important to ensure accessibility for screen reader users."
|
|
665
|
+
},
|
|
666
|
+
"getter": false,
|
|
667
|
+
"setter": false,
|
|
668
|
+
"reflect": false,
|
|
669
|
+
"defaultValue": "'Page'"
|
|
670
|
+
},
|
|
671
|
+
"ellipsisLabel": {
|
|
672
|
+
"type": "string",
|
|
673
|
+
"attribute": "ellipsis-label",
|
|
674
|
+
"mutable": false,
|
|
675
|
+
"complexType": {
|
|
676
|
+
"original": "string",
|
|
677
|
+
"resolved": "string",
|
|
678
|
+
"references": {}
|
|
679
|
+
},
|
|
680
|
+
"required": false,
|
|
681
|
+
"optional": false,
|
|
682
|
+
"docs": {
|
|
683
|
+
"tags": [],
|
|
684
|
+
"text": "Label for Ellipsis stepper. Important to ensure accessibility for screen reader users."
|
|
685
|
+
},
|
|
686
|
+
"getter": false,
|
|
687
|
+
"setter": false,
|
|
688
|
+
"reflect": false,
|
|
689
|
+
"defaultValue": "'Ellipsis indicating skipped pages'"
|
|
690
|
+
},
|
|
691
|
+
"itemsPerPageLabel": {
|
|
692
|
+
"type": "string",
|
|
693
|
+
"attribute": "items-per-page-label",
|
|
694
|
+
"mutable": false,
|
|
695
|
+
"complexType": {
|
|
696
|
+
"original": "string",
|
|
697
|
+
"resolved": "string",
|
|
698
|
+
"references": {}
|
|
699
|
+
},
|
|
700
|
+
"required": false,
|
|
701
|
+
"optional": false,
|
|
702
|
+
"docs": {
|
|
703
|
+
"tags": [],
|
|
704
|
+
"text": "Label for Items per page select."
|
|
705
|
+
},
|
|
706
|
+
"getter": false,
|
|
707
|
+
"setter": false,
|
|
708
|
+
"reflect": false,
|
|
709
|
+
"defaultValue": "'Items per page'"
|
|
564
710
|
}
|
|
565
711
|
};
|
|
566
712
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
--r-panel--min-width:
|
|
2
|
+
--r-panel--min-width: 18.75rem;
|
|
3
3
|
--r-panel--background-color: var(--r-background-soft, #F3F1F0);
|
|
4
4
|
--r-panel--display: flex;
|
|
5
5
|
--r-panel--flex-direction: column;
|
|
6
6
|
--r-panel--position: fixed;
|
|
7
7
|
--r-panel--align-items: flex-start;
|
|
8
8
|
--r-panel--top: 0;
|
|
9
|
-
--r-panel--padding:
|
|
10
|
-
--r-panel--width:
|
|
9
|
+
--r-panel--padding: 8px 0;
|
|
10
|
+
--r-panel--width: 18.75rem;
|
|
11
11
|
--r-panel--height: 100%;
|
|
12
12
|
--r-panel--color: var(--r-text-regular, #282828);
|
|
13
13
|
--r-panel--transition: all 250ms ease-in-out;
|
|
@@ -15,37 +15,41 @@
|
|
|
15
15
|
--r-panel--font-family: var(--r-font-family-text);
|
|
16
16
|
--r-panel--left: 0;
|
|
17
17
|
--r-panel--header--display: flex;
|
|
18
|
-
--r-panel--header--padding:
|
|
18
|
+
--r-panel--header--padding: 12px 16px;
|
|
19
19
|
--r-panel--header--justify-content: space-between;
|
|
20
20
|
--r-panel--header--align-items: center;
|
|
21
21
|
--r-panel--header--align-self: stretch;
|
|
22
22
|
--r-panel--header--icon-rotate: none;
|
|
23
23
|
--r-panel--header--flex-direction: row;
|
|
24
|
-
--r-panel--header--gap:
|
|
24
|
+
--r-panel--header--gap: 3.125rem;
|
|
25
25
|
--r-panel--header--logo--img--width: 100%;
|
|
26
26
|
--r-panel--header--logo--img--height: auto;
|
|
27
|
-
--r-panel--header--logo--img--expanded--width:
|
|
28
|
-
--r-panel--header--logo--img--collapsed--width:
|
|
27
|
+
--r-panel--header--logo--img--expanded--width: 12rem;
|
|
28
|
+
--r-panel--header--logo--img--collapsed--width: 1.875rem;
|
|
29
29
|
--r-panel--header--height: unset;
|
|
30
30
|
--r-panel--body--display: block;
|
|
31
31
|
--r-panel--body--flex-grow: 1;
|
|
32
32
|
--r-panel--body--align-self: stretch;
|
|
33
33
|
--r-panel--body--overflow: auto;
|
|
34
|
-
--r-panel--body--padding:
|
|
34
|
+
--r-panel--body--padding: 4px 8px 0;
|
|
35
35
|
--r-panel--body-header--color: var(--r-text-soft, #686868);
|
|
36
|
-
--r-panel--body-header--
|
|
37
|
-
--r-panel--body-header--
|
|
36
|
+
--r-panel--body-header--font-size: var(--r-font-size-400, 1rem);
|
|
37
|
+
--r-panel--body-header--font-weight: var(--r-font-weight-regular, 400);
|
|
38
|
+
--r-panel--body-header--padding: 16px 0;
|
|
39
|
+
--r-panel--body-header--width: 16.75rem;
|
|
40
|
+
--r-panel--body-header--margin: 0px;
|
|
38
41
|
--r-panel--footer--dispay: flex;
|
|
39
|
-
--r-panel--footer--
|
|
42
|
+
--r-panel--footer--width: 100%;
|
|
43
|
+
--r-panel--footer--padding: 16px 16px 24px;
|
|
40
44
|
--r-panel--footer--flex-direction: column;
|
|
41
45
|
--r-panel--footer--justify-content: center;
|
|
42
|
-
--r-panel--footer-gap: var(--spacing-100,
|
|
46
|
+
--r-panel--footer-gap: var(--spacing-100, 1rem);
|
|
43
47
|
--r-panel--footer--align-self: stretch;
|
|
44
48
|
--r-panel--footer--text-align: center;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
:host([variant=drawer]) r-button {
|
|
48
|
-
--r-button--padding:
|
|
52
|
+
--r-button--padding: 0.625rem;
|
|
49
53
|
--r-button--background: var(--r-background-interactive-softer, #E7E4E2);
|
|
50
54
|
--r-button--border-radius: 10%;
|
|
51
55
|
--r-button--slot--position: relative;
|
|
@@ -53,13 +57,13 @@
|
|
|
53
57
|
}
|
|
54
58
|
|
|
55
59
|
:host([variant=drawer][collapsed]) {
|
|
56
|
-
--r-panel--width:
|
|
60
|
+
--r-panel--width: var(--r-spacing-450, 4.5rem);
|
|
57
61
|
--r-panel--header--display: none;
|
|
58
62
|
--r-panel--header--icon-rotate: rotate(180deg);
|
|
59
63
|
--r-panel--header--logo--expaned--display: none;
|
|
60
64
|
--r-panel--header--logo--collapsed--display: block;
|
|
61
65
|
--r-panel--header--flex-direction: column;
|
|
62
|
-
--r-panel--header--gap:
|
|
66
|
+
--r-panel--header--gap: 0.625rem;
|
|
63
67
|
--r-list-item--epxanded--background-color: rgba(40, 40, 40, 0.08);
|
|
64
68
|
}
|
|
65
69
|
:host([variant=drawer][collapsed]) r-button {
|
|
@@ -73,14 +77,15 @@
|
|
|
73
77
|
|
|
74
78
|
:host([collapsed]:not([variant=modal])) {
|
|
75
79
|
--r-panel--min-width: 0;
|
|
80
|
+
--r-list-item--sr-text--display: block;
|
|
76
81
|
--r-list-item--text--display: none;
|
|
77
82
|
--r-list-item--trailing--display: none;
|
|
78
83
|
}
|
|
79
84
|
|
|
80
85
|
:host([variant=drawer]:not([has-header]):not([collapsed])),
|
|
81
86
|
:host([variant=drawer][has-header=false]:not([collapsed])) {
|
|
82
|
-
--r-panel--header--height:
|
|
83
|
-
--r-panel--header--padding:
|
|
87
|
+
--r-panel--header--height: var(--spacing-150, 1.5rem);
|
|
88
|
+
--r-panel--header--padding: 12px 8px 0 16px;
|
|
84
89
|
}
|
|
85
90
|
:host([variant=drawer]:not([has-header]):not([collapsed])) r-button,
|
|
86
91
|
:host([variant=drawer][has-header=false]:not([collapsed])) r-button {
|
|
@@ -154,9 +159,15 @@
|
|
|
154
159
|
}
|
|
155
160
|
.r-panel--body ::slotted(.header) {
|
|
156
161
|
color: var(--r-panel--body-header--color);
|
|
162
|
+
font-size: var(--r-panel--body-header--font-size);
|
|
163
|
+
font-weight: var(--r-panel--body-header--font-weight);
|
|
157
164
|
padding: var(--r-panel--body-header--padding);
|
|
158
165
|
display: var(--r-panel--header--display);
|
|
159
166
|
width: var(--r-panel--body-header--width);
|
|
167
|
+
margin: var(--r-panel--body-header--margin);
|
|
168
|
+
}
|
|
169
|
+
.r-panel--footer {
|
|
170
|
+
width: var(--r-panel--footer--width);
|
|
160
171
|
}
|
|
161
172
|
.r-panel ::slotted([slot=footer]) {
|
|
162
173
|
display: var(--r-panel--footer--dispay);
|
|
@@ -167,3 +178,15 @@
|
|
|
167
178
|
align-self: var(--r-panel--footer--align-self);
|
|
168
179
|
text-align: var(--r-panel--footer--text-align);
|
|
169
180
|
}
|
|
181
|
+
.r-panel ::slotted(ul) {
|
|
182
|
+
margin: var(--r-panel--item-list--margin, 0);
|
|
183
|
+
padding: var(--r-panel--item-list--padding, 0);
|
|
184
|
+
list-style-type: var(--r-panel--item-list--list-style-type, "");
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@media (prefers-reduced-motion) {
|
|
188
|
+
.r-panel,
|
|
189
|
+
:host([variant=drawer][collapsed]) r-button {
|
|
190
|
+
transition: none;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
@@ -12,9 +12,9 @@ export class Panel {
|
|
|
12
12
|
/** A boolean property that determines the collapsed state of the component. The default state is `false`. */
|
|
13
13
|
this.collapsed = false;
|
|
14
14
|
/** Aria-label text for collapse */
|
|
15
|
-
this.labelCollapse = '
|
|
15
|
+
this.labelCollapse = 'Collapse panel';
|
|
16
16
|
/** Aria-label text for expand */
|
|
17
|
-
this.labelExpand = '
|
|
17
|
+
this.labelExpand = 'Expand panel';
|
|
18
18
|
this.isCollapsed = this.collapsed;
|
|
19
19
|
// Pre-bound method for event listeners
|
|
20
20
|
this.updateCurrentLocationBound = this.updateCurrentLocation.bind(this);
|
|
@@ -161,10 +161,10 @@ export class Panel {
|
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
render() {
|
|
164
|
-
return (h(Host, { key: '
|
|
164
|
+
return (h(Host, { key: '0404a2c3acbba8414d7baffc8c0f861e512fe7cb', role: "navigation", collapsed: this.isCollapsed }, h("div", { key: 'b93d1555f060793b7137fd6aac0de2a1a1f35436', class: "r-panel" }, h("div", { key: 'b7dd2dee4c145a21a5a963750e8b26ab2d8b9bbe', class: "r-panel--header" }, this.hasHeader && (h("a", { key: 'dbb02cd6271fba2a5d4a783a20d5e6d9e34ee734', class: "logo-wrapper", href: this.logoLink }, this.isCollapsed ?
|
|
165
165
|
h("slot", { name: "logo-collapsed" })
|
|
166
166
|
:
|
|
167
|
-
h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank",
|
|
167
|
+
h("slot", { name: "logo-expanded" }))), this.variant === 'modal' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "cross", rAriaLabel: `${this.labelCollapse}`, onClick: this.handleFullyCollapsedButtonClick })) : this.variant === 'drawer' ? (h("r-button", { class: "r-panel--trigger", variant: "blank", icon: "angle-left", rAriaLabel: this.isCollapsed ? `${this.labelExpand}` : `${this.labelCollapse}`, onClick: this.handleSemiCollapsedButtonClick })) : this.variant === 'visible' ? (null) : null), h("div", { key: 'bb3d86b7a4b0890709d4a4637eca033ddaec24a6', class: "r-panel--body" }, h("slot", { key: '201aa3f616d3d239fc7b0edc23565a6618304ce5' })), this.hasFooter && !this.isCollapsed && (h("div", { key: 'a15f34fbb86ad8b16c6d036b885c7c8b13655fc6', class: "r-panel--footer" }, h("slot", { key: '41de73edf832d3a5ca93e4f9a79a62780fdcd68b', name: "footer" }))))));
|
|
168
168
|
}
|
|
169
169
|
static get is() { return "r-panel"; }
|
|
170
170
|
static get encapsulation() { return "shadow"; }
|
|
@@ -342,7 +342,7 @@ export class Panel {
|
|
|
342
342
|
"getter": false,
|
|
343
343
|
"setter": false,
|
|
344
344
|
"reflect": false,
|
|
345
|
-
"defaultValue": "'
|
|
345
|
+
"defaultValue": "'Collapse panel'"
|
|
346
346
|
},
|
|
347
347
|
"labelExpand": {
|
|
348
348
|
"type": "string",
|
|
@@ -362,7 +362,7 @@ export class Panel {
|
|
|
362
362
|
"getter": false,
|
|
363
363
|
"setter": false,
|
|
364
364
|
"reflect": false,
|
|
365
|
-
"defaultValue": "'
|
|
365
|
+
"defaultValue": "'Expand panel'"
|
|
366
366
|
}
|
|
367
367
|
};
|
|
368
368
|
}
|