@westpac/ui 0.42.3 → 0.44.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 +25 -0
- package/assets/icons/filled/arrow-thread-reply-filled.svg +3 -0
- package/assets/icons/filled/button-shape-filled.svg +1 -0
- package/assets/icons/filled/closed-caption-filled.svg +3 -0
- package/assets/icons/filled/color-filters-filled.svg +1 -0
- package/assets/icons/filled/format-color-filled.svg +5 -0
- package/assets/icons/filled/fullscreen-exit-filled.svg +3 -0
- package/assets/icons/filled/fullscreen-filled.svg +3 -0
- package/assets/icons/filled/pause-filled.svg +1 -1
- package/assets/icons/filled/play-filled.svg +1 -1
- package/assets/icons/filled/replay-filled.svg +3 -0
- package/assets/icons/filled/text-bold-filled.svg +1 -0
- package/assets/icons/filled/text-increase-filled.svg +4 -0
- package/assets/icons/filled/text-large-filled.svg +1 -0
- package/assets/icons/filled/voiceover-on-filled.svg +1 -0
- package/assets/icons/filled/volume-off-filled.svg +6 -0
- package/assets/icons/filled/volume-on-filled.svg +5 -0
- package/assets/icons/outlined/arrow-thread-reply-outlined.svg +3 -0
- package/assets/icons/outlined/button-shape-outlined.svg +1 -0
- package/assets/icons/outlined/closed-caption-outlined.svg +5 -0
- package/assets/icons/outlined/color-filters-outlined.svg +1 -0
- package/assets/icons/outlined/format-color-outlined.svg +5 -0
- package/assets/icons/outlined/fullscreen-exit-outlined.svg +3 -0
- package/assets/icons/outlined/fullscreen-outlined.svg +3 -0
- package/assets/icons/outlined/pause-outlined.svg +1 -1
- package/assets/icons/outlined/play-outlined.svg +1 -1
- package/assets/icons/outlined/replay-outlined.svg +3 -0
- package/assets/icons/outlined/text-bold-outlined.svg +1 -0
- package/assets/icons/outlined/text-increase-outlined.svg +4 -0
- package/assets/icons/outlined/text-large-outlined.svg +1 -0
- package/assets/icons/outlined/voiceover-on-outlined.svg +1 -0
- package/assets/icons/outlined/volume-off-outlined.svg +6 -0
- package/assets/icons/outlined/volume-on-outlined.svg +5 -0
- package/dist/component-type.json +1 -1
- package/dist/components/accordion/accordion.component.js +6 -18
- package/dist/components/accordion/components/accordion-item/accordion-item.component.js +12 -23
- package/dist/components/accordion/components/accordion-item/accordion-item.styles.d.ts +3 -0
- package/dist/components/accordion/components/accordion-item/accordion-item.styles.js +2 -1
- package/dist/components/alert/alert.component.js +5 -18
- package/dist/components/autocomplete/autocomplete.component.js +19 -29
- package/dist/components/autocomplete/components/autocomplete-list-box/autocomplete-list-box.component.js +6 -19
- package/dist/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.component.js +5 -18
- package/dist/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.styles.d.ts +2 -2
- package/dist/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.styles.js +2 -2
- package/dist/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-section/autocomplete-list-box-section.component.js +7 -19
- package/dist/components/autocomplete/components/autocomplete-popover/autocomplete-popover.component.js +8 -20
- package/dist/components/badge/badge.component.js +8 -20
- package/dist/components/bottom-sheet/bottom-sheet.component.js +5 -18
- package/dist/components/bottom-sheet/components/bottom-sheet-dialog/bottom-sheet-dialog.component.js +8 -20
- package/dist/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.component.js +10 -23
- package/dist/components/breadcrumb/breadcrumb.component.js +11 -22
- package/dist/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.component.js +9 -22
- package/dist/components/button/button.component.js +6 -19
- package/dist/components/button-dropdown/button-dropdown.component.js +11 -23
- package/dist/components/button-dropdown/components/button-dropdown-heading/button-dropdown-heading.component.js +5 -18
- package/dist/components/button-dropdown/components/button-dropdown-panel/button-dropdown-panel.component.js +6 -19
- package/dist/components/button-group/button-group.component.js +12 -23
- package/dist/components/button-group/components/button-group-button/button-group-button.component.js +8 -20
- package/dist/components/checkbox-group/checkbox-group.component.js +17 -27
- package/dist/components/checkbox-group/components/checkbox-group-checkbox/checkbox-group-checkbox.component.js +16 -27
- package/dist/components/circle/circle.component.js +5 -18
- package/dist/components/collapsible/collapsible.component.js +9 -21
- package/dist/components/compacta/compacta.component.js +14 -25
- package/dist/components/date-picker/date-picker.component.js +7 -20
- package/dist/components/error-message/error-message.component.js +9 -21
- package/dist/components/field/field.component.js +11 -22
- package/dist/components/filter/components/filter-buttons/filter-buttons.component.js +5 -19
- package/dist/components/filter/components/filter-input/filter-input.component.js +4 -17
- package/dist/components/filter/filter.component.js +4 -17
- package/dist/components/flexi-cell/components/flexi-cell-adornment/flexi-cell-adornment.component.js +4 -17
- package/dist/components/flexi-cell/components/flexi-cell-body/flexi-cell-body.component.js +5 -18
- package/dist/components/flexi-cell/components/flexi-cell-button/flexi-cell-button.component.js +5 -18
- package/dist/components/flexi-cell/components/flexi-cell-circle/flexi-cell-circle.component.js +5 -18
- package/dist/components/flexi-cell/components/flexi-cell-footer/flexi-cell-footer.component.js +4 -17
- package/dist/components/flexi-cell/components/flexi-cell-hint/flexi-cell-hint.component.js +4 -17
- package/dist/components/flexi-cell/components/flexi-cell-label/flexi-cell-label.component.js +5 -18
- package/dist/components/flexi-cell/flexi-cell.component.js +9 -22
- package/dist/components/footer/footer.component.js +16 -28
- package/dist/components/form/components/form-chit-chat/form-chit-chat.component.js +5 -18
- package/dist/components/form/components/form-group/form-group.component.js +6 -19
- package/dist/components/form/components/form-hint/form-hint.component.js +5 -18
- package/dist/components/form/components/form-label/form-label.component.js +4 -17
- package/dist/components/form/components/form-section/form-section.component.js +5 -18
- package/dist/components/form/form.component.js +2 -16
- package/dist/components/grid/components/grid-container/grid-container.component.js +5 -18
- package/dist/components/grid/components/grid-item/grid-item.component.js +5 -18
- package/dist/components/grid/grid.component.js +5 -18
- package/dist/components/header/header.component.js +17 -30
- package/dist/components/heading/heading.component.js +5 -18
- package/dist/components/hint/hint.component.js +5 -18
- package/dist/components/icon/components/accessibility-icon.js +5 -18
- package/dist/components/icon/components/account-icon.js +5 -18
- package/dist/components/icon/components/add-circle-icon.js +5 -18
- package/dist/components/icon/components/add-icon.js +5 -18
- package/dist/components/icon/components/alert-icon.js +5 -18
- package/dist/components/icon/components/android-icon.js +5 -18
- package/dist/components/icon/components/apple-icon.js +5 -18
- package/dist/components/icon/components/archive-box-icon.js +5 -18
- package/dist/components/icon/components/arrow-back-circle-icon.js +5 -18
- package/dist/components/icon/components/arrow-down-circle-icon.js +5 -18
- package/dist/components/icon/components/arrow-fork-icon.js +5 -18
- package/dist/components/icon/components/arrow-forward-circle-icon.js +5 -18
- package/dist/components/icon/components/arrow-left-icon.js +5 -18
- package/dist/components/icon/components/arrow-right-icon.js +5 -18
- package/dist/components/icon/components/arrow-split-icon.js +5 -18
- package/dist/components/icon/components/arrow-thread-reply-icon.d.ts +2 -0
- package/dist/components/icon/components/arrow-thread-reply-icon.js +12 -0
- package/dist/components/icon/components/arrow-up-circle-icon.js +5 -18
- package/dist/components/icon/components/atm-icon.js +5 -18
- package/dist/components/icon/components/attache-case-icon.js +5 -18
- package/dist/components/icon/components/australia-icon.js +5 -18
- package/dist/components/icon/components/baby-buggy-icon.js +5 -18
- package/dist/components/icon/components/backspace-icon.js +5 -18
- package/dist/components/icon/components/bank-icon.js +5 -18
- package/dist/components/icon/components/bar-chart-down-icon.js +5 -18
- package/dist/components/icon/components/bar-chart-icon.js +5 -18
- package/dist/components/icon/components/barbell-icon.js +5 -18
- package/dist/components/icon/components/book-icon.js +5 -18
- package/dist/components/icon/components/bpay-icon.js +5 -18
- package/dist/components/icon/components/briefcase-icon.js +5 -18
- package/dist/components/icon/components/bug-report-icon.js +5 -18
- package/dist/components/icon/components/burger-icon.js +5 -18
- package/dist/components/icon/components/business-person-icon.js +5 -18
- package/dist/components/icon/components/button-shape-icon.d.ts +2 -0
- package/dist/components/icon/components/button-shape-icon.js +23 -0
- package/dist/components/icon/components/cafe-icon.js +5 -18
- package/dist/components/icon/components/cake-icon.js +5 -18
- package/dist/components/icon/components/calculate-icon.js +5 -18
- package/dist/components/icon/components/calculator-icon.js +5 -18
- package/dist/components/icon/components/calendar-icon.js +5 -18
- package/dist/components/icon/components/camera-icon.js +5 -18
- package/dist/components/icon/components/cancel-card-icon.js +5 -18
- package/dist/components/icon/components/car-icon.js +5 -18
- package/dist/components/icon/components/cardless-cash-icon.js +5 -18
- package/dist/components/icon/components/cart-icon.js +5 -18
- package/dist/components/icon/components/chat-icon.js +5 -18
- package/dist/components/icon/components/check-icon.js +5 -18
- package/dist/components/icon/components/child-care-icon.js +5 -18
- package/dist/components/icon/components/child-icon.js +5 -18
- package/dist/components/icon/components/circle-icon.js +5 -18
- package/dist/components/icon/components/clear-icon.js +5 -18
- package/dist/components/icon/components/clock-icon.js +5 -18
- package/dist/components/icon/components/close-icon.js +5 -18
- package/dist/components/icon/components/closed-caption-icon.d.ts +2 -0
- package/dist/components/icon/components/closed-caption-icon.js +25 -0
- package/dist/components/icon/components/cocktail-glass-icon.js +5 -18
- package/dist/components/icon/components/color-filters-icon.d.ts +2 -0
- package/dist/components/icon/components/color-filters-icon.js +15 -0
- package/dist/components/icon/components/compass-icon.js +5 -18
- package/dist/components/icon/components/contact-icon.js +5 -18
- package/dist/components/icon/components/content-copy-icon.js +5 -18
- package/dist/components/icon/components/credit-card-icon.js +5 -18
- package/dist/components/icon/components/credit-cards-icon.js +5 -18
- package/dist/components/icon/components/cube-icon.js +5 -18
- package/dist/components/icon/components/cursor-arrow-click-icon.js +5 -18
- package/dist/components/icon/components/cursor-arrow-doubleclick-icon.js +5 -18
- package/dist/components/icon/components/cursor-arrow-icon.js +5 -18
- package/dist/components/icon/components/cursor-arrow-rays-icon.js +5 -18
- package/dist/components/icon/components/delete-icon.js +5 -18
- package/dist/components/icon/components/delivery-truck-icon.js +5 -18
- package/dist/components/icon/components/desktop-icon.js +5 -18
- package/dist/components/icon/components/diamond-icon.js +5 -18
- package/dist/components/icon/components/dollar-icon.js +5 -18
- package/dist/components/icon/components/dollar-sign-icon.js +5 -18
- package/dist/components/icon/components/download-file-icon.js +5 -18
- package/dist/components/icon/components/download-icon.js +5 -18
- package/dist/components/icon/components/drag-icon.js +5 -18
- package/dist/components/icon/components/drop-down-icon.js +5 -18
- package/dist/components/icon/components/drop-left-icon.js +5 -18
- package/dist/components/icon/components/drop-right-icon.js +5 -18
- package/dist/components/icon/components/drop-up-icon.js +5 -18
- package/dist/components/icon/components/dropbox-icon.js +5 -18
- package/dist/components/icon/components/edit-icon.js +5 -18
- package/dist/components/icon/components/education-icon.js +5 -18
- package/dist/components/icon/components/eftpos-icon.js +5 -18
- package/dist/components/icon/components/email-icon.js +5 -18
- package/dist/components/icon/components/error-icon.js +5 -18
- package/dist/components/icon/components/excel-file-icon.js +5 -18
- package/dist/components/icon/components/exit-icon.js +5 -18
- package/dist/components/icon/components/expand-less-icon.js +5 -18
- package/dist/components/icon/components/expand-more-icon.js +5 -18
- package/dist/components/icon/components/face-happy-icon.js +5 -18
- package/dist/components/icon/components/facebook-icon.js +5 -18
- package/dist/components/icon/components/favorite-icon.js +5 -18
- package/dist/components/icon/components/filter-icon.js +5 -18
- package/dist/components/icon/components/fingerprint-icon.js +5 -18
- package/dist/components/icon/components/first-aid-case-icon.js +5 -18
- package/dist/components/icon/components/first-aid-icon.js +5 -18
- package/dist/components/icon/components/format-color-icon.d.ts +2 -0
- package/dist/components/icon/components/format-color-icon.js +20 -0
- package/dist/components/icon/components/fullscreen-exit-icon.d.ts +2 -0
- package/dist/components/icon/components/fullscreen-exit-icon.js +12 -0
- package/dist/components/icon/components/fullscreen-icon.d.ts +2 -0
- package/dist/components/icon/components/fullscreen-icon.js +12 -0
- package/dist/components/icon/components/future-clock-icon.js +5 -18
- package/dist/components/icon/components/gel-icon.js +5 -18
- package/dist/components/icon/components/generic-file-icon.js +5 -18
- package/dist/components/icon/components/geolocation-icon.js +5 -18
- package/dist/components/icon/components/gift-icon.js +5 -18
- package/dist/components/icon/components/github-icon.js +5 -18
- package/dist/components/icon/components/global-icon.js +5 -18
- package/dist/components/icon/components/google-plus-icon.js +5 -18
- package/dist/components/icon/components/grid-icon.js +5 -18
- package/dist/components/icon/components/growth-icon.js +5 -18
- package/dist/components/icon/components/hamburger-menu-icon.js +5 -18
- package/dist/components/icon/components/headset-icon.js +5 -18
- package/dist/components/icon/components/heart-add-icon.js +5 -18
- package/dist/components/icon/components/heart-tick-icon.js +5 -18
- package/dist/components/icon/components/help-icon.js +5 -18
- package/dist/components/icon/components/history-clock-icon.js +5 -18
- package/dist/components/icon/components/house-dollar-icon.js +5 -18
- package/dist/components/icon/components/house-icon.js +5 -18
- package/dist/components/icon/components/house-people-icon.js +5 -18
- package/dist/components/icon/components/house-person-icon.js +5 -18
- package/dist/components/icon/components/ice-cream-icon.js +5 -18
- package/dist/components/icon/components/id-card-icon.js +5 -18
- package/dist/components/icon/components/image-square-icon.js +5 -18
- package/dist/components/icon/components/info-icon.js +5 -18
- package/dist/components/icon/components/instagram-icon.js +5 -18
- package/dist/components/icon/components/inventory-icon.js +5 -18
- package/dist/components/icon/components/invest-icon.js +5 -18
- package/dist/components/icon/components/invoice-icon.js +5 -18
- package/dist/components/icon/components/key-icon.js +5 -18
- package/dist/components/icon/components/keyhole-icon.js +5 -18
- package/dist/components/icon/components/leaf-icon.js +5 -18
- package/dist/components/icon/components/light-bulb-icon.js +5 -18
- package/dist/components/icon/components/limit-icon.js +5 -18
- package/dist/components/icon/components/link-icon.js +5 -18
- package/dist/components/icon/components/linkedin-icon.js +5 -18
- package/dist/components/icon/components/list-icon.js +5 -18
- package/dist/components/icon/components/live-chat-icon.js +5 -18
- package/dist/components/icon/components/luggage-icon.js +5 -18
- package/dist/components/icon/components/map-icon.js +5 -18
- package/dist/components/icon/components/map-pin-icon.js +5 -18
- package/dist/components/icon/components/medical-icon.js +5 -18
- package/dist/components/icon/components/megaphone-icon.js +5 -18
- package/dist/components/icon/components/message-icon.js +5 -18
- package/dist/components/icon/components/mobile-pay-icon.js +5 -18
- package/dist/components/icon/components/money-bag-icon.js +5 -18
- package/dist/components/icon/components/money-in-icon.js +5 -18
- package/dist/components/icon/components/money-notes-icon.js +5 -18
- package/dist/components/icon/components/money-out-icon.js +5 -18
- package/dist/components/icon/components/more-horiz-icon.js +5 -18
- package/dist/components/icon/components/more-vert-icon.js +5 -18
- package/dist/components/icon/components/move-from-icon.js +5 -18
- package/dist/components/icon/components/move-to-icon.js +5 -18
- package/dist/components/icon/components/new-content-icon.js +5 -18
- package/dist/components/icon/components/new-window-icon.js +5 -18
- package/dist/components/icon/components/notification-active-icon.js +5 -18
- package/dist/components/icon/components/notification-icon.js +5 -18
- package/dist/components/icon/components/notification-off-icon.js +5 -18
- package/dist/components/icon/components/office-icon.js +5 -18
- package/dist/components/icon/components/open-browser-icon.js +5 -18
- package/dist/components/icon/components/package-delivery-icon.js +5 -18
- package/dist/components/icon/components/padlock-icon.js +5 -18
- package/dist/components/icon/components/padlock-open-icon.js +5 -18
- package/dist/components/icon/components/padlock-tick-icon.js +5 -18
- package/dist/components/icon/components/pause-circle-icon.js +5 -18
- package/dist/components/icon/components/pause-icon.js +6 -19
- package/dist/components/icon/components/paw-icon.js +5 -18
- package/dist/components/icon/components/pay-icon.js +5 -18
- package/dist/components/icon/components/pay-id-icon.js +5 -18
- package/dist/components/icon/components/pay-to-icon.js +5 -18
- package/dist/components/icon/components/pay-to-mobile-icon.js +5 -18
- package/dist/components/icon/components/paypass-icon.js +5 -18
- package/dist/components/icon/components/pdf-file-icon.js +5 -18
- package/dist/components/icon/components/pending-icon.js +5 -18
- package/dist/components/icon/components/people-icon.js +5 -18
- package/dist/components/icon/components/percent-icon.js +5 -18
- package/dist/components/icon/components/person-icon.js +5 -18
- package/dist/components/icon/components/phone-icon.js +5 -18
- package/dist/components/icon/components/pie-chart-icon.js +5 -18
- package/dist/components/icon/components/piggy-bank-icon.js +5 -18
- package/dist/components/icon/components/piggy-bank.js +5 -18
- package/dist/components/icon/components/pin-icon.js +5 -18
- package/dist/components/icon/components/pizza-icon.js +5 -18
- package/dist/components/icon/components/plane-icon.js +5 -18
- package/dist/components/icon/components/play-circle-icon.js +5 -18
- package/dist/components/icon/components/play-icon.js +6 -19
- package/dist/components/icon/components/pram-icon.js +5 -18
- package/dist/components/icon/components/presets-icon.js +5 -18
- package/dist/components/icon/components/print-icon.js +5 -18
- package/dist/components/icon/components/progress-icon.js +5 -18
- package/dist/components/icon/components/question-mark-icon.js +5 -18
- package/dist/components/icon/components/quick-balance-icon.js +5 -18
- package/dist/components/icon/components/receipt-icon.js +5 -18
- package/dist/components/icon/components/refresh-icon.js +5 -18
- package/dist/components/icon/components/remove-circle-icon.js +5 -18
- package/dist/components/icon/components/remove-icon.js +5 -18
- package/dist/components/icon/components/replay-icon.d.ts +2 -0
- package/dist/components/icon/components/replay-icon.js +12 -0
- package/dist/components/icon/components/restaurant-icon.js +5 -18
- package/dist/components/icon/components/rss-icon.js +5 -18
- package/dist/components/icon/components/scan-document-icon.js +5 -18
- package/dist/components/icon/components/sd-storage-icon.js +5 -18
- package/dist/components/icon/components/search-icon.js +5 -18
- package/dist/components/icon/components/security-icon.js +5 -18
- package/dist/components/icon/components/service-bell-icon.js +5 -18
- package/dist/components/icon/components/settings-icon.js +5 -18
- package/dist/components/icon/components/share-icon.js +5 -18
- package/dist/components/icon/components/share-ios-icon.js +5 -18
- package/dist/components/icon/components/shop-icon.js +5 -18
- package/dist/components/icon/components/shopping-bag-icon.js +5 -18
- package/dist/components/icon/components/shopping-basket-icon.js +5 -18
- package/dist/components/icon/components/sim-card-icon.js +5 -18
- package/dist/components/icon/components/slack-icon.js +5 -18
- package/dist/components/icon/components/sms-icon.js +5 -18
- package/dist/components/icon/components/spa-icon.js +5 -18
- package/dist/components/icon/components/star-half-icon.js +5 -18
- package/dist/components/icon/components/star-rate-icon.js +5 -18
- package/dist/components/icon/components/stars-icon.js +5 -18
- package/dist/components/icon/components/stopwatch-icon.js +5 -18
- package/dist/components/icon/components/stroller-icon.js +5 -18
- package/dist/components/icon/components/success-icon.js +5 -18
- package/dist/components/icon/components/super-icon.js +5 -18
- package/dist/components/icon/components/switch-icon.js +5 -18
- package/dist/components/icon/components/tablet-icon.js +5 -18
- package/dist/components/icon/components/tag-icon.js +5 -18
- package/dist/components/icon/components/takeout-coffee-icon.js +5 -18
- package/dist/components/icon/components/takeout-food-icon.js +5 -18
- package/dist/components/icon/components/target-icon.js +5 -18
- package/dist/components/icon/components/telephone-icon.js +5 -18
- package/dist/components/icon/components/text-bold-icon.d.ts +2 -0
- package/dist/components/icon/components/text-bold-icon.js +14 -0
- package/dist/components/icon/components/text-increase-icon.d.ts +2 -0
- package/dist/components/icon/components/text-increase-icon.js +17 -0
- package/dist/components/icon/components/text-large-icon.d.ts +2 -0
- package/dist/components/icon/components/text-large-icon.js +17 -0
- package/dist/components/icon/components/thumb-down-icon.js +5 -18
- package/dist/components/icon/components/thumb-up-icon.js +5 -18
- package/dist/components/icon/components/tick-circle-icon.js +5 -18
- package/dist/components/icon/components/tick-icon.js +5 -18
- package/dist/components/icon/components/tiles-icon.js +5 -18
- package/dist/components/icon/components/transfer-icon.js +5 -18
- package/dist/components/icon/components/transport-icon.js +5 -18
- package/dist/components/icon/components/travel-explore-icon.js +5 -18
- package/dist/components/icon/components/tune-icon.js +5 -18
- package/dist/components/icon/components/twitter-icon.js +5 -18
- package/dist/components/icon/components/umbrella-icon.js +5 -18
- package/dist/components/icon/components/unpin-icon.js +5 -18
- package/dist/components/icon/components/upload-icon.js +5 -18
- package/dist/components/icon/components/verified-icon.js +5 -18
- package/dist/components/icon/components/video-icon.js +5 -18
- package/dist/components/icon/components/visibility-icon.js +5 -18
- package/dist/components/icon/components/visibility-off-icon.js +5 -18
- package/dist/components/icon/components/voice-icon.js +5 -18
- package/dist/components/icon/components/voiceover-on-icon.d.ts +2 -0
- package/dist/components/icon/components/voiceover-on-icon.js +31 -0
- package/dist/components/icon/components/volume-off-icon.d.ts +2 -0
- package/dist/components/icon/components/volume-off-icon.js +35 -0
- package/dist/components/icon/components/volume-on-icon.d.ts +2 -0
- package/dist/components/icon/components/volume-on-icon.js +29 -0
- package/dist/components/icon/components/walk-icon.js +5 -18
- package/dist/components/icon/components/wallet-icon.js +5 -18
- package/dist/components/icon/components/warning-icon.js +5 -18
- package/dist/components/icon/components/watch-icon.js +5 -18
- package/dist/components/icon/components/wearable-icon.js +5 -18
- package/dist/components/icon/components/wheelchair-icon.js +5 -18
- package/dist/components/icon/components/windows-new-icon.js +5 -18
- package/dist/components/icon/components/wine-glass-icon.js +5 -18
- package/dist/components/icon/components/word-file-icon.js +5 -18
- package/dist/components/icon/components/write-icon.js +5 -18
- package/dist/components/icon/components/x-icon.js +5 -18
- package/dist/components/icon/components/yammer-icon.js +5 -18
- package/dist/components/icon/components/youtube-icon.js +5 -18
- package/dist/components/icon/components/zip-file-icon.js +5 -18
- package/dist/components/icon/icon.component.js +5 -18
- package/dist/components/icon/index.d.ts +14 -0
- package/dist/components/icon/index.js +14 -0
- package/dist/components/input/input.component.js +6 -19
- package/dist/components/input-group/components/input-group-add-ons/add-ons.types.js +2 -2
- package/dist/components/input-group/components/input-group-add-ons/components/input-group-add-on-default-add-on/input-group-add-on-default-add-on.component.js +5 -18
- package/dist/components/input-group/components/input-group-add-ons/components/input-group-add-on-icon-add-on/input-group-add-on-icon-add-on.component.js +5 -18
- package/dist/components/input-group/components/input-group-add-ons/components/input-group-add-on-text-add-on/input-group-add-on-text-add-on.component.js +5 -18
- package/dist/components/input-group/components/input-group-add-ons/input-group-add-ons.component.js +8 -20
- package/dist/components/input-group/components/input-group-add-ons/input-group-add-ons.types.js +2 -2
- package/dist/components/input-group/components/input-group-supporting-text/input-group-supporting-text.component.js +5 -18
- package/dist/components/input-group/input-group.component.js +12 -24
- package/dist/components/label/label.component.js +5 -18
- package/dist/components/link/link.component.js +6 -19
- package/dist/components/list/components/list-item/list-item.component.js +9 -22
- package/dist/components/list/list.component.js +5 -19
- package/dist/components/list/list.utils.js +2 -2
- package/dist/components/modal/components/modal-backdrop/modal-backdrop.component.js +9 -21
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-body/modal-dialog-body.component.js +6 -19
- package/dist/components/modal/components/modal-dialog/components/modal-dialog-footer/modal-dialog-footer.component.js +6 -19
- package/dist/components/modal/components/modal-dialog/modal-dialog.component.js +13 -24
- package/dist/components/modal/modal.component.js +5 -18
- package/dist/components/pagination/components/pagination-item/pagination-item.component.js +10 -20
- package/dist/components/pagination/components/pagination-item/pagination-item.styles.d.ts +2 -2
- package/dist/components/pagination/components/pagination-item/pagination-item.styles.js +1 -1
- package/dist/components/pagination/components/pagination-pages/pagination-pages.component.d.ts +2 -0
- package/dist/components/pagination/components/pagination-pages/pagination-pages.component.js +185 -0
- package/dist/components/pagination/components/pagination-pages/pagination-pages.types.d.ts +36 -0
- package/dist/components/pagination/components/pagination-pages/pagination-pages.types.js +1 -0
- package/dist/components/pagination/components/pagination-presentational/pagination-presentational.component.d.ts +2 -0
- package/dist/components/pagination/components/pagination-presentational/pagination-presentational.component.js +44 -0
- package/dist/components/pagination/{pagination.styles.d.ts → components/pagination-presentational/pagination-presentational.styles.d.ts} +3 -0
- package/dist/components/pagination/{pagination.styles.js → components/pagination-presentational/pagination-presentational.styles.js} +2 -1
- package/dist/components/pagination/components/pagination-presentational/pagination-presentational.types.d.ts +41 -0
- package/dist/components/pagination/components/pagination-presentational/pagination-presentational.types.js +1 -0
- package/dist/components/pagination/components/pagination-total-pages/pagination-total-pages.component.d.ts +2 -0
- package/dist/components/pagination/components/pagination-total-pages/pagination-total-pages.component.js +188 -0
- package/dist/components/pagination/components/pagination-total-pages/pagination-total-pages.types.d.ts +40 -0
- package/dist/components/pagination/components/pagination-total-pages/pagination-total-pages.types.js +1 -0
- package/dist/components/pagination/pagination.component.d.ts +1 -1
- package/dist/components/pagination/pagination.component.js +27 -133
- package/dist/components/pagination/pagination.hooks.js +1 -1
- package/dist/components/pagination/pagination.types.d.ts +33 -29
- package/dist/components/pagination/pagination.utils.d.ts +2 -0
- package/dist/components/pagination/pagination.utils.js +12 -0
- package/dist/components/panel/components/panel-body/panel-body.component.js +5 -18
- package/dist/components/panel/components/panel-footer/panel-footer.component.js +5 -18
- package/dist/components/panel/panel.component.js +5 -18
- package/dist/components/panel/panel.types.d.ts +1 -1
- package/dist/components/pass-code/pass-code.component.js +6 -21
- package/dist/components/pass-code-view/pass-code-view.component.js +8 -21
- package/dist/components/pass-code-view/pass-code-view.loader.js +1 -1
- package/dist/components/pictogram/components/decorative/wbc-bank-card-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/accessibility-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/accounts-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/aeroplane-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/arrow-down-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/arrow-left-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/arrow-right-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/arrow-up-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/arrows-passing-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/atm-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/australia-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/bank-card-locked-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/bank-card-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/bank-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/birth-certificate-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/building-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/buoy-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/bus-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/business-person-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/calculator-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/calendar-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/car-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/cash-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/celebration-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/chat-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/clock-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/coffee-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/coins-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/compass-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/customer-profile-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/desktop-computer-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/document-and-pen-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/dollar-sign-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/drivers-licence-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/education-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/eftpos-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/envelope-email-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/envelope-printed-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/face-happy-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/face-unhappy-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/face-unsure-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/finger-motion-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/fingerprint-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/football-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/fork-knife-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/generic-document-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/gift-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/globe-australia-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/globe-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/graph-decreasing-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/graph-increasing-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/gym-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/headset-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/heart-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/house-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/light-bulb-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/loop-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/medicare-card-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/mobile-device-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/money-in-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/money-out-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/movie-tickets-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/nest-egg-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/noodles-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/number-1-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/number-2-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/number-3-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/number-4-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/number-5-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/padlock-locked-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/padlock-unlocked-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/passport-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/percent-sign-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/person-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/piggy-bank-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/pizza-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/plant-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/search-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/secure-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/shop-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/shopping-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/sparkle-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/star-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/stopwatch-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/target-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/tax-document-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/telephone-call-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/thumbs-up-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/tick-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/tools-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/tractor-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/truck-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/umbrella-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/unsecure-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/wallet-pictogram.js +5 -18
- package/dist/components/pictogram/components/informative/wearables-pictogram.js +5 -18
- package/dist/components/pictogram/pictogram.component.js +5 -18
- package/dist/components/popover/components/panel/panel.component.js +10 -22
- package/dist/components/popover/components/panel/panel.hook.js +1 -1
- package/dist/components/popover/popover.component.js +1 -1
- package/dist/components/progress-bar/progress-bar.component.js +11 -23
- package/dist/components/progress-indicator/progress-indicator.component.js +6 -19
- package/dist/components/progress-rope/components/progress-rope-group-step/progress-rope-group-step.component.js +6 -19
- package/dist/components/progress-rope/components/progress-rope-step/progress-rope-step.component.js +6 -19
- package/dist/components/progress-rope/progress-rope.component.js +5 -18
- package/dist/components/radio-group/components/radio-group-radio/radio-group-radio.component.js +11 -23
- package/dist/components/radio-group/radio-group.component.js +17 -27
- package/dist/components/repeater/repeater.component.js +12 -23
- package/dist/components/select/select.component.js +6 -19
- package/dist/components/selector/components/selector-button-group/components/selector-button-group-option/selector-button-group-option.component.js +5 -18
- package/dist/components/selector/components/selector-button-group/selector-button-group.component.js +8 -20
- package/dist/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.js +6 -19
- package/dist/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.js +7 -19
- package/dist/components/selector/components/selector-label/selector-label.component.js +4 -17
- package/dist/components/selector/components/selector-link-group/components/selector-link-group-option/selector-link-group-option.component.js +7 -20
- package/dist/components/selector/components/selector-link-group/selector-link-group.component.js +8 -20
- package/dist/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.js +7 -20
- package/dist/components/selector/components/selector-radio-group/selector-radio-group.component.js +8 -20
- package/dist/components/selector/selector.component.js +4 -18
- package/dist/components/skip-link/skip-link.component.js +8 -20
- package/dist/components/switch/switch.component.js +11 -23
- package/dist/components/symbol/components/logos/bom-logo.js +5 -18
- package/dist/components/symbol/components/logos/bom-multibrand-large-logo.js +6 -19
- package/dist/components/symbol/components/logos/bom-multibrand-small-logo.js +6 -19
- package/dist/components/symbol/components/logos/bom-shield-logo.js +5 -18
- package/dist/components/symbol/components/logos/bsa-logo.js +4 -17
- package/dist/components/symbol/components/logos/bsa-multibrand-large-logo.js +5 -18
- package/dist/components/symbol/components/logos/bsa-multibrand-small-logo.js +5 -18
- package/dist/components/symbol/components/logos/bsa-stacked-logo.js +4 -17
- package/dist/components/symbol/components/logos/bt-logo.js +5 -18
- package/dist/components/symbol/components/logos/bt-multibrand-large-logo.js +6 -19
- package/dist/components/symbol/components/logos/bt-multibrand-small-logo.js +6 -19
- package/dist/components/symbol/components/logos/bt-panorama-logo.js +5 -18
- package/dist/components/symbol/components/logos/bt-panorama-multibrand-large-logo.js +6 -19
- package/dist/components/symbol/components/logos/bt-panorama-multibrand-small-logo.js +6 -19
- package/dist/components/symbol/components/logos/bt-panorama-reversed-logo.js +5 -18
- package/dist/components/symbol/components/logos/bt-reversed-logo.js +5 -18
- package/dist/components/symbol/components/logos/rams-logo.js +5 -18
- package/dist/components/symbol/components/logos/rams-multibrand-large-logo.js +5 -18
- package/dist/components/symbol/components/logos/rams-multibrand-small-logo.js +5 -18
- package/dist/components/symbol/components/logos/red-avatar-circle-logo.js +4 -17
- package/dist/components/symbol/components/logos/red-avatar-circle-reversed-logo.js +4 -17
- package/dist/components/symbol/components/logos/red-avatar-logo.js +4 -17
- package/dist/components/symbol/components/logos/stg-dragon-logo.js +4 -17
- package/dist/components/symbol/components/logos/stg-logo.js +4 -17
- package/dist/components/symbol/components/logos/stg-multibrand-large-logo.js +5 -18
- package/dist/components/symbol/components/logos/stg-multibrand-small-logo.js +5 -18
- package/dist/components/symbol/components/logos/wbc-logo.js +5 -18
- package/dist/components/symbol/components/logos/wbc-multibrand-large-logo.js +5 -18
- package/dist/components/symbol/components/logos/wbc-multibrand-small-logo.js +6 -19
- package/dist/components/symbol/components/logos/wbg-internal-logo.js +4 -17
- package/dist/components/symbol/components/logos/wbg-logo.js +4 -17
- package/dist/components/symbol/components/logos/wbg-multibrand-large-logo.js +5 -18
- package/dist/components/symbol/components/logos/wbg-multibrand-small-logo.js +5 -18
- package/dist/components/symbol/components/symbols/american-express-symbol.js +5 -18
- package/dist/components/symbol/components/symbols/apple-store-inverse-symbol.js +5 -18
- package/dist/components/symbol/components/symbols/apple-store-symbol.js +5 -18
- package/dist/components/symbol/components/symbols/bpay-land-symbol.js +5 -18
- package/dist/components/symbol/components/symbols/bpay-port-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/facebook-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/google-plus-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/google-store-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/instagram-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/linked-in-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/mastercard-accepted-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/mastercard-horizontal-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/mastercard-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/microsoft-store-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/pay-id-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/pay-to-black-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-black-symbol.js +16 -0
- package/dist/components/symbol/components/symbols/pay-to-dark-grey-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-dark-grey-symbol.js +16 -0
- package/dist/components/symbol/components/symbols/pay-to-light-grey-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-light-grey-symbol.js +16 -0
- package/dist/components/symbol/components/symbols/pay-to-white-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-white-symbol.js +16 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-black-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-black-symbol.js +25 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-dark-grey-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-dark-grey-symbol.js +25 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-light-grey-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-light-grey-symbol.js +25 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-white-symbol.d.ts +2 -0
- package/dist/components/symbol/components/symbols/pay-to-wordmark-white-symbol.js +25 -0
- package/dist/components/symbol/components/symbols/slack-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/twitter-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/visa-blue-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/visa-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/visa-white-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/x-mark-inverse-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/x-mark-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/x-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/yammer-symbol.js +4 -17
- package/dist/components/symbol/components/symbols/youtube-symbol.js +4 -17
- package/dist/components/symbol/index.d.ts +8 -0
- package/dist/components/symbol/index.js +8 -0
- package/dist/components/symbol/symbol.component.js +5 -18
- package/dist/components/symbol/symbol.utils.js +1 -1
- package/dist/components/table/components/table-body/table-body.component.js +5 -18
- package/dist/components/table/components/table-caption/table-caption.component.js +5 -18
- package/dist/components/table/components/table-cell/table-cell.component.js +6 -19
- package/dist/components/table/components/table-footer/table-footer.component.js +3 -17
- package/dist/components/table/components/table-header/table-header.component.js +5 -18
- package/dist/components/table/components/table-header-cell/table-header-cell.component.js +6 -19
- package/dist/components/table/components/table-header-row/table-header-row.component.js +5 -18
- package/dist/components/table/components/table-row/table-row.component.js +6 -19
- package/dist/components/table/table.component.js +5 -18
- package/dist/components/tabs/components/tabs-tab/tabs-tab.component.js +6 -19
- package/dist/components/tabs/components/tabs-tab-panel/tabs-tab-panel.component.js +6 -19
- package/dist/components/tabs/tabs.component.js +6 -20
- package/dist/components/textarea/textarea.component.js +6 -19
- package/dist/components/visually-hidden/visually-hidden.component.js +5 -18
- package/dist/components/well/well.component.js +5 -18
- package/dist/css/westpac-ui.css +15 -0
- package/dist/css/westpac-ui.min.css +15 -0
- package/dist/hook/breakpoints.hook.d.ts +1 -0
- package/dist/hook/breakpoints.hook.js +21 -0
- package/dist/tailwind/tailwind-plugin.js +2 -2
- package/dist/tailwind/tailwind-transformer.js +1 -3
- package/dist/tailwind/utils/create-brand-fonts.js +2 -2
- package/package.json +11 -9
- package/src/components/accordion/components/accordion-item/accordion-item.component.tsx +1 -1
- package/src/components/accordion/components/accordion-item/accordion-item.styles.ts +2 -1
- package/src/components/autocomplete/components/autocomplete-list-box/autocomplete-list-box.component.tsx +1 -1
- package/src/components/autocomplete/components/autocomplete-list-box/components/autocomplete-list-box-option/autocomplete-list-box-option.styles.ts +2 -2
- package/src/components/autocomplete/components/autocomplete-popover/autocomplete-popover.component.tsx +1 -1
- package/src/components/icon/components/arrow-thread-reply-icon.tsx +19 -0
- package/src/components/icon/components/button-shape-icon.tsx +39 -0
- package/src/components/icon/components/closed-caption-icon.tsx +41 -0
- package/src/components/icon/components/color-filters-icon.tsx +23 -0
- package/src/components/icon/components/format-color-icon.tsx +26 -0
- package/src/components/icon/components/fullscreen-exit-icon.tsx +19 -0
- package/src/components/icon/components/fullscreen-icon.tsx +19 -0
- package/src/components/icon/components/pause-icon.tsx +1 -1
- package/src/components/icon/components/play-icon.tsx +1 -1
- package/src/components/icon/components/replay-icon.tsx +15 -0
- package/src/components/icon/components/text-bold-icon.tsx +17 -0
- package/src/components/icon/components/text-increase-icon.tsx +22 -0
- package/src/components/icon/components/text-large-icon.tsx +21 -0
- package/src/components/icon/components/voiceover-on-icon.tsx +51 -0
- package/src/components/icon/components/volume-off-icon.tsx +51 -0
- package/src/components/icon/components/volume-on-icon.tsx +46 -0
- package/src/components/icon/index.ts +14 -0
- package/src/components/pagination/components/pagination-item/pagination-item.component.tsx +2 -0
- package/src/components/pagination/components/pagination-item/pagination-item.styles.ts +1 -1
- package/src/components/pagination/components/pagination-pages/pagination-pages.component.tsx +212 -0
- package/src/components/pagination/components/pagination-pages/pagination-pages.types.ts +47 -0
- package/src/components/pagination/components/pagination-presentational/pagination-presentational.component.tsx +81 -0
- package/src/components/pagination/{pagination.styles.ts → components/pagination-presentational/pagination-presentational.styles.ts} +2 -0
- package/src/components/pagination/components/pagination-presentational/pagination-presentational.types.ts +48 -0
- package/src/components/pagination/components/pagination-total-pages/pagination-total-pages.component.tsx +234 -0
- package/src/components/pagination/components/pagination-total-pages/pagination-total-pages.types.ts +48 -0
- package/src/components/pagination/pagination.component.tsx +34 -142
- package/src/components/pagination/pagination.types.ts +34 -31
- package/src/components/pagination/pagination.utils.ts +11 -0
- package/src/components/panel/panel.types.ts +1 -1
- package/src/components/progress-indicator/progress-indicator.component.tsx +1 -1
- package/src/components/symbol/components/symbols/pay-to-black-symbol.tsx +30 -0
- package/src/components/symbol/components/symbols/pay-to-dark-grey-symbol.tsx +30 -0
- package/src/components/symbol/components/symbols/pay-to-light-grey-symbol.tsx +30 -0
- package/src/components/symbol/components/symbols/pay-to-white-symbol.tsx +30 -0
- package/src/components/symbol/components/symbols/pay-to-wordmark-black-symbol.tsx +42 -0
- package/src/components/symbol/components/symbols/pay-to-wordmark-dark-grey-symbol.tsx +42 -0
- package/src/components/symbol/components/symbols/pay-to-wordmark-light-grey-symbol.tsx +42 -0
- package/src/components/symbol/components/symbols/pay-to-wordmark-white-symbol.tsx +42 -0
- package/src/components/symbol/components/symbols/x-mark-inverse-symbol.tsx +2 -2
- package/src/components/symbol/components/symbols/x-mark-symbol.tsx +2 -2
- package/src/components/symbol/index.ts +8 -0
- package/src/hook/breakpoints.hook.ts +29 -0
- package/utils/build-icons/icon-template.ts +1 -1
- package/utils/build-svg-zip/index.ts +39 -0
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source){
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
15
1
|
import React from 'react';
|
|
16
2
|
import { styles } from './pagination-item.styles.js';
|
|
17
|
-
export function PaginationItem({ className
|
|
18
|
-
return React.createElement(Tag,
|
|
3
|
+
export function PaginationItem({ className, firstItem = false, lastItem = false, tag: Tag = 'a', children, active, disabled = false, ...props }) {
|
|
4
|
+
return React.createElement(Tag, {
|
|
19
5
|
className: styles({
|
|
20
6
|
className,
|
|
21
7
|
firstItem,
|
|
22
8
|
lastItem,
|
|
23
9
|
active,
|
|
24
10
|
disabled
|
|
25
|
-
})
|
|
26
|
-
|
|
11
|
+
}),
|
|
12
|
+
...props,
|
|
27
13
|
disabled: disabled,
|
|
28
|
-
"aria-
|
|
29
|
-
|
|
14
|
+
"aria-disabled": disabled ? 'true' : 'false',
|
|
15
|
+
"aria-current": active ? 'page' : undefined,
|
|
16
|
+
...Tag === 'button' && {
|
|
17
|
+
type: 'button'
|
|
18
|
+
}
|
|
19
|
+
}, children);
|
|
30
20
|
}
|
|
@@ -15,7 +15,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
15
15
|
true: string;
|
|
16
16
|
false: string;
|
|
17
17
|
};
|
|
18
|
-
}, undefined, "typography-body-10 relative block border border-border px-2 py-1.5 text-center text-text
|
|
18
|
+
}, undefined, "typography-body-10 relative block min-w-7 border border-border px-2 py-1.5 text-center text-text", {
|
|
19
19
|
responsiveVariants: string[];
|
|
20
20
|
}, {
|
|
21
21
|
firstItem: {
|
|
@@ -51,6 +51,6 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
|
|
|
51
51
|
true: string;
|
|
52
52
|
false: string;
|
|
53
53
|
};
|
|
54
|
-
}, undefined, "typography-body-10 relative block border border-border px-2 py-1.5 text-center text-text
|
|
54
|
+
}, undefined, "typography-body-10 relative block min-w-7 border border-border px-2 py-1.5 text-center text-text", {
|
|
55
55
|
responsiveVariants: string[];
|
|
56
56
|
}, unknown, unknown, undefined>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const styles = tv({
|
|
3
|
-
base: 'typography-body-10 relative block border border-border px-2 py-1.5 text-center text-text
|
|
3
|
+
base: 'typography-body-10 relative block min-w-7 border border-border px-2 py-1.5 text-center text-text',
|
|
4
4
|
variants: {
|
|
5
5
|
firstItem: {
|
|
6
6
|
true: 'rounded-l',
|
package/dist/components/pagination/components/pagination-pages/pagination-pages.component.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type PaginationPageProps } from './pagination-pages.types.js';
|
|
2
|
+
export declare function PaginationPage({ className, pages, tag, role, current, linkComponent, infinite, onChange, backLabel, nextLabel, nextAriaLabel, backAriaLabel, siblingCount, boundaryCount, ...props }: PaginationPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useCallback, useMemo } from 'react';
|
|
3
|
+
import { useBreakpoint } from '../../../../hook/breakpoints.hook.js';
|
|
4
|
+
import { getSiblingOrBoundaryCount } from '../../pagination.utils.js';
|
|
5
|
+
import { PaginationPresentational } from '../pagination-presentational/pagination-presentational.component.js';
|
|
6
|
+
export function PaginationPage({ className, pages, tag = 'nav', role = 'navigation', current = 1, linkComponent, infinite = false, onChange, backLabel = 'Back', nextLabel = 'Next', nextAriaLabel = 'Next', backAriaLabel = 'Back', siblingCount = 2, boundaryCount = 1, ...props }) {
|
|
7
|
+
const breakpoint = useBreakpoint();
|
|
8
|
+
const finalSiblingCount = useMemo(()=>{
|
|
9
|
+
if (typeof siblingCount === 'number') {
|
|
10
|
+
return siblingCount;
|
|
11
|
+
}
|
|
12
|
+
return getSiblingOrBoundaryCount(siblingCount, breakpoint);
|
|
13
|
+
}, [
|
|
14
|
+
breakpoint,
|
|
15
|
+
siblingCount
|
|
16
|
+
]);
|
|
17
|
+
const finalBoundaryCount = useMemo(()=>{
|
|
18
|
+
if (typeof boundaryCount === 'number') {
|
|
19
|
+
return boundaryCount;
|
|
20
|
+
}
|
|
21
|
+
return getSiblingOrBoundaryCount(boundaryCount, breakpoint);
|
|
22
|
+
}, [
|
|
23
|
+
boundaryCount,
|
|
24
|
+
breakpoint
|
|
25
|
+
]);
|
|
26
|
+
const generateHandleOnClickBackwards = useCallback((current, infinite, forwardOnly, onChange, pages)=>()=>{
|
|
27
|
+
if (infinite && forwardOnly) {
|
|
28
|
+
return onChange(pages.length);
|
|
29
|
+
}
|
|
30
|
+
if (!forwardOnly) {
|
|
31
|
+
return onChange(current - 1);
|
|
32
|
+
}
|
|
33
|
+
}, []);
|
|
34
|
+
const paginationBackProps = useMemo(()=>{
|
|
35
|
+
var _pages_;
|
|
36
|
+
const fowardOnly = (current || 1) <= 1;
|
|
37
|
+
const defaultBackProps = {
|
|
38
|
+
disabled: !infinite && fowardOnly,
|
|
39
|
+
firstItem: true,
|
|
40
|
+
'aria-label': backAriaLabel
|
|
41
|
+
};
|
|
42
|
+
if (defaultBackProps.disabled) {
|
|
43
|
+
return {
|
|
44
|
+
...defaultBackProps,
|
|
45
|
+
tag: 'button'
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
if (onChange) {
|
|
49
|
+
return {
|
|
50
|
+
...defaultBackProps,
|
|
51
|
+
tag: linkComponent || 'button',
|
|
52
|
+
...current && {
|
|
53
|
+
onClick: generateHandleOnClickBackwards(current, infinite, fowardOnly, onChange, pages)
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
...defaultBackProps,
|
|
59
|
+
tag: linkComponent || 'a',
|
|
60
|
+
href: fowardOnly ? pages[pages.length - 1].href : (_pages_ = pages[(current || 0) - 2]) === null || _pages_ === void 0 ? void 0 : _pages_.href
|
|
61
|
+
};
|
|
62
|
+
}, [
|
|
63
|
+
current,
|
|
64
|
+
infinite,
|
|
65
|
+
backAriaLabel,
|
|
66
|
+
onChange,
|
|
67
|
+
linkComponent,
|
|
68
|
+
pages,
|
|
69
|
+
generateHandleOnClickBackwards
|
|
70
|
+
]);
|
|
71
|
+
const generateHandleOnClickForward = useCallback((current, infinite, backwardsOnly, onChange)=>()=>{
|
|
72
|
+
if (infinite && backwardsOnly) {
|
|
73
|
+
return onChange(1);
|
|
74
|
+
}
|
|
75
|
+
if (backwardsOnly) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
return onChange(current + 1);
|
|
79
|
+
}, []);
|
|
80
|
+
const paginationNextProps = useMemo(()=>{
|
|
81
|
+
var _pages_;
|
|
82
|
+
const backwardsOnly = (current || 1) >= pages.length;
|
|
83
|
+
const defaultNextProps = {
|
|
84
|
+
disabled: !infinite && backwardsOnly,
|
|
85
|
+
tag: linkComponent,
|
|
86
|
+
lastItem: true,
|
|
87
|
+
'aria-label': nextAriaLabel
|
|
88
|
+
};
|
|
89
|
+
if (defaultNextProps.disabled) {
|
|
90
|
+
return {
|
|
91
|
+
...defaultNextProps,
|
|
92
|
+
tag: 'button'
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
if (onChange) {
|
|
96
|
+
return {
|
|
97
|
+
...defaultNextProps,
|
|
98
|
+
tag: linkComponent || 'button',
|
|
99
|
+
...current && {
|
|
100
|
+
onClick: generateHandleOnClickForward(current, infinite, backwardsOnly, onChange)
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
...defaultNextProps,
|
|
106
|
+
tag: linkComponent || 'a',
|
|
107
|
+
href: backwardsOnly ? pages[0].href : (_pages_ = pages[current || 0]) === null || _pages_ === void 0 ? void 0 : _pages_.href
|
|
108
|
+
};
|
|
109
|
+
}, [
|
|
110
|
+
current,
|
|
111
|
+
pages,
|
|
112
|
+
infinite,
|
|
113
|
+
linkComponent,
|
|
114
|
+
nextAriaLabel,
|
|
115
|
+
onChange,
|
|
116
|
+
generateHandleOnClickForward
|
|
117
|
+
]);
|
|
118
|
+
const numberedPages = useMemo(()=>pages.map((page, index)=>({
|
|
119
|
+
...page,
|
|
120
|
+
page: index + 1
|
|
121
|
+
})), [
|
|
122
|
+
pages
|
|
123
|
+
]);
|
|
124
|
+
const pagesToRender = useMemo(()=>{
|
|
125
|
+
const minEdgePagesVisible = Math.min(finalSiblingCount * 2 + finalBoundaryCount + 2, pages.length);
|
|
126
|
+
let leftCorner = numberedPages.slice(0, finalBoundaryCount);
|
|
127
|
+
let rightCorner = finalBoundaryCount > 0 ? numberedPages.slice(-finalBoundaryCount).filter((page)=>!leftCorner.some((leftItem)=>leftItem.page === page.page)) : [];
|
|
128
|
+
let middle = [];
|
|
129
|
+
if (current) {
|
|
130
|
+
var _middle_, _leftCorner_at, _rightCorner_;
|
|
131
|
+
const nearStart = current < minEdgePagesVisible - finalSiblingCount;
|
|
132
|
+
const nearEnd = current > numberedPages.length - minEdgePagesVisible + finalSiblingCount;
|
|
133
|
+
if (nearStart) {
|
|
134
|
+
leftCorner = numberedPages.slice(0, minEdgePagesVisible);
|
|
135
|
+
}
|
|
136
|
+
if (nearEnd) {
|
|
137
|
+
rightCorner = numberedPages.slice(-minEdgePagesVisible);
|
|
138
|
+
}
|
|
139
|
+
rightCorner = rightCorner.filter((page)=>!leftCorner.some((leftItem)=>leftItem.page === page.page));
|
|
140
|
+
const currentIndex = current - 1;
|
|
141
|
+
const leftEdge = currentIndex - finalSiblingCount;
|
|
142
|
+
middle = numberedPages.slice(Math.max(0, leftEdge), leftEdge + (finalSiblingCount * 2 + 1)).filter((middleItem)=>{
|
|
143
|
+
return !(leftCorner.some((left)=>left.page === middleItem.page) || rightCorner.some((right)=>right.page === middleItem.page));
|
|
144
|
+
});
|
|
145
|
+
const lastItemMiddle = middle.at(-1);
|
|
146
|
+
const hasLeftDots = ((_middle_ = middle[0]) === null || _middle_ === void 0 ? void 0 : _middle_.page) && middle[0].page - 1 !== ((_leftCorner_at = leftCorner.at(-1)) === null || _leftCorner_at === void 0 ? void 0 : _leftCorner_at.page);
|
|
147
|
+
const hasRightDots = (lastItemMiddle === null || lastItemMiddle === void 0 ? void 0 : lastItemMiddle.page) && lastItemMiddle.page + 1 !== ((_rightCorner_ = rightCorner[0]) === null || _rightCorner_ === void 0 ? void 0 : _rightCorner_.page);
|
|
148
|
+
if (middle.length === 0 && leftCorner.length + rightCorner.length !== numberedPages.length) {
|
|
149
|
+
middle = [
|
|
150
|
+
null
|
|
151
|
+
];
|
|
152
|
+
} else {
|
|
153
|
+
if (hasLeftDots) middle.unshift(null);
|
|
154
|
+
if (hasRightDots) middle.push(null);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return [
|
|
158
|
+
...leftCorner,
|
|
159
|
+
...middle,
|
|
160
|
+
...rightCorner
|
|
161
|
+
];
|
|
162
|
+
}, [
|
|
163
|
+
finalBoundaryCount,
|
|
164
|
+
current,
|
|
165
|
+
numberedPages,
|
|
166
|
+
finalSiblingCount,
|
|
167
|
+
pages.length
|
|
168
|
+
]);
|
|
169
|
+
if (!pages.length) {
|
|
170
|
+
return React.createElement(React.Fragment, null);
|
|
171
|
+
}
|
|
172
|
+
return React.createElement(PaginationPresentational, {
|
|
173
|
+
className: className,
|
|
174
|
+
current: current,
|
|
175
|
+
paginationBackProps: paginationBackProps,
|
|
176
|
+
paginationNextProps: paginationNextProps,
|
|
177
|
+
pagesToRender: pagesToRender,
|
|
178
|
+
tag: tag,
|
|
179
|
+
role: role,
|
|
180
|
+
backLabel: backLabel,
|
|
181
|
+
nextLabel: nextLabel,
|
|
182
|
+
onChange: onChange,
|
|
183
|
+
...props
|
|
184
|
+
});
|
|
185
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { PaginationBase } from '../../pagination.types.js';
|
|
3
|
+
export type PageProps = {
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
href: string;
|
|
6
|
+
text: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export type PaginationAsLinkProps = {
|
|
9
|
+
/**
|
|
10
|
+
* on page change
|
|
11
|
+
*/
|
|
12
|
+
onChange?: never;
|
|
13
|
+
/**
|
|
14
|
+
* Pages items
|
|
15
|
+
*/
|
|
16
|
+
pages: PageProps[];
|
|
17
|
+
};
|
|
18
|
+
export type PaginationAsButtonProps = {
|
|
19
|
+
/**
|
|
20
|
+
* on page change
|
|
21
|
+
*/
|
|
22
|
+
onChange: (page: number) => unknown;
|
|
23
|
+
/**
|
|
24
|
+
* Pages items
|
|
25
|
+
*/
|
|
26
|
+
pages: Omit<PageProps, 'href'>[];
|
|
27
|
+
};
|
|
28
|
+
export type PaginationPageProps = PaginationBase & (PaginationAsLinkProps | PaginationAsButtonProps) & Omit<HTMLAttributes<Element>, 'onChange'>;
|
|
29
|
+
export type PageToRender = {
|
|
30
|
+
href: string;
|
|
31
|
+
page: number;
|
|
32
|
+
text: React.ReactNode;
|
|
33
|
+
} | {
|
|
34
|
+
page: number;
|
|
35
|
+
text: React.ReactNode;
|
|
36
|
+
} | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type PaginationPresentationalProps } from './pagination-presentational.types.js';
|
|
2
|
+
export declare function PaginationPresentational({ className, tag: Tag, role, paginationBackProps, backLabel, pagesToRender, current, linkComponent, onChange, paginationNextProps, nextLabel, ...props }: PaginationPresentationalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PaginationItem } from '../../components/index.js';
|
|
4
|
+
import { styles as paginationStyles } from './pagination-presentational.styles.js';
|
|
5
|
+
export function PaginationPresentational({ className, tag: Tag = 'nav', role = 'navigation', paginationBackProps, backLabel, pagesToRender, current, linkComponent, onChange, paginationNextProps, nextLabel, ...props }) {
|
|
6
|
+
const styles = paginationStyles({});
|
|
7
|
+
return React.createElement(Tag, {
|
|
8
|
+
className: styles.base({
|
|
9
|
+
className
|
|
10
|
+
}),
|
|
11
|
+
role: role,
|
|
12
|
+
"aria-label": "Page number",
|
|
13
|
+
...props
|
|
14
|
+
}, React.createElement("ul", {
|
|
15
|
+
className: styles.ul({})
|
|
16
|
+
}, React.createElement("li", null, React.createElement(PaginationItem, paginationBackProps, backLabel)), pagesToRender.map((page, index)=>{
|
|
17
|
+
if (page === null) {
|
|
18
|
+
return React.createElement("li", {
|
|
19
|
+
className: styles.emptyItem(),
|
|
20
|
+
key: `index-${index}`
|
|
21
|
+
}, "…");
|
|
22
|
+
}
|
|
23
|
+
const commonProps = {
|
|
24
|
+
active: (current || 0) === page.page,
|
|
25
|
+
'aria-label': page['aria-label'] || `Go to page ${page.page}`
|
|
26
|
+
};
|
|
27
|
+
return React.createElement("li", {
|
|
28
|
+
key: page.page
|
|
29
|
+
}, 'href' in page ? React.createElement(PaginationItem, {
|
|
30
|
+
...commonProps,
|
|
31
|
+
tag: linkComponent || 'a',
|
|
32
|
+
href: page.href
|
|
33
|
+
}, page.text) : React.createElement(PaginationItem, {
|
|
34
|
+
...commonProps,
|
|
35
|
+
tag: linkComponent || 'button',
|
|
36
|
+
onClick: onChange && (()=>{
|
|
37
|
+
onChange(page.page);
|
|
38
|
+
})
|
|
39
|
+
}, page.text));
|
|
40
|
+
}), React.createElement("li", null, React.createElement(PaginationItem, paginationNextProps, nextLabel))), current && React.createElement("span", {
|
|
41
|
+
className: "sr-only",
|
|
42
|
+
role: "status"
|
|
43
|
+
}, "Page ", current));
|
|
44
|
+
}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export declare const styles: import("tailwind-variants").TVReturnType<{}, {
|
|
2
2
|
base: string;
|
|
3
3
|
ul: string;
|
|
4
|
+
emptyItem: string;
|
|
4
5
|
}, undefined, {
|
|
5
6
|
responsiveVariants: string[];
|
|
6
7
|
}, {}, {
|
|
7
8
|
base: string;
|
|
8
9
|
ul: string;
|
|
10
|
+
emptyItem: string;
|
|
9
11
|
}, import("tailwind-variants").TVReturnType<{}, {
|
|
10
12
|
base: string;
|
|
11
13
|
ul: string;
|
|
14
|
+
emptyItem: string;
|
|
12
15
|
}, undefined, {
|
|
13
16
|
responsiveVariants: string[];
|
|
14
17
|
}, unknown, unknown, undefined>>;
|
|
@@ -2,7 +2,8 @@ import { tv } from 'tailwind-variants';
|
|
|
2
2
|
export const styles = tv({
|
|
3
3
|
slots: {
|
|
4
4
|
base: 'flex flex-col items-center',
|
|
5
|
-
ul: 'flex overflow-hidden'
|
|
5
|
+
ul: 'flex overflow-hidden',
|
|
6
|
+
emptyItem: 'typography-body-10 relative block min-w-7 cursor-default border-y border-border px-2 py-1.5 text-center text-text'
|
|
6
7
|
},
|
|
7
8
|
variants: {}
|
|
8
9
|
}, {
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { type PaginationItemProps } from '../../components/index.js';
|
|
3
|
+
import { PaginationBase } from '../../pagination.types.js';
|
|
4
|
+
export type PageToRender = {
|
|
5
|
+
'aria-label'?: string;
|
|
6
|
+
href: string;
|
|
7
|
+
page: number;
|
|
8
|
+
text: React.ReactNode;
|
|
9
|
+
} | {
|
|
10
|
+
'aria-label'?: string;
|
|
11
|
+
page: number;
|
|
12
|
+
text: React.ReactNode;
|
|
13
|
+
} | null;
|
|
14
|
+
export type PaginationPresentationalProps = PaginationBase & {
|
|
15
|
+
/**
|
|
16
|
+
* on page change
|
|
17
|
+
*/
|
|
18
|
+
onChange?: (page: number) => unknown;
|
|
19
|
+
/**
|
|
20
|
+
* Pages to render where the null value is rendered as [...]
|
|
21
|
+
*/
|
|
22
|
+
pagesToRender: PageToRender[];
|
|
23
|
+
/**
|
|
24
|
+
* Props to back button
|
|
25
|
+
*/
|
|
26
|
+
paginationBackProps?: PaginationItemProps;
|
|
27
|
+
/**
|
|
28
|
+
* Props to back button
|
|
29
|
+
*/
|
|
30
|
+
paginationNextProps?: PaginationItemProps;
|
|
31
|
+
/**
|
|
32
|
+
* siblingCount
|
|
33
|
+
* @default 1
|
|
34
|
+
*/
|
|
35
|
+
siblingCount?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Tag to render
|
|
38
|
+
* @default nav
|
|
39
|
+
*/
|
|
40
|
+
tag?: keyof JSX.IntrinsicElements;
|
|
41
|
+
} & Omit<HTMLAttributes<Element>, 'onChange'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type PaginationTotalPagesProps } from './pagination-total-pages.types.js';
|
|
2
|
+
export declare function PaginationTotalPages({ className, totalPages, tag, role, current, linkComponent, infinite, onChange, backLabel, backAriaLabel, nextLabel, nextAriaLabel, siblingCount, boundaryCount, onPageItemProps, ...props }: PaginationTotalPagesProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useCallback, useMemo } from 'react';
|
|
3
|
+
import { useBreakpoint } from '../../../../hook/breakpoints.hook.js';
|
|
4
|
+
import { getSiblingOrBoundaryCount } from '../../pagination.utils.js';
|
|
5
|
+
import { PaginationPresentational } from '../pagination-presentational/pagination-presentational.component.js';
|
|
6
|
+
function generateArray(from, to) {
|
|
7
|
+
return Array.from({
|
|
8
|
+
length: to - from + 1
|
|
9
|
+
}, (_, i)=>i + from);
|
|
10
|
+
}
|
|
11
|
+
export function PaginationTotalPages({ className, totalPages, tag = 'nav', role = 'navigation', current = 1, linkComponent, infinite = false, onChange, backLabel = 'Back', backAriaLabel = 'Back', nextLabel = 'Next', nextAriaLabel = 'Next', siblingCount = 2, boundaryCount = 1, onPageItemProps, ...props }) {
|
|
12
|
+
const breakpoint = useBreakpoint();
|
|
13
|
+
const finalSiblingCount = useMemo(()=>{
|
|
14
|
+
if (typeof siblingCount === 'number') {
|
|
15
|
+
return siblingCount;
|
|
16
|
+
}
|
|
17
|
+
return getSiblingOrBoundaryCount(siblingCount, breakpoint);
|
|
18
|
+
}, [
|
|
19
|
+
breakpoint,
|
|
20
|
+
siblingCount
|
|
21
|
+
]);
|
|
22
|
+
const finalBoundaryCount = useMemo(()=>{
|
|
23
|
+
if (typeof boundaryCount === 'number') {
|
|
24
|
+
return boundaryCount;
|
|
25
|
+
}
|
|
26
|
+
return getSiblingOrBoundaryCount(boundaryCount, breakpoint);
|
|
27
|
+
}, [
|
|
28
|
+
boundaryCount,
|
|
29
|
+
breakpoint
|
|
30
|
+
]);
|
|
31
|
+
const generateHandleOnClickBackwards = useCallback((current, infinite, forwardOnly, onChange, totalPages)=>()=>{
|
|
32
|
+
if (infinite && forwardOnly) {
|
|
33
|
+
return onChange(totalPages);
|
|
34
|
+
}
|
|
35
|
+
if (!forwardOnly) {
|
|
36
|
+
return onChange(current - 1);
|
|
37
|
+
}
|
|
38
|
+
}, []);
|
|
39
|
+
const paginationBackProps = useMemo(()=>{
|
|
40
|
+
var _onPageItemProps;
|
|
41
|
+
const fowardOnly = (current || 1) <= 1;
|
|
42
|
+
const defaultBackProps = {
|
|
43
|
+
disabled: !infinite && fowardOnly,
|
|
44
|
+
firstItem: true,
|
|
45
|
+
'aria-label': backAriaLabel
|
|
46
|
+
};
|
|
47
|
+
if (defaultBackProps.disabled) {
|
|
48
|
+
return {
|
|
49
|
+
...defaultBackProps,
|
|
50
|
+
tag: 'button'
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (onChange) {
|
|
54
|
+
return {
|
|
55
|
+
...defaultBackProps,
|
|
56
|
+
tag: linkComponent || 'button',
|
|
57
|
+
...current && {
|
|
58
|
+
onClick: generateHandleOnClickBackwards(current, infinite, fowardOnly, onChange, totalPages)
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
...defaultBackProps,
|
|
64
|
+
tag: linkComponent || 'a',
|
|
65
|
+
href: fowardOnly ? onPageItemProps(totalPages).href : (_onPageItemProps = onPageItemProps(current - 1)) === null || _onPageItemProps === void 0 ? void 0 : _onPageItemProps.href
|
|
66
|
+
};
|
|
67
|
+
}, [
|
|
68
|
+
current,
|
|
69
|
+
infinite,
|
|
70
|
+
backAriaLabel,
|
|
71
|
+
onChange,
|
|
72
|
+
linkComponent,
|
|
73
|
+
onPageItemProps,
|
|
74
|
+
totalPages,
|
|
75
|
+
generateHandleOnClickBackwards
|
|
76
|
+
]);
|
|
77
|
+
const generateHandleOnClickForward = useCallback((current, infinite, backwardsOnly, onChange)=>()=>{
|
|
78
|
+
if (infinite && backwardsOnly) {
|
|
79
|
+
return onChange(1);
|
|
80
|
+
}
|
|
81
|
+
if (backwardsOnly) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
return onChange(current + 1);
|
|
85
|
+
}, []);
|
|
86
|
+
const paginationNextProps = useMemo(()=>{
|
|
87
|
+
var _onPageItemProps, _onPageItemProps1;
|
|
88
|
+
const backwardsOnly = (current || 1) >= totalPages;
|
|
89
|
+
const defaultNextProps = {
|
|
90
|
+
disabled: !infinite && backwardsOnly,
|
|
91
|
+
tag: linkComponent,
|
|
92
|
+
lastItem: true,
|
|
93
|
+
'aria-label': nextAriaLabel
|
|
94
|
+
};
|
|
95
|
+
if (defaultNextProps.disabled) {
|
|
96
|
+
return {
|
|
97
|
+
...defaultNextProps,
|
|
98
|
+
tag: 'button'
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
if (onChange) {
|
|
102
|
+
return {
|
|
103
|
+
...defaultNextProps,
|
|
104
|
+
tag: linkComponent || 'button',
|
|
105
|
+
...current && {
|
|
106
|
+
onClick: generateHandleOnClickForward(current, infinite, backwardsOnly, onChange)
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
...defaultNextProps,
|
|
112
|
+
tag: linkComponent || 'a',
|
|
113
|
+
href: backwardsOnly ? (_onPageItemProps = onPageItemProps(1)) === null || _onPageItemProps === void 0 ? void 0 : _onPageItemProps.href : (_onPageItemProps1 = onPageItemProps(current || 0)) === null || _onPageItemProps1 === void 0 ? void 0 : _onPageItemProps1.href
|
|
114
|
+
};
|
|
115
|
+
}, [
|
|
116
|
+
current,
|
|
117
|
+
totalPages,
|
|
118
|
+
infinite,
|
|
119
|
+
linkComponent,
|
|
120
|
+
nextAriaLabel,
|
|
121
|
+
onChange,
|
|
122
|
+
onPageItemProps,
|
|
123
|
+
generateHandleOnClickForward
|
|
124
|
+
]);
|
|
125
|
+
const pagesToRender = useMemo(()=>{
|
|
126
|
+
const minEdgePagesVisible = Math.min(finalSiblingCount * 2 + finalBoundaryCount + 2, totalPages);
|
|
127
|
+
let leftCorner = generateArray(1, Math.min(finalBoundaryCount, totalPages));
|
|
128
|
+
let rightCorner = finalBoundaryCount > 0 ? generateArray(totalPages + 1 - finalBoundaryCount, totalPages).filter((page)=>!leftCorner.some((leftItem)=>leftItem === page)) : [];
|
|
129
|
+
let middle = [];
|
|
130
|
+
if (current) {
|
|
131
|
+
const nearStart = current < minEdgePagesVisible - finalSiblingCount;
|
|
132
|
+
const nearEnd = current > totalPages - minEdgePagesVisible + finalSiblingCount;
|
|
133
|
+
if (nearStart) {
|
|
134
|
+
leftCorner = generateArray(1, minEdgePagesVisible);
|
|
135
|
+
}
|
|
136
|
+
if (nearEnd) {
|
|
137
|
+
rightCorner = generateArray(totalPages - minEdgePagesVisible + 1, totalPages);
|
|
138
|
+
}
|
|
139
|
+
rightCorner = rightCorner.filter((page)=>!leftCorner.some((leftItem)=>leftItem === page));
|
|
140
|
+
const leftEdge = current - finalSiblingCount;
|
|
141
|
+
middle = generateArray(Math.max(1, leftEdge), Math.min(leftEdge + finalSiblingCount * 2, totalPages)).filter((middleItem)=>{
|
|
142
|
+
return !(leftCorner.some((left)=>left === middleItem) || rightCorner.some((right)=>right === middleItem));
|
|
143
|
+
});
|
|
144
|
+
const lastItemMiddle = middle.at(-1);
|
|
145
|
+
const hasLeftDots = middle[0] && middle[0] - 1 !== leftCorner.at(-1);
|
|
146
|
+
const hasRightDots = lastItemMiddle && lastItemMiddle + 1 !== rightCorner[0];
|
|
147
|
+
if (middle.length === 0 && leftCorner.length + rightCorner.length !== totalPages) {
|
|
148
|
+
middle = [
|
|
149
|
+
null
|
|
150
|
+
];
|
|
151
|
+
} else {
|
|
152
|
+
if (hasLeftDots) middle.unshift(null);
|
|
153
|
+
if (hasRightDots) middle.push(null);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return [
|
|
157
|
+
...leftCorner,
|
|
158
|
+
...middle,
|
|
159
|
+
...rightCorner
|
|
160
|
+
].map((page)=>page ? {
|
|
161
|
+
page,
|
|
162
|
+
text: page,
|
|
163
|
+
...onPageItemProps === null || onPageItemProps === void 0 ? void 0 : onPageItemProps(page)
|
|
164
|
+
} : null);
|
|
165
|
+
}, [
|
|
166
|
+
finalBoundaryCount,
|
|
167
|
+
current,
|
|
168
|
+
onPageItemProps,
|
|
169
|
+
finalSiblingCount,
|
|
170
|
+
totalPages
|
|
171
|
+
]);
|
|
172
|
+
if (totalPages <= 0) {
|
|
173
|
+
return React.createElement(React.Fragment, null);
|
|
174
|
+
}
|
|
175
|
+
return React.createElement(PaginationPresentational, {
|
|
176
|
+
className: className,
|
|
177
|
+
current: current,
|
|
178
|
+
paginationBackProps: paginationBackProps,
|
|
179
|
+
paginationNextProps: paginationNextProps,
|
|
180
|
+
pagesToRender: pagesToRender,
|
|
181
|
+
tag: tag,
|
|
182
|
+
role: role,
|
|
183
|
+
backLabel: backLabel,
|
|
184
|
+
nextLabel: nextLabel,
|
|
185
|
+
onChange: onChange,
|
|
186
|
+
...props
|
|
187
|
+
});
|
|
188
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { PaginationBase } from '../../pagination.types.js';
|
|
3
|
+
export type PageProps = {
|
|
4
|
+
href: string;
|
|
5
|
+
text: ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type PaginationAsLinkProps = {
|
|
8
|
+
/**
|
|
9
|
+
* on page change
|
|
10
|
+
*/
|
|
11
|
+
onChange?: never;
|
|
12
|
+
/**
|
|
13
|
+
* Pages items
|
|
14
|
+
*/
|
|
15
|
+
onPageItemProps: (page: number) => Omit<PageToRenderHref, 'page'>;
|
|
16
|
+
};
|
|
17
|
+
export type PaginationAsButtonProps = {
|
|
18
|
+
/**
|
|
19
|
+
* on page change
|
|
20
|
+
*/
|
|
21
|
+
onChange: (page: number) => unknown;
|
|
22
|
+
/**
|
|
23
|
+
* Pages items
|
|
24
|
+
*/
|
|
25
|
+
onPageItemProps?: (page: number) => Omit<PageToRenderBase, 'page'>;
|
|
26
|
+
};
|
|
27
|
+
export type PaginationTotalPagesProps = {
|
|
28
|
+
/**
|
|
29
|
+
* total of pages
|
|
30
|
+
*/
|
|
31
|
+
totalPages: number;
|
|
32
|
+
} & PaginationBase & (PaginationAsLinkProps | PaginationAsButtonProps) & Omit<HTMLAttributes<Element>, 'onChange'>;
|
|
33
|
+
export type PageToRenderBase = {
|
|
34
|
+
'aria-label'?: string;
|
|
35
|
+
page: number;
|
|
36
|
+
text: React.ReactNode;
|
|
37
|
+
};
|
|
38
|
+
export type PageToRenderHref = PageToRenderBase & {
|
|
39
|
+
href: string;
|
|
40
|
+
};
|
package/dist/components/pagination/components/pagination-total-pages/pagination-total-pages.types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type PaginationProps } from './pagination.types.js';
|
|
2
|
-
export declare function Pagination({
|
|
2
|
+
export declare function Pagination({ tag, role, current, infinite, backLabel, nextLabel, siblingCount, boundaryCount, ...props }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|