@lifesg/react-design-system 4.0.0-alpha.5 → 4.0.0-alpha.7
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.js.map +1 -1
- package/accordion/types.d.ts +1 -1
- package/alert/alert.js.map +1 -1
- package/alert/types.d.ts +2 -0
- package/animations/loading-dots/loading-dots.d.ts +5 -2
- package/animations/loading-dots/loading-dots.js.map +1 -1
- package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +3 -0
- package/animations/loading-dots-spinner/loading-dots-spinner.js.map +1 -1
- package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -2
- package/animations/loading-dots-spinner/lottie-animation.js.map +1 -1
- package/animations/loading-spinner/loading-spinner.d.ts +5 -2
- package/animations/loading-spinner/loading-spinner.js.map +1 -1
- package/animations/themed-loading-spinner/themed-loading-spinner.d.ts +5 -2
- package/animations/themed-loading-spinner/themed-loading-spinner.js.map +1 -1
- package/animations/types.d.ts +13 -6
- package/avatar/avatar.js.map +1 -1
- package/badge/badge.js.map +1 -1
- package/badge/types.d.ts +13 -2
- package/box-container/box-container.js.map +1 -1
- package/box-container/types.d.ts +2 -0
- package/breadcrumb/breadcrumb.d.ts +7 -0
- package/breadcrumb/breadcrumb.js.map +1 -1
- package/breadcrumb/types.d.ts +36 -0
- package/button/button.d.ts +1 -0
- package/button/button.js.map +1 -1
- package/button/types.d.ts +47 -9
- package/calendar/calendar.d.ts +3 -0
- package/calendar/calendar.js.map +1 -1
- package/calendar/types.d.ts +46 -10
- package/card/card.d.ts +1 -0
- package/card/card.js.map +1 -1
- package/card/types.d.ts +1 -0
- package/checkbox/checkbox.d.ts +3 -0
- package/checkbox/checkbox.js.map +1 -1
- package/checkbox/types.d.ts +23 -3
- package/cjs/accordion/accordion.js.map +1 -1
- package/cjs/alert/alert.js.map +1 -1
- package/cjs/animations/loading-dots/loading-dots.js.map +1 -1
- package/cjs/animations/loading-dots-spinner/loading-dots-spinner.js.map +1 -1
- package/cjs/animations/loading-dots-spinner/lottie-animation.js.map +1 -1
- package/cjs/animations/loading-spinner/loading-spinner.js.map +1 -1
- package/cjs/animations/themed-loading-spinner/themed-loading-spinner.js.map +1 -1
- package/cjs/avatar/avatar.js.map +1 -1
- package/cjs/badge/badge.js.map +1 -1
- package/cjs/box-container/box-container.js.map +1 -1
- package/cjs/breadcrumb/breadcrumb.js.map +1 -1
- package/cjs/button/button.js.map +1 -1
- package/cjs/calendar/calendar.js.map +1 -1
- package/cjs/card/card.js.map +1 -1
- package/cjs/checkbox/checkbox.js.map +1 -1
- package/cjs/countdown-timer/countdown-timer.js.map +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.js.map +1 -1
- package/cjs/data-table/data-table.styles_rxganh.css +27 -0
- package/cjs/date-input/date-input.js.map +1 -1
- package/cjs/date-navigator/date-navigator.js.map +1 -1
- package/cjs/date-range-input/date-range-input.js.map +1 -1
- package/cjs/divider/divider.js.map +1 -1
- package/cjs/drawer/drawer.js.map +1 -1
- package/cjs/e-signature/e-signature.js.map +1 -1
- package/cjs/error-display/error-display.js.map +1 -1
- package/cjs/external/dompurify/dist/purify.es.js +2 -2
- package/cjs/external/dompurify/dist/purify.es.js.map +1 -1
- package/cjs/external/lodash/_setCacheHas.js.map +1 -1
- package/cjs/external/lodash/lodash.js +1 -1
- package/cjs/external/lodash/lodash.js.map +1 -1
- package/cjs/feedback-rating/feedback-rating.js.map +1 -1
- package/cjs/file-download/file-download.js.map +1 -1
- package/cjs/file-upload/file-item-edit.js.map +1 -1
- package/cjs/file-upload/file-list/file-list.js.map +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.js.map +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.styles.js +1 -1
- package/cjs/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
- package/cjs/file-upload/file-list-item/{file-list-item.styles_o8000f.css → file-list-item.styles_kgtfke.css} +1 -1
- package/cjs/file-upload/file-upload.js.map +1 -1
- package/cjs/filter/addons/filter-item-checkbox-helpers.js.map +1 -1
- package/cjs/filter/addons/filter-item-checkbox.js.map +1 -1
- package/cjs/filter/filter-item.js +1 -1
- package/cjs/filter/filter-item.js.map +1 -1
- package/cjs/filter/filter.js.map +1 -1
- package/cjs/footer/footer.js.map +1 -1
- package/cjs/form/form-custom-field/form-custom-field.js +2 -0
- package/cjs/form/form-custom-field/form-custom-field.js.map +1 -0
- package/cjs/form/form-date-input/form-date-input.js +2 -0
- package/cjs/form/form-date-input/form-date-input.js.map +1 -0
- package/cjs/form/form-date-range-input/form-date-range-input.js +2 -0
- package/cjs/form/form-date-range-input/form-date-range-input.js.map +1 -0
- package/cjs/form/form-e-signature/form-e-signature.js +2 -0
- package/cjs/form/form-e-signature/form-e-signature.js.map +1 -0
- package/cjs/form/form-histogram-slider/form-histogram-slider.js +2 -0
- package/cjs/form/form-histogram-slider/form-histogram-slider.js.map +1 -0
- package/cjs/form/form-input/form-input.js +2 -0
- package/cjs/form/form-input/form-input.js.map +1 -0
- package/cjs/form/form-input-group/form-input-group.js +2 -0
- package/cjs/form/form-input-group/form-input-group.js.map +1 -0
- package/cjs/form/form-label/form-label-addon.js +2 -0
- package/cjs/form/form-label/form-label-addon.js.map +1 -0
- package/cjs/form/form-label/form-label-addon.styles.js +2 -0
- package/cjs/form/form-label/form-label-addon.styles.js.map +1 -0
- package/cjs/form/form-label/form-label-addon.styles_aztasj.css +1 -0
- package/cjs/form/form-label/form-label.js +2 -0
- package/cjs/form/form-label/form-label.js.map +1 -0
- package/cjs/form/form-label/form-label.styles.js +2 -0
- package/cjs/form/form-label/form-label.styles.js.map +1 -0
- package/cjs/form/form-label/form-label.styles_180zf7j.css +6 -0
- package/cjs/form/form-masked-input/form-masked-input.js +2 -0
- package/cjs/form/form-masked-input/form-masked-input.js.map +1 -0
- package/cjs/form/form-multi-select/form-multi-select.js +2 -0
- package/cjs/form/form-multi-select/form-multi-select.js.map +1 -0
- package/cjs/form/form-nested-multi-select/form-nested-multi-select.js +2 -0
- package/cjs/form/form-nested-multi-select/form-nested-multi-select.js.map +1 -0
- package/cjs/form/form-nested-select/form-nested-select.js +2 -0
- package/cjs/form/form-nested-select/form-nested-select.js.map +1 -0
- package/cjs/form/form-otp-verification/form-otp-verification.js +2 -0
- package/cjs/form/form-otp-verification/form-otp-verification.js.map +1 -0
- package/cjs/form/form-phone-number-input/form-phone-number-input.js +2 -0
- package/cjs/form/form-phone-number-input/form-phone-number-input.js.map +1 -0
- package/cjs/form/form-predictive-text-input/form-predictive-text-input.js +2 -0
- package/cjs/form/form-predictive-text-input/form-predictive-text-input.js.map +1 -0
- package/cjs/form/form-range-select/form-range-select.js +2 -0
- package/cjs/form/form-range-select/form-range-select.js.map +1 -0
- package/cjs/form/form-range-slider/form-range-slider.js +2 -0
- package/cjs/form/form-range-slider/form-range-slider.js.map +1 -0
- package/cjs/form/form-select/form-select.js +2 -0
- package/cjs/form/form-select/form-select.js.map +1 -0
- package/cjs/form/form-select-histogram/form-select-histogram.js +2 -0
- package/cjs/form/form-select-histogram/form-select-histogram.js.map +1 -0
- package/cjs/form/form-slider/form-slider.js +2 -0
- package/cjs/form/form-slider/form-slider.js.map +1 -0
- package/cjs/form/form-textarea/form-textarea.js +2 -0
- package/cjs/form/form-textarea/form-textarea.js.map +1 -0
- package/cjs/form/form-textarea/form-textarea.styles.js +2 -0
- package/cjs/form/form-textarea/form-textarea.styles.js.map +1 -0
- package/cjs/form/form-textarea/form-textarea.styles_1kneyif.css +3 -0
- package/cjs/form/form-time-range-picker/form-time-range-picker.js +2 -0
- package/cjs/form/form-time-range-picker/form-time-range-picker.js.map +1 -0
- package/cjs/form/form-timepicker/form-timepicker.js +2 -0
- package/cjs/form/form-timepicker/form-timepicker.js.map +1 -0
- package/cjs/form/form-unit-number-input/form-unit-number-input.js +2 -0
- package/cjs/form/form-unit-number-input/form-unit-number-input.js.map +1 -0
- package/cjs/form/form-wrapper.js +1 -1
- package/cjs/form/form-wrapper.js.map +1 -1
- package/cjs/form/index.js +1 -1
- package/cjs/form/index.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/histogram-slider/histogram-slider.js.map +1 -1
- package/cjs/image-button/image-button.js.map +1 -1
- package/cjs/index.js +1 -1
- package/cjs/input/input.js.map +1 -1
- package/cjs/input-group/input-group.js.map +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.map +1 -1
- package/cjs/input-nested-select/input-nested-select.js.map +1 -1
- package/cjs/input-range-select/input-range-select.js.map +1 -1
- package/cjs/input-range-slider/input-range-slider.js.map +1 -1
- package/cjs/input-select/input-select.js.map +1 -1
- package/cjs/input-slider/input-slider.js.map +1 -1
- package/cjs/input-textarea/textarea.js.map +1 -1
- package/cjs/input-textarea/textarea.styles.js +1 -1
- package/cjs/input-textarea/textarea.styles.js.map +1 -1
- package/cjs/input-textarea/{textarea.styles_22z4n3.css → textarea.styles_q77m5x.css} +1 -1
- package/cjs/language-switcher/language-switcher.js.map +1 -1
- package/cjs/layout/index.js +1 -1
- package/cjs/layout/index.js.map +1 -1
- package/cjs/link-list/components/common.js.map +1 -1
- package/cjs/link-list/components/link-list-eager.js.map +1 -1
- package/cjs/link-list/components/link-list-lazy.js.map +1 -1
- package/cjs/link-list/link-list.js.map +1 -1
- package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
- package/cjs/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
- package/cjs/markup/markup.js.map +1 -1
- package/cjs/masked-input/masked-input.js.map +1 -1
- package/cjs/masthead/masthead.js.map +1 -1
- package/cjs/menu/menu.js +1 -1
- package/cjs/menu/menu.js.map +1 -1
- package/cjs/modal/index.js.map +1 -1
- package/cjs/modal/modal-box.js +1 -1
- package/cjs/modal/modal-box.js.map +1 -1
- package/cjs/modal-v2/index.js +1 -1
- package/cjs/modal-v2/index.js.map +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/slots/card.js +1 -1
- package/cjs/modal-v2/slots/card.js.map +1 -1
- package/cjs/navbar/navbar.js.map +1 -1
- package/cjs/notification-banner/notification-banner-hoc.js.map +1 -1
- package/cjs/notification-banner/notification-banner.js.map +1 -1
- package/cjs/otp-input/otp-input.js +1 -1
- package/cjs/otp-input/otp-input.js.map +1 -1
- 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/otp-verification.js.map +1 -1
- package/cjs/otp-verification/verification-section.js +1 -1
- package/cjs/otp-verification/verification-section.js.map +1 -1
- package/cjs/overlay/overlay.js.map +1 -1
- package/cjs/pagination/pagination.js.map +1 -1
- package/cjs/phone-number-input/phone-number-input.js.map +1 -1
- package/cjs/pill/pill.js.map +1 -1
- package/cjs/popover/popover-inline/popover-inline.js.map +1 -1
- package/cjs/popover/popover-trigger.js.map +1 -1
- package/cjs/popover/popover.js +1 -1
- package/cjs/popover/popover.js.map +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/progress-indicator/progress-indicator.js.map +1 -1
- package/cjs/radio-button/radio-button.js.map +1 -1
- package/cjs/schedule/schedule.js.map +1 -1
- package/cjs/schedule/shared/with-optional-popover.js +1 -1
- package/cjs/schedule/shared/with-optional-popover.js.map +1 -1
- package/cjs/select-histogram/select-histogram.js.map +1 -1
- package/cjs/shared/dropdown-list/dropdown-list.js +1 -1
- package/cjs/shared/dropdown-list/dropdown-list.js.map +1 -1
- package/cjs/shared/dropdown-wrapper/element-with-dropdown.js +1 -1
- package/cjs/shared/dropdown-wrapper/element-with-dropdown.js.map +1 -1
- package/cjs/sidenav/sidenav.js.map +1 -1
- package/cjs/singpass-button/singpass-button.js.map +1 -1
- package/cjs/smart-app-banner/smart-app-banner.js.map +1 -1
- package/cjs/tab/tab.js.map +1 -1
- package/cjs/table/table.js.map +1 -1
- package/cjs/table/table.styles.js +1 -1
- package/cjs/table/table.styles.js.map +1 -1
- package/cjs/table/{table.styles_1af5ipv.css → table.styles_1vjx31g.css} +1 -1
- package/cjs/tag/tag.js.map +1 -1
- package/cjs/text-list/index.js.map +1 -1
- package/cjs/theme/theme-provider/breakpoint.js +1 -1
- package/cjs/theme/theme-provider/breakpoint.js.map +1 -1
- package/cjs/theme/theme-provider/hooks.js.map +1 -1
- package/cjs/theme/theme-provider/index.js.map +1 -1
- package/cjs/theme/tokens/border.js.map +1 -1
- package/cjs/theme/tokens/breakpoint.js.map +1 -1
- package/cjs/theme/tokens/colour.js.map +1 -1
- package/cjs/theme/tokens/component.js.map +1 -1
- package/cjs/theme/tokens/font.js.map +1 -1
- package/cjs/theme/tokens/media-query.js.map +1 -1
- package/cjs/theme/tokens/motion.js.map +1 -1
- package/cjs/theme/tokens/radius.js.map +1 -1
- package/cjs/theme/tokens/shadow.js.map +1 -1
- package/cjs/theme/tokens/spacing.js.map +1 -1
- package/cjs/theme/types.js.map +1 -1
- package/cjs/theme/utils/css-variable.js.map +1 -1
- package/cjs/theme/utils/font.js.map +1 -1
- package/cjs/theme/utils/use-apply-styles.js +1 -1
- package/cjs/theme/utils/use-apply-styles.js.map +1 -1
- package/cjs/theme/utils/use-design-token-override.js.map +1 -1
- package/cjs/theme/utils/use-design-token.js.map +1 -1
- package/cjs/theme/utils/use-media-query.js.map +1 -1
- package/cjs/time-range-picker/combobox-picker/combobox-picker.js +1 -1
- package/cjs/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
- package/cjs/time-range-picker/common.styles.js +1 -1
- package/cjs/time-range-picker/common.styles.js.map +1 -1
- package/cjs/time-range-picker/{common.styles_1qwp4xa.css → common.styles_cnkkax.css} +2 -1
- package/cjs/time-range-picker/dial-picker/dial-picker.js +1 -1
- package/cjs/time-range-picker/dial-picker/dial-picker.js.map +1 -1
- package/cjs/time-range-picker/time-range-picker.js.map +1 -1
- package/cjs/time-slot-bar/time-slot-bar.js.map +1 -1
- package/cjs/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
- package/cjs/time-slot-week-view/time-slot-week-view.js.map +1 -1
- package/cjs/timeline/timeline.js.map +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_lyizvq.css +2 -0
- package/cjs/timetable/timetable-row/with-optional-popover.js +1 -1
- package/cjs/timetable/timetable-row/with-optional-popover.js.map +1 -1
- package/cjs/timetable/timetable.js +1 -1
- package/cjs/timetable/timetable.js.map +1 -1
- package/cjs/toast/toast.js.map +1 -1
- package/cjs/toggle/toggle.js.map +1 -1
- package/cjs/typography/index.js.map +1 -1
- package/cjs/uneditable-section/index.js.map +1 -1
- package/cjs/uneditable-section/section-item.js +1 -1
- package/cjs/uneditable-section/section-item.js.map +1 -1
- package/cjs/unit-number/unit-number-input.js.map +1 -1
- package/cjs/util/merge-refs.js.map +1 -1
- package/cjs/util/use-throttle.js +2 -0
- package/cjs/util/use-throttle.js.map +1 -0
- package/countdown-timer/countdown-timer.js.map +1 -1
- package/countdown-timer/types.d.ts +6 -6
- 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.d.ts +2 -1
- package/data-table/data-table.styles.js +1 -1
- package/data-table/data-table.styles.js.map +1 -1
- package/data-table/data-table.styles_rxganh.css +27 -0
- package/date-input/date-input.js.map +1 -1
- package/date-input/types.d.ts +1 -1
- package/date-navigator/date-navigator.js.map +1 -1
- package/date-navigator/types.d.ts +1 -1
- package/date-range-input/date-range-input.js.map +1 -1
- package/date-range-input/types.d.ts +2 -2
- package/divider/divider.js.map +1 -1
- package/divider/types.d.ts +1 -1
- package/docs/component-catalog.json +644 -0
- package/drawer/drawer.js.map +1 -1
- package/drawer/types.d.ts +1 -1
- package/e-signature/e-signature.js.map +1 -1
- package/e-signature/types.d.ts +1 -1
- package/error-display/error-display.js.map +1 -1
- package/external/dompurify/dist/purify.es.js +2 -2
- package/external/dompurify/dist/purify.es.js.map +1 -1
- package/external/lodash/_setCacheHas.js.map +1 -1
- package/external/lodash/lodash.js +1 -1
- package/external/lodash/lodash.js.map +1 -1
- package/feedback-rating/feedback-rating.js.map +1 -1
- package/file-download/file-download.js.map +1 -1
- package/file-download/types.d.ts +6 -1
- package/file-upload/file-item-edit.d.ts +1 -1
- package/file-upload/file-item-edit.js.map +1 -1
- package/file-upload/file-list/file-list.d.ts +1 -1
- package/file-upload/file-list/file-list.js.map +1 -1
- package/file-upload/file-list-item/file-list-item.d.ts +1 -1
- package/file-upload/file-list-item/file-list-item.js.map +1 -1
- package/file-upload/file-list-item/file-list-item.styles.js +1 -1
- package/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
- package/file-upload/file-list-item/{file-list-item.styles_o8000f.css → file-list-item.styles_kgtfke.css} +1 -1
- package/file-upload/file-upload.js.map +1 -1
- package/file-upload/types.d.ts +6 -3
- package/filter/addons/filter-item-checkbox-helpers.d.ts +2 -2
- package/filter/addons/filter-item-checkbox-helpers.js.map +1 -1
- package/filter/addons/filter-item-checkbox.d.ts +1 -1
- package/filter/addons/filter-item-checkbox.js.map +1 -1
- package/filter/addons/internal-types.d.ts +12 -0
- package/filter/addons/types.d.ts +60 -9
- package/filter/filter-item.js +1 -1
- package/filter/filter-item.js.map +1 -1
- package/filter/filter.d.ts +1 -1
- package/filter/filter.js.map +1 -1
- package/filter/index.d.ts +1 -0
- package/filter/types.d.ts +36 -72
- package/footer/footer.js.map +1 -1
- package/form/form-custom-field/form-custom-field.js +2 -0
- package/form/form-custom-field/form-custom-field.js.map +1 -0
- package/form/form-custom-field/index.d.ts +2 -0
- package/form/form-custom-field/types.d.ts +7 -0
- package/form/form-date-input/form-date-input.js +2 -0
- package/form/form-date-input/form-date-input.js.map +1 -0
- package/form/form-date-input/index.d.ts +2 -0
- package/form/form-date-input/types.d.ts +8 -0
- package/form/form-date-range-input/form-date-range-input.js +2 -0
- package/form/form-date-range-input/form-date-range-input.js.map +1 -0
- package/form/form-date-range-input/index.d.ts +2 -0
- package/form/form-date-range-input/types.d.ts +8 -0
- package/form/form-e-signature/form-e-signature.js +2 -0
- package/form/form-e-signature/form-e-signature.js.map +1 -0
- package/form/form-e-signature/index.d.ts +2 -0
- package/form/form-e-signature/types.d.ts +8 -0
- package/form/form-histogram-slider/form-histogram-slider.js +2 -0
- package/form/form-histogram-slider/form-histogram-slider.js.map +1 -0
- package/form/form-histogram-slider/index.d.ts +2 -0
- package/form/form-histogram-slider/types.d.ts +8 -0
- package/form/form-input/form-input.js +2 -0
- package/form/form-input/form-input.js.map +1 -0
- package/form/form-input/index.d.ts +2 -0
- package/form/form-input/types.d.ts +8 -0
- package/form/form-input-group/form-input-group.js +2 -0
- package/form/form-input-group/form-input-group.js.map +1 -0
- package/form/form-input-group/index.d.ts +2 -0
- package/form/form-input-group/types.d.ts +10 -0
- package/form/form-label/form-label-addon.js +2 -0
- package/form/form-label/form-label-addon.js.map +1 -0
- package/form/form-label/form-label-addon.styles.js +2 -0
- package/form/form-label/form-label-addon.styles.js.map +1 -0
- package/form/form-label/form-label-addon.styles_aztasj.css +1 -0
- package/form/form-label/form-label.js +2 -0
- package/form/form-label/form-label.js.map +1 -0
- package/form/form-label/form-label.styles.js +2 -0
- package/form/form-label/form-label.styles.js.map +1 -0
- package/form/form-label/form-label.styles_180zf7j.css +6 -0
- package/form/form-label/index.d.ts +2 -0
- package/form/form-label/types.d.ts +39 -0
- package/form/form-masked-input/form-masked-input.js +2 -0
- package/form/form-masked-input/form-masked-input.js.map +1 -0
- package/form/form-masked-input/index.d.ts +2 -0
- package/form/form-masked-input/types.d.ts +8 -0
- package/form/form-multi-select/form-multi-select.js +2 -0
- package/form/form-multi-select/form-multi-select.js.map +1 -0
- package/form/form-multi-select/index.d.ts +2 -0
- package/form/form-multi-select/types.d.ts +10 -0
- package/form/form-nested-multi-select/form-nested-multi-select.js +2 -0
- package/form/form-nested-multi-select/form-nested-multi-select.js.map +1 -0
- package/form/form-nested-multi-select/index.d.ts +2 -0
- package/form/form-nested-multi-select/types.d.ts +11 -0
- package/form/form-nested-select/form-nested-select.js +2 -0
- package/form/form-nested-select/form-nested-select.js.map +1 -0
- package/form/form-nested-select/index.d.ts +2 -0
- package/form/form-nested-select/types.d.ts +11 -0
- package/form/{form-otp-verification.d.ts → form-otp-verification/form-otp-verification.d.ts} +1 -1
- package/form/form-otp-verification/form-otp-verification.js +2 -0
- package/form/form-otp-verification/form-otp-verification.js.map +1 -0
- package/form/form-otp-verification/index.d.ts +2 -0
- package/form/form-otp-verification/types.d.ts +1 -0
- package/form/form-phone-number-input/form-phone-number-input.js +2 -0
- package/form/form-phone-number-input/form-phone-number-input.js.map +1 -0
- package/form/form-phone-number-input/index.d.ts +2 -0
- package/form/form-phone-number-input/types.d.ts +8 -0
- package/form/form-predictive-text-input/form-predictive-text-input.js +2 -0
- package/form/form-predictive-text-input/form-predictive-text-input.js.map +1 -0
- package/form/form-predictive-text-input/index.d.ts +2 -0
- package/form/form-predictive-text-input/types.d.ts +10 -0
- package/form/form-range-select/form-range-select.js +2 -0
- package/form/form-range-select/form-range-select.js.map +1 -0
- package/form/form-range-select/index.d.ts +2 -0
- package/form/form-range-select/types.d.ts +10 -0
- package/form/form-range-slider/form-range-slider.js +2 -0
- package/form/form-range-slider/form-range-slider.js.map +1 -0
- package/form/form-range-slider/index.d.ts +2 -0
- package/form/form-range-slider/types.d.ts +8 -0
- package/form/form-select/form-select.js +2 -0
- package/form/form-select/form-select.js.map +1 -0
- package/form/form-select/index.d.ts +2 -0
- package/form/form-select/types.d.ts +10 -0
- package/form/form-select-histogram/form-select-histogram.js +2 -0
- package/form/form-select-histogram/form-select-histogram.js.map +1 -0
- package/form/form-select-histogram/index.d.ts +2 -0
- package/form/form-select-histogram/types.d.ts +8 -0
- package/form/form-slider/form-slider.js +2 -0
- package/form/form-slider/form-slider.js.map +1 -0
- package/form/form-slider/index.d.ts +2 -0
- package/form/form-slider/types.d.ts +8 -0
- package/form/form-textarea/form-textarea.js +2 -0
- package/form/form-textarea/form-textarea.js.map +1 -0
- package/form/form-textarea/form-textarea.styles.js +2 -0
- package/form/form-textarea/form-textarea.styles.js.map +1 -0
- package/form/form-textarea/form-textarea.styles_1kneyif.css +3 -0
- package/form/form-textarea/index.d.ts +2 -0
- package/form/form-textarea/types.d.ts +8 -0
- package/form/form-time-range-picker/form-time-range-picker.js +2 -0
- package/form/form-time-range-picker/form-time-range-picker.js.map +1 -0
- package/form/form-time-range-picker/index.d.ts +2 -0
- package/form/form-time-range-picker/types.d.ts +8 -0
- package/form/form-timepicker/form-timepicker.js +2 -0
- package/form/form-timepicker/form-timepicker.js.map +1 -0
- package/form/form-timepicker/index.d.ts +2 -0
- package/form/form-timepicker/types.d.ts +8 -0
- package/form/form-unit-number-input/form-unit-number-input.js +2 -0
- package/form/form-unit-number-input/form-unit-number-input.js.map +1 -0
- package/form/form-unit-number-input/index.d.ts +2 -0
- package/form/form-unit-number-input/types.d.ts +8 -0
- package/form/form-wrapper.js +1 -1
- package/form/form-wrapper.js.map +1 -1
- package/form/index.d.ts +104 -24
- package/form/index.js +1 -1
- package/form/index.js.map +1 -1
- package/form/types.d.ts +27 -85
- package/fullscreen-image-carousel/fullscreen-image-carousel.d.ts +7 -0
- package/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
- package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
- package/fullscreen-image-carousel/types.d.ts +91 -3
- package/histogram-slider/histogram-slider.d.ts +6 -0
- package/histogram-slider/histogram-slider.js.map +1 -1
- package/histogram-slider/types.d.ts +63 -3
- package/image-button/image-button.d.ts +6 -0
- package/image-button/image-button.js.map +1 -1
- package/image-button/types.d.ts +11 -1
- package/index.js +1 -1
- package/input/input.d.ts +6 -0
- package/input/input.js.map +1 -1
- package/input/types.d.ts +38 -2
- package/input-group/input-group.d.ts +7 -0
- package/input-group/input-group.js.map +1 -1
- package/input-group/types.d.ts +84 -8
- package/input-multi-select/input-multi-select.d.ts +6 -0
- package/input-multi-select/input-multi-select.js.map +1 -1
- package/input-multi-select/types.d.ts +46 -5
- package/input-nested-multi-select/input-nested-multi-select.d.ts +8 -0
- package/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
- package/input-nested-multi-select/types.d.ts +35 -5
- package/input-nested-select/input-nested-select.d.ts +9 -2
- package/input-nested-select/input-nested-select.js.map +1 -1
- package/input-nested-select/types.d.ts +77 -8
- package/input-range-select/input-range-select.d.ts +6 -0
- package/input-range-select/input-range-select.js.map +1 -1
- package/input-range-select/types.d.ts +68 -1
- package/input-range-slider/input-range-slider.d.ts +7 -0
- package/input-range-slider/input-range-slider.js.map +1 -1
- package/input-range-slider/types.d.ts +91 -6
- package/input-select/input-select.d.ts +5 -0
- package/input-select/input-select.js.map +1 -1
- package/input-select/types.d.ts +70 -14
- package/input-slider/input-slider.d.ts +6 -0
- package/input-slider/input-slider.js.map +1 -1
- package/input-slider/types.d.ts +21 -2
- package/input-textarea/textarea.d.ts +3 -0
- package/input-textarea/textarea.js.map +1 -1
- package/input-textarea/textarea.styles.js +1 -1
- package/input-textarea/textarea.styles.js.map +1 -1
- package/input-textarea/{textarea.styles_22z4n3.css → textarea.styles_q77m5x.css} +1 -1
- package/input-textarea/types.d.ts +24 -1
- package/language-switcher/language-switcher.d.ts +6 -0
- package/language-switcher/language-switcher.js.map +1 -1
- package/language-switcher/types.d.ts +23 -0
- package/layout/index.d.ts +16 -2
- package/layout/index.js +1 -1
- package/layout/index.js.map +1 -1
- package/layout/types.d.ts +61 -3
- package/link-list/components/common.d.ts +1 -1
- package/link-list/components/common.js.map +1 -1
- package/link-list/components/link-list-eager.d.ts +2 -2
- package/link-list/components/link-list-eager.js.map +1 -1
- package/link-list/components/link-list-lazy.d.ts +2 -2
- package/link-list/components/link-list-lazy.js.map +1 -1
- package/link-list/link-list.d.ts +6 -0
- package/link-list/link-list.js.map +1 -1
- package/link-list/types.d.ts +92 -3
- package/local-nav/local-nav-dropdown/local-nav-dropdown.d.ts +11 -0
- package/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
- package/local-nav/local-nav-menu/local-nav-menu.d.ts +6 -0
- package/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
- package/local-nav/types.d.ts +51 -0
- package/markup/markup.d.ts +6 -0
- package/markup/markup.js.map +1 -1
- package/markup/types.d.ts +6 -2
- package/masked-input/masked-input.d.ts +6 -0
- package/masked-input/masked-input.js.map +1 -1
- package/masked-input/types.d.ts +83 -8
- package/masthead/masthead.d.ts +6 -0
- package/masthead/masthead.js.map +1 -1
- package/masthead/types.d.ts +9 -0
- package/menu/menu.d.ts +27 -4
- package/menu/menu.js +1 -1
- package/menu/menu.js.map +1 -1
- package/menu/types.d.ts +49 -1
- package/modal/index.d.ts +13 -0
- package/modal/index.js.map +1 -1
- package/modal/modal-box.js +1 -1
- package/modal/modal-box.js.map +1 -1
- package/modal/types.d.ts +56 -7
- package/modal-v2/index.d.ts +1 -15
- package/modal-v2/index.js +1 -1
- package/modal-v2/index.js.map +1 -1
- package/modal-v2/modal-v2.d.ts +32 -1
- package/modal-v2/modal-v2.js +1 -1
- package/modal-v2/modal-v2.js.map +1 -1
- package/modal-v2/slots/card.js +1 -1
- package/modal-v2/slots/card.js.map +1 -1
- package/modal-v2/types.d.ts +92 -8
- package/navbar/navbar.d.ts +7 -0
- package/navbar/navbar.js.map +1 -1
- package/navbar/types.d.ts +201 -13
- package/notification-banner/notification-banner-hoc.d.ts +6 -0
- package/notification-banner/notification-banner-hoc.js.map +1 -1
- package/notification-banner/notification-banner.d.ts +7 -0
- package/notification-banner/notification-banner.js.map +1 -1
- package/notification-banner/types.d.ts +57 -2
- package/otp-input/otp-input.d.ts +7 -0
- package/otp-input/otp-input.js +1 -1
- package/otp-input/otp-input.js.map +1 -1
- package/otp-input/types.d.ts +63 -15
- package/otp-verification/contact-input-section.js +1 -1
- package/otp-verification/contact-input-section.js.map +1 -1
- package/otp-verification/internal-types.d.ts +22 -5
- package/otp-verification/otp-verification.d.ts +6 -0
- package/otp-verification/otp-verification.js.map +1 -1
- package/otp-verification/types.d.ts +125 -6
- package/otp-verification/verification-section.js +1 -1
- package/otp-verification/verification-section.js.map +1 -1
- package/overlay/overlay.d.ts +7 -0
- package/overlay/overlay.js.map +1 -1
- package/overlay/types.d.ts +57 -2
- package/package.json +1 -1
- package/pagination/pagination.d.ts +5 -0
- package/pagination/pagination.js.map +1 -1
- package/pagination/types.d.ts +48 -0
- package/phone-number-input/phone-number-input.d.ts +7 -0
- package/phone-number-input/phone-number-input.js.map +1 -1
- package/phone-number-input/types.d.ts +78 -13
- package/pill/pill.d.ts +6 -0
- package/pill/pill.js.map +1 -1
- package/pill/types.d.ts +19 -0
- package/popover/popover-inline/index.d.ts +1 -0
- package/popover/popover-inline/popover-inline.d.ts +6 -1
- package/popover/popover-inline/popover-inline.js.map +1 -1
- package/popover/popover-inline/types.d.ts +36 -0
- package/popover/popover-trigger.d.ts +6 -0
- package/popover/popover-trigger.js.map +1 -1
- package/popover/popover.d.ts +6 -0
- package/popover/popover.js +1 -1
- package/popover/popover.js.map +1 -1
- package/popover/types.d.ts +125 -11
- package/predictive-text-input/predictive-text-input.d.ts +6 -0
- package/predictive-text-input/predictive-text-input.js +1 -1
- package/predictive-text-input/predictive-text-input.js.map +1 -1
- package/predictive-text-input/types.d.ts +65 -11
- package/progress-indicator/progress-indicator.d.ts +7 -0
- package/progress-indicator/progress-indicator.js.map +1 -1
- package/progress-indicator/types.d.ts +18 -0
- package/radio-button/radio-button.d.ts +5 -0
- package/radio-button/radio-button.js.map +1 -1
- package/radio-button/types.d.ts +14 -0
- package/schedule/internal-types.d.ts +18 -0
- package/schedule/schedule-day-view/types.d.ts +2 -1
- package/schedule/schedule-week-view/types.d.ts +2 -1
- package/schedule/schedule.d.ts +3 -0
- package/schedule/schedule.js.map +1 -1
- package/schedule/shared/with-optional-popover.js +1 -1
- package/schedule/shared/with-optional-popover.js.map +1 -1
- package/schedule/types.d.ts +129 -10
- package/select-histogram/select-histogram.d.ts +5 -0
- package/select-histogram/select-histogram.js.map +1 -1
- package/select-histogram/types.d.ts +57 -4
- package/shared/dropdown-list/dropdown-list.js +1 -1
- package/shared/dropdown-list/dropdown-list.js.map +1 -1
- package/shared/dropdown-list/types.d.ts +52 -19
- package/shared/dropdown-wrapper/element-with-dropdown.d.ts +5 -4
- package/shared/dropdown-wrapper/element-with-dropdown.js +1 -1
- package/shared/dropdown-wrapper/element-with-dropdown.js.map +1 -1
- package/shared/dropdown-wrapper/types.d.ts +6 -0
- package/sidenav/sidenav.d.ts +10 -0
- package/sidenav/sidenav.js.map +1 -1
- package/sidenav/types.d.ts +71 -21
- package/singpass-button/singpass-button.d.ts +6 -0
- package/singpass-button/singpass-button.js.map +1 -1
- package/singpass-button/types.d.ts +29 -2
- package/smart-app-banner/smart-app-banner.d.ts +5 -0
- package/smart-app-banner/smart-app-banner.js.map +1 -1
- package/smart-app-banner/types.d.ts +56 -0
- package/tab/tab.d.ts +7 -0
- package/tab/tab.js.map +1 -1
- package/tab/types.d.ts +55 -6
- package/table/table.d.ts +30 -8
- package/table/table.js.map +1 -1
- package/table/table.styles.js +1 -1
- package/table/table.styles.js.map +1 -1
- package/table/{table.styles_1af5ipv.css → table.styles_1vjx31g.css} +1 -1
- package/table/types.d.ts +35 -0
- package/tag/tag.d.ts +5 -0
- package/tag/tag.js.map +1 -1
- package/tag/types.d.ts +24 -0
- package/text-list/index.d.ts +17 -0
- package/text-list/index.js.map +1 -1
- package/text-list/types.d.ts +33 -4
- package/theme/theme-provider/breakpoint.d.ts +0 -1
- package/theme/theme-provider/breakpoint.js +1 -1
- package/theme/theme-provider/breakpoint.js.map +1 -1
- package/theme/theme-provider/hooks.d.ts +16 -0
- package/theme/theme-provider/hooks.js.map +1 -1
- package/theme/theme-provider/index.d.ts +7 -0
- package/theme/theme-provider/index.js.map +1 -1
- package/theme/theme-provider/types.d.ts +14 -0
- package/theme/tokens/border.d.ts +9 -0
- package/theme/tokens/border.js.map +1 -1
- package/theme/tokens/breakpoint.d.ts +3 -0
- package/theme/tokens/breakpoint.js.map +1 -1
- package/theme/tokens/colour.d.ts +9 -0
- package/theme/tokens/colour.js.map +1 -1
- package/theme/tokens/component.d.ts +3 -0
- package/theme/tokens/component.js.map +1 -1
- package/theme/tokens/font.d.ts +6 -0
- package/theme/tokens/font.js.map +1 -1
- package/theme/tokens/media-query.d.ts +3 -0
- package/theme/tokens/media-query.js.map +1 -1
- package/theme/tokens/motion.d.ts +3 -0
- package/theme/tokens/motion.js.map +1 -1
- package/theme/tokens/radius.d.ts +3 -0
- package/theme/tokens/radius.js.map +1 -1
- package/theme/tokens/shadow.d.ts +3 -0
- package/theme/tokens/shadow.js.map +1 -1
- package/theme/tokens/spacing.d.ts +3 -0
- package/theme/tokens/spacing.js.map +1 -1
- package/theme/types.d.ts +23 -3
- package/theme/types.js.map +1 -1
- package/theme/utils/css-variable.d.ts +10 -2
- package/theme/utils/css-variable.js.map +1 -1
- package/theme/utils/font.d.ts +2 -1
- package/theme/utils/font.js.map +1 -1
- package/theme/utils/use-apply-styles.d.ts +8 -2
- package/theme/utils/use-apply-styles.js +1 -1
- package/theme/utils/use-apply-styles.js.map +1 -1
- package/theme/utils/use-design-token-override.d.ts +9 -1
- package/theme/utils/use-design-token-override.js.map +1 -1
- package/theme/utils/use-design-token.d.ts +9 -0
- package/theme/utils/use-design-token.js.map +1 -1
- package/theme/utils/use-media-query.d.ts +41 -3
- package/theme/utils/use-media-query.js.map +1 -1
- package/time-range-picker/combobox-picker/combobox-picker.js +1 -1
- package/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
- package/time-range-picker/common.styles.d.ts +1 -0
- package/time-range-picker/common.styles.js +1 -1
- package/time-range-picker/common.styles.js.map +1 -1
- package/time-range-picker/{common.styles_1qwp4xa.css → common.styles_cnkkax.css} +2 -1
- package/time-range-picker/dial-picker/dial-picker.js +1 -1
- package/time-range-picker/dial-picker/dial-picker.js.map +1 -1
- package/time-range-picker/time-range-picker.d.ts +5 -0
- package/time-range-picker/time-range-picker.js.map +1 -1
- package/time-range-picker/types.d.ts +85 -25
- package/time-slot-bar/internal-types.d.ts +1 -0
- package/time-slot-bar/time-slot-bar.d.ts +7 -0
- package/time-slot-bar/time-slot-bar.js.map +1 -1
- package/time-slot-bar/types.d.ts +116 -20
- package/time-slot-bar-week/time-slot-bar-week.d.ts +8 -0
- package/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
- package/time-slot-bar-week/types.d.ts +80 -13
- package/time-slot-week-view/time-slot-week-view.d.ts +7 -0
- package/time-slot-week-view/time-slot-week-view.js.map +1 -1
- package/time-slot-week-view/types.d.ts +55 -10
- package/timeline/timeline.d.ts +6 -0
- package/timeline/timeline.js.map +1 -1
- package/timeline/types.d.ts +58 -4
- package/timepicker/timepicker.d.ts +5 -0
- package/timepicker/timepicker.js +1 -1
- package/timepicker/timepicker.js.map +1 -1
- package/timepicker/timepicker.styles.d.ts +1 -0
- package/timepicker/timepicker.styles.js +1 -1
- package/timepicker/timepicker.styles.js.map +1 -1
- package/timepicker/timepicker.styles_lyizvq.css +2 -0
- package/timepicker/types.d.ts +49 -14
- package/timetable/timetable-row/with-optional-popover.js +1 -1
- package/timetable/timetable-row/with-optional-popover.js.map +1 -1
- package/timetable/timetable.d.ts +6 -0
- package/timetable/timetable.js +1 -1
- package/timetable/timetable.js.map +1 -1
- package/timetable/types.d.ts +175 -50
- package/toast/toast.d.ts +6 -0
- package/toast/toast.js.map +1 -1
- package/toast/types.d.ts +44 -8
- package/toggle/toggle.d.ts +6 -0
- package/toggle/toggle.js.map +1 -1
- package/toggle/types.d.ts +95 -17
- package/tools/shared/generated-file-formatter.d.ts +6 -0
- package/tools/shared/jsdoc-parser.d.ts +36 -0
- package/tools/shared/ts-morph-project-factory.d.ts +9 -0
- package/tools/shared/typescript-source-provider.d.ts +9 -0
- package/tools/storybook-argtypes/adapters/file-system-adapter.d.ts +69 -0
- package/tools/storybook-argtypes/arg-types-generator.d.ts +85 -0
- package/tools/storybook-argtypes/config/arg-types-config.d.ts +31 -0
- package/tools/storybook-argtypes/index.d.ts +11 -0
- package/tools/storybook-argtypes/services/arg-types-row-builder.d.ts +43 -0
- package/tools/storybook-argtypes/services/file-path-resolver.d.ts +118 -0
- package/tools/storybook-argtypes/services/index.d.ts +6 -0
- package/tools/storybook-argtypes/services/jsdoc-metadata-extractor.d.ts +33 -0
- package/tools/storybook-argtypes/services/story-registry-generator.d.ts +27 -0
- package/tools/storybook-argtypes/services/type-dependency-resolver.d.ts +46 -0
- package/tools/storybook-argtypes/services/type-formatting-service.d.ts +27 -0
- package/tools/storybook-argtypes/types.d.ts +102 -0
- package/typography/index.d.ts +29 -0
- package/typography/index.js.map +1 -1
- package/typography/types.d.ts +51 -8
- package/uneditable-section/index.d.ts +15 -0
- package/uneditable-section/index.js.map +1 -1
- package/uneditable-section/section-item.js +1 -1
- package/uneditable-section/section-item.js.map +1 -1
- package/uneditable-section/types.d.ts +66 -23
- package/unit-number/types.d.ts +30 -4
- package/unit-number/unit-number-input.d.ts +6 -0
- package/unit-number/unit-number-input.js.map +1 -1
- package/util/index.d.ts +1 -0
- package/util/merge-refs.d.ts +1 -1
- package/util/merge-refs.js.map +1 -1
- package/util/use-throttle.d.ts +1 -0
- package/util/use-throttle.js +2 -0
- package/util/use-throttle.js.map +1 -0
- package/cjs/data-table/data-table.styles_1iqq1g7.css +0 -26
- package/cjs/form/form-custom-field.js +0 -2
- package/cjs/form/form-custom-field.js.map +0 -1
- package/cjs/form/form-date-input.js +0 -2
- package/cjs/form/form-date-input.js.map +0 -1
- package/cjs/form/form-date-range-input.js +0 -2
- package/cjs/form/form-date-range-input.js.map +0 -1
- package/cjs/form/form-e-signature.js +0 -2
- package/cjs/form/form-e-signature.js.map +0 -1
- package/cjs/form/form-histogram.js +0 -2
- package/cjs/form/form-histogram.js.map +0 -1
- package/cjs/form/form-input-group.js +0 -2
- package/cjs/form/form-input-group.js.map +0 -1
- package/cjs/form/form-input.js +0 -2
- package/cjs/form/form-input.js.map +0 -1
- package/cjs/form/form-label-addon.js +0 -2
- package/cjs/form/form-label-addon.js.map +0 -1
- package/cjs/form/form-label-addon.styles.js +0 -2
- package/cjs/form/form-label-addon.styles.js.map +0 -1
- package/cjs/form/form-label-addon.styles_b00z8p.css +0 -1
- package/cjs/form/form-label.js +0 -2
- package/cjs/form/form-label.js.map +0 -1
- package/cjs/form/form-label.styles.js +0 -2
- package/cjs/form/form-label.styles.js.map +0 -1
- package/cjs/form/form-label.styles_1nbe0bm.css +0 -6
- package/cjs/form/form-masked-input.js +0 -2
- package/cjs/form/form-masked-input.js.map +0 -1
- package/cjs/form/form-multi-select.js +0 -2
- package/cjs/form/form-multi-select.js.map +0 -1
- package/cjs/form/form-nested-multi-select.js +0 -2
- package/cjs/form/form-nested-multi-select.js.map +0 -1
- package/cjs/form/form-nested-select.js +0 -2
- package/cjs/form/form-nested-select.js.map +0 -1
- package/cjs/form/form-otp-verification.js +0 -2
- package/cjs/form/form-otp-verification.js.map +0 -1
- package/cjs/form/form-phone-number-input.js +0 -2
- package/cjs/form/form-phone-number-input.js.map +0 -1
- package/cjs/form/form-predictive-text-input.js +0 -2
- package/cjs/form/form-predictive-text-input.js.map +0 -1
- package/cjs/form/form-range-select.js +0 -2
- package/cjs/form/form-range-select.js.map +0 -1
- package/cjs/form/form-range-slider.js +0 -2
- package/cjs/form/form-range-slider.js.map +0 -1
- package/cjs/form/form-select-histogram.js +0 -2
- package/cjs/form/form-select-histogram.js.map +0 -1
- package/cjs/form/form-select.js +0 -2
- package/cjs/form/form-select.js.map +0 -1
- package/cjs/form/form-slider.js +0 -2
- package/cjs/form/form-slider.js.map +0 -1
- package/cjs/form/form-textarea.js +0 -2
- package/cjs/form/form-textarea.js.map +0 -1
- package/cjs/form/form-textarea.styles.js +0 -2
- package/cjs/form/form-textarea.styles.js.map +0 -1
- package/cjs/form/form-textarea.styles_3p9qoy.css +0 -3
- package/cjs/form/form-time-range-picker.js +0 -2
- package/cjs/form/form-time-range-picker.js.map +0 -1
- package/cjs/form/form-timepicker.js +0 -2
- package/cjs/form/form-timepicker.js.map +0 -1
- package/cjs/form/form-unit-number-input.js +0 -2
- package/cjs/form/form-unit-number-input.js.map +0 -1
- package/cjs/timepicker/timepicker.styles_1jm33yw.css +0 -1
- package/data-table/data-table.styles_1iqq1g7.css +0 -26
- package/form/form-custom-field.js +0 -2
- package/form/form-custom-field.js.map +0 -1
- package/form/form-date-input.js +0 -2
- package/form/form-date-input.js.map +0 -1
- package/form/form-date-range-input.js +0 -2
- package/form/form-date-range-input.js.map +0 -1
- package/form/form-e-signature.js +0 -2
- package/form/form-e-signature.js.map +0 -1
- package/form/form-histogram.js +0 -2
- package/form/form-histogram.js.map +0 -1
- package/form/form-input-group.js +0 -2
- package/form/form-input-group.js.map +0 -1
- package/form/form-input.js +0 -2
- package/form/form-input.js.map +0 -1
- package/form/form-label-addon.js +0 -2
- package/form/form-label-addon.js.map +0 -1
- package/form/form-label-addon.styles.js +0 -2
- package/form/form-label-addon.styles.js.map +0 -1
- package/form/form-label-addon.styles_b00z8p.css +0 -1
- package/form/form-label.js +0 -2
- package/form/form-label.js.map +0 -1
- package/form/form-label.styles.js +0 -2
- package/form/form-label.styles.js.map +0 -1
- package/form/form-label.styles_1nbe0bm.css +0 -6
- package/form/form-masked-input.js +0 -2
- package/form/form-masked-input.js.map +0 -1
- package/form/form-multi-select.js +0 -2
- package/form/form-multi-select.js.map +0 -1
- package/form/form-nested-multi-select.js +0 -2
- package/form/form-nested-multi-select.js.map +0 -1
- package/form/form-nested-select.js +0 -2
- package/form/form-nested-select.js.map +0 -1
- package/form/form-otp-verification.js +0 -2
- package/form/form-otp-verification.js.map +0 -1
- package/form/form-phone-number-input.js +0 -2
- package/form/form-phone-number-input.js.map +0 -1
- package/form/form-predictive-text-input.js +0 -2
- package/form/form-predictive-text-input.js.map +0 -1
- package/form/form-range-select.js +0 -2
- package/form/form-range-select.js.map +0 -1
- package/form/form-range-slider.js +0 -2
- package/form/form-range-slider.js.map +0 -1
- package/form/form-select-histogram.js +0 -2
- package/form/form-select-histogram.js.map +0 -1
- package/form/form-select.js +0 -2
- package/form/form-select.js.map +0 -1
- package/form/form-slider.js +0 -2
- package/form/form-slider.js.map +0 -1
- package/form/form-textarea.js +0 -2
- package/form/form-textarea.js.map +0 -1
- package/form/form-textarea.styles.js +0 -2
- package/form/form-textarea.styles.js.map +0 -1
- package/form/form-textarea.styles_3p9qoy.css +0 -3
- package/form/form-time-range-picker.js +0 -2
- package/form/form-time-range-picker.js.map +0 -1
- package/form/form-timepicker.js +0 -2
- package/form/form-timepicker.js.map +0 -1
- package/form/form-unit-number-input.js +0 -2
- package/form/form-unit-number-input.js.map +0 -1
- package/link-list/internal-types.d.ts +0 -31
- package/timepicker/timepicker.styles_1jm33yw.css +0 -1
- /package/{codemod-utils.d.ts → codemods/codemod-utils.d.ts} +0 -0
- /package/{migrate-popover → codemods/migrate-popover}/index.d.ts +0 -0
- /package/{run-codemod.d.ts → codemods/run-codemod.d.ts} +0 -0
- /package/form/{form-custom-field.d.ts → form-custom-field/form-custom-field.d.ts} +0 -0
- /package/form/{form-date-input.d.ts → form-date-input/form-date-input.d.ts} +0 -0
- /package/form/{form-date-range-input.d.ts → form-date-range-input/form-date-range-input.d.ts} +0 -0
- /package/form/{form-e-signature.d.ts → form-e-signature/form-e-signature.d.ts} +0 -0
- /package/form/{form-histogram.d.ts → form-histogram-slider/form-histogram-slider.d.ts} +0 -0
- /package/form/{form-input.d.ts → form-input/form-input.d.ts} +0 -0
- /package/form/{form-input-group.d.ts → form-input-group/form-input-group.d.ts} +0 -0
- /package/form/{form-label-addon.d.ts → form-label/form-label-addon.d.ts} +0 -0
- /package/form/{form-label-addon.styles.d.ts → form-label/form-label-addon.styles.d.ts} +0 -0
- /package/form/{form-label.d.ts → form-label/form-label.d.ts} +0 -0
- /package/form/{form-label.styles.d.ts → form-label/form-label.styles.d.ts} +0 -0
- /package/form/{form-masked-input.d.ts → form-masked-input/form-masked-input.d.ts} +0 -0
- /package/form/{form-multi-select.d.ts → form-multi-select/form-multi-select.d.ts} +0 -0
- /package/form/{form-nested-multi-select.d.ts → form-nested-multi-select/form-nested-multi-select.d.ts} +0 -0
- /package/form/{form-nested-select.d.ts → form-nested-select/form-nested-select.d.ts} +0 -0
- /package/form/{form-phone-number-input.d.ts → form-phone-number-input/form-phone-number-input.d.ts} +0 -0
- /package/form/{form-predictive-text-input.d.ts → form-predictive-text-input/form-predictive-text-input.d.ts} +0 -0
- /package/form/{form-range-select.d.ts → form-range-select/form-range-select.d.ts} +0 -0
- /package/form/{form-range-slider.d.ts → form-range-slider/form-range-slider.d.ts} +0 -0
- /package/form/{form-select.d.ts → form-select/form-select.d.ts} +0 -0
- /package/form/{form-select-histogram.d.ts → form-select-histogram/form-select-histogram.d.ts} +0 -0
- /package/form/{form-slider.d.ts → form-slider/form-slider.d.ts} +0 -0
- /package/form/{form-textarea.d.ts → form-textarea/form-textarea.d.ts} +0 -0
- /package/form/{form-textarea.styles.d.ts → form-textarea/form-textarea.styles.d.ts} +0 -0
- /package/form/{form-time-range-picker.d.ts → form-time-range-picker/form-time-range-picker.d.ts} +0 -0
- /package/form/{form-timepicker.d.ts → form-timepicker/form-timepicker.d.ts} +0 -0
- /package/form/{form-unit-number-input.d.ts → form-unit-number-input/form-unit-number-input.d.ts} +0 -0
|
@@ -1,19 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the `SmartAppBanner` component.
|
|
3
|
+
*/
|
|
1
4
|
export interface SmartAppBannerProps {
|
|
5
|
+
/**
|
|
6
|
+
* Controls whether the banner is visible.
|
|
7
|
+
*/
|
|
2
8
|
show: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Destination URL opened in a new tab when the banner or CTA button is clicked.
|
|
11
|
+
*/
|
|
3
12
|
href: string;
|
|
13
|
+
/**
|
|
14
|
+
* Text, labels, and rating content rendered inside the banner.
|
|
15
|
+
*/
|
|
4
16
|
content: SmartAppBannerContentProps;
|
|
17
|
+
/**
|
|
18
|
+
* Top offset in pixels applied to the banner's position.
|
|
19
|
+
*
|
|
20
|
+
* @default 0
|
|
21
|
+
*/
|
|
5
22
|
offset?: number | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* URL of the app icon image displayed in the banner.
|
|
25
|
+
*
|
|
26
|
+
* @default "https://assets.life.gov.sg/react-design-system/img/app-icon/app-icon.png"
|
|
27
|
+
*/
|
|
6
28
|
icon?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Applies a slide-in entrance animation to the banner.
|
|
31
|
+
*
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
7
34
|
animated?: boolean | undefined;
|
|
8
35
|
className?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* Called when the user clicks the dismiss button.
|
|
38
|
+
*/
|
|
9
39
|
onDismiss: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Called when the user clicks on the banner or the CTA button.
|
|
42
|
+
*/
|
|
10
43
|
onClick?: (() => void) | undefined;
|
|
11
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Text content and accessible labels rendered inside `SmartAppBanner`.
|
|
47
|
+
*/
|
|
12
48
|
export interface SmartAppBannerContentProps {
|
|
49
|
+
/**
|
|
50
|
+
* Primary heading text, typically the app name.
|
|
51
|
+
*/
|
|
13
52
|
title: string;
|
|
53
|
+
/**
|
|
54
|
+
* Label text for the CTA button.
|
|
55
|
+
*/
|
|
14
56
|
buttonLabel: string;
|
|
57
|
+
/**
|
|
58
|
+
* Alt text for the app icon image.
|
|
59
|
+
*
|
|
60
|
+
* @default ""
|
|
61
|
+
*/
|
|
15
62
|
iconAriaLabel?: string | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Accessible label for the CTA button. Falls back to `buttonLabel` when omitted.
|
|
65
|
+
*/
|
|
16
66
|
buttonAriaLabel?: string | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Secondary description text displayed beneath the title.
|
|
69
|
+
*/
|
|
17
70
|
message?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* App store rating rendered as up to 5 star icons.
|
|
73
|
+
*/
|
|
18
74
|
numberOfStars: number;
|
|
19
75
|
}
|
package/tab/tab.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { TabProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A tabbed-panel layout that switches visible content by selecting a tab link.
|
|
4
|
+
*
|
|
5
|
+
* Use `Tab` to organise content into labelled panels where only one panel is
|
|
6
|
+
* visible at a time. Compose with `Tab.Item` to define each panel.
|
|
7
|
+
*/
|
|
2
8
|
export declare const Tab: {
|
|
3
9
|
({ children, currentActive: currentActiveIndex, initialActive, onTabClick, "data-testid": testId, className, fullWidthIndicatorLine, fadeColor, ...otherProps }: TabProps): import("react/jsx-runtime").JSX.Element;
|
|
4
10
|
displayName: string;
|
|
5
11
|
} & {
|
|
12
|
+
/** Renders an individual content panel within a `Tab`. */
|
|
6
13
|
Item: {
|
|
7
14
|
({ index, children, titleAddon: _titleAddon, ...otherProps }: import("./tab-item").TabItemComponentProps): import("react/jsx-runtime").JSX.Element | null;
|
|
8
15
|
displayName: string;
|
package/tab/tab.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.js","sources":["../../src/tab/tab.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport type { ReactElement } from \"react\";\nimport { Children, cloneElement, useEffect, useMemo, useState } from \"react\";\n\nimport * as styles from \"./tab.styles\";\nimport type { TabLinkProps } from \"./tab-context\";\nimport { TabContext } from \"./tab-context\";\nimport { TabItem } from \"./tab-item\";\nimport { TabLinkChain } from \"./tab-link-chain\";\nimport type { TabItemProps, TabProps } from \"./types\";\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\nconst TabBase = ({\n children,\n currentActive: currentActiveIndex,\n initialActive = 0,\n onTabClick,\n \"data-testid\": testId,\n className,\n fullWidthIndicatorLine,\n fadeColor,\n ...otherProps\n}: TabProps) => {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const [currentActive, setCurrentActive] = useState<number>(\n currentActiveIndex || initialActive\n );\n\n const tabLinks = useMemo(() => {\n const validChildren = Children.toArray(children).filter(\n Boolean\n ) as ReactElement<TabItemProps>[];\n\n return validChildren.map((child) => {\n return {\n title: child.props.title,\n width: child.props.width,\n titleAddon: child.props.titleAddon,\n };\n }) as TabLinkProps[];\n }, [children]);\n\n const tabContextValue = useMemo(\n () => ({\n tabLinks,\n currentActiveIndex: currentActive,\n setCurrentActiveIndex: setCurrentActive,\n }),\n [currentActive, tabLinks]\n );\n\n // =========================================================================\n // Effects\n // =========================================================================\n useEffect(() => {\n if (typeof currentActiveIndex === \"number\") {\n setCurrentActive(currentActiveIndex);\n }\n }, [currentActiveIndex]);\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderChildren = () => {\n const validChildren = Children.toArray(children).filter(Boolean);\n\n return validChildren.map((child, index) => {\n const element = child as ReactElement<TabItemProps>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return cloneElement(child as ReactElement<any>, {\n key: element.key ?? element.props.title,\n index,\n });\n });\n };\n\n return (\n <div\n data-testid={testId}\n className={clsx(styles.wrapper, className)}\n {...otherProps}\n >\n <TabContext.Provider value={tabContextValue}>\n <TabLinkChain\n controlledMode={typeof currentActiveIndex === \"number\"}\n onTabClick={onTabClick}\n data-testid={`${testId}-tabs`}\n fullWidthIndicatorLine={fullWidthIndicatorLine}\n fadeColor={fadeColor}\n />\n {renderChildren()}\n </TabContext.Provider>\n </div>\n );\n};\n\nTabBase.displayName = \"Tab\";\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\nexport const Tab = Object.assign(TabBase, {\n Item: TabItem,\n});\n"],"names":["TabBase","_a","children","currentActive","currentActiveIndex","initialActive","onTabClick","testId","className","fullWidthIndicatorLine","fadeColor","otherProps","__rest","setCurrentActive","useState","tabLinks","useMemo","Children","toArray","filter","Boolean","map","child","title","props","width","titleAddon","tabContextValue","setCurrentActiveIndex","useEffect","_jsx","Object","assign","clsx","styles.wrapper","_jsxs","TabContext","Provider","value","TabLinkChain","controlledMode","index","element","cloneElement","key","displayName","Tab","Item","TabItem"],"mappings":"qYAcA,MAAMA,EAAWC,QAAAC,SACbA,EACAC,cAAeC,EAAkBC,cACjCA,EAAgB,EAACC,WACjBA,EACA,cAAeC,EAAMC,UACrBA,EAASC,uBACTA,EAAsBC,UACtBA,GAAST,EACNU,EAAUC,EAAAX,EATA,CAAA,WAAA,gBAAA,gBAAA,aAAA,cAAA,YAAA,yBAAA,cAcb,MAAOE,EAAeU,GAAoBC,EACtCV,GAAsBC,GAGpBU,EAAWC,GAAQ,IACCC,EAASC,QAAQhB,GAAUiB,OAC7CC,SAGiBC,KAAKC,IACf,CACHC,MAAOD,EAAME,MAAMD,MACnBE,MAAOH,EAAME,MAAMC,MACnBC,WAAYJ,EAAME,MAAME,gBAGjC,CAACxB,IAEEyB,EAAkBX,GACpB,KAAA,CACID,WACAX,mBAAoBD,EACpByB,sBAAuBf,KAE3B,CAACV,EAAeY,IAMpBc,GAAU,KAC4B,iBAAvBzB,GACPS,EAAiBT,EACrB,GACD,CAACA,IAmBJ,OACI0B,EAAA,MAAAC,OAAAC,OAAA,CAAA,cACiBzB,EACbC,UAAWyB,EAAKC,EAAgB1B,IAC5BG,EAAU,CAAAT,SAEdiC,EAACC,EAAWC,SAAQ,CAACC,MAAOX,EAAezB,SAAA,CACvC4B,EAACS,EAAY,CACTC,eAA8C,iBAAvBpC,EACvBE,WAAYA,EAAU,cACT,GAAGC,SAChBE,uBAAwBA,EACxBC,UAAWA,IAzBDO,EAASC,QAAQhB,GAAUiB,OAAOC,SAEnCC,KAAI,CAACC,EAAOmB,WAC7B,MAAMC,EAAUpB,EAGhB,OAAOqB,EAAarB,EAA4B,CAC5CsB,YAAK3C,EAAAyC,EAAQE,mBAAOF,EAAQlB,MAAMD,MAClCkB,SACF,SAoBA,EAIdzC,EAAQ6C,YAAc,
|
|
1
|
+
{"version":3,"file":"tab.js","sources":["../../src/tab/tab.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport type { ReactElement } from \"react\";\nimport { Children, cloneElement, useEffect, useMemo, useState } from \"react\";\n\nimport * as styles from \"./tab.styles\";\nimport type { TabLinkProps } from \"./tab-context\";\nimport { TabContext } from \"./tab-context\";\nimport { TabItem } from \"./tab-item\";\nimport { TabLinkChain } from \"./tab-link-chain\";\nimport type { TabItemProps, TabProps } from \"./types\";\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\nconst TabBase = ({\n children,\n currentActive: currentActiveIndex,\n initialActive = 0,\n onTabClick,\n \"data-testid\": testId,\n className,\n fullWidthIndicatorLine,\n fadeColor,\n ...otherProps\n}: TabProps) => {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const [currentActive, setCurrentActive] = useState<number>(\n currentActiveIndex || initialActive\n );\n\n const tabLinks = useMemo(() => {\n const validChildren = Children.toArray(children).filter(\n Boolean\n ) as ReactElement<TabItemProps>[];\n\n return validChildren.map((child) => {\n return {\n title: child.props.title,\n width: child.props.width,\n titleAddon: child.props.titleAddon,\n };\n }) as TabLinkProps[];\n }, [children]);\n\n const tabContextValue = useMemo(\n () => ({\n tabLinks,\n currentActiveIndex: currentActive,\n setCurrentActiveIndex: setCurrentActive,\n }),\n [currentActive, tabLinks]\n );\n\n // =========================================================================\n // Effects\n // =========================================================================\n useEffect(() => {\n if (typeof currentActiveIndex === \"number\") {\n setCurrentActive(currentActiveIndex);\n }\n }, [currentActiveIndex]);\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderChildren = () => {\n const validChildren = Children.toArray(children).filter(Boolean);\n\n return validChildren.map((child, index) => {\n const element = child as ReactElement<TabItemProps>;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return cloneElement(child as ReactElement<any>, {\n key: element.key ?? element.props.title,\n index,\n });\n });\n };\n\n return (\n <div\n data-testid={testId}\n className={clsx(styles.wrapper, className)}\n {...otherProps}\n >\n <TabContext.Provider value={tabContextValue}>\n <TabLinkChain\n controlledMode={typeof currentActiveIndex === \"number\"}\n onTabClick={onTabClick}\n data-testid={`${testId}-tabs`}\n fullWidthIndicatorLine={fullWidthIndicatorLine}\n fadeColor={fadeColor}\n />\n {renderChildren()}\n </TabContext.Provider>\n </div>\n );\n};\n\nTabBase.displayName = \"Tab\";\n\n// =============================================================================\n// EXPORTS\n// =============================================================================\n// @catalog\n/**\n * A tabbed-panel layout that switches visible content by selecting a tab link.\n *\n * Use `Tab` to organise content into labelled panels where only one panel is\n * visible at a time. Compose with `Tab.Item` to define each panel.\n */\nexport const Tab = Object.assign(TabBase, {\n /** Renders an individual content panel within a `Tab`. */\n Item: TabItem,\n});\n"],"names":["TabBase","_a","children","currentActive","currentActiveIndex","initialActive","onTabClick","testId","className","fullWidthIndicatorLine","fadeColor","otherProps","__rest","setCurrentActive","useState","tabLinks","useMemo","Children","toArray","filter","Boolean","map","child","title","props","width","titleAddon","tabContextValue","setCurrentActiveIndex","useEffect","_jsx","Object","assign","clsx","styles.wrapper","_jsxs","TabContext","Provider","value","TabLinkChain","controlledMode","index","element","cloneElement","key","displayName","Tab","Item","TabItem"],"mappings":"qYAcA,MAAMA,EAAWC,QAAAC,SACbA,EACAC,cAAeC,EAAkBC,cACjCA,EAAgB,EAACC,WACjBA,EACA,cAAeC,EAAMC,UACrBA,EAASC,uBACTA,EAAsBC,UACtBA,GAAST,EACNU,EAAUC,EAAAX,EATA,CAAA,WAAA,gBAAA,gBAAA,aAAA,cAAA,YAAA,yBAAA,cAcb,MAAOE,EAAeU,GAAoBC,EACtCV,GAAsBC,GAGpBU,EAAWC,GAAQ,IACCC,EAASC,QAAQhB,GAAUiB,OAC7CC,SAGiBC,KAAKC,IACf,CACHC,MAAOD,EAAME,MAAMD,MACnBE,MAAOH,EAAME,MAAMC,MACnBC,WAAYJ,EAAME,MAAME,gBAGjC,CAACxB,IAEEyB,EAAkBX,GACpB,KAAA,CACID,WACAX,mBAAoBD,EACpByB,sBAAuBf,KAE3B,CAACV,EAAeY,IAMpBc,GAAU,KAC4B,iBAAvBzB,GACPS,EAAiBT,EACrB,GACD,CAACA,IAmBJ,OACI0B,EAAA,MAAAC,OAAAC,OAAA,CAAA,cACiBzB,EACbC,UAAWyB,EAAKC,EAAgB1B,IAC5BG,EAAU,CAAAT,SAEdiC,EAACC,EAAWC,SAAQ,CAACC,MAAOX,EAAezB,SAAA,CACvC4B,EAACS,EAAY,CACTC,eAA8C,iBAAvBpC,EACvBE,WAAYA,EAAU,cACT,GAAGC,SAChBE,uBAAwBA,EACxBC,UAAWA,IAzBDO,EAASC,QAAQhB,GAAUiB,OAAOC,SAEnCC,KAAI,CAACC,EAAOmB,WAC7B,MAAMC,EAAUpB,EAGhB,OAAOqB,EAAarB,EAA4B,CAC5CsB,YAAK3C,EAAAyC,EAAQE,mBAAOF,EAAQlB,MAAMD,MAClCkB,SACF,SAoBA,EAIdzC,EAAQ6C,YAAc,YAYTC,EAAMf,OAAOC,OAAOhC,EAAS,CAEtC+C,KAAMC"}
|
package/tab/types.d.ts
CHANGED
|
@@ -1,33 +1,82 @@
|
|
|
1
1
|
import type { FadeColorSet } from "../shared/fade-wrapper";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the `Tab` component.
|
|
4
|
+
*/
|
|
2
5
|
export interface TabProps {
|
|
3
6
|
children: JSX.Element | JSX.Element[];
|
|
4
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Zero-based index of the tab panel displayed on first render.
|
|
9
|
+
*
|
|
10
|
+
* Ignored when `currentActive` is provided.
|
|
11
|
+
*
|
|
12
|
+
* @default 0
|
|
13
|
+
*/
|
|
5
14
|
initialActive?: number | undefined;
|
|
6
15
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
16
|
+
* Zero-based index of the currently active tab panel.
|
|
17
|
+
*
|
|
18
|
+
* When provided, the component operates in controlled mode — the caller is
|
|
19
|
+
* responsible for updating this value in response to `onTabClick` to
|
|
20
|
+
* reflect tab changes.
|
|
9
21
|
*/
|
|
10
22
|
currentActive?: number;
|
|
11
23
|
className?: string | undefined;
|
|
12
24
|
id?: string | undefined;
|
|
13
25
|
"data-testid"?: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Called when the user clicks a tab link.
|
|
28
|
+
*
|
|
29
|
+
* @param title The `title` of the clicked `Tab.Item`.
|
|
30
|
+
* @param index The zero-based index of the clicked `Tab.Item`.
|
|
31
|
+
*/
|
|
14
32
|
onTabClick?: ((title: string, index: number) => void) | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Extends all tab indicator lines to the full width
|
|
35
|
+
* of the tab bar instead of matching only the tab link width.
|
|
36
|
+
*
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
15
39
|
fullWidthIndicatorLine?: boolean | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Background color(s) used for the fade overlays at the edges of the
|
|
42
|
+
* scrollable tab link bar.
|
|
43
|
+
*
|
|
44
|
+
* Pass a `string[]` to apply the same gradient stop colors on both edges,
|
|
45
|
+
* or a `FadeColorSet` to specify left and right edges independently.
|
|
46
|
+
*/
|
|
16
47
|
fadeColor?: string[] | FadeColorSet | undefined;
|
|
17
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* Props for the `Tab.Item` sub-component.
|
|
51
|
+
*/
|
|
18
52
|
export interface TabItemProps {
|
|
53
|
+
/**
|
|
54
|
+
* Text label rendered in the tab link bar for this panel.
|
|
55
|
+
*/
|
|
19
56
|
title: string;
|
|
20
57
|
children: JSX.Element | JSX.Element[];
|
|
21
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* Optional addon element rendered alongside the tab title in the link bar.
|
|
60
|
+
*/
|
|
22
61
|
titleAddon?: TitleAddonProps | undefined;
|
|
23
62
|
className?: string | undefined;
|
|
24
63
|
id?: string | undefined;
|
|
25
64
|
"data-testid"?: string | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Explicit width for this tab link in the tab bar. Accepts any valid CSS width value.
|
|
67
|
+
*/
|
|
26
68
|
width?: string | undefined;
|
|
27
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* Configuration for the optional addon element displayed next to a tab title.
|
|
72
|
+
*/
|
|
28
73
|
export interface TitleAddonProps {
|
|
29
|
-
/** addon
|
|
74
|
+
/** The element rendered as the addon. */
|
|
30
75
|
content: JSX.Element;
|
|
31
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Which side of the tab title the addon appears on.
|
|
78
|
+
*
|
|
79
|
+
* @default "right"
|
|
80
|
+
*/
|
|
32
81
|
position?: "left" | "right" | undefined;
|
|
33
82
|
}
|
package/table/table.d.ts
CHANGED
|
@@ -1,30 +1,52 @@
|
|
|
1
|
-
|
|
1
|
+
import type { TableBodyProps, TableCellProps, TableContainerProps, TableHeaderProps, TableHeadProps, TableRowProps, TableTableProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A styled HTML table with a scrollable container wrapper.
|
|
4
|
+
*
|
|
5
|
+
* Use `Table` when displaying structured tabular data. The default export
|
|
6
|
+
* wraps content in `Table.Container` and `Table.Table` automatically. For
|
|
7
|
+
* full layout control, compose the sub-components directly:
|
|
8
|
+
* - `Table.Container` — scrollable wrapper div
|
|
9
|
+
* - `Table.Table` — the bare `<table>` element
|
|
10
|
+
* - `Table.Head` — the `<thead>` section
|
|
11
|
+
* - `Table.Body` — the `<tbody>` section
|
|
12
|
+
* - `Table.Row` — a `<tr>` row within the body
|
|
13
|
+
* - `Table.Cell` — a `<td>` data cell
|
|
14
|
+
* - `Table.HeaderCell` — a `<th>` column header cell
|
|
15
|
+
*/
|
|
16
|
+
export declare const Table: (({ children, ...props }: TableTableProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
17
|
+
/** Scrollable wrapper div that contains a `Table.Table`. */
|
|
2
18
|
Container: {
|
|
3
|
-
({ children, className, ...props }:
|
|
19
|
+
({ children, className, ...props }: TableContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
20
|
displayName: string;
|
|
5
21
|
};
|
|
22
|
+
/** The bare `<table>` element. Use directly when you need to place the table inside a custom container. */
|
|
6
23
|
Table: {
|
|
7
|
-
({ children, className, ...props }:
|
|
24
|
+
({ children, className, ...props }: TableTableProps): import("react/jsx-runtime").JSX.Element;
|
|
8
25
|
displayName: string;
|
|
9
26
|
};
|
|
27
|
+
/** Renders the `<thead>` section of the table. */
|
|
10
28
|
Head: {
|
|
11
|
-
({ children, ...props }:
|
|
29
|
+
({ children, ...props }: TableHeadProps): import("react/jsx-runtime").JSX.Element;
|
|
12
30
|
displayName: string;
|
|
13
31
|
};
|
|
32
|
+
/** Renders the `<tbody>` section of the table. */
|
|
14
33
|
Body: {
|
|
15
|
-
({ children, className, ...props }:
|
|
34
|
+
({ children, className, ...props }: TableBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
16
35
|
displayName: string;
|
|
17
36
|
};
|
|
37
|
+
/** Renders a `<tr>` row within a `Table.Body`. */
|
|
18
38
|
Row: {
|
|
19
|
-
({ children, className, ...props }:
|
|
39
|
+
({ children, className, ...props }: TableRowProps): import("react/jsx-runtime").JSX.Element;
|
|
20
40
|
displayName: string;
|
|
21
41
|
};
|
|
42
|
+
/** Renders a `<td>` data cell within a `Table.Row`. */
|
|
22
43
|
Cell: {
|
|
23
|
-
({ children, className, ...props }:
|
|
44
|
+
({ children, className, ...props }: TableCellProps): import("react/jsx-runtime").JSX.Element;
|
|
24
45
|
displayName: string;
|
|
25
46
|
};
|
|
47
|
+
/** Renders a `<th>` header cell within a `Table.Head` row. */
|
|
26
48
|
HeaderCell: {
|
|
27
|
-
({ children, className, ...props }:
|
|
49
|
+
({ children, className, ...props }: TableHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
28
50
|
displayName: string;
|
|
29
51
|
};
|
|
30
52
|
};
|
package/table/table.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.js","sources":["../../src/table/table.tsx"],"sourcesContent":["import clsx from \"clsx\";\n\nimport * as styles from \"./table.styles\";\n\nconst Head = ({
|
|
1
|
+
{"version":3,"file":"table.js","sources":["../../src/table/table.tsx"],"sourcesContent":["import clsx from \"clsx\";\n\nimport * as styles from \"./table.styles\";\nimport type {\n TableBodyProps,\n TableCellProps,\n TableContainerProps,\n TableHeaderProps,\n TableHeadProps,\n TableRowProps,\n TableTableProps,\n} from \"./types\";\n\nconst Head = ({ children, ...props }: TableHeadProps) => (\n <thead {...props}>{children}</thead>\n);\nHead.displayName = \"Table.Head\";\n\nconst Body = ({ children, className, ...props }: TableBodyProps) => (\n <tbody className={clsx(styles.tableBody, className)} {...props}>\n {children}\n </tbody>\n);\nBody.displayName = \"Table.Body\";\n\nconst Row = ({ children, className, ...props }: TableRowProps) => (\n <tr className={clsx(styles.bodyRow, className)} {...props}>\n {children}\n </tr>\n);\nRow.displayName = \"Table.Row\";\n\nconst Cell = ({ children, className, ...props }: TableCellProps) => (\n <td className={clsx(styles.bodyCell, className)} {...props}>\n {children}\n </td>\n);\nCell.displayName = \"Table.Cell\";\n\nconst Header = ({ children, className, ...props }: TableHeaderProps) => (\n <th className={clsx(styles.headerCell, className)} {...props}>\n {children}\n </th>\n);\nHeader.displayName = \"Table.HeaderCell\";\n\nconst Container = ({ children, className, ...props }: TableContainerProps) => (\n <div\n className={clsx(styles.tableWrapper, className)}\n data-testid=\"table-wrapper\"\n {...props}\n >\n {children}\n </div>\n);\nContainer.displayName = \"Table.Container\";\n\nconst TableEl = ({ children, className, ...props }: TableTableProps) => (\n <table className={clsx(styles.tableComponent, className)} {...props}>\n {children}\n </table>\n);\nTableEl.displayName = \"Table.Table\";\n\n// @catalog\n/**\n * A styled HTML table with a scrollable container wrapper.\n *\n * Use `Table` when displaying structured tabular data. The default export\n * wraps content in `Table.Container` and `Table.Table` automatically. For\n * full layout control, compose the sub-components directly:\n * - `Table.Container` — scrollable wrapper div\n * - `Table.Table` — the bare `<table>` element\n * - `Table.Head` — the `<thead>` section\n * - `Table.Body` — the `<tbody>` section\n * - `Table.Row` — a `<tr>` row within the body\n * - `Table.Cell` — a `<td>` data cell\n * - `Table.HeaderCell` — a `<th>` column header cell\n */\nexport const Table = Object.assign(\n ({ children, ...props }: TableTableProps) => (\n <Container>\n <TableEl {...props}>{children}</TableEl>\n </Container>\n ),\n {\n /** Scrollable wrapper div that contains a `Table.Table`. */\n Container,\n /** The bare `<table>` element. Use directly when you need to place the table inside a custom container. */\n Table: TableEl,\n /** Renders the `<thead>` section of the table. */\n Head,\n /** Renders the `<tbody>` section of the table. */\n Body,\n /** Renders a `<tr>` row within a `Table.Body`. */\n Row,\n /** Renders a `<td>` data cell within a `Table.Row`. */\n Cell,\n /** Renders a `<th>` header cell within a `Table.Head` row. */\n HeaderCell: Header,\n }\n);\n"],"names":["Head","_a","children","props","__rest","_jsx","Object","assign","displayName","Body","className","clsx","styles.tableBody","Row","styles.bodyRow","Cell","styles.bodyCell","Header","styles.headerCell","Container","styles.tableWrapper","TableEl","styles.tableComponent","Table","HeaderCell"],"mappings":"0OAaA,MAAMA,EAAQC,IAAA,IAAAC,SAAEA,GAAQD,EAAKE,EAAKC,EAAAH,EAApB,cAA2C,OACrDI,EAAA,QAAAC,OAAAC,OAAA,GAAWJ,YAAQD,IAAiB,EAExCF,EAAKQ,YAAc,aAEnB,MAAMC,EAAQR,QAAAC,SAAEA,EAAQQ,UAAEA,GAAST,EAAKE,EAAKC,EAAAH,EAA/B,0BAAsD,OAChEI,EAAA,QAAAC,OAAAC,OAAA,CAAOG,UAAWC,EAAKC,EAAkBF,IAAgBP,YACpDD,IACG,EAEZO,EAAKD,YAAc,aAEnB,MAAMK,EAAOZ,QAAAC,SAAEA,EAAQQ,UAAEA,GAAST,EAAKE,EAAKC,EAAAH,EAA/B,0BAAqD,OAC9DI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKG,EAAgBJ,IAAgBP,YAC/CD,IACA,EAETW,EAAIL,YAAc,YAElB,MAAMO,EAAQd,QAAAC,SAAEA,EAAQQ,UAAEA,GAAST,EAAKE,EAAKC,EAAAH,EAA/B,0BAAsD,OAChEI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKK,EAAiBN,IAAgBP,YAChDD,IACA,EAETa,EAAKP,YAAc,aAEnB,MAAMS,EAAUhB,QAAAC,SAAEA,EAAQQ,UAAEA,GAAST,EAAKE,EAAKC,EAAAH,EAA/B,0BAAwD,OACpEI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKO,EAAmBR,IAAgBP,YAClDD,IACA,EAETe,EAAOT,YAAc,mBAErB,MAAMW,EAAalB,QAAAC,SAAEA,EAAQQ,UAAEA,GAAST,EAAKE,EAAKC,EAAAH,EAA/B,0BAA2D,OAC1EI,uBACIK,UAAWC,EAAKS,EAAqBV,GAAU,cACnC,iBACRP,YAEHD,IACC,EAEViB,EAAUX,YAAc,kBAExB,MAAMa,EAAWpB,QAAAC,SAAEA,EAAQQ,UAAEA,GAAST,EAAKE,EAAKC,EAAAH,EAA/B,0BAAuD,OACpEI,EAAA,QAAAC,OAAAC,OAAA,CAAOG,UAAWC,EAAKW,EAAuBZ,IAAgBP,YACzDD,IACG,EAEZmB,EAAQb,YAAc,cAiBf,MAAMe,EAAQjB,OAAOC,QACvBN,IAAA,IAAAC,SAAEA,GAAQD,EAAKE,EAAKC,EAAAH,EAApB,cAA4C,OACzCI,EAACc,EAAS,CAAAjB,SACNG,EAACgB,EAAOf,OAAAC,OAAA,CAAA,EAAKJ,EAAK,CAAAD,SAAGA,MACb,GAEhB,CAEIiB,YAEAI,MAAOF,EAEPrB,OAEAS,OAEAI,MAEAE,OAEAS,WAAYP"}
|
package/table/table.styles.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./table.
|
|
1
|
+
import"./table.styles_1vjx31g.css";const t="txzjt0s",s="t110f2kz",e="tdex3lc",b="htqww2s",l="b1gaqki2",x="b183mjh5";export{x as bodyCell,l as bodyRow,b as headerCell,e as tableBody,s as tableComponent,t as tableWrapper};
|
|
2
2
|
//# sourceMappingURL=table.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.styles.js","sources":["../../src/table/table.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Border, Colour, Radius, Spacing } from \"../theme\";\n\n// =============================================================================\n// STYLES CONSTANTS\n// =============================================================================\nconst borderColor = Colour[\"border\"];\nconst fontColor = Colour[\"text\"];\n\n// =============================================================================\n// STYLES\n// =============================================================================\nexport const tableWrapper = css`\n overflow: auto;\n border: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${borderColor};\n border-radius: ${Radius[\"md\"]};\n\n /* Hide scrollbar */\n
|
|
1
|
+
{"version":3,"file":"table.styles.js","sources":["../../src/table/table.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Border, Colour, Radius, Spacing } from \"../theme\";\n\n// =============================================================================\n// STYLES CONSTANTS\n// =============================================================================\nconst borderColor = Colour[\"border\"];\nconst fontColor = Colour[\"text\"];\n\n// =============================================================================\n// STYLES\n// =============================================================================\nexport const tableWrapper = css`\n overflow: auto;\n border: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${borderColor};\n border-radius: ${Radius[\"md\"]};\n\n /* Hide scrollbar */\n scrollbar-width: none; /* Firefox */\n -ms-overflow-style: none; /* IE 10+ */\n &::-webkit-scrollbar {\n display: none; /* Chrome/Safari/Webkit */\n }\n`;\n\nexport const tableComponent = css`\n text-align: left;\n border-collapse: separate;\n border-spacing: 0;\n width: 100%;\n`;\n\nexport const tableBody = css`\n :where(tr:last-child) {\n td {\n border-bottom: none;\n }\n }\n`;\n\nexport const headerCell = css`\n padding: ${Spacing[\"spacing-20\"]} ${Spacing[\"spacing-16\"]};\n text-align: left;\n cursor: default;\n vertical-align: middle;\n color: ${fontColor};\n background-color: ${Colour[\"bg-stronger\"]};\n height: 6rem;\n border-bottom: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${borderColor};\n\n &:where(&:first-child) {\n padding-left: ${Spacing[\"spacing-24\"]};\n }\n &:where(&:last-child) {\n padding-right: ${Spacing[\"spacing-24\"]};\n }\n`;\n\nexport const bodyRow = css`\n background-color: ${Colour[\"bg\"]};\n border-top: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${borderColor};\n`;\n\nexport const bodyCell = css`\n padding: ${Spacing[\"spacing-20\"]} ${Spacing[\"spacing-16\"]};\n vertical-align: middle;\n color: ${fontColor};\n border-bottom: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${borderColor};\n\n &:where(&:first-child) {\n padding-left: ${Spacing[\"spacing-24\"]};\n }\n &:where(&:last-child) {\n padding-right: ${Spacing[\"spacing-24\"]};\n }\n`;\n"],"names":["tableWrapper","tableComponent","tableBody","headerCell","bodyRow","bodyCell"],"mappings":"wDAaO,MAAMA,EAAY,UAaZC,EAAc,WAOdC,EAAS,UAQTC,EAAU,UAkBVC,EAAO,WAKPC,EAAQ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@layer fds{.txzjt0s{overflow:auto;border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-md);
|
|
1
|
+
@layer fds{.txzjt0s{overflow:auto;border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-md);scrollbar-width:none;-ms-overflow-style:none;}.txzjt0s::-webkit-scrollbar{display:none;}
|
|
2
2
|
.t110f2kz{text-align:left;border-collapse:separate;border-spacing:0;width:100%;}
|
|
3
3
|
.tdex3lc :where(tr:last-child) td{border-bottom:none;}
|
|
4
4
|
.htqww2s{padding:var(--fds-spacing-20) var(--fds-spacing-16);text-align:left;cursor:default;vertical-align:middle;color:var(--fds-colour-text);background-color:var(--fds-colour-bg-stronger);height:6rem;border-bottom:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);}.htqww2s:where(.htqww2s:first-child){padding-left:var(--fds-spacing-24);}.htqww2s:where(.htqww2s:last-child){padding-right:var(--fds-spacing-24);}
|
package/table/types.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inherits props from [HTMLTableSectionElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableSectionElement)
|
|
3
|
+
*/
|
|
4
|
+
export interface TableHeadProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Inherits props from [HTMLTableSectionElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableSectionElement)
|
|
8
|
+
*/
|
|
9
|
+
export interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Inherits props from [HTMLTableRowElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement)
|
|
13
|
+
*/
|
|
14
|
+
export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Inherits props from [HTMLTableCellElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement)
|
|
18
|
+
*/
|
|
19
|
+
export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Inherits props from [HTMLTableCellElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableCellElement)
|
|
23
|
+
*/
|
|
24
|
+
export interface TableHeaderProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Inherits props from [HTMLDivElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLDivElement)
|
|
28
|
+
*/
|
|
29
|
+
export interface TableContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Inherits props from [HTMLTableElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableElement)
|
|
33
|
+
*/
|
|
34
|
+
export interface TableTableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
35
|
+
}
|
package/tag/tag.d.ts
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import type { TagProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* A compact label used to categorise or highlight content.
|
|
4
|
+
*
|
|
5
|
+
* Use `Tag` to display metadata such as status, category, or keyword.
|
|
6
|
+
*/
|
|
2
7
|
export declare const Tag: ({ type, colorType, children, interactive, icon, iconPosition, ...otherProps }: TagProps) => JSX.Element;
|
package/tag/tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sources":["../../src/tag/tag.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\n\nimport * as styles from \"./tag.style\";\nimport type { TagColorType, TagProps, TagType } from \"./types\";\n\nconst colorClassMap: Record<TagType, Record<TagColorType, string>> = {\n solid: {\n grey: styles.wrapperSolidGrey,\n green: styles.wrapperSolidGreen,\n yellow: styles.wrapperSolidYellow,\n red: styles.wrapperSolidRed,\n blue: styles.wrapperSolidBlue,\n primary: styles.wrapperSolidPrimary,\n black: styles.wrapperSolidBlack,\n },\n outline: {\n grey: styles.wrapperOutlineGrey,\n green: styles.wrapperOutlineGreen,\n yellow: styles.wrapperOutlineYellow,\n red: styles.wrapperOutlineRed,\n blue: styles.wrapperOutlineBlue,\n primary: styles.wrapperOutlinePrimary,\n black: styles.wrapperOutlineBlack,\n },\n};\n\nexport const Tag = ({\n type,\n colorType = \"black\",\n children,\n interactive = false,\n icon,\n iconPosition = \"left\",\n ...otherProps\n}: TagProps): JSX.Element => {\n const Element = interactive ? \"button\" : \"div\";\n\n return (\n <Element\n className={clsx(\n styles.wrapper,\n colorClassMap[type]?.[colorType],\n interactive && styles.wrapperInteractive\n )}\n {...otherProps}\n >\n {iconPosition === \"left\" &&\n icon &&\n React.cloneElement(icon, { \"aria-hidden\": true })}\n <div className={styles.label} role=\"presentation\">\n {children}\n </div>\n {iconPosition === \"right\" &&\n icon &&\n React.cloneElement(icon, { \"aria-hidden\": true })}\n </Element>\n );\n};\n"],"names":["colorClassMap","solid","grey","styles.wrapperSolidGrey","green","styles.wrapperSolidGreen","yellow","styles.wrapperSolidYellow","red","styles.wrapperSolidRed","blue","styles.wrapperSolidBlue","primary","styles.wrapperSolidPrimary","black","styles.wrapperSolidBlack","outline","styles.wrapperOutlineGrey","styles.wrapperOutlineGreen","styles.wrapperOutlineYellow","styles.wrapperOutlineRed","styles.wrapperOutlineBlue","styles.wrapperOutlinePrimary","styles.wrapperOutlineBlack","Tag","_a","type","colorType","children","interactive","icon","iconPosition","otherProps","__rest","_jsxs","Object","assign","className","clsx","styles.wrapper","_b","styles.wrapperInteractive","React","cloneElement","_jsx","styles.label","role"],"mappings":"oiBAMA,MAAMA,EAA+D,CACjEC,MAAO,CACHC,KAAMC,EACNC,MAAOC,EACPC,OAAQC,EACRC,IAAKC,EACLC,KAAMC,EACNC,QAASC,EACTC,MAAOC,GAEXC,QAAS,CACLd,KAAMe,EACNb,MAAOc,EACPZ,OAAQa,EACRX,IAAKY,EACLV,KAAMW,EACNT,QAASU,EACTR,MAAOS,
|
|
1
|
+
{"version":3,"file":"tag.js","sources":["../../src/tag/tag.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport React from \"react\";\n\nimport * as styles from \"./tag.style\";\nimport type { TagColorType, TagProps, TagType } from \"./types\";\n\nconst colorClassMap: Record<TagType, Record<TagColorType, string>> = {\n solid: {\n grey: styles.wrapperSolidGrey,\n green: styles.wrapperSolidGreen,\n yellow: styles.wrapperSolidYellow,\n red: styles.wrapperSolidRed,\n blue: styles.wrapperSolidBlue,\n primary: styles.wrapperSolidPrimary,\n black: styles.wrapperSolidBlack,\n },\n outline: {\n grey: styles.wrapperOutlineGrey,\n green: styles.wrapperOutlineGreen,\n yellow: styles.wrapperOutlineYellow,\n red: styles.wrapperOutlineRed,\n blue: styles.wrapperOutlineBlue,\n primary: styles.wrapperOutlinePrimary,\n black: styles.wrapperOutlineBlack,\n },\n};\n\n// @catalog\n/**\n * A compact label used to categorise or highlight content.\n *\n * Use `Tag` to display metadata such as status, category, or keyword.\n */\nexport const Tag = ({\n type,\n colorType = \"black\",\n children,\n interactive = false,\n icon,\n iconPosition = \"left\",\n ...otherProps\n}: TagProps): JSX.Element => {\n const Element = interactive ? \"button\" : \"div\";\n\n return (\n <Element\n className={clsx(\n styles.wrapper,\n colorClassMap[type]?.[colorType],\n interactive && styles.wrapperInteractive\n )}\n {...otherProps}\n >\n {iconPosition === \"left\" &&\n icon &&\n React.cloneElement(icon, { \"aria-hidden\": true })}\n <div className={styles.label} role=\"presentation\">\n {children}\n </div>\n {iconPosition === \"right\" &&\n icon &&\n React.cloneElement(icon, { \"aria-hidden\": true })}\n </Element>\n );\n};\n"],"names":["colorClassMap","solid","grey","styles.wrapperSolidGrey","green","styles.wrapperSolidGreen","yellow","styles.wrapperSolidYellow","red","styles.wrapperSolidRed","blue","styles.wrapperSolidBlue","primary","styles.wrapperSolidPrimary","black","styles.wrapperSolidBlack","outline","styles.wrapperOutlineGrey","styles.wrapperOutlineGreen","styles.wrapperOutlineYellow","styles.wrapperOutlineRed","styles.wrapperOutlineBlue","styles.wrapperOutlinePrimary","styles.wrapperOutlineBlack","Tag","_a","type","colorType","children","interactive","icon","iconPosition","otherProps","__rest","_jsxs","Object","assign","className","clsx","styles.wrapper","_b","styles.wrapperInteractive","React","cloneElement","_jsx","styles.label","role"],"mappings":"oiBAMA,MAAMA,EAA+D,CACjEC,MAAO,CACHC,KAAMC,EACNC,MAAOC,EACPC,OAAQC,EACRC,IAAKC,EACLC,KAAMC,EACNC,QAASC,EACTC,MAAOC,GAEXC,QAAS,CACLd,KAAMe,EACNb,MAAOc,EACPZ,OAAQa,EACRX,IAAKY,EACLV,KAAMW,EACNT,QAASU,EACTR,MAAOS,IAUFC,EAAOC,WAAAC,KAChBA,EAAIC,UACJA,EAAY,QAAOC,SACnBA,EAAQC,YACRA,GAAc,EAAKC,KACnBA,EAAIC,aACJA,EAAe,UACZC,EAAUC,EAAAR,EAPG,CAAA,OAAA,YAAA,WAAA,cAAA,OAAA,iBAWhB,OACIS,EAHYL,EAAc,SAAW,MAG7BM,OAAAC,OAAA,CACJC,UAAWC,EACPC,EACmB,QAAnBC,EAAAxC,EAAc0B,UAAK,IAAAc,OAAA,EAAAA,EAAGb,GACtBE,GAAeY,IAEfT,EAAU,CAAAJ,SAAA,CAEI,SAAjBG,GACGD,GACAY,EAAMC,aAAab,EAAM,CAAE,eAAe,IAC9Cc,EAAA,MAAA,CAAKP,UAAWQ,EAAcC,KAAK,eAAclB,SAC5CA,IAEa,UAAjBG,GACGD,GACAY,EAAMC,aAAab,EAAM,CAAE,eAAe,OACxC"}
|
package/tag/types.d.ts
CHANGED
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import type React from "react";
|
|
2
|
+
/** Visual style variant. */
|
|
2
3
|
export type TagType = "outline" | "solid";
|
|
4
|
+
/** Color theme applied to the tag. */
|
|
3
5
|
export type TagColorType = "black" | "grey" | "green" | "yellow" | "red" | "blue" | "primary";
|
|
6
|
+
/** Props for the `Tag` component. */
|
|
4
7
|
export interface TagProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
|
+
/** Visual style variant. */
|
|
5
9
|
type: TagType;
|
|
10
|
+
/**
|
|
11
|
+
* Color theme applied to the tag.
|
|
12
|
+
*
|
|
13
|
+
* @default "black"
|
|
14
|
+
*/
|
|
6
15
|
colorType?: TagColorType | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Optional icon rendered alongside the label. The position is controlled by `iconPosition`.
|
|
18
|
+
*/
|
|
7
19
|
icon?: JSX.Element | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Position of the icon relative to the label text.
|
|
22
|
+
*
|
|
23
|
+
* @default "left"
|
|
24
|
+
*/
|
|
8
25
|
iconPosition?: "left" | "right";
|
|
26
|
+
/**
|
|
27
|
+
* When `true`, renders the tag as a `<button>` element to support click
|
|
28
|
+
* and keyboard interactions. When `false`, renders as a non-interactive
|
|
29
|
+
* `<div>`.
|
|
30
|
+
*
|
|
31
|
+
* @default false
|
|
32
|
+
*/
|
|
9
33
|
interactive?: boolean | undefined;
|
|
10
34
|
}
|
package/text-list/index.d.ts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Renders styled ordered and unordered lists for body copy and structured content.
|
|
3
|
+
*
|
|
4
|
+
* Use `TextList` to present sequential or non-sequential items with consistent
|
|
5
|
+
* typography and spacing.
|
|
6
|
+
*
|
|
7
|
+
* Sub-components:
|
|
8
|
+
* - `TextList.Ol` — a numbered list with configurable counter style and direction.
|
|
9
|
+
* - `TextList.Ul` — a bulleted list supporting predefined marker types or a custom icon.
|
|
10
|
+
*/
|
|
1
11
|
export declare const TextList: {
|
|
12
|
+
/**
|
|
13
|
+
* Renders a bulleted list. Supports predefined marker types or
|
|
14
|
+
* a custom decorative icon.
|
|
15
|
+
*/
|
|
2
16
|
Ul: {
|
|
3
17
|
({ className, size, bulletType, bottomMargin, children, ...otherProps }: import("./types").UnorderedListProps): import("react/jsx-runtime").JSX.Element;
|
|
4
18
|
displayName: string;
|
|
5
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Renders a numbered list with configurable counter display.
|
|
22
|
+
*/
|
|
6
23
|
Ol: {
|
|
7
24
|
({ className, size, counterType, counterSeparator, reversed, start, bottomMargin, children, ...otherProps }: import("./types").OrderedListProps): import("react/jsx-runtime").JSX.Element;
|
|
8
25
|
displayName: string;
|
package/text-list/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/text-list/index.ts"],"sourcesContent":["import { OrderedList } from \"./ordered-list\";\nimport { UnorderedList } from \"./unordered-list\";\n\nexport const TextList = {\n Ul: UnorderedList,\n Ol: OrderedList,\n};\n\nexport * from \"./types\";\n"],"names":["TextList","Ul","UnorderedList","Ol","OrderedList"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/text-list/index.ts"],"sourcesContent":["import { OrderedList } from \"./ordered-list\";\nimport { UnorderedList } from \"./unordered-list\";\n\n// @catalog\n/**\n * Renders styled ordered and unordered lists for body copy and structured content.\n *\n * Use `TextList` to present sequential or non-sequential items with consistent\n * typography and spacing.\n *\n * Sub-components:\n * - `TextList.Ol` — a numbered list with configurable counter style and direction.\n * - `TextList.Ul` — a bulleted list supporting predefined marker types or a custom icon.\n */\nexport const TextList = {\n /**\n * Renders a bulleted list. Supports predefined marker types or\n * a custom decorative icon.\n */\n Ul: UnorderedList,\n /**\n * Renders a numbered list with configurable counter display.\n */\n Ol: OrderedList,\n};\n\nexport * from \"./types\";\n"],"names":["TextList","Ul","UnorderedList","Ol","OrderedList"],"mappings":"oGAcO,MAAMA,EAAW,CAKpBC,GAAIC,EAIJC,GAAIC"}
|
package/text-list/types.d.ts
CHANGED
|
@@ -1,27 +1,56 @@
|
|
|
1
1
|
import type { FontSize } from "../theme";
|
|
2
|
+
/**
|
|
3
|
+
* Text size tokens available for list content.
|
|
4
|
+
*/
|
|
2
5
|
export type TextListSize = Exclude<FontSize, "form-label" | "form-description">;
|
|
6
|
+
/** Shared props for both ordered and unordered text list variants. */
|
|
3
7
|
interface BaseListProps {
|
|
4
8
|
children: JSX.Element | JSX.Element[];
|
|
9
|
+
/** Bottom margin in pixels applied to each list item except the last. */
|
|
5
10
|
bottomMargin?: number | undefined;
|
|
11
|
+
/** Text size applied to the list content. */
|
|
6
12
|
size?: TextListSize | undefined;
|
|
7
13
|
id?: string | undefined;
|
|
8
14
|
"data-testid"?: string | undefined;
|
|
9
15
|
className?: string | undefined;
|
|
10
16
|
}
|
|
17
|
+
/** Counter style applied to each item in an ordered list. */
|
|
11
18
|
export type CounterType = "lower-alpha" | "decimal" | "lower-roman";
|
|
19
|
+
/**
|
|
20
|
+
* Props for the `TextList.Ol` component.
|
|
21
|
+
*/
|
|
12
22
|
export interface OrderedListProps extends BaseListProps {
|
|
13
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Counter style applied to each list item.
|
|
25
|
+
*
|
|
26
|
+
* @default "decimal"
|
|
27
|
+
*/
|
|
14
28
|
counterType?: CounterType | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Character or string rendered after each counter value.
|
|
31
|
+
*
|
|
32
|
+
* @default ")"
|
|
33
|
+
*/
|
|
15
34
|
counterSeparator?: string | undefined;
|
|
16
|
-
/**
|
|
35
|
+
/** The counter is decremented from the start value instead of incremented. */
|
|
17
36
|
reversed?: boolean | undefined;
|
|
18
|
-
/** The value to start the list count from */
|
|
37
|
+
/** The value to start the list count from. */
|
|
19
38
|
start?: number | undefined;
|
|
20
39
|
}
|
|
40
|
+
/** Predefined bullet marker style for an unordered list. */
|
|
21
41
|
export type BulletType = "disc" | "circle" | "square" | "none";
|
|
22
42
|
type CustomBulletIcon = Exclude<React.ReactNode, string>;
|
|
43
|
+
/**
|
|
44
|
+
* Props for the `TextList.Ul` component.
|
|
45
|
+
*/
|
|
23
46
|
export interface UnorderedListProps extends BaseListProps {
|
|
24
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Marker style for list items. Pass a `BulletType` token for a predefined
|
|
49
|
+
* marker, or any React node to render a custom decorative icon before each
|
|
50
|
+
* item's content.
|
|
51
|
+
*
|
|
52
|
+
* @default "disc"
|
|
53
|
+
*/
|
|
25
54
|
bulletType?: BulletType | CustomBulletIcon | undefined;
|
|
26
55
|
}
|
|
27
56
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Breakpoint as i}from"../tokens/breakpoint.js";import{parsePxOrRemValue as m,parseCSSVariableValue as n}from"../utils/css-variable.js";import"../../util/calendar-helper.js";import"../../external/dayjs/dayjs.min.js";import"react";import"../../util/simple-id-generator.js";import"../../util/string-helper.js";import"@react-aria/live-announcer";import"./context.js";import"../utils/use-media-query.js";const e="fds-breakpoint-";function t(t){const s=document.body,a=window.innerWidth;[...s.classList].forEach((i=>{i.startsWith(e)&&s.classList.remove(i)}));const o=function(m){const e=i=>{const e=n(i,m);return e||(m!==document.documentElement?n(i,document.documentElement):e)};return[{key:"xxs",min:e(i["xxs-min"]),max:e(i["xxs-max"])},{key:"xs",min:e(i["xs-min"]),max:e(i["xs-max"])},{key:"sm",min:e(i["sm-min"]),max:e(i["sm-max"])},{key:"md",min:e(i["md-min"]),max:e(i["md-max"])},{key:"lg",min:e(i["lg-min"]),max:e(i["lg-max"])},{key:"xl",min:e(i["xl-min"]),max:e(i["xl-max"])},{key:"xxl",min:e(i["xxl-min"]),max:1/0}]}(t);o.forEach((i=>{const n=m(i.min),t=i.max===1/0?1/0:m(i.max),o=a>=n,r=t!==1/0&&a<=t;o&&(t===1/0||r)&&s.classList.add(`${e}${i.key}`),o&&s.classList.add(`${e}${i.key}-min`),r&&s.classList.add(`${e}${i.key}-max`)}))}function s(i){if(!globalThis.window)return;const m=()=>{t(i)};return m(),globalThis.window.addEventListener("resize",m),()=>{globalThis.window.removeEventListener("resize",m)}}export{
|
|
1
|
+
import{Breakpoint as i}from"../tokens/breakpoint.js";import{parsePxOrRemValue as m,parseCSSVariableValue as n}from"../utils/css-variable.js";import"../../util/calendar-helper.js";import"../../external/dayjs/dayjs.min.js";import"react";import"../../util/simple-id-generator.js";import"../../util/string-helper.js";import"@react-aria/live-announcer";import"./context.js";import"../utils/use-media-query.js";const e="fds-breakpoint-";function t(t){const s=document.body,a=window.innerWidth;[...s.classList].forEach((i=>{i.startsWith(e)&&s.classList.remove(i)}));const o=function(m){const e=i=>{const e=n(i,m);return e||(m!==document.documentElement?n(i,document.documentElement):e)};return[{key:"xxs",min:e(i["xxs-min"]),max:e(i["xxs-max"])},{key:"xs",min:e(i["xs-min"]),max:e(i["xs-max"])},{key:"sm",min:e(i["sm-min"]),max:e(i["sm-max"])},{key:"md",min:e(i["md-min"]),max:e(i["md-max"])},{key:"lg",min:e(i["lg-min"]),max:e(i["lg-max"])},{key:"xl",min:e(i["xl-min"]),max:e(i["xl-max"])},{key:"xxl",min:e(i["xxl-min"]),max:1/0}]}(t);o.forEach((i=>{const n=m(i.min),t=i.max===1/0?1/0:m(i.max),o=a>=n,r=t!==1/0&&a<=t;o&&(t===1/0||r)&&s.classList.add(`${e}${i.key}`),o&&s.classList.add(`${e}${i.key}-min`),r&&s.classList.add(`${e}${i.key}-max`)}))}function s(i){if(!globalThis.window)return;const m=()=>{t(i)};return m(),globalThis.window.addEventListener("resize",m),()=>{globalThis.window.removeEventListener("resize",m)}}export{s as setupBreakpointListener};
|
|
2
2
|
//# sourceMappingURL=breakpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoint.js","sources":["../../../src/theme/theme-provider/breakpoint.ts"],"sourcesContent":["import { Breakpoint } from \"../tokens/breakpoint\";\nimport type { CSSVariableString } from \"../types\";\nimport { parseCSSVariableValue, parsePxOrRemValue } from \"../utils\";\n\nfunction getBreakpointRanges(sourceElement: HTMLElement) {\n const getBreakpointValue = (token: CSSVariableString) => {\n const scopedValue = parseCSSVariableValue(token, sourceElement);\n if (scopedValue) return scopedValue;\n\n if (sourceElement !== document.documentElement) {\n return parseCSSVariableValue(token, document.documentElement);\n }\n\n return scopedValue;\n };\n\n return [\n {\n key: \"xxs\",\n min: getBreakpointValue(Breakpoint[\"xxs-min\"]),\n max: getBreakpointValue(Breakpoint[\"xxs-max\"]),\n },\n {\n key: \"xs\",\n min: getBreakpointValue(Breakpoint[\"xs-min\"]),\n max: getBreakpointValue(Breakpoint[\"xs-max\"]),\n },\n {\n key: \"sm\",\n min: getBreakpointValue(Breakpoint[\"sm-min\"]),\n max: getBreakpointValue(Breakpoint[\"sm-max\"]),\n },\n {\n key: \"md\",\n min: getBreakpointValue(Breakpoint[\"md-min\"]),\n max: getBreakpointValue(Breakpoint[\"md-max\"]),\n },\n {\n key: \"lg\",\n min: getBreakpointValue(Breakpoint[\"lg-min\"]),\n max: getBreakpointValue(Breakpoint[\"lg-max\"]),\n },\n {\n key: \"xl\",\n min: getBreakpointValue(Breakpoint[\"xl-min\"]),\n max: getBreakpointValue(Breakpoint[\"xl-max\"]),\n },\n {\n key: \"xxl\",\n min: getBreakpointValue(Breakpoint[\"xxl-min\"]),\n max: Infinity,\n },\n ] as const;\n}\n\nconst BREAKPOINT_CLASS_PREFIX = \"fds-breakpoint-\";\n\
|
|
1
|
+
{"version":3,"file":"breakpoint.js","sources":["../../../src/theme/theme-provider/breakpoint.ts"],"sourcesContent":["import { Breakpoint } from \"../tokens/breakpoint\";\nimport type { CSSVariableString } from \"../types\";\nimport { parseCSSVariableValue, parsePxOrRemValue } from \"../utils\";\n\nfunction getBreakpointRanges(sourceElement: HTMLElement) {\n const getBreakpointValue = (token: CSSVariableString) => {\n const scopedValue = parseCSSVariableValue(token, sourceElement);\n if (scopedValue) return scopedValue;\n\n if (sourceElement !== document.documentElement) {\n return parseCSSVariableValue(token, document.documentElement);\n }\n\n return scopedValue;\n };\n\n return [\n {\n key: \"xxs\",\n min: getBreakpointValue(Breakpoint[\"xxs-min\"]),\n max: getBreakpointValue(Breakpoint[\"xxs-max\"]),\n },\n {\n key: \"xs\",\n min: getBreakpointValue(Breakpoint[\"xs-min\"]),\n max: getBreakpointValue(Breakpoint[\"xs-max\"]),\n },\n {\n key: \"sm\",\n min: getBreakpointValue(Breakpoint[\"sm-min\"]),\n max: getBreakpointValue(Breakpoint[\"sm-max\"]),\n },\n {\n key: \"md\",\n min: getBreakpointValue(Breakpoint[\"md-min\"]),\n max: getBreakpointValue(Breakpoint[\"md-max\"]),\n },\n {\n key: \"lg\",\n min: getBreakpointValue(Breakpoint[\"lg-min\"]),\n max: getBreakpointValue(Breakpoint[\"lg-max\"]),\n },\n {\n key: \"xl\",\n min: getBreakpointValue(Breakpoint[\"xl-min\"]),\n max: getBreakpointValue(Breakpoint[\"xl-max\"]),\n },\n {\n key: \"xxl\",\n min: getBreakpointValue(Breakpoint[\"xxl-min\"]),\n max: Infinity,\n },\n ] as const;\n}\n\nconst BREAKPOINT_CLASS_PREFIX = \"fds-breakpoint-\";\n\nfunction applyBreakpointClasses(sourceElement: HTMLElement) {\n const body = document.body;\n const width = window.innerWidth;\n\n [...body.classList].forEach((cls) => {\n if (cls.startsWith(BREAKPOINT_CLASS_PREFIX)) {\n body.classList.remove(cls);\n }\n });\n\n const BREAKPOINT_RANGES = getBreakpointRanges(sourceElement);\n\n BREAKPOINT_RANGES.forEach((range) => {\n const minValue = parsePxOrRemValue(range.min);\n const maxValue =\n range.max === Infinity\n ? Infinity\n : parsePxOrRemValue(range.max as string);\n\n const isMinMatched = width >= minValue;\n const isMaxMatched = maxValue === Infinity ? false : width <= maxValue;\n const isWithinRange =\n isMinMatched && (maxValue === Infinity || isMaxMatched);\n\n if (isWithinRange) {\n body.classList.add(`${BREAKPOINT_CLASS_PREFIX}${range.key}`);\n }\n\n if (isMinMatched) {\n body.classList.add(`${BREAKPOINT_CLASS_PREFIX}${range.key}-min`);\n }\n\n if (isMaxMatched) {\n body.classList.add(`${BREAKPOINT_CLASS_PREFIX}${range.key}-max`);\n }\n });\n}\n\nexport function setupBreakpointListener(sourceElement: HTMLElement) {\n if (!globalThis.window) return;\n\n const handleBreakpointChange = () => {\n applyBreakpointClasses(sourceElement);\n };\n\n handleBreakpointChange();\n globalThis.window.addEventListener(\"resize\", handleBreakpointChange);\n\n return () => {\n globalThis.window.removeEventListener(\"resize\", handleBreakpointChange);\n };\n}\n"],"names":["BREAKPOINT_CLASS_PREFIX","applyBreakpointClasses","sourceElement","body","document","width","window","innerWidth","classList","forEach","cls","startsWith","remove","BREAKPOINT_RANGES","getBreakpointValue","token","scopedValue","parseCSSVariableValue","documentElement","key","min","Breakpoint","max","Infinity","getBreakpointRanges","range","minValue","parsePxOrRemValue","maxValue","isMinMatched","isMaxMatched","add","setupBreakpointListener","globalThis","handleBreakpointChange","addEventListener","removeEventListener"],"mappings":"qZAuDA,MAAMA,EAA0B,kBAEhC,SAASC,EAAuBC,GAC5B,MAAMC,EAAOC,SAASD,KAChBE,EAAQC,OAAOC,WAErB,IAAIJ,EAAKK,WAAWC,SAASC,IACrBA,EAAIC,WAAWX,IACfG,EAAKK,UAAUI,OAAOF,EAC1B,IAGJ,MAAMG,EA/DV,SAA6BX,GACzB,MAAMY,EAAsBC,IACxB,MAAMC,EAAcC,EAAsBF,EAAOb,GACjD,OAAIc,IAEAd,IAAkBE,SAASc,gBACpBD,EAAsBF,EAAOX,SAASc,iBAG1CF,EAAW,EAGtB,MAAO,CACH,CACIG,IAAK,MACLC,IAAKN,EAAmBO,EAAW,YACnCC,IAAKR,EAAmBO,EAAW,aAEvC,CACIF,IAAK,KACLC,IAAKN,EAAmBO,EAAW,WACnCC,IAAKR,EAAmBO,EAAW,YAEvC,CACIF,IAAK,KACLC,IAAKN,EAAmBO,EAAW,WACnCC,IAAKR,EAAmBO,EAAW,YAEvC,CACIF,IAAK,KACLC,IAAKN,EAAmBO,EAAW,WACnCC,IAAKR,EAAmBO,EAAW,YAEvC,CACIF,IAAK,KACLC,IAAKN,EAAmBO,EAAW,WACnCC,IAAKR,EAAmBO,EAAW,YAEvC,CACIF,IAAK,KACLC,IAAKN,EAAmBO,EAAW,WACnCC,IAAKR,EAAmBO,EAAW,YAEvC,CACIF,IAAK,MACLC,IAAKN,EAAmBO,EAAW,YACnCC,IAAKC,KAGjB,CAc8BC,CAAoBtB,GAE9CW,EAAkBJ,SAASgB,IACvB,MAAMC,EAAWC,EAAkBF,EAAML,KACnCQ,EACFH,EAAMH,MAAQC,IACRA,IACAI,EAAkBF,EAAMH,KAE5BO,EAAexB,GAASqB,EACxBI,EAAeF,IAAaL,KAAmBlB,GAASuB,EAE1DC,IAAiBD,IAAaL,KAAYO,IAG1C3B,EAAKK,UAAUuB,IAAI,GAAG/B,IAA0ByB,EAAMN,OAGtDU,GACA1B,EAAKK,UAAUuB,IAAI,GAAG/B,IAA0ByB,EAAMN,WAGtDW,GACA3B,EAAKK,UAAUuB,IAAI,GAAG/B,IAA0ByB,EAAMN,UAC1D,GAER,CAEM,SAAUa,EAAwB9B,GACpC,IAAK+B,WAAW3B,OAAQ,OAExB,MAAM4B,EAAyB,KAC3BjC,EAAuBC,EAAc,EAMzC,OAHAgC,IACAD,WAAW3B,OAAO6B,iBAAiB,SAAUD,GAEtC,KACHD,WAAW3B,OAAO8B,oBAAoB,SAAUF,EAAuB,CAE/E"}
|
|
@@ -7,6 +7,22 @@ type InheritedThemeScope = {
|
|
|
7
7
|
};
|
|
8
8
|
themeStyle: CSSProperties;
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Returns the theme context from the nearest `ThemeProvider`.
|
|
12
|
+
*
|
|
13
|
+
* @returns The active `ThemeContextValue`. When called outside a provider,
|
|
14
|
+
* returns defaults: `theme: "lifesg"`, `mode: "light"`, `themeElement: null`.
|
|
15
|
+
*/
|
|
10
16
|
export declare const useTheme: () => ThemeContextValue;
|
|
17
|
+
/**
|
|
18
|
+
* Builds `data-fds-theme*` attributes and inline CSS variables for re-stamping
|
|
19
|
+
* the current theme onto a detached DOM element (e.g. a portal or floating
|
|
20
|
+
* overlay).
|
|
21
|
+
*
|
|
22
|
+
* @param enabled When `false`, returns empty objects — useful to conditionally
|
|
23
|
+
* skip the attribute injection.
|
|
24
|
+
* @returns `themeProps` (spread onto the root element) and `themeStyle` (inline
|
|
25
|
+
* CSS variables to apply).
|
|
26
|
+
*/
|
|
11
27
|
export declare const useInheritedThemeScope: (enabled: boolean) => InheritedThemeScope;
|
|
12
28
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":["../../../src/theme/theme-provider/hooks.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { useContext, useMemo } from \"react\";\n\nimport { getInheritedInlineCssVariables } from \"../utils/css-variable\";\nimport { ThemeContext } from \"./context\";\nimport type { ThemeContextValue } from \"./types\";\n\ntype InheritedThemeScope = {\n themeProps: {\n \"data-fds-theme\"?: string;\n \"data-fds-theme-mode\"?: string;\n };\n themeStyle: CSSProperties;\n};\n\nexport const useTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n\n if (!context) {\n return {\n theme: \"lifesg\",\n mode: \"light\",\n themeElement: null,\n };\n }\n\n return context;\n};\n\nexport const useInheritedThemeScope = (\n enabled: boolean\n): InheritedThemeScope => {\n const themeContext = useContext(ThemeContext);\n\n return useMemo(() => {\n if (!enabled) {\n return {\n themeProps: {},\n themeStyle: {},\n };\n }\n\n return {\n themeProps: {\n \"data-fds-theme\": themeContext?.theme,\n \"data-fds-theme-mode\": themeContext?.mode,\n },\n themeStyle: getInheritedInlineCssVariables(\n themeContext?.themeElement ?? null\n ),\n };\n }, [\n enabled,\n themeContext?.mode,\n themeContext?.theme,\n themeContext?.themeElement,\n ]);\n};\n"],"names":["useTheme","context","useContext","ThemeContext","theme","mode","themeElement","useInheritedThemeScope","enabled","themeContext","useMemo","themeProps","themeStyle","getInheritedInlineCssVariables","_a"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":["../../../src/theme/theme-provider/hooks.tsx"],"sourcesContent":["import type { CSSProperties } from \"react\";\nimport { useContext, useMemo } from \"react\";\n\nimport { getInheritedInlineCssVariables } from \"../utils/css-variable\";\nimport { ThemeContext } from \"./context\";\nimport type { ThemeContextValue } from \"./types\";\n\ntype InheritedThemeScope = {\n themeProps: {\n \"data-fds-theme\"?: string;\n \"data-fds-theme-mode\"?: string;\n };\n themeStyle: CSSProperties;\n};\n\n// @catalog\n/**\n * Returns the theme context from the nearest `ThemeProvider`.\n *\n * @returns The active `ThemeContextValue`. When called outside a provider,\n * returns defaults: `theme: \"lifesg\"`, `mode: \"light\"`, `themeElement: null`.\n */\nexport const useTheme = (): ThemeContextValue => {\n const context = useContext(ThemeContext);\n\n if (!context) {\n return {\n theme: \"lifesg\",\n mode: \"light\",\n themeElement: null,\n };\n }\n\n return context;\n};\n\n// @catalog\n/**\n * Builds `data-fds-theme*` attributes and inline CSS variables for re-stamping\n * the current theme onto a detached DOM element (e.g. a portal or floating\n * overlay).\n *\n * @param enabled When `false`, returns empty objects — useful to conditionally\n * skip the attribute injection.\n * @returns `themeProps` (spread onto the root element) and `themeStyle` (inline\n * CSS variables to apply).\n */\nexport const useInheritedThemeScope = (\n enabled: boolean\n): InheritedThemeScope => {\n const themeContext = useContext(ThemeContext);\n\n return useMemo(() => {\n if (!enabled) {\n return {\n themeProps: {},\n themeStyle: {},\n };\n }\n\n return {\n themeProps: {\n \"data-fds-theme\": themeContext?.theme,\n \"data-fds-theme-mode\": themeContext?.mode,\n },\n themeStyle: getInheritedInlineCssVariables(\n themeContext?.themeElement ?? null\n ),\n };\n }, [\n enabled,\n themeContext?.mode,\n themeContext?.theme,\n themeContext?.themeElement,\n ]);\n};\n"],"names":["useTheme","context","useContext","ThemeContext","theme","mode","themeElement","useInheritedThemeScope","enabled","themeContext","useMemo","themeProps","themeStyle","getInheritedInlineCssVariables","_a"],"mappings":"sKAsBO,MAAMA,EAAW,KACpB,MAAMC,EAAUC,EAAWC,GAE3B,OAAKF,GACM,CACHG,MAAO,SACPC,KAAM,QACNC,aAAc,KAIR,EAcLC,EACTC,IAEA,MAAMC,EAAeP,EAAWC,GAEhC,OAAOO,GAAQ,WACX,OAAKF,EAOE,CACHG,WAAY,CACR,iBAAkBF,aAAY,EAAZA,EAAcL,MAChC,sBAAuBK,aAAY,EAAZA,EAAcJ,MAEzCO,WAAYC,EACkB,QAA1BC,EAAAL,aAAY,EAAZA,EAAcH,oBAAY,IAAAQ,EAAAA,EAAI,OAZ3B,CACHH,WAAY,CAAA,EACZC,WAAY,CAAA,EAYnB,GACF,CACCJ,EACAC,aAAY,EAAZA,EAAcJ,KACdI,aAAY,EAAZA,EAAcL,MACdK,aAAY,EAAZA,EAAcH,cAChB"}
|