@lifesg/react-design-system 4.0.0-alpha.4 → 4.0.0-alpha.5
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/accordion/accordion-item.styles_1j4eb32.css +2 -2
- package/accordion/accordion.d.ts +19 -0
- package/accordion/accordion.js.map +1 -1
- package/accordion/accordion.styles_bzrfrs.css +2 -2
- package/accordion/types.d.ts +42 -2
- package/alert/alert.d.ts +8 -0
- package/alert/alert.js.map +1 -1
- package/alert/alert.styles_patwo2.css +2 -2
- package/alert/types.d.ts +26 -2
- package/animations/loading-dots/loading-dots.styles_1rgrrmw.css +2 -2
- package/animations/loading-dots/lottie-animation.styles_1m15v69.css +1 -1
- package/animations/loading-dots-spinner/loading-dots-spinner.styles_1hcqkhs.css +2 -2
- package/animations/loading-dots-spinner/lottie-animation.styles_13d1unb.css +1 -1
- package/animations/loading-spinner/loading-spinner.styles_n6xoft.css +2 -2
- package/animations/loading-spinner/lottie-animation.styles_bnn4qt.css +1 -1
- package/avatar/avatar.d.ts +7 -0
- package/avatar/avatar.js.map +1 -1
- package/avatar/avatar.styles_16efw4.css +2 -2
- package/avatar/types.d.ts +11 -0
- package/badge/badge.d.ts +7 -0
- package/badge/badge.js.map +1 -1
- package/badge/badge.styles_1c3c6wj.css +2 -2
- package/badge/types.d.ts +20 -0
- package/box-container/box-container.d.ts +8 -0
- package/box-container/box-container.js.map +1 -1
- package/box-container/box-container.styles_5t2j9k.css +2 -2
- package/box-container/types.d.ts +24 -0
- package/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
- package/button/button.styles_1pxy0co.css +2 -2
- package/calendar/calendar.styles_11ho5x8.css +2 -2
- package/card/card.styles_1gh9gs3.css +2 -2
- package/checkbox/checkbox.styles_gm5bu1.css +2 -2
- package/cjs/accordion/accordion-item.styles_1j4eb32.css +2 -2
- package/cjs/accordion/accordion.js.map +1 -1
- package/cjs/accordion/accordion.styles_bzrfrs.css +2 -2
- package/cjs/alert/alert.js.map +1 -1
- package/cjs/alert/alert.styles_patwo2.css +2 -2
- package/cjs/animations/loading-dots/loading-dots.styles_1rgrrmw.css +2 -2
- package/cjs/animations/loading-dots/lottie-animation.styles_1m15v69.css +1 -1
- package/cjs/animations/loading-dots-spinner/loading-dots-spinner.styles_1hcqkhs.css +2 -2
- package/cjs/animations/loading-dots-spinner/lottie-animation.styles_13d1unb.css +1 -1
- package/cjs/animations/loading-spinner/loading-spinner.styles_n6xoft.css +2 -2
- package/cjs/animations/loading-spinner/lottie-animation.styles_bnn4qt.css +1 -1
- package/cjs/avatar/avatar.js.map +1 -1
- package/cjs/avatar/avatar.styles_16efw4.css +2 -2
- package/cjs/badge/badge.js.map +1 -1
- package/cjs/badge/badge.styles_1c3c6wj.css +2 -2
- package/cjs/box-container/box-container.js.map +1 -1
- package/cjs/box-container/box-container.styles_5t2j9k.css +2 -2
- package/cjs/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
- package/cjs/button/button.styles_1pxy0co.css +2 -2
- package/cjs/calendar/calendar.styles_11ho5x8.css +2 -2
- package/cjs/card/card.styles_1gh9gs3.css +2 -2
- package/cjs/checkbox/checkbox.styles_gm5bu1.css +2 -2
- package/cjs/countdown-timer/countdown-timer.js.map +1 -1
- package/cjs/countdown-timer/countdown-timer.styles_ipn1b0.css +2 -2
- package/cjs/dashed-border/dashed-border.js.map +1 -1
- package/cjs/dashed-border/dashed-border.styles_zszoox.css +2 -2
- package/cjs/data-table/data-table.js.map +1 -1
- package/cjs/data-table/data-table.styles_1iqq1g7.css +2 -2
- package/cjs/date-input/date-input.js.map +1 -1
- package/cjs/date-input/date-input.styles_1r5kcc7.css +1 -1
- package/cjs/date-navigator/date-navigator.js.map +1 -1
- package/cjs/date-navigator/date-navigator.styles_wokh56.css +2 -2
- package/cjs/date-range-input/date-range-input.js.map +1 -1
- package/cjs/date-range-input/date-range-input.styles_1s7ojnj.css +2 -2
- package/cjs/divider/divider.js.map +1 -1
- package/cjs/divider/divider.styles_1xpzh8p.css +2 -2
- package/cjs/drawer/drawer.js.map +1 -1
- package/cjs/drawer/drawer.styles_94hx3y.css +2 -2
- package/cjs/e-signature/e-signature-canvas.js +1 -1
- package/cjs/e-signature/e-signature-canvas.js.map +1 -1
- package/cjs/e-signature/e-signature.js.map +1 -1
- package/cjs/e-signature/e-signature.styles_lukd9f.css +2 -2
- package/cjs/error-display/error-display.js.map +1 -1
- package/cjs/error-display/error-display.styles_d3tql1.css +2 -2
- package/cjs/external/dompurify/dist/purify.es.js +3 -3
- package/cjs/external/dompurify/dist/purify.es.js.map +1 -1
- package/cjs/feedback-rating/feedback-rating-stars-container.styles_dmi8z9.css +2 -2
- package/cjs/feedback-rating/feedback-rating.js.map +1 -1
- package/cjs/feedback-rating/feedback-rating.styles_1kdklb6.css +2 -2
- package/cjs/file-download/file-download.js.map +1 -1
- package/cjs/file-download/file-download.styles_iggk8q.css +2 -2
- package/cjs/file-download/file-list-card/file-list-card.styles.js +1 -1
- package/cjs/file-download/file-list-card/file-list-card.styles.js.map +1 -1
- package/cjs/file-download/file-list-card/{file-list-card.styles_oom8ii.css → file-list-card.styles_18j2gut.css} +3 -3
- package/cjs/file-upload/dropzone.styles_1pllsau.css +2 -2
- package/cjs/file-upload/file-item-edit.js +1 -1
- package/cjs/file-upload/file-item-edit.js.map +1 -1
- package/cjs/file-upload/file-item-edit.styles.js +1 -1
- package/cjs/file-upload/file-item-edit.styles.js.map +1 -1
- package/cjs/file-upload/{file-item-edit.styles_1qbpbxj.css → file-item-edit.styles_19bvztn.css} +6 -5
- package/cjs/file-upload/file-list/file-list.js +1 -1
- package/cjs/file-upload/file-list/file-list.js.map +1 -1
- package/cjs/file-upload/file-list/file-list.styles.js +1 -1
- package/cjs/file-upload/file-list/file-list.styles.js.map +1 -1
- package/cjs/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
- package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +2 -2
- package/cjs/file-upload/file-list-item/file-list-item.js +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.js.map +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.styles.js +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.styles_o8000f.css +17 -0
- package/cjs/file-upload/file-upload.js +1 -1
- package/cjs/file-upload/file-upload.js.map +1 -1
- package/cjs/file-upload/file-upload.styles_9ffwcd.css +2 -2
- package/cjs/filter/addons/filter-item-checkbox.styles_7degw7.css +2 -2
- package/cjs/filter/filter-item-page.styles_17ewfrz.css +1 -1
- package/cjs/filter/filter-item.js.map +1 -1
- package/cjs/filter/filter-item.styles_cphjnj.css +2 -2
- package/cjs/filter/filter-modal.styles_qw3xlg.css +2 -2
- package/cjs/filter/filter-sidebar.styles_1otwpjl.css +2 -2
- package/cjs/filter/filter.js.map +1 -1
- package/cjs/filter/filter.styles_1ykijwm.css +2 -2
- package/cjs/footer/footer-download-app.styles_1v1j2us.css +2 -2
- package/cjs/footer/footer-resource-addon.styles_1jepb1d.css +2 -2
- package/cjs/footer/footer.js +1 -1
- package/cjs/footer/footer.js.map +1 -1
- package/cjs/footer/footer.styles_1msorhc.css +2 -2
- package/cjs/form/form-label-addon.styles_b00z8p.css +1 -1
- package/cjs/form/form-label.styles.js +1 -1
- package/cjs/form/form-label.styles.js.map +1 -1
- package/cjs/form/{form-label.styles_11r0652.css → form-label.styles_1nbe0bm.css} +2 -2
- package/cjs/form/form-textarea.styles_3p9qoy.css +2 -2
- package/cjs/form/form-wrapper.styles_199rslu.css +1 -1
- package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.styles_vc6y5c.css +2 -2
- package/cjs/fullscreen-image-carousel/stateful-image.styles_1xe8ypm.css +2 -2
- package/cjs/histogram-slider/histogram-slider.styles_wvd4w.css +2 -2
- package/cjs/image-button/image-button.styles_6n1qsr.css +2 -2
- package/cjs/index.js +1 -1
- package/cjs/input/input.styles_1cblor0.css +2 -2
- package/cjs/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
- package/cjs/input-group/input-group.styles_bqye6f.css +2 -2
- package/cjs/input-range-select/input-range-select.styles_adbrbm.css +2 -2
- package/cjs/input-range-slider/input-range-slider.styles_aljl2v.css +2 -2
- package/cjs/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -1
- package/cjs/input-textarea/textarea.styles_22z4n3.css +2 -2
- package/cjs/language-switcher/dropdown-panel.styles_1qsjf8d.css +2 -2
- package/cjs/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -2
- package/cjs/language-switcher/link-container-variant.styles_1iw6zux.css +2 -2
- package/cjs/layout/col-div.styles_16o6mwx.css +1 -1
- package/cjs/layout/container.styles_v70ec6.css +2 -2
- package/cjs/layout/section.styles_hstcaf.css +1 -1
- package/cjs/link-list/link-list.styles_m57vks.css +2 -2
- package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css +2 -2
- package/cjs/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
- package/cjs/markup/markup.style_1iu40x9.css +2 -2
- package/cjs/masked-input/masked-input.styles_1cm388a.css +2 -2
- package/cjs/masthead/masthead.styles_1huzon9.css +2 -2
- package/cjs/menu/menu-content.styles_p7ijll.css +2 -2
- package/cjs/menu/menu-item.styles_liyed8.css +2 -2
- package/cjs/menu/menu-link.styles_hfxoez.css +2 -2
- package/cjs/menu/menu-section.styles_g7my4d.css +2 -2
- package/cjs/modal/modal-box.styles_y52cts.css +2 -2
- package/cjs/modal/modal.styles_1lbblx6.css +2 -2
- package/cjs/modal-v2/modal-v2.styles_a8gv5i.css +2 -2
- package/cjs/modal-v2/slots/slot-styles_13sd376.css +2 -2
- package/cjs/navbar/brand.styles_zcgddp.css +1 -1
- package/cjs/navbar/drawer.js +1 -1
- package/cjs/navbar/drawer.js.map +1 -1
- package/cjs/navbar/drawer.styles_7hnxp5.css +2 -2
- package/cjs/navbar/menu.styles_gdpqc.css +2 -2
- package/cjs/navbar/navbar-action-buttons.styles_1vpm0nk.css +2 -2
- package/cjs/navbar/navbar-items.styles_1i3ltot.css +2 -2
- package/cjs/navbar/navbar.js +1 -1
- package/cjs/navbar/navbar.js.map +1 -1
- package/cjs/navbar/navbar.styles_koy0c7.css +2 -2
- package/cjs/notification-banner/notification-banner.styles_uxlysy.css +2 -2
- package/cjs/otp-input/otp-input.styles_5sbutl.css +2 -2
- package/cjs/otp-verification/contact-input-section.styles_odrjvt.css +2 -2
- package/cjs/otp-verification/otp-verification.styles_dg9bm8.css +1 -1
- package/cjs/otp-verification/thumbnail/thumbnail.styles_shqylh.css +2 -2
- package/cjs/otp-verification/verification-section.styles_x8jj.css +2 -2
- package/cjs/overlay/overlay.js +1 -1
- package/cjs/overlay/overlay.js.map +1 -1
- package/cjs/overlay/overlay.styles_12wym18.css +2 -2
- package/cjs/pagination/pagination.styles_6bcgva.css +2 -2
- package/cjs/pill/pill.styles_xwrniu.css +2 -2
- package/cjs/popover/popover-inline/popover-inline.styles_bkopnt.css +2 -2
- package/cjs/popover/popover-trigger.styles_8zokig.css +1 -1
- package/cjs/popover/popover.styles_ujnf0h.css +2 -2
- package/cjs/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
- package/cjs/radio-button/radio-button.styles_1c4v6v.css +2 -2
- package/cjs/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +2 -2
- package/cjs/schedule/schedule-header/schedule-header.js +1 -1
- package/cjs/schedule/schedule-header/schedule-header.js.map +1 -1
- package/cjs/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +2 -2
- package/cjs/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +2 -2
- package/cjs/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +2 -2
- package/cjs/schedule/schedule.styles_fdy5a1.css +2 -2
- package/cjs/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -1
- package/cjs/schedule/time-indicator/time-indicator.styles_1eaxyes.css +2 -2
- package/cjs/select-histogram/select-histogram.styles_n260dy.css +2 -2
- package/cjs/shared/accessibility/index_13g9vp.css +1 -1
- package/cjs/shared/clickable-icon/clickable-icon.styles_1v2imml.css +2 -2
- package/cjs/shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css +2 -2
- package/cjs/shared/dropdown-list/dropdown-label.styles_mloii0.css +2 -2
- package/cjs/shared/dropdown-list/dropdown-list.styles_konwm.css +2 -2
- package/cjs/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css +2 -2
- package/cjs/shared/dropdown-list/expandable-element.styles_rkkvqr.css +2 -2
- package/cjs/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
- package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +2 -2
- package/cjs/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
- package/cjs/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
- package/cjs/shared/input-wrapper/input-wrapper.styles_je6maw.css +2 -2
- package/cjs/shared/internal-calendar/calendar-dropdown.styles_wybjai.css +1 -1
- package/cjs/shared/internal-calendar/calendar-manager.js +1 -1
- package/cjs/shared/internal-calendar/calendar-manager.js.map +1 -1
- package/cjs/shared/internal-calendar/calendar-manager.styles.js +1 -1
- package/cjs/shared/internal-calendar/calendar-manager.styles.js.map +1 -1
- package/cjs/shared/internal-calendar/{calendar-manager.styles_1iuq5zw.css → calendar-manager.styles_1njwkj2.css} +3 -3
- package/cjs/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css +2 -2
- package/cjs/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css +2 -2
- package/cjs/shared/internal-calendar/internal-calendar-year.styles_therlc.css +2 -2
- package/cjs/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
- package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +2 -2
- package/cjs/shared/progress-bar/progress-bar.styles_125ri7a.css +1 -1
- package/cjs/shared/range-input-inner-container/range-input-inner-container.styles_1v61utg.css +2 -2
- package/cjs/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +2 -2
- package/cjs/shared/time-slot/time-slot.styles_18s0to7.css +2 -2
- package/cjs/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
- package/cjs/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +2 -2
- package/cjs/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -1
- package/cjs/sidenav/sidenav-group.styles_1x604sw.css +2 -2
- package/cjs/sidenav/sidenav-item.styles_lqw3kh.css +2 -2
- package/cjs/sidenav/sidenav.styles_1vxezie.css +2 -2
- package/cjs/singpass-button/singpass-button.styles_1miyex3.css +2 -2
- package/cjs/smart-app-banner/smart-app-banner.styles_15u6yv4.css +2 -2
- package/cjs/tab/tab-link-chain.styles_49got4.css +2 -2
- package/cjs/tab/tab.styles_1najffw.css +1 -1
- package/cjs/table/table.styles_1af5ipv.css +2 -2
- package/cjs/tag/tag.style_d98c53.css +2 -2
- package/cjs/text-list/text-list.styles_w3fvyt.css +2 -2
- package/cjs/theme/types.js +1 -1
- package/cjs/theme/types.js.map +1 -1
- package/cjs/theme/utils/use-design-token-override.js +2 -0
- package/cjs/theme/utils/use-design-token-override.js.map +1 -0
- package/cjs/time-range-picker/combobox-picker/combobox-picker.styles_7i9vso.css +1 -1
- package/cjs/time-range-picker/common.styles_1qwp4xa.css +2 -2
- package/cjs/time-slot-bar/time-slot-bar.styles_wigbyd.css +2 -2
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +2 -2
- package/cjs/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -1
- package/cjs/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +2 -2
- package/cjs/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -1
- package/cjs/timeline/timeline.styles_1jxzik4.css +2 -2
- package/cjs/timepicker/timepicker.styles_1jm33yw.css +1 -1
- package/cjs/timetable/timetable-header/timetable-header.styles_11gl1h4.css +2 -2
- package/cjs/timetable/timetable-row/row-bar.styles_1x0vrsz.css +1 -1
- package/cjs/timetable/timetable-row/row-cell.styles_y1dl5j.css +2 -2
- package/cjs/timetable/timetable.styles_7rp8kz.css +2 -2
- package/cjs/toast/toast.styles_1e0l60w.css +2 -2
- package/cjs/toggle/toggle-icon.styles_ba71y.css +2 -2
- package/cjs/toggle/toggle.styles_1t5qrye.css +2 -2
- package/cjs/typography/typography-text.styles_1734x2k.css +2 -2
- package/cjs/typography/typography.styles.js +1 -1
- package/cjs/typography/typography.styles.js.map +1 -1
- package/cjs/typography/{typography.styles_1155j4c.css → typography.styles_1wd82dn.css} +2 -2
- package/cjs/uneditable-section/section-item.styles_mwx8ht.css +2 -2
- package/cjs/uneditable-section/uneditable-section.js +1 -1
- package/cjs/uneditable-section/uneditable-section.js.map +1 -1
- package/cjs/uneditable-section/uneditable-section.styles_aj9zun.css +2 -2
- package/cjs/unit-number/unit-number-input.styles_8yizj.css +2 -2
- package/countdown-timer/countdown-timer.d.ts +6 -0
- package/countdown-timer/countdown-timer.js.map +1 -1
- package/countdown-timer/countdown-timer.styles_ipn1b0.css +2 -2
- package/countdown-timer/types.d.ts +55 -11
- package/dashed-border/dashed-border.d.ts +6 -0
- package/dashed-border/dashed-border.js.map +1 -1
- package/dashed-border/dashed-border.styles_zszoox.css +2 -2
- package/dashed-border/types.d.ts +27 -5
- package/data-table/data-table.d.ts +8 -0
- package/data-table/data-table.js.map +1 -1
- package/data-table/data-table.styles_1iqq1g7.css +2 -2
- package/data-table/types.d.ts +58 -12
- package/date-input/date-input.d.ts +5 -0
- package/date-input/date-input.js.map +1 -1
- package/date-input/date-input.styles_1r5kcc7.css +1 -1
- package/date-input/types.d.ts +32 -16
- package/date-navigator/date-navigator.d.ts +6 -0
- package/date-navigator/date-navigator.js.map +1 -1
- package/date-navigator/date-navigator.styles_wokh56.css +2 -2
- package/date-navigator/types.d.ts +44 -7
- package/date-range-input/date-range-input.d.ts +4 -0
- package/date-range-input/date-range-input.js.map +1 -1
- package/date-range-input/date-range-input.styles_1s7ojnj.css +2 -2
- package/date-range-input/types.d.ts +50 -14
- package/divider/divider.d.ts +6 -0
- package/divider/divider.js.map +1 -1
- package/divider/divider.styles_1xpzh8p.css +2 -2
- package/divider/types.d.ts +27 -4
- package/drawer/drawer.d.ts +7 -0
- package/drawer/drawer.js.map +1 -1
- package/drawer/drawer.styles_94hx3y.css +2 -2
- package/drawer/types.d.ts +16 -4
- package/e-signature/e-signature-canvas.js +1 -1
- package/e-signature/e-signature-canvas.js.map +1 -1
- package/e-signature/e-signature.d.ts +5 -0
- package/e-signature/e-signature.js.map +1 -1
- package/e-signature/e-signature.styles_lukd9f.css +2 -2
- package/e-signature/types.d.ts +23 -1
- package/error-display/error-display.d.ts +7 -0
- package/error-display/error-display.js.map +1 -1
- package/error-display/error-display.styles_d3tql1.css +2 -2
- package/error-display/types.d.ts +36 -6
- package/external/dompurify/dist/purify.es.js +2 -2
- package/external/dompurify/dist/purify.es.js.map +1 -1
- package/feedback-rating/feedback-rating-stars-container.styles_dmi8z9.css +2 -2
- package/feedback-rating/feedback-rating.d.ts +6 -0
- package/feedback-rating/feedback-rating.js.map +1 -1
- package/feedback-rating/feedback-rating.styles_1kdklb6.css +2 -2
- package/feedback-rating/types.d.ts +29 -0
- package/file-download/file-download.d.ts +6 -0
- package/file-download/file-download.js.map +1 -1
- package/file-download/file-download.styles_iggk8q.css +2 -2
- package/file-download/file-list-card/file-list-card.styles.js +1 -1
- package/file-download/file-list-card/file-list-card.styles.js.map +1 -1
- package/file-download/file-list-card/{file-list-card.styles_oom8ii.css → file-list-card.styles_18j2gut.css} +3 -3
- package/file-download/types.d.ts +44 -11
- package/file-upload/dropzone.styles_1pllsau.css +2 -2
- package/file-upload/file-item-edit.d.ts +4 -1
- package/file-upload/file-item-edit.js +1 -1
- package/file-upload/file-item-edit.js.map +1 -1
- package/file-upload/file-item-edit.styles.d.ts +1 -0
- package/file-upload/file-item-edit.styles.js +1 -1
- package/file-upload/file-item-edit.styles.js.map +1 -1
- package/file-upload/{file-item-edit.styles_1qbpbxj.css → file-item-edit.styles_19bvztn.css} +6 -5
- package/file-upload/file-list/file-list.d.ts +3 -0
- package/file-upload/file-list/file-list.js +1 -1
- package/file-upload/file-list/file-list.js.map +1 -1
- package/file-upload/file-list/file-list.styles.js +1 -1
- package/file-upload/file-list/file-list.styles.js.map +1 -1
- package/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
- package/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +2 -2
- package/file-upload/file-list-item/file-list-item.d.ts +3 -1
- package/file-upload/file-list-item/file-list-item.js +1 -1
- package/file-upload/file-list-item/file-list-item.js.map +1 -1
- package/file-upload/file-list-item/file-list-item.styles.d.ts +3 -0
- package/file-upload/file-list-item/file-list-item.styles.js +1 -1
- package/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
- package/file-upload/file-list-item/file-list-item.styles_o8000f.css +17 -0
- package/file-upload/file-upload.d.ts +2 -1
- package/file-upload/file-upload.js +1 -1
- package/file-upload/file-upload.js.map +1 -1
- package/file-upload/file-upload.styles_9ffwcd.css +2 -2
- package/file-upload/types.d.ts +125 -20
- package/filter/addons/filter-item-checkbox.styles_7degw7.css +2 -2
- package/filter/filter-item-page.styles_17ewfrz.css +1 -1
- package/filter/filter-item.js.map +1 -1
- package/filter/filter-item.styles_cphjnj.css +2 -2
- package/filter/filter-modal.styles_qw3xlg.css +2 -2
- package/filter/filter-sidebar.styles_1otwpjl.css +2 -2
- package/filter/filter.d.ts +21 -0
- package/filter/filter.js.map +1 -1
- package/filter/filter.styles_1ykijwm.css +2 -2
- package/filter/types.d.ts +161 -21
- package/footer/footer-download-app.styles_1v1j2us.css +2 -2
- package/footer/footer-resource-addon.styles_1jepb1d.css +2 -2
- package/footer/footer.d.ts +8 -1
- package/footer/footer.js +1 -1
- package/footer/footer.js.map +1 -1
- package/footer/footer.styles_1msorhc.css +2 -2
- package/footer/types.d.ts +55 -4
- package/form/form-label-addon.styles_b00z8p.css +1 -1
- package/form/form-label.styles.js +1 -1
- package/form/form-label.styles.js.map +1 -1
- package/form/{form-label.styles_11r0652.css → form-label.styles_1nbe0bm.css} +2 -2
- package/form/form-textarea.styles_3p9qoy.css +2 -2
- package/form/form-wrapper.styles_199rslu.css +1 -1
- package/fullscreen-image-carousel/fullscreen-image-carousel.styles_vc6y5c.css +2 -2
- package/fullscreen-image-carousel/stateful-image.styles_1xe8ypm.css +2 -2
- package/histogram-slider/histogram-slider.styles_wvd4w.css +2 -2
- package/image-button/image-button.styles_6n1qsr.css +2 -2
- package/index.d.ts +0 -1
- package/index.js +1 -1
- package/input/input.styles_1cblor0.css +2 -2
- package/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
- package/input-group/input-group.styles_bqye6f.css +2 -2
- package/input-range-select/input-range-select.styles_adbrbm.css +2 -2
- package/input-range-slider/input-range-slider.styles_aljl2v.css +2 -2
- package/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -1
- package/input-textarea/textarea.styles_22z4n3.css +2 -2
- package/language-switcher/dropdown-panel.styles_1qsjf8d.css +2 -2
- package/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -2
- package/language-switcher/link-container-variant.styles_1iw6zux.css +2 -2
- package/layout/col-div.styles_16o6mwx.css +1 -1
- package/layout/container.styles_v70ec6.css +2 -2
- package/layout/section.styles_hstcaf.css +1 -1
- package/link-list/link-list.styles_m57vks.css +2 -2
- package/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css +2 -2
- package/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
- package/markup/markup.style_1iu40x9.css +2 -2
- package/masked-input/masked-input.styles_1cm388a.css +2 -2
- package/masthead/masthead.styles_1huzon9.css +2 -2
- package/menu/menu-content.styles_p7ijll.css +2 -2
- package/menu/menu-item.styles_liyed8.css +2 -2
- package/menu/menu-link.styles_hfxoez.css +2 -2
- package/menu/menu-section.styles_g7my4d.css +2 -2
- package/modal/modal-box.styles_y52cts.css +2 -2
- package/modal/modal.styles_1lbblx6.css +2 -2
- package/modal-v2/modal-v2.styles_a8gv5i.css +2 -2
- package/modal-v2/slots/slot-styles_13sd376.css +2 -2
- package/navbar/brand.styles_zcgddp.css +1 -1
- package/navbar/drawer.js +1 -1
- package/navbar/drawer.js.map +1 -1
- package/navbar/drawer.styles_7hnxp5.css +2 -2
- package/navbar/menu.styles_gdpqc.css +2 -2
- package/navbar/navbar-action-buttons.styles_1vpm0nk.css +2 -2
- package/navbar/navbar-items.styles_1i3ltot.css +2 -2
- package/navbar/navbar.js +1 -1
- package/navbar/navbar.js.map +1 -1
- package/navbar/navbar.styles_koy0c7.css +2 -2
- package/notification-banner/notification-banner.styles_uxlysy.css +2 -2
- package/otp-input/otp-input.styles_5sbutl.css +2 -2
- package/otp-verification/contact-input-section.styles_odrjvt.css +2 -2
- package/otp-verification/otp-verification.styles_dg9bm8.css +1 -1
- package/otp-verification/thumbnail/thumbnail.styles_shqylh.css +2 -2
- package/otp-verification/verification-section.styles_x8jj.css +2 -2
- package/overlay/overlay.js +1 -1
- package/overlay/overlay.js.map +1 -1
- package/overlay/overlay.styles_12wym18.css +2 -2
- package/overlay/types.d.ts +0 -13
- package/package.json +1 -7
- package/pagination/pagination.styles_6bcgva.css +2 -2
- package/pill/pill.styles_xwrniu.css +2 -2
- package/popover/popover-inline/popover-inline.styles_bkopnt.css +2 -2
- package/popover/popover-trigger.styles_8zokig.css +1 -1
- package/popover/popover.styles_ujnf0h.css +2 -2
- package/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
- package/radio-button/radio-button.styles_1c4v6v.css +2 -2
- package/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +2 -2
- package/schedule/schedule-header/schedule-header.js +1 -1
- package/schedule/schedule-header/schedule-header.js.map +1 -1
- package/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +2 -2
- package/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +2 -2
- package/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +2 -2
- package/schedule/schedule.styles_fdy5a1.css +2 -2
- package/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -1
- package/schedule/time-indicator/time-indicator.styles_1eaxyes.css +2 -2
- package/select-histogram/select-histogram.styles_n260dy.css +2 -2
- package/shared/accessibility/index_13g9vp.css +1 -1
- package/shared/clickable-icon/clickable-icon.styles_1v2imml.css +2 -2
- package/shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css +2 -2
- package/shared/dropdown-list/dropdown-label.styles_mloii0.css +2 -2
- package/shared/dropdown-list/dropdown-list.styles_konwm.css +2 -2
- package/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css +2 -2
- package/shared/dropdown-list/expandable-element.styles_rkkvqr.css +2 -2
- package/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
- package/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +2 -2
- package/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
- package/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
- package/shared/input-wrapper/input-wrapper.styles_je6maw.css +2 -2
- package/shared/internal-calendar/calendar-dropdown.styles_wybjai.css +1 -1
- package/shared/internal-calendar/calendar-manager.js +1 -1
- package/shared/internal-calendar/calendar-manager.js.map +1 -1
- package/shared/internal-calendar/calendar-manager.styles.js +1 -1
- package/shared/internal-calendar/calendar-manager.styles.js.map +1 -1
- package/shared/internal-calendar/{calendar-manager.styles_1iuq5zw.css → calendar-manager.styles_1njwkj2.css} +3 -3
- package/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css +2 -2
- package/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css +2 -2
- package/shared/internal-calendar/internal-calendar-year.styles_therlc.css +2 -2
- package/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
- package/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +2 -2
- package/shared/progress-bar/progress-bar.styles_125ri7a.css +1 -1
- package/shared/range-input-inner-container/range-input-inner-container.styles_1v61utg.css +2 -2
- package/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +2 -2
- package/shared/time-slot/time-slot.styles_18s0to7.css +2 -2
- package/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
- package/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +2 -2
- package/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -1
- package/sidenav/sidenav-group.styles_1x604sw.css +2 -2
- package/sidenav/sidenav-item.styles_lqw3kh.css +2 -2
- package/sidenav/sidenav.styles_1vxezie.css +2 -2
- package/singpass-button/singpass-button.styles_1miyex3.css +2 -2
- package/smart-app-banner/smart-app-banner.styles_15u6yv4.css +2 -2
- package/tab/tab-link-chain.styles_49got4.css +2 -2
- package/tab/tab.styles_1najffw.css +1 -1
- package/table/table.styles_1af5ipv.css +2 -2
- package/tag/tag.style_d98c53.css +2 -2
- package/text-list/text-list.styles_w3fvyt.css +2 -2
- package/theme/styles/a11y-playground.css +3 -0
- package/theme/styles/bookingsg.css +7 -4
- package/theme/styles/careercompass.css +4 -1
- package/theme/styles/ccube.css +3 -0
- package/theme/styles/default.css +9 -5
- package/theme/styles/imda.css +3 -0
- package/theme/styles/lifesg.css +3 -0
- package/theme/styles/mylegacy.css +7 -4
- package/theme/styles/oneservice.css +52 -0
- package/theme/styles/pa.css +3 -0
- package/theme/styles/rbs.css +3 -0
- package/theme/styles/sgw-digital-lobby.css +5 -2
- package/theme/styles/smgs.css +3 -0
- package/theme/styles/spf.css +3 -0
- package/theme/styles/supportgowhere.css +3 -0
- package/theme/types.d.ts +1 -1
- package/theme/types.js +1 -1
- package/theme/types.js.map +1 -1
- package/theme/utils/index.d.ts +1 -0
- package/theme/utils/use-design-token-override.d.ts +11 -0
- package/theme/utils/use-design-token-override.js +2 -0
- package/theme/utils/use-design-token-override.js.map +1 -0
- package/time-range-picker/combobox-picker/combobox-picker.styles_7i9vso.css +1 -1
- package/time-range-picker/common.styles_1qwp4xa.css +2 -2
- package/time-slot-bar/time-slot-bar.styles_wigbyd.css +2 -2
- package/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +2 -2
- package/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -1
- package/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +2 -2
- package/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -1
- package/timeline/timeline.styles_1jxzik4.css +2 -2
- package/timepicker/timepicker.styles_1jm33yw.css +1 -1
- package/timetable/timetable-header/timetable-header.styles_11gl1h4.css +2 -2
- package/timetable/timetable-row/row-bar.styles_1x0vrsz.css +1 -1
- package/timetable/timetable-row/row-cell.styles_y1dl5j.css +2 -2
- package/timetable/timetable.styles_7rp8kz.css +2 -2
- package/toast/toast.styles_1e0l60w.css +2 -2
- package/toggle/toggle-icon.styles_ba71y.css +2 -2
- package/toggle/toggle.styles_1t5qrye.css +2 -2
- package/typography/typography-text.styles_1734x2k.css +2 -2
- package/typography/typography.styles.js +1 -1
- package/typography/typography.styles.js.map +1 -1
- package/typography/{typography.styles_1155j4c.css → typography.styles_1wd82dn.css} +2 -2
- package/uneditable-section/index.d.ts +1 -1
- package/uneditable-section/section-item.styles_mwx8ht.css +2 -2
- package/uneditable-section/uneditable-section.d.ts +2 -1
- package/uneditable-section/uneditable-section.js +1 -1
- package/uneditable-section/uneditable-section.js.map +1 -1
- package/uneditable-section/uneditable-section.styles_aj9zun.css +2 -2
- package/unit-number/unit-number-input.styles_8yizj.css +2 -2
- package/cjs/example/example.js +0 -2
- package/cjs/example/example.js.map +0 -1
- package/cjs/example/example_r47nvz.css +0 -1
- package/cjs/example/index.js +0 -2
- package/cjs/example/index.js.map +0 -1
- package/cjs/file-upload/file-list/file-list.styles_1ea12kj.css +0 -3
- package/cjs/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
- package/example/example.d.ts +0 -2
- package/example/example.js +0 -2
- package/example/example.js.map +0 -1
- package/example/example_r47nvz.css +0 -1
- package/example/index.d.ts +0 -1
- package/example/index.js +0 -2
- package/example/index.js.map +0 -1
- package/example/types.d.ts +0 -3
- package/file-upload/file-list/file-list.styles_1ea12kj.css +0 -3
- package/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
package/file-upload/types.d.ts
CHANGED
|
@@ -1,27 +1,55 @@
|
|
|
1
|
+
import type { FormLabelProps } from "../form/types";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a single file entry managed by `FileUpload`.
|
|
4
|
+
*/
|
|
1
5
|
export interface FileItemProps {
|
|
6
|
+
/** Unique identifier used to target delete, edit, and sort operations. */
|
|
2
7
|
id: string;
|
|
3
|
-
/** The name of the file */
|
|
8
|
+
/** The display name of the file */
|
|
4
9
|
name: string;
|
|
5
|
-
/** The MIME type of the file */
|
|
10
|
+
/** The MIME type of the file (e.g. `"application/pdf"`). */
|
|
6
11
|
type: string;
|
|
7
|
-
/** The size of the file in bytes */
|
|
12
|
+
/** The size of the file in bytes. Displayed as formatted text when provided. */
|
|
8
13
|
size: number;
|
|
9
14
|
/** The alt text or description of the file */
|
|
10
15
|
description?: string | undefined;
|
|
11
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Upload progress expressed as a fraction between 0 and 1.
|
|
18
|
+
* When provided, a progress indicator is rendered on the file item.
|
|
19
|
+
*/
|
|
12
20
|
progress?: number | undefined;
|
|
13
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Error message shown on the file item to indicate an upload failure.
|
|
23
|
+
* Accepts a plain string or a React node for richer error display.
|
|
24
|
+
*/
|
|
14
25
|
errorMessage?: string | React.ReactNode | undefined;
|
|
15
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* URL or data URL for a thumbnail image shown alongside the file entry.
|
|
28
|
+
* When not provided, a PDF icon is displayed for PDF files only;
|
|
29
|
+
* other file types show no default icon.
|
|
30
|
+
*/
|
|
16
31
|
thumbnailImageDataUrl?: string | undefined;
|
|
17
|
-
/**
|
|
32
|
+
/** Truncates long file names with an ellipsis when `true`. */
|
|
18
33
|
truncateText?: boolean | undefined;
|
|
19
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Visual style variant for `FileUpload`.
|
|
37
|
+
*
|
|
38
|
+
* - `"bordered"` — renders a visible border around the component.
|
|
39
|
+
* - `"no-border"` — renders the component without a border.
|
|
40
|
+
*/
|
|
20
41
|
export type FileUploadStyle = "bordered" | "no-border";
|
|
42
|
+
/**
|
|
43
|
+
* Native file-input props forwarded to the underlying `<input type="file">` element.
|
|
44
|
+
*/
|
|
21
45
|
export interface FileInputProps {
|
|
22
46
|
/** Defines the file types that is accepted */
|
|
23
47
|
accept?: string | undefined;
|
|
24
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* Specifies which camera to use for capture of image or video data
|
|
50
|
+
*
|
|
51
|
+
* @see https://www.w3.org/TR/html-media-capture/#the-capture-attribute
|
|
52
|
+
*/
|
|
25
53
|
capture?: boolean | "user" | "environment" | undefined;
|
|
26
54
|
/** Specifies if user is allowed to select more than one file. */
|
|
27
55
|
multiple?: boolean | undefined;
|
|
@@ -31,35 +59,112 @@ export interface FileInputProps {
|
|
|
31
59
|
"data-testid"?: string | undefined;
|
|
32
60
|
name?: string | undefined;
|
|
33
61
|
}
|
|
62
|
+
/** Props for the `FileUpload` component. */
|
|
34
63
|
export interface FileUploadProps extends FileInputProps {
|
|
35
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Heading rendered at the top of the component. Accepts a plain string or a JSX
|
|
66
|
+
* element for rich formatting.
|
|
67
|
+
*/
|
|
36
68
|
title?: string | JSX.Element | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Supporting text rendered below `title`. Accepts a plain string or a JSX
|
|
71
|
+
* element for rich formatting.
|
|
72
|
+
*/
|
|
37
73
|
description?: string | JSX.Element | undefined;
|
|
38
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Visual style variant for the component.
|
|
76
|
+
*
|
|
77
|
+
* @default "bordered"
|
|
78
|
+
*/
|
|
39
79
|
styleType?: FileUploadStyle | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Maximum number of files the component will accept.
|
|
82
|
+
* Once `fileItems.length` reaches this value, uploading is disabled until an item is removed.
|
|
83
|
+
*/
|
|
40
84
|
maxFiles?: number | undefined;
|
|
85
|
+
/**
|
|
86
|
+
* Warning message rendered inside the component. Accepts a plain string
|
|
87
|
+
* or a JSX element for rich formatting.
|
|
88
|
+
*/
|
|
41
89
|
warning?: string | JSX.Element | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Controlled list of file items displayed in the file list.
|
|
92
|
+
* Update this array in response to `onChange`, `onDelete`, `onEdit`, and
|
|
93
|
+
* `onSort` to reflect the current upload state.
|
|
94
|
+
*/
|
|
42
95
|
fileItems?: FileItemProps[] | undefined;
|
|
43
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* When `true`, image file items render an editable description field.
|
|
98
|
+
* Editing triggers `onEdit` with the updated `FileItemProps`.
|
|
99
|
+
*
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
44
102
|
editableFileItems?: boolean | undefined;
|
|
45
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Character limit for the description input on editable image file items.
|
|
105
|
+
* Only applies when `editableFileItems` is `true`.
|
|
106
|
+
*/
|
|
46
107
|
fileDescriptionMaxLength?: number | undefined;
|
|
47
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* When `false`, the save button on an editable file item is enabled even
|
|
110
|
+
* when the description field is empty.
|
|
111
|
+
*
|
|
112
|
+
* @default true
|
|
113
|
+
*/
|
|
114
|
+
descriptionRequired?: boolean | undefined;
|
|
115
|
+
/**
|
|
116
|
+
* Overrides the default label and subtext for the description input field
|
|
117
|
+
* on editable file items.
|
|
118
|
+
*/
|
|
119
|
+
descriptionLabel?: FormLabelProps | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* When `true`, file items can be reordered via drag-and-drop.
|
|
122
|
+
* The reordered list is emitted via `onSort`.
|
|
123
|
+
*
|
|
124
|
+
* @default false
|
|
125
|
+
*/
|
|
48
126
|
sortable?: boolean | undefined;
|
|
49
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* General error message rendered below the file list.
|
|
129
|
+
* Accepts a plain string or a JSX element for rich formatting.
|
|
130
|
+
*/
|
|
50
131
|
errorMessage?: string | JSX.Element | undefined;
|
|
51
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* When `true`, the upload button and drop zone are hidden and file items
|
|
134
|
+
* are rendered without delete or edit controls.
|
|
135
|
+
*/
|
|
52
136
|
readOnly?: boolean | undefined;
|
|
53
|
-
/**
|
|
137
|
+
/**
|
|
138
|
+
* Overrides default label text for elements within the component.
|
|
139
|
+
* Currently supports `uploadButtonLabel` to replace the "Upload files" button text.
|
|
140
|
+
*/
|
|
54
141
|
customLabels?: {
|
|
55
142
|
uploadButtonLabel?: string | undefined;
|
|
56
143
|
} | undefined;
|
|
57
|
-
/**
|
|
144
|
+
/**
|
|
145
|
+
* Called with the newly uploaded files.
|
|
146
|
+
* Receives only the files that fit within the remaining `maxFiles` slots.
|
|
147
|
+
*
|
|
148
|
+
* @param files Array of `File` objects added by the user.
|
|
149
|
+
*/
|
|
58
150
|
onChange?: ((files: File[]) => void) | undefined;
|
|
59
|
-
/**
|
|
151
|
+
/**
|
|
152
|
+
* Called when the user saves an edited description on a file item.
|
|
153
|
+
*
|
|
154
|
+
* @param fileItem The updated `FileItemProps` with the new description.
|
|
155
|
+
*/
|
|
60
156
|
onEdit?: ((fileItem: FileItemProps) => void) | undefined;
|
|
61
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Called when the user clicks the delete button on a file item.
|
|
159
|
+
*
|
|
160
|
+
* @param fileItem The item to be removed.
|
|
161
|
+
*/
|
|
62
162
|
onDelete?: ((fileItem: FileItemProps) => void) | undefined;
|
|
63
|
-
/**
|
|
163
|
+
/**
|
|
164
|
+
* Called after the user reorders file items via drag-and-drop.
|
|
165
|
+
* Only fired when `sortable` is `true`.
|
|
166
|
+
*
|
|
167
|
+
* @param fileItems The full reordered array of `FileItemProps`.
|
|
168
|
+
*/
|
|
64
169
|
onSort?: ((fileItems: FileItemProps[]) => void) | undefined;
|
|
65
170
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.f1m3a5f4{padding:0 0 var(--fds-spacing-16);}.f1m3a5f4 [data-id="content-container"]{position:relative;padding:var(--fds-spacing-8) var(--fds-spacing-8) 0;}:where(body.fds-breakpoint-lg-max) .f1m3a5f4 [data-id="content-container"]{padding:var(--fds-spacing-16) var(--fds-spacing-20) var(--fds-spacing-8);}.f1m3a5f4 [data-id="minimise-button"]{margin:var(--fds-spacing-8) var(--fds-spacing-20) 0;}
|
|
1
|
+
@layer fds{.f1m3a5f4{padding:0 0 var(--fds-spacing-16);}.f1m3a5f4 [data-id="content-container"]{position:relative;padding:var(--fds-spacing-8) var(--fds-spacing-8) 0;}:where(body.fds-breakpoint-lg-max) .f1m3a5f4 [data-id="content-container"]{padding:var(--fds-spacing-16) var(--fds-spacing-20) var(--fds-spacing-8);}.f1m3a5f4 [data-id="minimise-button"]{margin:var(--fds-spacing-8) var(--fds-spacing-20) 0;}
|
|
2
2
|
.g11488am{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}:where(body.fds-breakpoint-lg-max) .g11488am{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:0;}
|
|
3
3
|
:where(body.fds-breakpoint-lg-max) .g1nnu0tt{gap:var(--fds-spacing-16);}
|
|
4
4
|
.i4hhc1a{--fds-internal-filterItemCheckbox-item-level:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;position:relative;width:100%;min-height:1.5rem;padding:var(--fds-spacing-8) var(--fds-spacing-12);padding-left:calc(
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
.c13wglju{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-right:var(--fds-spacing-8);}
|
|
14
14
|
.twhh8xx{min-width:5rem;}
|
|
15
15
|
.tb2fwos{visibility:hidden;}
|
|
16
|
-
.sbvftpe{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0;margin:var(--fds-spacing-16) 0 var(--fds-spacing-8) var(--fds-spacing-12);}:where(body.fds-breakpoint-lg-max) .sbvftpe{margin:0 0 var(--fds-spacing-16) 0;}
|
|
16
|
+
.sbvftpe{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0;margin:var(--fds-spacing-16) 0 var(--fds-spacing-8) var(--fds-spacing-12);}:where(body.fds-breakpoint-lg-max) .sbvftpe{margin:0 0 var(--fds-spacing-16) 0;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.f94l7xt{background-color:var(--fds-colour-bg);height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
1
|
+
@layer fds{.f94l7xt{background-color:var(--fds-colour-bg);height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-item.js","sources":["../../src/filter/filter-item.tsx"],"sourcesContent":["import { ChevronDownIcon } from \"@lifesg/react-icons/chevron-down\";\nimport { animated, useSpring } from \"@react-spring/web\";\nimport clsx from \"clsx\";\nimport isNil from \"lodash/isNil\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { Button } from \"../button\";\nimport { PopoverAddon } from \"../form/form-label-addon\";\nimport { inertValue, VisuallyHidden } from \"../shared/accessibility\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { useApplyStyle } from \"../theme\";\nimport { useId } from \"../util\";\nimport { FilterContext } from \"./filter-context\";\nimport * as styles from \"./filter-item.styles\";\nimport type { FilterItemProps } from \"./types\";\n\nexport const FilterItem = ({\n collapsible: desktopCollapsible = true,\n initialExpanded = false,\n expanded: controlledExpanded,\n onExpandChange,\n minimisable = false,\n minimisedHeight,\n showDivider = true,\n showMobileDivider = true,\n title,\n addon,\n children,\n className,\n ...otherProps\n}: FilterItemProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const { mode, rootNode } = useContext(FilterContext);\n const isMobile = mode === \"mobile\";\n const [expanded, setExpanded] = useState(getInitialExpandState());\n const [contentMinimised, setContentMinimised] = useState(minimisable);\n const collapsible = !isMobile && desktopCollapsible;\n\n const itemResizeDetector = useResizeDetector();\n const contentResizeDetector = useResizeDetector();\n const itemAnimationStyles = useSpring({\n height: expanded ? itemResizeDetector.height : 0,\n });\n const contentHeight = contentMinimised\n ? minimisedHeight ??\n Math.min((contentResizeDetector.height ?? 0) * 0.5, 216)\n : contentResizeDetector.height;\n const internalId = useId();\n const contentId = `${internalId}-content`;\n const titleId = `${internalId}-title`;\n const minimisableContentRef = useRef<HTMLDivElement | null>(null);\n\n useApplyStyle(minimisableContentRef, {\n [styles.tokens.minimisableContent.height]: contentHeight\n ? `${contentHeight}px`\n : null,\n });\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setExpanded(getInitialExpandState());\n }, [desktopCollapsible, controlledExpanded]);\n\n useEffect(() => {\n setContentMinimised(minimisable);\n }, [minimisable]);\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleExpandCollapse = () => {\n const nextState = !expanded;\n\n if (isNil(controlledExpanded)) {\n setExpanded(nextState);\n }\n\n if (onExpandChange) {\n onExpandChange(nextState);\n }\n };\n\n const handleMinimise = () => {\n setContentMinimised(!contentMinimised);\n };\n\n // =============================================================================\n // HELPERS\n // =============================================================================\n function getInitialExpandState() {\n if (isMobile) {\n return true;\n }\n if (isNil(controlledExpanded)) {\n return !desktopCollapsible || initialExpanded;\n }\n return controlledExpanded;\n }\n\n // =============================================================================\n // RENDER\n // =============================================================================\n\n const renderAddon = () => {\n switch (addon?.type) {\n case \"popover\":\n return (\n <PopoverAddon\n addon={addon}\n rootNode={isMobile ? rootNode : undefined}\n />\n );\n default:\n return null;\n }\n };\n\n return (\n <div\n aria-labelledby={titleId}\n className={clsx(\n styles.filterItemWrapper,\n (collapsible || isMobile) && styles.filterItemWrapperDarker\n )}\n >\n <div\n className={clsx(\n styles.divider,\n (isMobile ? showMobileDivider : showDivider) &&\n styles.dividerVisible,\n isMobile && styles.dividerMobile\n )}\n />\n {(title || collapsible) && (\n <div\n className={clsx(\n styles.filterItemHeader,\n isMobile && styles.filterItemHeaderMobile\n )}\n >\n {title && (\n <h3\n id={titleId}\n data-testid=\"filter-item-title\"\n className={clsx(\n styles.filterItemTitle,\n isMobile && styles.filterItemTitleMobile\n )}\n >\n {title} {addon && renderAddon()}\n </h3>\n )}\n {collapsible && (\n <ClickableIcon\n className={styles.filterItemExpandButton}\n data-testid={\"expand-collapse-button\"}\n focusHighlight={false}\n focusOutline=\"browser\"\n onClick={handleExpandCollapse}\n aria-expanded={expanded}\n aria-disabled={!collapsible}\n aria-controls={contentId}\n >\n {title && <VisuallyHidden>{title}</VisuallyHidden>}\n <ChevronDownIcon\n aria-hidden\n className={clsx(\n styles.chevronIcon,\n expanded && styles.chevronIconExpanded\n )}\n />\n </ClickableIcon>\n )}\n </div>\n )}\n <animated.div\n className={styles.expandableItem}\n id={contentId}\n data-testid={\"expandable-container\"}\n data-expanded={expanded}\n style={itemAnimationStyles}\n inert={inertValue(!expanded)}\n >\n <div ref={itemResizeDetector.ref}>\n <div\n className={clsx(styles.filterItemBody, className)}\n {...otherProps}\n >\n <div\n ref={minimisableContentRef}\n data-testid=\"minimisable-container\"\n className={clsx(\n styles.minimisableContent,\n minimisable &&\n styles.minimisableContentMinimisable\n )}\n >\n <div ref={contentResizeDetector.ref}>\n <div data-id=\"content-container\">\n {typeof children === \"function\"\n ? children(mode, {\n minimised: contentMinimised,\n })\n : children}\n </div>\n </div>\n </div>\n {minimisable && (\n <Button\n className={styles.filterItemMinimiseButton}\n data-id=\"minimise-button\"\n sizeType=\"small\"\n styleType=\"link\"\n type=\"button\"\n onClick={handleMinimise}\n >\n <VisuallyHidden>{`view ${\n contentMinimised ? \"more\" : \"less\"\n } in ${title}`}</VisuallyHidden>\n <span aria-hidden>\n View {contentMinimised ? \"more\" : \"less\"}\n </span>\n </Button>\n )}\n </div>\n </div>\n </animated.div>\n </div>\n );\n};\n\nFilterItem.displayName = \"Filter.Item\";\n"],"names":["FilterItem","_a","collapsible","desktopCollapsible","initialExpanded","expanded","controlledExpanded","onExpandChange","minimisable","minimisedHeight","showDivider","showMobileDivider","title","addon","children","className","otherProps","__rest","mode","rootNode","useContext","FilterContext","isMobile","setExpanded","useState","getInitialExpandState","contentMinimised","setContentMinimised","itemResizeDetector","useResizeDetector","contentResizeDetector","itemAnimationStyles","useSpring","height","contentHeight","Math","min","_b","internalId","useId","contentId","titleId","minimisableContentRef","useRef","useApplyStyle","styles.tokens","minimisableContent","useEffect","isNil","_jsxs","clsx","styles.filterItemWrapper","styles.filterItemWrapperDarker","_jsx","styles.divider","styles.dividerVisible","styles.dividerMobile","styles.filterItemHeader","styles.filterItemHeaderMobile","id","styles.filterItemTitle","styles.filterItemTitleMobile","type","PopoverAddon","undefined","ClickableIcon","styles.filterItemExpandButton","focusHighlight","focusOutline","onClick","nextState","VisuallyHidden","ChevronDownIcon","styles.chevronIcon","styles.chevronIconExpanded","animated","div","styles.expandableItem","style","inert","inertValue","ref","Object","assign","styles.filterItemBody","styles.minimisableContent","styles.minimisableContentMinimisable","minimised","Button","styles.filterItemMinimiseButton","sizeType","styleType","displayName"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"filter-item.js","sources":["../../src/filter/filter-item.tsx"],"sourcesContent":["import { ChevronDownIcon } from \"@lifesg/react-icons/chevron-down\";\nimport { animated, useSpring } from \"@react-spring/web\";\nimport clsx from \"clsx\";\nimport isNil from \"lodash/isNil\";\nimport { useContext, useEffect, useRef, useState } from \"react\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { Button } from \"../button\";\nimport { PopoverAddon } from \"../form/form-label-addon\";\nimport { inertValue, VisuallyHidden } from \"../shared/accessibility\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { useApplyStyle } from \"../theme\";\nimport { useId } from \"../util\";\nimport { FilterContext } from \"./filter-context\";\nimport * as styles from \"./filter-item.styles\";\nimport type { FilterItemProps } from \"./types\";\n\nconst DEFAULT_MINIMISED_HEIGHT_CAP = 216;\n\nexport const FilterItem = ({\n collapsible: desktopCollapsible = true,\n initialExpanded = false,\n expanded: controlledExpanded,\n onExpandChange,\n minimisable = false,\n minimisedHeight,\n showDivider = true,\n showMobileDivider = true,\n title,\n addon,\n children,\n className,\n ...otherProps\n}: FilterItemProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const { mode, rootNode } = useContext(FilterContext);\n const isMobile = mode === \"mobile\";\n const [expanded, setExpanded] = useState(getInitialExpandState());\n const [contentMinimised, setContentMinimised] = useState(minimisable);\n const collapsible = !isMobile && desktopCollapsible;\n\n const itemResizeDetector = useResizeDetector();\n const contentResizeDetector = useResizeDetector();\n const itemAnimationStyles = useSpring({\n height: expanded ? itemResizeDetector.height : 0,\n });\n const contentHeight = contentMinimised\n ? minimisedHeight ??\n Math.min(\n (contentResizeDetector.height ?? 0) * 0.5,\n DEFAULT_MINIMISED_HEIGHT_CAP\n )\n : contentResizeDetector.height;\n const internalId = useId();\n const contentId = `${internalId}-content`;\n const titleId = `${internalId}-title`;\n const minimisableContentRef = useRef<HTMLDivElement | null>(null);\n\n useApplyStyle(minimisableContentRef, {\n [styles.tokens.minimisableContent.height]: contentHeight\n ? `${contentHeight}px`\n : null,\n });\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setExpanded(getInitialExpandState());\n }, [desktopCollapsible, controlledExpanded]);\n\n useEffect(() => {\n setContentMinimised(minimisable);\n }, [minimisable]);\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleExpandCollapse = () => {\n const nextState = !expanded;\n\n if (isNil(controlledExpanded)) {\n setExpanded(nextState);\n }\n\n if (onExpandChange) {\n onExpandChange(nextState);\n }\n };\n\n const handleMinimise = () => {\n setContentMinimised(!contentMinimised);\n };\n\n // =============================================================================\n // HELPERS\n // =============================================================================\n function getInitialExpandState() {\n if (isMobile) {\n return true;\n }\n if (isNil(controlledExpanded)) {\n return !desktopCollapsible || initialExpanded;\n }\n return controlledExpanded;\n }\n\n // =============================================================================\n // RENDER\n // =============================================================================\n\n const renderAddon = () => {\n switch (addon?.type) {\n case \"popover\":\n return (\n <PopoverAddon\n addon={addon}\n rootNode={isMobile ? rootNode : undefined}\n />\n );\n default:\n return null;\n }\n };\n\n return (\n <div\n aria-labelledby={titleId}\n className={clsx(\n styles.filterItemWrapper,\n (collapsible || isMobile) && styles.filterItemWrapperDarker\n )}\n >\n <div\n className={clsx(\n styles.divider,\n (isMobile ? showMobileDivider : showDivider) &&\n styles.dividerVisible,\n isMobile && styles.dividerMobile\n )}\n />\n {(title || collapsible) && (\n <div\n className={clsx(\n styles.filterItemHeader,\n isMobile && styles.filterItemHeaderMobile\n )}\n >\n {title && (\n <h3\n id={titleId}\n data-testid=\"filter-item-title\"\n className={clsx(\n styles.filterItemTitle,\n isMobile && styles.filterItemTitleMobile\n )}\n >\n {title} {addon && renderAddon()}\n </h3>\n )}\n {collapsible && (\n <ClickableIcon\n className={styles.filterItemExpandButton}\n data-testid={\"expand-collapse-button\"}\n focusHighlight={false}\n focusOutline=\"browser\"\n onClick={handleExpandCollapse}\n aria-expanded={expanded}\n aria-disabled={!collapsible}\n aria-controls={contentId}\n >\n {title && <VisuallyHidden>{title}</VisuallyHidden>}\n <ChevronDownIcon\n aria-hidden\n className={clsx(\n styles.chevronIcon,\n expanded && styles.chevronIconExpanded\n )}\n />\n </ClickableIcon>\n )}\n </div>\n )}\n <animated.div\n className={styles.expandableItem}\n id={contentId}\n data-testid={\"expandable-container\"}\n data-expanded={expanded}\n style={itemAnimationStyles}\n inert={inertValue(!expanded)}\n >\n <div ref={itemResizeDetector.ref}>\n <div\n className={clsx(styles.filterItemBody, className)}\n {...otherProps}\n >\n <div\n ref={minimisableContentRef}\n data-testid=\"minimisable-container\"\n className={clsx(\n styles.minimisableContent,\n minimisable &&\n styles.minimisableContentMinimisable\n )}\n >\n <div ref={contentResizeDetector.ref}>\n <div data-id=\"content-container\">\n {typeof children === \"function\"\n ? children(mode, {\n minimised: contentMinimised,\n })\n : children}\n </div>\n </div>\n </div>\n {minimisable && (\n <Button\n className={styles.filterItemMinimiseButton}\n data-id=\"minimise-button\"\n sizeType=\"small\"\n styleType=\"link\"\n type=\"button\"\n onClick={handleMinimise}\n >\n <VisuallyHidden>{`view ${\n contentMinimised ? \"more\" : \"less\"\n } in ${title}`}</VisuallyHidden>\n <span aria-hidden>\n View {contentMinimised ? \"more\" : \"less\"}\n </span>\n </Button>\n )}\n </div>\n </div>\n </animated.div>\n </div>\n );\n};\n\nFilterItem.displayName = \"Filter.Item\";\n"],"names":["FilterItem","_a","collapsible","desktopCollapsible","initialExpanded","expanded","controlledExpanded","onExpandChange","minimisable","minimisedHeight","showDivider","showMobileDivider","title","addon","children","className","otherProps","__rest","mode","rootNode","useContext","FilterContext","isMobile","setExpanded","useState","getInitialExpandState","contentMinimised","setContentMinimised","itemResizeDetector","useResizeDetector","contentResizeDetector","itemAnimationStyles","useSpring","height","contentHeight","Math","min","_b","internalId","useId","contentId","titleId","minimisableContentRef","useRef","useApplyStyle","styles.tokens","minimisableContent","useEffect","isNil","_jsxs","clsx","styles.filterItemWrapper","styles.filterItemWrapperDarker","_jsx","styles.divider","styles.dividerVisible","styles.dividerMobile","styles.filterItemHeader","styles.filterItemHeaderMobile","id","styles.filterItemTitle","styles.filterItemTitleMobile","type","PopoverAddon","undefined","ClickableIcon","styles.filterItemExpandButton","focusHighlight","focusOutline","onClick","nextState","VisuallyHidden","ChevronDownIcon","styles.chevronIcon","styles.chevronIconExpanded","animated","div","styles.expandableItem","style","inert","inertValue","ref","Object","assign","styles.filterItemBody","styles.minimisableContent","styles.minimisableContentMinimisable","minimised","Button","styles.filterItemMinimiseButton","sizeType","styleType","displayName"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.f1afprn0{background-color:var(--fds-colour-bg);}
|
|
1
|
+
@layer fds{.f1afprn0{background-color:var(--fds-colour-bg);}
|
|
2
2
|
.fo96iku{background-color:var(--fds-colour-bg-strong);}
|
|
3
3
|
.d136l108{display:none;height:1px;background-color:var(--fds-colour-border);}
|
|
4
4
|
.d89ue12{display:block;}
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
.fu0jz3r{padding:var(--fds-spacing-24) var(--fds-spacing-20);}
|
|
15
15
|
.m1n17l6q{--fds-internal-filter-minimisableContent-height:initial;height:var(--fds-internal-filter-minimisableContent-height);}
|
|
16
16
|
.my7z4fl{overflow:hidden;}
|
|
17
|
-
.fw516jj{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0;margin:var(--fds-spacing-16) 0 0 0;}
|
|
17
|
+
.fw516jj{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0;margin:var(--fds-spacing-16) 0 0 0;}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.m19agezm{background-color:var(--fds-colour-bg-strong);height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
1
|
+
@layer fds{.m19agezm{background-color:var(--fds-colour-bg-strong);height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
2
2
|
.m11wuwo8{background-color:var(--fds-colour-bg);height:100%;width:100%;}
|
|
3
3
|
.fidypou{height:100%;}
|
|
4
4
|
.f1ijv0o9{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--fds-colour-bg);}
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
.f14huz7l{font-family:var(--fds-font-family-heading);font-variant:var(--fds-font-variant);font-size:var(--fds-font-heading-size-xs);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-heading-lh-xs);letter-spacing:var(--fds-font-heading-ls-xs);color:var(--fds-colour-text);}
|
|
8
8
|
.fxpov9b{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--fds-spacing-8);}
|
|
9
9
|
.f14zog8f{background-color:transparent;height:100%;padding:var(--fds-spacing-24) var(--fds-spacing-20);}
|
|
10
|
-
.flrfycx{width:100%;}
|
|
10
|
+
.flrfycx{width:100%;}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.d1a2pl71{background-color:var(--fds-colour-bg);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-md);overflow:hidden;width:100%;}
|
|
1
|
+
@layer fds{.d1a2pl71{background-color:var(--fds-colour-bg);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-md);overflow:hidden;width:100%;}
|
|
2
2
|
.fq9unar{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--fds-colour-bg);color:var(--fds-colour-text);}
|
|
3
3
|
.fjfy2r5{-webkit-flex:1;-ms-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;gap:var(--fds-spacing-8);margin:var(--fds-spacing-24) 0 var(--fds-spacing-24) var(--fds-spacing-20);}
|
|
4
4
|
.f1i4s84l{font-family:var(--fds-font-family-heading);font-variant:var(--fds-font-variant);font-size:var(--fds-font-heading-size-xs);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-heading-lh-xs);letter-spacing:var(--fds-font-heading-ls-xs);}
|
|
5
|
-
.f122t6n9{background-color:transparent;padding-right:var(--fds-spacing-20);padding-left:var(--fds-spacing-20);height:100%;}
|
|
5
|
+
.f122t6n9{background-color:transparent;padding-right:var(--fds-spacing-20);padding-left:var(--fds-spacing-20);height:100%;}}
|
package/filter/filter.d.ts
CHANGED
|
@@ -1,22 +1,43 @@
|
|
|
1
1
|
import type { FilterProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A responsive filter panel that switches between a persistent sidebar on
|
|
4
|
+
* desktop and a modal overlay on mobile.
|
|
5
|
+
*
|
|
6
|
+
* Use `Filter` to let users narrow a result set by one or more criteria.
|
|
7
|
+
* On mobile (below lg breakpoint) the panel is hidden behind a toggle button and
|
|
8
|
+
* rendered in a full-screen modal; otherwise it is displayed as a
|
|
9
|
+
* fixed sidebar.
|
|
10
|
+
*
|
|
11
|
+
* Sub-components:
|
|
12
|
+
* - `Filter.Sidebar` — standalone desktop sidebar, used by `Filter` internally.
|
|
13
|
+
* - `Filter.Modal` — standalone mobile modal, used by `Filter` internally.
|
|
14
|
+
* - `Filter.Item` — a collapsible section within the panel.
|
|
15
|
+
* - `Filter.Page` — a drill-down sub-page inside the mobile modal.
|
|
16
|
+
* - `Filter.Checkbox` — a filter item with selectable checkbox or toggle options.
|
|
17
|
+
*/
|
|
2
18
|
export declare const Filter: {
|
|
3
19
|
({ children, className, style, onDismiss, onDone, onModalOpen, toggleFilterButtonStyle, insets, id, "data-testid": testId, ...props }: FilterProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
/** Standalone desktop sidebar variant of the filter panel. */
|
|
4
21
|
Sidebar: {
|
|
5
22
|
({ customLabels, onClear, clearButtonDisabled, count, children, headerTitle: _headerTitle, className, ...otherProps }: import("./types").FilterSidebarProps): import("react/jsx-runtime").JSX.Element;
|
|
6
23
|
displayName: string;
|
|
7
24
|
};
|
|
25
|
+
/** Standalone mobile modal variant of the filter panel. */
|
|
8
26
|
Modal: {
|
|
9
27
|
({ customLabels, onClear, onDone, onDismiss, onModalOpen, toggleFilterButtonStyle, clearButtonDisabled, insets, count, children, toggleFilterButtonLabel: _toggleFilterButtonLabel, headerTitle: _headerTitle, doneButtonLabel: _doneButtonLabel, className, ...otherProps }: import("./types").FilterModalProps): import("react/jsx-runtime").JSX.Element;
|
|
10
28
|
displayName: string;
|
|
11
29
|
};
|
|
30
|
+
/** A collapsible section within a filter panel. */
|
|
12
31
|
Item: {
|
|
13
32
|
({ collapsible: desktopCollapsible, initialExpanded, expanded: controlledExpanded, onExpandChange, minimisable, minimisedHeight, showDivider, showMobileDivider, title, addon, children, className, ...otherProps }: import("./types").FilterItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
33
|
displayName: string;
|
|
15
34
|
};
|
|
35
|
+
/** A full-screen sub-page overlay for drill-down selection in the mobile modal. */
|
|
16
36
|
Page: {
|
|
17
37
|
({ onDismiss, onDone, children, "data-testid": dataTestId, }: import("./types").FilterPageProps): import("react/jsx-runtime").JSX.Element;
|
|
18
38
|
displayName: string;
|
|
19
39
|
};
|
|
40
|
+
/** A filter item that renders selectable checkboxes (desktop) or toggle chips (mobile). */
|
|
20
41
|
Checkbox: {
|
|
21
42
|
<T = import("./types").FilterItemCheckboxOptionProps>({ selectedOptions, options, showAsCheckboxInMobile, minimisableOptions, onSelect, labelExtractor, valueExtractor, useToggleContentWidth, ...filterItemProps }: import("./types").FilterItemCheckboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
22
43
|
displayName: string;
|
package/filter/filter.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","sources":["../../src/filter/filter.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { useMaxWidthMediaQuery } from \"../theme\";\nimport { FilterItemCheckbox } from \"./addons/filter-item-checkbox\";\nimport { FilterItem } from \"./filter-item\";\nimport { FilterItemPage } from \"./filter-item-page\";\nimport { FilterModal } from \"./filter-modal\";\nimport { FilterSidebar } from \"./filter-sidebar\";\nimport type { FilterProps } from \"./types\";\n\nexport const Filter = ({\n children,\n className,\n style,\n onDismiss,\n onDone,\n onModalOpen,\n toggleFilterButtonStyle,\n insets,\n id,\n \"data-testid\": testId,\n ...props\n}: FilterProps) => {\n const isMobile = useMaxWidthMediaQuery(\"lg\");\n\n useEffect(() => {\n if (!isMobile) {\n onDismiss?.();\n }\n }, [isMobile]);\n\n return (\n <div className={className} style={style} id={id} data-testid={testId}>\n {isMobile ? (\n <FilterModal\n onDismiss={onDismiss}\n onDone={onDone}\n onModalOpen={onModalOpen}\n toggleFilterButtonStyle={toggleFilterButtonStyle}\n insets={insets}\n {...props}\n >\n {typeof children === \"function\"\n ? children(\"mobile\")\n : children}\n </FilterModal>\n ) : (\n <FilterSidebar {...props}>\n {typeof children === \"function\"\n ? children(\"default\")\n : children}\n </FilterSidebar>\n )}\n </div>\n );\n};\n\nFilter.Sidebar = FilterSidebar;\nFilter.Modal = FilterModal;\nFilter.Item = FilterItem;\nFilter.Page = FilterItemPage;\nFilter.Checkbox = FilterItemCheckbox;\n"],"names":["Filter","_a","children","className","style","onDismiss","onDone","onModalOpen","toggleFilterButtonStyle","insets","id","testId","props","__rest","isMobile","useMaxWidthMediaQuery","useEffect","_jsx","FilterModal","Object","assign","FilterSidebar","Sidebar","Modal","Item","FilterItem","Page","FilterItemPage","Checkbox","FilterItemCheckbox"],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter.js","sources":["../../src/filter/filter.tsx"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport { useMaxWidthMediaQuery } from \"../theme\";\nimport { FilterItemCheckbox } from \"./addons/filter-item-checkbox\";\nimport { FilterItem } from \"./filter-item\";\nimport { FilterItemPage } from \"./filter-item-page\";\nimport { FilterModal } from \"./filter-modal\";\nimport { FilterSidebar } from \"./filter-sidebar\";\nimport type { FilterProps } from \"./types\";\n\n/**\n * A responsive filter panel that switches between a persistent sidebar on\n * desktop and a modal overlay on mobile.\n *\n * Use `Filter` to let users narrow a result set by one or more criteria.\n * On mobile (below lg breakpoint) the panel is hidden behind a toggle button and\n * rendered in a full-screen modal; otherwise it is displayed as a\n * fixed sidebar.\n *\n * Sub-components:\n * - `Filter.Sidebar` — standalone desktop sidebar, used by `Filter` internally.\n * - `Filter.Modal` — standalone mobile modal, used by `Filter` internally.\n * - `Filter.Item` — a collapsible section within the panel.\n * - `Filter.Page` — a drill-down sub-page inside the mobile modal.\n * - `Filter.Checkbox` — a filter item with selectable checkbox or toggle options.\n */\nexport const Filter = ({\n children,\n className,\n style,\n onDismiss,\n onDone,\n onModalOpen,\n toggleFilterButtonStyle,\n insets,\n id,\n \"data-testid\": testId,\n ...props\n}: FilterProps) => {\n const isMobile = useMaxWidthMediaQuery(\"lg\");\n\n useEffect(() => {\n if (!isMobile) {\n onDismiss?.();\n }\n }, [isMobile]);\n\n return (\n <div className={className} style={style} id={id} data-testid={testId}>\n {isMobile ? (\n <FilterModal\n onDismiss={onDismiss}\n onDone={onDone}\n onModalOpen={onModalOpen}\n toggleFilterButtonStyle={toggleFilterButtonStyle}\n insets={insets}\n {...props}\n >\n {typeof children === \"function\"\n ? children(\"mobile\")\n : children}\n </FilterModal>\n ) : (\n <FilterSidebar {...props}>\n {typeof children === \"function\"\n ? children(\"default\")\n : children}\n </FilterSidebar>\n )}\n </div>\n );\n};\n\n/** Standalone desktop sidebar variant of the filter panel. */\nFilter.Sidebar = FilterSidebar;\n/** Standalone mobile modal variant of the filter panel. */\nFilter.Modal = FilterModal;\n/** A collapsible section within a filter panel. */\nFilter.Item = FilterItem;\n/** A full-screen sub-page overlay for drill-down selection in the mobile modal. */\nFilter.Page = FilterItemPage;\n/** A filter item that renders selectable checkboxes (desktop) or toggle chips (mobile). */\nFilter.Checkbox = FilterItemCheckbox;\n"],"names":["Filter","_a","children","className","style","onDismiss","onDone","onModalOpen","toggleFilterButtonStyle","insets","id","testId","props","__rest","isMobile","useMaxWidthMediaQuery","useEffect","_jsx","FilterModal","Object","assign","FilterSidebar","Sidebar","Modal","Item","FilterItem","Page","FilterItemPage","Checkbox","FilterItemCheckbox"],"mappings":"s2BA0BO,MAAMA,EAAUC,QAAAC,SACnBA,EAAQC,UACRA,EAASC,MACTA,EAAKC,UACLA,EAASC,OACTA,EAAMC,YACNA,EAAWC,wBACXA,EAAuBC,OACvBA,EAAMC,GACNA,EACA,cAAeC,GAAMV,EAClBW,EAAKC,EAAAZ,EAXW,CAAA,WAAA,YAAA,QAAA,YAAA,SAAA,cAAA,0BAAA,SAAA,KAAA,gBAanB,MAAMa,EAAWC,EAAsB,MAQvC,OANAC,GAAU,KACDF,GACDT,SAAAA,GACJ,GACD,CAACS,IAGAG,SAAKd,UAAWA,EAAWC,MAAOA,EAAOM,GAAIA,EAAE,cAAeC,EAAMT,SAC/DY,EACGG,EAACC,EAAWC,OAAAC,OAAA,CACRf,UAAWA,EACXC,OAAQA,EACRC,YAAaA,EACbC,wBAAyBA,EACzBC,OAAQA,GACJG,EAAK,CAAAV,SAEY,mBAAbA,EACFA,EAAS,UACTA,KAGVe,EAACI,mBAAkBT,EAAK,CAAAV,SACC,mBAAbA,EACFA,EAAS,WACTA,MAGZ,EAKdF,EAAOsB,QAAUD,EAEjBrB,EAAOuB,MAAQL,EAEflB,EAAOwB,KAAOC,EAEdzB,EAAO0B,KAAOC,EAEd3B,EAAO4B,SAAWC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.fh4ozpc{-webkit-flex:1;-ms-flex:1;flex:1;width:100%;overflow-y:auto;color:var(--fds-colour-text);}
|
|
1
|
+
@layer fds{.fh4ozpc{-webkit-flex:1;-ms-flex:1;flex:1;width:100%;overflow-y:auto;color:var(--fds-colour-text);}
|
|
2
2
|
.f3bn9l4{padding:var(--fds-spacing-24) var(--fds-spacing-20);margin-right:auto;color:var(--fds-colour-icon);}.f3bn9l4 svg{height:1.5rem;width:1.5rem;}.f3bn9l4:hover{color:var(--fds-colour-icon-hover);}
|
|
3
3
|
.fp6e1r1{padding:var(--fds-spacing-24) var(--fds-spacing-20);background-color:var(--fds-colour-bg);border-top:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);}
|
|
4
4
|
.f8nn92t{--fds-internal-filter-filterFooter-insetBottom:initial;padding-bottom:var(--fds-internal-filter-filterFooter-insetBottom);}
|
|
5
|
-
.f1iv2dy9{width:100%;}
|
|
5
|
+
.f1iv2dy9{width:100%;}}
|