@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
package/codemods/run-codemod.ts
CHANGED
|
@@ -3,8 +3,6 @@ import { execSync } from "child_process";
|
|
|
3
3
|
import * as fs from "fs";
|
|
4
4
|
import * as path from "path";
|
|
5
5
|
|
|
6
|
-
import { Theme } from "./common";
|
|
7
|
-
|
|
8
6
|
const codemodsDir =
|
|
9
7
|
process.env.ENV === "dev"
|
|
10
8
|
? path.join(process.cwd(), "codemods")
|
|
@@ -14,12 +12,7 @@ const codemodsDir =
|
|
|
14
12
|
);
|
|
15
13
|
|
|
16
14
|
enum Codemod {
|
|
17
|
-
|
|
18
|
-
MigrateColour = "migrate-colour",
|
|
19
|
-
MigrateLayout = "migrate-layout",
|
|
20
|
-
MigrateMediaQuery = "migrate-media-query",
|
|
21
|
-
MigrateText = "migrate-text",
|
|
22
|
-
MigrateTextList = "migrate-text-list",
|
|
15
|
+
MigratePopover = "migrate-popover",
|
|
23
16
|
}
|
|
24
17
|
|
|
25
18
|
const theme = {
|
|
@@ -27,15 +20,8 @@ const theme = {
|
|
|
27
20
|
};
|
|
28
21
|
|
|
29
22
|
const CodemodDescriptions: { [key in Codemod]: string } = {
|
|
30
|
-
[Codemod.
|
|
31
|
-
|
|
32
|
-
[Codemod.MigrateLayout]: "Replace V2_Layout with new Layout components",
|
|
33
|
-
[Codemod.MigrateMediaQuery]:
|
|
34
|
-
"Replace V2 media queries with new Breakpoint tokens",
|
|
35
|
-
[Codemod.MigrateText]:
|
|
36
|
-
"Replace V2_Text with new Typography components and V2_TextStyleHelper.getTextStyle() with Font",
|
|
37
|
-
[Codemod.MigrateTextList]:
|
|
38
|
-
"Replace V2_TextList with new Textlist components",
|
|
23
|
+
[Codemod.MigratePopover]:
|
|
24
|
+
"Replace deprecated Popover and migrate PopoverV2 imports",
|
|
39
25
|
};
|
|
40
26
|
|
|
41
27
|
const TargetDirectoryPaths = {
|
|
@@ -45,7 +31,6 @@ const TargetDirectoryPaths = {
|
|
|
45
31
|
|
|
46
32
|
interface UserSelection {
|
|
47
33
|
selectedCodemods: string[];
|
|
48
|
-
selectedTheme: Theme | null;
|
|
49
34
|
targetPath: string;
|
|
50
35
|
}
|
|
51
36
|
|
|
@@ -65,16 +50,12 @@ function listCodemods(): { name: string; value: string }[] {
|
|
|
65
50
|
}
|
|
66
51
|
|
|
67
52
|
function runCodemods(selection: UserSelection): void {
|
|
68
|
-
const { selectedCodemods, targetPath
|
|
53
|
+
const { selectedCodemods, targetPath } = selection;
|
|
69
54
|
|
|
70
55
|
selectedCodemods.forEach((codemod) => {
|
|
71
56
|
const codemodPath = path.join(codemodsDir, codemod, "index.ts");
|
|
72
57
|
let command = `npx --yes jscodeshift --parser=tsx -t ${codemodPath} ${targetPath}`;
|
|
73
58
|
|
|
74
|
-
if (codemod === Codemod.MigrateColour && selectedTheme) {
|
|
75
|
-
command = `npx --yes jscodeshift --parser=tsx -t ${codemodPath} --mapping=${selectedTheme} ${targetPath}`;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
59
|
console.log(
|
|
79
60
|
`Running codemod: ${codemod} on target path: ${targetPath}`
|
|
80
61
|
);
|
|
@@ -133,24 +114,6 @@ async function chooseTargetPath(): Promise<string | null> {
|
|
|
133
114
|
return selectedOption;
|
|
134
115
|
}
|
|
135
116
|
|
|
136
|
-
async function chooseTheme(): Promise<Theme | null> {
|
|
137
|
-
const themeOptions = [
|
|
138
|
-
{ name: "LifeSG", value: Theme.LifeSG },
|
|
139
|
-
{ name: "BookingSG", value: Theme.BookingSG },
|
|
140
|
-
{ name: "MyLegacy", value: Theme.MyLegacy },
|
|
141
|
-
{ name: "CCube", value: Theme.CCube },
|
|
142
|
-
{ name: "RBS", value: Theme.RBS },
|
|
143
|
-
{ name: "OneService", value: Theme.OneService },
|
|
144
|
-
];
|
|
145
|
-
|
|
146
|
-
const selectedTheme = await select({
|
|
147
|
-
message: "Select the theme that your project is using:",
|
|
148
|
-
choices: themeOptions,
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
return selectedTheme;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
117
|
async function getCodemodSelections(): Promise<UserSelection> {
|
|
155
118
|
const codemods = listCodemods();
|
|
156
119
|
if (codemods.length === 0) {
|
|
@@ -164,31 +127,21 @@ async function getCodemodSelections(): Promise<UserSelection> {
|
|
|
164
127
|
theme,
|
|
165
128
|
});
|
|
166
129
|
|
|
167
|
-
let selectedTheme: Theme | null = null;
|
|
168
|
-
if (selectedCodemods.includes(Codemod.MigrateColour)) {
|
|
169
|
-
selectedTheme = await chooseTheme();
|
|
170
|
-
}
|
|
171
|
-
|
|
172
130
|
const targetPath = await chooseTargetPath();
|
|
173
131
|
if (!targetPath) {
|
|
174
132
|
throw new Error("No target path selected or provided");
|
|
175
133
|
}
|
|
176
134
|
|
|
177
|
-
return { selectedCodemods,
|
|
135
|
+
return { selectedCodemods, targetPath };
|
|
178
136
|
}
|
|
179
137
|
|
|
180
138
|
async function getConfirmation(selection: UserSelection) {
|
|
181
|
-
const { selectedCodemods,
|
|
139
|
+
const { selectedCodemods, targetPath } = selection;
|
|
182
140
|
|
|
183
141
|
const codemods = selectedCodemods.join(", ");
|
|
184
142
|
const finalConfirmationMessage =
|
|
185
143
|
`\nYou are about to run the following codemods: ${codemods}\n` +
|
|
186
|
-
`Target path: ${targetPath}\n
|
|
187
|
-
`${
|
|
188
|
-
selectedTheme
|
|
189
|
-
? `Selected theme for "migrate-colour": ${selectedTheme}\n`
|
|
190
|
-
: ""
|
|
191
|
-
}`;
|
|
144
|
+
`Target path: ${targetPath}\n`;
|
|
192
145
|
|
|
193
146
|
console.log(finalConfirmationMessage);
|
|
194
147
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./countdown-timer.
|
|
1
|
+
import"./countdown-timer.styles_ipn1b0.css";const t={fixedCountdown:{top:"--fds-internal-countdownTimer-fixedCountdown-top",left:"--fds-internal-countdownTimer-fixedCountdown-left",right:"--fds-internal-countdownTimer-fixedCountdown-right"}},n="wav7a6b",o="c1ji5mw9",i="csdqyky",d="cibq1kp",e="c1ehax2j",r="t6f42l5",w="t19x1azi",c="t1pvvziw";export{o as countdown,e as countdownFixed,i as countdownHidden,d as countdownInline,r as timeLeft,w as timer,c as timerIcon,t as tokens,n as wrapper};
|
|
2
2
|
//# sourceMappingURL=countdown-timer.styles.js.map
|
package/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.wav7a6b{width:100%;}
|
|
2
|
-
.c1ji5mw9{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);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;padding:var(--fds-spacing-8) var(--fds-spacing-16);border-radius:var(--fds-radius-sm);color:var(--fds-colour-text-primary);border:var(--fds-border-width-010) var(--fds-border-style-solid);border-color:var(--fds-colour-border-primary);background-color:var(--fds-colour-bg);}:where(body.fds-breakpoint-sm-max) .c1ji5mw9{padding:var(--fds-spacing-16);}.c1ji5mw9[data-warn="true"]{color:var(--fds-colour-text-error);border-color:var(--fds-colour-border-error);}
|
|
2
|
+
.c1ji5mw9{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);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;padding:var(--fds-spacing-8) var(--fds-spacing-16);border-radius:var(--fds-radius-sm);color:var(--fds-colour-text-primary);border:var(--fds-border-width-010) var(--fds-border-style-solid);border-color:var(--fds-colour-border-primary);background-color:var(--fds-colour-bg);}:where(body.fds-breakpoint-sm-max) .c1ji5mw9{padding:var(--fds-spacing-16);}.c1ji5mw9[data-warn="true"]{color:var(--fds-colour-text-error);border-color:var(--fds-colour-border-error);}
|
|
3
3
|
.csdqyky{opacity:0;}
|
|
4
4
|
.cibq1kp{position:relative;}
|
|
5
5
|
.c1ehax2j{position:fixed;z-index:10;--fds-internal-countdownTimer-fixedCountdown-top:initial;--fds-internal-countdownTimer-fixedCountdown-left:initial;--fds-internal-countdownTimer-fixedCountdown-right:initial;top:var(--fds-internal-countdownTimer-fixedCountdown-top);left:var(--fds-internal-countdownTimer-fixedCountdown-left);right:var(--fds-internal-countdownTimer-fixedCountdown-right);box-shadow:var(--fds-shadow-xs-focus-strong);}:where(body.fds-breakpoint-sm-max) .c1ehax2j{left:0;right:0;border-radius:0;border-left:none;border-right:none;box-shadow:none;}.c1ehax2j[data-warn="true"]{box-shadow:var(--fds-shadow-xs-error-strong);}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e}from"../_virtual/_tslib.js";import{jsxs as r,jsx as o}from"react/jsx-runtime";import t from"clsx";import{forwardRef as s,useRef as i}from"react";import"../theme/theme-provider/index.js";import"../theme/theme-provider/context.js";import{BorderThickness as m}from"../theme/tokens/border.js";import{Colour as l}from"../theme/tokens/colour.js";import"../theme/tokens/font.js";import"../theme/tokens/media-query.js";import{Radius as a}from"../theme/tokens/radius.js";import{
|
|
1
|
+
import{__rest as e}from"../_virtual/_tslib.js";import{jsxs as r,jsx as o}from"react/jsx-runtime";import t from"clsx";import{forwardRef as s,useRef as i}from"react";import"../theme/theme-provider/index.js";import"../theme/theme-provider/context.js";import{BorderThickness as m}from"../theme/tokens/border.js";import{Colour as l}from"../theme/tokens/colour.js";import"../theme/tokens/font.js";import"../theme/tokens/media-query.js";import{Radius as a}from"../theme/tokens/radius.js";import{useApplyStyle as n}from"../theme/utils/use-apply-styles.js";import{useResolvedTokenValue as u}from"../theme/utils/use-design-token.js";import"../theme/utils/use-media-query.js";import{toCssValue as d}from"../theme/utils/token-resolver.js";import"../util/calendar-helper.js";import"../external/dayjs/dayjs.min.js";import{mergeRefs as p}from"../util/merge-refs.js";import"../util/simple-id-generator.js";import"../util/string-helper.js";import"@react-aria/live-announcer";import{isColourToken as c,isRadiusToken as h,isThicknessToken as j}from"../util/styling-helper.js";import{tokens as f,root as k,overlay as b}from"./dashed-border.styles.js";import{createSvgBackgroundImage as g}from"./dashed-border.utils.js";const v=s(((s,v)=>{const{enabled:y=!0,thickness:C=m["width-010"],radius:x=a.none,colour:z=l.border,backgroundColor:N,className:T,children:q}=s,w=e(s,["enabled","thickness","radius","colour","backgroundColor","className","children"]),B=u({value:C,fallback:m["width-010"],isToken:j,normalizeCustom:d}),S=u({value:x,fallback:a.none,isToken:h,normalizeCustom:d}),_=u({value:z,fallback:l.border,isToken:c,normalizeCustom:String}),I=u({value:N,fallback:"none",isToken:c,normalizeCustom:String}),O=y||!!N,R=g({radius:S,colour:_,thickness:B,enabled:y}),A=i(null),D=i(null),E=v?p(A,v):A;return n(A,{[f.rootRadius]:S,[f.rootBackgroundColor]:N?I:null}),n(D,{[f.overlayBackgroundImage]:O?R:null}),r("div",Object.assign({ref:E,className:t(k,T)},w,{children:[O&&o("div",{"aria-hidden":"true",className:b,ref:D}),q]}))}));export{v as DashedBorder};
|
|
2
2
|
//# sourceMappingURL=dashed-border.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashed-border.js","sources":["../../src/dashed-border/dashed-border.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, useRef } from \"react\";\n\nimport {
|
|
1
|
+
{"version":3,"file":"dashed-border.js","sources":["../../src/dashed-border/dashed-border.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { forwardRef, useRef } from \"react\";\n\nimport { BorderThickness, Colour, Radius, useApplyStyle } from \"../theme\";\nimport { toCssValue, useResolvedTokenValue } from \"../theme/utils\";\nimport { mergeRefs } from \"../util\";\nimport {\n isColourToken,\n isRadiusToken,\n isThicknessToken,\n} from \"../util/styling-helper\";\nimport * as styles from \"./dashed-border.styles\";\nimport { createSvgBackgroundImage } from \"./dashed-border.utils\";\nimport type { DashedBorderProps } from \"./types\";\n\nconst Component = (\n props: DashedBorderProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n const {\n enabled = true,\n thickness = BorderThickness[\"width-010\"],\n radius = Radius[\"none\"],\n colour = Colour[\"border\"],\n backgroundColor,\n className,\n children,\n ...otherProps\n } = props;\n\n const effectiveThickness = useResolvedTokenValue({\n value: thickness,\n fallback: BorderThickness[\"width-010\"],\n isToken: isThicknessToken,\n normalizeCustom: toCssValue,\n });\n\n const effectiveRadius = useResolvedTokenValue({\n value: radius,\n fallback: Radius[\"none\"],\n isToken: isRadiusToken,\n normalizeCustom: toCssValue,\n });\n\n const effectiveColour = useResolvedTokenValue({\n value: colour,\n fallback: Colour[\"border\"],\n isToken: isColourToken,\n normalizeCustom: String,\n });\n\n const effectiveBackgroundColor = useResolvedTokenValue({\n value: backgroundColor,\n fallback: \"none\",\n isToken: isColourToken,\n normalizeCustom: String,\n });\n\n const showSvg = enabled || !!backgroundColor;\n const overlayBackgroundImage = createSvgBackgroundImage({\n radius: effectiveRadius,\n colour: effectiveColour,\n thickness: effectiveThickness,\n enabled,\n });\n const rootRef = useRef<HTMLDivElement>(null);\n const overlayRef = useRef<HTMLDivElement>(null);\n const mergedRootRef = ref ? mergeRefs(rootRef, ref) : rootRef;\n\n useApplyStyle(rootRef, {\n [styles.tokens.rootRadius]: effectiveRadius,\n [styles.tokens.rootBackgroundColor]: backgroundColor\n ? effectiveBackgroundColor\n : null,\n });\n\n useApplyStyle(overlayRef, {\n [styles.tokens.overlayBackgroundImage]: showSvg\n ? overlayBackgroundImage\n : null,\n });\n\n return (\n <div\n ref={mergedRootRef}\n className={clsx(styles.root, className)}\n {...otherProps}\n >\n {showSvg && (\n <div\n aria-hidden=\"true\"\n className={styles.overlay}\n ref={overlayRef}\n />\n )}\n {children}\n </div>\n );\n};\n\nexport const DashedBorder = forwardRef(Component);\n"],"names":["DashedBorder","forwardRef","props","ref","enabled","thickness","BorderThickness","radius","Radius","colour","Colour","backgroundColor","className","children","otherProps","__rest","effectiveThickness","useResolvedTokenValue","value","fallback","isToken","isThicknessToken","normalizeCustom","toCssValue","effectiveRadius","isRadiusToken","effectiveColour","isColourToken","String","effectiveBackgroundColor","showSvg","overlayBackgroundImage","createSvgBackgroundImage","rootRef","useRef","overlayRef","mergedRootRef","mergeRefs","useApplyStyle","styles.tokens","rootRadius","rootBackgroundColor","_jsxs","Object","assign","clsx","styles.root","_jsx","styles.overlay"],"mappings":"+qCAeA,MAqFaA,EAAeC,GArFV,CACdC,EACAC,KAEA,MAAMC,QACFA,GAAU,EAAIC,UACdA,EAAYC,EAAgB,aAAYC,OACxCA,EAASC,EAAa,KAACC,OACvBA,EAASC,EAAe,OAACC,gBACzBA,EAAeC,UACfA,EAASC,SACTA,GAEAX,EADGY,EAAUC,EACbb,EATE,CAAA,UAAA,YAAA,SAAA,SAAA,kBAAA,YAAA,aAWAc,EAAqBC,EAAsB,CAC7CC,MAAOb,EACPc,SAAUb,EAAgB,aAC1Bc,QAASC,EACTC,gBAAiBC,IAGfC,EAAkBP,EAAsB,CAC1CC,MAAOX,EACPY,SAAUX,EAAa,KACvBY,QAASK,EACTH,gBAAiBC,IAGfG,EAAkBT,EAAsB,CAC1CC,MAAOT,EACPU,SAAUT,EAAe,OACzBU,QAASO,EACTL,gBAAiBM,SAGfC,EAA2BZ,EAAsB,CACnDC,MAAOP,EACPQ,SAAU,OACVC,QAASO,EACTL,gBAAiBM,SAGfE,EAAU1B,KAAaO,EACvBoB,EAAyBC,EAAyB,CACpDzB,OAAQiB,EACRf,OAAQiB,EACRrB,UAAWW,EACXZ,YAEE6B,EAAUC,EAAuB,MACjCC,EAAaD,EAAuB,MACpCE,EAAgBjC,EAAMkC,EAAUJ,EAAS9B,GAAO8B,EAetD,OAbAK,EAAcL,EAAS,CACnB,CAACM,EAAcC,YAAahB,EAC5B,CAACe,EAAcE,qBAAsB9B,EAC/BkB,EACA,OAGVS,EAAcH,EAAY,CACtB,CAACI,EAAcR,wBAAyBD,EAClCC,EACA,OAINW,EAAA,MAAAC,OAAAC,OAAA,CACIzC,IAAKiC,EACLxB,UAAWiC,EAAKC,EAAalC,IACzBE,EAAU,CAAAD,SAAA,CAEbiB,GACGiB,uBACgB,OACZnC,UAAWoC,EACX7C,IAAKgC,IAGZtB,KACC"}
|
package/data-table/data-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e}from"../_virtual/_tslib.js";import{jsxs as t,jsx as r,Fragment as i}from"react/jsx-runtime";import{ArrowUpIcon as n,ArrowDownIcon as l}from"@lifesg/react-icons";import o from"clsx";import{useRef as a,useState as s,useCallback as
|
|
1
|
+
import{__rest as e}from"../_virtual/_tslib.js";import{jsxs as t,jsx as r,Fragment as i}from"react/jsx-runtime";import{ArrowUpIcon as n,ArrowDownIcon as l}from"@lifesg/react-icons";import o from"clsx";import{useRef as a,useState as s,useCallback as c,useEffect as d}from"react";import{useInView as m}from"../external/react-intersection-observer/index.js";import{useResizeDetector as u}from"../external/react-resize-detector/build/index.esm.js";import"../animations/loading-dots/loading-dots.js";import{LoadingDotsSpinner as p}from"../animations/loading-dots-spinner/loading-dots-spinner.js";import"../animations/loading-spinner/loading-spinner.js";import"../theme/theme-provider/context.js";import{Checkbox as h}from"../checkbox/checkbox.js";import{ErrorDisplay as g}from"../error-display/error-display.js";import{VisuallyHidden as f,concatIds as y}from"../shared/accessibility/index.js";import{BasicButton as b}from"../shared/input-wrapper/input-wrapper.js";import"../theme/theme-provider/index.js";import"../theme/tokens/border.js";import"../theme/tokens/colour.js";import"../theme/tokens/font.js";import"../theme/tokens/media-query.js";import{useApplyStyle as w}from"../theme/utils/use-apply-styles.js";import"../theme/utils/use-media-query.js";import{Typography as v}from"../typography/index.js";import"../util/calendar-helper.js";import"../external/dayjs/dayjs.min.js";import{useId as j}from"../util/simple-id-generator.js";import"../util/string-helper.js";import"@react-aria/live-announcer";import{useEventListener as N}from"../util/use-event-listener.js";import{tokens as S,tableContainer as $,table as k,tableWrapper as C,stickyHeader as x,headerRow as H,bodyRow as B,emptyStateCell as R,bodyRowWithBottomBorder as A,bodyRowAlternating as I,bodyRowSelectable as M,bodyRowSelected as V,loadingStateWrapper as W,actionBarButton as K,actionBar as L,actionBarFloating as q,actionBarWrapper as Y,actionBarWrapperFloating as z,selectionCheckboxWrapper as D,headerCell as E,headerCellCheckbox as _,headerCellContent as F,headerCellClickable as O,emptyStateTitle as P,bodyCell as T,bodyCellCheckbox as G,bodyCellText as J}from"./data-table.styles.js";const Q=Q=>{var{id:U,headers:X,rows:Z,className:ee,sortIndicators:te,alternatingRows:re,loadState:ie="success",enableMultiSelect:ne,selectedIds:le,disabledIds:oe,enableActionBar:ae,enableSelectAll:se,enableStickyHeader:ce,emptyView:de,actionBarContent:me,renderCustomEmptyView:ue,onHeaderClick:pe,onSelect:he,onSelectAll:ge,onClearSelectionClick:fe}=Q,ye=e(Q,["id","headers","rows","className","sortIndicators","alternatingRows","loadState","enableMultiSelect","selectedIds","disabledIds","enableActionBar","enableSelectAll","enableStickyHeader","emptyView","actionBarContent","renderCustomEmptyView","onHeaderClick","onSelect","onSelectAll","onClearSelectionClick"]);const be=a(null),we=a(null),ve=a(null),je=a(null),Ne=a(null),Se=j(),$e=X.filter((e=>"string"!=typeof e&&!!e.keyColumn)),[ke,Ce]=s(!1),[xe,He]=s(!1),[Be,Re]=s(!1),[Ae,Ie]=s(!1),{ref:Me,inView:Ve}=m();w(je,{[S.actionBarWrapperLeft]:Be&&be.current?`${be.current.getBoundingClientRect().left}px`:void 0,[S.actionBarWrapperWidth]:Be&&be.current?`${be.current.clientWidth}px`:void 0});const We=c((()=>{if(!Ne.current||!je.current)return;const e=Ne.current.scrollHeight>Ne.current.clientHeight;Ce(e),e?je.current.style.transform="translateY(0)":Ge()}),[]);d((()=>{We()}),[]),u({onResize:We});N("scroll",(()=>{requestAnimationFrame((()=>{ke?Te():Ge()}))}),"window"),d((()=>{Je()}),[Z]);const Ke=()=>!!(Z&&Z.length&&le)&&le.length===Z.length,Le=e=>!!(null==le?void 0:le.includes(e)),qe=e=>!!re&&e%2==1,Ye=e=>!!(null==oe?void 0:oe.includes(e)),ze=e=>{if(ye["data-testid"])return`${ye["data-testid"]}-${e}`},De=()=>X.length+(ne?1:0),Ee=e=>null==te?void 0:te[e],_e=e=>{const t=Ee(e);if(t)return"asc"===t?"ascending":"descending"},Fe=e=>` by ${"asc"===Ee(e)?"descending":"ascending"} order`,Oe=(e,t)=>`${Se}-row-${e}-${t}-key-column`,Pe=e=>{const t=$e.map((t=>Oe(e,t.fieldKey)));return y(...t)},Te=()=>{if(!Ne.current)return;const e=Ne.current.getBoundingClientRect();Re(e.bottom>window.innerHeight+30&&e.top<window.innerHeight-200)},Ge=()=>{if(!(be.current&&we.current&&Ne.current&&je.current&&ve.current))return;const e=we.current.getBoundingClientRect();if(e.top>window.innerHeight){const t=e.bottom-window.innerHeight,r=be.current.getBoundingClientRect().height-ve.current.clientHeight-32,i=Math.min(t,r);je.current.style.transform=`translateY(-${i}px)`}else je.current.style.transform="translateY(0)"},Je=()=>{be.current&&Ne.current&&Ie(be.current.clientHeight+(ae?56:0)<Ne.current.clientHeight)},Qe=e=>{const{fieldKey:i,label:n,clickable:l=!1,style:a}="string"==typeof e?{fieldKey:e,label:e,style:void 0}:e,s=!!Ee(i),c=(e=>`${Se}-header-${e}`)(i);return t("th",{"data-testid":ze(`header-${i}`),className:o(E,l&&O),scope:"col","aria-sort":_e(i),style:a,onClick:()=>(e=>{null==pe||pe(e)})(i),children:[t("div",{className:F,id:c,children:["string"==typeof n?r(v.BodyBL,{weight:"bold",children:n}):n,Ue(i)]}),(l||s)&&r(f,{children:t("button",{onClick:e=>((e,t)=>{e.stopPropagation(),null==pe||pe(t)})(e,i),children:[s&&"Sort ",r("span",{"aria-labelledby":c}),s&&Fe(i)]})})]},i)},Ue=e=>{const t=null==te?void 0:te[e];return t?"asc"===t?r(n,{"aria-hidden":!0,"data-testid":ze(`header-${e}-arrowup`)}):r(l,{"aria-hidden":!0,"data-testid":ze(`header-${e}-arrowdown`)}):r(i,{})},Xe=()=>r("th",{"data-testid":ze("header-selection"),className:o(E,_),scope:"col",children:t("div",{className:D,children:[r(f,{children:"Row selection"}),se&&r(h,{checked:Ke(),indeterminate:!!le&&0!==le.length&&!Ke(),disabled:!Z||!Z.length||!le,"aria-label":"Select all rows",onClick:()=>{ge&&ge(Ke())}})]})}),Ze=(e,t)=>{const i="string"==typeof e?void 0:e.style,n="string"==typeof e?e:e.fieldKey,l=t.id.toString(),o=t[n],a=`${l}-${n}`;let s;return s="string"==typeof o||"number"==typeof o?r(v.BodyBL,{className:J,children:o}):"function"==typeof o?o(t,{isSelected:Le(l)}):o,r("td",{"data-testid":ze(`row-${a}`),id:Oe(l,n),className:T,style:i,children:s},a)},et=e=>{const t=e.id.toString();return r("td",{"data-testid":ze(`row-${t}-selection`),className:o(T,G),children:r("div",{className:D,children:r(h,{checked:Le(t),"aria-labelledby":Pe(t),onClick:()=>{he&&he(t,!Le(t))},disabled:Ye(t),focusableWhenDisabled:Ye(t)})})})},tt=()=>{let e;return e=(null==de?void 0:de.title)?"string"==typeof de.title?r(v.HeadingSM,{className:P,weight:"bold",children:de.title}):de.title:r(v.HeadingSM,{className:P,weight:"bold",children:"No <items> found"}),r(g,Object.assign({type:"no-item-found"},de,{title:e,description:(null==de?void 0:de.description)?de.description:"No matching rows"}))};return t("div",{id:U||"table-wrapper","data-testid":ye["data-testid"]||"table",className:o(C,ee),ref:Ne,onScroll:()=>{ke&&Ne.current&&He(Ne.current.scrollTop+Ne.current.clientHeight>=Ne.current.scrollHeight)},tabIndex:0,children:[r("div",{className:$,children:t("table",{ref:be,className:o(k),children:[r("thead",{ref:ve,className:ce?x:void 0,children:t("tr",{className:H,children:[ne&&Xe(),X.map(Qe)]})}),r("tbody",{children:"success"===ie?!Z||Z.length<1?r("tr",{className:B,children:r("td",{className:R,colSpan:De(),children:ue?ue():tt()})}):r(i,{children:null==Z?void 0:Z.map(((e,r)=>t("tr",{"data-testid":ze(`row-${e.id.toString()}`),className:o(B,Ae&&A,qe(r)&&I,ne&&M,Le(e.id.toString())&&V),children:[ne&&et(e),X.map((t=>Ze(t,e)))]},e.id.toString())))}):r("tr",{className:B,children:r("td",{colSpan:De(),children:r("div",{className:W,role:"status","aria-live":"polite","aria-label":"Loading table",children:"loading"===ie&&r(p,{})})})})})]})}),ae&&le&&le.length>0&&(()=>{var e;const i=null!==(e=null==le?void 0:le.length)&&void 0!==e?e:0,n=ke&&!xe||!ke&&!Ve||Be;return r("div",{ref:je,className:o(Y,Be&&z),children:t("div",{className:o(L,n&&q),children:[r(v.BodyMD,{weight:"semibold",children:`${i} item${i>1?"s":""} selected`}),r(b,{className:K,type:"button","aria-label":`Clear selection of ${i} item${1===i?"":"s"}`,onClick:fe,children:"Clear selection"}),me]})})})(),r("div",{ref:e=>{we.current=e,Me(e)}})]})};export{Q as DataTable};
|
|
2
2
|
//# sourceMappingURL=data-table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-table.js","sources":["../../src/data-table/data-table.tsx"],"sourcesContent":["import { ArrowDownIcon, ArrowUpIcon } from \"@lifesg/react-icons\";\nimport clsx from \"clsx\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useInView } from \"react-intersection-observer\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { LoadingDotsSpinner } from \"../animations\";\nimport { Checkbox } from \"../checkbox\";\nimport { ErrorDisplay } from \"../error-display\";\nimport { concatIds, VisuallyHidden } from \"../shared/accessibility\";\nimport { BasicButton } from \"../shared/input-wrapper\";\nimport { useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useId } from \"../util\";\nimport { useEventListener } from \"../util/use-event-listener\";\nimport * as styles from \"./data-table.styles\";\nimport type { DataTableProps, HeaderProps, RowProps } from \"./types\";\n\nexport const DataTable = ({\n id,\n headers,\n rows,\n className,\n sortIndicators,\n alternatingRows,\n loadState = \"success\",\n enableMultiSelect,\n selectedIds,\n disabledIds,\n enableActionBar,\n enableSelectAll,\n enableStickyHeader,\n emptyView,\n actionBarContent,\n renderCustomEmptyView,\n onHeaderClick,\n onSelect,\n onSelectAll,\n onClearSelectionClick,\n ...otherProps\n}: DataTableProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const tableRef = useRef<HTMLTableElement>(null);\n const tableEndRef = useRef<HTMLDivElement | null>(null);\n const headerRef = useRef<HTMLTableSectionElement>(null);\n const actionBarRef = useRef<HTMLDivElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const internalId = useId();\n const keyColumns = headers.filter(\n (header): header is Exclude<HeaderProps, string> => {\n return typeof header !== \"string\" && !!header.keyColumn;\n }\n );\n\n const [scrollable, setScrollable] = useState(false);\n const [scrollEnd, setScrollEnd] = useState(false);\n const [isFloatingActionBar, setIsFloatingActionBar] = useState(false);\n const [showLastBorder, setShowLastBorder] = useState(false);\n\n const { ref: endRef, inView: end } = useInView();\n\n useApplyStyle(actionBarRef, {\n [styles.tokens.actionBarWrapperLeft]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.getBoundingClientRect().left}px`\n : undefined,\n [styles.tokens.actionBarWrapperWidth]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.clientWidth}px`\n : undefined,\n });\n\n // =============================================================================\n // EFFECTS, EVENT LISTENERS\n // ============================================================================\n const onResize = useCallback(() => {\n if (!wrapperRef.current || !actionBarRef.current) {\n return;\n }\n const scrollable =\n wrapperRef.current.scrollHeight > wrapperRef.current.clientHeight;\n setScrollable(scrollable);\n\n if (scrollable) {\n actionBarRef.current.style.transform = `translateY(0)`;\n } else {\n calculateStickyInViewport();\n }\n }, []);\n\n useEffect(() => {\n onResize();\n }, []);\n\n useResizeDetector({ onResize });\n\n const scrollHandler = () => {\n requestAnimationFrame(() => {\n if (scrollable) {\n calculateFixedInViewport();\n } else {\n calculateStickyInViewport();\n }\n });\n };\n\n useEventListener(\"scroll\", scrollHandler, \"window\");\n\n useEffect(() => {\n checkLastBorder();\n }, [rows]);\n\n // ===========================================================================\n // HELPER FUNCTIONS\n // ===========================================================================\n const isAllCheckboxSelected = (): boolean => {\n return selectedIds?.length === rows?.length;\n };\n\n const isIndeterminateCheckbox = (): boolean => {\n return (\n !!selectedIds &&\n selectedIds.length !== 0 &&\n !isAllCheckboxSelected()\n );\n };\n\n const isRowSelected = (rowId: string): boolean => {\n return !!selectedIds?.includes(rowId);\n };\n\n const isAlternatingRow = (index: number): boolean => {\n return !!alternatingRows && index % 2 === 1;\n };\n\n const isDisabledRow = (rowId: string): boolean => {\n return !!disabledIds?.includes(rowId);\n };\n\n const getDataTestId = (subStr: string) => {\n if (!otherProps[\"data-testid\"]) return undefined;\n return `${otherProps[\"data-testid\"]}-${subStr}`;\n };\n\n const getTotalColumns = (): number => {\n return headers.length + (enableMultiSelect ? 1 : 0);\n };\n\n const getSortDirection = (fieldKey: string) => {\n return sortIndicators?.[fieldKey];\n };\n\n const getHeaderAriaSort = (fieldKey: string) => {\n const sortDirection = getSortDirection(fieldKey);\n\n if (!sortDirection) {\n return undefined;\n }\n\n return sortDirection === \"asc\" ? \"ascending\" : \"descending\";\n };\n\n const getSortButtonAriaLabel = (fieldKey: string) => {\n const nextSortDirection =\n getSortDirection(fieldKey) === \"asc\" ? \"descending\" : \"ascending\";\n\n return ` by ${nextSortDirection} order`;\n };\n\n const getHeaderCellId = (fieldKey: string) => {\n return `${internalId}-header-${fieldKey}`;\n };\n const getCellId = (rowId: string, fieldKey: string) => {\n return `${internalId}-row-${rowId}-${fieldKey}-key-column`;\n };\n\n const getRowCheckboxAriaLabelledBy = (rowId: string) => {\n const keyColumnIds = keyColumns.map((header) =>\n getCellId(rowId, header.fieldKey)\n );\n\n return concatIds(...keyColumnIds);\n };\n\n const calculateFixedInViewport = () => {\n if (!wrapperRef.current) {\n return;\n }\n const wrapperBounds = wrapperRef.current.getBoundingClientRect();\n setIsFloatingActionBar(\n wrapperBounds.bottom > window.innerHeight + 30 &&\n wrapperBounds.top < window.innerHeight - 200\n );\n };\n\n const calculateStickyInViewport = () => {\n if (\n !tableRef.current ||\n !tableEndRef.current ||\n !wrapperRef.current ||\n !actionBarRef.current ||\n !headerRef.current\n ) {\n return;\n }\n\n const endBounds = tableEndRef.current.getBoundingClientRect();\n\n if (endBounds.top > window.innerHeight) {\n const bottomOffset = endBounds.bottom - window.innerHeight;\n const bottomToHeaderOffset =\n tableRef.current.getBoundingClientRect().height -\n headerRef.current.clientHeight -\n 32;\n const maxBottomOffset = Math.min(\n bottomOffset,\n bottomToHeaderOffset\n );\n\n actionBarRef.current.style.transform = `translateY(-${maxBottomOffset}px)`;\n } else {\n actionBarRef.current.style.transform = `translateY(0)`;\n }\n };\n\n const checkLastBorder = () => {\n if (!tableRef.current || !wrapperRef.current) {\n return;\n }\n // 56 pixels added due to the behavior of action bar\n setShowLastBorder(\n tableRef.current.clientHeight + (enableActionBar ? 56 : 0) <\n wrapperRef.current.clientHeight\n );\n };\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleHeaderClick = (fieldKey: string) => {\n onHeaderClick?.(fieldKey);\n };\n\n const handleHeaderButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>,\n fieldKey: string\n ) => {\n event.stopPropagation();\n onHeaderClick?.(fieldKey);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderHeaders = () => (\n <thead\n ref={headerRef}\n className={enableStickyHeader ? styles.stickyHeader : undefined}\n >\n <tr className={styles.headerRow}>\n {enableMultiSelect && renderHeaderCheckBox()}\n {headers.map(renderHeaderCell)}\n </tr>\n </thead>\n );\n\n const renderHeaderCell = (header: HeaderProps) => {\n const {\n fieldKey,\n label,\n clickable = false,\n style,\n } = typeof header === \"string\"\n ? {\n fieldKey: header,\n label: header,\n style: undefined,\n }\n : header;\n\n const isSortable = !!getSortDirection(fieldKey);\n const headerCellId = getHeaderCellId(fieldKey);\n return (\n <th\n data-testid={getDataTestId(`header-${fieldKey}`)}\n key={fieldKey}\n className={clsx(\n styles.headerCell,\n clickable && styles.headerCellClickable\n )}\n scope=\"col\"\n aria-sort={getHeaderAriaSort(fieldKey)}\n style={style}\n onClick={() => handleHeaderClick(fieldKey)}\n >\n <div className={styles.headerCellContent} id={headerCellId}>\n {typeof label === \"string\" ? (\n <Typography.BodyBL weight=\"bold\">\n {label}\n </Typography.BodyBL>\n ) : (\n label\n )}\n {renderSortedArrow(fieldKey)}\n </div>\n {(clickable || isSortable) && (\n <VisuallyHidden>\n <button\n onClick={(event) =>\n handleHeaderButtonClick(event, fieldKey)\n }\n >\n {isSortable && \"Sort \"}\n <span aria-labelledby={headerCellId} />\n {isSortable && getSortButtonAriaLabel(fieldKey)}\n </button>\n </VisuallyHidden>\n )}\n </th>\n );\n };\n\n const renderSortedArrow = (fieldKey: string) => {\n const isSorted = sortIndicators?.[fieldKey];\n\n if (!isSorted) {\n return <></>;\n }\n if (isSorted === \"asc\") {\n return (\n <ArrowUpIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowup`)}\n />\n );\n }\n return (\n <ArrowDownIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowdown`)}\n />\n );\n };\n\n const renderHeaderCheckBox = () => {\n return (\n <th\n data-testid={getDataTestId(\"header-selection\")}\n className={clsx(styles.headerCell, styles.headerCellCheckbox)}\n scope=\"col\"\n >\n <div className={styles.selectionCheckboxWrapper}>\n <VisuallyHidden>Row selection</VisuallyHidden>\n {enableSelectAll && (\n <Checkbox\n checked={isAllCheckboxSelected()}\n indeterminate={isIndeterminateCheckbox()}\n aria-label=\"Select all rows\"\n onClick={() => {\n if (onSelectAll) {\n onSelectAll(isAllCheckboxSelected());\n }\n }}\n />\n )}\n </div>\n </th>\n );\n };\n\n const renderRows = () => {\n return !rows || rows.length < 1 ? (\n <tr>\n <td\n className={styles.emptyStateCell}\n colSpan={getTotalColumns()}\n >\n {renderCustomEmptyView\n ? renderCustomEmptyView()\n : renderBasicEmptyView()}\n </td>\n </tr>\n ) : (\n <>\n {rows?.map((row: RowProps, index: number) => (\n <tr\n data-testid={getDataTestId(`row-${row.id.toString()}`)}\n key={row.id.toString()}\n className={clsx(\n styles.bodyRow,\n showLastBorder && styles.bodyRowWithBottomBorder,\n isAlternatingRow(index) &&\n styles.bodyRowAlternating,\n enableMultiSelect && styles.bodyRowSelectable,\n isRowSelected(row.id.toString()) &&\n styles.bodyRowSelected\n )}\n >\n {enableMultiSelect && renderRowCheckBox(row)}\n\n {headers.map((header) => renderRowCell(header, row))}\n </tr>\n ))}\n </>\n );\n };\n\n const renderRowCell = (header: HeaderProps, row: RowProps) => {\n const style = typeof header === \"string\" ? undefined : header.style;\n const fieldKey = typeof header === \"string\" ? header : header.fieldKey;\n const rowId = row.id.toString();\n const cellData = row[fieldKey];\n const cellId = `${rowId}-${fieldKey}`;\n\n let cellContent: React.ReactNode;\n if (typeof cellData === \"string\" || typeof cellData === \"number\") {\n cellContent = (\n <Typography.BodyBL className={styles.bodyCellText}>\n {cellData}\n </Typography.BodyBL>\n );\n } else if (typeof cellData === \"function\") {\n cellContent = cellData(row, { isSelected: isRowSelected(rowId) });\n } else {\n cellContent = cellData;\n }\n\n return (\n <td\n data-testid={getDataTestId(`row-${cellId}`)}\n key={cellId}\n id={getCellId(rowId, fieldKey)}\n className={styles.bodyCell}\n style={style}\n >\n {cellContent}\n </td>\n );\n };\n\n const renderRowCheckBox = (row: RowProps) => {\n const rowId = row.id.toString();\n\n return (\n <td\n data-testid={getDataTestId(`row-${rowId}-selection`)}\n className={clsx(styles.bodyCell, styles.bodyCellCheckbox)}\n >\n <div className={styles.selectionCheckboxWrapper}>\n <Checkbox\n checked={isRowSelected(rowId)}\n aria-labelledby={getRowCheckboxAriaLabelledBy(rowId)}\n onClick={() => {\n if (onSelect) {\n onSelect(rowId, !isRowSelected(rowId));\n }\n }}\n disabled={isDisabledRow(rowId)}\n focusableWhenDisabled={isDisabledRow(rowId)}\n />\n </div>\n </td>\n );\n };\n\n const renderBasicEmptyView = () => {\n let emptyTitle: JSX.Element;\n if (!emptyView?.title) {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {\"No <items> found\"}\n </Typography.HeadingSM>\n );\n } else if (typeof emptyView.title === \"string\") {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {emptyView.title}\n </Typography.HeadingSM>\n );\n } else {\n emptyTitle = emptyView.title;\n }\n\n return (\n <ErrorDisplay\n type={\"no-item-found\"}\n {...emptyView}\n title={emptyTitle}\n description={\n emptyView?.description\n ? emptyView.description\n : \"No matching rows\"\n }\n />\n );\n };\n\n const renderLoader = () => {\n return (\n <tr>\n <td colSpan={getTotalColumns()}>\n <div\n className={styles.loadingStateWrapper}\n role=\"status\"\n aria-live=\"polite\"\n aria-label=\"Loading table\"\n >\n {loadState === \"loading\" && <LoadingDotsSpinner />}\n </div>\n </td>\n </tr>\n );\n };\n\n const renderSelectionBar = () => {\n const count = selectedIds?.length ?? 0;\n const hasNotReachedScrollableEnd = scrollable && !scrollEnd;\n const hasNotReachedTableEnd = !scrollable && !end;\n const shouldUseFloatingActionBar =\n hasNotReachedScrollableEnd ||\n hasNotReachedTableEnd ||\n isFloatingActionBar;\n\n return (\n <div\n ref={actionBarRef}\n className={clsx(\n styles.actionBarWrapper,\n isFloatingActionBar && styles.actionBarWrapperFloating\n )}\n >\n <div\n className={clsx(\n styles.actionBar,\n shouldUseFloatingActionBar && styles.actionBarFloating\n )}\n >\n <Typography.BodyMD weight=\"semibold\">{`${count} item${\n count > 1 ? \"s\" : \"\"\n } selected`}</Typography.BodyMD>\n <BasicButton\n className={styles.actionBarButton}\n type=\"button\"\n aria-label={`Clear selection of ${count} item${\n count === 1 ? \"\" : \"s\"\n }`}\n onClick={onClearSelectionClick}\n >\n Clear selection\n </BasicButton>\n {actionBarContent}\n </div>\n </div>\n );\n };\n\n return (\n <div\n id={id || \"table-wrapper\"}\n data-testid={otherProps[\"data-testid\"] || \"table\"}\n className={clsx(styles.tableWrapper, className)}\n ref={wrapperRef}\n onScroll={() => {\n if (scrollable && wrapperRef.current) {\n setScrollEnd(\n wrapperRef.current.scrollTop +\n wrapperRef.current.clientHeight >=\n wrapperRef.current.scrollHeight\n );\n }\n }}\n tabIndex={0} // scrollable container must be focusable to support keyboard users\n >\n <div className={styles.tableContainer}>\n <table ref={tableRef} className={clsx(styles.table)}>\n {renderHeaders()}\n <tbody>\n {loadState === \"success\"\n ? renderRows()\n : renderLoader()}\n </tbody>\n </table>\n </div>\n {enableActionBar &&\n selectedIds &&\n selectedIds.length > 0 &&\n renderSelectionBar()}\n <div\n ref={(r) => {\n tableEndRef.current = r;\n endRef(r);\n }}\n />\n </div>\n );\n};\n"],"names":["DataTable","_a","id","headers","rows","className","sortIndicators","alternatingRows","loadState","enableMultiSelect","selectedIds","disabledIds","enableActionBar","enableSelectAll","enableStickyHeader","emptyView","actionBarContent","renderCustomEmptyView","onHeaderClick","onSelect","onSelectAll","onClearSelectionClick","otherProps","__rest","tableRef","useRef","tableEndRef","headerRef","actionBarRef","wrapperRef","internalId","useId","keyColumns","filter","header","keyColumn","scrollable","setScrollable","useState","scrollEnd","setScrollEnd","isFloatingActionBar","setIsFloatingActionBar","showLastBorder","setShowLastBorder","ref","endRef","inView","end","useInView","useApplyStyle","styles.tokens","actionBarWrapperLeft","current","getBoundingClientRect","left","undefined","actionBarWrapperWidth","clientWidth","onResize","useCallback","scrollHeight","clientHeight","style","transform","calculateStickyInViewport","useEffect","useResizeDetector","useEventListener","requestAnimationFrame","calculateFixedInViewport","checkLastBorder","isAllCheckboxSelected","length","isRowSelected","rowId","includes","isAlternatingRow","index","isDisabledRow","getDataTestId","subStr","getTotalColumns","getSortDirection","fieldKey","getHeaderAriaSort","sortDirection","getSortButtonAriaLabel","getCellId","getRowCheckboxAriaLabelledBy","keyColumnIds","map","concatIds","wrapperBounds","bottom","window","innerHeight","top","endBounds","bottomOffset","bottomToHeaderOffset","height","maxBottomOffset","Math","min","renderHeaderCell","label","clickable","isSortable","headerCellId","getHeaderCellId","_jsxs","clsx","styles.headerCell","styles.headerCellClickable","scope","onClick","handleHeaderClick","children","styles.headerCellContent","_jsx","Typography","BodyBL","weight","renderSortedArrow","VisuallyHidden","event","stopPropagation","handleHeaderButtonClick","isSorted","ArrowUpIcon","ArrowDownIcon","renderHeaderCheckBox","styles.headerCellCheckbox","styles.selectionCheckboxWrapper","Checkbox","checked","indeterminate","renderRowCell","row","toString","cellData","cellId","cellContent","styles.bodyCellText","isSelected","styles.bodyCell","renderRowCheckBox","styles.bodyCellCheckbox","disabled","focusableWhenDisabled","renderBasicEmptyView","emptyTitle","title","HeadingSM","styles.emptyStateTitle","ErrorDisplay","Object","assign","type","description","styles.tableWrapper","onScroll","scrollTop","tabIndex","styles.tableContainer","styles.table","styles.stickyHeader","styles.headerRow","styles.emptyStateCell","colSpan","_Fragment","styles.bodyRow","styles.bodyRowWithBottomBorder","styles.bodyRowAlternating","styles.bodyRowSelectable","styles.bodyRowSelected","styles.loadingStateWrapper","role","LoadingDotsSpinner","count","shouldUseFloatingActionBar","styles.actionBarWrapper","styles.actionBarWrapperFloating","styles.actionBar","styles.actionBarFloating","BodyMD","BasicButton","styles.actionBarButton","renderSelectionBar","r"],"mappings":"smEAkBO,MAAMA,EAAaC,QAAAC,GACtBA,EAAEC,QACFA,EAAOC,KACPA,EAAIC,UACJA,GAASC,eACTA,GAAcC,gBACdA,GAAeC,UACfA,GAAY,UAASC,kBACrBA,GAAiBC,YACjBA,GAAWC,YACXA,GAAWC,gBACXA,GAAeC,gBACfA,GAAeC,mBACfA,GAAkBC,UAClBA,GAASC,iBACTA,GAAgBC,sBAChBA,GAAqBC,cACrBA,GAAaC,SACbA,GAAQC,YACRA,GAAWC,sBACXA,MACGC,GAAUC,EAAAtB,EArBS,CAAA,KAAA,UAAA,OAAA,YAAA,iBAAA,kBAAA,YAAA,oBAAA,cAAA,cAAA,kBAAA,kBAAA,qBAAA,YAAA,mBAAA,wBAAA,gBAA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ACJrK,IAAqBsK,EACrBrG,GAAciE,EAAIzI,GAAG0I,aACjBoC,GACP1D,SAAA,CAEA7G,IAAqB0I,GAAkBR,GAEvCxI,EAAQwF,KAAKzD,GAAWwG,GAAcxG,EAAQyG,OAb1CA,EAAIzI,GAAG0I,gBAsHxBpB,EAAA,KAAA,CAAAF,SACIE,EAAA,KAAA,CAAIkD,QAASxF,KAAiBoC,SAC1BE,EAAA,MAAA,CACInH,UAAW4K,EACXC,KAAK,SAAQ,YACH,SAAQ,aACP,gBAAe5D,SAEX,YAAd9G,IAA2BgH,EAAC2D,EAAkB,CAAA,gBA4E1DvK,IACGF,IACAA,GAAY+D,OAAS,GAvEN,YACvB,MAAM2G,EAA2B,QAAnBnL,EAAAS,cAAW,EAAXA,GAAa+D,cAAM,IAAAxE,EAAAA,EAAI,EAG/BoL,EAF6BjJ,KAAeG,KACnBH,KAAeY,IAI1CP,GAEJ,OACI+E,SACI3E,IAAKjB,GACLvB,UAAW2G,EACPsE,EACA7I,IAAuB8I,GAC1BjE,SAEDP,EAAA,MAAA,CACI1G,UAAW2G,EACPwE,EACAH,GAA8BI,GACjCnE,SAAA,CAEDE,EAACC,EAAWiE,OAAM,CAAC/D,OAAO,WAAUL,SAAE,GAAG8D,SACrCA,EAAQ,EAAI,IAAM,gBAEtB5D,EAACmE,EAAW,CACRtL,UAAWuL,EACX7B,KAAK,SAAQ,aACD,sBAAsBqB,SACpB,IAAVA,EAAc,GAAK,MAEvBhE,QAAS/F,GAAqBiG,SAAA,oBAIjCtG,OAEH,EAkCF6K,GACJrE,EAAA,MAAA,CACI3E,IAAMiJ,IACFpK,GAAY2B,QAAUyI,EACtBhJ,GAAOgJ,EAAE,MAGf"}
|
|
1
|
+
{"version":3,"file":"data-table.js","sources":["../../src/data-table/data-table.tsx"],"sourcesContent":["import { ArrowDownIcon, ArrowUpIcon } from \"@lifesg/react-icons\";\nimport clsx from \"clsx\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useInView } from \"react-intersection-observer\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { LoadingDotsSpinner } from \"../animations\";\nimport { Checkbox } from \"../checkbox\";\nimport { ErrorDisplay } from \"../error-display\";\nimport { concatIds, VisuallyHidden } from \"../shared/accessibility\";\nimport { BasicButton } from \"../shared/input-wrapper\";\nimport { useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useId } from \"../util\";\nimport { useEventListener } from \"../util/use-event-listener\";\nimport * as styles from \"./data-table.styles\";\nimport type { DataTableProps, HeaderProps, RowProps } from \"./types\";\n\nexport const DataTable = ({\n id,\n headers,\n rows,\n className,\n sortIndicators,\n alternatingRows,\n loadState = \"success\",\n enableMultiSelect,\n selectedIds,\n disabledIds,\n enableActionBar,\n enableSelectAll,\n enableStickyHeader,\n emptyView,\n actionBarContent,\n renderCustomEmptyView,\n onHeaderClick,\n onSelect,\n onSelectAll,\n onClearSelectionClick,\n ...otherProps\n}: DataTableProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const tableRef = useRef<HTMLTableElement>(null);\n const tableEndRef = useRef<HTMLDivElement | null>(null);\n const headerRef = useRef<HTMLTableSectionElement>(null);\n const actionBarRef = useRef<HTMLDivElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const internalId = useId();\n const keyColumns = headers.filter(\n (header): header is Exclude<HeaderProps, string> => {\n return typeof header !== \"string\" && !!header.keyColumn;\n }\n );\n\n const [scrollable, setScrollable] = useState(false);\n const [scrollEnd, setScrollEnd] = useState(false);\n const [isFloatingActionBar, setIsFloatingActionBar] = useState(false);\n const [showLastBorder, setShowLastBorder] = useState(false);\n\n const { ref: endRef, inView: end } = useInView();\n\n useApplyStyle(actionBarRef, {\n [styles.tokens.actionBarWrapperLeft]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.getBoundingClientRect().left}px`\n : undefined,\n [styles.tokens.actionBarWrapperWidth]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.clientWidth}px`\n : undefined,\n });\n\n // =============================================================================\n // EFFECTS, EVENT LISTENERS\n // ============================================================================\n const onResize = useCallback(() => {\n if (!wrapperRef.current || !actionBarRef.current) {\n return;\n }\n const scrollable =\n wrapperRef.current.scrollHeight > wrapperRef.current.clientHeight;\n setScrollable(scrollable);\n\n if (scrollable) {\n actionBarRef.current.style.transform = `translateY(0)`;\n } else {\n calculateStickyInViewport();\n }\n }, []);\n\n useEffect(() => {\n onResize();\n }, []);\n\n useResizeDetector({ onResize });\n\n const scrollHandler = () => {\n requestAnimationFrame(() => {\n if (scrollable) {\n calculateFixedInViewport();\n } else {\n calculateStickyInViewport();\n }\n });\n };\n\n useEventListener(\"scroll\", scrollHandler, \"window\");\n\n useEffect(() => {\n checkLastBorder();\n }, [rows]);\n\n // ===========================================================================\n // HELPER FUNCTIONS\n // ===========================================================================\n const isAllCheckboxSelected = (): boolean => {\n if (!rows || !rows.length || !selectedIds) {\n return false;\n }\n return selectedIds.length === rows.length;\n };\n\n const isIndeterminateCheckbox = (): boolean => {\n return (\n !!selectedIds &&\n selectedIds.length !== 0 &&\n !isAllCheckboxSelected()\n );\n };\n\n const isHeaderCheckboxDisabled = (): boolean => {\n return !rows || !rows.length || !selectedIds;\n };\n\n const isRowSelected = (rowId: string): boolean => {\n return !!selectedIds?.includes(rowId);\n };\n\n const isAlternatingRow = (index: number): boolean => {\n return !!alternatingRows && index % 2 === 1;\n };\n\n const isDisabledRow = (rowId: string): boolean => {\n return !!disabledIds?.includes(rowId);\n };\n\n const getDataTestId = (subStr: string) => {\n if (!otherProps[\"data-testid\"]) return undefined;\n return `${otherProps[\"data-testid\"]}-${subStr}`;\n };\n\n const getTotalColumns = (): number => {\n return headers.length + (enableMultiSelect ? 1 : 0);\n };\n\n const getSortDirection = (fieldKey: string) => {\n return sortIndicators?.[fieldKey];\n };\n\n const getHeaderAriaSort = (fieldKey: string) => {\n const sortDirection = getSortDirection(fieldKey);\n\n if (!sortDirection) {\n return undefined;\n }\n\n return sortDirection === \"asc\" ? \"ascending\" : \"descending\";\n };\n\n const getSortButtonAriaLabel = (fieldKey: string) => {\n const nextSortDirection =\n getSortDirection(fieldKey) === \"asc\" ? \"descending\" : \"ascending\";\n\n return ` by ${nextSortDirection} order`;\n };\n\n const getHeaderCellId = (fieldKey: string) => {\n return `${internalId}-header-${fieldKey}`;\n };\n const getCellId = (rowId: string, fieldKey: string) => {\n return `${internalId}-row-${rowId}-${fieldKey}-key-column`;\n };\n\n const getRowCheckboxAriaLabelledBy = (rowId: string) => {\n const keyColumnIds = keyColumns.map((header) =>\n getCellId(rowId, header.fieldKey)\n );\n\n return concatIds(...keyColumnIds);\n };\n\n const calculateFixedInViewport = () => {\n if (!wrapperRef.current) {\n return;\n }\n const wrapperBounds = wrapperRef.current.getBoundingClientRect();\n setIsFloatingActionBar(\n wrapperBounds.bottom > window.innerHeight + 30 &&\n wrapperBounds.top < window.innerHeight - 200\n );\n };\n\n const calculateStickyInViewport = () => {\n if (\n !tableRef.current ||\n !tableEndRef.current ||\n !wrapperRef.current ||\n !actionBarRef.current ||\n !headerRef.current\n ) {\n return;\n }\n\n const endBounds = tableEndRef.current.getBoundingClientRect();\n\n if (endBounds.top > window.innerHeight) {\n const bottomOffset = endBounds.bottom - window.innerHeight;\n const bottomToHeaderOffset =\n tableRef.current.getBoundingClientRect().height -\n headerRef.current.clientHeight -\n 32;\n const maxBottomOffset = Math.min(\n bottomOffset,\n bottomToHeaderOffset\n );\n\n actionBarRef.current.style.transform = `translateY(-${maxBottomOffset}px)`;\n } else {\n actionBarRef.current.style.transform = `translateY(0)`;\n }\n };\n\n const checkLastBorder = () => {\n if (!tableRef.current || !wrapperRef.current) {\n return;\n }\n // 56 pixels added due to the behavior of action bar\n setShowLastBorder(\n tableRef.current.clientHeight + (enableActionBar ? 56 : 0) <\n wrapperRef.current.clientHeight\n );\n };\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleHeaderClick = (fieldKey: string) => {\n onHeaderClick?.(fieldKey);\n };\n\n const handleHeaderButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>,\n fieldKey: string\n ) => {\n event.stopPropagation();\n onHeaderClick?.(fieldKey);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderHeaders = () => (\n <thead\n ref={headerRef}\n className={enableStickyHeader ? styles.stickyHeader : undefined}\n >\n <tr className={styles.headerRow}>\n {enableMultiSelect && renderHeaderCheckBox()}\n {headers.map(renderHeaderCell)}\n </tr>\n </thead>\n );\n\n const renderHeaderCell = (header: HeaderProps) => {\n const {\n fieldKey,\n label,\n clickable = false,\n style,\n } = typeof header === \"string\"\n ? {\n fieldKey: header,\n label: header,\n style: undefined,\n }\n : header;\n\n const isSortable = !!getSortDirection(fieldKey);\n const headerCellId = getHeaderCellId(fieldKey);\n return (\n <th\n data-testid={getDataTestId(`header-${fieldKey}`)}\n key={fieldKey}\n className={clsx(\n styles.headerCell,\n clickable && styles.headerCellClickable\n )}\n scope=\"col\"\n aria-sort={getHeaderAriaSort(fieldKey)}\n style={style}\n onClick={() => handleHeaderClick(fieldKey)}\n >\n <div className={styles.headerCellContent} id={headerCellId}>\n {typeof label === \"string\" ? (\n <Typography.BodyBL weight=\"bold\">\n {label}\n </Typography.BodyBL>\n ) : (\n label\n )}\n {renderSortedArrow(fieldKey)}\n </div>\n {(clickable || isSortable) && (\n <VisuallyHidden>\n <button\n onClick={(event) =>\n handleHeaderButtonClick(event, fieldKey)\n }\n >\n {isSortable && \"Sort \"}\n <span aria-labelledby={headerCellId} />\n {isSortable && getSortButtonAriaLabel(fieldKey)}\n </button>\n </VisuallyHidden>\n )}\n </th>\n );\n };\n\n const renderSortedArrow = (fieldKey: string) => {\n const isSorted = sortIndicators?.[fieldKey];\n\n if (!isSorted) {\n return <></>;\n }\n if (isSorted === \"asc\") {\n return (\n <ArrowUpIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowup`)}\n />\n );\n }\n return (\n <ArrowDownIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowdown`)}\n />\n );\n };\n\n const renderHeaderCheckBox = () => {\n return (\n <th\n data-testid={getDataTestId(\"header-selection\")}\n className={clsx(styles.headerCell, styles.headerCellCheckbox)}\n scope=\"col\"\n >\n <div className={styles.selectionCheckboxWrapper}>\n <VisuallyHidden>Row selection</VisuallyHidden>\n {enableSelectAll && (\n <Checkbox\n checked={isAllCheckboxSelected()}\n indeterminate={isIndeterminateCheckbox()}\n disabled={isHeaderCheckboxDisabled()}\n aria-label=\"Select all rows\"\n onClick={() => {\n if (onSelectAll) {\n onSelectAll(isAllCheckboxSelected());\n }\n }}\n />\n )}\n </div>\n </th>\n );\n };\n\n const renderRows = () => {\n return !rows || rows.length < 1 ? (\n <tr className={styles.bodyRow}>\n <td\n className={styles.emptyStateCell}\n colSpan={getTotalColumns()}\n >\n {renderCustomEmptyView\n ? renderCustomEmptyView()\n : renderBasicEmptyView()}\n </td>\n </tr>\n ) : (\n <>\n {rows?.map((row: RowProps, index: number) => (\n <tr\n data-testid={getDataTestId(`row-${row.id.toString()}`)}\n key={row.id.toString()}\n className={clsx(\n styles.bodyRow,\n showLastBorder && styles.bodyRowWithBottomBorder,\n isAlternatingRow(index) &&\n styles.bodyRowAlternating,\n enableMultiSelect && styles.bodyRowSelectable,\n isRowSelected(row.id.toString()) &&\n styles.bodyRowSelected\n )}\n >\n {enableMultiSelect && renderRowCheckBox(row)}\n\n {headers.map((header) => renderRowCell(header, row))}\n </tr>\n ))}\n </>\n );\n };\n\n const renderRowCell = (header: HeaderProps, row: RowProps) => {\n const style = typeof header === \"string\" ? undefined : header.style;\n const fieldKey = typeof header === \"string\" ? header : header.fieldKey;\n const rowId = row.id.toString();\n const cellData = row[fieldKey];\n const cellId = `${rowId}-${fieldKey}`;\n\n let cellContent: React.ReactNode;\n if (typeof cellData === \"string\" || typeof cellData === \"number\") {\n cellContent = (\n <Typography.BodyBL className={styles.bodyCellText}>\n {cellData}\n </Typography.BodyBL>\n );\n } else if (typeof cellData === \"function\") {\n cellContent = cellData(row, { isSelected: isRowSelected(rowId) });\n } else {\n cellContent = cellData;\n }\n\n return (\n <td\n data-testid={getDataTestId(`row-${cellId}`)}\n key={cellId}\n id={getCellId(rowId, fieldKey)}\n className={styles.bodyCell}\n style={style}\n >\n {cellContent}\n </td>\n );\n };\n\n const renderRowCheckBox = (row: RowProps) => {\n const rowId = row.id.toString();\n\n return (\n <td\n data-testid={getDataTestId(`row-${rowId}-selection`)}\n className={clsx(styles.bodyCell, styles.bodyCellCheckbox)}\n >\n <div className={styles.selectionCheckboxWrapper}>\n <Checkbox\n checked={isRowSelected(rowId)}\n aria-labelledby={getRowCheckboxAriaLabelledBy(rowId)}\n onClick={() => {\n if (onSelect) {\n onSelect(rowId, !isRowSelected(rowId));\n }\n }}\n disabled={isDisabledRow(rowId)}\n focusableWhenDisabled={isDisabledRow(rowId)}\n />\n </div>\n </td>\n );\n };\n\n const renderBasicEmptyView = () => {\n let emptyTitle: JSX.Element;\n if (!emptyView?.title) {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {\"No <items> found\"}\n </Typography.HeadingSM>\n );\n } else if (typeof emptyView.title === \"string\") {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {emptyView.title}\n </Typography.HeadingSM>\n );\n } else {\n emptyTitle = emptyView.title;\n }\n\n return (\n <ErrorDisplay\n type={\"no-item-found\"}\n {...emptyView}\n title={emptyTitle}\n description={\n emptyView?.description\n ? emptyView.description\n : \"No matching rows\"\n }\n />\n );\n };\n\n const renderLoader = () => {\n return (\n <tr className={styles.bodyRow}>\n <td colSpan={getTotalColumns()}>\n <div\n className={styles.loadingStateWrapper}\n role=\"status\"\n aria-live=\"polite\"\n aria-label=\"Loading table\"\n >\n {loadState === \"loading\" && <LoadingDotsSpinner />}\n </div>\n </td>\n </tr>\n );\n };\n\n const renderSelectionBar = () => {\n const count = selectedIds?.length ?? 0;\n const hasNotReachedScrollableEnd = scrollable && !scrollEnd;\n const hasNotReachedTableEnd = !scrollable && !end;\n const shouldUseFloatingActionBar =\n hasNotReachedScrollableEnd ||\n hasNotReachedTableEnd ||\n isFloatingActionBar;\n\n return (\n <div\n ref={actionBarRef}\n className={clsx(\n styles.actionBarWrapper,\n isFloatingActionBar && styles.actionBarWrapperFloating\n )}\n >\n <div\n className={clsx(\n styles.actionBar,\n shouldUseFloatingActionBar && styles.actionBarFloating\n )}\n >\n <Typography.BodyMD weight=\"semibold\">{`${count} item${\n count > 1 ? \"s\" : \"\"\n } selected`}</Typography.BodyMD>\n <BasicButton\n className={styles.actionBarButton}\n type=\"button\"\n aria-label={`Clear selection of ${count} item${\n count === 1 ? \"\" : \"s\"\n }`}\n onClick={onClearSelectionClick}\n >\n Clear selection\n </BasicButton>\n {actionBarContent}\n </div>\n </div>\n );\n };\n\n return (\n <div\n id={id || \"table-wrapper\"}\n data-testid={otherProps[\"data-testid\"] || \"table\"}\n className={clsx(styles.tableWrapper, className)}\n ref={wrapperRef}\n onScroll={() => {\n if (scrollable && wrapperRef.current) {\n setScrollEnd(\n wrapperRef.current.scrollTop +\n wrapperRef.current.clientHeight >=\n wrapperRef.current.scrollHeight\n );\n }\n }}\n tabIndex={0} // scrollable container must be focusable to support keyboard users\n >\n <div className={styles.tableContainer}>\n <table ref={tableRef} className={clsx(styles.table)}>\n {renderHeaders()}\n <tbody>\n {loadState === \"success\"\n ? renderRows()\n : renderLoader()}\n </tbody>\n </table>\n </div>\n {enableActionBar &&\n selectedIds &&\n selectedIds.length > 0 &&\n renderSelectionBar()}\n <div\n ref={(r) => {\n tableEndRef.current = r;\n endRef(r);\n }}\n />\n </div>\n );\n};\n"],"names":["DataTable","_a","id","headers","rows","className","sortIndicators","alternatingRows","loadState","enableMultiSelect","selectedIds","disabledIds","enableActionBar","enableSelectAll","enableStickyHeader","emptyView","actionBarContent","renderCustomEmptyView","onHeaderClick","onSelect","onSelectAll","onClearSelectionClick","otherProps","__rest","tableRef","useRef","tableEndRef","headerRef","actionBarRef","wrapperRef","internalId","useId","keyColumns","filter","header","keyColumn","scrollable","setScrollable","useState","scrollEnd","setScrollEnd","isFloatingActionBar","setIsFloatingActionBar","showLastBorder","setShowLastBorder","ref","endRef","inView","end","useInView","useApplyStyle","styles.tokens","actionBarWrapperLeft","current","getBoundingClientRect","left","undefined","actionBarWrapperWidth","clientWidth","onResize","useCallback","scrollHeight","clientHeight","style","transform","calculateStickyInViewport","useEffect","useResizeDetector","useEventListener","requestAnimationFrame","calculateFixedInViewport","checkLastBorder","isAllCheckboxSelected","length","isRowSelected","rowId","includes","isAlternatingRow","index","isDisabledRow","getDataTestId","subStr","getTotalColumns","getSortDirection","fieldKey","getHeaderAriaSort","sortDirection","getSortButtonAriaLabel","getCellId","getRowCheckboxAriaLabelledBy","keyColumnIds","map","concatIds","wrapperBounds","bottom","window","innerHeight","top","endBounds","bottomOffset","bottomToHeaderOffset","height","maxBottomOffset","Math","min","renderHeaderCell","label","clickable","isSortable","headerCellId","getHeaderCellId","_jsxs","clsx","styles.headerCell","styles.headerCellClickable","scope","onClick","handleHeaderClick","children","styles.headerCellContent","_jsx","Typography","BodyBL","weight","renderSortedArrow","VisuallyHidden","event","stopPropagation","handleHeaderButtonClick","isSorted","ArrowUpIcon","ArrowDownIcon","renderHeaderCheckBox","styles.headerCellCheckbox","styles.selectionCheckboxWrapper","Checkbox","checked","indeterminate","disabled","renderRowCell","row","toString","cellData","cellId","cellContent","styles.bodyCellText","isSelected","styles.bodyCell","renderRowCheckBox","styles.bodyCellCheckbox","focusableWhenDisabled","renderBasicEmptyView","emptyTitle","title","HeadingSM","styles.emptyStateTitle","ErrorDisplay","Object","assign","type","description","styles.tableWrapper","onScroll","scrollTop","tabIndex","styles.tableContainer","styles.table","styles.stickyHeader","styles.headerRow","styles.bodyRow","styles.emptyStateCell","colSpan","_Fragment","styles.bodyRowWithBottomBorder","styles.bodyRowAlternating","styles.bodyRowSelectable","styles.bodyRowSelected","styles.loadingStateWrapper","role","LoadingDotsSpinner","count","shouldUseFloatingActionBar","styles.actionBarWrapper","styles.actionBarWrapperFloating","styles.actionBar","styles.actionBarFloating","BodyMD","BasicButton","styles.actionBarButton","renderSelectionBar","r"],"mappings":"smEAkBO,MAAMA,EAAaC,QAAAC,GACtBA,EAAEC,QACFA,EAAOC,KACPA,EAAIC,UACJA,GAASC,eACTA,GAAcC,gBACdA,GAAeC,UACfA,GAAY,UAASC,kBACrBA,GAAiBC,YACjBA,GAAWC,YACXA,GAAWC,gBACXA,GAAeC,gBACfA,GAAeC,mBACfA,GAAkBC,UAClBA,GAASC,iBACTA,GAAgBC,sBAChBA,GAAqBC,cACrBA,GAAaC,SACbA,GAAQC,YACRA,GAAWC,sBACXA,MACGC,GAAUC,EAAAtB,EArBS,CAAA,KAAA,UAAA,OAAA,YAAA,iBAAA,kBAAA,YAAA,oBAAA,cAAA,cAAA,kBAAA,kBAAA,qBAAA,YAAA,mBAAA,wBAAA,gBAAA,WAAA,cAAA,0BA0BtB,MAAMuB,GAAWC,EAAyB,MACpCC,GAAcD,EAA8B,MAC5CE,GAAYF,EAAgC,MAC5CG,GAAeH,EAAuB,MACtCI,GAAaJ,EAAuB,MACpCK,GAAaC,IACbC,GAAa7B,EAAQ8B,QACtBC,GAC4B,iBAAXA,KAAyBA,EAAOC,aAI/CC,GAAYC,IAAiBC,GAAS,IACtCC,GAAWC,IAAgBF,GAAS,IACpCG,GAAqBC,IAA0BJ,GAAS,IACxDK,GAAgBC,IAAqBN,GAAS,IAE7CO,IAAKC,GAAQC,OAAQC,IAAQC,IAErCC,EAActB,GAAc,CACxB,CAACuB,EAAcC,sBACXX,IAAuBjB,GAAS6B,QAC1B,GAAG7B,GAAS6B,QAAQC,wBAAwBC,cAC5CC,EACV,CAACL,EAAcM,uBACXhB,IAAuBjB,GAAS6B,QAC1B,GAAG7B,GAAS6B,QAAQK,qBACpBF,IAMd,MAAMG,GAAWC,GAAY,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,KAAeY,IAI1CP,GAEJ,OACI+E,SACI3E,IAAKjB,GACLvB,UAAW2G,EACPsE,EACA7I,IAAuB8I,GAC1BjE,SAEDP,EAAA,MAAA,CACI1G,UAAW2G,EACPwE,EACAH,GAA8BI,GACjCnE,SAAA,CAEDE,EAACC,EAAWiE,OAAM,CAAC/D,OAAO,WAAUL,SAAE,GAAG8D,SACrCA,EAAQ,EAAI,IAAM,gBAEtB5D,EAACmE,EAAW,CACRtL,UAAWuL,EACX7B,KAAK,SAAQ,aACD,sBAAsBqB,SACpB,IAAVA,EAAc,GAAK,MAEvBhE,QAAS/F,GAAqBiG,SAAA,oBAIjCtG,OAEH,EAkCF6K,GACJrE,EAAA,MAAA,CACI3E,IAAMiJ,IACFpK,GAAY2B,QAAUyI,EACtBhJ,GAAOgJ,EAAE,MAGf"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./data-table.
|
|
1
|
+
import"./data-table.styles_1iqq1g7.css";const a={actionBarWrapperLeft:"--fds-internal-dataTable-actionBarWrapper-left",actionBarWrapperWidth:"--fds-internal-dataTable-actionBarWrapper-width"},t="t188sfx3",e="t1j0mhj",r="t4ucy2z",n="s7u4vf5",c="h1nfqacf",p="h1744qno",b="h1ec4wtd",d="hp15x3z",i="h4ne4e9",s="bfa3d3x",f="b6ks76c",l="b1bceurq",h="b8t2s91",o="bjmthdi",q="b1tvp43a",x="bx1feaw",y="b1g3gl2s",g="e1yxh9il",w="s1w2nktt",W="axywpxo",m="anoy5c0",u="a1gvi5ye",B="aag0lf9",_="a1euqarq",j="ldhafdm",v="e1pcc0nq";export{m as actionBar,W as actionBarButton,u as actionBarFloating,B as actionBarWrapper,_ as actionBarWrapperFloating,s as bodyCell,x as bodyCellCheckbox,y as bodyCellText,f as bodyRow,l as bodyRowAlternating,o as bodyRowSelectable,h as bodyRowSelected,q as bodyRowWithBottomBorder,g as emptyStateCell,v as emptyStateTitle,p as headerCell,d as headerCellCheckbox,b as headerCellClickable,i as headerCellContent,c as headerRow,j as loadingStateWrapper,w as selectionCheckboxWrapper,n as stickyHeader,r as table,e as tableContainer,t as tableWrapper,a as tokens};
|
|
2
2
|
//# sourceMappingURL=data-table.styles.js.map
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
.b1g3gl2s{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;}
|
|
18
18
|
.e1yxh9il{padding:4rem 0;}.e1yxh9il:first-child{padding-left:1.5rem;}.e1yxh9il:last-child{padding-right:1.5rem;}
|
|
19
19
|
.s1w2nktt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}
|
|
20
|
-
.axywpxo{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);cursor:pointer;color:var(--fds-colour-text-primary);-webkit-transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);padding:0.75rem;margin:-0.75rem 0;}.axywpxo:hover{color:var(--fds-colour-text-hover);}
|
|
20
|
+
.axywpxo{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);cursor:pointer;color:var(--fds-colour-text-primary);-webkit-transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);padding:0.75rem;margin:-0.75rem 0;}.axywpxo:hover{color:var(--fds-colour-text-hover);}
|
|
21
21
|
.anoy5c0{overflow:hidden;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;height:3.5rem;padding:var(--fds-spacing-16) var(--fds-spacing-24);border-top:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);background-color:var(--fds-colour-bg-selected);-webkit-transition:all 300ms ease;transition:all 300ms ease;border-radius:var(--fds-radius-none) var(--fds-radius-none) var(--fds-radius-sm) var(--fds-radius-sm);}
|
|
22
22
|
.a1gvi5ye{-webkit-transform:translateX(0.5rem) translateY(-2rem);-moz-transform:translateX(0.5rem) translateY(-2rem);-ms-transform:translateX(0.5rem) translateY(-2rem);transform:translateX(0.5rem) translateY(-2rem);border-radius:var(--fds-radius-sm);box-shadow:var(--fds-shadow-xs-subtle);width:calc(100% - var(--fds-spacing-16));border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);}
|
|
23
23
|
.aag0lf9{bottom:0;position:-webkit-sticky;position:sticky;left:0;}
|
package/date-input/date-input.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as e}from"../_virtual/_tslib.js";import{jsx as a}from"react/jsx-runtime";import r from"clsx";import t from"../external/dayjs/dayjs.min.js";import{useState as n,useRef as o,useEffect as i}from"react";import{ElementWithDropdown as l}from"../shared/dropdown-wrapper/element-with-dropdown.js";import{InputWrapper as d}from"../shared/input-wrapper/input-wrapper.js";import{CalendarDropdown as s}from"../shared/internal-calendar/calendar-dropdown.js";import"../shared/internal-calendar/internal-calendar.js";import{StandaloneDateInput as u}from"../shared/standalone-date-input/standalone-date-input.js";import"../util/calendar-helper.js";import{DateInputHelper as c}from"../util/date-input-helper.js";import"../util/simple-id-generator.js";import"../util/string-helper.js";import"@react-aria/live-announcer";import{container as p}from"./date-input.styles.js";const m=m=>{var{minDate:h,maxDate:v,disabled:f,disabledDates:D,error:b,hideInputKeyboard:w,value:j,onChange:g,onFocus:y,onBlur:I,onYearMonthDisplayChange:x,withButton:Y=!0,readOnly:C,id:B,allowDisabledSelection:N,zIndex:O,dropdownRootNode:z,className:M}=m,F=e(m,["minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className"]);const[R,S]=n(c.sanitizeInput(j)),[K,V]=n(c.sanitizeInput(j)),[_,k]=n(void 0),[E,H]=n(!1),[T,W]=n(!1),Z=o(null),q=o(null),A=o(null);i((()=>{const e=c.sanitizeInput(j);S(e),V(e)}),[j]);const G=e=>{!N&&c.isDateDisabled(e,{disabledDates:D,minDate:h,maxDate:v})||(V(e),Y||(X(e),S(e),e&&H(!1)))},J=e=>{var a;V(e),Y||(X(e),S(e),e&&(null===(a=q.current)||void 0===a||a.focusYearRef(),H(!1)),k(void 0))},L=()=>{C||f||(H(!0),T||(W(!0),y&&y()))},P=e=>{var a,r,t;const n=e.relatedTarget,o=A.current&&A.current.contains(n),i=Z.current&&Z.current.contains(n),l=(null===(a=null==n?void 0:n.matches)||void 0===a?void 0:a.call(n,"[data-floating-ui-focusable]"))||(null===(r=null==n?void 0:n.matches)||void 0===r?void 0:r.call(n,"[data-floating-ui-focus-guard]"));(T&&!E&&!i&&!l||E&&!i&&!o&&!l)&&(null===(t=q.current)||void 0===t||t.resetInput(),V(R),W(!1),H(!1),$())},Q=e=>{k(e)},U=e=>{var a,r;switch(e){case"reset":V(R);break;case"confirmed":S(K),X(K)}t(K,"YYYY-MM-DD",!0).isValid()?null===(a=q.current)||void 0===a||a.focusYearRef():null===(r=Z.current)||void 0===r||r.focus(),H(!1)},X=e=>{g&&g(e)},$=()=>{I&&I()};return a(l,{enabled:!C&&!f,isOpen:E,renderElement:()=>a(d,Object.assign({role:"group",tabIndex:0,ref:Z,onBlur:P,onFocus:L,disabled:f,readOnly:C,focused:T,error:b,id:B,"data-testid":F["data-testid"],"aria-disabled":f,className:r(p,M)},F,{children:a(u,{ref:q,disabled:f,onChange:G,readOnly:C,focused:E,names:["start-day","start-month","start-year"],value:K,hoverValue:_,hideInputKeyboard:w})})),renderDropdown:({elementWidth:e})=>a(s,{variant:"single",ref:A,initialCalendarDate:K,withButton:Y,value:K,disabledDates:D,minDate:h,maxDate:v,allowDisabledSelection:N,onHover:Q,onSelect:J,onDismiss:U,onYearMonthDisplayChange:x,width:e,isFocusable:!C&&!f}),onClose:()=>{var e;null===(e=q.current)||void 0===e||e.resetInput(),V(R),H(!1),W(!1),$(),k(void 0)},onDismiss:()=>{var e,a;null===(e=q.current)||void 0===e||e.resetInput(),null===(a=Z.current)||void 0===a||a.focus(),V(R),H(!1)},customZIndex:O,offset:16,rootNode:z})};export{m as DateInput};
|
|
1
|
+
import{__rest as e}from"../_virtual/_tslib.js";import{jsx as a}from"react/jsx-runtime";import r from"clsx";import t from"../external/dayjs/dayjs.min.js";import{useState as n,useRef as o,useEffect as i}from"react";import{ElementWithDropdown as l}from"../shared/dropdown-wrapper/element-with-dropdown.js";import{InputWrapper as d}from"../shared/input-wrapper/input-wrapper.js";import{CalendarDropdown as s}from"../shared/internal-calendar/calendar-dropdown.js";import"../shared/internal-calendar/internal-calendar.js";import{StandaloneDateInput as u}from"../shared/standalone-date-input/standalone-date-input.js";import"../util/calendar-helper.js";import{DateInputHelper as c}from"../util/date-input-helper.js";import"../util/simple-id-generator.js";import"../util/string-helper.js";import"@react-aria/live-announcer";import{container as p}from"./date-input.styles.js";const m=m=>{var{minDate:h,maxDate:v,disabled:f,disabledDates:D,error:b,hideInputKeyboard:w,value:j,onChange:g,onFocus:y,onBlur:I,onYearMonthDisplayChange:x,withButton:Y=!0,readOnly:C,id:B,allowDisabledSelection:N,zIndex:O,dropdownRootNode:z,className:M}=m,F=e(m,["minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className"]);const[R,S]=n(c.sanitizeInput(j)),[K,V]=n(c.sanitizeInput(j)),[_,k]=n(void 0),[E,H]=n(!1),[T,W]=n(!1),Z=o(null),q=o(null),A=o(null);i((()=>{const e=c.sanitizeInput(j);S(e),V(e)}),[j]);const G=e=>{!N&&c.isDateDisabled(e,{disabledDates:D,minDate:h,maxDate:v})||(V(e),Y||(X(e),S(e),e&&H(!1)))},J=e=>{var a;V(e),Y||(X(e),S(e),e&&(null===(a=q.current)||void 0===a||a.focusYearRef(),H(!1)),k(void 0))},L=()=>{C||f||(H(!0),T||(W(!0),y&&y()))},P=e=>{var a,r,t;const n=e.relatedTarget,o=A.current&&A.current.contains(n),i=Z.current&&Z.current.contains(n),l=(null===(a=null==n?void 0:n.matches)||void 0===a?void 0:a.call(n,"[data-floating-ui-focusable]"))||(null===(r=null==n?void 0:n.matches)||void 0===r?void 0:r.call(n,"[data-floating-ui-focus-guard]"));(T&&!E&&!i&&!l||E&&!i&&!o&&!l)&&(null===(t=q.current)||void 0===t||t.resetInput(),V(R),W(!1),H(!1),$())},Q=e=>{E&&k(e)},U=e=>{var a,r;switch(e){case"reset":V(R);break;case"confirmed":S(K),X(K)}t(K,"YYYY-MM-DD",!0).isValid()?null===(a=q.current)||void 0===a||a.focusYearRef():null===(r=Z.current)||void 0===r||r.focus(),H(!1)},X=e=>{g&&g(e)},$=()=>{I&&I()};return a(l,{enabled:!C&&!f,isOpen:E,renderElement:()=>a(d,Object.assign({role:"group",tabIndex:0,ref:Z,onBlur:P,onFocus:L,disabled:f,readOnly:C,focused:T,error:b,id:B,"data-testid":F["data-testid"],"aria-disabled":f,className:r(p,M)},F,{children:a(u,{ref:q,disabled:f,onChange:G,readOnly:C,focused:E,names:["start-day","start-month","start-year"],value:K,hoverValue:_,hideInputKeyboard:w})})),renderDropdown:({elementWidth:e})=>a(s,{variant:"single",ref:A,initialCalendarDate:K,withButton:Y,value:K,disabledDates:D,minDate:h,maxDate:v,allowDisabledSelection:N,onHover:Q,onSelect:J,onDismiss:U,onYearMonthDisplayChange:x,width:e,isFocusable:!C&&!f}),onClose:()=>{var e;null===(e=q.current)||void 0===e||e.resetInput(),V(R),H(!1),W(!1),$(),k(void 0)},onDismiss:()=>{var e,a;null===(e=q.current)||void 0===e||e.resetInput(),null===(a=Z.current)||void 0===a||a.focus(),V(R),H(!1)},customZIndex:O,offset:16,rootNode:z})};export{m as DateInput};
|
|
2
2
|
//# sourceMappingURL=date-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-input.js","sources":["../../src/date-input/date-input.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport dayjs from \"dayjs\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport type { DropdownRenderProps } from \"../shared/dropdown-wrapper\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport { InputWrapper } from \"../shared/input-wrapper\";\nimport type {\n CalendarAction,\n InternalCalendarRef,\n} from \"../shared/internal-calendar\";\nimport { CalendarDropdown } from \"../shared/internal-calendar\";\nimport type { StandaloneDateInputRef } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { StandaloneDateInput } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { DateInputHelper } from \"../util\";\nimport * as styles from \"./date-input.styles\";\nimport type { DateInputProps } from \"./types\";\n\nexport const DateInput = ({\n minDate,\n maxDate,\n disabled,\n disabledDates,\n error,\n hideInputKeyboard,\n value,\n onChange,\n onFocus,\n onBlur,\n onYearMonthDisplayChange,\n withButton = true,\n readOnly,\n id,\n allowDisabledSelection,\n zIndex,\n dropdownRootNode,\n className,\n ...otherProps\n}: DateInputProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [initialDate, setInitialDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [selectedDate, setSelectedDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [hoveredDate, setHoveredDate] = useState<string | undefined>(\n undefined\n );\n const [calendarOpen, setCalendarOpen] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<StandaloneDateInputRef>(null);\n const calendarRef = useRef<InternalCalendarRef>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n const newValue = DateInputHelper.sanitizeInput(value);\n setInitialDate(newValue);\n setSelectedDate(newValue);\n }, [value]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleClose = () => {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n setFocused(false);\n\n performOnBlurHandler();\n\n // clear hover value for mobile scrolling\n setHoveredDate(undefined);\n };\n\n const handleDismiss = () => {\n inputRef.current?.resetInput();\n nodeRef.current?.focus();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n };\n\n const handleChange = (val: string) => {\n if (\n !allowDisabledSelection &&\n DateInputHelper.isDateDisabled(val, {\n disabledDates,\n minDate,\n maxDate,\n })\n ) {\n return;\n }\n\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n setCalendarOpen(false);\n }\n }\n };\n\n const handleSelect = (val: string) => {\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n inputRef.current?.focusYearRef();\n setCalendarOpen(false);\n }\n\n // clear hover value for mobile when onMouseLeave={handleMouseLeaveCell} is not triggered due to touch input\n setHoveredDate(undefined);\n }\n };\n\n const handleFocus = () => {\n if (readOnly || disabled) return;\n\n setCalendarOpen(true);\n\n if (focused) return;\n\n setFocused(true);\n\n if (onFocus) {\n onFocus();\n }\n };\n\n const handleBlur = (e: React.FocusEvent) => {\n const target = e.relatedTarget as HTMLElement;\n\n const isInsideCalendar =\n calendarRef.current && calendarRef.current.contains(target);\n const isInsideNode =\n nodeRef.current && nodeRef.current.contains(target);\n const isFloatingElement =\n target?.matches?.(\"[data-floating-ui-focusable]\") ||\n target?.matches?.(\"[data-floating-ui-focus-guard]\");\n\n // Condition when the calendar is closed and focus moved outside the component\n const shouldBlurWhenClosed =\n focused && !calendarOpen && !isInsideNode && !isFloatingElement;\n\n // Condition when the calendar is open, and focus went outside both input and calendar\n const shouldBlurWhenOpenOutside =\n calendarOpen &&\n !isInsideNode &&\n !isInsideCalendar &&\n !isFloatingElement;\n\n if (shouldBlurWhenClosed || shouldBlurWhenOpenOutside) {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setFocused(false);\n setCalendarOpen(false);\n performOnBlurHandler();\n }\n };\n\n const handleHoverDayCell = (value: string) => {\n setHoveredDate(value);\n };\n\n const handleCalendarAction = (buttonAction: CalendarAction) => {\n // handle button in day calendar view\n switch (buttonAction) {\n case \"reset\":\n setSelectedDate(initialDate);\n break;\n case \"confirmed\":\n setInitialDate(selectedDate);\n performOnChangeHandler(selectedDate);\n break;\n }\n\n const isValid = dayjs(selectedDate, \"YYYY-MM-DD\", true).isValid();\n\n // Focus on year input if the selected date is valid to avoid restarting entire tab order\n if (isValid) {\n inputRef.current?.focusYearRef();\n } else {\n nodeRef.current?.focus();\n }\n setCalendarOpen(false);\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const performOnChangeHandler = (changeValue: string) => {\n if (onChange) {\n onChange(changeValue);\n }\n };\n\n const performOnBlurHandler = () => {\n if (onBlur) {\n onBlur();\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderInput = () => {\n return (\n <InputWrapper\n role=\"group\"\n tabIndex={0}\n ref={nodeRef}\n onBlur={handleBlur}\n onFocus={handleFocus}\n disabled={disabled}\n readOnly={readOnly}\n focused={focused}\n error={error}\n id={id}\n data-testid={otherProps[\"data-testid\"]}\n aria-disabled={disabled}\n className={clsx(styles.container, className)}\n {...otherProps}\n >\n <StandaloneDateInput\n ref={inputRef}\n disabled={disabled}\n onChange={handleChange}\n readOnly={readOnly}\n focused={calendarOpen}\n names={[\"start-day\", \"start-month\", \"start-year\"]}\n value={selectedDate}\n hoverValue={hoveredDate}\n hideInputKeyboard={hideInputKeyboard}\n />\n </InputWrapper>\n );\n };\n\n const renderCalendar = ({ elementWidth }: DropdownRenderProps) => {\n return (\n <CalendarDropdown\n variant=\"single\"\n ref={calendarRef}\n initialCalendarDate={selectedDate}\n withButton={withButton}\n value={selectedDate}\n disabledDates={disabledDates}\n minDate={minDate}\n maxDate={maxDate}\n allowDisabledSelection={allowDisabledSelection}\n onHover={handleHoverDayCell}\n onSelect={handleSelect}\n onDismiss={handleCalendarAction}\n onYearMonthDisplayChange={onYearMonthDisplayChange}\n width={elementWidth}\n isFocusable={!readOnly && !disabled}\n />\n );\n };\n\n return (\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={calendarOpen}\n renderElement={renderInput}\n renderDropdown={renderCalendar}\n onClose={handleClose}\n onDismiss={handleDismiss}\n customZIndex={zIndex}\n offset={16}\n rootNode={dropdownRootNode}\n />\n );\n};\n"],"names":["DateInput","_a","minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className","otherProps","__rest","initialDate","setInitialDate","useState","DateInputHelper","sanitizeInput","selectedDate","setSelectedDate","hoveredDate","setHoveredDate","undefined","calendarOpen","setCalendarOpen","focused","setFocused","nodeRef","useRef","inputRef","calendarRef","useEffect","newValue","handleChange","val","isDateDisabled","performOnChangeHandler","handleSelect","current","focusYearRef","handleFocus","handleBlur","e","target","relatedTarget","isInsideCalendar","contains","isInsideNode","isFloatingElement","matches","call","_b","_c","resetInput","performOnBlurHandler","handleHoverDayCell","handleCalendarAction","buttonAction","dayjs","isValid","focus","changeValue","_jsx","ElementWithDropdown","enabled","isOpen","renderElement","InputWrapper","Object","assign","role","tabIndex","ref","clsx","styles.container","children","StandaloneDateInput","names","hoverValue","renderDropdown","elementWidth","CalendarDropdown","variant","initialCalendarDate","onHover","onSelect","onDismiss","width","isFocusable","onClose","customZIndex","offset","rootNode"],"mappings":"m2BAkBO,MAAMA,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AO,CAAC,YAAa,cAAe,cACpC9E,MAAOmB,EACP4D,WAAY1D,EACZtB,kBAAmBA,OAiC3BiF,eA3Be,EAAGC,kBAElBlB,EAACmB,EAAgB,CACbC,QAAQ,SACRV,IAAK1C,EACLqD,oBAAqBjE,EACrBd,WAAYA,EACZL,MAAOmB,EACPtB,cAAeA,EACfH,QAASA,EACTC,QAASA,EACTa,uBAAwBA,EACxB6E,QAAS7B,EACT8B,SAAUhD,EACViD,UAAW9B,EACXrD,yBAA0BA,EAC1BoF,MAAOP,EACPQ,aAAcnF,IAAaV,IAW/B8F,QAjNY,WACA,QAAhBjG,EAAAqC,EAASS,eAAO,IAAA9C,GAAAA,EAAE6D,aAClBlC,EAAgBN,GAChBW,GAAgB,GAChBE,GAAW,GAEX4B,IAGAjC,OAAeC,EAAU,EAyMrBgE,UAtMc,aACF,QAAhB9F,EAAAqC,EAASS,eAAO,IAAA9C,GAAAA,EAAE6D,aACH,QAAfF,EAAAxB,EAAQW,eAAO,IAAAa,GAAAA,EAAES,QACjBzC,EAAgBN,GAChBW,GAAgB,EAAM,EAmMlBkE,aAAclF,EACdmF,OAAQ,GACRC,SAAUnF,GACZ"}
|
|
1
|
+
{"version":3,"file":"date-input.js","sources":["../../src/date-input/date-input.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport dayjs from \"dayjs\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport type { DropdownRenderProps } from \"../shared/dropdown-wrapper\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport { InputWrapper } from \"../shared/input-wrapper\";\nimport type {\n CalendarAction,\n InternalCalendarRef,\n} from \"../shared/internal-calendar\";\nimport { CalendarDropdown } from \"../shared/internal-calendar\";\nimport type { StandaloneDateInputRef } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { StandaloneDateInput } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { DateInputHelper } from \"../util\";\nimport * as styles from \"./date-input.styles\";\nimport type { DateInputProps } from \"./types\";\n\nexport const DateInput = ({\n minDate,\n maxDate,\n disabled,\n disabledDates,\n error,\n hideInputKeyboard,\n value,\n onChange,\n onFocus,\n onBlur,\n onYearMonthDisplayChange,\n withButton = true,\n readOnly,\n id,\n allowDisabledSelection,\n zIndex,\n dropdownRootNode,\n className,\n ...otherProps\n}: DateInputProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [initialDate, setInitialDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [selectedDate, setSelectedDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [hoveredDate, setHoveredDate] = useState<string | undefined>(\n undefined\n );\n const [calendarOpen, setCalendarOpen] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<StandaloneDateInputRef>(null);\n const calendarRef = useRef<InternalCalendarRef>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n const newValue = DateInputHelper.sanitizeInput(value);\n setInitialDate(newValue);\n setSelectedDate(newValue);\n }, [value]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleClose = () => {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n setFocused(false);\n\n performOnBlurHandler();\n\n // clear hover value for mobile scrolling\n setHoveredDate(undefined);\n };\n\n const handleDismiss = () => {\n inputRef.current?.resetInput();\n nodeRef.current?.focus();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n };\n\n const handleChange = (val: string) => {\n if (\n !allowDisabledSelection &&\n DateInputHelper.isDateDisabled(val, {\n disabledDates,\n minDate,\n maxDate,\n })\n ) {\n return;\n }\n\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n setCalendarOpen(false);\n }\n }\n };\n\n const handleSelect = (val: string) => {\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n inputRef.current?.focusYearRef();\n setCalendarOpen(false);\n }\n\n // clear hover value for mobile when onMouseLeave={handleMouseLeaveCell} is not triggered due to touch input\n setHoveredDate(undefined);\n }\n };\n\n const handleFocus = () => {\n if (readOnly || disabled) return;\n\n setCalendarOpen(true);\n\n if (focused) return;\n\n setFocused(true);\n\n if (onFocus) {\n onFocus();\n }\n };\n\n const handleBlur = (e: React.FocusEvent) => {\n const target = e.relatedTarget as HTMLElement;\n\n const isInsideCalendar =\n calendarRef.current && calendarRef.current.contains(target);\n const isInsideNode =\n nodeRef.current && nodeRef.current.contains(target);\n const isFloatingElement =\n target?.matches?.(\"[data-floating-ui-focusable]\") ||\n target?.matches?.(\"[data-floating-ui-focus-guard]\");\n\n // Condition when the calendar is closed and focus moved outside the component\n const shouldBlurWhenClosed =\n focused && !calendarOpen && !isInsideNode && !isFloatingElement;\n\n // Condition when the calendar is open, and focus went outside both input and calendar\n const shouldBlurWhenOpenOutside =\n calendarOpen &&\n !isInsideNode &&\n !isInsideCalendar &&\n !isFloatingElement;\n\n if (shouldBlurWhenClosed || shouldBlurWhenOpenOutside) {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setFocused(false);\n setCalendarOpen(false);\n performOnBlurHandler();\n }\n };\n\n const handleHoverDayCell = (value: string) => {\n if (!calendarOpen) return;\n setHoveredDate(value);\n };\n\n const handleCalendarAction = (buttonAction: CalendarAction) => {\n // handle button in day calendar view\n switch (buttonAction) {\n case \"reset\":\n setSelectedDate(initialDate);\n break;\n case \"confirmed\":\n setInitialDate(selectedDate);\n performOnChangeHandler(selectedDate);\n break;\n }\n\n const isValid = dayjs(selectedDate, \"YYYY-MM-DD\", true).isValid();\n\n // Focus on year input if the selected date is valid to avoid restarting entire tab order\n if (isValid) {\n inputRef.current?.focusYearRef();\n } else {\n nodeRef.current?.focus();\n }\n setCalendarOpen(false);\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const performOnChangeHandler = (changeValue: string) => {\n if (onChange) {\n onChange(changeValue);\n }\n };\n\n const performOnBlurHandler = () => {\n if (onBlur) {\n onBlur();\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderInput = () => {\n return (\n <InputWrapper\n role=\"group\"\n tabIndex={0}\n ref={nodeRef}\n onBlur={handleBlur}\n onFocus={handleFocus}\n disabled={disabled}\n readOnly={readOnly}\n focused={focused}\n error={error}\n id={id}\n data-testid={otherProps[\"data-testid\"]}\n aria-disabled={disabled}\n className={clsx(styles.container, className)}\n {...otherProps}\n >\n <StandaloneDateInput\n ref={inputRef}\n disabled={disabled}\n onChange={handleChange}\n readOnly={readOnly}\n focused={calendarOpen}\n names={[\"start-day\", \"start-month\", \"start-year\"]}\n value={selectedDate}\n hoverValue={hoveredDate}\n hideInputKeyboard={hideInputKeyboard}\n />\n </InputWrapper>\n );\n };\n\n const renderCalendar = ({ elementWidth }: DropdownRenderProps) => {\n return (\n <CalendarDropdown\n variant=\"single\"\n ref={calendarRef}\n initialCalendarDate={selectedDate}\n withButton={withButton}\n value={selectedDate}\n disabledDates={disabledDates}\n minDate={minDate}\n maxDate={maxDate}\n allowDisabledSelection={allowDisabledSelection}\n onHover={handleHoverDayCell}\n onSelect={handleSelect}\n onDismiss={handleCalendarAction}\n onYearMonthDisplayChange={onYearMonthDisplayChange}\n width={elementWidth}\n isFocusable={!readOnly && !disabled}\n />\n );\n };\n\n return (\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={calendarOpen}\n renderElement={renderInput}\n renderDropdown={renderCalendar}\n onClose={handleClose}\n onDismiss={handleDismiss}\n customZIndex={zIndex}\n offset={16}\n rootNode={dropdownRootNode}\n />\n );\n};\n"],"names":["DateInput","_a","minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className","otherProps","__rest","initialDate","setInitialDate","useState","DateInputHelper","sanitizeInput","selectedDate","setSelectedDate","hoveredDate","setHoveredDate","undefined","calendarOpen","setCalendarOpen","focused","setFocused","nodeRef","useRef","inputRef","calendarRef","useEffect","newValue","handleChange","val","isDateDisabled","performOnChangeHandler","handleSelect","current","focusYearRef","handleFocus","handleBlur","e","target","relatedTarget","isInsideCalendar","contains","isInsideNode","isFloatingElement","matches","call","_b","_c","resetInput","performOnBlurHandler","handleHoverDayCell","handleCalendarAction","buttonAction","dayjs","isValid","focus","changeValue","_jsx","ElementWithDropdown","enabled","isOpen","renderElement","InputWrapper","Object","assign","role","tabIndex","ref","clsx","styles.container","children","StandaloneDateInput","names","hoverValue","renderDropdown","elementWidth","CalendarDropdown","variant","initialCalendarDate","onHover","onSelect","onDismiss","width","isFocusable","onClose","customZIndex","offset","rootNode"],"mappings":"m2BAkBO,MAAMA,EAAaC,IAAA,IAAAC,QACtBA,EAAOC,QACPA,EAAOC,SACPA,EAAQC,cACRA,EAAaC,MACbA,EAAKC,kBACLA,EAAiBC,MACjBA,EAAKC,SACLA,EAAQC,QACRA,EAAOC,OACPA,EAAMC,yBACNA,EAAwBC,WACxBA,GAAa,EAAIC,SACjBA,EAAQC,GACRA,EAAEC,uBACFA,EAAsBC,OACtBA,EAAMC,iBACNA,EAAgBC,UAChBA,GAASlB,EACNmB,EAAUC,EAAApB,EAnBS,6OAwBtB,MAAOqB,EAAaC,GAAkBC,EAClCC,EAAgBC,cAAclB,KAE3BmB,EAAcC,GAAmBJ,EACpCC,EAAgBC,cAAclB,KAE3BqB,EAAaC,GAAkBN,OAClCO,IAEGC,EAAcC,GAAmBT,GAAkB,IACnDU,EAASC,GAAcX,GAAkB,GAE1CY,EAAUC,EAAuB,MACjCC,EAAWD,EAA+B,MAC1CE,EAAcF,EAA4B,MAKhDG,GAAU,KACN,MAAMC,EAAWhB,EAAgBC,cAAclB,GAC/Ce,EAAekB,GACfb,EAAgBa,EAAS,GAC1B,CAACjC,IAKJ,MAmBMkC,EAAgBC,KAEb3B,GACDS,E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AAUnF,GACZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./date-navigator.
|
|
1
|
+
import"./date-navigator.styles_wokh56.css";const t="c1mdg68z",a="h1w7ufcd",o="h7gg62z",d="d1pl361j";export{t as container,d as dateTextButton,a as headerArrowButton,o as headerArrowButtonIcon};
|
|
2
2
|
//# sourceMappingURL=date-navigator.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-navigator.styles.js","sources":["../../src/date-navigator/date-navigator.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, Radius, Spacing } from \"../theme\";\n\nexport const container = css`\n display: flex;\n position: relative;\n align-items: center;\n justify-content: space-between;\n background-color: ${Colour[\"bg-strong\"]};\n border-radius: ${Radius[\"sm\"]};\n`;\n\nexport const headerArrowButton = css`\n margin: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const headerArrowButtonIcon = css`\n color: ${Colour[\"icon\"]};\n`;\n\nexport const dateTextButton = css`\n ${Font[\"body-baseline-semibold\"]}\n color: ${Colour[\"text\"]};\n cursor: default;\n\n &:not(:disabled) {\n color: ${Colour[\"text-primary\"]};\n }\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-underline-position: under;\n }\n`;\n"],"names":["container","headerArrowButton","headerArrowButtonIcon","dateTextButton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"date-navigator.styles.js","sources":["../../src/date-navigator/date-navigator.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, Radius, Spacing } from \"../theme\";\n\nexport const container = css`\n display: flex;\n position: relative;\n align-items: center;\n justify-content: space-between;\n background-color: ${Colour[\"bg-strong\"]};\n border-radius: ${Radius[\"sm\"]};\n`;\n\nexport const headerArrowButton = css`\n margin: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const headerArrowButtonIcon = css`\n color: ${Colour[\"icon\"]};\n`;\n\nexport const dateTextButton = css`\n ${Font[\"body-baseline-semibold\"]}\n color: ${Colour[\"text\"]};\n cursor: default;\n\n &:not(:disabled) {\n color: ${Colour[\"text-primary\"]};\n }\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-underline-position: under;\n }\n`;\n"],"names":["container","headerArrowButton","headerArrowButtonIcon","dateTextButton"],"mappings":"yEAIO,MAAMA,EAAS,WASTC,EAAiB,WAIjBC,EAAqB,UAIrBC,EAAc"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
.c1mdg68z{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:space-between;-webkit-justify-content:space-between;justify-content:space-between;background-color:var(--fds-colour-bg-strong);border-radius:var(--fds-radius-sm);}
|
|
2
|
+
.h1w7ufcd{margin:var(--fds-spacing-8);}
|
|
3
|
+
.h7gg62z{color:var(--fds-colour-icon);}
|
|
4
|
+
.d1pl361j{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);cursor:default;}.d1pl361j:not(:disabled){color:var(--fds-colour-text-primary);}.d1pl361j:not(:disabled):hover,.d1pl361j:not(:disabled):focus{outline:none;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;text-underline-position:under;}
|
package/divider/divider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sources":["../../src/divider/divider.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { useRef } from \"react\";\n\nimport { ColDiv } from \"../layout/col-div\";\nimport { Colour, useApplyStyle
|
|
1
|
+
{"version":3,"file":"divider.js","sources":["../../src/divider/divider.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { useRef } from \"react\";\n\nimport { ColDiv } from \"../layout/col-div\";\nimport { Colour, useApplyStyle } from \"../theme\";\nimport { useResolvedTokenValue } from \"../theme/utils\";\nimport { isColourToken } from \"../util/styling-helper\";\nimport * as styles from \"./divider.styles\";\nimport type { DividerLineStyleType, DividerProps } from \"./types\";\n\nconst lineStyleMap: Record<DividerLineStyleType, string> = {\n solid: styles.solidLine,\n dashed: styles.dashedLine,\n};\n\nexport const Divider = ({\n thickness = 1,\n lineStyle = \"solid\",\n layoutType = \"flex\",\n color,\n className,\n xxsCols,\n xsCols,\n smCols,\n mdCols,\n lgCols,\n xlCols,\n xxlCols,\n ...otherProps\n}: DividerProps) => {\n const ref = useRef<HTMLHRElement>(null);\n\n const effectiveColor = useResolvedTokenValue({\n value: color,\n fallback: Colour[\"border\"],\n isToken: isColourToken,\n normalizeCustom: String,\n });\n\n const encodedColor = encodeURIComponent(effectiveColor);\n const strokeWidth = thickness + 1; // best fit\n\n useApplyStyle(ref, {\n [styles.tokens.thickness]: `${thickness}px`,\n [styles.tokens.color]: color,\n [styles.tokens.backgroundImage]: `\n url('data:image/svg+xml,<svg width=\"8\" height=\"${thickness}\" viewBox=\"0 0 8 1\" xmlns=\"http://www.w3.org/2000/svg\"><line x1=\"2\" y1=\"1\" x2=\"6\" y2=\"1\" stroke=\"${encodedColor}\" stroke-width=\"${strokeWidth}\" stroke-dasharray=\"4 4\" /></svg>')`,\n });\n\n const getColumnProps = () => {\n const xxsColsProp = xxsCols || [1, -1];\n const xsColsProp = xsCols || xxsColsProp;\n const smColsProp = smCols || xsColsProp;\n const mdColsProp = mdCols || smColsProp;\n const lgColsProp = lgCols || mdColsProp;\n const xlColsProp = xlCols || lgColsProp;\n const xxlColsProp = xxlCols || xlColsProp;\n\n return {\n xxlCols: xxlColsProp,\n xlCols: xlColsProp,\n lgCols: lgColsProp,\n mdCols: mdColsProp,\n smCols: smColsProp,\n xsCols: xsColsProp,\n xxsCols: xxsColsProp,\n };\n };\n\n const lineClass = clsx(styles.lineBase, lineStyleMap[lineStyle]);\n\n switch (layoutType) {\n case \"flex\":\n return (\n <hr\n ref={ref}\n className={clsx(lineClass, className)}\n {...otherProps}\n />\n );\n case \"grid\":\n return (\n <ColDiv\n className={className}\n {...getColumnProps()}\n {...otherProps}\n >\n <hr ref={ref} className={lineClass} />\n </ColDiv>\n );\n }\n};\n"],"names":["lineStyleMap","solid","styles.solidLine","dashed","styles.dashedLine","Divider","_a","thickness","lineStyle","layoutType","color","className","xxsCols","xsCols","smCols","mdCols","lgCols","xlCols","xxlCols","otherProps","__rest","ref","useRef","effectiveColor","useResolvedTokenValue","value","fallback","Colour","isToken","isColourToken","normalizeCustom","String","encodedColor","encodeURIComponent","strokeWidth","useApplyStyle","styles.tokens","backgroundImage","lineClass","clsx","styles.lineBase","_jsx","Object","assign","ColDiv","xxsColsProp","xsColsProp","smColsProp","mdColsProp","lgColsProp","xlColsProp","getColumnProps"],"mappings":"ovBAUA,MAAMA,EAAqD,CACvDC,MAAOC,EACPC,OAAQC,GAGCC,EAAWC,IAAA,IAAAC,UACpBA,EAAY,EAACC,UACbA,EAAY,QAAOC,WACnBA,EAAa,OAAMC,MACnBA,EAAKC,UACLA,EAASC,QACTA,EAAOC,OACPA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,QACNA,GAAOZ,EACJa,EAAUC,EAAAd,EAbO,6HAepB,MAAMe,EAAMC,EAAsB,MAE5BC,EAAiBC,EAAsB,CACzCC,MAAOf,EACPgB,SAAUC,EAAe,OACzBC,QAASC,EACTC,gBAAiBC,SAGfC,EAAeC,mBAAmBV,GAClCW,EAAc3B,EAAY,EAEhC4B,EAAcd,EAAK,CACf,CAACe,EAAc7B,WAAY,GAAGA,MAC9B,CAAC6B,EAAc1B,OAAQA,EACvB,CAAC0B,EAAcC,iBAAkB,gEACoB9B,qGAA6GyB,oBAA+BE,yCAGrM,MAoBMI,EAAYC,E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