@lifesg/react-design-system 4.0.0-alpha.3 → 4.0.0-alpha.4
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} +2 -2
- package/accordion/accordion.styles.js +1 -1
- package/{cjs/accordion/accordion.styles_ijglff.css → accordion/accordion.styles_bzrfrs.css} +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} +4 -4
- 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 +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} +2 -2
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.js.map +1 -1
- 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} +3 -3
- package/calendar/calendar.js +1 -1
- package/calendar/calendar.js.map +1 -1
- 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} +2 -2
- package/cjs/accordion/accordion.styles.js +1 -1
- package/{accordion/accordion.styles_ijglff.css → cjs/accordion/accordion.styles_bzrfrs.css} +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} +4 -4
- 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.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} +2 -2
- package/cjs/breadcrumb/breadcrumb.js +1 -1
- package/cjs/breadcrumb/breadcrumb.js.map +1 -1
- 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} +3 -3
- package/cjs/calendar/calendar.js +1 -1
- package/cjs/calendar/calendar.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} +1 -1
- package/cjs/dashed-border/dashed-border.js +1 -1
- package/cjs/dashed-border/dashed-border.js.map +1 -1
- 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} +1 -1
- package/cjs/date-input/date-input.js +1 -1
- package/cjs/date-input/date-input.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/divider/divider.js.map +1 -1
- 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/external/lodash/get.js +1 -1
- package/cjs/external/lodash/get.js.map +1 -1
- 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_oom8ii.css +16 -0
- 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_1ea12kj.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_1vrh1ve.css → file-list-item-thumbnail.styles_1y4si19.css} +1 -1
- package/cjs/file-upload/file-upload.js +1 -1
- package/cjs/file-upload/file-upload.js.map +1 -1
- package/cjs/filter/addons/filter-item-checkbox.styles.js +1 -1
- package/cjs/filter/addons/filter-item-checkbox.styles.js.map +1 -1
- package/cjs/filter/addons/{filter-item-checkbox.styles_18l87i2.css → filter-item-checkbox.styles_7degw7.css} +1 -1
- 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.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} +2 -2
- 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.styles.js +1 -1
- package/cjs/filter/filter.styles.js.map +1 -1
- package/cjs/filter/{filter.styles_2fmaok.css → filter.styles_1ykijwm.css} +1 -1
- package/cjs/form/form-label.styles.js +1 -1
- package/cjs/form/form-label.styles.js.map +1 -1
- package/cjs/form/form-label.styles_11r0652.css +6 -0
- package/cjs/form/form-wrapper.js +1 -1
- package/cjs/form/form-wrapper.js.map +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/image-button/image-button.styles.js +1 -1
- package/cjs/image-button/{image-button.styles_qtt605.css → image-button.styles_6n1qsr.css} +1 -1
- package/cjs/index.js +1 -1
- 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.styles.js +1 -1
- package/{input-group/input-group.styles_fpy81r.css → cjs/input-group/input-group.styles_bqye6f.css} +1 -1
- 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-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_1z0n7qq.css → dropdown-panel.styles_1qsjf8d.css} +1 -1
- 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_1blx9qm.css → link-container-variant.styles_1iw6zux.css} +1 -1
- package/cjs/layout/col-div.js +1 -1
- package/cjs/layout/col-div.js.map +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} +2 -2
- 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} +1 -1
- 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/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} +2 -2
- package/cjs/masthead/masthead.js +1 -1
- package/cjs/masthead/masthead.js.map +1 -1
- 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_1sav73f.css → modal.styles_1lbblx6.css} +1 -1
- 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/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} +7 -7
- package/cjs/navbar/navbar.js +1 -1
- package/cjs/navbar/navbar.js.map +1 -1
- 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} +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/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} +3 -3
- package/cjs/pill/pill.styles.js +1 -1
- package/{pill/pill.styles_1wiyl8.css → cjs/pill/pill.styles_xwrniu.css} +1 -1
- 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/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_11916eo.css → select-histogram.styles_n260dy.css} +1 -1
- 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} +4 -4
- 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} +4 -4
- 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} +2 -2
- 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-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/hooks/useViewport.js +1 -1
- package/cjs/shared/hooks/useViewport.js.map +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} +2 -2
- package/cjs/shared/internal-calendar/calendar-manager.styles.js +1 -1
- package/cjs/shared/internal-calendar/{calendar-manager.styles_1q13ylk.css → calendar-manager.styles_1iuq5zw.css} +1 -1
- 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} +1 -1
- 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} +1 -1
- 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} +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/{shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css → cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css} +1 -1
- 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/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_yp8cga.css → sidenav-drawer-item.styles_1ljnyx2.css} +1 -1
- 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-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} +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} +2 -2
- 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} +2 -2
- package/cjs/tag/tag.style.js +1 -1
- package/cjs/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +2 -2
- 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.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-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/{timeline/timeline.styles_1wcnzot.css → cjs/timeline/timeline.styles_1jxzik4.css} +1 -1
- 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/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} +1 -1
- 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} +5 -5
- 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_1155j4c.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_1dfjzc4.css → section-item.styles_mwx8ht.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.styles.js +1 -1
- package/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +1 -1
- package/dashed-border/dashed-border.js +1 -1
- package/dashed-border/dashed-border.js.map +1 -1
- 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} +1 -1
- package/date-input/date-input.js +1 -1
- package/date-input/date-input.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/divider/divider.js.map +1 -1
- package/e-signature/e-signature-canvas.js +1 -1
- package/e-signature/e-signature-canvas.js.map +1 -1
- 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/error-display/error-display-data.js +1 -1
- package/error-display/error-display-data.js.map +1 -1
- package/external/lodash/get.js +1 -1
- package/external/lodash/get.js.map +1 -1
- 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_oom8ii.css +16 -0
- package/file-upload/{file-list.d.ts → file-list/file-list.d.ts} +1 -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_1ea12kj.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_1vrh1ve.css → file-list-item-thumbnail.styles_1y4si19.css} +1 -1
- package/file-upload/file-upload.js +1 -1
- package/file-upload/file-upload.js.map +1 -1
- package/filter/addons/filter-item-checkbox.styles.js +1 -1
- package/filter/addons/filter-item-checkbox.styles.js.map +1 -1
- package/filter/addons/{filter-item-checkbox.styles_18l87i2.css → filter-item-checkbox.styles_7degw7.css} +1 -1
- 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.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} +2 -2
- 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 +3 -3
- 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} +1 -1
- package/filter/types.d.ts +2 -0
- package/form/form-label.styles.js +1 -1
- package/form/form-label.styles.js.map +1 -1
- package/form/form-label.styles_11r0652.css +6 -0
- package/form/form-wrapper.js +1 -1
- package/form/form-wrapper.js.map +1 -1
- package/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
- package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
- package/image-button/image-button.styles.js +1 -1
- package/image-button/{image-button.styles_qtt605.css → image-button.styles_6n1qsr.css} +1 -1
- package/index.d.ts +0 -1
- package/index.js +1 -1
- 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.styles.js +1 -1
- package/{cjs/input-group/input-group.styles_fpy81r.css → input-group/input-group.styles_bqye6f.css} +1 -1
- 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-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_1z0n7qq.css → dropdown-panel.styles_1qsjf8d.css} +1 -1
- 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_1blx9qm.css → link-container-variant.styles_1iw6zux.css} +1 -1
- package/layout/col-div.js +1 -1
- package/layout/col-div.js.map +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} +2 -2
- 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} +1 -1
- 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/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} +2 -2
- package/masthead/masthead.js +1 -1
- package/masthead/masthead.js.map +1 -1
- 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_1sav73f.css → modal.styles_1lbblx6.css} +1 -1
- 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/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} +7 -7
- package/navbar/navbar.js +1 -1
- package/navbar/navbar.js.map +1 -1
- 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} +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/package.json +14 -9
- 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} +3 -3
- package/pill/pill.styles.js +1 -1
- package/{cjs/pill/pill.styles_1wiyl8.css → pill/pill.styles_xwrniu.css} +1 -1
- package/predictive-text-input/predictive-text-input.js +1 -1
- package/predictive-text-input/predictive-text-input.js.map +1 -1
- 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_11916eo.css → select-histogram.styles_n260dy.css} +1 -1
- 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} +4 -4
- 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} +4 -4
- 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} +2 -2
- 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-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/hooks/useViewport.d.ts +7 -2
- package/shared/hooks/useViewport.js +1 -1
- package/shared/hooks/useViewport.js.map +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} +2 -2
- package/shared/internal-calendar/calendar-manager.styles.js +1 -1
- package/shared/internal-calendar/{calendar-manager.styles_1q13ylk.css → calendar-manager.styles_1iuq5zw.css} +1 -1
- 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} +1 -1
- 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} +1 -1
- 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} +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/{cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css → shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css} +1 -1
- 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/sidenav/sidenav-drawer-item.styles.js +1 -1
- package/sidenav/sidenav-drawer-item.styles.js.map +1 -1
- package/sidenav/{sidenav-drawer-item.styles_yp8cga.css → sidenav-drawer-item.styles_1ljnyx2.css} +1 -1
- 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-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} +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} +2 -2
- 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} +2 -2
- package/tag/tag.style.js +1 -1
- package/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +2 -2
- 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 +30 -1
- package/theme/styles/bookingsg.css +30 -1
- package/theme/styles/careercompass.css +516 -0
- package/theme/styles/ccube.css +28 -0
- package/theme/styles/default.css +2 -1
- package/theme/styles/imda.css +30 -1
- package/theme/styles/lifesg.css +28 -0
- package/theme/styles/mylegacy.css +30 -1
- package/theme/styles/oneservice.css +28 -0
- package/theme/styles/pa.css +30 -1
- package/theme/styles/rbs.css +28 -0
- package/theme/styles/sgw-digital-lobby.css +32 -3
- package/theme/styles/smgs.css +516 -0
- package/theme/styles/spf.css +143 -114
- package/theme/styles/supportgowhere.css +30 -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/token-resolver.js +1 -1
- package/theme/utils/token-resolver.js.map +1 -1
- 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-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/{cjs/timeline/timeline.styles_1wcnzot.css → timeline/timeline.styles_1jxzik4.css} +1 -1
- 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/toast/toast.styles.js +1 -1
- package/toast/toast.styles.js.map +1 -1
- package/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +1 -1
- 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} +5 -5
- package/typography/index.js +1 -1
- 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_1155j4c.css +11 -0
- 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_1dfjzc4.css → section-item.styles_mwx8ht.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/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/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
- package/cjs/input-textarea/textarea.styles_g0zgyq.css +0 -5
- package/cjs/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
- 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-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/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/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-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/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/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/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
- package/input-textarea/textarea.styles_g0zgyq.css +0 -5
- package/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
- 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-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/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
- package/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.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-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/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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullscreen-image-carousel.js","sources":["../../../src/fullscreen-image-carousel/fullscreen-image-carousel.tsx"],"sourcesContent":["import {\n ChevronLeftIcon,\n ChevronRightIcon,\n CrossIcon,\n MagnifierMinusIcon,\n MagnifierPlusIcon,\n} from \"@lifesg/react-icons\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { announce, clearAnnouncer } from \"@react-aria/live-announcer\";\nimport clsx from \"clsx\";\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type {\n ReactZoomPanPinchContentRef,\n ReactZoomPanPinchRef,\n} from \"react-zoom-pan-pinch\";\nimport { TransformComponent, TransformWrapper } from \"react-zoom-pan-pinch\";\n\nimport { ModalV2 } from \"../modal-v2\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { useStateCallback } from \"../shared/hooks\";\nimport { ImagePlaceholder } from \"../shared/image-placeholder\";\nimport { formatUnitValue, useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useEventListener } from \"../util\";\nimport * as styles from \"./fullscreen-image-carousel.styles\";\nimport { StatefulImage } from \"./stateful-image\";\nimport type {\n FullscreenImageCarouselCustomItemProps,\n FullscreenImageCarouselItemProps,\n FullscreenImageCarouselProps,\n FullscreenImageCarouselRef,\n ImageDimension,\n} from \"./types\";\n\nconst isCustomItem = (\n item: FullscreenImageCarouselItemProps | undefined\n): item is FullscreenImageCarouselCustomItemProps =>\n !!item && item.type === \"custom\";\n\nexport const Component = (\n {\n items,\n initialActiveItemIndex,\n hideThumbnail = false,\n hideNavigation = false,\n hideCounter = false,\n hideMagnifier = false,\n onDelete,\n onClose,\n insets,\n show,\n ...otherProps\n }: FullscreenImageCarouselProps,\n ref: React.Ref<FullscreenImageCarouselRef>\n) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [currentSlide, setCurrentSlide] = useStateCallback(\n initialActiveItemIndex ?? 0\n );\n const [imagesDimension, setImageDimension] = useState<\n Record<string, ImageDimension>\n >({});\n const [zoom, setZoom] = useState(1);\n const [startX, setStartX] = useState<number | undefined>();\n const [endX, setEndX] = useState<number | undefined>();\n const containerRef = useRef<HTMLDivElement>(null);\n const thumbnailRefs = useRef<(HTMLDivElement | null)[]>([]);\n const zoomRefs = useRef<(ReactZoomPanPinchContentRef | null)[]>([]);\n const imageRef = useRef<HTMLDivElement>(null);\n const topActionButtonsRef = useRef<HTMLDivElement>(null);\n const prevArrowButtonRef = useRef<HTMLButtonElement>(null);\n const nextArrowButtonRef = useRef<HTMLButtonElement>(null);\n const thumbnailContainerRef = useRef<HTMLDivElement>(null);\n const diff = startX && endX ? startX - endX : 0;\n const currentItem = items[currentSlide];\n const hasAnyItemLabel = items.some(\n (item) => isCustomItem(item) && !!item.itemLabel?.trim()\n );\n const carouselItemNoun = hasAnyItemLabel ? \"item\" : \"image\";\n const hasFileInfo = useMemo(\n () =>\n items.some(\n (item) => item.fileName?.trim() || item.fileSize?.trim()\n ),\n [items]\n );\n\n useApplyStyle(topActionButtonsRef, {\n [styles.tokens.topActionButtons.insetTop]: formatUnitValue(\n insets?.top,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(prevArrowButtonRef, {\n [styles.tokens.arrowButton.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n });\n\n useApplyStyle(nextArrowButtonRef, {\n [styles.tokens.arrowButton.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(thumbnailContainerRef, {\n [styles.tokens.thumbnailContainer.insetBottom]: formatUnitValue(\n insets?.bottom,\n \"px\"\n ),\n });\n\n const getItemAriaLabel = useCallback(\n (index: number) => {\n const item = items[index];\n const itemTypeLabel = hasAnyItemLabel ? \"Item\" : \"Image\";\n const prefix = isCustomItem(item)\n ? item.itemLabel?.trim() || \"\"\n : item.alt?.trim() || \"\";\n const positionLabel = `${itemTypeLabel} ${index + 1} of ${\n items.length\n }.`;\n\n return prefix ? `${prefix}. ${positionLabel}` : positionLabel;\n },\n [items, hasAnyItemLabel]\n );\n\n useImperativeHandle<FullscreenImageCarouselRef, FullscreenImageCarouselRef>(\n ref,\n () => ({\n currentItemIndex: currentSlide,\n setCurrentItem: goToSlide,\n goToPrevItem: goToPrevSlide,\n goToNextItem: goToNextSlide,\n })\n );\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEventListener(\"keydown\", handleKeyDown, \"document\");\n\n useEffect(() => {\n if (show) {\n imageRef.current?.focus();\n }\n }, [show]);\n\n useEffect(() => {\n if (items.length === 0) {\n setCurrentSlide(0);\n return;\n }\n\n if (currentSlide > items.length - 1) {\n setCurrentSlide(items.length - 1);\n }\n }, [currentSlide, items.length, setCurrentSlide]);\n\n useEffect(() => {\n thumbnailRefs.current?.[currentSlide]?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"center\",\n });\n setZoom(1);\n }, [currentSlide]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleTouchStart = (e: React.TouchEvent) => {\n if (zoom <= 1) setStartX(e.touches[0].clientX);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!startX || zoom > 1) return;\n setEndX(e.touches[0].clientX);\n };\n\n const handleTouchEnd = () => {\n if (!containerRef.current) return;\n if (Math.abs(diff) > containerRef.current.offsetWidth / 3) {\n if (diff > 0) {\n goToNextSlide();\n } else {\n goToPrevSlide();\n }\n }\n setStartX(undefined);\n setEndX(undefined);\n };\n\n const handleZoom = (e: ReactZoomPanPinchRef) => {\n setZoom(e.state.scale);\n };\n\n const handleDelete = () => {\n if (currentItem && onDelete) {\n onDelete(currentItem, currentSlide);\n }\n };\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key === \"ArrowRight\") {\n goToNextSlide();\n } else if (e.key === \"ArrowLeft\") {\n goToPrevSlide();\n } else if (e.key === \"Escape\") {\n onClose?.();\n }\n }\n\n const handleMagnifier = () => {\n if (zoom === 1) {\n const zoomRatio = getZoomRatio();\n zoomRefs.current?.[currentSlide]?.centerView(zoomRatio);\n setZoom(zoomRatio ?? 1);\n } else {\n setZoom(1);\n zoomRefs.current?.[currentSlide]?.resetTransform();\n }\n };\n\n const setDimension = ({\n src,\n height,\n width,\n }: {\n src: string;\n height: number;\n width: number;\n }) => {\n setImageDimension((oldState) => {\n return { ...oldState, [src]: { height, width } };\n });\n };\n\n const getZoomRatio = () => {\n if (!currentItem || isCustomItem(currentItem)) {\n return;\n }\n\n const imageDimension = imagesDimension[currentItem.src];\n\n if (containerRef.current && !!imageDimension) {\n const { clientHeight, clientWidth } = containerRef.current;\n const { width, height } = imageDimension;\n const isSmallImg = width < clientWidth && height < clientHeight;\n\n const isImgLandscapeRelativeToDevice =\n height / width < clientHeight / clientWidth;\n\n if (isSmallImg) {\n return isImgLandscapeRelativeToDevice\n ? clientWidth / width\n : clientHeight / height;\n }\n\n return isImgLandscapeRelativeToDevice\n ? clientHeight / (height / (width / clientWidth))\n : clientWidth / (width / (height / clientHeight));\n }\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const goToPrevSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === 0 ? items.length - 1 : prev - 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToNextSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === items.length - 1 ? 0 : prev + 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToSlide = (index: number) => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(index);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderSlides = () => {\n return (\n <div\n className={styles.imageGallerySlides}\n style={{\n transform: `translateX(calc(${\n -currentSlide * 100\n }% - ${diff}px))`,\n }}\n >\n {items.map((item, index) => {\n const isActive = index === currentSlide;\n const isActiveOrAdjacent =\n Math.abs(index - currentSlide) <= 1 ||\n (currentSlide === 0 && index === items.length - 1) ||\n (currentSlide === items.length - 1 && index === 0);\n\n return (\n <div\n className={styles.imageGallerySlide}\n key={index}\n data-testid=\"slide-item\"\n >\n <div\n className={styles.focusableImageRegion}\n ref={isActive ? imageRef : null}\n tabIndex={isActive ? 0 : -1}\n >\n {isCustomItem(item) ? (\n isActiveOrAdjacent ? (\n item.renderContent()\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )\n ) : (\n <TransformWrapper\n ref={(el) =>\n (zoomRefs.current[index] = el)\n }\n panning={{\n disabled: zoom <= 1,\n }}\n initialScale={1}\n onZoom={handleZoom}\n onZoomStop={handleZoom}\n onWheel={handleZoom}\n >\n <TransformComponent>\n <StatefulImage\n className={styles.slideImage}\n src={item.src}\n alt={getItemAriaLabel(index)}\n placeholder={\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n }\n fit=\"scale-down\"\n retrieveImageDimension\n setDimension={setDimension}\n />\n </TransformComponent>\n </TransformWrapper>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n };\n\n const renderFileInfo = () => {\n const { fileName, fileSize } = currentItem ?? {};\n const trimmedName = fileName?.trim();\n const trimmedSize = fileSize?.trim();\n\n return (\n <div\n className={clsx(\n styles.fileInfoTextWrapper,\n !trimmedSize && styles.fileInfoTextWrapperCentered\n )}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-testid=\"file-info-bar\"\n >\n {trimmedName && (\n <Typography.BodyBL\n className={styles.fileInfoFileName}\n weight=\"semibold\"\n data-testid=\"file-info-name\"\n >\n {trimmedName}\n </Typography.BodyBL>\n )}\n {trimmedSize && (\n <Typography.BodyMD\n className={styles.fileInfoFileSize}\n data-testid=\"file-info-size\"\n >\n {trimmedSize}\n </Typography.BodyMD>\n )}\n </div>\n );\n };\n\n const renderThumbnails = () => {\n return (\n <div\n className={styles.thumbnailContainer}\n ref={thumbnailContainerRef}\n aria-hidden=\"true\"\n data-testid=\"thumbnail-container\"\n >\n <div className={styles.thumbnailWrapper}>\n {items.map((item, index) => {\n const src = isCustomItem(item)\n ? item.thumbnailSrc\n : item.thumbnailSrc ?? item.src;\n return (\n <div\n className={styles.thumbnailItemContainer}\n key={index}\n >\n <div\n className={styles.thumbnailItem}\n data-active={index === currentSlide}\n data-testid=\"thumbnail-item\"\n onClick={() => goToSlide(index)}\n ref={(el) =>\n (thumbnailRefs.current[index] = el)\n }\n >\n {src ? (\n <StatefulImage\n className={styles.thumbnailImage}\n src={src}\n alt={`Thumbnail ${index + 1}`}\n fit=\"cover\"\n />\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n };\n\n return (\n <ModalV2\n {...otherProps}\n data-testid=\"image-carousel-modal\"\n aria-label={hasAnyItemLabel ? \"Carousel\" : \"Image carousel\"}\n show={show}\n disableInitialFocus\n >\n <div className={styles.carouselModalContent}>\n <div className={styles.imageGalleryContainer}>\n <div className={styles.imageGalleryWrapper}>\n <div\n className={styles.imageGallerySwipe}\n ref={containerRef}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n >\n {renderSlides()}\n </div>\n\n {!hideNavigation && (\n <>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonLeft\n )}\n ref={prevArrowButtonRef}\n aria-label={`Previous ${carouselItemNoun}`}\n data-testid=\"prev-btn\"\n onClick={goToPrevSlide}\n >\n <ChevronLeftIcon aria-hidden />\n </ClickableIcon>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonRight\n )}\n ref={nextArrowButtonRef}\n aria-label={`Next ${carouselItemNoun}`}\n data-testid=\"forward-btn\"\n onClick={goToNextSlide}\n >\n <ChevronRightIcon aria-hidden />\n </ClickableIcon>\n </>\n )}\n\n {!hideCounter && (\n <div className={styles.boxChip} aria-hidden=\"true\">\n <Typography.BodyXS\n className={styles.chip}\n weight=\"semibold\"\n data-testid=\"carousel-counter\"\n >{`${currentSlide + 1}/${\n items.length\n }`}</Typography.BodyXS>\n </div>\n )}\n </div>\n\n {!hideThumbnail && renderThumbnails()}\n </div>\n <div\n className={styles.topActionButtons}\n ref={topActionButtonsRef}\n data-has-file-info={hasFileInfo}\n >\n {hasFileInfo && renderFileInfo()}\n {!hideMagnifier && !isCustomItem(currentItem) && (\n <ClickableIcon\n className={styles.iconButton}\n aria-label={zoom === 1 ? \"Zoom in\" : \"Zoom out\"}\n onClick={handleMagnifier}\n >\n {zoom === 1 ? (\n <MagnifierPlusIcon aria-hidden />\n ) : (\n <MagnifierMinusIcon aria-hidden />\n )}\n </ClickableIcon>\n )}\n\n {onDelete && (\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.iconButtonError\n )}\n aria-label={`Delete ${\n (isCustomItem(currentItem) &&\n currentItem.itemLabel?.trim()) ||\n \"image\"\n }`}\n data-testid=\"delete-btn\"\n onClick={handleDelete}\n >\n <BinIcon aria-hidden />\n </ClickableIcon>\n )}\n\n <ClickableIcon\n className={styles.iconButton}\n aria-label={\n hasAnyItemLabel\n ? \"Close carousel\"\n : \"Close image carousel\"\n }\n onClick={onClose}\n >\n <CrossIcon aria-hidden />\n </ClickableIcon>\n </div>\n </div>\n </ModalV2>\n );\n};\n\nexport const FullscreenImageCarousel = forwardRef<\n FullscreenImageCarouselRef,\n FullscreenImageCarouselProps\n>(Component);\n"],"names":["isCustomItem","item","type","Component","_a","ref","items","initialActiveItemIndex","hideThumbnail","hideNavigation","hideCounter","hideMagnifier","onDelete","onClose","insets","show","otherProps","__rest","currentSlide","setCurrentSlide","useStateCallback","imagesDimension","setImageDimension","useState","zoom","setZoom","startX","setStartX","endX","setEndX","containerRef","useRef","thumbnailRefs","zoomRefs","imageRef","topActionButtonsRef","prevArrowButtonRef","nextArrowButtonRef","thumbnailContainerRef","diff","currentItem","hasAnyItemLabel","some","itemLabel","trim","carouselItemNoun","hasFileInfo","useMemo","fileName","fileSize","_b","useApplyStyle","styles.tokens","topActionButtons","insetTop","formatUnitValue","top","insetLeft","left","insetRight","right","arrowButton","thumbnailContainer","insetBottom","bottom","getItemAriaLabel","useCallback","index","itemTypeLabel","prefix","alt","positionLabel","length","useImperativeHandle","currentItemIndex","setCurrentItem","goToSlide","goToPrevItem","goToPrevSlide","goToNextItem","goToNextSlide","useEventListener","e","key","useEffect","current","focus","scrollIntoView","behavior","inline","handleZoom","state","scale","setDimension","src","height","width","oldState","Object","assign","getZoomRatio","imageDimension","clientHeight","clientWidth","isImgLandscapeRelativeToDevice","resetTransform","prev","slide","clearAnnouncer","announce","_jsx","ModalV2","disableInitialFocus","_jsxs","className","styles.carouselModalContent","children","styles.imageGalleryContainer","styles.imageGalleryWrapper","styles.imageGallerySwipe","onTouchStart","touches","clientX","onTouchMove","onTouchEnd","Math","abs","offsetWidth","undefined","styles.imageGallerySlides","style","transform","map","isActive","isActiveOrAdjacent","styles.imageGallerySlide","styles.focusableImageRegion","tabIndex","renderContent","ImagePlaceholder","styles.slidePlaceholderImage","TransformWrapper","el","panning","disabled","initialScale","onZoom","onZoomStop","onWheel","TransformComponent","StatefulImage","styles.slideImage","placeholder","fit","retrieveImageDimension","_Fragment","ClickableIcon","clsx","styles.iconButton","styles.arrowButton","styles.arrowButtonLeft","onClick","ChevronLeftIcon","styles.arrowButtonRight","ChevronRightIcon","styles.boxChip","Typography","BodyXS","styles.chip","weight","styles.thumbnailContainer","styles.thumbnailWrapper","thumbnailSrc","styles.thumbnailItemContainer","styles.thumbnailItem","styles.thumbnailImage","styles.topActionButtons","trimmedName","trimmedSize","styles.fileInfoTextWrapper","styles.fileInfoTextWrapperCentered","BodyBL","styles.fileInfoFileName","BodyMD","styles.fileInfoFileSize","renderFileInfo","zoomRatio","centerView","_d","_c","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AAS4B,EAAatB,EAC1B,EAyWyCkG,SAErBN,EAAAA,IAACmF,UAAO,CAAA,eAAA,MAIhBnF,EAAAA,IAAC8C,EAAAA,cAAa,CACV1C,UAAW4C,EAAAA,WAAiB,aAExBrH,EACM,iBACA,uBAEVwH,QAASpJ,EAAOuG,SAEhBN,EAAAA,IAACoF,EAAAA,wCAIP,EAILC,EAA0BC,EAAAA,WAGrCjM"}
|
|
1
|
+
{"version":3,"file":"fullscreen-image-carousel.js","sources":["../../../src/fullscreen-image-carousel/fullscreen-image-carousel.tsx"],"sourcesContent":["import {\n ChevronLeftIcon,\n ChevronRightIcon,\n CrossIcon,\n MagnifierMinusIcon,\n MagnifierPlusIcon,\n} from \"@lifesg/react-icons\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { announce, clearAnnouncer } from \"@react-aria/live-announcer\";\nimport clsx from \"clsx\";\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type {\n ReactZoomPanPinchContentRef,\n ReactZoomPanPinchRef,\n} from \"react-zoom-pan-pinch\";\nimport { TransformComponent, TransformWrapper } from \"react-zoom-pan-pinch\";\n\nimport { ModalV2 } from \"../modal-v2\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { useStateCallback } from \"../shared/hooks\";\nimport { ImagePlaceholder } from \"../shared/image-placeholder\";\nimport { formatUnitValue, useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useEventListener } from \"../util\";\nimport * as styles from \"./fullscreen-image-carousel.styles\";\nimport { StatefulImage } from \"./stateful-image\";\nimport type {\n FullscreenImageCarouselCustomItemProps,\n FullscreenImageCarouselItemProps,\n FullscreenImageCarouselProps,\n FullscreenImageCarouselRef,\n ImageDimension,\n} from \"./types\";\n\nconst isCustomItem = (\n item: FullscreenImageCarouselItemProps | undefined\n): item is FullscreenImageCarouselCustomItemProps =>\n !!item && item.type === \"custom\";\n\nexport const Component = (\n {\n items,\n initialActiveItemIndex,\n hideThumbnail = false,\n hideNavigation = false,\n hideCounter = false,\n hideMagnifier = false,\n onDelete,\n onClose,\n insets,\n show,\n ...otherProps\n }: FullscreenImageCarouselProps,\n ref: React.Ref<FullscreenImageCarouselRef>\n) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [currentSlide, setCurrentSlide] = useStateCallback(\n initialActiveItemIndex ?? 0\n );\n const [imagesDimension, setImageDimension] = useState<\n Record<string, ImageDimension>\n >({});\n const [zoom, setZoom] = useState(1);\n const [startX, setStartX] = useState<number | undefined>();\n const [endX, setEndX] = useState<number | undefined>();\n const containerRef = useRef<HTMLDivElement>(null);\n const thumbnailRefs = useRef<(HTMLDivElement | null)[]>([]);\n const zoomRefs = useRef<(ReactZoomPanPinchContentRef | null)[]>([]);\n const imageRef = useRef<HTMLDivElement>(null);\n const topActionButtonsRef = useRef<HTMLDivElement>(null);\n const prevArrowButtonRef = useRef<HTMLButtonElement>(null);\n const nextArrowButtonRef = useRef<HTMLButtonElement>(null);\n const thumbnailContainerRef = useRef<HTMLDivElement>(null);\n const diff = startX && endX ? startX - endX : 0;\n const currentItem = items[currentSlide];\n const hasAnyItemLabel = items.some(\n (item) => isCustomItem(item) && !!item.itemLabel?.trim()\n );\n const carouselItemNoun = hasAnyItemLabel ? \"item\" : \"image\";\n const hasFileInfo = useMemo(\n () =>\n items.some(\n (item) => item.fileName?.trim() || item.fileSize?.trim()\n ),\n [items]\n );\n\n useApplyStyle(topActionButtonsRef, {\n [styles.tokens.topActionButtons.insetTop]: formatUnitValue(\n insets?.top,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(prevArrowButtonRef, {\n [styles.tokens.arrowButton.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n });\n\n useApplyStyle(nextArrowButtonRef, {\n [styles.tokens.arrowButton.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(thumbnailContainerRef, {\n [styles.tokens.thumbnailContainer.insetBottom]: formatUnitValue(\n insets?.bottom,\n \"px\"\n ),\n });\n\n const getItemAriaLabel = useCallback(\n (index: number) => {\n const item = items[index];\n const itemTypeLabel = hasAnyItemLabel ? \"Item\" : \"Image\";\n const prefix = isCustomItem(item)\n ? item.itemLabel?.trim() || \"\"\n : item.alt?.trim() || \"\";\n const positionLabel = `${itemTypeLabel} ${index + 1} of ${\n items.length\n }.`;\n\n return prefix ? `${prefix}. ${positionLabel}` : positionLabel;\n },\n [items, hasAnyItemLabel]\n );\n\n useImperativeHandle<FullscreenImageCarouselRef, FullscreenImageCarouselRef>(\n ref,\n () => ({\n currentItemIndex: currentSlide,\n setCurrentItem: goToSlide,\n goToPrevItem: goToPrevSlide,\n goToNextItem: goToNextSlide,\n })\n );\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEventListener(\"keydown\", handleKeyDown, \"document\");\n\n useEffect(() => {\n if (show) {\n imageRef.current?.focus();\n }\n }, [show]);\n\n useEffect(() => {\n if (items.length === 0) {\n setCurrentSlide(0);\n return;\n }\n\n if (currentSlide > items.length - 1) {\n setCurrentSlide(items.length - 1);\n }\n }, [currentSlide, items.length, setCurrentSlide]);\n\n useEffect(() => {\n thumbnailRefs.current?.[currentSlide]?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"center\",\n });\n setZoom(1);\n }, [currentSlide]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleTouchStart = (e: React.TouchEvent) => {\n if (zoom <= 1) setStartX(e.touches[0].clientX);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!startX || zoom > 1) return;\n setEndX(e.touches[0].clientX);\n };\n\n const handleTouchEnd = () => {\n if (!containerRef.current) return;\n if (Math.abs(diff) > containerRef.current.offsetWidth / 3) {\n if (diff > 0) {\n goToNextSlide();\n } else {\n goToPrevSlide();\n }\n }\n setStartX(undefined);\n setEndX(undefined);\n };\n\n const handleZoom = (e: ReactZoomPanPinchRef) => {\n setZoom(e.state.scale);\n };\n\n const handleDelete = () => {\n if (currentItem && onDelete) {\n onDelete(currentItem, currentSlide);\n }\n };\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key === \"ArrowRight\") {\n goToNextSlide();\n } else if (e.key === \"ArrowLeft\") {\n goToPrevSlide();\n } else if (e.key === \"Escape\") {\n onClose?.();\n }\n }\n\n const handleMagnifier = () => {\n if (zoom === 1) {\n const zoomRatio = getZoomRatio();\n zoomRefs.current?.[currentSlide]?.centerView(zoomRatio);\n setZoom(zoomRatio ?? 1);\n } else {\n setZoom(1);\n zoomRefs.current?.[currentSlide]?.resetTransform();\n }\n };\n\n const setDimension = ({\n src,\n height,\n width,\n }: {\n src: string;\n height: number;\n width: number;\n }) => {\n setImageDimension((oldState) => {\n return { ...oldState, [src]: { height, width } };\n });\n };\n\n const getZoomRatio = () => {\n if (!currentItem || isCustomItem(currentItem)) {\n return;\n }\n\n const imageDimension = imagesDimension[currentItem.src];\n\n if (containerRef.current && !!imageDimension) {\n const { clientHeight, clientWidth } = containerRef.current;\n const { width, height } = imageDimension;\n const isSmallImg = width < clientWidth && height < clientHeight;\n\n const isImgLandscapeRelativeToDevice =\n height / width < clientHeight / clientWidth;\n\n if (isSmallImg) {\n return isImgLandscapeRelativeToDevice\n ? clientWidth / width\n : clientHeight / height;\n }\n\n return isImgLandscapeRelativeToDevice\n ? clientHeight / (height / (width / clientWidth))\n : clientWidth / (width / (height / clientHeight));\n }\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const goToPrevSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === 0 ? items.length - 1 : prev - 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToNextSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === items.length - 1 ? 0 : prev + 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToSlide = (index: number) => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(index);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderSlides = () => {\n return (\n <div\n className={styles.imageGallerySlides}\n style={{\n transform: `translateX(calc(${\n -currentSlide * 100\n }% - ${diff}px))`,\n }}\n >\n {items.map((item, index) => {\n const isActive = index === currentSlide;\n const isActiveOrAdjacent =\n Math.abs(index - currentSlide) <= 1 ||\n (currentSlide === 0 && index === items.length - 1) ||\n (currentSlide === items.length - 1 && index === 0);\n\n return (\n <div\n className={styles.imageGallerySlide}\n key={index}\n data-testid=\"slide-item\"\n >\n <div\n className={styles.focusableImageRegion}\n ref={isActive ? imageRef : null}\n tabIndex={isActive ? 0 : -1}\n >\n {isCustomItem(item) ? (\n isActiveOrAdjacent ? (\n item.renderContent()\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )\n ) : (\n <TransformWrapper\n ref={(el) =>\n (zoomRefs.current[index] = el)\n }\n panning={{\n disabled: zoom <= 1,\n }}\n initialScale={1}\n onZoom={handleZoom}\n onZoomStop={handleZoom}\n onWheel={handleZoom}\n >\n <TransformComponent>\n <StatefulImage\n className={styles.slideImage}\n src={item.src}\n alt={getItemAriaLabel(index)}\n placeholder={\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n }\n fit=\"scale-down\"\n retrieveImageDimension\n setDimension={setDimension}\n />\n </TransformComponent>\n </TransformWrapper>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n };\n\n const renderFileInfo = () => {\n const { fileName, fileSize } = currentItem ?? {};\n const trimmedName = fileName?.trim();\n const trimmedSize = fileSize?.trim();\n\n return (\n <div\n className={clsx(\n styles.fileInfoTextWrapper,\n !trimmedSize && styles.fileInfoTextWrapperCentered\n )}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-testid=\"file-info-bar\"\n >\n {trimmedName && (\n <Typography.BodyBL\n className={styles.fileInfoFileName}\n weight=\"semibold\"\n data-testid=\"file-info-name\"\n >\n {trimmedName}\n </Typography.BodyBL>\n )}\n {trimmedSize && (\n <Typography.BodyMD\n className={styles.fileInfoFileSize}\n data-testid=\"file-info-size\"\n >\n {trimmedSize}\n </Typography.BodyMD>\n )}\n </div>\n );\n };\n\n const renderThumbnails = () => {\n return (\n <div\n className={styles.thumbnailContainer}\n ref={thumbnailContainerRef}\n aria-hidden=\"true\"\n data-testid=\"thumbnail-container\"\n >\n <div className={styles.thumbnailWrapper}>\n {items.map((item, index) => {\n const src = isCustomItem(item)\n ? item.thumbnailSrc\n : item.thumbnailSrc ?? item.src;\n return (\n <div\n className={styles.thumbnailItemContainer}\n key={index}\n >\n <div\n className={styles.thumbnailItem}\n data-active={index === currentSlide}\n data-testid=\"thumbnail-item\"\n onClick={() => goToSlide(index)}\n ref={(el) =>\n (thumbnailRefs.current[index] = el)\n }\n >\n {src ? (\n <StatefulImage\n className={styles.thumbnailImage}\n src={src}\n alt={`Thumbnail ${index + 1}`}\n fit=\"cover\"\n />\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n };\n\n return (\n <ModalV2\n {...otherProps}\n data-testid=\"image-carousel-modal\"\n aria-label={hasAnyItemLabel ? \"Carousel\" : \"Image carousel\"}\n show={show}\n disableInitialFocus\n >\n <div className={styles.carouselModalContent}>\n <div className={styles.imageGalleryContainer}>\n <div className={styles.imageGalleryWrapper}>\n <div\n className={styles.imageGallerySwipe}\n ref={containerRef}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n >\n {renderSlides()}\n </div>\n\n {!hideNavigation && (\n <>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonLeft\n )}\n ref={prevArrowButtonRef}\n aria-label={`Previous ${carouselItemNoun}`}\n data-testid=\"prev-btn\"\n onClick={goToPrevSlide}\n >\n <ChevronLeftIcon aria-hidden />\n </ClickableIcon>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonRight\n )}\n ref={nextArrowButtonRef}\n aria-label={`Next ${carouselItemNoun}`}\n data-testid=\"forward-btn\"\n onClick={goToNextSlide}\n >\n <ChevronRightIcon aria-hidden />\n </ClickableIcon>\n </>\n )}\n\n {!hideCounter && (\n <div className={styles.boxChip} aria-hidden=\"true\">\n <Typography.BodyXS\n className={styles.chip}\n weight=\"semibold\"\n data-testid=\"carousel-counter\"\n >{`${currentSlide + 1}/${\n items.length\n }`}</Typography.BodyXS>\n </div>\n )}\n </div>\n\n {!hideThumbnail && renderThumbnails()}\n </div>\n <div\n className={styles.topActionButtons}\n ref={topActionButtonsRef}\n data-has-file-info={hasFileInfo}\n >\n {hasFileInfo && renderFileInfo()}\n {!hideMagnifier && !isCustomItem(currentItem) && (\n <ClickableIcon\n className={styles.iconButton}\n aria-label={zoom === 1 ? \"Zoom in\" : \"Zoom out\"}\n onClick={handleMagnifier}\n >\n {zoom === 1 ? (\n <MagnifierPlusIcon aria-hidden />\n ) : (\n <MagnifierMinusIcon aria-hidden />\n )}\n </ClickableIcon>\n )}\n\n {onDelete && (\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.iconButtonError\n )}\n aria-label={`Delete ${\n (isCustomItem(currentItem) &&\n currentItem.itemLabel?.trim()) ||\n \"image\"\n }`}\n data-testid=\"delete-btn\"\n onClick={handleDelete}\n >\n <BinIcon aria-hidden />\n </ClickableIcon>\n )}\n\n <ClickableIcon\n className={styles.iconButton}\n aria-label={\n hasAnyItemLabel\n ? \"Close carousel\"\n : \"Close image carousel\"\n }\n onClick={onClose}\n >\n <CrossIcon aria-hidden />\n </ClickableIcon>\n </div>\n </div>\n </ModalV2>\n );\n};\n\nexport const FullscreenImageCarousel = forwardRef<\n FullscreenImageCarouselRef,\n FullscreenImageCarouselProps\n>(Component);\n"],"names":["isCustomItem","item","type","Component","_a","ref","items","initialActiveItemIndex","hideThumbnail","hideNavigation","hideCounter","hideMagnifier","onDelete","onClose","insets","show","otherProps","__rest","currentSlide","setCurrentSlide","useStateCallback","imagesDimension","setImageDimension","useState","zoom","setZoom","startX","setStartX","endX","setEndX","containerRef","useRef","thumbnailRefs","zoomRefs","imageRef","topActionButtonsRef","prevArrowButtonRef","nextArrowButtonRef","thumbnailContainerRef","diff","currentItem","hasAnyItemLabel","some","itemLabel","trim","carouselItemNoun","hasFileInfo","useMemo","fileName","fileSize","_b","useApplyStyle","styles.tokens","topActionButtons","insetTop","formatUnitValue","top","insetLeft","left","insetRight","right","arrowButton","thumbnailContainer","insetBottom","bottom","getItemAriaLabel","useCallback","index","itemTypeLabel","prefix","alt","positionLabel","length","useImperativeHandle","currentItemIndex","setCurrentItem","goToSlide","goToPrevItem","goToPrevSlide","goToNextItem","goToNextSlide","useEventListener","e","key","useEffect","current","focus","scrollIntoView","behavior","inline","handleZoom","state","scale","setDimension","src","height","width","oldState","Object","assign","getZoomRatio","imageDimension","clientHeight","clientWidth","isImgLandscapeRelativeToDevice","resetTransform","prev","slide","clearAnnouncer","announce","_jsx","ModalV2","disableInitialFocus","_jsxs","className","styles.carouselModalContent","children","styles.imageGalleryContainer","styles.imageGalleryWrapper","styles.imageGallerySwipe","onTouchStart","touches","clientX","onTouchMove","onTouchEnd","Math","abs","offsetWidth","undefined","styles.imageGallerySlides","style","transform","map","isActive","isActiveOrAdjacent","styles.imageGallerySlide","styles.focusableImageRegion","tabIndex","renderContent","ImagePlaceholder","styles.slidePlaceholderImage","TransformWrapper","el","panning","disabled","initialScale","onZoom","onZoomStop","onWheel","TransformComponent","StatefulImage","styles.slideImage","placeholder","fit","retrieveImageDimension","_Fragment","ClickableIcon","clsx","styles.iconButton","styles.arrowButton","styles.arrowButtonLeft","onClick","ChevronLeftIcon","styles.arrowButtonRight","ChevronRightIcon","styles.boxChip","Typography","BodyXS","styles.chip","weight","styles.thumbnailContainer","styles.thumbnailWrapper","thumbnailSrc","styles.thumbnailItemContainer","styles.thumbnailItem","styles.thumbnailImage","styles.topActionButtons","trimmedName","trimmedSize","styles.fileInfoTextWrapper","styles.fileInfoTextWrapperCentered","BodyBL","styles.fileInfoFileName","BodyMD","styles.fileInfoFileSize","renderFileInfo","zoomRatio","centerView","_d","_c","MagnifierPlusIcon","MagnifierMinusIcon","styles.iconButtonError","BinIcon","CrossIcon","FullscreenImageCarousel","forwardRef"],"mappings":"ivCA0CA,MAAMA,EACFC,KAEEA,GAAsB,WAAdA,EAAKC,KAENC,EAAY,CACrBC,EAaAC,YAbAC,MACIA,EAAKC,uBACLA,EAAsBC,cACtBA,GAAgB,EAAKC,eACrBA,GAAiB,EAAKC,YACtBA,GAAc,EAAKC,cACnBA,GAAgB,EAAKC,SACrBA,EAAQC,QACRA,EAAOC,OACPA,EAAMC,KACNA,GAAIX,EACDY,EAAUC,EAAAA,OAAAb,EAXjB,wIAkBA,MAAOc,EAAcC,GAAmBC,mBACpCb,QAAAA,EAA0B,IAEvBc,EAAiBC,GAAqBC,EAAAA,SAE3C,CAAA,IACKC,EAAMC,GAAWF,EAAAA,SAAS,IAC1BG,EAAQC,GAAaJ,cACrBK,EAAMC,GAAWN,aAClBO,EAAeC,EAAAA,OAAuB,MACtCC,EAAgBD,EAAAA,OAAkC,IAClDE,EAAWF,EAAAA,OAA+C,IAC1DG,EAAWH,EAAAA,OAAuB,MAClCI,EAAsBJ,EAAAA,OAAuB,MAC7CK,EAAqBL,EAAAA,OAA0B,MAC/CM,EAAqBN,EAAAA,OAA0B,MAC/CO,EAAwBP,EAAAA,OAAuB,MAC/CQ,EAAOb,GAAUE,EAAOF,EAASE,EAAO,EACxCY,EAAclC,E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AA,EAAAA,EAAG3K,UAAa,IAAA0K,GAAAA,EAAEnF,gBACtC,EA8T4CW,SAEd,IAAT5F,EACGsF,EAAAA,IAACgF,EAAAA,kBAAiB,CAAA,eAAA,IAElBhF,EAAAA,IAACiF,EAAAA,mBAAkB,CAAA,eAAA,MAK9BnL,GACGkG,EAAAA,IAAC8C,gBAAa,CACV1C,UAAW2C,EAAAA,QACPC,EAAAA,WACAkC,EAAAA,8BAEQ,UACPhM,EAAawC,aACVU,EAAAV,EAAYG,gCAAWC,SAC3B,wBAEQ,aACZqH,QA5WH,KACbzH,GAAe5B,GACfA,EAAS4B,EAAatB,EAC1B,EAyWyCkG,SAErBN,EAAAA,IAACmF,UAAO,CAAA,eAAA,MAIhBnF,EAAAA,IAAC8C,EAAAA,cAAa,CACV1C,UAAW4C,EAAAA,WAAiB,aAExBrH,EACM,iBACA,uBAEVwH,QAASpJ,EAAOuG,SAEhBN,EAAAA,IAACoF,EAAAA,wCAIP,EAILC,EAA0BC,EAAAA,WAGrCjM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./image-button.
|
|
1
|
+
"use strict";require("./image-button.styles_6n1qsr.css");exports.main="mqb1plh",exports.mainDisabled="m1hsk0n5",exports.mainError="mz6wr40",exports.mainSelected="mroo32y",exports.mainSelectedText="mpjl8bn";
|
|
2
2
|
//# sourceMappingURL=image-button.styles.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.mqb1plh{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;gap:0.5rem;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1.5rem 1rem;background-color:var(--fds-colour-bg);border:var(--fds-border-width-010) var(--fds-border-style-solid) transparent;border-radius:var(--fds-radius-md);cursor:pointer;max-width:13rem;-webkit-transition:all var(--fds-motion-duration-250) var(--fds-motion-timing-ease-default);transition:all var(--fds-motion-duration-250) var(--fds-motion-timing-ease-default);font-family:var(--fds-font-family);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-baseline);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-body-lh-baseline);letter-spacing:var(--fds-font-body-ls-baseline);color:var(--fds-colour-text);overflow-wrap:anywhere;}.mqb1plh img{min-width:3.5rem;width:3.5rem;height:3.5rem;object-fit:contain;}.mqb1plh:hover{border-color:var(--fds-colour-border-hover-strong);}:where(body.fds-breakpoint-sm-max) .mqb1plh{padding:0.5rem 0.25rem;gap:0.25rem;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-semibold);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);}
|
|
1
|
+
.mqb1plh{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;gap:0.5rem;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1.5rem 1rem;background-color:var(--fds-colour-bg);border:var(--fds-border-width-010) var(--fds-border-style-solid) transparent;border-radius:var(--fds-radius-md);cursor:pointer;max-width:13rem;-webkit-transition:all var(--fds-motion-duration-250) var(--fds-motion-timing-ease-default);transition:all var(--fds-motion-duration-250) var(--fds-motion-timing-ease-default);font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-baseline);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-body-lh-baseline);letter-spacing:var(--fds-font-body-ls-baseline);color:var(--fds-colour-text);overflow-wrap:anywhere;}.mqb1plh img{min-width:3.5rem;width:3.5rem;height:3.5rem;object-fit:contain;}.mqb1plh:hover{border-color:var(--fds-colour-border-hover-strong);}:where(body.fds-breakpoint-sm-max) .mqb1plh{padding:0.5rem 0.25rem;gap:0.25rem;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);}
|
|
2
2
|
.mpjl8bn{color:var(--fds-colour-text-primary);}
|
|
3
3
|
.mroo32y{background:var(--fds-colour-bg-selected);border-color:var(--fds-colour-border-selected);}.mroo32y:hover{background:var(--fds-colour-bg-selected-hover);border-color:var(--fds-colour-border-selected-hover);}
|
|
4
4
|
.mz6wr40{background:var(--fds-colour-bg);border-color:var(--fds-colour-border-error);}.mz6wr40:hover{background:var(--fds-colour-bg);border-color:var(--fds-colour-border-error);}
|
package/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./accordion/accordion.js"),r=require("./alert/alert.js"),t=require("./animations/loading-dots/loading-dots.js"),o=require("./animations/loading-dots-spinner/loading-dots-spinner.js"),i=require("./animations/loading-spinner/loading-spinner.js"),s=require("./animations/themed-loading-spinner/themed-loading-spinner.js"),a=require("./avatar/avatar.js"),n=require("./badge/badge.js"),p=require("./box-container/box-container.js"),u=require("./breadcrumb/breadcrumb.js"),l=require("./button/button.js"),d=require("./calendar/calendar.js"),x=require("./card/card.js"),m=require("./checkbox/checkbox.js"),g=require("./countdown-timer/countdown-timer.js"),h=require("./dashed-border/dashed-border.js"),c=require("./data-table/data-table.js"),T=require("./date-input/date-input.js"),q=require("./date-navigator/date-navigator.js"),j=require("./date-range-input/date-range-input.js"),S=require("./divider/divider.js"),b=require("./drawer/drawer.js"),k=require("./e-signature/e-signature.js"),V=require("./error-display/error-display.js"),v=require("./error-display/helper.js"),_=require("./example/example.js"),y=require("./feedback-rating/feedback-rating.js"),B=require("./file-download/file-download.js"),I=require("./file-upload/file-upload.js"),M=require("./filter/filter.js"),C=require("./footer/footer.js"),D=require("./form/index.js"),P=require("./fullscreen-image-carousel/fullscreen-image-carousel.js"),f=require("./histogram-slider/histogram-slider.js"),F=require("./image-button/image-button.js"),L=require("./input/input.js"),w=require("./input-group/input-group.js"),R=require("./input-multi-select/input-multi-select.js"),A=require("./input-nested-multi-select/input-nested-multi-select.js"),E=require("./input-nested-select/input-nested-select.js"),N=require("./input-range-select/input-range-select.js"),W=require("./input-range-slider/input-range-slider.js"),G=require("./input-select/input-select.js"),O=require("./input-slider/input-slider.js"),H=require("./input-textarea/textarea.js"),Q=require("./language-switcher/language-switcher.js"),U=require("./layout/index.js"),z=require("./link-list/link-list.js"),K=require("./markup/markup.js"),X=require("./masked-input/masked-input.js"),Y=require("./masthead/masthead.js"),J=require("./menu/menu.js"),Z=require("./modal/index.js"),$=require("./modal-v2/index.js"),ee=require("./navbar/navbar.js"),re=require("./notification-banner/notification-banner.js"),te=require("./notification-banner/notification-banner-hoc.js"),oe=require("./otp-input/otp-input.js"),ie=require("./overlay/overlay.js"),se=require("./pagination/pagination.js"),ae=require("./phone-number-input/phone-number-input.js"),ne=require("./pill/pill.js"),pe=require("./popover/popover.js"),ue=require("./popover/popover-inline/popover-inline.js"),le=require("./popover/popover-trigger.js"),de=require("./predictive-text-input/predictive-text-input.js"),xe=require("./progress-indicator/progress-indicator.js"),me=require("./radio-button/radio-button.js"),ge=require("./select-histogram/select-histogram.js"),he=require("./sidenav/sidenav.js"),ce=require("./singpass-button/singpass-button.js"),Te=require("./smart-app-banner/smart-app-banner.js"),qe=require("./tab/tab.js"),je=require("./table/table.js"),Se=require("./tag/tag.js"),be=require("./text-list/index.js"),ke=require("./theme/theme-provider/index.js"),Ve=require("./theme/theme-provider/hooks.js"),ve=require("./theme/tokens/border.js"),_e=require("./theme/tokens/breakpoint.js"),ye=require("./theme/tokens/colour.js"),Be=require("./theme/tokens/component.js"),Ie=require("./theme/tokens/font.js"),Me=require("./theme/tokens/media-query.js"),Ce=require("./theme/tokens/motion.js"),De=require("./theme/tokens/radius.js"),Pe=require("./theme/tokens/shadow.js"),fe=require("./theme/tokens/spacing.js"),Fe=require("./theme/types.js"),Le=require("./theme/utils/css-variable.js"),we=require("./theme/utils/font.js"),Re=require("./theme/utils/token-resolver.js"),Ae=require("./theme/utils/use-apply-styles.js"),Ee=require("./theme/utils/use-design-token.js"),Ne=require("./theme/utils/use-media-query.js"),We=require("./time-range-picker/time-range-picker.js"),Ge=require("./time-slot-bar/time-slot-bar.js"),Oe=require("./time-slot-bar-week/time-slot-bar-week.js"),He=require("./time-slot-week-view/time-slot-week-view.js"),Qe=require("./timeline/timeline.js"),Ue=require("./timepicker/timepicker.js"),ze=require("./timetable/timetable.js"),Ke=require("./toast/toast.js"),Xe=require("./toggle/toggle.js"),Ye=require("./typography/index.js"),Je=require("./uneditable-section/index.js"),Ze=require("./unit-number/unit-number-input.js"),$e=require("./v3_theme/index.js"),er=require("./v3_theme/ds-theme-provider.js"),rr=require("./v3_theme/use-theme-mode.js");exports.Accordion=e.Accordion,exports.Alert=r.Alert,exports.LoadingDots=t.LoadingDots,exports.LoadingDotsSpinner=o.LoadingDotsSpinner,exports.LoadingSpinner=i.LoadingSpinner,exports.ThemedLoadingSpinner=s.ThemedLoadingSpinner,exports.Avatar=a.Avatar,exports.Badge=n.Badge,exports.BoxContainer=p.BoxContainer,exports.Breadcrumb=u.Breadcrumb,exports.Button=l.Button,exports.Calendar=d.Calendar,exports.Card=x.Card,exports.Checkbox=m.Checkbox,exports.CountdownTimer=g.CountdownTimer,exports.DashedBorder=h.DashedBorder,exports.DataTable=c.DataTable,exports.DateInput=T.DateInput,exports.DateNavigator=q.DateNavigator,exports.DateRangeInput=j.DateRangeInput,exports.Divider=S.Divider,exports.Drawer=b.Drawer,exports.ESignature=k.ESignature,exports.ErrorDisplay=V.ErrorDisplay,exports.ErrorDisplayHelper=v.ErrorDisplayHelper,exports.Example=_.Example,exports.FeedbackRating=y.FeedbackRating,exports.FileDownload=B.FileDownload,exports.FileUpload=I.FileUpload,exports.Filter=M.Filter,exports.Footer=C.Footer,exports.Form=D.Form,exports.Component=P.Component,exports.FullscreenImageCarousel=P.FullscreenImageCarousel,exports.HistogramSlider=f.HistogramSlider,exports.ImageButton=F.ImageButton,exports.Input=L.Input,exports.InputGroup=w.InputGroup,exports.InputMultiSelect=R.InputMultiSelect,exports.InputNestedMultiSelect=A.InputNestedMultiSelect,exports.InputNestedSelect=E.InputNestedSelect,exports.InputRangeSelect=N.InputRangeSelect,exports.InputRangeSlider=W.InputRangeSlider,exports.InputSelect=G.InputSelect,exports.InputSlider=O.InputSlider,exports.Textarea=H.Textarea,exports.LanguageSwitcher=Q.LanguageSwitcher,exports.Layout=U.Layout,exports.LinkList=z.LinkList,exports.Markup=K.Markup,exports.MaskedInput=X.MaskedInput,exports.Masthead=Y.Masthead,exports.Menu=J.Menu,exports.MenuTrigger=J.MenuTrigger,exports.Modal=Z.Modal,exports.ModalV2=$.ModalV2,exports.Navbar=ee.Navbar,exports.NBComponent=re.NBComponent,exports.NotificationBanner=re.NotificationBanner,exports.withNotificationBanner=te.withNotificationBanner,exports.OtpInput=oe.OtpInput,exports.Overlay=ie.Overlay,exports.Pagination=se.Pagination,exports.PhoneNumberInput=ae.PhoneNumberInput,exports.Pill=ne.Pill,exports.Popover=pe.Popover,exports.PopoverInline=ue.PopoverInline,exports.PopoverTrigger=le.PopoverTrigger,exports.PredictiveTextInput=de.PredictiveTextInput,exports.ProgressIndicator=xe.ProgressIndicator,exports.RadioButton=me.RadioButton,exports.SelectHistogram=ge.SelectHistogram,exports.Sidenav=he.Sidenav,exports.SingpassButton=ce.SingpassButton,exports.SmartAppBanner=Te.SmartAppBanner,exports.Tab=qe.Tab,exports.Table=je.Table,exports.Tag=Se.Tag,exports.TextList=be.TextList,exports.ThemeProvider=ke.ThemeProvider,exports.useInheritedThemeScope=Ve.useInheritedThemeScope,exports.useTheme=Ve.useTheme,exports.Border=ve.Border,exports.BorderStyle=ve.BorderStyle,exports.BorderThickness=ve.BorderThickness,exports.Breakpoint=_e.Breakpoint,exports.Colour=ye.Colour,exports.PrimitiveColours=ye.PrimitiveColours,exports.SemanticColours=ye.SemanticColours,exports.ComponentToken=Be.ComponentToken,exports.Font=Ie.Font,exports.FontSpec=Ie.FontSpec,exports.MediaQuery=Me.MediaQuery,exports.Motion=Ce.Motion,exports.Radius=De.Radius,exports.Shadow=Pe.Shadow,exports.Spacing=fe.Spacing,exports.THEME_TYPES=Fe.THEME_TYPES,exports.extractFdsCssVariableName=Le.extractFdsCssVariableName,exports.formatUnitValue=Le.formatUnitValue,exports.getInheritedInlineCssVariables=Le.getInheritedInlineCssVariables,exports.normalizeCssLengthValue=Le.normalizeCssLengthValue,exports.parseCSSVariableValue=Le.parseCSSVariableValue,exports.parsePxOrRemValue=Le.parsePxOrRemValue,exports.generateFont=we.generateFont,exports.generateFontProperties=we.generateFontProperties,exports.getEffectiveTokenOrCustom=Re.getEffectiveTokenOrCustom,exports.getResolvedValue=Re.getResolvedValue,exports.getTokenOrDefault=Re.getTokenOrDefault,exports.isTokenFromSet=Re.isTokenFromSet,exports.isTokenWithPrefix=Re.isTokenWithPrefix,exports.toCssValue=Re.toCssValue,exports.useApplyStyle=Ae.useApplyStyle,exports.useDesignToken=Ee.useDesignToken,exports.useResolvedTokenValue=Ee.useResolvedTokenValue,exports.DEFAULT_MOBILE_MAX_WIDTH_BREAKPOINT=Ne.DEFAULT_MOBILE_MAX_WIDTH_BREAKPOINT,exports.useMaxWidthMediaQuery=Ne.useMaxWidthMediaQuery,exports.useMediaQuery=Ne.useMediaQuery,exports.useMinWidthMediaQuery=Ne.useMinWidthMediaQuery,exports.useResolvedBreakpointToken=Ne.useResolvedBreakpointToken,exports.TimeRangePicker=We.TimeRangePicker,exports.TimeSlotBar=Ge.TimeSlotBar,exports.TimeSlotBarWeek=Oe.TimeSlotBarWeek,exports.TimeSlotWeekView=He.TimeSlotWeekView,exports.Timeline=Qe.Timeline,exports.Timepicker=Ue.Timepicker,exports.TimeTable=ze.TimeTable,exports.Toast=Ke.Toast,exports.Toggle=Xe.Toggle,exports.Typography=Ye.Typography,exports.UneditableSection=Je.UneditableSection,exports.UnitNumberInput=Ze.UnitNumberInput,exports.V3_A11yPlaygroundTheme=$e.V3_A11yPlaygroundTheme,exports.V3_BookingSGTheme=$e.V3_BookingSGTheme,exports.V3_Border=$e.V3_Border,exports.V3_Breakpoint=$e.V3_Breakpoint,exports.V3_CCubeTheme=$e.V3_CCubeTheme,exports.V3_Colour=$e.V3_Colour,exports.V3_Font=$e.V3_Font,exports.V3_IMDATheme=$e.V3_IMDATheme,exports.V3_LifeSGTheme=$e.V3_LifeSGTheme,exports.V3_MediaQuery=$e.V3_MediaQuery,exports.V3_Motion=$e.V3_Motion,exports.V3_MyLegacyTheme=$e.V3_MyLegacyTheme,exports.V3_OneServiceTheme=$e.V3_OneServiceTheme,exports.V3_PATheme=$e.V3_PATheme,exports.V3_RBSTheme=$e.V3_RBSTheme,exports.V3_Radius=$e.V3_Radius,exports.V3_SGWDigitalLobbyTheme=$e.V3_SGWDigitalLobbyTheme,exports.V3_SGWDigitalLobbyThemeBase=$e.V3_SGWDigitalLobbyThemeBase,exports.V3_SMGSTheme=$e.V3_SMGSTheme,exports.V3_SPFTheme=$e.V3_SPFTheme,exports.V3_Shadow=$e.V3_Shadow,exports.V3_Spacing=$e.V3_Spacing,exports.V3_SupportGoWhereTheme=$e.V3_SupportGoWhereTheme,exports.V3_SupportGoWhereThemeBase=$e.V3_SupportGoWhereThemeBase,exports.V3_DSThemeProvider=er.V3_DSThemeProvider,exports.createThemeWithColourMode=rr.createThemeWithColourMode,exports.getSystemColourMode=rr.getSystemColourMode,exports.useDSTheme=rr.useDSTheme;
|
|
1
|
+
"use strict";var e=require("./accordion/accordion.js"),r=require("./alert/alert.js"),t=require("./animations/loading-dots/loading-dots.js"),i=require("./animations/loading-dots-spinner/loading-dots-spinner.js"),o=require("./animations/loading-spinner/loading-spinner.js"),s=require("./animations/themed-loading-spinner/themed-loading-spinner.js"),n=require("./avatar/avatar.js"),a=require("./badge/badge.js"),p=require("./box-container/box-container.js"),u=require("./breadcrumb/breadcrumb.js"),l=require("./button/button.js"),d=require("./calendar/calendar.js"),x=require("./card/card.js"),m=require("./checkbox/checkbox.js"),g=require("./countdown-timer/countdown-timer.js"),c=require("./dashed-border/dashed-border.js"),q=require("./data-table/data-table.js"),j=require("./date-input/date-input.js"),b=require("./date-navigator/date-navigator.js"),h=require("./date-range-input/date-range-input.js"),T=require("./divider/divider.js"),k=require("./drawer/drawer.js"),S=require("./e-signature/e-signature.js"),v=require("./error-display/error-display.js"),I=require("./error-display/helper.js"),y=require("./example/example.js"),B=require("./feedback-rating/feedback-rating.js"),M=require("./file-download/file-download.js"),w=require("./file-upload/file-upload.js"),D=require("./filter/filter.js"),P=require("./footer/footer.js"),f=require("./form/index.js"),C=require("./fullscreen-image-carousel/fullscreen-image-carousel.js"),F=require("./histogram-slider/histogram-slider.js"),L=require("./image-button/image-button.js"),N=require("./input/input.js"),R=require("./input-group/input-group.js"),E=require("./input-multi-select/input-multi-select.js"),A=require("./input-nested-multi-select/input-nested-multi-select.js"),H=require("./input-nested-select/input-nested-select.js"),Q=require("./input-range-select/input-range-select.js"),U=require("./input-range-slider/input-range-slider.js"),V=require("./input-select/input-select.js"),W=require("./input-slider/input-slider.js"),O=require("./input-textarea/textarea.js"),G=require("./language-switcher/language-switcher.js"),Y=require("./layout/index.js"),_=require("./link-list/link-list.js"),z=require("./markup/markup.js"),J=require("./masked-input/masked-input.js"),K=require("./masthead/masthead.js"),X=require("./menu/menu.js"),Z=require("./modal/index.js"),$=require("./modal-v2/index.js"),ee=require("./navbar/navbar.js"),re=require("./notification-banner/notification-banner.js"),te=require("./notification-banner/notification-banner-hoc.js"),ie=require("./otp-input/otp-input.js"),oe=require("./overlay/overlay.js"),se=require("./pagination/pagination.js"),ne=require("./phone-number-input/phone-number-input.js"),ae=require("./pill/pill.js"),pe=require("./popover/popover.js"),ue=require("./popover/popover-inline/popover-inline.js"),le=require("./popover/popover-trigger.js"),de=require("./predictive-text-input/predictive-text-input.js"),xe=require("./progress-indicator/progress-indicator.js"),me=require("./radio-button/radio-button.js"),ge=require("./select-histogram/select-histogram.js"),ce=require("./sidenav/sidenav.js"),qe=require("./singpass-button/singpass-button.js"),je=require("./smart-app-banner/smart-app-banner.js"),be=require("./tab/tab.js"),he=require("./table/table.js"),Te=require("./tag/tag.js"),ke=require("./text-list/index.js"),Se=require("./theme/theme-provider/index.js"),ve=require("./theme/theme-provider/hooks.js"),Ie=require("./theme/tokens/border.js"),ye=require("./theme/tokens/breakpoint.js"),Be=require("./theme/tokens/colour.js"),Me=require("./theme/tokens/component.js"),we=require("./theme/tokens/font.js"),De=require("./theme/tokens/media-query.js"),Pe=require("./theme/tokens/motion.js"),fe=require("./theme/tokens/radius.js"),Ce=require("./theme/tokens/shadow.js"),Fe=require("./theme/tokens/spacing.js"),Le=require("./theme/types.js"),Ne=require("./theme/utils/css-variable.js"),Re=require("./theme/utils/use-apply-styles.js"),Ee=require("./theme/utils/use-design-token.js"),Ae=require("./theme/utils/use-media-query.js"),He=require("./time-range-picker/time-range-picker.js"),Qe=require("./time-slot-bar/time-slot-bar.js"),Ue=require("./time-slot-bar-week/time-slot-bar-week.js"),Ve=require("./time-slot-week-view/time-slot-week-view.js"),We=require("./timeline/timeline.js"),Oe=require("./timepicker/timepicker.js"),Ge=require("./timetable/timetable.js"),Ye=require("./toast/toast.js"),_e=require("./toggle/toggle.js"),ze=require("./typography/index.js"),Je=require("./uneditable-section/index.js"),Ke=require("./unit-number/unit-number-input.js");exports.Accordion=e.Accordion,exports.Alert=r.Alert,exports.LoadingDots=t.LoadingDots,exports.LoadingDotsSpinner=i.LoadingDotsSpinner,exports.LoadingSpinner=o.LoadingSpinner,exports.ThemedLoadingSpinner=s.ThemedLoadingSpinner,exports.Avatar=n.Avatar,exports.Badge=a.Badge,exports.BoxContainer=p.BoxContainer,exports.Breadcrumb=u.Breadcrumb,exports.Button=l.Button,exports.Calendar=d.Calendar,exports.Card=x.Card,exports.Checkbox=m.Checkbox,exports.CountdownTimer=g.CountdownTimer,exports.DashedBorder=c.DashedBorder,exports.DataTable=q.DataTable,exports.DateInput=j.DateInput,exports.DateNavigator=b.DateNavigator,exports.DateRangeInput=h.DateRangeInput,exports.Divider=T.Divider,exports.Drawer=k.Drawer,exports.ESignature=S.ESignature,exports.ErrorDisplay=v.ErrorDisplay,exports.ErrorDisplayHelper=I.ErrorDisplayHelper,exports.Example=y.Example,exports.FeedbackRating=B.FeedbackRating,exports.FileDownload=M.FileDownload,exports.FileUpload=w.FileUpload,exports.Filter=D.Filter,exports.Footer=P.Footer,exports.Form=f.Form,exports.Component=C.Component,exports.FullscreenImageCarousel=C.FullscreenImageCarousel,exports.HistogramSlider=F.HistogramSlider,exports.ImageButton=L.ImageButton,exports.Input=N.Input,exports.InputGroup=R.InputGroup,exports.InputMultiSelect=E.InputMultiSelect,exports.InputNestedMultiSelect=A.InputNestedMultiSelect,exports.InputNestedSelect=H.InputNestedSelect,exports.InputRangeSelect=Q.InputRangeSelect,exports.InputRangeSlider=U.InputRangeSlider,exports.InputSelect=V.InputSelect,exports.InputSlider=W.InputSlider,exports.Textarea=O.Textarea,exports.LanguageSwitcher=G.LanguageSwitcher,exports.Layout=Y.Layout,exports.LinkList=_.LinkList,exports.Markup=z.Markup,exports.MaskedInput=J.MaskedInput,exports.Masthead=K.Masthead,exports.Menu=X.Menu,exports.MenuTrigger=X.MenuTrigger,exports.Modal=Z.Modal,exports.ModalV2=$.ModalV2,exports.Navbar=ee.Navbar,exports.NBComponent=re.NBComponent,exports.NotificationBanner=re.NotificationBanner,exports.withNotificationBanner=te.withNotificationBanner,exports.OtpInput=ie.OtpInput,exports.Overlay=oe.Overlay,exports.Pagination=se.Pagination,exports.PhoneNumberInput=ne.PhoneNumberInput,exports.Pill=ae.Pill,exports.Popover=pe.Popover,exports.PopoverInline=ue.PopoverInline,exports.PopoverTrigger=le.PopoverTrigger,exports.PredictiveTextInput=de.PredictiveTextInput,exports.ProgressIndicator=xe.ProgressIndicator,exports.RadioButton=me.RadioButton,exports.SelectHistogram=ge.SelectHistogram,exports.Sidenav=ce.Sidenav,exports.SingpassButton=qe.SingpassButton,exports.SmartAppBanner=je.SmartAppBanner,exports.Tab=be.Tab,exports.Table=he.Table,exports.Tag=Te.Tag,exports.TextList=ke.TextList,exports.ThemeProvider=Se.ThemeProvider,exports.useInheritedThemeScope=ve.useInheritedThemeScope,exports.useTheme=ve.useTheme,exports.Border=Ie.Border,exports.BorderStyle=Ie.BorderStyle,exports.BorderThickness=Ie.BorderThickness,exports.Breakpoint=ye.Breakpoint,exports.Colour=Be.Colour,exports.PrimitiveColours=Be.PrimitiveColours,exports.SemanticColours=Be.SemanticColours,exports.ComponentToken=Me.ComponentToken,exports.Font=we.Font,exports.FontSpec=we.FontSpec,exports.MediaQuery=De.MediaQuery,exports.Motion=Pe.Motion,exports.Radius=fe.Radius,exports.Shadow=Ce.Shadow,exports.Spacing=Fe.Spacing,exports.THEME_TYPES=Le.THEME_TYPES,exports.formatUnitValue=Ne.formatUnitValue,exports.parsePxOrRemValue=Ne.parsePxOrRemValue,exports.useApplyStyle=Re.useApplyStyle,exports.useDesignToken=Ee.useDesignToken,exports.useMaxWidthMediaQuery=Ae.useMaxWidthMediaQuery,exports.useMediaQuery=Ae.useMediaQuery,exports.useMinWidthMediaQuery=Ae.useMinWidthMediaQuery,exports.useResolvedBreakpointToken=Ae.useResolvedBreakpointToken,exports.TimeRangePicker=He.TimeRangePicker,exports.TimeSlotBar=Qe.TimeSlotBar,exports.TimeSlotBarWeek=Ue.TimeSlotBarWeek,exports.TimeSlotWeekView=Ve.TimeSlotWeekView,exports.Timeline=We.Timeline,exports.Timepicker=Oe.Timepicker,exports.TimeTable=Ge.TimeTable,exports.Toast=Ye.Toast,exports.Toggle=_e.Toggle,exports.Typography=ze.Typography,exports.UneditableSection=Je.UneditableSection,exports.UnitNumberInput=Ke.UnitNumberInput;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../_virtual/_tslib.js"),r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";var e=require("../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("clsx"),a=require("react"),s=require("../input/input.js"),t=require("../shared/accessibility/index.js");require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js"),require("../theme/tokens/border.js"),require("../theme/tokens/colour.js"),require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js"),require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js");var l=require("../util/simple-id-generator.js");require("../util/string-helper.js"),require("@react-aria/live-announcer"),require("../theme/utils/use-media-query.js"),require("../shared/dropdown-list/dropdown-label.styles_mloii0.css");var d=require("../shared/dropdown-list/dropdown-list.js"),o=require("../shared/dropdown-list/dropdown-list-state.js"),n=require("../shared/dropdown-list/expandable-element.js");require("@lifesg/react-icons/caret-right"),require("@lifesg/react-icons/exclamation-circle-fill"),require("@lifesg/react-icons/minus-square-fill"),require("@lifesg/react-icons/square"),require("@lifesg/react-icons/square-tick-fill"),require("@lifesg/react-icons/tick"),require("react-virtuoso"),require("../markup/markup.js"),require("../shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css");var u=require("../shared/dropdown-wrapper/element-with-dropdown.js"),c=require("../shared/input-wrapper/input-wrapper.js");require("../shared/dropdown-list/dropdown-list.styles_konwm.css"),require("../shared/dropdown-list/dropdown-search.js"),require("../shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css"),require("immer"),require("../external/lodash/_getTag.js"),require("../external/lodash/isArguments.js"),require("../external/lodash/_baseGetTag.js"),require("../external/lodash/isBuffer.js"),require("../external/lodash/isTypedArray.js"),require("../external/lodash/_Stack.js"),require("../external/lodash/_SetCache.js"),require("../external/lodash/_equalByTag.js"),require("../shared/dropdown-list/virtuoso-components.js");var p=require("../shared/dropdown-wrapper/dropdown-wrapper.js"),h=require("./input-group-list-addon.styles.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x=b(i);const j=(i,b)=>{var{addon:j,error:q,onChange:m,readOnly:f,disabled:y,className:w,onBlur:v,noBorder:g,"data-testid":_,"aria-labelledby":I,"aria-describedby":S,"aria-invalid":T,"aria-label":O}=i,R=e.__rest(i,["addon","error","onChange","readOnly","disabled","className","onBlur","noBorder","data-testid","aria-labelledby","aria-describedby","aria-invalid","aria-label"]);const{valueExtractor:N,listExtractor:k,enableSearch:A,hideNoResultsDisplay:E,noResultsDescription:B,searchPlaceholder:C,searchFunction:D,onSearch:H,placeholder:L="Select",displayValueExtractor:P,"data-selector-testid":G,options:V,selectedOption:M,onSelectOption:$,optionsLoadState:F,optionTruncationType:W,onRetry:Z,onHideOptions:z,onShowOptions:J,dropdownZIndex:K,dropdownRootNode:Q,"aria-label":U}=j.attributes,{position:X="left"}=j,[Y,ee]=a.useState(M),[re,ie]=a.useState(!1),[ae,se]=a.useState(!1),te=l.useId(),le=`${te}-listbox`,de=`${te}-instruction`,oe=`${te}-combobox-label`,ne=`${te}-textbox-label`,ue=a.useRef(null),ce=a.useRef(null);a.useEffect((()=>{ee(M)}),[M]);const pe=()=>{if(Y)return P?P(Y):N?N(Y):Y.toString()},he=e=>{e?null==J||J():null==z||z()},be=(e,r)=>{var i;null===(i=ce.current)||void 0===i||i.focus(),ee(e),ie(!1),he(!1),null==$||$(e,r)},xe=()=>{re&&(ie(!1),he(!1))},je=()=>{ie(!0),he(!0),se(!0)},qe=e=>{ie(!1),he(!1),"click"!==e&&(se(!1),null==v||v())},me=()=>{var e;null===(e=ce.current)||void 0===e||e.focus(),ie(!1),he(!1)},fe=()=>r.jsxs("div",{children:[r.jsx(n.ExpandableElement,{ref:ce,disabled:y,expanded:re,listboxId:le,popupRole:"listbox",readOnly:f,"aria-labelledby":t.concatIds(I,oe),"aria-describedby":t.concatIds(S,de),"aria-invalid":T,"data-position":X,className:x.default(g&&h.expandableElementNoBorder),children:r.jsx(p.LabelContainer,{disabled:y,children:Y?r.jsx(p.ValueLabel,{children:pe()}):r.jsx(p.PlaceholderLabel,{children:L})})}),r.jsx(t.VisuallyHidden,{id:de,children:"Press space to open options"})]}),ye=()=>r.jsx(d.DropdownList,{listboxId:le,listItems:V,onSelectItem:be,onDismiss:xe,valueExtractor:N,listExtractor:k,enableSearch:A,hideNoResultsDisplay:E,noResultsDescription:B,searchPlaceholder:C,searchFunction:D,onSearch:H,selectedItems:Y?[Y]:[],itemsLoadState:F,itemTruncationType:W,onRetry:Z,matchElementWidth:!0});return r.jsx(o.DropdownListState,{children:r.jsxs(c.InputBox,{focused:ae,disabled:y,readOnly:f,error:q,ref:ue,noBorder:g,"data-testid":_,tabIndex:-1,onFocus:()=>{ae||re||se(!0)},onBlur:e=>{ae&&!re&&ue.current&&!ue.current.contains(e.relatedTarget)&&(se(!1),null==v||v())},"data-position":X,className:x.default(h.fieldWrapper,w),children:[r.jsx(t.VisuallyHidden,{"aria-hidden":!0,id:oe,children:U}),r.jsx("div",{"data-testid":G,className:h.fieldSelector,children:f?Y?r.jsx("div",{"data-testid":"selector-label",tabIndex:0,role:"combobox","aria-haspopup":"listbox","aria-readonly":!0,"aria-expanded":!1,"aria-labelledby":I,"aria-describedby":S,"aria-invalid":T,className:h.selectorReadOnly,children:r.jsx(p.ValueLabel,{children:pe()})}):null:r.jsx(u.ElementWithDropdown,{enabled:!f&&!y,isOpen:re,renderElement:fe,renderDropdown:ye,onOpen:je,onClose:qe,onDismiss:me,clickToToggle:!0,offset:8,alignment:"right"===X?"right":"left",fitAvailableHeight:!0,customZIndex:K,rootNode:Q,positionRef:ue})}),r.jsx("div",{"data-position":X,className:x.default(h.divider,f&&h.dividerReadOnly)}),r.jsx(t.VisuallyHidden,{"aria-hidden":!0,id:ne,children:O}),r.jsx("div",{"data-position":X,className:x.default(h.fieldInput,g&&h.fieldInputNoBorder,f&&h.fieldInputReadOnly),children:r.jsx(s.Input,Object.assign({ref:b},R,{readOnly:f,disabled:y,error:q,onChange:e=>{m&&m(e)},"data-testid":"input",styleType:"no-border","aria-labelledby":t.concatIds(I,ne),"aria-describedby":S,"aria-invalid":T}))})]})})},q=b(a).default.forwardRef(j);exports.Component=j,exports.InputGroupListAddon=q;
|
|
2
2
|
//# sourceMappingURL=input-group-list-addon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group-list-addon.js","sources":["../../../src/input-group/input-group-list-addon.tsx"],"sourcesContent":["import type { OpenChangeReason } from \"@floating-ui/react\";\nimport clsx from \"clsx\";\nimport React, { useEffect, useRef, useState } from \"react\";\n\nimport { Input } from \"../input\";\nimport { concatIds, VisuallyHidden } from \"../shared/accessibility\";\nimport {\n DropdownList,\n DropdownListState,\n ExpandableElement,\n} from \"../shared/dropdown-list\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport {\n LabelContainer,\n PlaceholderLabel,\n ValueLabel,\n} from \"../shared/dropdown-wrapper/dropdown-wrapper\";\nimport { InputBox } from \"../shared/input-wrapper\";\nimport { useId } from \"../util\";\nimport * as styles from \"./input-group-list-addon.styles\";\nimport type { InputGroupProps, ListAddon } from \"./types\";\n\nexport const Component = <T, V>(\n {\n addon,\n error,\n onChange,\n readOnly,\n disabled,\n className,\n onBlur,\n noBorder,\n \"data-testid\": testId,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": textboxAriaLabel,\n ...otherProps\n }: InputGroupProps<T, V>,\n ref: React.Ref<HTMLInputElement>\n) => {\n const {\n /* display props */\n valueExtractor,\n listExtractor,\n /* search props */\n enableSearch,\n hideNoResultsDisplay,\n noResultsDescription,\n searchPlaceholder,\n searchFunction,\n onSearch,\n /* list addon props */\n placeholder = \"Select\",\n displayValueExtractor,\n \"data-selector-testid\": selectorTestId,\n options,\n selectedOption,\n onSelectOption,\n optionsLoadState,\n optionTruncationType,\n onRetry,\n onHideOptions,\n onShowOptions,\n dropdownZIndex,\n dropdownRootNode,\n \"aria-label\": comboboxAriaLabel,\n } = addon!.attributes as ListAddon<T, V>;\n\n const { position = \"left\" } = addon!;\n\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [selected, setSelected] = useState<T | undefined>(selectedOption);\n const [showOptions, setShowOptions] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n const internalId = useId();\n const listboxId = `${internalId}-listbox`;\n const instructionId = `${internalId}-instruction`;\n const comboboxLabelId = `${internalId}-combobox-label`;\n const textboxLabelId = `${internalId}-textbox-label`;\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const selectorRef = useRef<HTMLButtonElement>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setSelected(selectedOption);\n }, [selectedOption]);\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const getDisplayValue = () => {\n if (!selected) return;\n\n if (displayValueExtractor) {\n return displayValueExtractor(selected);\n }\n\n if (valueExtractor) {\n return valueExtractor(selected);\n }\n\n return selected.toString();\n };\n\n const triggerOptionDisplayCallback = (show: boolean) => {\n if (show) {\n onShowOptions?.();\n } else {\n onHideOptions?.();\n }\n };\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleListItemClick = (item: T, extractedValue: V) => {\n selectorRef.current?.focus();\n setSelected(item);\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n\n onSelectOption?.(item, extractedValue);\n };\n\n const handleListDismiss = () => {\n if (showOptions) {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n }\n };\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) onChange(event);\n };\n\n const handleNodeFocus = () => {\n if (!focused && !showOptions) {\n setFocused(true);\n }\n };\n\n const handleNodeBlur = (e: React.FocusEvent) => {\n if (\n focused &&\n !showOptions &&\n nodeRef.current &&\n !nodeRef.current.contains(e.relatedTarget as Node)\n ) {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleOpen = () => {\n setShowOptions(true);\n triggerOptionDisplayCallback(true);\n setFocused(true);\n };\n\n const handleClose = (reason: OpenChangeReason | undefined) => {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n\n // click to toggle should not blur the input\n if (reason !== \"click\") {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleDismiss = () => {\n selectorRef.current?.focus();\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderLabel = () => {\n if (selected) {\n return <ValueLabel>{getDisplayValue()}</ValueLabel>;\n }\n\n return <PlaceholderLabel>{placeholder}</PlaceholderLabel>;\n };\n\n const renderSelectorContent = () => (\n <LabelContainer disabled={disabled}>{renderLabel()}</LabelContainer>\n );\n\n const renderElement = () => {\n return (\n <div>\n <ExpandableElement\n ref={selectorRef}\n disabled={disabled}\n expanded={showOptions}\n listboxId={listboxId}\n popupRole=\"listbox\"\n readOnly={readOnly}\n aria-labelledby={concatIds(ariaLabelledBy, comboboxLabelId)}\n aria-describedby={concatIds(ariaDescribedBy, instructionId)}\n aria-invalid={ariaInvalid}\n data-position={position}\n className={clsx(\n noBorder && styles.expandableElementNoBorder\n )}\n >\n {renderSelectorContent()}\n </ExpandableElement>\n <VisuallyHidden id={instructionId}>\n Press space to open options\n </VisuallyHidden>\n </div>\n );\n };\n\n const renderDropdown = () => {\n return (\n <DropdownList\n listboxId={listboxId}\n listItems={options}\n onSelectItem={handleListItemClick}\n onDismiss={handleListDismiss}\n valueExtractor={valueExtractor}\n listExtractor={listExtractor}\n enableSearch={enableSearch}\n hideNoResultsDisplay={hideNoResultsDisplay}\n noResultsDescription={noResultsDescription}\n searchPlaceholder={searchPlaceholder}\n searchFunction={searchFunction}\n onSearch={onSearch}\n selectedItems={selected ? [selected] : []}\n itemsLoadState={optionsLoadState}\n itemTruncationType={optionTruncationType}\n onRetry={onRetry}\n matchElementWidth\n />\n );\n };\n\n const renderSelector = () => {\n if (readOnly) {\n return selected ? (\n <div\n data-testid=\"selector-label\"\n tabIndex={0}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-readonly\n aria-expanded={false}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n className={styles.selectorReadOnly}\n >\n <ValueLabel>{getDisplayValue()}</ValueLabel>\n </div>\n ) : null;\n } else {\n return (\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={showOptions}\n renderElement={renderElement}\n renderDropdown={renderDropdown}\n onOpen={handleOpen}\n onClose={handleClose}\n onDismiss={handleDismiss}\n clickToToggle\n offset={8}\n alignment={position === \"right\" ? \"right\" : \"left\"}\n fitAvailableHeight\n customZIndex={dropdownZIndex}\n rootNode={dropdownRootNode}\n positionRef={nodeRef}\n />\n );\n }\n };\n\n return (\n <DropdownListState>\n <InputBox\n focused={focused}\n disabled={disabled}\n readOnly={readOnly}\n error={error}\n ref={nodeRef}\n noBorder={noBorder}\n data-testid={testId}\n tabIndex={-1}\n onFocus={handleNodeFocus}\n onBlur={handleNodeBlur}\n data-position={position}\n className={clsx(styles.fieldWrapper, className)}\n >\n <VisuallyHidden aria-hidden id={comboboxLabelId}>\n {comboboxAriaLabel}\n </VisuallyHidden>\n <div\n data-testid={selectorTestId}\n className={styles.fieldSelector}\n >\n {renderSelector()}\n </div>\n <div\n data-position={position}\n className={clsx(\n styles.divider,\n readOnly && styles.dividerReadOnly\n )}\n />\n <VisuallyHidden aria-hidden id={textboxLabelId}>\n {textboxAriaLabel}\n </VisuallyHidden>\n <div\n data-position={position}\n className={clsx(\n styles.fieldInput,\n noBorder && styles.fieldInputNoBorder,\n readOnly && styles.fieldInputReadOnly\n )}\n >\n <Input\n ref={ref}\n {...otherProps}\n readOnly={readOnly}\n disabled={disabled}\n error={error}\n onChange={handleInputChange}\n data-testid=\"input\"\n styleType=\"no-border\"\n aria-labelledby={concatIds(\n ariaLabelledBy,\n textboxLabelId\n )}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n />\n </div>\n </InputBox>\n </DropdownListState>\n );\n};\n\nexport const InputGroupListAddon = React.forwardRef(Component);\n"],"names":["Component","_a","ref","addon","error","onChange","readOnly","disabled","className","onBlur","noBorder","testId","ariaLabelledBy","ariaDescribedBy","ariaInvalid","textboxAriaLabel","otherProps","__rest","valueExtractor","listExtractor","enableSearch","hideNoResultsDisplay","noResultsDescription","searchPlaceholder","searchFunction","onSearch","placeholder","displayValueExtractor","selectorTestId","options","selectedOption","onSelectOption","optionsLoadState","optionTruncationType","onRetry","onHideOptions","onShowOptions","dropdownZIndex","dropdownRootNode","comboboxAriaLabel","attributes","position","selected","setSelected","useState","showOptions","setShowOptions","focused","setFocused","internalId","useId","listboxId","instructionId","comboboxLabelId","textboxLabelId","nodeRef","useRef","selectorRef","useEffect","getDisplayValue","toString","triggerOptionDisplayCallback","show","handleListItemClick","item","extractedValue","current","focus","handleListDismiss","handleOpen","handleClose","reason","handleDismiss","renderElement","_jsxs","children","_jsx","ExpandableElement","expanded","popupRole","concatIds","clsx","styles.expandableElementNoBorder","LabelContainer","ValueLabel","PlaceholderLabel","VisuallyHidden","id","renderDropdown","DropdownList","listItems","onSelectItem","onDismiss","selectedItems","itemsLoadState","itemTruncationType","matchElementWidth","DropdownListState","InputBox","tabIndex","onFocus","e","contains","relatedTarget","styles.fieldWrapper","styles.fieldSelector","role","styles.selectorReadOnly","ElementWithDropdown","enabled","isOpen","onOpen","onClose","clickToToggle","offset","alignment","fitAvailableHeight","customZIndex","rootNode","positionRef","styles.divider","styles.dividerReadOnly","styles.fieldInput","styles.fieldInputNoBorder","styles.fieldInputReadOnly","Input","Object","assign","event","styleType","InputGroupListAddon","React","forwardRef"],"mappings":"2yEAsBaA,EAAY,CACrBC,EAgBAC,KAhBA,IAAAC,MACIA,EAAKC,MACLA,EAAKC,SACLA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,UACRA,EAASC,OACTA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AAA,oBACfjD,SAEDC,EAAAA,IAACiD,EAAAA,MAAKC,OAAAC,OAAA,CACF7H,IAAKA,GACDc,EAAU,CACdV,SAAUA,EACVC,SAAUA,EACVH,MAAOA,EACPC,SAxMO2H,IACnB3H,GAAUA,EAAS2H,EAAM,gBAwMD,QACZC,UAAU,8BACOjD,EAAAA,UACbpE,EACA0C,IACH,mBACiBzC,iBACJC,WAIV,EAIfoH,OAAsBC,QAAMC,WAAWpI"}
|
|
1
|
+
{"version":3,"file":"input-group-list-addon.js","sources":["../../../src/input-group/input-group-list-addon.tsx"],"sourcesContent":["import type { OpenChangeReason } from \"@floating-ui/react\";\nimport clsx from \"clsx\";\nimport React, { useEffect, useRef, useState } from \"react\";\n\nimport { Input } from \"../input\";\nimport { concatIds, VisuallyHidden } from \"../shared/accessibility\";\nimport {\n DropdownList,\n DropdownListState,\n ExpandableElement,\n} from \"../shared/dropdown-list\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport {\n LabelContainer,\n PlaceholderLabel,\n ValueLabel,\n} from \"../shared/dropdown-wrapper/dropdown-wrapper\";\nimport { InputBox } from \"../shared/input-wrapper\";\nimport { useId } from \"../util\";\nimport * as styles from \"./input-group-list-addon.styles\";\nimport type { InputGroupProps, ListAddon } from \"./types\";\n\nexport const Component = <T, V>(\n {\n addon,\n error,\n onChange,\n readOnly,\n disabled,\n className,\n onBlur,\n noBorder,\n \"data-testid\": testId,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": textboxAriaLabel,\n ...otherProps\n }: InputGroupProps<T, V>,\n ref: React.Ref<HTMLInputElement>\n) => {\n const {\n /* display props */\n valueExtractor,\n listExtractor,\n /* search props */\n enableSearch,\n hideNoResultsDisplay,\n noResultsDescription,\n searchPlaceholder,\n searchFunction,\n onSearch,\n /* list addon props */\n placeholder = \"Select\",\n displayValueExtractor,\n \"data-selector-testid\": selectorTestId,\n options,\n selectedOption,\n onSelectOption,\n optionsLoadState,\n optionTruncationType,\n onRetry,\n onHideOptions,\n onShowOptions,\n dropdownZIndex,\n dropdownRootNode,\n \"aria-label\": comboboxAriaLabel,\n } = addon!.attributes as ListAddon<T, V>;\n\n const { position = \"left\" } = addon!;\n\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [selected, setSelected] = useState<T | undefined>(selectedOption);\n const [showOptions, setShowOptions] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n const internalId = useId();\n const listboxId = `${internalId}-listbox`;\n const instructionId = `${internalId}-instruction`;\n const comboboxLabelId = `${internalId}-combobox-label`;\n const textboxLabelId = `${internalId}-textbox-label`;\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const selectorRef = useRef<HTMLButtonElement>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setSelected(selectedOption);\n }, [selectedOption]);\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const getDisplayValue = () => {\n if (!selected) return;\n\n if (displayValueExtractor) {\n return displayValueExtractor(selected);\n }\n\n if (valueExtractor) {\n return valueExtractor(selected);\n }\n\n return selected.toString();\n };\n\n const triggerOptionDisplayCallback = (show: boolean) => {\n if (show) {\n onShowOptions?.();\n } else {\n onHideOptions?.();\n }\n };\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleListItemClick = (item: T, extractedValue: V) => {\n selectorRef.current?.focus();\n setSelected(item);\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n\n onSelectOption?.(item, extractedValue);\n };\n\n const handleListDismiss = () => {\n if (showOptions) {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n }\n };\n\n const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) onChange(event);\n };\n\n const handleNodeFocus = () => {\n if (!focused && !showOptions) {\n setFocused(true);\n }\n };\n\n const handleNodeBlur = (e: React.FocusEvent) => {\n if (\n focused &&\n !showOptions &&\n nodeRef.current &&\n !nodeRef.current.contains(e.relatedTarget as Node)\n ) {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleOpen = () => {\n setShowOptions(true);\n triggerOptionDisplayCallback(true);\n setFocused(true);\n };\n\n const handleClose = (reason: OpenChangeReason | undefined) => {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n\n // click to toggle should not blur the input\n if (reason !== \"click\") {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleDismiss = () => {\n selectorRef.current?.focus();\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderLabel = () => {\n if (selected) {\n return <ValueLabel>{getDisplayValue()}</ValueLabel>;\n }\n\n return <PlaceholderLabel>{placeholder}</PlaceholderLabel>;\n };\n\n const renderSelectorContent = () => (\n <LabelContainer disabled={disabled}>{renderLabel()}</LabelContainer>\n );\n\n const renderElement = () => {\n return (\n <div>\n <ExpandableElement\n ref={selectorRef}\n disabled={disabled}\n expanded={showOptions}\n listboxId={listboxId}\n popupRole=\"listbox\"\n readOnly={readOnly}\n aria-labelledby={concatIds(ariaLabelledBy, comboboxLabelId)}\n aria-describedby={concatIds(ariaDescribedBy, instructionId)}\n aria-invalid={ariaInvalid}\n data-position={position}\n className={clsx(\n noBorder && styles.expandableElementNoBorder\n )}\n >\n {renderSelectorContent()}\n </ExpandableElement>\n <VisuallyHidden id={instructionId}>\n Press space to open options\n </VisuallyHidden>\n </div>\n );\n };\n\n const renderDropdown = () => {\n return (\n <DropdownList\n listboxId={listboxId}\n listItems={options}\n onSelectItem={handleListItemClick}\n onDismiss={handleListDismiss}\n valueExtractor={valueExtractor}\n listExtractor={listExtractor}\n enableSearch={enableSearch}\n hideNoResultsDisplay={hideNoResultsDisplay}\n noResultsDescription={noResultsDescription}\n searchPlaceholder={searchPlaceholder}\n searchFunction={searchFunction}\n onSearch={onSearch}\n selectedItems={selected ? [selected] : []}\n itemsLoadState={optionsLoadState}\n itemTruncationType={optionTruncationType}\n onRetry={onRetry}\n matchElementWidth\n />\n );\n };\n\n const renderSelector = () => {\n if (readOnly) {\n return selected ? (\n <div\n data-testid=\"selector-label\"\n tabIndex={0}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-readonly\n aria-expanded={false}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n className={styles.selectorReadOnly}\n >\n <ValueLabel>{getDisplayValue()}</ValueLabel>\n </div>\n ) : null;\n } else {\n return (\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={showOptions}\n renderElement={renderElement}\n renderDropdown={renderDropdown}\n onOpen={handleOpen}\n onClose={handleClose}\n onDismiss={handleDismiss}\n clickToToggle\n offset={8}\n alignment={position === \"right\" ? \"right\" : \"left\"}\n fitAvailableHeight\n customZIndex={dropdownZIndex}\n rootNode={dropdownRootNode}\n positionRef={nodeRef}\n />\n );\n }\n };\n\n return (\n <DropdownListState>\n <InputBox\n focused={focused}\n disabled={disabled}\n readOnly={readOnly}\n error={error}\n ref={nodeRef}\n noBorder={noBorder}\n data-testid={testId}\n tabIndex={-1}\n onFocus={handleNodeFocus}\n onBlur={handleNodeBlur}\n data-position={position}\n className={clsx(styles.fieldWrapper, className)}\n >\n <VisuallyHidden aria-hidden id={comboboxLabelId}>\n {comboboxAriaLabel}\n </VisuallyHidden>\n <div\n data-testid={selectorTestId}\n className={styles.fieldSelector}\n >\n {renderSelector()}\n </div>\n <div\n data-position={position}\n className={clsx(\n styles.divider,\n readOnly && styles.dividerReadOnly\n )}\n />\n <VisuallyHidden aria-hidden id={textboxLabelId}>\n {textboxAriaLabel}\n </VisuallyHidden>\n <div\n data-position={position}\n className={clsx(\n styles.fieldInput,\n noBorder && styles.fieldInputNoBorder,\n readOnly && styles.fieldInputReadOnly\n )}\n >\n <Input\n ref={ref}\n {...otherProps}\n readOnly={readOnly}\n disabled={disabled}\n error={error}\n onChange={handleInputChange}\n data-testid=\"input\"\n styleType=\"no-border\"\n aria-labelledby={concatIds(\n ariaLabelledBy,\n textboxLabelId\n )}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n />\n </div>\n </InputBox>\n </DropdownListState>\n );\n};\n\nexport const InputGroupListAddon = React.forwardRef(Component);\n"],"names":["Component","_a","ref","addon","error","onChange","readOnly","disabled","className","onBlur","noBorder","testId","ariaLabelledBy","ariaDescribedBy","ariaInvalid","textboxAriaLabel","otherProps","__rest","valueExtractor","listExtractor","enableSearch","hideNoResultsDisplay","noResultsDescription","searchPlaceholder","searchFunction","onSearch","placeholder","displayValueExtractor","selectorTestId","options","selectedOption","onSelectOption","optionsLoadState","optionTruncationType","onRetry","onHideOptions","onShowOptions","dropdownZIndex","dropdownRootNode","comboboxAriaLabel","attributes","position","selected","setSelected","useState","showOptions","setShowOptions","focused","setFocused","internalId","useId","listboxId","instructionId","comboboxLabelId","textboxLabelId","nodeRef","useRef","selectorRef","useEffect","getDisplayValue","toString","triggerOptionDisplayCallback","show","handleListItemClick","item","extractedValue","current","focus","handleListDismiss","handleOpen","handleClose","reason","handleDismiss","renderElement","_jsxs","children","_jsx","ExpandableElement","expanded","popupRole","concatIds","clsx","styles.expandableElementNoBorder","LabelContainer","ValueLabel","PlaceholderLabel","VisuallyHidden","id","renderDropdown","DropdownList","listItems","onSelectItem","onDismiss","selectedItems","itemsLoadState","itemTruncationType","matchElementWidth","DropdownListState","InputBox","tabIndex","onFocus","e","contains","relatedTarget","styles.fieldWrapper","styles.fieldSelector","role","styles.selectorReadOnly","ElementWithDropdown","enabled","isOpen","onOpen","onClose","clickToToggle","offset","alignment","fitAvailableHeight","customZIndex","rootNode","positionRef","styles.divider","styles.dividerReadOnly","styles.fieldInput","styles.fieldInputNoBorder","styles.fieldInputReadOnly","Input","Object","assign","event","styleType","InputGroupListAddon","React","forwardRef"],"mappings":"wyEAsBaA,EAAY,CACrBC,EAgBAC,KAhBA,IAAAC,MACIA,EAAKC,MACL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E,EAAAA,QACPyC,EAAAA,WACAhH,GAAYiH,EAAAA,mBACZrH,GAAYsH,EAAAA,oBACfjD,SAEDC,EAAAA,IAACiD,EAAAA,MAAKC,OAAAC,OAAA,CACF7H,IAAKA,GACDc,EAAU,CACdV,SAAUA,EACVC,SAAUA,EACVH,MAAOA,EACPC,SAxMO2H,IACnB3H,GAAUA,EAAS2H,EAAM,gBAwMD,QACZC,UAAU,8BACOjD,EAAAA,UACbpE,EACA0C,IACH,mBACiBzC,iBACJC,WAIV,EAIfoH,OAAsBC,QAAMC,WAAWpI"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";require("./input-group.
|
|
1
|
+
"use strict";require("./input-group.styles_bqye6f.css");exports.addonWrapper="afvd13",exports.labelAddonContainer="l1s6ick6",exports.noAddonWrapper="nx53mj4";
|
|
2
2
|
//# sourceMappingURL=input-group.styles.js.map
|
package/{input-group/input-group.styles_fpy81r.css → cjs/input-group/input-group.styles_bqye6f.css}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
.afvd13{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%;padding:0 var(--fds-spacing-16);}.afvd13[data-read-only="true"]{padding:0;}.afvd13[data-no-border="true"]{padding:0;}.afvd13[data-position="right"]{-webkit-flex-direction:row-reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;}
|
|
2
2
|
.nx53mj4{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;width:100%;padding:0 var(--fds-spacing-16);}.nx53mj4[data-read-only="true"]{padding:0;}.nx53mj4[data-no-border="true"]{padding:0;}
|
|
3
|
-
.l1s6ick6{position:relative;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;margin-right:var(--fds-spacing-12);font-family:var(--fds-font-family);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-baseline);font-weight:var(--fds-font-weight-regular);line-height:var(--fds-font-body-lh-baseline);letter-spacing:var(--fds-font-body-ls-baseline);color:var(--fds-colour-text);}.l1s6ick6 svg{height:1em;width:1em;}.l1s6ick6[data-disabled="true"]{color:var(--fds-colour-text-subtler);}.l1s6ick6[data-read-only="true"]{margin-right:var(--fds-spacing-4);}.l1s6ick6[data-position="right"]{margin-right:0;margin-left:var(--fds-spacing-12);}.l1s6ick6[data-position="right"][data-read-only="true"]{margin-right:0;margin-left:var(--fds-spacing-4);}
|
|
3
|
+
.l1s6ick6{position:relative;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;margin-right:var(--fds-spacing-12);font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-baseline);font-weight:var(--fds-font-weight-regular);line-height:var(--fds-font-body-lh-baseline);letter-spacing:var(--fds-font-body-ls-baseline);color:var(--fds-colour-text);}.l1s6ick6 svg{height:1em;width:1em;}.l1s6ick6[data-disabled="true"]{color:var(--fds-colour-text-subtler);}.l1s6ick6[data-read-only="true"]{margin-right:var(--fds-spacing-4);}.l1s6ick6[data-position="right"]{margin-right:0;margin-left:var(--fds-spacing-12);}.l1s6ick6[data-position="right"][data-read-only="true"]{margin-right:0;margin-left:var(--fds-spacing-4);}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("../external/lodash/findIndex.js"),t=require("react");require("clsx"),require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js"),require("../theme/tokens/border.js"),require("../theme/tokens/colour.js"),require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js"),require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js");var s=require("../util/simple-id-generator.js");require("../util/string-helper.js"),require("@react-aria/live-announcer"),require("../theme/utils/use-media-query.js"),require("../shared/dropdown-list/dropdown-label.
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("../external/lodash/findIndex.js"),t=require("react");require("clsx"),require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js"),require("../theme/tokens/border.js"),require("../theme/tokens/colour.js"),require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js"),require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js");var s=require("../util/simple-id-generator.js");require("../util/string-helper.js"),require("@react-aria/live-announcer"),require("../theme/utils/use-media-query.js"),require("../shared/dropdown-list/dropdown-label.styles_mloii0.css");var i=require("../shared/dropdown-list/dropdown-list.js"),l=require("../shared/dropdown-list/dropdown-list-state.js"),a=require("../shared/dropdown-list/expandable-element.js");require("@lifesg/react-icons/caret-right"),require("@lifesg/react-icons/exclamation-circle-fill"),require("@lifesg/react-icons/minus-square-fill"),require("@lifesg/react-icons/square"),require("@lifesg/react-icons/square-tick-fill"),require("@lifesg/react-icons/tick"),require("react-virtuoso"),require("../markup/markup.js"),require("../_virtual/_tslib.js"),require("../shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css");var n=require("../shared/dropdown-wrapper/element-with-dropdown.js"),o=require("../shared/input-wrapper/input-wrapper.js");require("../shared/dropdown-list/dropdown-list.styles_konwm.css"),require("../shared/dropdown-list/dropdown-search.js"),require("../shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css"),require("immer"),require("../external/lodash/_getTag.js"),require("../external/lodash/isArguments.js"),require("../external/lodash/_baseGetTag.js"),require("../external/lodash/isBuffer.js"),require("../external/lodash/isTypedArray.js"),require("../external/lodash/_Stack.js"),require("../external/lodash/_SetCache.js"),require("../external/lodash/_equalByTag.js"),require("../shared/dropdown-list/virtuoso-components.js");var d=require("../shared/dropdown-wrapper/dropdown-wrapper.js");exports.InputMultiSelect=({selectedOptions:u,placeholder:c="Select",options:p,disabled:h,error:m,className:q,"data-testid":x,id:j,"aria-labelledby":b,"aria-describedby":w,"aria-invalid":g,enableSearch:f=!1,searchFunction:y,searchPlaceholder:v,valueExtractor:_,listExtractor:S,onSelectOptions:T,onShowOptions:I,onHideOptions:A,onRetry:L,optionsLoadState:k="success",optionTruncationType:C="end",renderListItem:D,hideNoResultsDisplay:E,noResultsDescription:R,customLabels:O,renderCustomCallToAction:P,onBlur:H,variant:N="default",readOnly:B,alignment:G,dropdownZIndex:M,maxSelectable:F,dropdownRootNode:W,dropdownWidth:Z})=>{const{allSelectedLabel:V,multiSelectedLabel:$}=O||{},[z,J]=t.useState(u||[]),[K,Q]=t.useState(!1),[U,X]=t.useState(!1),Y=s.useId(),ee=t.useRef(null),re=t.useRef(null);t.useEffect((()=>{J(u||[])}),[u]);const te=()=>{z&&z.length>0||F?(J([]),oe([])):(J(p),oe(p))},se=(e,t)=>{const s=[...z],i=r.default(z,(e=>(_?_(e):e)===t));i>-1?s.splice(i,1):s.push(e),J(s),oe(s)},ie=()=>{K&&(Q(!1),ne(!1))},le=()=>{U||K||X(!0)},ae=e=>{U&&!K&&ee.current&&!ee.current.contains(e.relatedTarget)&&(X(!1),null==H||H())},ne=e=>{!e&&A&&A(),e&&I&&I()},oe=e=>{T&&T(e)};return e.jsx(l.DropdownListState,{children:e.jsx(n.ElementWithDropdown,{enabled:!B&&!h,isOpen:K,renderElement:()=>e.jsx(o.InputBox,{className:q,"data-testid":x,id:j,ref:ee,tabIndex:-1,onFocus:le,onBlur:ae,focused:U,disabled:h,readOnly:B,error:m,children:e.jsx(a.ExpandableElement,{ref:re,disabled:h,expanded:K,listboxId:Y,popupRole:"listbox",readOnly:B,variant:N,"aria-labelledby":b,"aria-describedby":w,"aria-invalid":g,children:e.jsx(d.LabelContainer,{disabled:h,children:z&&0!==z.length?e.jsx(d.ValueLabel,{variant:N,truncateType:C,children:p&&z.length===p.length?V||"All selected":$||`${z.length} selected`}):e.jsx(d.PlaceholderLabel,{variant:N,truncateType:C,children:c})})})}),renderDropdown:()=>e.jsx(i.DropdownList,{listboxId:Y,listItems:p,onSelectItem:se,onDismiss:ie,valueExtractor:_,listExtractor:S,enableSearch:f,searchFunction:y,searchPlaceholder:v,multiSelect:!0,maxSelectable:F,selectedItems:z,onSelectAll:te,onRetry:L,itemsLoadState:k,itemTruncationType:C,renderListItem:D,hideNoResultsDisplay:E,noResultsDescription:R,customLabels:O,renderCustomCallToAction:P,variant:N,width:Z,matchElementWidth:!0}),onOpen:()=>{Q(!0),ne(!0),X(!0)},onClose:e=>{Q(!1),ne(!1),"click"!==e&&(X(!1),null==H||H())},onDismiss:()=>{var e;null===(e=re.current)||void 0===e||e.focus(),Q(!1),ne(!1)},clickToToggle:!0,offset:8,alignment:G,fitAvailableHeight:!0,customZIndex:M,rootNode:W})})};
|
|
2
2
|
//# sourceMappingURL=input-multi-select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-multi-select.js","sources":["../../../src/input-multi-select/input-multi-select.tsx"],"sourcesContent":["import type { OpenChangeReason } from \"@floating-ui/react\";\nimport findIndex from \"lodash/findIndex\";\nimport type React from \"react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport {\n DropdownList,\n DropdownListState,\n ExpandableElement,\n} from \"../shared/dropdown-list\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport {\n LabelContainer,\n PlaceholderLabel,\n ValueLabel,\n} from \"../shared/dropdown-wrapper/dropdown-wrapper\";\nimport { InputBox } from \"../shared/input-wrapper/input-wrapper\";\nimport { useId } from \"../util\";\nimport type { InputMultiSelectProps } from \"./types\";\n\nexport const InputMultiSelect = <T, V>({\n selectedOptions,\n placeholder = \"Select\",\n options,\n disabled,\n error,\n className,\n \"data-testid\": testId,\n id,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n enableSearch = false,\n searchFunction,\n searchPlaceholder,\n valueExtractor,\n listExtractor,\n onSelectOptions,\n onShowOptions,\n onHideOptions,\n onRetry,\n optionsLoadState = \"success\",\n optionTruncationType = \"end\",\n renderListItem,\n hideNoResultsDisplay,\n noResultsDescription,\n customLabels,\n renderCustomCallToAction,\n onBlur,\n variant = \"default\",\n readOnly,\n alignment,\n dropdownZIndex,\n maxSelectable,\n dropdownRootNode,\n dropdownWidth,\n}: InputMultiSelectProps<T, V>): JSX.Element => {\n // =============================================================================\n // CONST, STATE\n // =============================================================================\n const { allSelectedLabel, multiSelectedLabel } = customLabels || {};\n const [selected, setSelected] = useState<T[]>(selectedOptions || []);\n const [showOptions, setShowOptions] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n const internalId = useId();\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const selectorRef = useRef<HTMLButtonElement>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setSelected(selectedOptions || []);\n }, [selectedOptions]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleSelectAllClick = () => {\n if ((selected && selected.length > 0) || maxSelectable) {\n setSelected([]);\n performOnSelectOptions([]);\n } else {\n setSelected(options);\n performOnSelectOptions(options);\n }\n };\n\n const handleListItemClick = (item: T, extractedValue: T | V) => {\n const selectedCopy = [...selected];\n\n // Check if it is a selection or deselection\n const itemIndex = findIndex(selected, (item) => {\n const valueToCompare = valueExtractor ? valueExtractor(item) : item;\n return valueToCompare === extractedValue;\n });\n\n if (itemIndex > -1) {\n // Item exists in selected. This indicates a deselection\n selectedCopy.splice(itemIndex, 1);\n } else {\n // Item does not exist in selected. This indicates a selection\n selectedCopy.push(item);\n }\n\n setSelected(selectedCopy);\n performOnSelectOptions(selectedCopy);\n };\n\n const handleListDismiss = () => {\n if (showOptions) {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n }\n };\n\n const handleNodeFocus = () => {\n if (!focused && !showOptions) {\n setFocused(true);\n }\n };\n\n const handleNodeBlur = (e: React.FocusEvent) => {\n if (\n focused &&\n !showOptions &&\n nodeRef.current &&\n !nodeRef.current.contains(e.relatedTarget as Node)\n ) {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleOpen = () => {\n setShowOptions(true);\n triggerOptionDisplayCallback(true);\n setFocused(true);\n };\n\n const handleClose = (reason: OpenChangeReason | undefined) => {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n\n // click to toggle should not blur the input\n if (reason !== \"click\") {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleDismiss = () => {\n selectorRef.current?.focus();\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n };\n\n // =============================================================================\n // HELPER FUNCTION\n // =============================================================================\n const getDisplayValue = () => {\n if (options && selected.length === options.length) {\n return allSelectedLabel || \"All selected\";\n }\n\n return multiSelectedLabel || `${selected.length} selected`;\n };\n\n const triggerOptionDisplayCallback = (show: boolean) => {\n if (!show && onHideOptions) {\n onHideOptions();\n }\n\n if (show && onShowOptions) {\n onShowOptions();\n }\n };\n\n const performOnSelectOptions = (options: T[]) => {\n if (onSelectOptions) {\n onSelectOptions(options);\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderLabel = () => {\n if (!selected || selected.length === 0) {\n return (\n <PlaceholderLabel\n variant={variant}\n truncateType={optionTruncationType}\n >\n {placeholder}\n </PlaceholderLabel>\n );\n } else {\n return (\n <ValueLabel\n variant={variant}\n truncateType={optionTruncationType}\n >\n {getDisplayValue()}\n </ValueLabel>\n );\n }\n };\n\n const renderSelectorContent = () => (\n <LabelContainer disabled={disabled}>{renderLabel()}</LabelContainer>\n );\n\n const renderElement = () => {\n return (\n <InputBox\n className={className}\n data-testid={testId}\n id={id}\n ref={nodeRef}\n tabIndex={-1}\n onFocus={handleNodeFocus}\n onBlur={handleNodeBlur}\n focused={focused}\n disabled={disabled}\n readOnly={readOnly}\n error={error}\n >\n <ExpandableElement\n ref={selectorRef}\n disabled={disabled}\n expanded={showOptions}\n listboxId={internalId}\n popupRole=\"listbox\"\n readOnly={readOnly}\n variant={variant}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n >\n {renderSelectorContent()}\n </ExpandableElement>\n </InputBox>\n );\n };\n\n const renderDropdown = () => {\n return (\n <DropdownList\n listboxId={internalId}\n listItems={options}\n onSelectItem={handleListItemClick}\n onDismiss={handleListDismiss}\n valueExtractor={valueExtractor}\n listExtractor={listExtractor}\n enableSearch={enableSearch}\n searchFunction={searchFunction}\n searchPlaceholder={searchPlaceholder}\n multiSelect\n maxSelectable={maxSelectable}\n selectedItems={selected}\n onSelectAll={handleSelectAllClick}\n onRetry={onRetry}\n itemsLoadState={optionsLoadState}\n itemTruncationType={optionTruncationType}\n renderListItem={renderListItem}\n hideNoResultsDisplay={hideNoResultsDisplay}\n noResultsDescription={noResultsDescription}\n customLabels={customLabels}\n renderCustomCallToAction={renderCustomCallToAction}\n variant={variant}\n width={dropdownWidth}\n matchElementWidth\n />\n );\n };\n\n return (\n <DropdownListState>\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={showOptions}\n renderElement={renderElement}\n renderDropdown={renderDropdown}\n onOpen={handleOpen}\n onClose={handleClose}\n onDismiss={handleDismiss}\n clickToToggle\n offset={8}\n alignment={alignment}\n fitAvailableHeight\n customZIndex={dropdownZIndex}\n rootNode={dropdownRootNode}\n />\n </DropdownListState>\n );\n};\n"],"names":["selectedOptions","placeholder","options","disabled","error","className","testId","id","ariaLabelledBy","ariaDescribedBy","ariaInvalid","enableSearch","searchFunction","searchPlaceholder","valueExtractor","listExtractor","onSelectOptions","onShowOptions","onHideOptions","onRetry","optionsLoadState","optionTruncationType","renderListItem","hideNoResultsDisplay","noResultsDescription","customLabels","renderCustomCallToAction","onBlur","variant","readOnly","alignment","dropdownZIndex","maxSelectable","dropdownRootNode","dropdownWidth","allSelectedLabel","multiSelectedLabel","selected","setSelected","useState","showOptions","setShowOptions","focused","setFocused","internalId","useId","nodeRef","useRef","selectorRef","useEffect","handleSelectAllClick","length","performOnSelectOptions","handleListItemClick","item","extractedValue","selectedCopy","itemIndex","findIndex","splice","push","handleListDismiss","triggerOptionDisplayCallback","handleNodeFocus","handleNodeBlur","e","current","contains","relatedTarget","show","_jsx","DropdownListState","children","ElementWithDropdown","enabled","isOpen","renderElement","InputBox","ref","tabIndex","onFocus","ExpandableElement","expanded","listboxId","popupRole","LabelContainer","ValueLabel","truncateType","PlaceholderLabel","renderDropdown","DropdownList","listItems","onSelectItem","onDismiss","multiSelect","selectedItems","onSelectAll","itemsLoadState","itemTruncationType","width","matchElementWidth","onOpen","onClose","reason","_a","focus","clickToToggle","offset","fitAvailableHeight","customZIndex","rootNode"],"mappings":"upEAoBgC,EAC5BA,kBACAC,cAAc,SACdC,UACAC,WACAC,QACAC,YACA,cAAeC,EACfC,KACA,kBAAmBC,EACnB,mBAAoBC,EACpB,eAAgBC,EAChBC,gBAAe,EACfC,iBACAC,oBACAC,iBACAC,gBACAC,kBACAC,gBACAC,gBACAC,UACAC,mBAAmB,UACnBC,uBAAuB,MACvBC,iBACAC,uBACAC,uBACAC,eACAC,2BACAC,SACAC,UAAU,UACVC,WACAC,YACAC,iBACAC,gBACAC,mBACAC,oBAKA,MAAMC,iBAAEA,EAAgBC,mBAAEA,GAAuBX,GAAgB,CAAA,GAC1DY,EAAUC,GAAeC,EAAAA,SAAcvC,GAAmB,KAC1DwC,EAAaC,GAAkBF,EAAAA,UAAkB,IACjDG,EAASC,GAAcJ,EAAAA,UAAkB,GAC1CK,EAAaC,EAAAA,QAEbC,GAAUC,EAAAA,OAAuB,MACjCC,GAAcD,EAAAA,OAA0B,MAK9CE,EAAAA,WAAU,KACNX,EAAYtC,GAAmB,GAAG,GACnC,CAACA,IAKJ,MAAMkD,GAAuB,KACpBb,GAAYA,EAASc,OAAS,GAAMnB,GACrCM,EAAY,IACZc,GAAuB,MAEvBd,EAAYpC,GACZkD,GAAuBlD,GAC3B,EAGEmD,GAAsB,CAACC,EAASC,KAClC,MAAMC,EAAe,IAAInB,GAGnBoB,EAAYC,EAAAA,QAAUrB,GAAWiB,IACZxC,EAAiBA,EAA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D,aAAclE,EAAoBmD,SAEjCvE,UAyFLwF,eArCW,IAEfnB,MAACoB,EAAAA,aAAY,CACTP,UAAWvC,EACX+C,UAAWzF,EACX0F,aAAcvC,GACdwC,UAAWhC,GACX/C,eAAgBA,EAChBC,cAAeA,EACfJ,aAAcA,EACdC,eAAgBA,EAChBC,kBAAmBA,EACnBiF,eACA9D,cAAeA,EACf+D,cAAe1D,EACf2D,YAAa9C,GACb/B,QAASA,EACT8E,eAAgB7E,EAChB8E,mBAAoB7E,EACpBC,eAAgBA,EAChBC,qBAAsBA,EACtBC,qBAAsBA,EACtBC,aAAcA,EACdC,yBAA0BA,EAC1BE,QAASA,EACTuE,MAAOjE,EACPkE,mBAAiB,IAYjBC,OAtJO,KACf5D,GAAe,GACfqB,IAA6B,GAC7BnB,GAAW,EAAK,EAoJR2D,QAjJSC,IACjB9D,GAAe,GACfqB,IAA6B,GAGd,UAAXyC,IACA5D,GAAW,GACXhB,SAAAA,IACJ,EA0IQkE,UAvIU,WACC,QAAnBW,EAAAxD,GAAYkB,eAAO,IAAAsC,GAAAA,EAAEC,QACrBhE,GAAe,GACfqB,IAA6B,EAAM,EAqI3B4C,eAAa,EACbC,OAAQ,EACR7E,UAAWA,EACX8E,oBAAkB,EAClBC,aAAc9E,EACd+E,SAAU7E,KAEE"}
|
|
1
|
+
{"version":3,"file":"input-multi-select.js","sources":["../../../src/input-multi-select/input-multi-select.tsx"],"sourcesContent":["import type { OpenChangeReason } from \"@floating-ui/react\";\nimport findIndex from \"lodash/findIndex\";\nimport type React from \"react\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport {\n DropdownList,\n DropdownListState,\n ExpandableElement,\n} from \"../shared/dropdown-list\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport {\n LabelContainer,\n PlaceholderLabel,\n ValueLabel,\n} from \"../shared/dropdown-wrapper/dropdown-wrapper\";\nimport { InputBox } from \"../shared/input-wrapper/input-wrapper\";\nimport { useId } from \"../util\";\nimport type { InputMultiSelectProps } from \"./types\";\n\nexport const InputMultiSelect = <T, V>({\n selectedOptions,\n placeholder = \"Select\",\n options,\n disabled,\n error,\n className,\n \"data-testid\": testId,\n id,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-invalid\": ariaInvalid,\n enableSearch = false,\n searchFunction,\n searchPlaceholder,\n valueExtractor,\n listExtractor,\n onSelectOptions,\n onShowOptions,\n onHideOptions,\n onRetry,\n optionsLoadState = \"success\",\n optionTruncationType = \"end\",\n renderListItem,\n hideNoResultsDisplay,\n noResultsDescription,\n customLabels,\n renderCustomCallToAction,\n onBlur,\n variant = \"default\",\n readOnly,\n alignment,\n dropdownZIndex,\n maxSelectable,\n dropdownRootNode,\n dropdownWidth,\n}: InputMultiSelectProps<T, V>): JSX.Element => {\n // =============================================================================\n // CONST, STATE\n // =============================================================================\n const { allSelectedLabel, multiSelectedLabel } = customLabels || {};\n const [selected, setSelected] = useState<T[]>(selectedOptions || []);\n const [showOptions, setShowOptions] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n const internalId = useId();\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const selectorRef = useRef<HTMLButtonElement>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setSelected(selectedOptions || []);\n }, [selectedOptions]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleSelectAllClick = () => {\n if ((selected && selected.length > 0) || maxSelectable) {\n setSelected([]);\n performOnSelectOptions([]);\n } else {\n setSelected(options);\n performOnSelectOptions(options);\n }\n };\n\n const handleListItemClick = (item: T, extractedValue: T | V) => {\n const selectedCopy = [...selected];\n\n // Check if it is a selection or deselection\n const itemIndex = findIndex(selected, (item) => {\n const valueToCompare = valueExtractor ? valueExtractor(item) : item;\n return valueToCompare === extractedValue;\n });\n\n if (itemIndex > -1) {\n // Item exists in selected. This indicates a deselection\n selectedCopy.splice(itemIndex, 1);\n } else {\n // Item does not exist in selected. This indicates a selection\n selectedCopy.push(item);\n }\n\n setSelected(selectedCopy);\n performOnSelectOptions(selectedCopy);\n };\n\n const handleListDismiss = () => {\n if (showOptions) {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n }\n };\n\n const handleNodeFocus = () => {\n if (!focused && !showOptions) {\n setFocused(true);\n }\n };\n\n const handleNodeBlur = (e: React.FocusEvent) => {\n if (\n focused &&\n !showOptions &&\n nodeRef.current &&\n !nodeRef.current.contains(e.relatedTarget as Node)\n ) {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleOpen = () => {\n setShowOptions(true);\n triggerOptionDisplayCallback(true);\n setFocused(true);\n };\n\n const handleClose = (reason: OpenChangeReason | undefined) => {\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n\n // click to toggle should not blur the input\n if (reason !== \"click\") {\n setFocused(false);\n onBlur?.();\n }\n };\n\n const handleDismiss = () => {\n selectorRef.current?.focus();\n setShowOptions(false);\n triggerOptionDisplayCallback(false);\n };\n\n // =============================================================================\n // HELPER FUNCTION\n // =============================================================================\n const getDisplayValue = () => {\n if (options && selected.length === options.length) {\n return allSelectedLabel || \"All selected\";\n }\n\n return multiSelectedLabel || `${selected.length} selected`;\n };\n\n const triggerOptionDisplayCallback = (show: boolean) => {\n if (!show && onHideOptions) {\n onHideOptions();\n }\n\n if (show && onShowOptions) {\n onShowOptions();\n }\n };\n\n const performOnSelectOptions = (options: T[]) => {\n if (onSelectOptions) {\n onSelectOptions(options);\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderLabel = () => {\n if (!selected || selected.length === 0) {\n return (\n <PlaceholderLabel\n variant={variant}\n truncateType={optionTruncationType}\n >\n {placeholder}\n </PlaceholderLabel>\n );\n } else {\n return (\n <ValueLabel\n variant={variant}\n truncateType={optionTruncationType}\n >\n {getDisplayValue()}\n </ValueLabel>\n );\n }\n };\n\n const renderSelectorContent = () => (\n <LabelContainer disabled={disabled}>{renderLabel()}</LabelContainer>\n );\n\n const renderElement = () => {\n return (\n <InputBox\n className={className}\n data-testid={testId}\n id={id}\n ref={nodeRef}\n tabIndex={-1}\n onFocus={handleNodeFocus}\n onBlur={handleNodeBlur}\n focused={focused}\n disabled={disabled}\n readOnly={readOnly}\n error={error}\n >\n <ExpandableElement\n ref={selectorRef}\n disabled={disabled}\n expanded={showOptions}\n listboxId={internalId}\n popupRole=\"listbox\"\n readOnly={readOnly}\n variant={variant}\n aria-labelledby={ariaLabelledBy}\n aria-describedby={ariaDescribedBy}\n aria-invalid={ariaInvalid}\n >\n {renderSelectorContent()}\n </ExpandableElement>\n </InputBox>\n );\n };\n\n const renderDropdown = () => {\n return (\n <DropdownList\n listboxId={internalId}\n listItems={options}\n onSelectItem={handleListItemClick}\n onDismiss={handleListDismiss}\n valueExtractor={valueExtractor}\n listExtractor={listExtractor}\n enableSearch={enableSearch}\n searchFunction={searchFunction}\n searchPlaceholder={searchPlaceholder}\n multiSelect\n maxSelectable={maxSelectable}\n selectedItems={selected}\n onSelectAll={handleSelectAllClick}\n onRetry={onRetry}\n itemsLoadState={optionsLoadState}\n itemTruncationType={optionTruncationType}\n renderListItem={renderListItem}\n hideNoResultsDisplay={hideNoResultsDisplay}\n noResultsDescription={noResultsDescription}\n customLabels={customLabels}\n renderCustomCallToAction={renderCustomCallToAction}\n variant={variant}\n width={dropdownWidth}\n matchElementWidth\n />\n );\n };\n\n return (\n <DropdownListState>\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={showOptions}\n renderElement={renderElement}\n renderDropdown={renderDropdown}\n onOpen={handleOpen}\n onClose={handleClose}\n onDismiss={handleDismiss}\n clickToToggle\n offset={8}\n alignment={alignment}\n fitAvailableHeight\n customZIndex={dropdownZIndex}\n rootNode={dropdownRootNode}\n />\n </DropdownListState>\n );\n};\n"],"names":["selectedOptions","placeholder","options","disabled","error","className","testId","id","ariaLabelledBy","ariaDescribedBy","ariaInvalid","enableSearch","searchFunction","searchPlaceholder","valueExtractor","listExtractor","onSelectOptions","onShowOptions","onHideOptions","onRetry","optionsLoadState","optionTruncationType","renderListItem","hideNoResultsDisplay","noResultsDescription","customLabels","renderCustomCallToAction","onBlur","variant","readOnly","alignment","dropdownZIndex","maxSelectable","dropdownRootNode","dropdownWidth","allSelectedLabel","multiSelectedLabel","selected","setSelected","useState","showOptions","setShowOptions","focused","setFocused","internalId","useId","nodeRef","useRef","selectorRef","useEffect","handleSelectAllClick","length","performOnSelectOptions","handleListItemClick","item","extractedValue","selectedCopy","itemIndex","findIndex","splice","push","handleListDismiss","triggerOptionDisplayCallback","handleNodeFocus","handleNodeBlur","e","current","contains","relatedTarget","show","_jsx","DropdownListState","children","ElementWithDropdown","enabled","isOpen","renderElement","InputBox","ref","tabIndex","onFocus","ExpandableElement","expanded","listboxId","popupRole","LabelContainer","ValueLabel","truncateType","PlaceholderLabel","renderDropdown","DropdownList","listItems","onSelectItem","onDismiss","multiSelect","selectedItems","onSelectAll","itemsLoadState","itemTruncationType","width","matchElementWidth","onOpen","onClose","reason","_a","focus","clickToToggle","offset","fitAvailableHeight","customZIndex","rootNode"],"mappings":"opEAoBgC,EAC5BA,kBACAC,cAAc,SACdC,UACAC,WACAC,QACAC,YACA,cAAeC,EACfC,KACA,kBAAmBC,EACnB,mBAAoBC,EACpB,eAAgBC,EAChBC,gBAAe,EACfC,iBACAC,oBACAC,iBACAC,gBACAC,kBACAC,gBACAC,gBACAC,UACAC,mBAAmB,UACnBC,uBAAuB,MACvBC,iBACAC,uBACAC,uBACAC,eACAC,2BACAC,SACAC,UAAU,UACVC,WACAC,YACAC,iBACAC,gBACAC,mBACAC,oBAKA,MAAMC,iBAAEA,EAAgBC,mBAAEA,GAAuBX,GAAgB,CAAA,GAC1DY,EAAUC,GAAeC,EAAAA,SAAcvC,GAAmB,KAC1DwC,EAAaC,GAAkBF,EAAAA,UAAkB,IACjDG,EAASC,GAAcJ,EAAAA,UAAkB,GAC1CK,EAAaC,EAAAA,QAEbC,GAAUC,EAAAA,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ASA,EAAO,kBACCpB,qBACCC,EAAe,eACnBC,EAAW8D,SA5BrCF,EAAAA,IAACe,iBAAc,CAAClF,SAAUA,EAAQqE,SAtB7BnC,GAAgC,IAApBA,EAASc,OAWlBmB,EAAAA,IAACgB,aAAU,CACP1D,QAASA,EACT2D,aAAclE,EAAoBmD,SAxC1CtE,GAAWmC,EAASc,SAAWjD,EAAQiD,OAChChB,GAAoB,eAGxBC,GAAsB,GAAGC,EAASc,oBAyBjCmB,EAAAA,IAACkB,mBAAgB,CACb5D,QAASA,EACT2D,aAAclE,EAAoBmD,SAEjCvE,UAyFLwF,eArCW,IAEfnB,MAACoB,EAAAA,aAAY,CACTP,UAAWvC,EACX+C,UAAWzF,EACX0F,aAAcvC,GACdwC,UAAWhC,GACX/C,eAAgBA,EAChBC,cAAeA,EACfJ,aAAcA,EACdC,eAAgBA,EAChBC,kBAAmBA,EACnBiF,eACA9D,cAAeA,EACf+D,cAAe1D,EACf2D,YAAa9C,GACb/B,QAASA,EACT8E,eAAgB7E,EAChB8E,mBAAoB7E,EACpBC,eAAgBA,EAChBC,qBAAsBA,EACtBC,qBAAsBA,EACtBC,aAAcA,EACdC,yBAA0BA,EAC1BE,QAASA,EACTuE,MAAOjE,EACPkE,mBAAiB,IAYjBC,OAtJO,KACf5D,GAAe,GACfqB,IAA6B,GAC7BnB,GAAW,EAAK,EAoJR2D,QAjJSC,IACjB9D,GAAe,GACfqB,IAA6B,GAGd,UAAXyC,IACA5D,GAAW,GACXhB,SAAAA,IACJ,EA0IQkE,UAvIU,WACC,QAAnBW,EAAAxD,GAAYkB,eAAO,IAAAsC,GAAAA,EAAEC,QACrBhE,GAAe,GACfqB,IAA6B,EAAM,EAqI3B4C,eAAa,EACbC,OAAQ,EACR7E,UAAWA,EACX8E,oBAAkB,EAClBC,aAAc9E,EACd+E,SAAU7E,KAEE"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("../external/lodash/isEmpty.js"),r=require("../external/lodash/isEqual.js"),
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("../external/lodash/isEmpty.js"),r=require("../external/lodash/isEqual.js"),l=require("react");require("clsx"),require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js"),require("../theme/tokens/border.js"),require("../theme/tokens/colour.js"),require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js"),require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js");var a=require("../util/simple-id-generator.js"),s=require("../util/string-helper.js");require("@react-aria/live-announcer"),require("../theme/utils/use-media-query.js"),require("../shared/dropdown-list/dropdown-label.styles_mloii0.css"),require("../shared/dropdown-list/dropdown-list.js"),require("../shared/dropdown-list/dropdown-list-state.js");var n=require("../shared/dropdown-list/expandable-element.js"),i=require("../shared/dropdown-list/nested-dropdown-list.js"),d=require("../shared/dropdown-list/nested-dropdown-list-helpers.js"),o=require("../shared/dropdown-wrapper/element-with-dropdown.js"),u=require("../shared/dropdown-wrapper/dropdown-wrapper.js"),c=require("../shared/input-wrapper/input-wrapper.js"),h=require("./helpers.js");exports.InputNestedMultiSelect=({placeholder:p="Select",options:m,disabled:b,error:y,className:j,"data-testid":w,id:q,"aria-labelledby":S,"aria-describedby":f,"aria-invalid":x,selectedKeyPaths:v,mode:P,valueToStringFunction:k,enableSearch:g,searchPlaceholder:T,hideNoResultsDisplay:I,noResultsDescription:R,customLabels:L,readOnly:E,onSearch:O,onSelectOptions:D,onShowOptions:N,onHideOptions:K,onRetry:A,onBlur:B,optionsLoadState:C="success",optionTruncationType:H="end",variant:_="default",alignment:W,dropdownZIndex:F,dropdownWidth:M,dropdownRootNode:Z})=>{const{multiSelectedLabel:G}=L||{},V=m,[$,z]=l.useState(v?d.buildKeyPathToSet(v):new Set),[J,Q]=l.useState([]),[U,X]=l.useState(!1),[Y,ee]=l.useState(!1),te=a.useId(),re=l.useRef(null),le=l.useRef(null),ae=l.useRef(null);l.useEffect((()=>{const e=v||[],t=h.getSelectedItems(V,e);z(d.buildKeyPathToSet(e)),Q(t)}),[v,V]);const se=(e,t)=>{const r=t.map((e=>({keyPath:e.keyPath,label:e.item.label,value:e.item.value})));z(d.buildKeyPathToSet(e)),Q(r),he(e,r)},ne=e=>{const t=pe(e),r=t.map((e=>e.keyPath));Q(t),z(d.buildKeyPathToSet(r)),he(r,t)},ie=()=>{Y||U||ee(!0)},de=e=>{Y&&!U&&re.current&&!re.current.contains(e.relatedTarget)&&(ee(!1),null==B||B())},oe=()=>{if(J.length>1)return G||`${J.length} selected`;const{label:e,value:t}=J[0];return k?k(t):e},ue=e=>{if("middle"===H){let t=0;return ae&&ae.current&&(t=ae.current.getBoundingClientRect().width),s.StringHelper.truncateOneLine(e,t,120,6)}return e},ce=e=>{!e&&K&&K(),e&&N&&N()},he=(e,t)=>{if(D){const r=t.map((e=>e.value));D(e,r)}},pe=e=>{if(!0===e.checked)return J.filter((t=>{const l=t.keyPath.slice(0,e.keyPath.length);return!r.default(e.keyPath,l)}));{const t=[...J];return(e.hasSubItems?h.getSelectedSubItems(V,e.keyPath):[{value:e.item.value,label:e.item.label,keyPath:e.keyPath}]).forEach((e=>{J.find((t=>r.default(t.keyPath,e.keyPath)))||t.push(e)})),t}};return e.jsx(o.ElementWithDropdown,{enabled:!E&&!b,isOpen:U,renderElement:()=>e.jsx(c.InputBox,{className:j,"data-testid":w,id:q,ref:re,tabIndex:-1,onFocus:ie,onBlur:de,focused:Y,disabled:b,readOnly:E,error:y,children:e.jsx(n.ExpandableElement,{ref:le,disabled:b,expanded:U,listboxId:te,popupRole:"tree",readOnly:E,variant:_,"aria-labelledby":S,"aria-describedby":f,"aria-invalid":x,children:e.jsx(u.LabelContainer,{ref:ae,disabled:b,children:t.default(J)?e.jsx(u.PlaceholderLabel,{truncateType:H,children:p}):e.jsx(u.ValueLabel,{truncateType:H,children:ue(oe())})})})}),renderDropdown:()=>e.jsx(i.NestedDropdownList,{listboxId:te,listItems:V,multiSelect:!0,selectedKeyPaths:$,itemsLoadState:C,itemTruncationType:H,enableSearch:g,searchPlaceholder:T,hideNoResultsDisplay:I,noResultsDescription:R,customLabels:L,onSelectItem:ne,onSelectAll:se,onRetry:A,onSearch:O,variant:_,mode:P,width:M,matchElementWidth:!0}),onOpen:()=>{X(!0),ce(!0),ee(!0)},onClose:e=>{X(!1),ce(!1),"click"!==e&&(ee(!1),null==B||B())},onDismiss:()=>{var e;null===(e=le.current)||void 0===e||e.focus(),X(!1),ce(!1)},clickToToggle:!0,offset:8,alignment:W,fitAvailableHeight:!0,customZIndex:F,rootNode:Z})};
|
|
2
2
|
//# sourceMappingURL=input-nested-multi-select.js.map
|