@lifesg/react-design-system 4.0.0-alpha.3 → 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.js +1 -1
- package/accordion/accordion-item.styles.js.map +1 -1
- package/accordion/{accordion-item.styles_kchcad.css → accordion-item.styles_1j4eb32.css} +4 -4
- package/accordion/accordion.d.ts +19 -0
- package/accordion/accordion.js.map +1 -1
- package/accordion/accordion.styles.js +1 -1
- package/{cjs/accordion/accordion.styles_ijglff.css → accordion/accordion.styles_bzrfrs.css} +3 -3
- 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.js +1 -1
- package/alert/alert.styles.js.map +1 -1
- package/{cjs/alert/alert.styles_1ygel36.css → alert/alert.styles_patwo2.css} +6 -6
- 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 +1 -1
- package/badge/badge.js.map +1 -1
- package/badge/badge.styles.js +1 -1
- package/badge/badge.styles_1c3c6wj.css +16 -0
- package/badge/types.d.ts +21 -1
- package/box-container/box-container.d.ts +8 -0
- package/box-container/box-container.js.map +1 -1
- package/box-container/box-container.styles.js +1 -1
- package/box-container/box-container.styles.js.map +1 -1
- package/box-container/{box-container.styles_5y84d5.css → box-container.styles_5t2j9k.css} +4 -4
- package/box-container/types.d.ts +24 -0
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.js.map +1 -1
- package/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
- package/button/button.styles.js +1 -1
- package/button/button.styles.js.map +1 -1
- package/button/{button.styles_bcpkzm.css → button.styles_1pxy0co.css} +5 -5
- package/calendar/calendar.js +1 -1
- package/calendar/calendar.js.map +1 -1
- 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.js +1 -1
- package/cjs/accordion/accordion-item.styles.js.map +1 -1
- package/cjs/accordion/{accordion-item.styles_kchcad.css → accordion-item.styles_1j4eb32.css} +4 -4
- package/cjs/accordion/accordion.js.map +1 -1
- package/cjs/accordion/accordion.styles.js +1 -1
- package/{accordion/accordion.styles_ijglff.css → cjs/accordion/accordion.styles_bzrfrs.css} +3 -3
- package/cjs/alert/alert.js.map +1 -1
- package/cjs/alert/alert.styles.js +1 -1
- package/cjs/alert/alert.styles.js.map +1 -1
- package/{alert/alert.styles_1ygel36.css → cjs/alert/alert.styles_patwo2.css} +6 -6
- 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 +1 -1
- package/cjs/badge/badge.js.map +1 -1
- package/cjs/badge/badge.styles.js +1 -1
- package/cjs/badge/badge.styles_1c3c6wj.css +16 -0
- package/cjs/box-container/box-container.js.map +1 -1
- package/cjs/box-container/box-container.styles.js +1 -1
- package/cjs/box-container/box-container.styles.js.map +1 -1
- package/cjs/box-container/{box-container.styles_5y84d5.css → box-container.styles_5t2j9k.css} +4 -4
- package/cjs/breadcrumb/breadcrumb.js +1 -1
- package/cjs/breadcrumb/breadcrumb.js.map +1 -1
- package/cjs/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
- package/cjs/button/button.styles.js +1 -1
- package/cjs/button/button.styles.js.map +1 -1
- package/cjs/button/{button.styles_bcpkzm.css → button.styles_1pxy0co.css} +5 -5
- package/cjs/calendar/calendar.js +1 -1
- package/cjs/calendar/calendar.js.map +1 -1
- 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.js +1 -1
- package/cjs/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +3 -3
- package/cjs/dashed-border/dashed-border.js +1 -1
- 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 +1 -1
- package/cjs/data-table/data-table.js.map +1 -1
- package/cjs/data-table/data-table.styles.js +1 -1
- package/cjs/data-table/{data-table.styles_1nj2uzq.css → data-table.styles_1iqq1g7.css} +3 -3
- package/cjs/date-input/date-input.js +1 -1
- 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.js +1 -1
- package/cjs/date-navigator/date-navigator.styles.js.map +1 -1
- package/cjs/date-navigator/date-navigator.styles_wokh56.css +4 -0
- 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 +1 -1
- package/cjs/e-signature/e-signature.js.map +1 -1
- package/cjs/e-signature/e-signature.styles.js +1 -168
- package/cjs/e-signature/e-signature.styles.js.map +1 -1
- package/cjs/e-signature/e-signature.styles_lukd9f.css +17 -0
- package/cjs/error-display/error-display-data.js +1 -1
- package/cjs/error-display/error-display-data.js.map +1 -1
- 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/external/lodash/get.js +1 -1
- package/cjs/external/lodash/get.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 +1 -1
- package/cjs/file-download/file-download.js.map +1 -1
- package/cjs/file-download/file-download.styles.js +1 -32
- package/cjs/file-download/file-download.styles.js.map +1 -1
- package/cjs/file-download/file-download.styles_iggk8q.css +8 -0
- package/cjs/file-download/file-list-card/file-list-card.js +1 -1
- package/cjs/file-download/file-list-card/file-list-card.js.map +1 -1
- package/cjs/file-download/file-list-card/file-list-card.styles.js +1 -177
- 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_18j2gut.css +16 -0
- 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/{file-upload/file-item-edit.styles_1qbpbxj.css → cjs/file-upload/file-item-edit.styles_19bvztn.css} +6 -5
- package/cjs/file-upload/file-list/file-list.js +2 -0
- package/cjs/file-upload/file-list/file-list.js.map +1 -0
- package/cjs/file-upload/file-list/file-list.styles.js +2 -0
- package/cjs/file-upload/file-list/file-list.styles.js.map +1 -0
- 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.js +1 -1
- package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +4 -0
- 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.js +1 -1
- package/cjs/filter/addons/filter-item-checkbox.styles.js.map +1 -1
- package/{filter/addons/filter-item-checkbox.styles_18l87i2.css → cjs/filter/addons/filter-item-checkbox.styles_7degw7.css} +3 -3
- package/cjs/filter/filter-badge.js +2 -0
- package/cjs/filter/filter-badge.js.map +1 -0
- package/cjs/filter/filter-item-page.js +1 -1
- package/cjs/filter/filter-item-page.js.map +1 -1
- 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.js +1 -1
- package/cjs/filter/filter-item.styles.js.map +1 -1
- package/{filter/filter-item.styles_1e3v6qq.css → cjs/filter/filter-item.styles_cphjnj.css} +4 -4
- package/cjs/filter/filter-modal.js +1 -1
- package/cjs/filter/filter-modal.js.map +1 -1
- package/cjs/filter/filter-modal.styles.js +1 -1
- package/cjs/filter/filter-modal.styles.js.map +1 -1
- package/cjs/filter/filter-modal.styles_qw3xlg.css +10 -0
- package/cjs/filter/filter-sidebar.js +1 -1
- package/cjs/filter/filter-sidebar.js.map +1 -1
- package/cjs/filter/filter-sidebar.styles.js +1 -1
- package/cjs/filter/filter-sidebar.styles.js.map +1 -1
- package/cjs/filter/filter-sidebar.styles_1otwpjl.css +5 -0
- package/cjs/filter/filter.js.map +1 -1
- package/cjs/filter/filter.styles.js +1 -1
- package/cjs/filter/filter.styles.js.map +1 -1
- package/cjs/filter/{filter.styles_2fmaok.css → 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_1nbe0bm.css +6 -0
- package/cjs/form/form-textarea.styles_3p9qoy.css +2 -2
- package/cjs/form/form-wrapper.js +1 -1
- package/cjs/form/form-wrapper.js.map +1 -1
- package/cjs/form/form-wrapper.styles_199rslu.css +1 -1
- package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
- package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js.map +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.js +1 -1
- package/cjs/image-button/image-button.styles_6n1qsr.css +5 -0
- package/cjs/index.js +1 -1
- package/cjs/input/input.styles_1cblor0.css +2 -2
- package/cjs/input-group/input-group-list-addon.js +1 -1
- package/cjs/input-group/input-group-list-addon.js.map +1 -1
- package/cjs/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
- package/cjs/input-group/input-group.styles.js +1 -1
- package/cjs/input-group/input-group.styles_bqye6f.css +3 -0
- package/cjs/input-multi-select/input-multi-select.js +1 -1
- package/cjs/input-multi-select/input-multi-select.js.map +1 -1
- package/cjs/input-nested-multi-select/input-nested-multi-select.js +1 -1
- package/cjs/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
- package/cjs/input-nested-select/input-nested-select.js +1 -1
- package/cjs/input-nested-select/input-nested-select.js.map +1 -1
- package/cjs/input-range-select/input-range-select.js +1 -1
- package/cjs/input-range-select/input-range-select.js.map +1 -1
- 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-select/input-select.js +1 -1
- package/cjs/input-select/input-select.js.map +1 -1
- package/cjs/input-textarea/textarea-counter.styles.js +1 -1
- package/cjs/input-textarea/textarea-counter.styles.js.map +1 -1
- package/cjs/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -0
- package/cjs/input-textarea/textarea.styles.js +1 -1
- package/cjs/input-textarea/textarea.styles_22z4n3.css +5 -0
- package/cjs/language-switcher/dropdown-panel.styles.js +1 -1
- package/cjs/language-switcher/dropdown-panel.styles.js.map +1 -1
- package/cjs/language-switcher/dropdown-panel.styles_1qsjf8d.css +4 -0
- package/cjs/language-switcher/dropdown-variant.js +1 -1
- package/cjs/language-switcher/dropdown-variant.js.map +1 -1
- package/cjs/language-switcher/dropdown-variant.styles.js +1 -1
- package/cjs/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -0
- package/cjs/language-switcher/link-container-variant.styles.js +1 -1
- package/cjs/language-switcher/link-container-variant.styles_1iw6zux.css +5 -0
- package/cjs/layout/col-div.js +1 -1
- package/cjs/layout/col-div.js.map +1 -1
- 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.js +1 -1
- package/cjs/link-list/link-list.styles.js.map +1 -1
- package/{link-list/link-list.styles_1g33nb4.css → cjs/link-list/link-list.styles_m57vks.css} +4 -4
- package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
- package/{local-nav/local-nav-dropdown/local-nav-dropdown.styles_ftv36t.css → cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css} +3 -3
- package/cjs/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
- package/cjs/markup/markup.js +1 -1
- package/cjs/markup/markup.js.map +1 -1
- package/cjs/markup/markup.style.js +1 -1
- package/cjs/markup/markup.style.js.map +1 -1
- package/cjs/markup/markup.style_1iu40x9.css +2 -2
- package/cjs/masked-input/masked-input.styles.js +1 -1
- package/cjs/masked-input/masked-input.styles.js.map +1 -1
- package/{masked-input/masked-input.styles_4i1qsy.css → cjs/masked-input/masked-input.styles_1cm388a.css} +4 -4
- package/cjs/masthead/masthead.js +1 -1
- package/cjs/masthead/masthead.js.map +1 -1
- 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.js +1 -1
- package/cjs/modal/modal-box.styles.js.map +1 -1
- package/cjs/modal/modal-box.styles_y52cts.css +11 -0
- package/cjs/modal/modal.js +1 -1
- package/cjs/modal/modal.js.map +1 -1
- package/cjs/modal/modal.styles.js +1 -1
- package/cjs/modal/modal.styles.js.map +1 -1
- package/cjs/modal/modal.styles_1lbblx6.css +11 -0
- package/cjs/modal-v2/modal-v2.js +1 -1
- package/cjs/modal-v2/modal-v2.js.map +1 -1
- package/cjs/modal-v2/modal-v2.styles.js +1 -1
- package/cjs/modal-v2/modal-v2.styles.js.map +1 -1
- package/cjs/modal-v2/modal-v2.styles_a8gv5i.css +3 -0
- package/cjs/modal-v2/slots/card.js +1 -1
- package/cjs/modal-v2/slots/card.js.map +1 -1
- 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.js +1 -1
- package/cjs/navbar/navbar-items.styles.js.map +1 -1
- package/cjs/navbar/{navbar-items.styles_i9cunu.css → navbar-items.styles_1i3ltot.css} +8 -8
- 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.js +1 -1
- package/cjs/notification-banner/notification-banner.styles.js.map +1 -1
- package/{notification-banner/notification-banner.styles_130loac.css → cjs/notification-banner/notification-banner.styles_uxlysy.css} +4 -4
- package/cjs/otp-input/otp-input.styles_5sbutl.css +2 -2
- package/cjs/otp-verification/contact-input-section.js +1 -1
- package/cjs/otp-verification/contact-input-section.js.map +1 -1
- package/cjs/otp-verification/contact-input-section.styles.js +2 -0
- package/cjs/otp-verification/contact-input-section.styles.js.map +1 -0
- package/cjs/otp-verification/contact-input-section.styles_odrjvt.css +14 -0
- package/cjs/otp-verification/otp-verification.js +1 -1
- package/cjs/otp-verification/otp-verification.js.map +1 -1
- package/cjs/otp-verification/otp-verification.styles.js +2 -0
- package/cjs/otp-verification/otp-verification.styles.js.map +1 -0
- package/cjs/otp-verification/otp-verification.styles_dg9bm8.css +1 -0
- package/cjs/otp-verification/thumbnail/email-thumbnail.js +1 -21
- package/cjs/otp-verification/thumbnail/email-thumbnail.js.map +1 -1
- package/cjs/otp-verification/thumbnail/phone-thumbnail.js +1 -17
- package/cjs/otp-verification/thumbnail/phone-thumbnail.js.map +1 -1
- package/cjs/otp-verification/thumbnail/thumbnail.styles.js +2 -0
- package/cjs/otp-verification/thumbnail/thumbnail.styles.js.map +1 -0
- package/cjs/otp-verification/thumbnail/thumbnail.styles_shqylh.css +3 -0
- package/cjs/otp-verification/verification-section.js +1 -1
- package/cjs/otp-verification/verification-section.js.map +1 -1
- package/cjs/otp-verification/verification-section.styles.js +2 -0
- package/cjs/otp-verification/verification-section.styles.js.map +1 -0
- package/cjs/otp-verification/verification-section.styles_x8jj.css +5 -0
- 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.js +1 -1
- package/cjs/pagination/pagination.styles.js.map +1 -1
- package/{pagination/pagination.styles_1u898rb.css → cjs/pagination/pagination.styles_6bcgva.css} +5 -5
- package/cjs/pill/pill.styles.js +1 -1
- package/{pill/pill.styles_1wiyl8.css → 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/predictive-text-input/predictive-text-input.js +1 -1
- package/cjs/predictive-text-input/predictive-text-input.js.map +1 -1
- 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/const.js +1 -1
- package/cjs/schedule/const.js.map +1 -1
- package/cjs/schedule/schedule-day-view/schedule-day-view.js +1 -1
- package/cjs/schedule/schedule-day-view/schedule-day-view.js.map +1 -1
- package/cjs/schedule/schedule-day-view/schedule-day-view.styles.js +1 -152
- package/cjs/schedule/schedule-day-view/schedule-day-view.styles.js.map +1 -1
- package/cjs/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +30 -0
- 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.js +2 -0
- package/cjs/schedule/schedule-header/schedule-header.styles.js.map +1 -0
- package/cjs/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +6 -0
- package/cjs/schedule/schedule-slot-content/schedule-slot-content.js +2 -0
- package/cjs/schedule/schedule-slot-content/schedule-slot-content.js.map +1 -0
- package/cjs/schedule/schedule-slot-content/style-helper.js +2 -0
- package/cjs/schedule/schedule-slot-content/style-helper.js.map +1 -0
- package/cjs/schedule/schedule-week-view/schedule-week-view.js +1 -1
- package/cjs/schedule/schedule-week-view/schedule-week-view.js.map +1 -1
- package/cjs/schedule/schedule-week-view/schedule-week-view.styles.js +1 -74
- package/cjs/schedule/schedule-week-view/schedule-week-view.styles.js.map +1 -1
- package/cjs/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +10 -0
- package/cjs/schedule/schedule-week-view/time-cell.js +1 -1
- package/cjs/schedule/schedule-week-view/time-cell.js.map +1 -1
- package/cjs/schedule/schedule-week-view/time-cell.styles.js +1 -34
- package/cjs/schedule/schedule-week-view/time-cell.styles.js.map +1 -1
- package/cjs/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +14 -0
- package/cjs/schedule/schedule-week-view/week-view-utils.js +1 -1
- package/cjs/schedule/schedule-week-view/week-view-utils.js.map +1 -1
- package/cjs/schedule/schedule.js +1 -1
- package/cjs/schedule/schedule.js.map +1 -1
- package/cjs/schedule/schedule.styles.js +1 -26
- package/cjs/schedule/schedule.styles.js.map +1 -1
- package/cjs/schedule/schedule.styles_fdy5a1.css +5 -0
- package/cjs/schedule/shared/with-optional-popover.js +1 -5
- package/cjs/schedule/shared/with-optional-popover.js.map +1 -1
- package/cjs/schedule/shared/with-optional-popover.styles.js +2 -0
- package/cjs/schedule/shared/with-optional-popover.styles.js.map +1 -0
- package/cjs/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -0
- package/cjs/schedule/time-indicator/time-indicator.js +1 -1
- package/cjs/schedule/time-indicator/time-indicator.js.map +1 -1
- package/cjs/schedule/time-indicator/time-indicator.styles.js +1 -33
- package/cjs/schedule/time-indicator/time-indicator.styles.js.map +1 -1
- package/cjs/schedule/time-indicator/time-indicator.styles_1eaxyes.css +6 -0
- package/cjs/select-histogram/select-histogram.js +1 -1
- package/cjs/select-histogram/select-histogram.js.map +1 -1
- package/cjs/select-histogram/select-histogram.styles.js +1 -1
- package/cjs/select-histogram/select-histogram.styles.js.map +1 -1
- package/cjs/select-histogram/select-histogram.styles_n260dy.css +5 -0
- 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.js +1 -1
- package/cjs/shared/dropdown-list/dropdown-label.js.map +1 -1
- package/cjs/shared/dropdown-list/dropdown-label.styles.js +1 -1
- package/cjs/shared/dropdown-list/dropdown-label.styles.js.map +1 -1
- package/{shared/dropdown-list/dropdown-label.styles_1dwmd8f.css → cjs/shared/dropdown-list/dropdown-label.styles_mloii0.css} +6 -6
- package/cjs/shared/dropdown-list/dropdown-list.styles.js +1 -1
- package/cjs/shared/dropdown-list/dropdown-list.styles.js.map +1 -1
- package/{shared/dropdown-list/dropdown-list.styles_1kt4zhf.css → cjs/shared/dropdown-list/dropdown-list.styles_konwm.css} +5 -5
- package/cjs/shared/dropdown-list/dropdown-search.styles.js +1 -1
- package/cjs/shared/dropdown-list/dropdown-search.styles.js.map +1 -1
- package/{shared/dropdown-list/dropdown-search.styles_4r9oma.css → cjs/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css} +3 -3
- package/cjs/shared/dropdown-list/expandable-element.js +1 -1
- package/cjs/shared/dropdown-list/expandable-element.js.map +1 -1
- package/cjs/shared/dropdown-list/expandable-element.styles.js +1 -1
- package/cjs/shared/dropdown-list/expandable-element.styles.js.map +1 -1
- package/cjs/shared/dropdown-list/expandable-element.styles_rkkvqr.css +5 -0
- package/cjs/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
- package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles.js +1 -1
- package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles.js.map +1 -1
- package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +3 -0
- package/cjs/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
- package/cjs/shared/hooks/useViewport.js +1 -1
- package/cjs/shared/hooks/useViewport.js.map +1 -1
- package/cjs/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
- package/cjs/shared/input-wrapper/input-wrapper.styles.js +1 -1
- package/cjs/shared/input-wrapper/{input-wrapper.styles_19fpzb.css → input-wrapper.styles_je6maw.css} +4 -4
- 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_1q13ylk.css → calendar-manager.styles_1njwkj2.css} +4 -4
- package/cjs/shared/internal-calendar/day-cell/day-cell.styles.js +1 -1
- package/cjs/shared/internal-calendar/day-cell/day-cell.styles.js.map +1 -1
- package/{shared/internal-calendar/day-cell/day-cell.styles_vazxvn.css → cjs/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css} +3 -3
- package/cjs/shared/internal-calendar/internal-calendar-month.styles.js +1 -1
- package/{shared/internal-calendar/internal-calendar-month.styles_1pk3ynj.css → cjs/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css} +3 -3
- package/cjs/shared/internal-calendar/internal-calendar-year.styles.js +1 -1
- package/cjs/shared/internal-calendar/internal-calendar-year.styles.js.map +1 -1
- package/cjs/shared/internal-calendar/{internal-calendar-year.styles_1azy42u.css → internal-calendar-year.styles_therlc.css} +3 -3
- package/cjs/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
- package/cjs/shared/internal-calendar/single/single-cell.js +1 -1
- package/cjs/shared/internal-calendar/single/single-cell.js.map +1 -1
- package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles.js +1 -1
- package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +3 -0
- 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.js +1 -1
- package/cjs/shared/standalone-date-input/standalone-date-input.js.map +1 -1
- package/cjs/shared/standalone-date-input/standalone-date-input.styles.js +1 -1
- package/cjs/shared/standalone-date-input/standalone-date-input.styles.js.map +1 -1
- package/cjs/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +15 -0
- package/cjs/shared/time-slot/time-slot.js +1 -1
- package/cjs/shared/time-slot/time-slot.js.map +1 -1
- package/cjs/shared/time-slot/time-slot.styles.js +1 -1
- package/cjs/shared/time-slot/time-slot.styles.js.map +1 -1
- package/cjs/shared/time-slot/time-slot.styles_18s0to7.css +29 -0
- package/cjs/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
- package/cjs/sidenav/sidenav-drawer-item.styles.js +1 -1
- package/cjs/sidenav/sidenav-drawer-item.styles.js.map +1 -1
- package/cjs/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +6 -0
- package/cjs/sidenav/sidenav-drawer-subitem.styles.js +1 -1
- package/cjs/sidenav/sidenav-drawer-subitem.styles.js.map +1 -1
- package/cjs/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -0
- package/cjs/sidenav/sidenav-group.styles_1x604sw.css +2 -2
- package/cjs/sidenav/sidenav-item.styles.js +1 -1
- package/cjs/sidenav/sidenav-item.styles.js.map +1 -1
- package/cjs/sidenav/{sidenav-item.styles_1eew8px.css → sidenav-item.styles_lqw3kh.css} +4 -4
- 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.js +1 -1
- package/cjs/smart-app-banner/smart-app-banner.styles.js.map +1 -1
- package/cjs/smart-app-banner/{smart-app-banner.styles_m5dtgh.css → smart-app-banner.styles_15u6yv4.css} +4 -4
- package/cjs/tab/tab-link-chain.styles.js +1 -1
- package/cjs/tab/tab-link-chain.styles.js.map +1 -1
- package/cjs/tab/{tab-link-chain.styles_1nreqrp.css → tab-link-chain.styles_49got4.css} +4 -4
- package/cjs/tab/tab.styles_1najffw.css +1 -1
- package/cjs/table/table.styles_1af5ipv.css +2 -2
- package/cjs/tag/tag.style.js +1 -1
- package/cjs/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +3 -3
- package/cjs/text-list/text-list.styles.js +1 -1
- package/cjs/text-list/text-list.styles.js.map +1 -1
- package/cjs/text-list/text-list.styles_w3fvyt.css +16 -0
- package/cjs/theme/index.js +1 -1
- package/cjs/theme/theme-provider/hooks.js +1 -1
- package/cjs/theme/theme-provider/hooks.js.map +1 -1
- package/cjs/theme/tokens/colour.js +1 -1
- package/cjs/theme/tokens/colour.js.map +1 -1
- package/cjs/theme/tokens/font.js +1 -1
- package/cjs/theme/tokens/font.js.map +1 -1
- package/cjs/theme/types.js +1 -1
- package/cjs/theme/types.js.map +1 -1
- package/cjs/theme/utils/css-variable.js +1 -1
- package/cjs/theme/utils/css-variable.js.map +1 -1
- package/cjs/theme/utils/font.js +1 -1
- package/cjs/theme/utils/font.js.map +1 -1
- package/cjs/theme/utils/token-resolver.js +1 -1
- package/cjs/theme/utils/token-resolver.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/theme/utils/use-design-token.js +1 -1
- package/cjs/theme/utils/use-design-token.js.map +1 -1
- package/cjs/theme/utils/use-media-query.js +1 -1
- package/cjs/theme/utils/use-media-query.js.map +1 -1
- package/cjs/time-range-picker/combobox-picker/combobox-picker.js +1 -1
- package/cjs/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
- 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/consts.js +2 -0
- package/cjs/time-slot-bar-week/consts.js.map +1 -0
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.js +1 -1
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.js.map +1 -1
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles.js +2 -0
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles.js.map +1 -0
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +17 -0
- package/cjs/time-slot-bar-week/time-slot-bar-week.js +1 -1
- package/cjs/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
- package/cjs/time-slot-bar-week/time-slot-bar-week.styles.js +2 -0
- package/cjs/time-slot-bar-week/time-slot-bar-week.styles.js.map +1 -0
- package/cjs/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -0
- package/cjs/time-slot-bar-week/time-slot-cell.js +2 -0
- package/cjs/time-slot-bar-week/time-slot-cell.js.map +1 -0
- package/cjs/time-slot-week-view/time-slot-week-days.js +1 -1
- package/cjs/time-slot-week-view/time-slot-week-days.js.map +1 -1
- package/cjs/time-slot-week-view/time-slot-week-days.styles.js +2 -0
- package/cjs/time-slot-week-view/time-slot-week-days.styles.js.map +1 -0
- package/cjs/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +9 -0
- package/cjs/time-slot-week-view/time-slot-week-view.js +1 -1
- package/cjs/time-slot-week-view/time-slot-week-view.js.map +1 -1
- package/cjs/time-slot-week-view/time-slot-week-view.styles.js +1 -9
- package/cjs/time-slot-week-view/time-slot-week-view.styles.js.map +1 -1
- package/cjs/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -0
- package/cjs/timeline/timeline.styles.js +1 -1
- package/cjs/timeline/{timeline.styles_1wcnzot.css → timeline.styles_1jxzik4.css} +2 -2
- package/cjs/timepicker/timepicker.js +1 -1
- package/cjs/timepicker/timepicker.js.map +1 -1
- package/cjs/timepicker/timepicker.styles.js +1 -1
- package/cjs/timepicker/timepicker.styles.js.map +1 -1
- package/cjs/timepicker/timepicker.styles_1jm33yw.css +1 -0
- 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.js +1 -1
- package/cjs/toast/toast.styles.js.map +1 -1
- package/cjs/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +3 -3
- package/cjs/toggle/toggle-icon.styles_ba71y.css +2 -2
- package/cjs/toggle/toggle.styles.js +1 -1
- package/cjs/toggle/toggle.styles.js.map +1 -1
- package/{toggle/toggle.styles_1yzqsu.css → cjs/toggle/toggle.styles_1t5qrye.css} +7 -7
- package/cjs/typography/typography-text.styles_1734x2k.css +2 -2
- package/cjs/typography/typography.js +1 -1
- package/cjs/typography/typography.js.map +1 -1
- package/cjs/typography/typography.styles.js +1 -1
- package/cjs/typography/typography.styles.js.map +1 -1
- package/cjs/typography/typography.styles_1wd82dn.css +11 -0
- package/cjs/uneditable-section/section-item.styles.js +1 -1
- package/cjs/uneditable-section/section-item.styles.js.map +1 -1
- package/cjs/uneditable-section/section-item.styles_mwx8ht.css +9 -0
- 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/cjs/util/is-styled-components.js +2 -0
- package/cjs/util/is-styled-components.js.map +1 -0
- package/cjs/util/styling-helper.js +1 -1
- package/cjs/util/styling-helper.js.map +1 -1
- package/codemod-utils.d.ts +1 -0
- package/codemods/codemod-utils.ts +17 -0
- package/codemods/index.ts +231 -75
- package/codemods/migrate-popover/index.ts +267 -0
- package/codemods/run-codemod.js +6 -53
- package/codemods/run-codemod.js.map +1 -1
- package/codemods/run-codemod.ts +7 -54
- package/countdown-timer/countdown-timer.d.ts +6 -0
- package/countdown-timer/countdown-timer.js.map +1 -1
- package/countdown-timer/countdown-timer.styles.js +1 -1
- package/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +3 -3
- package/countdown-timer/types.d.ts +55 -11
- package/dashed-border/dashed-border.d.ts +6 -0
- package/dashed-border/dashed-border.js +1 -1
- 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 +1 -1
- package/data-table/data-table.js.map +1 -1
- package/data-table/data-table.styles.js +1 -1
- package/data-table/{data-table.styles_1nj2uzq.css → data-table.styles_1iqq1g7.css} +3 -3
- package/data-table/types.d.ts +58 -12
- package/date-input/date-input.d.ts +5 -0
- package/date-input/date-input.js +1 -1
- 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.js +1 -1
- package/date-navigator/date-navigator.styles.js.map +1 -1
- package/date-navigator/date-navigator.styles_wokh56.css +4 -0
- 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 +1 -1
- package/e-signature/e-signature.js.map +1 -1
- package/e-signature/e-signature.styles.d.ts +17 -45
- package/e-signature/e-signature.styles.js +1 -168
- package/e-signature/e-signature.styles.js.map +1 -1
- package/e-signature/e-signature.styles_lukd9f.css +17 -0
- package/e-signature/types.d.ts +23 -1
- package/error-display/error-display-data.js +1 -1
- package/error-display/error-display-data.js.map +1 -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/external/lodash/get.js +1 -1
- package/external/lodash/get.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 +1 -1
- package/file-download/file-download.js.map +1 -1
- package/file-download/file-download.styles.d.ts +8 -11
- package/file-download/file-download.styles.js +1 -32
- package/file-download/file-download.styles.js.map +1 -1
- package/file-download/file-download.styles_iggk8q.css +8 -0
- package/file-download/file-list-card/file-list-card.js +1 -1
- package/file-download/file-list-card/file-list-card.js.map +1 -1
- package/file-download/file-list-card/file-list-card.styles.d.ts +16 -64
- package/file-download/file-list-card/file-list-card.styles.js +1 -177
- package/file-download/file-list-card/file-list-card.styles.js.map +1 -1
- package/file-download/file-list-card/file-list-card.styles_18j2gut.css +16 -0
- 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/{cjs/file-upload/file-item-edit.styles_1qbpbxj.css → file-upload/file-item-edit.styles_19bvztn.css} +6 -5
- package/file-upload/{file-list.d.ts → file-list/file-list.d.ts} +4 -1
- package/file-upload/file-list/file-list.js +2 -0
- package/file-upload/file-list/file-list.js.map +1 -0
- package/file-upload/file-list/file-list.styles.js +2 -0
- package/file-upload/file-list/file-list.styles.js.map +1 -0
- package/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
- package/file-upload/file-list/index.d.ts +1 -0
- package/file-upload/file-list-item/file-list-item-thumbnail.styles.js +1 -1
- package/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +4 -0
- 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.js +1 -1
- package/filter/addons/filter-item-checkbox.styles.js.map +1 -1
- package/{cjs/filter/addons/filter-item-checkbox.styles_18l87i2.css → filter/addons/filter-item-checkbox.styles_7degw7.css} +3 -3
- package/filter/filter-badge.d.ts +5 -0
- package/filter/filter-badge.js +2 -0
- package/filter/filter-badge.js.map +1 -0
- package/filter/filter-item-page.d.ts +1 -1
- package/filter/filter-item-page.js +1 -1
- package/filter/filter-item-page.js.map +1 -1
- package/filter/filter-item-page.styles_17ewfrz.css +1 -1
- package/filter/filter-item.js.map +1 -1
- package/filter/filter-item.styles.js +1 -1
- package/filter/filter-item.styles.js.map +1 -1
- package/{cjs/filter/filter-item.styles_1e3v6qq.css → filter/filter-item.styles_cphjnj.css} +4 -4
- package/filter/filter-modal.d.ts +1 -1
- package/filter/filter-modal.js +1 -1
- package/filter/filter-modal.js.map +1 -1
- package/filter/filter-modal.styles.d.ts +2 -0
- package/filter/filter-modal.styles.js +1 -1
- package/filter/filter-modal.styles.js.map +1 -1
- package/filter/filter-modal.styles_qw3xlg.css +10 -0
- package/filter/filter-sidebar.d.ts +1 -1
- package/filter/filter-sidebar.js +1 -1
- package/filter/filter-sidebar.js.map +1 -1
- package/filter/filter-sidebar.styles.d.ts +1 -0
- package/filter/filter-sidebar.styles.js +1 -1
- package/filter/filter-sidebar.styles.js.map +1 -1
- package/filter/filter-sidebar.styles_1otwpjl.css +5 -0
- package/filter/filter.d.ts +24 -3
- package/filter/filter.js.map +1 -1
- package/filter/filter.styles.js +1 -1
- package/filter/filter.styles.js.map +1 -1
- package/filter/{filter.styles_2fmaok.css → filter.styles_1ykijwm.css} +2 -2
- package/filter/types.d.ts +163 -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_1nbe0bm.css +6 -0
- package/form/form-textarea.styles_3p9qoy.css +2 -2
- package/form/form-wrapper.js +1 -1
- package/form/form-wrapper.js.map +1 -1
- package/form/form-wrapper.styles_199rslu.css +1 -1
- package/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
- package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +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.js +1 -1
- package/image-button/image-button.styles_6n1qsr.css +5 -0
- package/index.d.ts +0 -2
- package/index.js +1 -1
- package/input/input.styles_1cblor0.css +2 -2
- package/input-group/input-group-list-addon.js +1 -1
- package/input-group/input-group-list-addon.js.map +1 -1
- package/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
- package/input-group/input-group.styles.js +1 -1
- package/input-group/input-group.styles_bqye6f.css +3 -0
- package/input-multi-select/input-multi-select.js +1 -1
- package/input-multi-select/input-multi-select.js.map +1 -1
- package/input-nested-multi-select/input-nested-multi-select.js +1 -1
- package/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
- package/input-nested-select/input-nested-select.js +1 -1
- package/input-nested-select/input-nested-select.js.map +1 -1
- package/input-range-select/input-range-select.js +1 -1
- package/input-range-select/input-range-select.js.map +1 -1
- 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-select/input-select.js +1 -1
- package/input-select/input-select.js.map +1 -1
- package/input-textarea/textarea-counter.styles.js +1 -1
- package/input-textarea/textarea-counter.styles.js.map +1 -1
- package/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -0
- package/input-textarea/textarea.styles.js +1 -1
- package/input-textarea/textarea.styles_22z4n3.css +5 -0
- package/language-switcher/dropdown-panel.styles.js +1 -1
- package/language-switcher/dropdown-panel.styles.js.map +1 -1
- package/language-switcher/dropdown-panel.styles_1qsjf8d.css +4 -0
- package/language-switcher/dropdown-variant.js +1 -1
- package/language-switcher/dropdown-variant.js.map +1 -1
- package/language-switcher/dropdown-variant.styles.js +1 -1
- package/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -0
- package/language-switcher/link-container-variant.styles.js +1 -1
- package/language-switcher/link-container-variant.styles_1iw6zux.css +5 -0
- package/layout/col-div.js +1 -1
- package/layout/col-div.js.map +1 -1
- 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/layout/types.d.ts +8 -11
- package/link-list/link-list.styles.js +1 -1
- package/link-list/link-list.styles.js.map +1 -1
- package/{cjs/link-list/link-list.styles_1g33nb4.css → link-list/link-list.styles_m57vks.css} +4 -4
- package/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
- package/{cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_ftv36t.css → local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css} +3 -3
- package/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
- package/markup/markup.js +1 -1
- package/markup/markup.js.map +1 -1
- package/markup/markup.style.js +1 -1
- package/markup/markup.style.js.map +1 -1
- package/markup/markup.style_1iu40x9.css +2 -2
- package/markup/types.d.ts +2 -1
- package/masked-input/masked-input.styles.js +1 -1
- package/masked-input/masked-input.styles.js.map +1 -1
- package/{cjs/masked-input/masked-input.styles_4i1qsy.css → masked-input/masked-input.styles_1cm388a.css} +4 -4
- package/masthead/masthead.js +1 -1
- package/masthead/masthead.js.map +1 -1
- 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.js +1 -1
- package/modal/modal-box.styles.js.map +1 -1
- package/modal/modal-box.styles_y52cts.css +11 -0
- package/modal/modal.js +1 -1
- package/modal/modal.js.map +1 -1
- package/modal/modal.styles.d.ts +4 -1
- package/modal/modal.styles.js +1 -1
- package/modal/modal.styles.js.map +1 -1
- package/modal/modal.styles_1lbblx6.css +11 -0
- package/modal-v2/modal-v2.js +1 -1
- package/modal-v2/modal-v2.js.map +1 -1
- package/modal-v2/modal-v2.styles.d.ts +0 -1
- package/modal-v2/modal-v2.styles.js +1 -1
- package/modal-v2/modal-v2.styles.js.map +1 -1
- package/modal-v2/modal-v2.styles_a8gv5i.css +3 -0
- package/modal-v2/slots/card.js +1 -1
- package/modal-v2/slots/card.js.map +1 -1
- 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.js +1 -1
- package/navbar/navbar-items.styles.js.map +1 -1
- package/navbar/{navbar-items.styles_i9cunu.css → navbar-items.styles_1i3ltot.css} +8 -8
- 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.js +1 -1
- package/notification-banner/notification-banner.styles.js.map +1 -1
- package/{cjs/notification-banner/notification-banner.styles_130loac.css → notification-banner/notification-banner.styles_uxlysy.css} +4 -4
- package/otp-input/otp-input.styles_5sbutl.css +2 -2
- package/otp-verification/contact-input-section.js +1 -1
- package/otp-verification/contact-input-section.js.map +1 -1
- package/otp-verification/contact-input-section.styles.d.ts +14 -0
- package/otp-verification/contact-input-section.styles.js +2 -0
- package/otp-verification/contact-input-section.styles.js.map +1 -0
- package/otp-verification/contact-input-section.styles_odrjvt.css +14 -0
- package/otp-verification/otp-verification.js +1 -1
- package/otp-verification/otp-verification.js.map +1 -1
- package/otp-verification/otp-verification.styles.d.ts +1 -0
- package/otp-verification/otp-verification.styles.js +2 -0
- package/otp-verification/otp-verification.styles.js.map +1 -0
- package/otp-verification/otp-verification.styles_dg9bm8.css +1 -0
- package/otp-verification/thumbnail/email-thumbnail.d.ts +1 -3
- package/otp-verification/thumbnail/email-thumbnail.js +1 -21
- package/otp-verification/thumbnail/email-thumbnail.js.map +1 -1
- package/otp-verification/thumbnail/phone-thumbnail.d.ts +1 -3
- package/otp-verification/thumbnail/phone-thumbnail.js +1 -17
- package/otp-verification/thumbnail/phone-thumbnail.js.map +1 -1
- package/otp-verification/thumbnail/thumbnail.styles.d.ts +3 -0
- package/otp-verification/thumbnail/thumbnail.styles.js +2 -0
- package/otp-verification/thumbnail/thumbnail.styles.js.map +1 -0
- package/otp-verification/thumbnail/thumbnail.styles_shqylh.css +3 -0
- package/otp-verification/verification-section.js +1 -1
- package/otp-verification/verification-section.js.map +1 -1
- package/otp-verification/verification-section.styles.d.ts +5 -0
- package/otp-verification/verification-section.styles.js +2 -0
- package/otp-verification/verification-section.styles.js.map +1 -0
- package/otp-verification/verification-section.styles_x8jj.css +5 -0
- 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 +14 -15
- package/pagination/pagination.styles.js +1 -1
- package/pagination/pagination.styles.js.map +1 -1
- package/{cjs/pagination/pagination.styles_1u898rb.css → pagination/pagination.styles_6bcgva.css} +5 -5
- package/pill/pill.styles.js +1 -1
- package/{cjs/pill/pill.styles_1wiyl8.css → 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/predictive-text-input/predictive-text-input.js +1 -1
- package/predictive-text-input/predictive-text-input.js.map +1 -1
- package/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
- package/radio-button/radio-button.styles_1c4v6v.css +2 -2
- package/schedule/const.js +1 -1
- package/schedule/const.js.map +1 -1
- package/schedule/schedule-day-view/schedule-day-view.js +1 -1
- package/schedule/schedule-day-view/schedule-day-view.js.map +1 -1
- package/schedule/schedule-day-view/schedule-day-view.styles.d.ts +39 -99
- package/schedule/schedule-day-view/schedule-day-view.styles.js +1 -152
- package/schedule/schedule-day-view/schedule-day-view.styles.js.map +1 -1
- package/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +30 -0
- package/schedule/schedule-day-view/types.d.ts +2 -10
- 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.d.ts +7 -0
- package/schedule/schedule-header/schedule-header.styles.js +2 -0
- package/schedule/schedule-header/schedule-header.styles.js.map +1 -0
- package/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +6 -0
- package/schedule/schedule-slot-content/index.d.ts +4 -0
- package/schedule/schedule-slot-content/schedule-slot-content.d.ts +21 -0
- package/schedule/schedule-slot-content/schedule-slot-content.js +2 -0
- package/schedule/schedule-slot-content/schedule-slot-content.js.map +1 -0
- package/schedule/schedule-slot-content/style-helper.d.ts +8 -0
- package/schedule/schedule-slot-content/style-helper.js +2 -0
- package/schedule/schedule-slot-content/style-helper.js.map +1 -0
- package/schedule/schedule-week-view/schedule-week-view.js +1 -1
- package/schedule/schedule-week-view/schedule-week-view.js.map +1 -1
- package/schedule/schedule-week-view/schedule-week-view.styles.d.ts +15 -32
- package/schedule/schedule-week-view/schedule-week-view.styles.js +1 -74
- package/schedule/schedule-week-view/schedule-week-view.styles.js.map +1 -1
- package/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +10 -0
- package/schedule/schedule-week-view/time-cell.js +1 -1
- package/schedule/schedule-week-view/time-cell.js.map +1 -1
- package/schedule/schedule-week-view/time-cell.styles.d.ts +23 -14
- package/schedule/schedule-week-view/time-cell.styles.js +1 -34
- package/schedule/schedule-week-view/time-cell.styles.js.map +1 -1
- package/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +14 -0
- package/schedule/schedule-week-view/types.d.ts +2 -15
- package/schedule/schedule-week-view/week-view-utils.js +1 -1
- package/schedule/schedule-week-view/week-view-utils.js.map +1 -1
- package/schedule/schedule.js +1 -1
- package/schedule/schedule.js.map +1 -1
- package/schedule/schedule.styles.d.ts +5 -8
- package/schedule/schedule.styles.js +1 -26
- package/schedule/schedule.styles.js.map +1 -1
- package/schedule/schedule.styles_fdy5a1.css +5 -0
- package/schedule/shared/with-optional-popover.d.ts +1 -1
- package/schedule/shared/with-optional-popover.js +1 -5
- package/schedule/shared/with-optional-popover.js.map +1 -1
- package/schedule/shared/with-optional-popover.styles.d.ts +1 -0
- package/schedule/shared/with-optional-popover.styles.js +2 -0
- package/schedule/shared/with-optional-popover.styles.js.map +1 -0
- package/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -0
- package/schedule/time-indicator/time-indicator.js +1 -1
- package/schedule/time-indicator/time-indicator.js.map +1 -1
- package/schedule/time-indicator/time-indicator.styles.d.ts +11 -28
- package/schedule/time-indicator/time-indicator.styles.js +1 -33
- package/schedule/time-indicator/time-indicator.styles.js.map +1 -1
- package/schedule/time-indicator/time-indicator.styles_1eaxyes.css +6 -0
- package/schedule/types.d.ts +10 -0
- package/select-histogram/select-histogram.js +1 -1
- package/select-histogram/select-histogram.js.map +1 -1
- package/select-histogram/select-histogram.styles.js +1 -1
- package/select-histogram/select-histogram.styles.js.map +1 -1
- package/select-histogram/select-histogram.styles_n260dy.css +5 -0
- 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.js +1 -1
- package/shared/dropdown-list/dropdown-label.js.map +1 -1
- package/shared/dropdown-list/dropdown-label.styles.js +1 -1
- package/shared/dropdown-list/dropdown-label.styles.js.map +1 -1
- package/{cjs/shared/dropdown-list/dropdown-label.styles_1dwmd8f.css → shared/dropdown-list/dropdown-label.styles_mloii0.css} +6 -6
- package/shared/dropdown-list/dropdown-list.styles.js +1 -1
- package/shared/dropdown-list/dropdown-list.styles.js.map +1 -1
- package/{cjs/shared/dropdown-list/dropdown-list.styles_1kt4zhf.css → shared/dropdown-list/dropdown-list.styles_konwm.css} +5 -5
- package/shared/dropdown-list/dropdown-search.styles.js +1 -1
- package/shared/dropdown-list/dropdown-search.styles.js.map +1 -1
- package/{cjs/shared/dropdown-list/dropdown-search.styles_4r9oma.css → shared/dropdown-list/dropdown-search.styles_1hc1gkh.css} +3 -3
- package/shared/dropdown-list/expandable-element.js +1 -1
- package/shared/dropdown-list/expandable-element.js.map +1 -1
- package/shared/dropdown-list/expandable-element.styles.d.ts +0 -1
- package/shared/dropdown-list/expandable-element.styles.js +1 -1
- package/shared/dropdown-list/expandable-element.styles.js.map +1 -1
- package/shared/dropdown-list/expandable-element.styles_rkkvqr.css +5 -0
- package/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
- package/shared/dropdown-wrapper/dropdown-wrapper.styles.js +1 -1
- package/shared/dropdown-wrapper/dropdown-wrapper.styles.js.map +1 -1
- package/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +3 -0
- package/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
- package/shared/hooks/useViewport.d.ts +7 -2
- package/shared/hooks/useViewport.js +1 -1
- package/shared/hooks/useViewport.js.map +1 -1
- package/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
- package/shared/input-wrapper/input-wrapper.styles.js +1 -1
- package/shared/input-wrapper/{input-wrapper.styles_19fpzb.css → input-wrapper.styles_je6maw.css} +4 -4
- 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_1q13ylk.css → calendar-manager.styles_1njwkj2.css} +4 -4
- package/shared/internal-calendar/day-cell/day-cell.styles.js +1 -1
- package/shared/internal-calendar/day-cell/day-cell.styles.js.map +1 -1
- package/{cjs/shared/internal-calendar/day-cell/day-cell.styles_vazxvn.css → shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css} +3 -3
- package/shared/internal-calendar/internal-calendar-month.styles.js +1 -1
- package/{cjs/shared/internal-calendar/internal-calendar-month.styles_1pk3ynj.css → shared/internal-calendar/internal-calendar-month.styles_14oh57f.css} +3 -3
- package/shared/internal-calendar/internal-calendar-year.styles.js +1 -1
- package/shared/internal-calendar/internal-calendar-year.styles.js.map +1 -1
- package/shared/internal-calendar/{internal-calendar-year.styles_1azy42u.css → internal-calendar-year.styles_therlc.css} +3 -3
- package/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
- package/shared/internal-calendar/single/single-cell.js +1 -1
- package/shared/internal-calendar/single/single-cell.js.map +1 -1
- package/shared/internal-calendar/standard/standard-calendar-day-view.styles.js +1 -1
- package/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +3 -0
- 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.js +1 -1
- package/shared/standalone-date-input/standalone-date-input.js.map +1 -1
- package/shared/standalone-date-input/standalone-date-input.styles.d.ts +2 -0
- package/shared/standalone-date-input/standalone-date-input.styles.js +1 -1
- package/shared/standalone-date-input/standalone-date-input.styles.js.map +1 -1
- package/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +15 -0
- package/shared/time-slot/time-slot.d.ts +1 -0
- package/shared/time-slot/time-slot.js +1 -1
- package/shared/time-slot/time-slot.js.map +1 -1
- package/shared/time-slot/time-slot.styles.d.ts +2 -0
- package/shared/time-slot/time-slot.styles.js +1 -1
- package/shared/time-slot/time-slot.styles.js.map +1 -1
- package/shared/time-slot/time-slot.styles_18s0to7.css +29 -0
- package/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
- package/sidenav/sidenav-drawer-item.styles.js +1 -1
- package/sidenav/sidenav-drawer-item.styles.js.map +1 -1
- package/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +6 -0
- package/sidenav/sidenav-drawer-subitem.styles.js +1 -1
- package/sidenav/sidenav-drawer-subitem.styles.js.map +1 -1
- package/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -0
- package/sidenav/sidenav-group.styles_1x604sw.css +2 -2
- package/sidenav/sidenav-item.styles.js +1 -1
- package/sidenav/sidenav-item.styles.js.map +1 -1
- package/sidenav/{sidenav-item.styles_1eew8px.css → sidenav-item.styles_lqw3kh.css} +4 -4
- 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.js +1 -1
- package/smart-app-banner/smart-app-banner.styles.js.map +1 -1
- package/smart-app-banner/{smart-app-banner.styles_m5dtgh.css → smart-app-banner.styles_15u6yv4.css} +4 -4
- package/tab/tab-link-chain.styles.js +1 -1
- package/tab/tab-link-chain.styles.js.map +1 -1
- package/tab/{tab-link-chain.styles_1nreqrp.css → tab-link-chain.styles_49got4.css} +4 -4
- package/tab/tab.styles_1najffw.css +1 -1
- package/table/table.styles_1af5ipv.css +2 -2
- package/tag/tag.style.js +1 -1
- package/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +3 -3
- package/text-list/text-list.styles.js +1 -1
- package/text-list/text-list.styles.js.map +1 -1
- package/text-list/text-list.styles_w3fvyt.css +16 -0
- package/theme/index.d.ts +4 -1
- package/theme/index.js +1 -1
- package/theme/styles/a11y-playground.css +33 -1
- package/theme/styles/bookingsg.css +37 -5
- package/theme/styles/careercompass.css +519 -0
- package/theme/styles/ccube.css +31 -0
- package/theme/styles/default.css +11 -6
- package/theme/styles/imda.css +33 -1
- package/theme/styles/lifesg.css +31 -0
- package/theme/styles/mylegacy.css +37 -5
- package/theme/styles/oneservice.css +80 -0
- package/theme/styles/pa.css +33 -1
- package/theme/styles/rbs.css +31 -0
- package/theme/styles/sgw-digital-lobby.css +37 -5
- package/theme/styles/smgs.css +519 -0
- package/theme/styles/spf.css +146 -114
- package/theme/styles/supportgowhere.css +33 -1
- package/theme/theme-provider/hooks.d.ts +2 -1
- package/theme/theme-provider/hooks.js +1 -1
- package/theme/theme-provider/hooks.js.map +1 -1
- package/theme/tokens/colour.d.ts +28 -0
- package/theme/tokens/colour.js +1 -1
- package/theme/tokens/colour.js.map +1 -1
- package/theme/tokens/font.d.ts +4 -2
- package/theme/tokens/font.js +1 -1
- package/theme/tokens/font.js.map +1 -1
- package/theme/types.d.ts +1 -1
- package/theme/types.js +1 -1
- package/theme/types.js.map +1 -1
- package/theme/utils/css-variable.d.ts +0 -5
- package/theme/utils/css-variable.js +1 -1
- package/theme/utils/css-variable.js.map +1 -1
- package/theme/utils/font.d.ts +2 -2
- package/theme/utils/font.js +1 -1
- package/theme/utils/font.js.map +1 -1
- package/theme/utils/index.d.ts +1 -0
- package/theme/utils/token-resolver.js +1 -1
- package/theme/utils/token-resolver.js.map +1 -1
- 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/theme/utils/use-design-token.js +1 -1
- package/theme/utils/use-design-token.js.map +1 -1
- package/theme/utils/use-media-query.d.ts +1 -2
- package/theme/utils/use-media-query.js +1 -1
- package/theme/utils/use-media-query.js.map +1 -1
- package/time-range-picker/combobox-picker/combobox-picker.js +1 -1
- package/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
- 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/consts.d.ts +3 -0
- package/time-slot-bar-week/consts.js +2 -0
- package/time-slot-bar-week/consts.js.map +1 -0
- package/time-slot-bar-week/time-slot-bar-week-days.js +1 -1
- package/time-slot-bar-week/time-slot-bar-week-days.js.map +1 -1
- package/time-slot-bar-week/time-slot-bar-week-days.styles.d.ts +25 -0
- package/time-slot-bar-week/time-slot-bar-week-days.styles.js +2 -0
- package/time-slot-bar-week/time-slot-bar-week-days.styles.js.map +1 -0
- package/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +17 -0
- package/time-slot-bar-week/time-slot-bar-week.js +1 -1
- package/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
- package/time-slot-bar-week/time-slot-bar-week.styles.d.ts +1 -0
- package/time-slot-bar-week/time-slot-bar-week.styles.js +2 -0
- package/time-slot-bar-week/time-slot-bar-week.styles.js.map +1 -0
- package/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -0
- package/time-slot-bar-week/time-slot-cell.d.ts +28 -0
- package/time-slot-bar-week/time-slot-cell.js +2 -0
- package/time-slot-bar-week/time-slot-cell.js.map +1 -0
- package/time-slot-week-view/time-slot-week-days.js +1 -1
- package/time-slot-week-view/time-slot-week-days.js.map +1 -1
- package/time-slot-week-view/time-slot-week-days.styles.d.ts +14 -0
- package/time-slot-week-view/time-slot-week-days.styles.js +2 -0
- package/time-slot-week-view/time-slot-week-days.styles.js.map +1 -0
- package/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +9 -0
- package/time-slot-week-view/time-slot-week-view.js +1 -1
- package/time-slot-week-view/time-slot-week-view.js.map +1 -1
- package/time-slot-week-view/time-slot-week-view.styles.d.ts +1 -1
- package/time-slot-week-view/time-slot-week-view.styles.js +1 -9
- package/time-slot-week-view/time-slot-week-view.styles.js.map +1 -1
- package/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -0
- package/timeline/timeline.styles.js +1 -1
- package/timeline/{timeline.styles_1wcnzot.css → timeline.styles_1jxzik4.css} +2 -2
- package/timepicker/timepicker.js +1 -1
- package/timepicker/timepicker.js.map +1 -1
- package/timepicker/timepicker.styles.js +1 -1
- package/timepicker/timepicker.styles.js.map +1 -1
- package/timepicker/timepicker.styles_1jm33yw.css +1 -0
- 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.js +1 -1
- package/toast/toast.styles.js.map +1 -1
- package/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +3 -3
- package/toggle/toggle-icon.styles_ba71y.css +2 -2
- package/toggle/toggle.styles.js +1 -1
- package/toggle/toggle.styles.js.map +1 -1
- package/{cjs/toggle/toggle.styles_1yzqsu.css → toggle/toggle.styles_1t5qrye.css} +7 -7
- package/typography/index.js +1 -1
- package/typography/typography-text.styles_1734x2k.css +2 -2
- package/typography/typography.js +1 -1
- package/typography/typography.js.map +1 -1
- package/typography/typography.styles.d.ts +2 -0
- package/typography/typography.styles.js +1 -1
- package/typography/typography.styles.js.map +1 -1
- package/typography/typography.styles_1wd82dn.css +11 -0
- package/uneditable-section/index.d.ts +1 -1
- package/uneditable-section/section-item.styles.js +1 -1
- package/uneditable-section/section-item.styles.js.map +1 -1
- package/uneditable-section/section-item.styles_mwx8ht.css +9 -0
- 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/util/is-styled-components.d.ts +5 -0
- package/util/is-styled-components.js +2 -0
- package/util/is-styled-components.js.map +1 -0
- package/util/styling-helper.js +1 -1
- package/util/styling-helper.js.map +1 -1
- package/badge/badge.styles_1yrxocm.css +0 -16
- package/cjs/badge/badge.styles_1yrxocm.css +0 -16
- package/cjs/date-navigator/date-navigator.styles_1cotsgz.css +0 -4
- 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-item/file-list-item-thumbnail.styles_1vrh1ve.css +0 -4
- package/cjs/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
- package/cjs/file-upload/file-list.js +0 -2
- package/cjs/file-upload/file-list.js.map +0 -1
- package/cjs/file-upload/file-list.styles.js +0 -2
- package/cjs/file-upload/file-list.styles.js.map +0 -1
- package/cjs/file-upload/file-list.styles_16vplxk.css +0 -3
- package/cjs/filter/filter-modal.styles_e0ev97.css +0 -8
- package/cjs/filter/filter-sidebar.styles_cwvqql.css +0 -4
- package/cjs/form/form-label.styles_rk98yd.css +0 -6
- package/cjs/image-button/image-button.styles_qtt605.css +0 -5
- package/cjs/input-group/input-group.styles_fpy81r.css +0 -3
- package/cjs/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
- package/cjs/input-textarea/textarea.styles_g0zgyq.css +0 -5
- package/cjs/language-switcher/dropdown-panel.styles_1z0n7qq.css +0 -4
- package/cjs/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
- package/cjs/language-switcher/link-container-variant.styles_1blx9qm.css +0 -5
- package/cjs/markup/markup.utils.js +0 -2
- package/cjs/markup/markup.utils.js.map +0 -1
- package/cjs/modal/modal-box.styles_1xrlxhd.css +0 -2
- package/cjs/modal/modal.styles_1sav73f.css +0 -11
- package/cjs/modal-v2/modal-v2.styles_1irpyi6.css +0 -3
- package/cjs/otp-verification/contact-input-section-styles.js +0 -115
- package/cjs/otp-verification/contact-input-section-styles.js.map +0 -1
- package/cjs/otp-verification/otp-verification-styles.js +0 -6
- package/cjs/otp-verification/otp-verification-styles.js.map +0 -1
- package/cjs/otp-verification/verification-section-styles.js +0 -27
- package/cjs/otp-verification/verification-section-styles.js.map +0 -1
- package/cjs/schedule/schedule-header/schedule-header.style.js +0 -38
- package/cjs/schedule/schedule-header/schedule-header.style.js.map +0 -1
- package/cjs/schedule/schedule-week-view/slot-content.js +0 -2
- package/cjs/schedule/schedule-week-view/slot-content.js.map +0 -1
- package/cjs/schedule/schedule-week-view/slot-content.styles.js +0 -40
- package/cjs/schedule/schedule-week-view/slot-content.styles.js.map +0 -1
- package/cjs/select-histogram/select-histogram.styles_11916eo.css +0 -5
- package/cjs/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
- package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.css +0 -3
- package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css +0 -3
- package/cjs/shared/standalone-date-input/standalone-date-input.styles_1m0da43.css +0 -13
- package/cjs/shared/styles/index.js +0 -2
- package/cjs/shared/styles/index.js.map +0 -1
- package/cjs/shared/time-slot/time-slot.styles_1r9na3f.css +0 -17
- package/cjs/sidenav/sidenav-drawer-item.styles_yp8cga.css +0 -6
- package/cjs/sidenav/sidenav-drawer-subitem.styles_1ylzfn5.css +0 -1
- package/cjs/text-list/text-list.styles_1gohl3f.css +0 -16
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.style.js +0 -104
- package/cjs/time-slot-bar-week/time-slot-bar-week-days.style.js.map +0 -1
- package/cjs/time-slot-bar-week/time-slot-bar-week.style.js +0 -10
- package/cjs/time-slot-bar-week/time-slot-bar-week.style.js.map +0 -1
- package/cjs/time-slot-week-view/time-slot-week-days.style.js +0 -59
- package/cjs/time-slot-week-view/time-slot-week-days.style.js.map +0 -1
- package/cjs/timepicker/timepicker.styles_zmkhl8.css +0 -1
- package/cjs/typography/typography.styles_1jqils.css +0 -9
- package/cjs/uneditable-section/section-item.styles_1dfjzc4.css +0 -9
- package/cjs/v3_theme/border/specs/default-border-set.js +0 -2
- package/cjs/v3_theme/border/specs/default-border-set.js.map +0 -1
- package/cjs/v3_theme/border/theme-helper.js +0 -2
- package/cjs/v3_theme/border/theme-helper.js.map +0 -1
- package/cjs/v3_theme/border-util/specs/default-border-util-set.js +0 -2
- package/cjs/v3_theme/border-util/specs/default-border-util-set.js.map +0 -1
- package/cjs/v3_theme/border-util/theme-helper.js +0 -2
- package/cjs/v3_theme/border-util/theme-helper.js.map +0 -1
- package/cjs/v3_theme/border-util/utils.js +0 -8
- package/cjs/v3_theme/border-util/utils.js.map +0 -1
- package/cjs/v3_theme/breakpoint/media-query-helper.js +0 -2
- package/cjs/v3_theme/breakpoint/media-query-helper.js.map +0 -1
- package/cjs/v3_theme/breakpoint/specs/default-breakpoint-set.js +0 -2
- package/cjs/v3_theme/breakpoint/specs/default-breakpoint-set.js.map +0 -1
- package/cjs/v3_theme/breakpoint/theme-helper.js +0 -2
- package/cjs/v3_theme/breakpoint/theme-helper.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/bookingsg-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/bookingsg-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/ccube-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/ccube-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/imda-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/imda-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/lifesg-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/lifesg-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/mylegacy-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/mylegacy-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/oneservice-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/oneservice-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/pa-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/pa-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/rbs-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/rbs-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/smgs-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/smgs-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/spf-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/spf-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js +0 -2
- package/cjs/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js.map +0 -1
- package/cjs/v3_theme/colour-primitive/theme-helper.js +0 -2
- package/cjs/v3_theme/colour-primitive/theme-helper.js.map +0 -1
- package/cjs/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js +0 -2
- package/cjs/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js.map +0 -1
- package/cjs/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js +0 -2
- package/cjs/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js.map +0 -1
- package/cjs/v3_theme/colour-semantic/specs/pa-semantic-tokens.js +0 -2
- package/cjs/v3_theme/colour-semantic/specs/pa-semantic-tokens.js.map +0 -1
- package/cjs/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js +0 -2
- package/cjs/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js.map +0 -1
- package/cjs/v3_theme/colour-semantic/theme-helper.js +0 -2
- package/cjs/v3_theme/colour-semantic/theme-helper.js.map +0 -1
- package/cjs/v3_theme/ds-theme-provider.js +0 -2
- package/cjs/v3_theme/ds-theme-provider.js.map +0 -1
- package/cjs/v3_theme/font/specs/a11yplayground-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/a11yplayground-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/bookingsg-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/bookingsg-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/default-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/default-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/imda-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/imda-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/oneservice-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/oneservice-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/pa-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/pa-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/smgs-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/smgs-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/spf-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/spf-font-set.js.map +0 -1
- package/cjs/v3_theme/font/specs/supportgowhere-font-set.js +0 -2
- package/cjs/v3_theme/font/specs/supportgowhere-font-set.js.map +0 -1
- package/cjs/v3_theme/font/theme-helper.js +0 -2
- package/cjs/v3_theme/font/theme-helper.js.map +0 -1
- package/cjs/v3_theme/font/utils.js +0 -10
- package/cjs/v3_theme/font/utils.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/bookingsg-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/bookingsg-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/default-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/default-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/imda-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/imda-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/mylegacy-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/mylegacy-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/oneservice-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/oneservice-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/pa-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/pa-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/smgs-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/smgs-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/spf-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/spf-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js +0 -2
- package/cjs/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js.map +0 -1
- package/cjs/v3_theme/font-spec/theme-helper.js +0 -2
- package/cjs/v3_theme/font-spec/theme-helper.js.map +0 -1
- package/cjs/v3_theme/helpers.js +0 -2
- package/cjs/v3_theme/helpers.js.map +0 -1
- package/cjs/v3_theme/index.js +0 -2
- package/cjs/v3_theme/index.js.map +0 -1
- package/cjs/v3_theme/motion/specs/default-motion-set.js +0 -2
- package/cjs/v3_theme/motion/specs/default-motion-set.js.map +0 -1
- package/cjs/v3_theme/motion/theme-helper.js +0 -2
- package/cjs/v3_theme/motion/theme-helper.js.map +0 -1
- package/cjs/v3_theme/radius/specs/default-radius-set.js +0 -2
- package/cjs/v3_theme/radius/specs/default-radius-set.js.map +0 -1
- package/cjs/v3_theme/radius/specs/spf-radius-set.js +0 -2
- package/cjs/v3_theme/radius/specs/spf-radius-set.js.map +0 -1
- package/cjs/v3_theme/radius/theme-helper.js +0 -2
- package/cjs/v3_theme/radius/theme-helper.js.map +0 -1
- package/cjs/v3_theme/shadow/specs/default-shadow-set.js +0 -2
- package/cjs/v3_theme/shadow/specs/default-shadow-set.js.map +0 -1
- package/cjs/v3_theme/shadow/theme-helper.js +0 -2
- package/cjs/v3_theme/shadow/theme-helper.js.map +0 -1
- package/cjs/v3_theme/spacing/specs/default-spacing-set.js +0 -2
- package/cjs/v3_theme/spacing/specs/default-spacing-set.js.map +0 -1
- package/cjs/v3_theme/spacing/theme-helper.js +0 -2
- package/cjs/v3_theme/spacing/theme-helper.js.map +0 -1
- package/cjs/v3_theme/use-theme-mode.js +0 -2
- package/cjs/v3_theme/use-theme-mode.js.map +0 -1
- package/codemods/common.ts +0 -8
- package/codemods/data.ts +0 -16
- package/codemods/deprecate-v2-tokens/data.ts +0 -283
- package/codemods/deprecate-v2-tokens/index.ts +0 -89
- package/codemods/migrate-colour/data.ts +0 -95
- package/codemods/migrate-colour/index.ts +0 -104
- package/codemods/migrate-layout/data.ts +0 -5
- package/codemods/migrate-layout/index.ts +0 -108
- package/codemods/migrate-media-query/data.ts +0 -20
- package/codemods/migrate-media-query/index.ts +0 -113
- package/codemods/migrate-text/data.ts +0 -48
- package/codemods/migrate-text/index.ts +0 -196
- package/codemods/migrate-text-list/data.ts +0 -16
- package/codemods/migrate-text-list/index.ts +0 -111
- package/common.d.ts +0 -8
- package/date-navigator/date-navigator.styles_1cotsgz.css +0 -4
- package/deprecate-v2-tokens/data.d.ts +0 -8
- 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-item/file-list-item-thumbnail.styles_1vrh1ve.css +0 -4
- package/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
- package/file-upload/file-list.js +0 -2
- package/file-upload/file-list.js.map +0 -1
- package/file-upload/file-list.styles.js +0 -2
- package/file-upload/file-list.styles.js.map +0 -1
- package/file-upload/file-list.styles_16vplxk.css +0 -3
- package/filter/filter-modal.styles_e0ev97.css +0 -8
- package/filter/filter-sidebar.styles_cwvqql.css +0 -4
- package/form/form-label.styles_rk98yd.css +0 -6
- package/image-button/image-button.styles_qtt605.css +0 -5
- package/input-group/input-group.styles_fpy81r.css +0 -3
- package/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
- package/input-textarea/textarea.styles_g0zgyq.css +0 -5
- package/language-switcher/dropdown-panel.styles_1z0n7qq.css +0 -4
- package/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
- package/language-switcher/link-container-variant.styles_1blx9qm.css +0 -5
- package/markup/markup.utils.d.ts +0 -2
- package/markup/markup.utils.js +0 -2
- package/markup/markup.utils.js.map +0 -1
- package/migrate-colour/data.d.ts +0 -270
- package/migrate-colour/index.d.ts +0 -7
- package/migrate-layout/data.d.ts +0 -5
- package/migrate-layout/index.d.ts +0 -2
- package/migrate-media-query/data.d.ts +0 -20
- package/migrate-media-query/index.d.ts +0 -2
- package/migrate-text/data.d.ts +0 -46
- package/migrate-text/index.d.ts +0 -2
- package/migrate-text-list/data.d.ts +0 -16
- package/migrate-text-list/index.d.ts +0 -2
- package/modal/modal-box.styles_1xrlxhd.css +0 -2
- package/modal/modal.styles_1sav73f.css +0 -11
- package/modal-v2/modal-v2.styles_1irpyi6.css +0 -3
- package/otp-verification/contact-input-section-styles.d.ts +0 -14
- package/otp-verification/contact-input-section-styles.js +0 -115
- package/otp-verification/contact-input-section-styles.js.map +0 -1
- package/otp-verification/otp-verification-styles.d.ts +0 -1
- package/otp-verification/otp-verification-styles.js +0 -6
- package/otp-verification/otp-verification-styles.js.map +0 -1
- package/otp-verification/verification-section-styles.d.ts +0 -23
- package/otp-verification/verification-section-styles.js +0 -27
- package/otp-verification/verification-section-styles.js.map +0 -1
- package/schedule/schedule-header/schedule-header.style.d.ts +0 -25
- package/schedule/schedule-header/schedule-header.style.js +0 -38
- package/schedule/schedule-header/schedule-header.style.js.map +0 -1
- package/schedule/schedule-week-view/slot-content.d.ts +0 -8
- package/schedule/schedule-week-view/slot-content.js +0 -2
- package/schedule/schedule-week-view/slot-content.js.map +0 -1
- package/schedule/schedule-week-view/slot-content.styles.d.ts +0 -27
- package/schedule/schedule-week-view/slot-content.styles.js +0 -40
- package/schedule/schedule-week-view/slot-content.styles.js.map +0 -1
- package/schedule/shared/index.d.ts +0 -2
- package/select-histogram/select-histogram.styles_11916eo.css +0 -5
- package/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
- package/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.css +0 -3
- package/shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css +0 -3
- package/shared/standalone-date-input/standalone-date-input.styles_1m0da43.css +0 -13
- package/shared/styles/index.js +0 -2
- package/shared/styles/index.js.map +0 -1
- package/shared/time-slot/time-slot.styles_1r9na3f.css +0 -17
- package/sidenav/sidenav-drawer-item.styles_yp8cga.css +0 -6
- package/sidenav/sidenav-drawer-subitem.styles_1ylzfn5.css +0 -1
- package/text-list/text-list.styles_1gohl3f.css +0 -16
- package/time-slot-bar-week/time-slot-bar-week-days.style.d.ts +0 -54
- package/time-slot-bar-week/time-slot-bar-week-days.style.js +0 -104
- package/time-slot-bar-week/time-slot-bar-week-days.style.js.map +0 -1
- package/time-slot-bar-week/time-slot-bar-week.style.d.ts +0 -1
- package/time-slot-bar-week/time-slot-bar-week.style.js +0 -10
- package/time-slot-bar-week/time-slot-bar-week.style.js.map +0 -1
- package/time-slot-week-view/time-slot-week-days.style.d.ts +0 -12
- package/time-slot-week-view/time-slot-week-days.style.js +0 -59
- package/time-slot-week-view/time-slot-week-days.style.js.map +0 -1
- package/timepicker/timepicker.styles_zmkhl8.css +0 -1
- package/typography/typography.styles_1jqils.css +0 -9
- package/uneditable-section/section-item.styles_1dfjzc4.css +0 -9
- package/v3_theme/border/specs/default-border-set.d.ts +0 -2
- package/v3_theme/border/specs/default-border-set.js +0 -2
- package/v3_theme/border/specs/default-border-set.js.map +0 -1
- package/v3_theme/border/theme-helper.d.ts +0 -10
- package/v3_theme/border/theme-helper.js +0 -2
- package/v3_theme/border/theme-helper.js.map +0 -1
- package/v3_theme/border/types.d.ts +0 -12
- package/v3_theme/border-util/specs/default-border-util-set.d.ts +0 -2
- package/v3_theme/border-util/specs/default-border-util-set.js +0 -2
- package/v3_theme/border-util/specs/default-border-util-set.js.map +0 -1
- package/v3_theme/border-util/theme-helper.d.ts +0 -8
- package/v3_theme/border-util/theme-helper.js +0 -2
- package/v3_theme/border-util/theme-helper.js.map +0 -1
- package/v3_theme/border-util/types.d.ts +0 -19
- package/v3_theme/border-util/utils.d.ts +0 -11
- package/v3_theme/border-util/utils.js +0 -8
- package/v3_theme/border-util/utils.js.map +0 -1
- package/v3_theme/breakpoint/media-query-helper.d.ts +0 -9
- package/v3_theme/breakpoint/media-query-helper.js +0 -2
- package/v3_theme/breakpoint/media-query-helper.js.map +0 -1
- package/v3_theme/breakpoint/specs/default-breakpoint-set.d.ts +0 -2
- package/v3_theme/breakpoint/specs/default-breakpoint-set.js +0 -2
- package/v3_theme/breakpoint/specs/default-breakpoint-set.js.map +0 -1
- package/v3_theme/breakpoint/theme-helper.d.ts +0 -39
- package/v3_theme/breakpoint/theme-helper.js +0 -2
- package/v3_theme/breakpoint/theme-helper.js.map +0 -1
- package/v3_theme/breakpoint/types.d.ts +0 -41
- package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/bookingsg-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/bookingsg-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/bookingsg-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/ccube-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/ccube-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/ccube-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/imda-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/imda-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/imda-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/lifesg-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/lifesg-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/lifesg-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/mylegacy-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/mylegacy-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/mylegacy-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/oneservice-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/oneservice-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/oneservice-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/pa-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/pa-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/pa-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/rbs-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/rbs-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/rbs-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/smgs-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/smgs-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/smgs-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/spf-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/spf-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/spf-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.d.ts +0 -2
- package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js +0 -2
- package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js.map +0 -1
- package/v3_theme/colour-primitive/theme-helper.d.ts +0 -10
- package/v3_theme/colour-primitive/theme-helper.js +0 -2
- package/v3_theme/colour-primitive/theme-helper.js.map +0 -1
- package/v3_theme/colour-primitive/types.d.ts +0 -98
- package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.d.ts +0 -3
- package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js +0 -2
- package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js.map +0 -1
- package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.d.ts +0 -3
- package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js +0 -2
- package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js.map +0 -1
- package/v3_theme/colour-semantic/specs/pa-semantic-tokens.d.ts +0 -2
- package/v3_theme/colour-semantic/specs/pa-semantic-tokens.js +0 -2
- package/v3_theme/colour-semantic/specs/pa-semantic-tokens.js.map +0 -1
- package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.d.ts +0 -3
- package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js +0 -2
- package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js.map +0 -1
- package/v3_theme/colour-semantic/theme-helper.d.ts +0 -10
- package/v3_theme/colour-semantic/theme-helper.js +0 -2
- package/v3_theme/colour-semantic/theme-helper.js.map +0 -1
- package/v3_theme/colour-semantic/types.d.ts +0 -123
- package/v3_theme/components/specs/a11yplayground-component-token-set.d.ts +0 -2
- package/v3_theme/components/specs/default-component-token-set.d.ts +0 -2
- package/v3_theme/components/specs/lifesg-component-token-set.d.ts +0 -2
- package/v3_theme/components/specs/pa-component-token-set.d.ts +0 -2
- package/v3_theme/components/specs/smgs-component-token-set.d.ts +0 -2
- package/v3_theme/components/specs/spf-component-token-set.d.ts +0 -2
- package/v3_theme/components/theme-helper.d.ts +0 -17
- package/v3_theme/components/types.d.ts +0 -44
- package/v3_theme/ds-theme-provider.d.ts +0 -2
- package/v3_theme/ds-theme-provider.js +0 -2
- package/v3_theme/ds-theme-provider.js.map +0 -1
- package/v3_theme/font/specs/a11yplayground-font-set.d.ts +0 -2
- package/v3_theme/font/specs/a11yplayground-font-set.js +0 -2
- package/v3_theme/font/specs/a11yplayground-font-set.js.map +0 -1
- package/v3_theme/font/specs/bookingsg-font-set.d.ts +0 -2
- package/v3_theme/font/specs/bookingsg-font-set.js +0 -2
- package/v3_theme/font/specs/bookingsg-font-set.js.map +0 -1
- package/v3_theme/font/specs/default-font-set.d.ts +0 -2
- package/v3_theme/font/specs/default-font-set.js +0 -2
- package/v3_theme/font/specs/default-font-set.js.map +0 -1
- package/v3_theme/font/specs/imda-font-set.d.ts +0 -2
- package/v3_theme/font/specs/imda-font-set.js +0 -2
- package/v3_theme/font/specs/imda-font-set.js.map +0 -1
- package/v3_theme/font/specs/oneservice-font-set.d.ts +0 -2
- package/v3_theme/font/specs/oneservice-font-set.js +0 -2
- package/v3_theme/font/specs/oneservice-font-set.js.map +0 -1
- package/v3_theme/font/specs/pa-font-set.d.ts +0 -2
- package/v3_theme/font/specs/pa-font-set.js +0 -2
- package/v3_theme/font/specs/pa-font-set.js.map +0 -1
- package/v3_theme/font/specs/smgs-font-set.d.ts +0 -2
- package/v3_theme/font/specs/smgs-font-set.js +0 -2
- package/v3_theme/font/specs/smgs-font-set.js.map +0 -1
- package/v3_theme/font/specs/spf-font-set.d.ts +0 -2
- package/v3_theme/font/specs/spf-font-set.js +0 -2
- package/v3_theme/font/specs/spf-font-set.js.map +0 -1
- package/v3_theme/font/specs/supportgowhere-font-set.d.ts +0 -2
- package/v3_theme/font/specs/supportgowhere-font-set.js +0 -2
- package/v3_theme/font/specs/supportgowhere-font-set.js.map +0 -1
- package/v3_theme/font/theme-helper.d.ts +0 -7
- package/v3_theme/font/theme-helper.js +0 -2
- package/v3_theme/font/theme-helper.js.map +0 -1
- package/v3_theme/font/types.d.ts +0 -54
- package/v3_theme/font/utils.d.ts +0 -4
- package/v3_theme/font/utils.js +0 -10
- package/v3_theme/font/utils.js.map +0 -1
- package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/bookingsg-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/bookingsg-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/bookingsg-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/default-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/default-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/default-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/imda-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/imda-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/imda-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/mylegacy-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/mylegacy-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/mylegacy-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/oneservice-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/oneservice-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/oneservice-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/pa-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/pa-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/pa-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/smgs-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/smgs-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/smgs-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/spf-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/spf-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/spf-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.d.ts +0 -2
- package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js +0 -2
- package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js.map +0 -1
- package/v3_theme/font-spec/theme-helper.d.ts +0 -6
- package/v3_theme/font-spec/theme-helper.js +0 -2
- package/v3_theme/font-spec/theme-helper.js.map +0 -1
- package/v3_theme/font-spec/types.d.ts +0 -53
- package/v3_theme/helpers.d.ts +0 -7
- package/v3_theme/helpers.js +0 -2
- package/v3_theme/helpers.js.map +0 -1
- package/v3_theme/index.d.ts +0 -696
- package/v3_theme/index.js +0 -2
- package/v3_theme/index.js.map +0 -1
- package/v3_theme/internal-types.d.ts +0 -4
- package/v3_theme/motion/specs/default-motion-set.d.ts +0 -2
- package/v3_theme/motion/specs/default-motion-set.js +0 -2
- package/v3_theme/motion/specs/default-motion-set.js.map +0 -1
- package/v3_theme/motion/theme-helper.d.ts +0 -6
- package/v3_theme/motion/theme-helper.js +0 -2
- package/v3_theme/motion/theme-helper.js.map +0 -1
- package/v3_theme/motion/types.d.ts +0 -17
- package/v3_theme/radius/specs/default-radius-set.d.ts +0 -2
- package/v3_theme/radius/specs/default-radius-set.js +0 -2
- package/v3_theme/radius/specs/default-radius-set.js.map +0 -1
- package/v3_theme/radius/specs/spf-radius-set.d.ts +0 -2
- package/v3_theme/radius/specs/spf-radius-set.js +0 -2
- package/v3_theme/radius/specs/spf-radius-set.js.map +0 -1
- package/v3_theme/radius/theme-helper.d.ts +0 -6
- package/v3_theme/radius/theme-helper.js +0 -2
- package/v3_theme/radius/theme-helper.js.map +0 -1
- package/v3_theme/radius/types.d.ts +0 -13
- package/v3_theme/shadow/specs/default-shadow-set.d.ts +0 -2
- package/v3_theme/shadow/specs/default-shadow-set.js +0 -2
- package/v3_theme/shadow/specs/default-shadow-set.js.map +0 -1
- package/v3_theme/shadow/theme-helper.d.ts +0 -7
- package/v3_theme/shadow/theme-helper.js +0 -2
- package/v3_theme/shadow/theme-helper.js.map +0 -1
- package/v3_theme/shadow/types.d.ts +0 -21
- package/v3_theme/spacing/specs/default-spacing-set.d.ts +0 -2
- package/v3_theme/spacing/specs/default-spacing-set.js +0 -2
- package/v3_theme/spacing/specs/default-spacing-set.js.map +0 -1
- package/v3_theme/spacing/theme-helper.d.ts +0 -6
- package/v3_theme/spacing/theme-helper.js +0 -2
- package/v3_theme/spacing/theme-helper.js.map +0 -1
- package/v3_theme/spacing/types.d.ts +0 -26
- package/v3_theme/types.d.ts +0 -78
- package/v3_theme/use-theme-mode.d.ts +0 -4
- package/v3_theme/use-theme-mode.js +0 -2
- package/v3_theme/use-theme-mode.js.map +0 -1
- /package/file-upload/{file-list.styles.d.ts → file-list/file-list.styles.d.ts} +0 -0
- /package/{deprecate-v2-tokens → migrate-popover}/index.d.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./file-item-edit.
|
|
1
|
+
"use strict";require("./file-item-edit.styles_19bvztn.css");exports.actionButton="aigdfjq",exports.actionButtonsSection="ajknckh",exports.actionButtonsSectionWithThumbnail="awg16zc",exports.contentSection="c1i0crev",exports.detailsSection="d4rbbwx",exports.fileNameText="fuau9z6",exports.fileSizeText="f18dc1yj",exports.item="i1432lvs",exports.nameSection="n18lt6ho";
|
|
2
2
|
//# sourceMappingURL=file-item-edit.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-item-edit.styles.js","sources":["../../../src/file-upload/file-item-edit.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Border, Colour, MediaQuery, Spacing } from \"../theme\";\n\nexport const item = css`\n display: flex;\n flex-direction: column;\n padding: ${Spacing[\"spacing-32\"]}
|
|
1
|
+
{"version":3,"file":"file-item-edit.styles.js","sources":["../../../src/file-upload/file-item-edit.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Border, Colour, MediaQuery, Radius, Spacing } from \"../theme\";\n\nexport const item = css`\n display: flex;\n flex-direction: column;\n padding: ${Spacing[\"spacing-32\"]};\n background: ${Colour[\"bg-primary-subtlest\"]};\n border: ${Border[\"width-010\"]} ${Border.solid} ${Colour.border};\n border-radius: ${Radius[\"sm\"]};\n\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n align-items: flex-start;\n margin-bottom: ${Spacing[\"spacing-16\"]};\n width: 100%;\n`;\n\nexport const detailsSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n`;\n\nexport const nameSection = css`\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin-bottom: ${Spacing[\"spacing-16\"]};\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n justify-content: flex-start;\n }\n`;\n\nexport const fileNameText = css`\n display: flex;\n flex: 1;\n margin-right: ${Spacing[\"spacing-16\"]};\n\n ${MediaQuery.MaxWidth.md} {\n margin-right: 0;\n margin-bottom: ${Spacing[\"spacing-8\"]};\n }\n`;\n\nexport const fileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n`;\n\nexport const actionButtonsSection = css`\n display: flex;\n justify-content: flex-end;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n }\n`;\n\nexport const actionButtonsSectionWithThumbnail = css`\n margin-left: calc(\n 96px + ${Spacing[\"spacing-32\"]}\n ); // thumbnail width + right margin\n\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n }\n`;\n\nexport const actionButton = css`\n width: 7.5rem;\n\n &:not(:last-of-type) {\n margin-right: ${Spacing[\"spacing-16\"]};\n }\n\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n\n &:not(:last-of-type) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n }\n`;\n"],"names":[],"mappings":"4GA4EyB,uCAnBQ,oDASa,iCAjDnB,kCAOA,+BAkBF,+BAWA,wBAjDR,+BA0BO"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
.i1432lvs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:var(--fds-spacing-32)
|
|
1
|
+
@layer fds{.i1432lvs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:var(--fds-spacing-32);background:var(--fds-colour-bg-primary-subtlest);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-sm);}.i1432lvs:not(:last-child){margin-bottom:var(--fds-spacing-16);}
|
|
2
2
|
.c1i0crev{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;margin-bottom:var(--fds-spacing-16);width:100%;}
|
|
3
3
|
.d4rbbwx{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
4
4
|
.n18lt6ho{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:space-between;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .n18lt6ho{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}
|
|
5
5
|
.fuau9z6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;margin-right:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .fuau9z6{margin-right:0;margin-bottom:var(--fds-spacing-8);}
|
|
6
|
-
.
|
|
7
|
-
.ajknckh{
|
|
6
|
+
.f18dc1yj{color:var(--fds-colour-text-subtler);}
|
|
7
|
+
.ajknckh{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;}:where(body.fds-breakpoint-md-max) .ajknckh{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
|
|
8
|
+
.awg16zc{margin-left:calc(
|
|
8
9
|
96px + var(--fds-spacing-32)
|
|
9
|
-
);}:where(body.fds-breakpoint-md-max) .
|
|
10
|
-
.
|
|
10
|
+
);}:where(body.fds-breakpoint-md-max) .awg16zc{margin-left:0;}
|
|
11
|
+
.aigdfjq{width:7.5rem;}.aigdfjq:not(:last-of-type){margin-right:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .aigdfjq{width:100%;}:where(body.fds-breakpoint-md-max) .aigdfjq:not(:last-of-type){margin-bottom:var(--fds-spacing-16);}}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("../../external/@dnd-kit/core/dist/core.esm.js"),t=require("../../external/@dnd-kit/sortable/dist/sortable.esm.js"),s=require("clsx"),i=require("react"),n=require("../../external/react-resize-detector/build/index.esm.js"),o=require("../../shared/accessibility/index.js"),l=require("../context.js"),a=require("../custom-sensors.js"),d=require("../file-item-edit.js"),c=require("../file-list-item/file-list-item.js"),u=require("../helper.js"),p=require("./file-list.styles.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(s);const m=i.forwardRef((function({fileItems:s=[],editableFileItems:f,fileDescriptionMaxLength:m,descriptionRequired:h,descriptionLabel:b,sortable:j,disabled:y,readOnly:v,onItemUpdate:x,onItemDelete:S,onSort:q},I){const[$,M]=i.useState({}),{setActiveId:O}=i.useContext(l.FileUploadContext),[C,D]=i.useState(""),F=i.useRef({});i.useImperativeHandle(I,(()=>({focus:()=>{var e;null===(e=R.current)||void 0===e||e.focus()}})));const{width:L=0,ref:R}=n.useResizeDetector(),E=i.useRef({}),w=r.useSensors(r.useSensor(a.MouseSensor,{activationConstraint:{distance:8}}),r.useSensor(r.TouchSensor,{activationConstraint:{delay:150,tolerance:5}}),r.useSensor(r.KeyboardSensor,{coordinateGetter:t.sortableKeyboardCoordinates})),k=e=>{delete E.current[e]};i.useEffect((()=>{const e=G(s);((e,r)=>{const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const t of s)if(e[t]!==r[t])return!1;return!0})($,e)||M(e)}),[s,f,v]),i.useEffect((()=>{var e;if(!s||0===s.length)return void D("");const r=Date.now(),t=[];for(const i of s){const s=F.current[i.id];if(i.errorMessage)"error"!==(null==s?void 0:s.status)&&(t.push("string"==typeof i.errorMessage?`Error uploading ${i.name}: ${i.errorMessage}`:`Error uploading ${i.name}`),F.current[i.id]={progress:null!==(e=i.progress)&&void 0!==e?e:1,timestamp:r,status:"error"});else if(void 0!==i.progress)if(i.progress>=1)"complete"!==(null==s?void 0:s.status)&&(t.push(`${i.name} upload is complete`),F.current[i.id]={progress:1,timestamp:r,status:"complete"});else if("number"==typeof i.progress&&i.progress<1){(!s||"in-progress"!==s.status)&&(t.push(`Starting upload of ${i.name}`),F.current[i.id]={progress:i.progress,timestamp:r,status:"in-progress"})}}t.length>0&&D(t.join(", "))}),[s]);const A=e=>r=>{V(e.id,"display"),k(e.id);const t=Object.assign(Object.assign({},e),{description:r});x(t)},W=e=>r=>{E.current[e.id]=r},H=e=>()=>{e.description&&0!==e.description.length?V(e.id,"display"):S(e),k(e.id)},N=e=>()=>{V(e.id,"edit")},U=e=>()=>{S(e),R.current&&R.current.focus()},z=e=>{if(q&&s){const{active:r,over:i}=e;if(i&&r.id!==i.id){const e=s.findIndex((e=>e.id===r.id)),n=s.findIndex((e=>e.id===i.id)),o=t.arrayMove(s,e,n);q(o)}}O(void 0)},B=e=>{const{active:r}=e;O(r.id)},K=e=>f&&u.FileUploadHelper.isSupportedImageType(e.type),T=e=>!e.errorMessage&&!v&&!("number"==typeof e.progress&&e.progress<1)&&K(e)&&!e.description,G=e=>{if(!e||0===e.length)return{};const r={};for(const t of e)t.errorMessage?r[t.id]="error":$[t.id]?r[t.id]=$[t.id]:r[t.id]=T(t)?"edit":"display";return r},V=(e,r)=>{M((t=>Object.assign(Object.assign({},t),{[e]:r})))},J=()=>s&&s.length>1&&j&&Object.values($).every((e=>"display"===e)),P=()=>{if(0===s.length)return"No files uploaded";const e=s.filter((e=>!(null==e?void 0:e.errorMessage)&&(1===e.progress||void 0===e.progress))).length,r=s.filter((e=>"number"==typeof e.progress&&e.progress<1)).length,t=s.filter((e=>e.errorMessage)).length;if(0===e&&0===r&&0===t)return"File list";const i=[e>0?`${e} completed files`:"",r>0?`${r} file in progress`:"",t>0?`${t} ${t>1?"files":"file"} with error`:""].filter(Boolean);return`${v?"Read-only file list":"File list"}. ${i.join(", ")}`},Q=()=>{const r=((e,r)=>{if(!e||0===e.length)return[];const t=[];for(const s of e)if("edit"===r[s.id]){const e=t[t.length-1];Array.isArray(e)?e.push(s):t.push([s])}else t.push(s);return t})(s,$);return 0===r.length?null:r.map(((r,t)=>Array.isArray(r)?((r,t)=>{const s=r.map((r=>{const t=Object.assign({},r);return void 0!==E.current[r.id]&&(t.description=E.current[r.id]),e.jsx(d.FileItemEdit,{fileItem:t,wrapperWidth:L,fileDescriptionMaxLength:m,descriptionRequired:h,descriptionLabel:b,onSave:A(r),onCancel:H(r),onBlur:W(r)},r.id)}));return e.jsx("li",{className:p.editableItemsContainer,children:e.jsx("ul",{children:s})},`editable-${t}`)})(r,t):e.jsx(c.FileListItem,{fileItem:r,editable:K(r),wrapperWidth:L,sortable:J(),disabled:y,readOnly:v,descriptionLabel:b,onDelete:U(r),onEditClick:N(r)},r.id)))},X=()=>e.jsxs(e.Fragment,{children:[e.jsx(o.VisuallyHidden,{"aria-live":"polite","aria-atomic":"true",children:C}),e.jsx("ul",{tabIndex:-1,className:g.default(p.listWrapper,v&&p.listWrapperReadOnly),ref:R,"aria-label":P(),children:Q()})]});return y||v||!J()?X():e.jsx(r.DndContext,{sensors:w,onDragEnd:z,onDragStart:B,children:e.jsx(t.SortableContext,{items:s,strategy:t.verticalListSortingStrategy,children:X()})})}));exports.FileList=m;
|
|
2
|
+
//# sourceMappingURL=file-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-list.js","sources":["../../../../src/file-upload/file-list/file-list.tsx"],"sourcesContent":["import type { DragEndEvent, DragStartEvent } from \"@dnd-kit/core\";\nimport {\n DndContext,\n KeyboardSensor,\n TouchSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport clsx from \"clsx\";\nimport type React from \"react\";\nimport {\n forwardRef,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport type { FormLabelProps } from \"../../form/types\";\nimport { VisuallyHidden } from \"../../shared/accessibility\";\nimport { FileUploadContext } from \"../context\";\nimport { MouseSensor } from \"../custom-sensors\";\nimport { FileItemEdit } from \"../file-item-edit\";\nimport { FileListItem } from \"../file-list-item\";\nimport { FileUploadHelper } from \"../helper\";\nimport type { FileItemProps } from \"../types\";\nimport * as styles from \"./file-list.styles\";\n\n// =============================================================================\n// INTERFACES\n// =============================================================================\ntype RenderMode = \"edit\" | \"display\" | \"error\";\n\ntype FileItemRenderModes = Record<string, RenderMode>;\ntype FileEditedDescriptions = Record<string, string>;\n\ntype RenderItem = FileItemProps | FileItemProps[];\n\ninterface Props {\n fileItems: FileItemProps[] | undefined;\n editableFileItems: boolean;\n fileDescriptionMaxLength?: number | undefined;\n descriptionRequired?: boolean | undefined;\n descriptionLabel?: FormLabelProps | undefined;\n sortable?: boolean | undefined;\n disabled?: boolean | undefined;\n readOnly?: boolean | undefined;\n onItemUpdate: (item: FileItemProps) => void;\n onItemDelete: (item: FileItemProps) => void;\n onSort?: ((reorderedFileItems: FileItemProps[]) => void) | undefined;\n}\n\ntype AnnouncementProgress = Record<\n string,\n {\n progress: number;\n timestamp: number;\n status: \"in-progress\" | \"complete\" | \"error\";\n }\n>;\n\nexport interface FileListRef {\n focus: () => void;\n}\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\n\nfunction Component(\n {\n fileItems = [],\n editableFileItems,\n fileDescriptionMaxLength,\n descriptionRequired,\n descriptionLabel,\n sortable,\n disabled,\n readOnly,\n onItemUpdate,\n onItemDelete,\n onSort,\n }: Props,\n ref: React.Ref<FileListRef>\n) {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const [renderModes, setRenderModes] = useState<FileItemRenderModes>({});\n const { setActiveId } = useContext(FileUploadContext);\n\n // Progress announcement state (for aria-live) - announces start and completion only\n const [progressAnnouncement, setProgressAnnouncement] = useState(\"\");\n const lastAnnouncedRef = useRef<AnnouncementProgress>({});\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n wrapperRef.current?.focus();\n },\n }));\n const { width: wrapperWidth = 0, ref: wrapperRef } = useResizeDetector();\n\n // Keep track of edited description without re-rendering\n const descriptionsValueRef = useRef<FileEditedDescriptions>({});\n\n /**\n * As the default drag sensors interfere with click events\n * on the file items, we'll need to configure the sensor to\n * only activate the drag if the mouse moves a certain distance\n */\n const sensors = useSensors(\n useSensor(MouseSensor, {\n activationConstraint: {\n distance: 8, // mouse drag of 8px then activate the drag event\n },\n }),\n useSensor(TouchSensor, {\n activationConstraint: {\n delay: 150,\n tolerance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n })\n );\n\n // =========================================================================\n // REF METHODS\n // =========================================================================\n const removeDescription = (itemId: string) => {\n delete descriptionsValueRef.current[itemId];\n };\n\n const shallowCompareRenderModes = (\n prev: FileItemRenderModes,\n next: FileItemRenderModes\n ) => {\n const prevKeys = Object.keys(prev);\n const nextKeys = Object.keys(next);\n if (prevKeys.length !== nextKeys.length) {\n return false;\n }\n for (const k of nextKeys) {\n if (prev[k] !== next[k]) {\n return false;\n }\n }\n return true;\n };\n\n // =========================================================================\n // EFFECTS\n // =========================================================================\n useEffect(() => {\n const nextModes = getItemsRenderMode(fileItems);\n const prevModes = renderModes;\n // We perform shallowCompare to avoid infinite re-render loop\n if (shallowCompareRenderModes(prevModes, nextModes)) {\n return;\n }\n setRenderModes(nextModes);\n }, [fileItems, editableFileItems, readOnly]);\n\n // Progress announcements only at start and completion\n useEffect(() => {\n if (!fileItems || fileItems.length === 0) {\n setProgressAnnouncement(\"\");\n return;\n }\n const now = Date.now();\n const messages: string[] = [];\n\n for (const item of fileItems) {\n const fileStatus = lastAnnouncedRef.current[item.id];\n\n if (item.errorMessage) {\n if (fileStatus?.status !== \"error\") {\n messages.push(\n typeof item.errorMessage === \"string\"\n ? `Error uploading ${item.name}: ${item.errorMessage}`\n : `Error uploading ${item.name}`\n );\n lastAnnouncedRef.current[item.id] = {\n progress: item.progress ?? 1,\n timestamp: now,\n status: \"error\",\n };\n }\n continue;\n }\n\n if (item.progress === undefined) {\n continue;\n }\n\n if (item.progress >= 1) {\n if (fileStatus?.status !== \"complete\") {\n messages.push(`${item.name} upload is complete`);\n lastAnnouncedRef.current[item.id] = {\n progress: 1,\n timestamp: now,\n status: \"complete\",\n };\n }\n continue;\n }\n\n // In progress - only announce start, not progress updates\n if (typeof item.progress === \"number\" && item.progress < 1) {\n // Only announce when starting upload (no previous status or status was not in-progress)\n const shouldAnnounce =\n !fileStatus || fileStatus.status !== \"in-progress\";\n\n if (shouldAnnounce) {\n messages.push(`Starting upload of ${item.name}`);\n lastAnnouncedRef.current[item.id] = {\n progress: item.progress,\n timestamp: now,\n status: \"in-progress\",\n };\n }\n }\n }\n\n if (messages.length > 0) {\n // Update aria-live region once with aggregated message\n setProgressAnnouncement(messages.join(\", \"));\n }\n }, [fileItems]);\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleSaveEdit = (item: FileItemProps) => (description: string) => {\n updateRenderModes(item.id, \"display\");\n removeDescription(item.id);\n\n const updatedItem = { ...item, description };\n onItemUpdate(updatedItem);\n };\n\n const handleBlurEdit = (item: FileItemProps) => (value: string) => {\n descriptionsValueRef.current[item.id] = value;\n };\n\n const handleCancel = (item: FileItemProps) => () => {\n if (!item.description || item.description.length === 0) {\n // New addition\n onItemDelete(item);\n } else {\n updateRenderModes(item.id, \"display\");\n }\n removeDescription(item.id);\n };\n\n const handleInitiateEdit = (item: FileItemProps) => () => {\n updateRenderModes(item.id, \"edit\");\n };\n\n const handleDelete = (item: FileItemProps) => () => {\n onItemDelete(item);\n if (wrapperRef.current) {\n wrapperRef.current.focus();\n }\n };\n\n const handleDragEnd = (event: DragEndEvent) => {\n if (onSort && fileItems) {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = fileItems.findIndex(\n (item) => item.id === active.id\n );\n const newIndex = fileItems.findIndex(\n (item) => item.id === over.id\n );\n\n const updatedFileItems = arrayMove(\n fileItems,\n oldIndex,\n newIndex\n );\n\n onSort(updatedFileItems);\n }\n }\n\n setActiveId(undefined);\n };\n\n const handleDragStart = (event: DragStartEvent) => {\n const { active } = event;\n setActiveId(active.id as string);\n };\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const checkEditable = (item: FileItemProps) => {\n return (\n editableFileItems &&\n FileUploadHelper.isSupportedImageType(item.type)\n );\n };\n\n const shouldRenderEditMode = (item: FileItemProps) => {\n return (\n !item.errorMessage &&\n !readOnly &&\n !(typeof item.progress === \"number\" && item.progress < 1) &&\n checkEditable(item) &&\n !item.description\n );\n };\n\n const getItemsRenderMode = (\n fileItems: FileItemProps[] | undefined\n ): FileItemRenderModes => {\n if (!fileItems || fileItems.length === 0) return {};\n\n const newRenderModes: FileItemRenderModes = {};\n\n for (const item of fileItems) {\n if (item.errorMessage) {\n newRenderModes[item.id] = \"error\";\n } else if (!renderModes[item.id]) {\n newRenderModes[item.id] = shouldRenderEditMode(item)\n ? \"edit\"\n : \"display\";\n } else {\n newRenderModes[item.id] = renderModes[item.id];\n }\n }\n\n return newRenderModes;\n };\n\n const updateRenderModes = (itemId: string, mode: RenderMode) => {\n setRenderModes((prevRenderModes) => {\n return {\n ...prevRenderModes,\n [itemId]: mode,\n };\n });\n };\n\n /**\n * Due to a UI requirement, we will render the items\n * with edit modes as a group\n */\n const getArrangedItems = (\n fileItems: FileItemProps[] | undefined,\n renderModes: FileItemRenderModes\n ) => {\n if (!fileItems || fileItems.length === 0) return [];\n\n const arrangedItems: RenderItem[] = [];\n\n for (const fileItem of fileItems) {\n if (renderModes[fileItem.id] === \"edit\") {\n const previousElement = arrangedItems[arrangedItems.length - 1];\n if (Array.isArray(previousElement)) {\n previousElement.push(fileItem);\n } else {\n arrangedItems.push([fileItem]);\n }\n } else {\n arrangedItems.push(fileItem);\n }\n }\n\n return arrangedItems;\n };\n\n const areAllItemsInDisplayViews = () => {\n return Object.values(renderModes).every((mode) => mode === \"display\");\n };\n\n const shouldEnableSort = () => {\n return (\n fileItems &&\n fileItems.length > 1 &&\n sortable &&\n areAllItemsInDisplayViews()\n );\n };\n\n /**\n * If there are no files, return \"No files uploaded\".\n * If readOnly is true, return \"Read-only file list\".\n * If there are files, return a summary of the file statuses.\n * For example, \"File list. 2 completed files, 1 file in progress, 1 file with error\".\n *\n * @returns aria label\n */\n const getWrapperAriaLabel = () => {\n if (fileItems.length === 0) {\n return \"No files uploaded\";\n }\n const completedCount = fileItems.filter(\n (item) =>\n !item?.errorMessage &&\n (item.progress === 1 || item.progress === undefined)\n ).length;\n const inProgressCount = fileItems.filter(\n (item) => typeof item.progress === \"number\" && item.progress < 1\n ).length;\n const errorCount = fileItems.filter((item) => item.errorMessage).length;\n if (completedCount === 0 && inProgressCount === 0 && errorCount === 0) {\n return `File list`;\n }\n const completedText =\n completedCount > 0 ? `${completedCount} completed files` : \"\";\n const inProgressText =\n inProgressCount > 0 ? `${inProgressCount} file in progress` : \"\";\n const errorText =\n errorCount > 0\n ? `${errorCount} ${\n errorCount > 1 ? \"files\" : \"file\"\n } with error`\n : \"\";\n const parts = [completedText, inProgressText, errorText].filter(\n Boolean\n );\n const prefix = readOnly ? \"Read-only file list\" : \"File list\";\n return `${prefix}. ${parts.join(\", \")}`;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderItemsInEditMode = (\n fileItems: FileItemProps[],\n keyToUse: number\n ) => {\n const itemsToRender = fileItems.map((item) => {\n const updatedFileItem = { ...item };\n if (descriptionsValueRef.current[item.id] !== undefined) {\n updatedFileItem.description =\n descriptionsValueRef.current[item.id];\n }\n\n return (\n <FileItemEdit\n key={item.id}\n fileItem={updatedFileItem}\n wrapperWidth={wrapperWidth}\n fileDescriptionMaxLength={fileDescriptionMaxLength}\n descriptionRequired={descriptionRequired}\n descriptionLabel={descriptionLabel}\n onSave={handleSaveEdit(item)}\n onCancel={handleCancel(item)}\n onBlur={handleBlurEdit(item)}\n />\n );\n });\n\n return (\n <li\n key={`editable-${keyToUse}`}\n className={styles.editableItemsContainer}\n >\n <ul>{itemsToRender}</ul>\n </li>\n );\n };\n\n const renderItems = () => {\n const arrangedItems = getArrangedItems(fileItems, renderModes);\n\n if (arrangedItems.length === 0) return null;\n\n return arrangedItems.map((item, index) => {\n if (Array.isArray(item)) {\n return renderItemsInEditMode(item, index);\n } else {\n return (\n <FileListItem\n key={item.id}\n fileItem={item}\n editable={checkEditable(item)}\n wrapperWidth={wrapperWidth}\n sortable={shouldEnableSort()}\n disabled={disabled}\n readOnly={readOnly}\n descriptionLabel={descriptionLabel}\n onDelete={handleDelete(item)}\n onEditClick={handleInitiateEdit(item)}\n />\n );\n }\n });\n };\n\n /**\n * Renders the progress status of each file upload.\n * In progress: 25% complete for uploading filename.pdf\n * Complete: filename.pdf upload is complete\n * Error: Error uploading filename.pdf: error message\n *\n * @returns A visually hidden element announcing the progress status.\n */\n const renderProgressStatus = () => (\n <VisuallyHidden aria-live=\"polite\" aria-atomic=\"true\">\n {progressAnnouncement}\n </VisuallyHidden>\n );\n\n const renderItemsWithWrapper = () => {\n return (\n <>\n {renderProgressStatus()}\n <ul\n tabIndex={-1}\n className={clsx(\n styles.listWrapper,\n readOnly && styles.listWrapperReadOnly\n )}\n ref={wrapperRef}\n aria-label={getWrapperAriaLabel()}\n >\n {renderItems()}\n </ul>\n </>\n );\n };\n\n if (disabled || readOnly || !shouldEnableSort()) {\n return renderItemsWithWrapper();\n } else {\n return (\n <DndContext\n sensors={sensors}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n >\n <SortableContext\n items={fileItems}\n strategy={verticalListSortingStrategy}\n >\n {renderItemsWithWrapper()}\n </SortableContext>\n </DndContext>\n );\n }\n}\n\nexport const FileList = forwardRef<FileListRef, Props>(Component);\n"],"names":["FileList","forwardRef","fileItems","editableFileItems","fileDescriptionMaxLength","descriptionRequired","descriptionLabel","sortable","disabled","readOnly","onItemUpdate","onItemDelete","onSort","ref","renderModes","setRenderModes","useState","setActiveId","useContext","FileUploadContext","progressAnnouncement","setProgressAnnouncement","lastAnnouncedRef","useRef","useImperativeHandle","focus","_a","wrapperRef","current","width","wrapperWidth","useResizeDetector","descriptionsValueRef","sensors","useSensors","useSensor","MouseSensor","activationConstraint","distance","TouchSensor","delay","tolerance","KeyboardSensor","coordinateGetter","sortableKeyboardCoordinates","removeDescription","itemId","useEffect","nextModes","getItemsRenderMode","prev","next","prevKeys","Object","keys","nextKeys","length","k","shallowCompareRenderModes","now","Date","messages","item","fileStatus","id","errorMessage","status","push","name","progress","timestamp","undefined","join","handleSaveEdit","description","updateRenderModes","updatedItem","assign","handleBlurEdit","value","handleCancel","handleInitiateEdit","handleDelete","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","updatedFileItems","arrayMove","handleDragStart","checkEditable","FileUploadHelper","isSupportedImageType","type","shouldRenderEditMode","newRenderModes","mode","prevRenderModes","shouldEnableSort","values","every","getWrapperAriaLabel","completedCount","filter","inProgressCount","errorCount","parts","Boolean","renderItems","arrangedItems","fileItem","previousElement","Array","isArray","getArrangedItems","map","index","keyToUse","itemsToRender","updatedFileItem","_jsx","FileItemEdit","onSave","onCancel","onBlur","className","styles.editableItemsContainer","children","renderItemsInEditMode","FileListItem","editable","onDelete","onEditClick","renderItemsWithWrapper","_jsxs","_Fragment","VisuallyHidden","tabIndex","clsx","styles.listWrapper","styles.listWrapperReadOnly","DndContext","onDragEnd","onDragStart","SortableContext","items","strategy","verticalListSortingStrategy"],"mappings":"+mBA6iBaA,EAAWC,EAAAA,YAhexB,UACIC,UACIA,EAAY,GAAEC,kBACdA,EAAiBC,yBACjBA,EAAwBC,oBACxBA,EAAmBC,iBACnBA,EAAgBC,SAChBA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,aACRA,EAAYC,aACZA,EAAYC,OACZA,GAEJC,GAKA,MAAOC,EAAaC,GAAkBC,EAAAA,SAA8B,CAAA,IAC9DC,YAAEA,GAAgBC,EAAAA,WAAWC,sBAG5BC,EAAsBC,GAA2BL,EAAAA,SAAS,IAC3DM,EAAmBC,EAAAA,OAA6B,IAEtDC,EAAAA,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BA,EACrBC,iBAAkBA,EAClBuH,OAAQpD,EAAeX,GACvBgE,SAAU9C,EAAalB,GACvBiE,OAAQjD,EAAehB,IARlBA,EAAKE,GASZ,IAIV,OACI2D,EAAAA,IAAA,KAAA,CAEIK,UAAWC,EAAAA,uBAA6BC,SAExCP,MAAA,KAAA,CAAAO,SAAKT,KAHA,YAAYD,IAIhB,EAWMW,CAAsBrE,EAAMyD,GAG/BI,EAAAA,IAACS,EAAAA,aAAY,CAETnB,SAAUnD,EACVuE,SAAUxC,EAAc/B,GACxBhC,aAAcA,EACdvB,SAAU8F,IACV7F,SAAUA,EACVC,SAAUA,EACVH,iBAAkBA,EAClBgI,SAAUpD,EAAapB,GACvByE,YAAatD,EAAmBnB,IAT3BA,EAAKE,KAaxB,EAiBAwE,EAAyB,IAEvBC,OAAAC,EAAAA,SAAA,CAAAR,SAAA,CAPJP,MAACgB,EAAAA,eAAc,CAAA,YAAW,uBAAqB,OAAMT,SAChD9G,IAQGuG,EAAAA,UACIiB,UAAU,EACVZ,UAAWa,EAAAA,QACPC,EAAAA,YACArI,GAAYsI,EAAAA,qBAEhBlI,IAAKc,EAAU,aACH6E,IAAqB0B,SAEhCnB,SAMjB,OAAIvG,GAAYC,IAAa4F,IAClBmC,IAGHb,EAAAA,IAACqB,aAAU,CACP/G,QAASA,EACTgH,UAAW9D,EACX+D,YAAatD,EAAesC,SAE5BP,EAAAA,IAACwB,kBAAe,CACZC,MAAOlJ,EACPmJ,SAAUC,EAAAA,4BAA2BpB,SAEpCM,OAKrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-list.styles.js","sources":["../../../../src/file-upload/file-list/file-list.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Spacing } from \"../../theme\";\n\nexport const listWrapper = css`\n list-style-type: none;\n margin-bottom: ${Spacing[\"spacing-32\"]};\n`;\n\nexport const listWrapperReadOnly = css`\n margin-bottom: 0;\n`;\n\nexport const editableItemsContainer = css`\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n\n ul {\n list-style-type: none;\n }\n`;\n"],"names":[],"mappings":"2HAamC,+BATX,uCAKQ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./file-list-item-thumbnail.
|
|
1
|
+
"use strict";require("./file-list-item-thumbnail.styles_1y4si19.css");exports.container="c1hu6y7h",exports.replaceButton="r5e5ep6",exports.thumbnail="t18h6q7y",exports.thumbnailPdf="t1w2z01d";
|
|
2
2
|
//# sourceMappingURL=file-list-item-thumbnail.styles.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
@layer fds{.c1hu6y7h{width:auto;margin-right:var(--fds-spacing-32);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}
|
|
2
|
+
.t18h6q7y{width:96px;height:96px;aspect-ratio:1;border-radius:var(--fds-radius-sm);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);object-fit:cover;}:where(body.fds-breakpoint-md-max) .t18h6q7y{width:64px;height:64px;}
|
|
3
|
+
.t1w2z01d{border:none;}
|
|
4
|
+
.r5e5ep6{width:100%;height:1.625rem;margin-top:var(--fds-spacing-8);border:none;background:transparent;cursor:pointer;font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-md);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);color:var(--fds-colour-text-primary);}.r5e5ep6:hover{color:var(--fds-colour-text-hover);}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),i=require("../../external/@dnd-kit/sortable/dist/sortable.esm.js"),t=require("../../external/@dnd-kit/utilities/dist/utilities.esm.js"),a=require("@lifesg/react-icons/bin"),s=require("@lifesg/react-icons/drag-handle"),r=require("@lifesg/react-icons/exclamation-circle-fill"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),i=require("../../external/@dnd-kit/sortable/dist/sortable.esm.js"),t=require("../../external/@dnd-kit/utilities/dist/utilities.esm.js"),a=require("@lifesg/react-icons/bin"),s=require("@lifesg/react-icons/drag-handle"),r=require("@lifesg/react-icons/exclamation-circle-fill"),n=require("@lifesg/react-icons/pencil"),l=require("react"),d=require("../../button/button.js"),o=require("../../shared/progress-bar/progress-bar.js"),c=require("../../typography/index.js");require("../../util/calendar-helper.js"),require("../../external/dayjs/dayjs.min.js"),require("../../util/simple-id-generator.js");var u=require("../../util/string-helper.js");require("@react-aria/live-announcer");var m=require("../context.js"),p=require("../helper.js"),h=require("./file-list-item.styles.js"),y=require("./file-list-item-thumbnail.js");const x=l.memo((({fileItem:x,editable:b,sortable:j,wrapperWidth:g,disabled:T,readOnly:f,descriptionLabel:N,onDelete:v,onEditClick:B})=>{const{id:D,name:q,size:F,description:I,progress:M=1,errorMessage:S,thumbnailImageDataUrl:C,truncateText:$=!0}=x,[k,z]=l.useState(),{activeId:w}=l.useContext(m.FileUploadContext),{attributes:E,listeners:P,setNodeRef:H,transform:L,transition:U}=i.useSortable({id:D}),O=l.useRef(null),K={transform:t.CSS.Translate.toString(L),transition:U},_=Object.assign(Object.assign({style:K},E),P),R=M<1,Y=p.FileUploadHelper.formatFileSizeDisplay(F),A=!!I&&!!b,W=w?w===D?"self":"others":"none",G=l.useCallback((e=>{if(!$)return e;const i=O&&O.current?O.current.getBoundingClientRect().width:0;return u.StringHelper.truncateOneLine(e,i,i/2,i/2/8,16)}),[$]);l.useEffect((()=>{z(G(q))}),[g,G,q]);const J=()=>{v()},Q=()=>{B&&B()},V=e=>{j&&e.stopPropagation()},X=()=>T||!!w,Z=()=>!!j&&!f,ee=()=>{var i;return e.jsxs(e.Fragment,{children:[e.jsx(c.Typography.BodyMD,{weight:I?"semibold":"regular",children:k}),I&&e.jsxs(e.Fragment,{children:[e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionLabel,children:null!==(i=null==N?void 0:N.children)&&void 0!==i?i:"Photo description"}),e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionText,children:I})]})]})};return e.jsxs("li",Object.assign({id:D,ref:H,className:h.item,"data-item-state":X()&&"none"===W?"disabled":Z()&&"self"===W?"sortable-active":Z()?"sortable":void 0,"data-testid":`${D}-item`},Z()?_:{},{children:[Z()&&e.jsx(s.DragHandleIcon,{"data-testid":`${D}-drag-handle`,className:h.dragHandleIcon,"data-drag-handle-state":"self"===W?"active":X()?"disabled":void 0}),e.jsxs("div",{className:h.box,"data-box-state":"self"===W?"focused":X()?"disabled":S?"error":void 0,"data-stack-mobile":!S&&(R||b),children:[(()=>{const i=!!C||x.type===p.FileUploadHelper.PDF_MIME_TYPE,t=S?e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:O,className:h.nameSection,children:[ee(),S&&e.jsxs(c.Typography.BodySM,{className:h.desktopErrorMessage,weight:"semibold",children:[e.jsx(r.ExclamationCircleFillIcon,{className:h.errorIcon,"aria-hidden":!0}),S]})]}),e.jsx("div",{className:h.fileSizeSection,"data-mobile-visibility":R?"hidden":"expand",children:e.jsx(c.Typography.BodyMD,{className:h.fileSizeText,children:Y})}),S&&e.jsxs(c.Typography.BodySM,{className:h.mobileErrorMessage,weight:"semibold",children:[e.jsx(r.ExclamationCircleFillIcon,{className:h.errorIcon,"aria-hidden":!0}),S]})]}):(i=>{const t=i||x.type===p.FileUploadHelper.PDF_MIME_TYPE?e.jsx(y.FileListItemThumbnail,{thumbnailImageDataUrl:i||"",fileType:x.type,"data-testid":`${D}-thumbnail`}):null;return A?e.jsxs(e.Fragment,{children:[t,e.jsxs("div",{ref:O,className:h.extendedNameSection,children:[e.jsx(c.Typography.BodyMD,{weight:"semibold",children:k}),e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionLabel,children:null!==(s=null==N?void 0:N.children)&&void 0!==s?s:"Photo description"}),e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionText,children:I}),e.jsx(c.Typography.BodyMD,{className:h.descriptionFileSizeText,children:Y}),!f&&A&&e.jsxs("div",{className:h.inlineActionContainer,children:[e.jsx(d.Button,{"data-testid":`${D}-edit-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`edit ${q}`,disabled:X(),onClick:Q,onKeyDown:V,icon:e.jsx(n.PencilIcon,{"aria-hidden":!0}),className:h.iconButton},"edit"),e.jsx(d.Button,{"data-testid":`${D}-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}`,disabled:X(),onClick:J,onKeyDown:V,icon:e.jsx(a.BinIcon,{"aria-hidden":!0}),className:h.iconButton},"delete")]})]})]}):e.jsxs(e.Fragment,{children:[t,e.jsxs("div",{ref:O,className:h.nameSection,children:[ee(),!R&&e.jsx(c.Typography.BodyMD,{className:h.descriptionFileSizeText,children:Y})]})]});var s})(C);return e.jsx("div",{className:h.contentSection,"data-has-thumbnail":i,children:t})})(),!f&&!A&&(()=>{let i;return i=S?e.jsx(d.Button,{"data-testid":`${D}-error-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}, error: ${S}`,onClick:J,className:h.iconButton,icon:e.jsx(a.BinIcon,{"aria-hidden":!0})}):R?e.jsx(o.ProgressBar,{progress:M,"data-testid":`${D}-progress-bar`}):e.jsxs(e.Fragment,{children:[b&&e.jsx(d.Button,{"data-testid":`${D}-edit-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`edit ${q}`,disabled:X(),onClick:Q,onKeyDown:V,icon:e.jsx(n.PencilIcon,{"aria-hidden":!0}),className:h.iconButton},"edit"),e.jsx(d.Button,{"data-testid":`${D}-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}`,disabled:X(),onClick:J,onKeyDown:V,icon:e.jsx(a.BinIcon,{"aria-hidden":!0}),className:h.iconButton},"delete")]}),e.jsx("div",{className:h.actionContainer,"data-mobile-layout":!S&&R?"loading":!S&&b?"editable":void 0,children:i})})()]})]}))}));exports.FileListItem=x;
|
|
2
2
|
//# sourceMappingURL=file-list-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-list-item.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.tsx"],"sourcesContent":["import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { DragHandleIcon as DSDragHandleIcon } from \"@lifesg/react-icons/drag-handle\";\nimport { ExclamationCircleFillIcon } from \"@lifesg/react-icons/exclamation-circle-fill\";\nimport { PencilIcon } from \"@lifesg/react-icons/pencil\";\nimport {\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { Button } from \"../../button\";\nimport { ProgressBar } from \"../../shared/progress-bar\";\nimport { Typography } from \"../../typography\";\nimport { StringHelper } from \"../../util\";\nimport { FileUploadContext } from \"../context\";\nimport { FileUploadHelper } from \"../helper\";\nimport type { ItemFocusType } from \"./file-list-item.styles\";\nimport * as styles from \"./file-list-item.styles\";\nimport { FileListItemThumbnail } from \"./file-list-item-thumbnail\";\nimport type { FileListItemProps } from \"./types\";\n\ninterface Props extends FileListItemProps {\n readOnly?: boolean | undefined;\n}\n\nconst Component = ({\n fileItem,\n editable,\n sortable,\n wrapperWidth,\n disabled,\n readOnly,\n onDelete,\n onEditClick,\n}: Props) => {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const {\n id,\n name,\n size,\n description,\n progress = 1,\n errorMessage,\n thumbnailImageDataUrl,\n truncateText = true,\n } = fileItem;\n const [formattedName, setFormattedName] = useState<string>();\n const { activeId } = useContext(FileUploadContext);\n\n // Sortable mechanism\n const { attributes, listeners, setNodeRef, transform, transition } =\n useSortable({ id });\n const detailSectionRef = useRef<HTMLDivElement>(null);\n const style = {\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n const sortableProps = {\n style,\n ...attributes,\n ...listeners,\n };\n\n // Local variables\n const isLoading = progress < 1;\n const fileSize = FileUploadHelper.formatFileSizeDisplay(size);\n const focusType: ItemFocusType = activeId\n ? activeId === id\n ? \"self\"\n : \"others\"\n : \"none\";\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const getTruncatedText = useCallback(\n (value: string) => {\n if (!truncateText) return value;\n\n const widthOfElement =\n detailSectionRef && detailSectionRef.current\n ? detailSectionRef.current.getBoundingClientRect().width\n : 0;\n\n return StringHelper.truncateOneLine(\n value,\n widthOfElement,\n widthOfElement / 2,\n widthOfElement / 2 / 8, // Arbitrary\n 16 // Font size\n );\n },\n [truncateText]\n );\n\n // =========================================================================\n // EFFECTS\n // =========================================================================\n useEffect(() => {\n setFormattedName(getTruncatedText(name));\n }, [wrapperWidth, getTruncatedText, name]);\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleDelete = () => {\n onDelete();\n };\n\n const handleEdit = () => {\n if (onEditClick) {\n onEditClick();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n /**\n * Circumvent issue of keydown action activating the sort mechanism\n * rather than the actual action\n */\n if (sortable) {\n event.stopPropagation();\n }\n };\n\n const shouldDisable = () => disabled || !!activeId;\n\n const shouldEnableSort = () => !!sortable && !readOnly;\n\n const getItemState = () => {\n if (shouldDisable() && focusType === \"none\") {\n return \"disabled\";\n }\n\n if (shouldEnableSort() && focusType === \"self\") {\n return \"sortable-active\";\n }\n\n if (shouldEnableSort()) {\n return \"sortable\";\n }\n\n return undefined;\n };\n\n const getDragHandleState = () => {\n if (focusType === \"self\") {\n return \"active\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n return undefined;\n };\n\n const getBoxState = () => {\n if (focusType === \"self\") {\n return \"focused\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n if (errorMessage) {\n return \"error\";\n }\n\n return undefined;\n };\n\n const getActionContainerLayout = () => {\n if (!errorMessage && isLoading) {\n return \"loading\";\n }\n\n if (!errorMessage && editable) {\n return \"editable\";\n }\n\n return undefined;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderNameDescription = () => (\n <>\n <Typography.BodyMD weight={description ? \"semibold\" : \"regular\"}>\n {formattedName}\n </Typography.BodyMD>\n {description && (\n <Typography.BodyMD className={styles.itemDescriptionText}>\n {description}\n </Typography.BodyMD>\n )}\n </>\n );\n\n const renderErrorState = () => (\n <>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n {errorMessage && (\n <Typography.BodySM\n className={styles.desktopErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n {errorMessage && (\n <Typography.BodySM\n className={styles.mobileErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </>\n );\n\n const renderWithThumbnail = (thumbnailImageDataUrl: string) => (\n <>\n <FileListItemThumbnail\n thumbnailImageDataUrl={thumbnailImageDataUrl}\n fileType={fileItem.type}\n data-testid={`${id}-thumbnail`}\n />\n <div className={styles.extendedNameSection}>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n </div>\n </>\n );\n\n const renderDefault = () => (\n <>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n </>\n );\n\n const renderContents = () => {\n let content: JSX.Element;\n const shouldShowThumbnail =\n !!thumbnailImageDataUrl ||\n fileItem.type === FileUploadHelper.PDF_MIME_TYPE;\n\n if (errorMessage) {\n content = renderErrorState();\n } else if (shouldShowThumbnail) {\n content = renderWithThumbnail(thumbnailImageDataUrl || \"\");\n } else {\n content = renderDefault();\n }\n\n return (\n <div\n className={styles.contentSection}\n data-has-thumbnail={shouldShowThumbnail}\n >\n {content}\n </div>\n );\n };\n\n const renderActions = () => {\n let content: JSX.Element;\n\n if (errorMessage) {\n content = (\n <Button\n data-testid={`${id}-error-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}, error: ${errorMessage}`}\n onClick={handleDelete}\n className={styles.iconButton}\n icon={<BinIcon aria-hidden />}\n />\n );\n } else if (isLoading) {\n content = (\n <ProgressBar\n progress={progress}\n data-testid={`${id}-progress-bar`}\n />\n );\n } else {\n content = (\n <>\n {editable && (\n <Button\n key=\"edit\"\n data-testid={`${id}-edit-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`edit ${name}`}\n disabled={shouldDisable()}\n onClick={handleEdit}\n onKeyDown={handleKeyDown}\n icon={<PencilIcon aria-hidden />}\n className={styles.iconButton}\n />\n )}\n <Button\n key=\"delete\"\n data-testid={`${id}-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}`}\n disabled={shouldDisable()}\n onClick={handleDelete}\n onKeyDown={handleKeyDown}\n icon={<BinIcon aria-hidden />}\n className={styles.iconButton}\n />\n </>\n );\n }\n\n return (\n <div\n className={styles.actionContainer}\n data-mobile-layout={getActionContainerLayout()}\n >\n {content}\n </div>\n );\n };\n\n return (\n <li\n id={id}\n ref={setNodeRef}\n className={styles.item}\n data-item-state={getItemState()}\n data-testid={`${id}-item`}\n {...(shouldEnableSort() ? sortableProps : {})}\n >\n {shouldEnableSort() && (\n <DSDragHandleIcon\n data-testid={`${id}-drag-handle`}\n className={styles.dragHandleIcon}\n data-drag-handle-state={getDragHandleState()}\n />\n )}\n <div\n className={styles.box}\n data-box-state={getBoxState()}\n data-stack-mobile={!errorMessage && (isLoading || editable)}\n >\n {renderContents()}\n {!readOnly && renderActions()}\n </div>\n </li>\n );\n};\n\nexport const FileListItem = memo(Component);\n"],"names":["FileListItem","memo","fileItem","editable","sortable","wrapperWidth","disabled","readOnly","onDelete","onEditClick","id","name","size","description","progress","errorMessage","thumbnailImageDataUrl","truncateText","formattedName","setFormattedName","useState","activeId","useContext","FileUploadContext","attributes","listeners","setNodeRef","transform","transition","useSortable","detailSectionRef","useRef","style","CSS","Translate","toString","sortableProps","isLoading","fileSize","FileUploadHelper","formatFileSizeDisplay","focusType","getTruncatedText","useCallback","value","widthOfElement","current","getBoundingClientRect","width","StringHelper","truncateOneLine","useEffect","handleDelete","handleEdit","handleKeyDown","event","stopPropagation","shouldDisable","shouldEnableSort","renderNameDescription","_jsxs","_Fragment","children","_jsx","Typography","BodyMD","weight","className","styles.itemDescriptionText","Object","assign","ref","styles.item","DSDragHandleIcon","styles.dragHandleIcon","styles.box","content","shouldShowThumbnail","type","PDF_MIME_TYPE","styles.nameSection","BodySM","styles.desktopErrorMessage","ExclamationCircleFillIcon","styles.errorIcon","styles.fileSizeSection","styles.fileSizeText","styles.mobileErrorMessage","FileListItemThumbnail","fileType","styles.extendedNameSection","renderWithThumbnail","styles.contentSection","renderContents","Button","styleType","sizeType","onClick","styles.iconButton","icon","BinIcon","ProgressBar","onKeyDown","PencilIcon","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AAA,eAAA,MAGf/D,EAEH0B,EAAAA,IAACsC,eACGvF,SAAUA,EAAQ,cACL,GAAGJ,mBAKpBkD,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SAAA,CACK3D,GACG4D,EAAAA,IAAC+B,EAAAA,OAAM,CAAA,cAEU,GAAGpF,8BACJ,OACZoE,KAAK,SACLiB,UAAU,QACVC,SAAS,QAAO,aACJ,QAAQrF,IACpBL,SAAUmD,IACVwC,QAAS5C,EACTiD,UAAWhD,EACX6C,KAAMpC,MAACwC,EAAAA,WAAU,CAAA,eAAA,IACjBpC,UAAW+B,EAAAA,YAXP,QAcZnC,EAAAA,IAAC+B,EAAAA,OAAM,CAAA,cAEU,GAAGpF,kBAAkB,cACtB,OACZoE,KAAK,SACLiB,UAAU,QACVC,SAAS,QAAO,aACJ,UAAUrF,IACtBL,SAAUmD,IACVwC,QAAS7C,EACTkD,UAAWhD,EACX6C,KAAMpC,EAAAA,IAACqC,EAAAA,QAAO,CAAA,eAAA,IACdjC,UAAW+B,EAAAA,YAXP,aAkBhBnC,EAAAA,IAAA,MAAA,CACII,UAAWqC,EAAAA,gBAAsB,sBAjMpCzF,GAAgBsB,EACV,WAGNtB,GAAgBZ,EACV,gBADX,EA8LsD2D,SAE7Cc,GACC,EA0BY6B,SAEjB"}
|
|
1
|
+
{"version":3,"file":"file-list-item.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.tsx"],"sourcesContent":["import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { DragHandleIcon as DSDragHandleIcon } from \"@lifesg/react-icons/drag-handle\";\nimport { ExclamationCircleFillIcon } from \"@lifesg/react-icons/exclamation-circle-fill\";\nimport { PencilIcon } from \"@lifesg/react-icons/pencil\";\nimport {\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { Button } from \"../../button\";\nimport type { FormLabelProps } from \"../../form/types\";\nimport { ProgressBar } from \"../../shared/progress-bar\";\nimport { Typography } from \"../../typography\";\nimport { StringHelper } from \"../../util\";\nimport { FileUploadContext } from \"../context\";\nimport { FileUploadHelper } from \"../helper\";\nimport type { ItemFocusType } from \"./file-list-item.styles\";\nimport * as styles from \"./file-list-item.styles\";\nimport { FileListItemThumbnail } from \"./file-list-item-thumbnail\";\nimport type { FileListItemProps } from \"./types\";\n\ninterface Props extends FileListItemProps {\n readOnly?: boolean | undefined;\n descriptionLabel?: FormLabelProps | undefined;\n}\n\nconst Component = ({\n fileItem,\n editable,\n sortable,\n wrapperWidth,\n disabled,\n readOnly,\n descriptionLabel,\n onDelete,\n onEditClick,\n}: Props) => {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const {\n id,\n name,\n size,\n description,\n progress = 1,\n errorMessage,\n thumbnailImageDataUrl,\n truncateText = true,\n } = fileItem;\n const [formattedName, setFormattedName] = useState<string>();\n const { activeId } = useContext(FileUploadContext);\n\n // Sortable mechanism\n const { attributes, listeners, setNodeRef, transform, transition } =\n useSortable({ id });\n const detailSectionRef = useRef<HTMLDivElement>(null);\n const style = {\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n const sortableProps = {\n style,\n ...attributes,\n ...listeners,\n };\n\n // Local variables\n const isLoading = progress < 1;\n const fileSize = FileUploadHelper.formatFileSizeDisplay(size);\n const hasInlineActions = !!description && !!editable;\n const focusType: ItemFocusType = activeId\n ? activeId === id\n ? \"self\"\n : \"others\"\n : \"none\";\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const getTruncatedText = useCallback(\n (value: string) => {\n if (!truncateText) return value;\n\n const widthOfElement =\n detailSectionRef && detailSectionRef.current\n ? detailSectionRef.current.getBoundingClientRect().width\n : 0;\n\n return StringHelper.truncateOneLine(\n value,\n widthOfElement,\n widthOfElement / 2,\n widthOfElement / 2 / 8, // Arbitrary\n 16 // Font size\n );\n },\n [truncateText]\n );\n\n // =========================================================================\n // EFFECTS\n // =========================================================================\n useEffect(() => {\n setFormattedName(getTruncatedText(name));\n }, [wrapperWidth, getTruncatedText, name]);\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleDelete = () => {\n onDelete();\n };\n\n const handleEdit = () => {\n if (onEditClick) {\n onEditClick();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n /**\n * Circumvent issue of keydown action activating the sort mechanism\n * rather than the actual action\n */\n if (sortable) {\n event.stopPropagation();\n }\n };\n\n const shouldDisable = () => disabled || !!activeId;\n\n const shouldEnableSort = () => !!sortable && !readOnly;\n\n const getItemState = () => {\n if (shouldDisable() && focusType === \"none\") {\n return \"disabled\";\n }\n\n if (shouldEnableSort() && focusType === \"self\") {\n return \"sortable-active\";\n }\n\n if (shouldEnableSort()) {\n return \"sortable\";\n }\n\n return undefined;\n };\n\n const getDragHandleState = () => {\n if (focusType === \"self\") {\n return \"active\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n return undefined;\n };\n\n const getBoxState = () => {\n if (focusType === \"self\") {\n return \"focused\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n if (errorMessage) {\n return \"error\";\n }\n\n return undefined;\n };\n\n const getActionContainerLayout = () => {\n if (!errorMessage && isLoading) {\n return \"loading\";\n }\n\n if (!errorMessage && editable) {\n return \"editable\";\n }\n\n return undefined;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderNameDescription = () => (\n <>\n <Typography.BodyMD weight={description ? \"semibold\" : \"regular\"}>\n {formattedName}\n </Typography.BodyMD>\n {description && (\n <>\n <Typography.BodyMD className={styles.itemDescriptionLabel}>\n {descriptionLabel?.children ?? \"Photo description\"}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.itemDescriptionText}>\n {description}\n </Typography.BodyMD>\n </>\n )}\n </>\n );\n\n const renderErrorState = () => (\n <>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n {errorMessage && (\n <Typography.BodySM\n className={styles.desktopErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n {errorMessage && (\n <Typography.BodySM\n className={styles.mobileErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </>\n );\n\n const renderInlineActions = () => (\n <div className={styles.inlineActionContainer}>\n <Button\n key=\"edit\"\n data-testid={`${id}-edit-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`edit ${name}`}\n disabled={shouldDisable()}\n onClick={handleEdit}\n onKeyDown={handleKeyDown}\n icon={<PencilIcon aria-hidden />}\n className={styles.iconButton}\n />\n <Button\n key=\"delete\"\n data-testid={`${id}-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}`}\n disabled={shouldDisable()}\n onClick={handleDelete}\n onKeyDown={handleKeyDown}\n icon={<BinIcon aria-hidden />}\n className={styles.iconButton}\n />\n </div>\n );\n\n const renderDescriptionContent = () => (\n <div ref={detailSectionRef} className={styles.extendedNameSection}>\n <Typography.BodyMD weight=\"semibold\">\n {formattedName}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.itemDescriptionLabel}>\n {descriptionLabel?.children ?? \"Photo description\"}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.itemDescriptionText}>\n {description}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.descriptionFileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n {!readOnly && hasInlineActions && renderInlineActions()}\n </div>\n );\n\n const renderFileContent = (thumbnailImageDataUrl?: string) => {\n const shouldShowThumbnail =\n !!thumbnailImageDataUrl ||\n fileItem.type === FileUploadHelper.PDF_MIME_TYPE;\n\n const thumbnail = shouldShowThumbnail ? (\n <FileListItemThumbnail\n thumbnailImageDataUrl={thumbnailImageDataUrl || \"\"}\n fileType={fileItem.type}\n data-testid={`${id}-thumbnail`}\n />\n ) : null;\n\n if (hasInlineActions) {\n return (\n <>\n {thumbnail}\n {renderDescriptionContent()}\n </>\n );\n }\n\n return (\n <>\n {thumbnail}\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n {!isLoading && (\n <Typography.BodyMD\n className={styles.descriptionFileSizeText}\n >\n {fileSize}\n </Typography.BodyMD>\n )}\n </div>\n </>\n );\n };\n\n const renderContents = () => {\n const shouldShowThumbnail =\n !!thumbnailImageDataUrl ||\n fileItem.type === FileUploadHelper.PDF_MIME_TYPE;\n\n const content = errorMessage\n ? renderErrorState()\n : renderFileContent(thumbnailImageDataUrl);\n\n return (\n <div\n className={styles.contentSection}\n data-has-thumbnail={shouldShowThumbnail}\n >\n {content}\n </div>\n );\n };\n\n const renderActions = () => {\n let content: JSX.Element;\n\n if (errorMessage) {\n content = (\n <Button\n data-testid={`${id}-error-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}, error: ${errorMessage}`}\n onClick={handleDelete}\n className={styles.iconButton}\n icon={<BinIcon aria-hidden />}\n />\n );\n } else if (isLoading) {\n content = (\n <ProgressBar\n progress={progress}\n data-testid={`${id}-progress-bar`}\n />\n );\n } else {\n content = (\n <>\n {editable && (\n <Button\n key=\"edit\"\n data-testid={`${id}-edit-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`edit ${name}`}\n disabled={shouldDisable()}\n onClick={handleEdit}\n onKeyDown={handleKeyDown}\n icon={<PencilIcon aria-hidden />}\n className={styles.iconButton}\n />\n )}\n <Button\n key=\"delete\"\n data-testid={`${id}-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}`}\n disabled={shouldDisable()}\n onClick={handleDelete}\n onKeyDown={handleKeyDown}\n icon={<BinIcon aria-hidden />}\n className={styles.iconButton}\n />\n </>\n );\n }\n\n return (\n <div\n className={styles.actionContainer}\n data-mobile-layout={getActionContainerLayout()}\n >\n {content}\n </div>\n );\n };\n\n return (\n <li\n id={id}\n ref={setNodeRef}\n className={styles.item}\n data-item-state={getItemState()}\n data-testid={`${id}-item`}\n {...(shouldEnableSort() ? sortableProps : {})}\n >\n {shouldEnableSort() && (\n <DSDragHandleIcon\n data-testid={`${id}-drag-handle`}\n className={styles.dragHandleIcon}\n data-drag-handle-state={getDragHandleState()}\n />\n )}\n <div\n className={styles.box}\n data-box-state={getBoxState()}\n data-stack-mobile={!errorMessage && (isLoading || editable)}\n >\n {renderContents()}\n {!readOnly && !hasInlineActions && renderActions()}\n </div>\n </li>\n );\n};\n\nexport const FileListItem = memo(Component);\n"],"names":["FileListItem","memo","fileItem","editable","sortable","wrapperWidth","disabled","readOnly","descriptionLabel","onDelete","onEditClick","id","name","size","description","progress","errorMessage","thumbnailImageDataUrl","truncateText","formattedName","setFormattedName","useState","activeId","useContext","FileUploadContext","attributes","listeners","setNodeRef","transform","transition","useSortable","detailSectionRef","useRef","style","CSS","Translate","toString","sortableProps","isLoading","fileSize","FileUploadHelper","formatFileSizeDisplay","hasInlineActions","focusType","getTruncatedText","useCallback","value","widthOfElement","current","getBoundingClientRect","width","StringHelper","truncateOneLine","useEffect","handleDelete","handleEdit","handleKeyDown","event","stopPropagation","shouldDisable","shouldEnableSort","renderNameDescription","_jsxs","_Fragment","children","_jsx","Typography","BodyMD","weight","className","styles.itemDescriptionLabel","_a","styles.itemDescriptionText","Object","assign","ref","styles.item","DSDragHandleIcon","styles.dragHandleIcon","styles.box","shouldShowThumbnail","type","PDF_MIME_TYPE","content","styles.nameSection","BodySM","styles.desktopErrorMessage","ExclamationCircleFillIcon","styles.errorIcon","styles.fileSizeSection","styles.fileSizeText","styles.mobileErrorMessage","thumbnail","FileListItemThumbnail","fileType","styles.extendedNameSection","styles.descriptionFileSizeText","styles.inlineActionContainer","Button","styleType","sizeType","onClick","onKeyDown","icon","PencilIcon","styles.iconButton","BinIcon","renderFileContent","styles.contentSection","renderContents","ProgressBar","styles.actionContainer","renderActions"],"mappings":"k2BAgCA,MAkbaA,EAAeC,EAAAA,MAlbV,EACdC,WACAC,WACAC,WACAC,eACAC,WACAC,WACAC,mBACAC,WACAC,kBAKA,MAAMC,GACFA,EAAEC,KACFA,EAAIC,KACJA,EAAIC,YACJA,EAAWC,SACXA,EAAW,EAACC,aACZA,EAAYC,sBACZA,EAAqBC,aACrBA,GAAe,GACfhB,GACGiB,EAAeC,GAAoBC,cACpCC,SAAEA,GAAaC,EAAAA,WAAWC,sBAG1BC,WAAEA,EAAUC,UAAEA,EAASC,WAAEA,EAAUC,UAAEA,EAASC,WAAEA,GAClDC,EAAAA,YAAY,CAAEnB,OACZoB,EAAmBC,EAAAA,OAAuB,MAC1CC,EAAQ,CACVL,UAAWM,EAAAA,IAAIC,UAAUC,SAASR,GAClCC,cAGEQ,+BACFJ,SACGR,GACAC,GAIDY,EAAYvB,EAAW,EACvBwB,EAAWC,EAAAA,iBAAiBC,sBAAsB5B,GAClD6B,IAAqB5B,KAAiBX,EACtCwC,EAA2BrB,EAC3BA,IAAaX,EACT,OACA,SACJ,OAKAiC,EAAmBC,eACpBC,IACG,IAAK5B,EAAc,OAAO4B,EAE1B,MAAMC,EACFhB,GAAoBA,EAAiBiB,QAC/BjB,EAAiBiB,QAAQC,wBAAwBC,MACjD,EAEV,OAAOC,EAAAA,aAAaC,gBAChBN,EACAC,EACAA,EAAiB,EACjBA,EAAiB,EAAI,EACrB,GACH,GAEL,CAAC7B,IAMLmC,EAAAA,WAAU,KACNjC,EAA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O,aACJ,UAAUxF,aAAgBI,IACtCqF,QAAS/C,EACTe,UAAWoC,EAAAA,WACXF,KAAMtC,EAAAA,IAACyC,UAAO,CAAA,eAAA,MAGfpE,EAEH2B,EAAAA,IAAC6C,eACG/F,SAAUA,EAAQ,cACL,GAAGJ,mBAKpBmD,EAAAA,KAAAC,EAAAA,SAAA,CAAAC,SAAA,CACK7D,GACG8D,EAAAA,IAACiC,EAAAA,OAAM,CAAA,cAEU,GAAGvF,8BACJ,OACZsE,KAAK,SACLkB,UAAU,QACVC,SAAS,QAAO,aACJ,QAAQxF,IACpBN,SAAUqD,IACV0C,QAAS9C,EACT+C,UAAW9C,EACX+C,KAAMtC,MAACuC,EAAAA,WAAU,CAAA,eAAA,IACjBnC,UAAWoC,EAAAA,YAXP,QAcZxC,EAAAA,IAACiC,EAAAA,OAAM,CAAA,cAEU,GAAGvF,kBAAkB,cACtB,OACZsE,KAAK,SACLkB,UAAU,QACVC,SAAS,QAAO,aACJ,UAAUxF,IACtBN,SAAUqD,IACV0C,QAAS/C,EACTgD,UAAW9C,EACX+C,KAAMtC,EAAAA,IAACyC,EAAAA,QAAO,CAAA,eAAA,IACdrC,UAAWoC,EAAAA,YAXP,aAkBhBxC,EAAAA,IAAA,MAAA,CACII,UAAW0C,EAAAA,gBAAsB,sBApPpC/F,GAAgBsB,EACV,WAGNtB,GAAgBb,EACV,gBADX,EAiPsD6D,SAE7CmB,GACC,EA0BiC6B,SAEtC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./file-list-item.
|
|
1
|
+
"use strict";require("./file-list-item.styles_o8000f.css");exports.actionContainer="a3rvfgv",exports.box="bddx9rr",exports.contentSection="c1dhzflv",exports.descriptionFileSizeText="divlkvo",exports.desktopErrorMessage="d1gk2zsk",exports.dragHandleIcon="dqb8x5u",exports.errorIcon="eap0p9n",exports.extendedNameSection="elwke9e",exports.fileSizeSection="f14h64yt",exports.fileSizeText="f1wv8fjl",exports.iconButton="ilou5qo",exports.inlineActionContainer="i5ozu70",exports.item="i18pxk0j",exports.itemDescriptionLabel="i1jm950n",exports.itemDescriptionText="i1vgco4e",exports.mobileErrorMessage="m1wh4bod",exports.nameSection="nk38w4a";
|
|
2
2
|
//# sourceMappingURL=file-list-item.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-list-item.styles.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport {\n Border,\n Colour,\n MediaQuery,\n Radius,\n Shadow,\n Spacing,\n} from \"../../theme\";\n\nexport type ItemFocusType = \"self\" | \"others\" | \"none\";\n\nexport const item = css`\n display: flex;\n align-items: center;\n width: 100%;\n border: none;\n\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n &[data-item-state=\"disabled\"] {\n cursor: not-allowed;\n }\n\n &[data-item-state=\"sortable\"] {\n &:hover {\n cursor: grab;\n }\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n\n &[data-item-state=\"sortable-active\"] {\n cursor: grabbing;\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n`;\n\nexport const dragHandleIcon = css`\n margin-right: ${Spacing[\"spacing-16\"]};\n height: 1.5rem;\n width: 1.5rem;\n color: ${Colour[\"icon\"]};\n\n &[data-drag-handle-state=\"active\"] {\n color: ${Colour[\"icon-primary\"]};\n }\n\n &[data-drag-handle-state=\"disabled\"] {\n color: ${Colour[\"icon-disabled\"]};\n }\n`;\n\nexport const box = css`\n background: ${Colour[\"bg-primary-subtlest\"]};\n border: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${Colour[\"border\"]};\n border-radius: ${Radius[\"sm\"]};\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-32\"]};\n display: flex;\n align-items: center;\n width: 100%;\n\n ${MediaQuery.MaxWidth.md} {\n padding: ${Spacing[\"spacing-16\"]};\n }\n\n &[data-box-state=\"focused\"] {\n border-color: ${Colour[\"border-focus\"]};\n box-shadow: ${Shadow[\"xs-focus-strong\"]};\n }\n\n &[data-box-state=\"disabled\"] {\n border-color: ${Colour[\"border-disabled\"]};\n }\n\n &[data-box-state=\"error\"] {\n background: ${Colour[\"bg-error\"]};\n border-color: ${Colour[\"border-error\"]};\n }\n\n &[data-stack-mobile=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n flex: 1;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n width: 100%;\n align-items: flex-start;\n }\n\n &[data-has-thumbnail=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: row;\n align-items: center;\n }\n }\n`;\n\nexport const nameSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n`;\n\nexport const extendedNameSection = css`\n display: flex;\n flex: 1;\n align-items:
|
|
1
|
+
{"version":3,"file":"file-list-item.styles.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport {\n Border,\n Colour,\n Font,\n MediaQuery,\n Radius,\n Shadow,\n Spacing,\n} from \"../../theme\";\n\nexport type ItemFocusType = \"self\" | \"others\" | \"none\";\n\nexport const item = css`\n display: flex;\n align-items: center;\n width: 100%;\n border: none;\n\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n &[data-item-state=\"disabled\"] {\n cursor: not-allowed;\n }\n\n &[data-item-state=\"sortable\"] {\n &:hover {\n cursor: grab;\n }\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n\n &[data-item-state=\"sortable-active\"] {\n cursor: grabbing;\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n`;\n\nexport const dragHandleIcon = css`\n margin-right: ${Spacing[\"spacing-16\"]};\n height: 1.5rem;\n width: 1.5rem;\n color: ${Colour[\"icon\"]};\n\n &[data-drag-handle-state=\"active\"] {\n color: ${Colour[\"icon-primary\"]};\n }\n\n &[data-drag-handle-state=\"disabled\"] {\n color: ${Colour[\"icon-disabled\"]};\n }\n`;\n\nexport const box = css`\n background: ${Colour[\"bg-primary-subtlest\"]};\n border: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${Colour[\"border\"]};\n border-radius: ${Radius[\"sm\"]};\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-32\"]};\n display: flex;\n align-items: center;\n width: 100%;\n\n ${MediaQuery.MaxWidth.md} {\n padding: ${Spacing[\"spacing-16\"]};\n }\n\n &[data-box-state=\"focused\"] {\n border-color: ${Colour[\"border-focus\"]};\n box-shadow: ${Shadow[\"xs-focus-strong\"]};\n }\n\n &[data-box-state=\"disabled\"] {\n border-color: ${Colour[\"border-disabled\"]};\n }\n\n &[data-box-state=\"error\"] {\n background: ${Colour[\"bg-error\"]};\n border-color: ${Colour[\"border-error\"]};\n }\n\n &[data-stack-mobile=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n flex: 1;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n width: 100%;\n align-items: flex-start;\n }\n\n &[data-has-thumbnail=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: row;\n align-items: center;\n }\n }\n`;\n\nexport const nameSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n`;\n\nexport const extendedNameSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: flex-start;\n\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n }\n`;\n\nexport const fileSizeSection = css`\n display: flex;\n width: 5rem;\n margin-left: ${Spacing[\"spacing-8\"]};\n justify-content: flex-end;\n\n &[data-mobile-visibility=\"hidden\"] {\n ${MediaQuery.MaxWidth.md} {\n display: none;\n visibility: hidden;\n }\n }\n\n &[data-mobile-visibility=\"expand\"] {\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-8\"]};\n justify-content: flex-start;\n }\n }\n`;\n\nexport const fileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n`;\n\nexport const descriptionFileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n margin-top: ${Spacing[\"spacing-16\"]};\n`;\n\nexport const itemDescriptionLabel = css`\n ${Font[\"form-label\"]}\n font-weight: ${Font.Spec[\"weight-semibold\"]};\n color: ${Colour[\"text-subtle\"]};\n margin-top: ${Spacing[\"spacing-16\"]};\n`;\n\nexport const itemDescriptionText = css`\n margin-top: ${Spacing[\"spacing-4\"]};\n`;\n\nexport const errorIcon = css`\n height: 1lh;\n width: 1em;\n flex-shrink: 0;\n color: ${Colour[\"icon-error-strong\"]};\n`;\n\nexport const desktopErrorMessage = css`\n color: ${Colour[\"text-error\"]};\n margin-top: ${Spacing[\"spacing-4\"]};\n display: flex;\n gap: ${Spacing[\"spacing-4\"]};\n\n ${MediaQuery.MaxWidth.md} {\n display: none;\n visibility: hidden;\n }\n`;\n\nexport const mobileErrorMessage = css`\n color: ${Colour[\"text-error\"]};\n display: none;\n visibility: hidden;\n\n ${MediaQuery.MaxWidth.md} {\n display: flex;\n gap: ${Spacing[\"spacing-4\"]};\n visibility: visible;\n margin-top: ${Spacing[\"spacing-8\"]};\n }\n`;\n\nexport const actionContainer = css`\n width: 6rem;\n margin-left: ${Spacing[\"spacing-32\"]};\n display: flex;\n justify-content: flex-end;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n width: fit-content;\n }\n\n &[data-mobile-layout=\"loading\"] {\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-16\"]};\n width: 100%;\n }\n }\n\n &[data-mobile-layout=\"editable\"] {\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-16\"]};\n align-self: flex-end;\n }\n }\n`;\n\nexport const inlineActionContainer = css`\n width: 100%;\n margin-top: ${Spacing[\"spacing-16\"]};\n display: flex;\n justify-content: flex-end;\n align-items: center;\n`;\n\nexport const iconButton = css`\n min-width: unset;\n\n &:not(:last-child) {\n margin-right: ${Spacing[\"spacing-8\"]};\n }\n`;\n"],"names":[],"mappings":"6HAgN4B,sBAnJZ,iCAmCW,2CAgES,sCAuBJ,kCAzIL,4BAkIL,sCAtDU,kCAWJ,gCAuBH,8BAwFF,wCARW,uBA9NjB,wCAuJgB,uCAOD,sCAuBD,+BAhFP"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@layer fds{.i18pxk0j{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;width:100%;border:none;}.i18pxk0j:not(:last-child){margin-bottom:var(--fds-spacing-16);}.i18pxk0j[data-item-state="disabled"]{cursor:not-allowed;}.i18pxk0j[data-item-state="sortable"]{touch-action:manipulation;}.i18pxk0j[data-item-state="sortable"]:hover{cursor:-webkit-grab;cursor:grab;}.i18pxk0j[data-item-state="sortable-active"]{cursor:-webkit-grabbing;cursor:grabbing;touch-action:manipulation;}
|
|
2
|
+
.dqb8x5u{margin-right:var(--fds-spacing-16);height:1.5rem;width:1.5rem;color:var(--fds-colour-icon);}.dqb8x5u[data-drag-handle-state="active"]{color:var(--fds-colour-icon-primary);}.dqb8x5u[data-drag-handle-state="disabled"]{color:var(--fds-colour-icon-disabled);}
|
|
3
|
+
.bddx9rr{background:var(--fds-colour-bg-primary-subtlest);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-sm);padding:var(--fds-spacing-16) var(--fds-spacing-32);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;width:100%;}:where(body.fds-breakpoint-md-max) .bddx9rr{padding:var(--fds-spacing-16);}.bddx9rr[data-box-state="focused"]{border-color:var(--fds-colour-border-focus);box-shadow:var(--fds-shadow-xs-focus-strong);}.bddx9rr[data-box-state="disabled"]{border-color:var(--fds-colour-border-disabled);}.bddx9rr[data-box-state="error"]{background:var(--fds-colour-bg-error);border-color:var(--fds-colour-border-error);}:where(body.fds-breakpoint-md-max) .bddx9rr[data-stack-mobile="true"]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
|
|
4
|
+
.c1dhzflv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}:where(body.fds-breakpoint-md-max) .c1dhzflv{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}:where(body.fds-breakpoint-md-max) .c1dhzflv[data-has-thumbnail="true"]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
5
|
+
.nk38w4a{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;}
|
|
6
|
+
.elwke9e{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}:where(body.fds-breakpoint-md-max) .elwke9e{width:100%;}
|
|
7
|
+
.f14h64yt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:5rem;margin-left:var(--fds-spacing-8);-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;}:where(body.fds-breakpoint-md-max) .f14h64yt[data-mobile-visibility="hidden"]{display:none;visibility:hidden;}:where(body.fds-breakpoint-md-max) .f14h64yt[data-mobile-visibility="expand"]{width:100%;margin-left:0;margin-top:var(--fds-spacing-8);-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}
|
|
8
|
+
.f1wv8fjl{color:var(--fds-colour-text-subtler);}
|
|
9
|
+
.divlkvo{color:var(--fds-colour-text-subtler);margin-top:var(--fds-spacing-16);}
|
|
10
|
+
.i1jm950n{font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-form-label-size);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-form-label-lh);letter-spacing:var(--fds-font-form-label-ls);font-weight:var(--fds-font-weight-semibold);color:var(--fds-colour-text-subtle);margin-top:var(--fds-spacing-16);}
|
|
11
|
+
.i1vgco4e{margin-top:var(--fds-spacing-4);}
|
|
12
|
+
.eap0p9n{height:1lh;width:1em;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;color:var(--fds-colour-icon-error-strong);}
|
|
13
|
+
.d1gk2zsk{color:var(--fds-colour-text-error);margin-top:var(--fds-spacing-4);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--fds-spacing-4);}:where(body.fds-breakpoint-md-max) .d1gk2zsk{display:none;visibility:hidden;}
|
|
14
|
+
.m1wh4bod{color:var(--fds-colour-text-error);display:none;visibility:hidden;}:where(body.fds-breakpoint-md-max) .m1wh4bod{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--fds-spacing-4);visibility:visible;margin-top:var(--fds-spacing-8);}
|
|
15
|
+
.a3rvfgv{width:6rem;margin-left:var(--fds-spacing-32);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}:where(body.fds-breakpoint-md-max) .a3rvfgv{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}:where(body.fds-breakpoint-md-max) .a3rvfgv[data-mobile-layout="loading"]{margin-left:0;margin-top:var(--fds-spacing-16);width:100%;}:where(body.fds-breakpoint-md-max) .a3rvfgv[data-mobile-layout="editable"]{margin-left:0;margin-top:var(--fds-spacing-16);-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;}
|
|
16
|
+
.i5ozu70{width:100%;margin-top:var(--fds-spacing-16);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
|
|
17
|
+
.ilou5qo{min-width:unset;}.ilou5qo:not(:last-child){margin-right:var(--fds-spacing-8);}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../alert/alert.js"),l=require("../button/button.js"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../alert/alert.js"),l=require("../button/button.js"),i=require("../markup/markup.js"),s=require("../typography/index.js"),a=require("./context.js"),n=require("./dropzone.js"),o=require("./file-list/file-list.js"),d=require("./file-upload.styles.js");exports.FileUpload=({styleType:u="bordered",fileItems:c,title:p,description:m,maxFiles:h,warning:y,className:x,name:b,id:j,"data-testid":g,accept:f,capture:v,multiple:q,disabled:B,sortable:N=!1,fileDescriptionMaxLength:D,editableFileItems:T=!1,descriptionRequired:C=!0,descriptionLabel:F,errorMessage:I,readOnly:L,customLabels:M,onChange:k,onDelete:z,onEdit:A,onSort:S})=>{const U={uploadButton:(null==M?void 0:M.uploadButtonLabel)||"Upload files"},w=r.useRef(null),R=r.useRef(null),[O,E]=r.useState(),P=e=>{var r;if(void 0===h)return e;const t=null!==(r=null==c?void 0:c.length)&&void 0!==r?r:0,l=Math.max(h-t,0);return e.slice(0,l)},$=()=>!(!h||!c)&&c.length>=h;return e.jsx(a.FileUploadContext.Provider,{value:{activeId:O,setActiveId:E},children:e.jsxs(n.FileUploadDropzone,{ref:w,onChange:e=>{var r;const t=P(e);!B&&k&&t.length>0&&(k(t),null===(r=R.current)||void 0===r||r.focus())},id:j?`${j}-dropzone`:"dropzone",accept:f,capture:v,border:"bordered"===u,className:x,"data-testid":g,name:b,multiple:q,disabled:B||$()||L,children:[!(!p&&!m)&&e.jsxs("div",{className:d.textContainer,children:[p?"string"==typeof p?e.jsx(s.Typography.BodyBL,{children:p}):e.jsx(i.Markup,{className:d.markupContainer,baseTextSize:"body-baseline",children:p}):null,m?"string"==typeof m?e.jsx(s.Typography.BodyMD,{className:d.description,children:m}):e.jsx(i.Markup,{className:d.markupContainer,baseTextSize:"body-md",children:m}):null]}),!!y&&e.jsx(t.Alert,{className:d.warningAlert,type:"warning",children:y}),e.jsx(o.FileList,{ref:R,fileItems:c,editableFileItems:T,descriptionRequired:C,descriptionLabel:F,fileDescriptionMaxLength:D,sortable:N,disabled:B,readOnly:L,onItemDelete:e=>{var r;z&&(z(e),null===(r=R.current)||void 0===r||r.focus())},onItemUpdate:e=>{A&&A(e)},onSort:e=>{S&&S(e)}}),I&&e.jsx(t.Alert,{className:d.errorAlert,type:"error",children:I}),!L&&e.jsxs("div",{className:d.uploadButtonContainer,children:[e.jsx(l.Button,{type:"button",sizeType:"small",styleType:"secondary",disabled:!!O||B||$(),onClick:e=>{B||(e.preventDefault(),w.current&&w.current.openFileDialog())},className:d.uploadButton,children:U.uploadButton}),e.jsx(s.Typography.BodyMD,{className:d.uploadButtonText,weight:"semibold",children:"or drop them here"})]})]})})};
|
|
2
2
|
//# sourceMappingURL=file-upload.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload.js","sources":["../../../src/file-upload/file-upload.tsx"],"sourcesContent":["import { useRef, useState } from \"react\";\n\nimport { Alert } from \"../alert\";\nimport { Button } from \"../button\";\nimport { Markup } from \"../markup\";\nimport { Typography } from \"../typography\";\nimport { FileUploadContext } from \"./context\";\nimport type { DropzoneElement } from \"./dropzone\";\nimport { FileUploadDropzone } from \"./dropzone\";\nimport type { FileListRef } from \"./file-list\";\nimport { FileList } from \"./file-list\";\nimport * as styles from \"./file-upload.styles\";\nimport type { FileItemProps, FileUploadProps } from \"./types\";\n\nexport const FileUpload = ({\n styleType = \"bordered\",\n fileItems,\n title,\n description,\n maxFiles,\n warning,\n className,\n name,\n id,\n \"data-testid\": testId,\n accept,\n capture,\n multiple,\n disabled,\n sortable = false,\n fileDescriptionMaxLength,\n editableFileItems = false,\n errorMessage,\n readOnly,\n customLabels,\n onChange,\n onDelete,\n onEdit,\n onSort,\n}: FileUploadProps) => {\n const labels = {\n uploadButton: customLabels?.uploadButtonLabel || \"Upload files\",\n };\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const dropzoneRef = useRef<DropzoneElement>(null);\n const fileListRef = useRef<FileListRef>(null);\n const [activeId, setActiveId] = useState<string>();\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleChange = (files: File[]) => {\n const filesToProcess = limitIncomingFiles(files);\n\n if (!disabled && onChange && filesToProcess.length > 0) {\n onChange(filesToProcess);\n fileListRef.current?.focus();\n }\n };\n\n const handleItemDelete = (item: FileItemProps) => {\n if (onDelete) {\n onDelete(item);\n fileListRef.current?.focus();\n }\n };\n\n const handleUploadButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!disabled) {\n event.preventDefault();\n if (dropzoneRef.current) {\n dropzoneRef.current.openFileDialog();\n }\n }\n };\n\n const handleItemUpdate = (updatedItem: FileItemProps) => {\n if (onEdit) {\n onEdit(updatedItem);\n }\n };\n\n const handleSort = (updatedItems: FileItemProps[]) => {\n if (onSort) {\n onSort(updatedItems);\n }\n };\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const limitIncomingFiles = (files: File[]) => {\n if (maxFiles === undefined) {\n return files;\n }\n\n const existingItemsCount = fileItems?.length ?? 0;\n const remainingSlots = Math.max(maxFiles - existingItemsCount, 0);\n\n return files.slice(0, remainingSlots);\n };\n\n const reachedMaxFiles = () => {\n return maxFiles && fileItems ? fileItems.length >= maxFiles : false;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderTitle = () => {\n if (!title) {\n return null;\n }\n\n if (typeof title === \"string\") {\n return <Typography.BodyBL>{title}</Typography.BodyBL>;\n }\n\n return (\n <Markup\n className={styles.markupContainer}\n baseTextSize=\"body-baseline\"\n >\n {title}\n </Markup>\n );\n };\n\n const renderDescription = () => {\n if (!description) {\n return null;\n }\n\n if (typeof description === \"string\") {\n return (\n <Typography.BodyMD className={styles.description}>\n {description}\n </Typography.BodyMD>\n );\n }\n\n return (\n <Markup className={styles.markupContainer} baseTextSize=\"body-md\">\n {description}\n </Markup>\n );\n };\n\n return (\n <FileUploadContext.Provider value={{ activeId, setActiveId }}>\n <FileUploadDropzone\n ref={dropzoneRef}\n onChange={handleChange}\n id={id ? `${id}-dropzone` : \"dropzone\"}\n accept={accept}\n capture={capture}\n border={styleType === \"bordered\"}\n className={className}\n data-testid={testId}\n name={name}\n multiple={multiple}\n disabled={disabled || reachedMaxFiles() || readOnly}\n >\n {!!(title || description) && (\n <div className={styles.textContainer}>\n {renderTitle()}\n {renderDescription()}\n </div>\n )}\n {!!warning && (\n <Alert className={styles.warningAlert} type=\"warning\">\n {warning}\n </Alert>\n )}\n <FileList\n ref={fileListRef}\n fileItems={fileItems}\n editableFileItems={editableFileItems}\n fileDescriptionMaxLength={fileDescriptionMaxLength}\n sortable={sortable}\n disabled={disabled}\n readOnly={readOnly}\n onItemDelete={handleItemDelete}\n onItemUpdate={handleItemUpdate}\n onSort={handleSort}\n />\n {errorMessage && (\n <Alert className={styles.errorAlert} type=\"error\">\n {errorMessage}\n </Alert>\n )}\n {!readOnly && (\n <div className={styles.uploadButtonContainer}>\n <Button\n type=\"button\"\n sizeType=\"small\"\n styleType=\"secondary\"\n disabled={\n !!activeId || disabled || reachedMaxFiles()\n }\n onClick={handleUploadButtonClick}\n className={styles.uploadButton}\n >\n {labels.uploadButton}\n </Button>\n <Typography.BodyMD\n className={styles.uploadButtonText}\n weight=\"semibold\"\n >\n or drop them here\n </Typography.BodyMD>\n </div>\n )}\n </FileUploadDropzone>\n </FileUploadContext.Provider>\n );\n};\n"],"names":["styleType","fileItems","title","description","maxFiles","warning","className","name","id","testId","accept","capture","multiple","disabled","sortable","fileDescriptionMaxLength","editableFileItems","errorMessage","readOnly","customLabels","onChange","onDelete","onEdit","onSort","labels","uploadButton","uploadButtonLabel","dropzoneRef","useRef","fileListRef","activeId","setActiveId","useState","limitIncomingFiles","files","undefined","existingItemsCount","_a","length","remainingSlots","Math","max","slice","reachedMaxFiles","_jsx","FileUploadContext","Provider","value","children","_jsxs","FileUploadDropzone","ref","filesToProcess","current","focus","border","styles.textContainer","Typography","BodyBL","Markup","styles.markupContainer","baseTextSize","BodyMD","styles.description","Alert","styles.warningAlert","type","FileList","onItemDelete","item","onItemUpdate","updatedItem","updatedItems","styles.errorAlert","styles.uploadButtonContainer","Button","sizeType","onClick","event","preventDefault","openFileDialog","styles.uploadButton","styles.uploadButtonText","weight"],"mappings":"iVAc0B,EACtBA,YAAY,WACZC,YACAC,QACAC,cACAC,WACAC,UACAC,YACAC,OACAC,KACA,cAAeC,EACfC,SACAC,UACAC,WACAC,WACAC,YAAW,EACXC,2BACAC,qBAAoB,EACpBC,eACAC,WACAC,eACAC,WACAC,WACAC,SACAC,aAEA,MAAMC,EAAS,CACXC,cAAcN,e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AAA,IAACe,SAAM,CAACrD,UAAWsD,EAAAA,gBAAwBC,aAAa,mBACnD1D,IAbE,UAuCAE,GACCuC,EAAAA,IAACoB,EAAAA,MAAK,CAAC1D,UAAW2D,EAAAA,aAAqBC,KAAK,UAASlB,SAChD3C,IAGTuC,MAACuB,EAAAA,SAAQ,CACLhB,IAAKtB,EACL5B,UAAWA,EACXe,kBAAmBA,EACnBD,yBAA0BA,EAC1BD,SAAUA,EACVD,SAAUA,EACVK,SAAUA,EACVkD,aA5HUC,UAClBhD,IACAA,EAASgD,GACU,QAAnBhC,EAAAR,EAAYwB,eAAO,IAAAhB,GAAAA,EAAEiB,QACzB,EAyHYgB,aA3GUC,IAClBjD,GACAA,EAAOiD,EACX,EAyGYhD,OAtGIiD,IACZjD,GACAA,EAAOiD,EACX,IAqGSvD,GACG2B,EAAAA,IAACoB,QAAK,CAAC1D,UAAWmE,aAAmBP,KAAK,QAAOlB,SAC5C/B,KAGPC,GACE+B,EAAAA,KAAA,MAAA,CAAK3C,UAAWoE,EAAAA,sBAA4B1B,SAAA,CACxCJ,EAAAA,IAAC+B,EAAAA,OAAM,CACHT,KAAK,SACLU,SAAS,QACT5E,UAAU,YACVa,WACMiB,GAAYjB,GAAY8B,IAE9BkC,QAtIpBC,IAEKjE,IACDiE,EAAMC,iBACFpD,EAAY0B,SACZ1B,EAAY0B,QAAQ2B,iBAE5B,EAgIoB1E,UAAW2E,EAAAA,aAAmBjC,SAE7BxB,EAAOC,eAEZmB,EAAAA,IAACa,EAAAA,WAAWK,OAAM,CACdxD,UAAW4E,EAAAA,iBACXC,OAAO,WAAUnC,SAAA,6BAOR"}
|
|
1
|
+
{"version":3,"file":"file-upload.js","sources":["../../../src/file-upload/file-upload.tsx"],"sourcesContent":["import { useRef, useState } from \"react\";\n\nimport { Alert } from \"../alert\";\nimport { Button } from \"../button\";\nimport { Markup } from \"../markup\";\nimport { Typography } from \"../typography\";\nimport { FileUploadContext } from \"./context\";\nimport type { DropzoneElement } from \"./dropzone\";\nimport { FileUploadDropzone } from \"./dropzone\";\nimport type { FileListRef } from \"./file-list\";\nimport { FileList } from \"./file-list\";\nimport * as styles from \"./file-upload.styles\";\nimport type { FileItemProps, FileUploadProps } from \"./types\";\n\n/** Allows user to upload images via drag-and-drop or a native file dialog. */\nexport const FileUpload = ({\n styleType = \"bordered\",\n fileItems,\n title,\n description,\n maxFiles,\n warning,\n className,\n name,\n id,\n \"data-testid\": testId,\n accept,\n capture,\n multiple,\n disabled,\n sortable = false,\n fileDescriptionMaxLength,\n editableFileItems = false,\n descriptionRequired = true,\n descriptionLabel,\n errorMessage,\n readOnly,\n customLabels,\n onChange,\n onDelete,\n onEdit,\n onSort,\n}: FileUploadProps) => {\n const labels = {\n uploadButton: customLabels?.uploadButtonLabel || \"Upload files\",\n };\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const dropzoneRef = useRef<DropzoneElement>(null);\n const fileListRef = useRef<FileListRef>(null);\n const [activeId, setActiveId] = useState<string>();\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleChange = (files: File[]) => {\n const filesToProcess = limitIncomingFiles(files);\n\n if (!disabled && onChange && filesToProcess.length > 0) {\n onChange(filesToProcess);\n fileListRef.current?.focus();\n }\n };\n\n const handleItemDelete = (item: FileItemProps) => {\n if (onDelete) {\n onDelete(item);\n fileListRef.current?.focus();\n }\n };\n\n const handleUploadButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!disabled) {\n event.preventDefault();\n if (dropzoneRef.current) {\n dropzoneRef.current.openFileDialog();\n }\n }\n };\n\n const handleItemUpdate = (updatedItem: FileItemProps) => {\n if (onEdit) {\n onEdit(updatedItem);\n }\n };\n\n const handleSort = (updatedItems: FileItemProps[]) => {\n if (onSort) {\n onSort(updatedItems);\n }\n };\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const limitIncomingFiles = (files: File[]) => {\n if (maxFiles === undefined) {\n return files;\n }\n\n const existingItemsCount = fileItems?.length ?? 0;\n const remainingSlots = Math.max(maxFiles - existingItemsCount, 0);\n\n return files.slice(0, remainingSlots);\n };\n\n const reachedMaxFiles = () => {\n return maxFiles && fileItems ? fileItems.length >= maxFiles : false;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderTitle = () => {\n if (!title) {\n return null;\n }\n\n if (typeof title === \"string\") {\n return <Typography.BodyBL>{title}</Typography.BodyBL>;\n }\n\n return (\n <Markup\n className={styles.markupContainer}\n baseTextSize=\"body-baseline\"\n >\n {title}\n </Markup>\n );\n };\n\n const renderDescription = () => {\n if (!description) {\n return null;\n }\n\n if (typeof description === \"string\") {\n return (\n <Typography.BodyMD className={styles.description}>\n {description}\n </Typography.BodyMD>\n );\n }\n\n return (\n <Markup className={styles.markupContainer} baseTextSize=\"body-md\">\n {description}\n </Markup>\n );\n };\n\n return (\n <FileUploadContext.Provider value={{ activeId, setActiveId }}>\n <FileUploadDropzone\n ref={dropzoneRef}\n onChange={handleChange}\n id={id ? `${id}-dropzone` : \"dropzone\"}\n accept={accept}\n capture={capture}\n border={styleType === \"bordered\"}\n className={className}\n data-testid={testId}\n name={name}\n multiple={multiple}\n disabled={disabled || reachedMaxFiles() || readOnly}\n >\n {!!(title || description) && (\n <div className={styles.textContainer}>\n {renderTitle()}\n {renderDescription()}\n </div>\n )}\n {!!warning && (\n <Alert className={styles.warningAlert} type=\"warning\">\n {warning}\n </Alert>\n )}\n <FileList\n ref={fileListRef}\n fileItems={fileItems}\n editableFileItems={editableFileItems}\n descriptionRequired={descriptionRequired}\n descriptionLabel={descriptionLabel}\n fileDescriptionMaxLength={fileDescriptionMaxLength}\n sortable={sortable}\n disabled={disabled}\n readOnly={readOnly}\n onItemDelete={handleItemDelete}\n onItemUpdate={handleItemUpdate}\n onSort={handleSort}\n />\n {errorMessage && (\n <Alert className={styles.errorAlert} type=\"error\">\n {errorMessage}\n </Alert>\n )}\n {!readOnly && (\n <div className={styles.uploadButtonContainer}>\n <Button\n type=\"button\"\n sizeType=\"small\"\n styleType=\"secondary\"\n disabled={\n !!activeId || disabled || reachedMaxFiles()\n }\n onClick={handleUploadButtonClick}\n className={styles.uploadButton}\n >\n {labels.uploadButton}\n </Button>\n <Typography.BodyMD\n className={styles.uploadButtonText}\n weight=\"semibold\"\n >\n or drop them here\n </Typography.BodyMD>\n </div>\n )}\n </FileUploadDropzone>\n </FileUploadContext.Provider>\n );\n};\n"],"names":["styleType","fileItems","title","description","maxFiles","warning","className","name","id","testId","accept","capture","multiple","disabled","sortable","fileDescriptionMaxLength","editableFileItems","descriptionRequired","descriptionLabel","errorMessage","readOnly","customLabels","onChange","onDelete","onEdit","onSort","labels","uploadButton","uploadButtonLabel","dropzoneRef","useRef","fileListRef","activeId","setActiveId","useState","limitIncomingFiles","files","undefined","existingItemsCount","_a","length","remainingSlots","Math","max","slice","reachedMaxFiles","_jsx","FileUploadContext","Provider","value","children","_jsxs","FileUploadDropzone","ref","filesToProcess","current","focus","border","styles.textContainer","Typography","BodyBL","Markup","styles.markupContainer","baseTextSize","BodyMD","styles.description","Alert","styles.warningAlert","type","FileList","onItemDelete","item","onItemUpdate","updatedItem","updatedItems","styles.errorAlert","styles.uploadButtonContainer","Button","sizeType","onClick","event","preventDefault","openFileDialog","styles.uploadButton","styles.uploadButtonText","weight"],"mappings":"2VAe0B,EACtBA,YAAY,WACZC,YACAC,QACAC,cACAC,WACAC,UACAC,YACAC,OACAC,KACA,cAAeC,EACfC,SACAC,UACAC,WACAC,WACAC,YAAW,EACXC,2BACAC,qBAAoB,EACpBC,uBAAsB,EACtBC,mBACAC,eACAC,WACAC,eACAC,WACAC,WACAC,SACAC,aAEA,MAAMC,EAAS,CACXC,cAAcN,eAAAA,EAAcO,oBAAqB,gBAK/CC,EAAcC,EAAAA,OAAwB,MACtCC,EAAcD,EAAAA,OAAoB,OACjCE,EAAUC,GAAeC,aA+C1BC,EAAsBC,UACxB,QAAiBC,IAAbjC,EACA,OAAOgC,EAGX,MAAME,EA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GTyC,EAAAA,IAACuB,EAAAA,SAAQ,CACLhB,IAAKtB,EACL9B,UAAWA,EACXe,kBAAmBA,EACnBC,oBAAqBA,EACrBC,iBAAkBA,EAClBH,yBAA0BA,EAC1BD,SAAUA,EACVD,SAAUA,EACVO,SAAUA,EACVkD,aA9HUC,UAClBhD,IACAA,EAASgD,GACU,QAAnBhC,EAAAR,EAAYwB,eAAO,IAAAhB,GAAAA,EAAEiB,QACzB,EA2HYgB,aA7GUC,IAClBjD,GACAA,EAAOiD,EACX,EA2GYhD,OAxGIiD,IACZjD,GACAA,EAAOiD,EACX,IAuGSvD,GACG2B,EAAAA,IAACoB,EAAAA,MAAK,CAAC5D,UAAWqE,EAAAA,WAAmBP,KAAK,QAAOlB,SAC5C/B,KAGPC,GACE+B,EAAAA,KAAA,MAAA,CAAK7C,UAAWsE,EAAAA,sBAA4B1B,SAAA,CACxCJ,EAAAA,IAAC+B,EAAAA,OAAM,CACHT,KAAK,SACLU,SAAS,QACT9E,UAAU,YACVa,WACMmB,GAAYnB,GAAYgC,IAE9BkC,QAxIpBC,IAEKnE,IACDmE,EAAMC,iBACFpD,EAAY0B,SACZ1B,EAAY0B,QAAQ2B,iBAE5B,EAkIoB5E,UAAW6E,EAAAA,aAAmBjC,SAE7BxB,EAAOC,eAEZmB,EAAAA,IAACa,aAAWK,OAAM,CACd1D,UAAW8E,EAAAA,iBACXC,OAAO,WAAUnC,SAAA,6BAOR"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
.t9vodht{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--fds-spacing-32);gap:var(--fds-spacing-8);}
|
|
1
|
+
@layer fds{.t9vodht{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--fds-spacing-32);gap:var(--fds-spacing-8);}
|
|
2
2
|
.m7vp3hf{color:var(--fds-colour-text);}
|
|
3
3
|
.dhybrj2{color:var(--fds-colour-text-subtler);}
|
|
4
4
|
.wq1el8u{margin-bottom:var(--fds-spacing-32);}
|
|
5
5
|
.u723luu{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}:where(body.fds-breakpoint-md-max) .u723luu{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
|
|
6
6
|
.u7dp799{width:10rem;}:where(body.fds-breakpoint-md-max) .u7dp799{width:100%;}
|
|
7
7
|
.u1rz06ff{color:var(--fds-colour-text-subtler);margin-top:var(--fds-spacing-8);width:10rem;text-align:center;}:where(body.fds-breakpoint-md-max) .u1rz06ff{display:none;visibility:hidden;}
|
|
8
|
-
.emjmrml{margin-bottom:var(--fds-spacing-32);}
|
|
8
|
+
.emjmrml{margin-bottom:var(--fds-spacing-32);}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./filter-item-checkbox.
|
|
1
|
+
"use strict";require("./filter-item-checkbox.styles_7degw7.css");exports.checkbox="c13wglju",exports.filterItem="f1m3a5f4",exports.group="g11488am",exports.groupMobileToggleMode="g1nnu0tt",exports.item="i4hhc1a",exports.itemHidden="i7vabkq",exports.itemSelected="i4eh8j6",exports.selectAllButton="sbvftpe",exports.toggle="twhh8xx",exports.toggleHidden="tb2fwos",exports.tokens={item:{level:"--fds-internal-filterItemCheckbox-item-level"}};
|
|
2
2
|
//# sourceMappingURL=filter-item-checkbox.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-item-checkbox.styles.js","sources":["../../../../src/filter/addons/filter-item-checkbox.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, MediaQuery, Spacing } from \"../../theme\";\n\nexport const tokens = {\n item: {\n level: \"--fds-internal-filterItemCheckbox-item-level\",\n },\n} as const;\n\nexport const filterItem = css`\n padding: 0 0 ${Spacing[\"spacing-16\"]};\n\n [data-id=\"content-container\"] {\n position: relative; // to get the item position relative to this parent\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-8\"]} 0;\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-20\"]}\n ${Spacing[\"spacing-8\"]};\n }\n }\n\n [data-id=\"minimise-button\"] {\n margin: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-20\"]} 0;\n }\n`;\n\nexport const group = css`\n display: flex;\n flex-direction: column;\n\n ${MediaQuery.MaxWidth.lg} {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n }\n`;\n\nexport const groupMobileToggleMode = css`\n ${MediaQuery.MaxWidth.lg} {\n gap: ${Spacing[\"spacing-16\"]};\n }\n`;\n\nexport const item = css`\n ${tokens.item.level}: 0;\n\n display: flex;\n align-items: flex-start;\n\n position: relative;\n width: 100%;\n min-height: 1.5rem;\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-12\"]};\n padding-left: calc(\n ${Spacing[\"spacing-12\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n\n cursor: pointer;\n ${Font[\"body-md-regular\"]}\n color: ${Colour[\"text\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-8\"]};\n padding-left: calc(\n ${Spacing[\"spacing-8\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n }\n`;\n\nexport const itemHidden = css`\n display: none;\n`;\n\nexport const itemSelected = css`\n color: ${Colour[\"text-selected\"]};\n`;\n\nexport const checkbox = css`\n flex-shrink: 0;\n margin-right: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const toggle = css`\n min-width: 5rem;\n`;\n\nexport const toggleHidden = css`\n visibility: hidden;\n`;\n\nexport const selectAllButton = css`\n height: fit-content;\n padding: 0;\n margin: ${Spacing[\"spacing-16\"]} 0 ${Spacing[\"spacing-8\"]}\n ${Spacing[\"spacing-12\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n margin: 0 0 ${Spacing[\"spacing-16\"]} 0;\n }\n`;\n"],"names":["item","level"],"mappings":"
|
|
1
|
+
{"version":3,"file":"filter-item-checkbox.styles.js","sources":["../../../../src/filter/addons/filter-item-checkbox.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, MediaQuery, Spacing } from \"../../theme\";\n\nexport const tokens = {\n item: {\n level: \"--fds-internal-filterItemCheckbox-item-level\",\n },\n} as const;\n\nexport const filterItem = css`\n padding: 0 0 ${Spacing[\"spacing-16\"]};\n\n [data-id=\"content-container\"] {\n position: relative; // to get the item position relative to this parent\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-8\"]} 0;\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-20\"]}\n ${Spacing[\"spacing-8\"]};\n }\n }\n\n [data-id=\"minimise-button\"] {\n margin: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-20\"]} 0;\n }\n`;\n\nexport const group = css`\n display: flex;\n flex-direction: column;\n\n ${MediaQuery.MaxWidth.lg} {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n }\n`;\n\nexport const groupMobileToggleMode = css`\n ${MediaQuery.MaxWidth.lg} {\n gap: ${Spacing[\"spacing-16\"]};\n }\n`;\n\nexport const item = css`\n ${tokens.item.level}: 0;\n\n display: flex;\n align-items: flex-start;\n\n position: relative;\n width: 100%;\n min-height: 1.5rem;\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-12\"]};\n padding-left: calc(\n ${Spacing[\"spacing-12\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n\n cursor: pointer;\n ${Font[\"body-md-regular\"]}\n color: ${Colour[\"text\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-8\"]};\n padding-left: calc(\n ${Spacing[\"spacing-8\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n }\n`;\n\nexport const itemHidden = css`\n display: none;\n`;\n\nexport const itemSelected = css`\n color: ${Colour[\"text-selected\"]};\n`;\n\nexport const checkbox = css`\n flex-shrink: 0;\n margin-right: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const toggle = css`\n min-width: 5rem;\n`;\n\nexport const toggleHidden = css`\n visibility: hidden;\n`;\n\nexport const selectAllButton = css`\n height: fit-content;\n padding: 0;\n margin: ${Spacing[\"spacing-16\"]} 0 ${Spacing[\"spacing-8\"]}\n ${Spacing[\"spacing-12\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n margin: 0 0 ${Spacing[\"spacing-16\"]} 0;\n }\n`;\n"],"names":["item","level"],"mappings":"+GAiFqB,8BAvEE,yBAkBL,yCAWgB,wBAMjB,6BA4BM,+BAIE,kCAiBG,yBART,+BAIM,yBAtFH,CAClBA,KAAM,CACFC,MAAO"}
|
|
@@ -1,10 +1,10 @@
|
|
|
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(
|
|
5
5
|
var(--fds-spacing-12) + var(--fds-internal-filterItemCheckbox-item-level) *
|
|
6
6
|
var(--fds-spacing-32)
|
|
7
|
-
);cursor:pointer;font-family:var(--fds-font-family);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-md);font-weight:var(--fds-font-weight-regular);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);color:var(--fds-colour-text);}:where(body.fds-breakpoint-lg-max) .i4hhc1a{padding:var(--fds-spacing-8);padding-left:calc(
|
|
7
|
+
);cursor:pointer;font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-md);font-weight:var(--fds-font-weight-regular);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);color:var(--fds-colour-text);}:where(body.fds-breakpoint-lg-max) .i4hhc1a{padding:var(--fds-spacing-8);padding-left:calc(
|
|
8
8
|
var(--fds-spacing-8) + var(--fds-internal-filterItemCheckbox-item-level) *
|
|
9
9
|
var(--fds-spacing-32)
|
|
10
10
|
);}
|
|
@@ -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;}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filter-badge.js","sources":["../../../src/filter/filter-badge.tsx"],"sourcesContent":["import { Badge } from \"../badge\";\n\ninterface FilterBadgeProps {\n count?: number;\n}\n\nexport const FilterBadge = ({ count }: FilterBadgeProps) =>\n count !== undefined && count > 0 ? (\n <Badge\n count={count}\n variant=\"square-number\"\n aria-label={`${count} selected`}\n />\n ) : null;\n"],"names":["count","undefined","_jsx","Badge","variant"],"mappings":"mGAM2B,EAAGA,gBAChBC,IAAVD,GAAuBA,EAAQ,EAC3BE,EAAAA,IAACC,EAAAA,MAAK,CACFH,MAAOA,EACPI,QAAQ,6BACI,GAAGJ,eAEnB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),i=require("@lifesg/react-icons/chevron-left"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),i=require("@lifesg/react-icons/chevron-left"),t=require("../button/button.js"),s=require("../shared/clickable-icon/clickable-icon.js"),r=require("./filter.styles.js"),l=require("./filter-item-page.styles.js");const a=({onDismiss:a,onDone:n,children:c,"data-testid":o})=>e.jsxs("div",{className:l.filterItemPageContainer,"data-testid":o,children:[e.jsx(s.ClickableIcon,{className:r.filterHeaderButton,onClick:a,focusOutline:"browser",focusHighlight:!1,"aria-label":"Dismiss",children:e.jsx(i.ChevronLeftIcon,{})}),e.jsx("div",{className:r.filterBody,children:c}),e.jsx("div",{className:r.filterFooter,children:e.jsx(t.Button,{className:r.filterDoneButton,onClick:n,type:"button",children:"Done"})})]});a.displayName="Filter.Page",exports.FilterItemPage=a;
|
|
2
2
|
//# sourceMappingURL=filter-item-page.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter-item-page.js","sources":["../../../src/filter/filter-item-page.tsx"],"sourcesContent":["import { ChevronLeftIcon } from \"@lifesg/react-icons/chevron-left\";\n\nimport { Button } from \"../button\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport * as filterStyles from \"./filter.styles\";\nimport * as styles from \"./filter-item-page.styles\";\nimport type { FilterPageProps } from \"./types\";\n\nexport const FilterItemPage = ({\n onDismiss,\n onDone,\n children,\n}: FilterPageProps) => {\n return (\n <div
|
|
1
|
+
{"version":3,"file":"filter-item-page.js","sources":["../../../src/filter/filter-item-page.tsx"],"sourcesContent":["import { ChevronLeftIcon } from \"@lifesg/react-icons/chevron-left\";\n\nimport { Button } from \"../button\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport * as filterStyles from \"./filter.styles\";\nimport * as styles from \"./filter-item-page.styles\";\nimport type { FilterPageProps } from \"./types\";\n\nexport const FilterItemPage = ({\n onDismiss,\n onDone,\n children,\n \"data-testid\": dataTestId,\n}: FilterPageProps) => {\n return (\n <div\n className={styles.filterItemPageContainer}\n data-testid={dataTestId}\n >\n <ClickableIcon\n className={filterStyles.filterHeaderButton}\n onClick={onDismiss}\n focusOutline=\"browser\"\n focusHighlight={false}\n aria-label=\"Dismiss\"\n >\n <ChevronLeftIcon />\n </ClickableIcon>\n <div className={filterStyles.filterBody}>{children}</div>\n <div className={filterStyles.filterFooter}>\n <Button\n className={filterStyles.filterDoneButton}\n onClick={onDone}\n type=\"button\"\n >\n Done\n </Button>\n </div>\n </div>\n );\n};\n\nFilterItemPage.displayName = \"Filter.Page\";\n"],"names":["FilterItemPage","onDismiss","onDone","children","dataTestId","_jsxs","className","styles.filterItemPageContainer","_jsx","ClickableIcon","filterStyles.filterHeaderButton","onClick","focusOutline","focusHighlight","ChevronLeftIcon","filterStyles.filterBody","filterStyles.filterFooter","Button","filterStyles.filterDoneButton","type","displayName"],"mappings":"iQAQO,MAAMA,EAAiB,EAC1BC,YACAC,SACAC,WACA,cAAeC,KAGXC,OAAA,MAAA,CACIC,UAAWC,EAAAA,wBAA8B,cAC5BH,YAEbI,EAAAA,IAACC,EAAAA,cAAa,CACVH,UAAWI,EAAAA,mBACXC,QAASV,EACTW,aAAa,UACbC,gBAAgB,EAAK,aACV,UAASV,SAEpBK,EAAAA,IAACM,EAAAA,gBAAe,CAAA,KAEpBN,EAAAA,IAAA,MAAA,CAAKF,UAAWS,EAAAA,oBAA0BZ,IAC1CK,EAAAA,IAAA,MAAA,CAAKF,UAAWU,EAAAA,sBACZR,MAACS,EAAAA,OAAM,CACHX,UAAWY,mBACXP,QAAST,EACTiB,KAAK,SAAQhB,SAAA,cASjCH,EAAeoB,YAAc"}
|
|
@@ -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;}}
|