@lifesg/react-design-system 4.0.0-alpha.5 → 4.0.0-alpha.6
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/types.d.ts +1 -1
- package/breadcrumb/breadcrumb.d.ts +7 -0
- package/breadcrumb/breadcrumb.js.map +1 -1
- package/breadcrumb/types.d.ts +31 -0
- package/button/button.d.ts +1 -0
- package/button/button.js.map +1 -1
- package/button/types.d.ts +42 -9
- package/calendar/calendar.d.ts +3 -0
- package/calendar/calendar.js.map +1 -1
- package/calendar/types.d.ts +43 -7
- 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 +19 -3
- 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/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/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/form/form-label-addon.js +1 -1
- package/cjs/form/form-label-addon.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/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/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.map +1 -1
- package/cjs/otp-verification/otp-verification.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.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/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/{table/table.styles_1af5ipv.css → cjs/table/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/{time-range-picker/common.styles_1qwp4xa.css → cjs/time-range-picker/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/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/types.d.ts +3 -3
- 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-range-input/types.d.ts +1 -1
- package/drawer/types.d.ts +1 -1
- package/e-signature/types.d.ts +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/file-upload/types.d.ts +0 -1
- package/filter/types.d.ts +6 -10
- package/form/form-label-addon.js +1 -1
- package/form/form-label-addon.js.map +1 -1
- package/form/index.d.ts +65 -8
- package/form/index.js +1 -1
- package/form/index.js.map +1 -1
- package/form/types.d.ts +155 -6
- 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/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/internal-types.d.ts +57 -3
- package/link-list/link-list.d.ts +6 -0
- package/link-list/link-list.js.map +1 -1
- package/link-list/types.d.ts +3 -0
- 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 +32 -0
- 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 +54 -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 +75 -8
- package/navbar/navbar.d.ts +7 -0
- package/navbar/navbar.js.map +1 -1
- package/navbar/types.d.ts +200 -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.map +1 -1
- package/otp-input/types.d.ts +54 -11
- 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/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/popover-inline.d.ts +5 -0
- package/popover/popover-inline/popover-inline.js.map +1 -1
- 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 +150 -3
- package/predictive-text-input/predictive-text-input.d.ts +6 -0
- 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 +11 -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/types.d.ts +52 -19
- 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 +70 -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 +54 -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 +21 -0
- package/table/table.js.map +1 -1
- package/table/table.styles.js +1 -1
- package/table/table.styles.js.map +1 -1
- package/{cjs/table/table.styles_1af5ipv.css → table/table.styles_1vjx31g.css} +1 -1
- 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 +3 -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 +3 -0
- package/theme/tokens/colour.js.map +1 -1
- package/theme/tokens/component.d.ts +1 -0
- package/theme/tokens/component.js.map +1 -1
- package/theme/tokens/font.d.ts +2 -0
- package/theme/tokens/font.js.map +1 -1
- package/theme/tokens/media-query.d.ts +1 -0
- package/theme/tokens/media-query.js.map +1 -1
- package/theme/tokens/motion.d.ts +1 -0
- package/theme/tokens/motion.js.map +1 -1
- package/theme/tokens/radius.d.ts +1 -0
- package/theme/tokens/radius.js.map +1 -1
- package/theme/tokens/shadow.d.ts +1 -0
- package/theme/tokens/shadow.js.map +1 -1
- package/theme/tokens/spacing.d.ts +1 -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/{cjs/time-range-picker/common.styles_1qwp4xa.css → time-range-picker/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 +112 -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 +74 -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 +53 -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 +42 -8
- package/toggle/toggle.d.ts +6 -0
- package/toggle/toggle.js.map +1 -1
- package/toggle/types.d.ts +95 -17
- 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/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/timepicker/timepicker.styles_1jm33yw.css +0 -1
- package/data-table/data-table.styles_1iqq1g7.css +0 -26
- package/timepicker/timepicker.styles_1jm33yw.css +0 -1
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,28 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A styled HTML table with a scrollable container wrapper.
|
|
3
|
+
*
|
|
4
|
+
* Use `Table` when displaying structured tabular data. The default export
|
|
5
|
+
* wraps content in `Table.Container` and `Table.Table` automatically. For
|
|
6
|
+
* full layout control, compose the sub-components directly:
|
|
7
|
+
* - `Table.Container` — scrollable wrapper div
|
|
8
|
+
* - `Table.Table` — the bare `<table>` element
|
|
9
|
+
* - `Table.Head` — the `<thead>` section
|
|
10
|
+
* - `Table.Body` — the `<tbody>` section
|
|
11
|
+
* - `Table.Row` — a `<tr>` row within the body
|
|
12
|
+
* - `Table.Cell` — a `<td>` data cell
|
|
13
|
+
* - `Table.HeaderCell` — a `<th>` column header cell
|
|
14
|
+
*/
|
|
1
15
|
export declare const Table: (({ children, ...props }: React.TableHTMLAttributes<HTMLTableElement>) => import("react/jsx-runtime").JSX.Element) & {
|
|
16
|
+
/** Scrollable wrapper div that contains a `Table.Table`. */
|
|
2
17
|
Container: {
|
|
3
18
|
({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
4
19
|
displayName: string;
|
|
5
20
|
};
|
|
21
|
+
/** The bare `<table>` element. Use directly when you need to place the table inside a custom container. */
|
|
6
22
|
Table: {
|
|
7
23
|
({ children, className, ...props }: React.TableHTMLAttributes<HTMLTableElement>): import("react/jsx-runtime").JSX.Element;
|
|
8
24
|
displayName: string;
|
|
9
25
|
};
|
|
26
|
+
/** Renders the `<thead>` section of the table. */
|
|
10
27
|
Head: {
|
|
11
28
|
({ children, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): import("react/jsx-runtime").JSX.Element;
|
|
12
29
|
displayName: string;
|
|
13
30
|
};
|
|
31
|
+
/** Renders the `<tbody>` section of the table. */
|
|
14
32
|
Body: {
|
|
15
33
|
({ children, className, ...props }: React.HTMLAttributes<HTMLTableSectionElement>): import("react/jsx-runtime").JSX.Element;
|
|
16
34
|
displayName: string;
|
|
17
35
|
};
|
|
36
|
+
/** Renders a `<tr>` row within a `Table.Body`. */
|
|
18
37
|
Row: {
|
|
19
38
|
({ children, className, ...props }: React.HTMLAttributes<HTMLTableRowElement>): import("react/jsx-runtime").JSX.Element;
|
|
20
39
|
displayName: string;
|
|
21
40
|
};
|
|
41
|
+
/** Renders a `<td>` data cell within a `Table.Row`. */
|
|
22
42
|
Cell: {
|
|
23
43
|
({ children, className, ...props }: React.TdHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
|
|
24
44
|
displayName: string;
|
|
25
45
|
};
|
|
46
|
+
/** Renders a `<th>` header cell within a `Table.Head` row. */
|
|
26
47
|
HeaderCell: {
|
|
27
48
|
({ children, className, ...props }: React.ThHTMLAttributes<HTMLTableCellElement>): import("react/jsx-runtime").JSX.Element;
|
|
28
49
|
displayName: string;
|
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 = ({\n children,\n ...props\n}: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <thead {...props}>{children}</thead>\n);\nHead.displayName = \"Table.Head\";\n\nconst Body = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <tbody className={clsx(styles.tableBody, className)} {...props}>\n {children}\n </tbody>\n);\nBody.displayName = \"Table.Body\";\n\nconst Row = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLTableRowElement>) => (\n <tr className={clsx(styles.bodyRow, className)} {...props}>\n {children}\n </tr>\n);\nRow.displayName = \"Table.Row\";\n\nconst Cell = ({\n children,\n className,\n ...props\n}: React.TdHTMLAttributes<HTMLTableCellElement>) => (\n <td className={clsx(styles.bodyCell, className)} {...props}>\n {children}\n </td>\n);\nCell.displayName = \"Table.Cell\";\n\nconst Header = ({\n children,\n className,\n ...props\n}: React.ThHTMLAttributes<HTMLTableCellElement>) => (\n <th className={clsx(styles.headerCell, className)} {...props}>\n {children}\n </th>\n);\nHeader.displayName = \"Table.HeaderCell\";\n\nconst Container = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\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 = ({\n children,\n className,\n ...props\n}: React.TableHTMLAttributes<HTMLTableElement>) => (\n <table className={clsx(styles.tableComponent, className)} {...props}>\n {children}\n </table>\n);\nTableEl.displayName = \"Table.Table\";\n\nexport const Table = Object.assign(\n ({ children, ...props }: React.TableHTMLAttributes<HTMLTableElement>) => (\n <Container>\n <TableEl {...props}>{children}</TableEl>\n </Container>\n ),\n {\n Container,\n Table: TableEl,\n Head,\n Body,\n Row,\n Cell,\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":"0OAIA,MAAMA,EAAQC,IAAA,IAAAC,SACVA,GAAQD,EACLE,EAAKC,EAAAH,EAFE,cAGuC,OACjDI,EAAA,QAAAC,OAAAC,OAAA,GAAWJ,YAAQD,IAAiB,EAExCF,EAAKQ,YAAc,aAEnB,MAAMC,EAAQR,QAAAC,SACVA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHE,0BAIuC,OACjDI,EAAA,QAAAC,OAAAC,OAAA,CAAOG,UAAWC,EAAKC,EAAkBF,IAAgBP,YACpDD,IACG,EAEZO,EAAKD,YAAc,aAEnB,MAAMK,EAAOZ,QAAAC,SACTA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHC,0BAIoC,OAC7CI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKG,EAAgBJ,IAAgBP,YAC/CD,IACA,EAETW,EAAIL,YAAc,YAElB,MAAMO,EAAQd,QAAAC,SACVA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHE,0BAIsC,OAChDI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKK,EAAiBN,IAAgBP,YAChDD,IACA,EAETa,EAAKP,YAAc,aAEnB,MAAMS,EAAUhB,QAAAC,SACZA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHI,0BAIoC,OAChDI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKO,EAAmBR,IAAgBP,YAClDD,IACA,EAETe,EAAOT,YAAc,mBAErB,MAAMW,EAAalB,QAAAC,SACfA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHO,0BAIyB,OACxCI,uBACIK,UAAWC,EAAKS,EAAqBV,GAAU,cACnC,iBACRP,YAEHD,IACC,EAEViB,EAAUX,YAAc,kBAExB,MAAMa,EAAWpB,QAAAC,SACbA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHK,0BAIkC,OAC/CI,EAAA,QAAAC,OAAAC,OAAA,CAAOG,UAAWC,EAAKW,EAAuBZ,IAAgBP,YACzDD,IACG,EAEZmB,EAAQb,YAAc,
|
|
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 = ({\n children,\n ...props\n}: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <thead {...props}>{children}</thead>\n);\nHead.displayName = \"Table.Head\";\n\nconst Body = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLTableSectionElement>) => (\n <tbody className={clsx(styles.tableBody, className)} {...props}>\n {children}\n </tbody>\n);\nBody.displayName = \"Table.Body\";\n\nconst Row = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLTableRowElement>) => (\n <tr className={clsx(styles.bodyRow, className)} {...props}>\n {children}\n </tr>\n);\nRow.displayName = \"Table.Row\";\n\nconst Cell = ({\n children,\n className,\n ...props\n}: React.TdHTMLAttributes<HTMLTableCellElement>) => (\n <td className={clsx(styles.bodyCell, className)} {...props}>\n {children}\n </td>\n);\nCell.displayName = \"Table.Cell\";\n\nconst Header = ({\n children,\n className,\n ...props\n}: React.ThHTMLAttributes<HTMLTableCellElement>) => (\n <th className={clsx(styles.headerCell, className)} {...props}>\n {children}\n </th>\n);\nHeader.displayName = \"Table.HeaderCell\";\n\nconst Container = ({\n children,\n className,\n ...props\n}: React.HTMLAttributes<HTMLDivElement>) => (\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 = ({\n children,\n className,\n ...props\n}: React.TableHTMLAttributes<HTMLTableElement>) => (\n <table className={clsx(styles.tableComponent, className)} {...props}>\n {children}\n </table>\n);\nTableEl.displayName = \"Table.Table\";\n\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 }: React.TableHTMLAttributes<HTMLTableElement>) => (\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":"0OAIA,MAAMA,EAAQC,IAAA,IAAAC,SACVA,GAAQD,EACLE,EAAKC,EAAAH,EAFE,cAGuC,OACjDI,EAAA,QAAAC,OAAAC,OAAA,GAAWJ,YAAQD,IAAiB,EAExCF,EAAKQ,YAAc,aAEnB,MAAMC,EAAQR,QAAAC,SACVA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHE,0BAIuC,OACjDI,EAAA,QAAAC,OAAAC,OAAA,CAAOG,UAAWC,EAAKC,EAAkBF,IAAgBP,YACpDD,IACG,EAEZO,EAAKD,YAAc,aAEnB,MAAMK,EAAOZ,QAAAC,SACTA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHC,0BAIoC,OAC7CI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKG,EAAgBJ,IAAgBP,YAC/CD,IACA,EAETW,EAAIL,YAAc,YAElB,MAAMO,EAAQd,QAAAC,SACVA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHE,0BAIsC,OAChDI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKK,EAAiBN,IAAgBP,YAChDD,IACA,EAETa,EAAKP,YAAc,aAEnB,MAAMS,EAAUhB,QAAAC,SACZA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHI,0BAIoC,OAChDI,EAAA,KAAAC,OAAAC,OAAA,CAAIG,UAAWC,EAAKO,EAAmBR,IAAgBP,YAClDD,IACA,EAETe,EAAOT,YAAc,mBAErB,MAAMW,EAAalB,QAAAC,SACfA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHO,0BAIyB,OACxCI,uBACIK,UAAWC,EAAKS,EAAqBV,GAAU,cACnC,iBACRP,YAEHD,IACC,EAEViB,EAAUX,YAAc,kBAExB,MAAMa,EAAWpB,QAAAC,SACbA,EAAQQ,UACRA,GAAST,EACNE,EAAKC,EAAAH,EAHK,0BAIkC,OAC/CI,EAAA,QAAAC,OAAAC,OAAA,CAAOG,UAAWC,EAAKW,EAAuBZ,IAAgBP,YACzDD,IACG,EAEZmB,EAAQb,YAAc,cAgBf,MAAMe,EAAQjB,OAAOC,QACvBN,IAAA,IAAAC,SAAEA,GAAQD,EAAKE,EAAKC,EAAAH,EAApB,cAAwE,OACrEI,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/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/**\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,IASFC,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/**\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":"oGAaO,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/**\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/**\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":"sKAqBO,MAAMA,EAAW,KACpB,MAAMC,EAAUC,EAAWC,GAE3B,OAAKF,GACM,CACHG,MAAO,SACPC,KAAM,QACNC,aAAc,KAIR,EAaLC,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"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
import type { ThemeProviderProps } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Establishes a themed scope for its subtree.
|
|
4
|
+
*
|
|
5
|
+
* Wrap a section of the tree in `ThemeProvider` to activate a design-token set
|
|
6
|
+
* and colour mode. Components below it read tokens via CSS variables or the
|
|
7
|
+
* `useTheme` hook. Providers can be nested to override a subtree's theme.
|
|
8
|
+
*/
|
|
2
9
|
export declare const ThemeProvider: (props: ThemeProviderProps & import("react").RefAttributes<HTMLDivElement>) => React.ReactElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/theme/theme-provider/index.tsx"],"sourcesContent":["import type { Ref } from \"react\";\nimport { forwardRef, useEffect, useMemo, useState } from \"react\";\n\nimport { mergeRefs, useIsomorphicLayoutEffect } from \"../../util\";\nimport type { ResolvedThemeMode } from \"../types\";\nimport { setupBreakpointListener } from \"./breakpoint\";\nimport { ThemeContext } from \"./context\";\nimport { listenToSystemColourMode } from \"./system-colour-mode\";\nimport type { ThemeProviderProps } from \"./types\";\n\nconst InnerThemeProvider = (\n {\n children,\n theme = \"lifesg\",\n mode = \"auto\",\n className,\n style,\n }: ThemeProviderProps,\n ref: Ref<HTMLDivElement>\n) => {\n const isModeControlled = mode !== \"auto\";\n\n const [computedMode, setComputedMode] = useState<ResolvedThemeMode>(\n isModeControlled ? mode : \"light\"\n );\n const [themeElement, setThemeElement] = useState<HTMLDivElement | null>(\n null\n );\n\n // Re-subscribe when the source node or token set changes:\n // - `themeElement`: scoped breakpoint tokens may live on this element\n // - `theme` / `themeMode`: breakpoint token values can differ across theme/mode\n useIsomorphicLayoutEffect(() => {\n const sourceElement = themeElement ?? document.documentElement;\n const cleanup = setupBreakpointListener(sourceElement);\n return cleanup;\n }, [themeElement, theme, computedMode]);\n\n useEffect(() => {\n if (isModeControlled) {\n setComputedMode(mode);\n return;\n }\n\n return listenToSystemColourMode(setComputedMode);\n }, [isModeControlled, mode]);\n\n const contextValue = useMemo(\n () => ({\n theme,\n mode: computedMode,\n themeElement,\n }),\n [theme, computedMode, themeElement]\n );\n\n return (\n <ThemeContext.Provider value={contextValue}>\n <div\n ref={mergeRefs(ref, setThemeElement)}\n data-fds-theme={theme}\n data-fds-theme-mode={computedMode}\n className={className}\n style={style}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n};\n\nexport const ThemeProvider = forwardRef<HTMLDivElement, ThemeProviderProps>(\n InnerThemeProvider\n);\n"],"names":["ThemeProvider","forwardRef","children","theme","mode","className","style","ref","isModeControlled","computedMode","setComputedMode","useState","themeElement","setThemeElement","useIsomorphicLayoutEffect","sourceElement","document","documentElement","setupBreakpointListener","useEffect","listenToSystemColourMode","contextValue","useMemo","_jsx","ThemeContext","Provider","value","mergeRefs"],"mappings":"2mBAUA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/theme/theme-provider/index.tsx"],"sourcesContent":["import type { Ref } from \"react\";\nimport { forwardRef, useEffect, useMemo, useState } from \"react\";\n\nimport { mergeRefs, useIsomorphicLayoutEffect } from \"../../util\";\nimport type { ResolvedThemeMode } from \"../types\";\nimport { setupBreakpointListener } from \"./breakpoint\";\nimport { ThemeContext } from \"./context\";\nimport { listenToSystemColourMode } from \"./system-colour-mode\";\nimport type { ThemeProviderProps } from \"./types\";\n\nconst InnerThemeProvider = (\n {\n children,\n theme = \"lifesg\",\n mode = \"auto\",\n className,\n style,\n }: ThemeProviderProps,\n ref: Ref<HTMLDivElement>\n) => {\n const isModeControlled = mode !== \"auto\";\n\n const [computedMode, setComputedMode] = useState<ResolvedThemeMode>(\n isModeControlled ? mode : \"light\"\n );\n const [themeElement, setThemeElement] = useState<HTMLDivElement | null>(\n null\n );\n\n // Re-subscribe when the source node or token set changes:\n // - `themeElement`: scoped breakpoint tokens may live on this element\n // - `theme` / `themeMode`: breakpoint token values can differ across theme/mode\n useIsomorphicLayoutEffect(() => {\n const sourceElement = themeElement ?? document.documentElement;\n const cleanup = setupBreakpointListener(sourceElement);\n return cleanup;\n }, [themeElement, theme, computedMode]);\n\n useEffect(() => {\n if (isModeControlled) {\n setComputedMode(mode);\n return;\n }\n\n return listenToSystemColourMode(setComputedMode);\n }, [isModeControlled, mode]);\n\n const contextValue = useMemo(\n () => ({\n theme,\n mode: computedMode,\n themeElement,\n }),\n [theme, computedMode, themeElement]\n );\n\n return (\n <ThemeContext.Provider value={contextValue}>\n <div\n ref={mergeRefs(ref, setThemeElement)}\n data-fds-theme={theme}\n data-fds-theme-mode={computedMode}\n className={className}\n style={style}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n};\n\n/**\n * Establishes a themed scope for its subtree.\n *\n * Wrap a section of the tree in `ThemeProvider` to activate a design-token set\n * and colour mode. Components below it read tokens via CSS variables or the\n * `useTheme` hook. Providers can be nested to override a subtree's theme.\n */\nexport const ThemeProvider = forwardRef<HTMLDivElement, ThemeProviderProps>(\n InnerThemeProvider\n);\n"],"names":["ThemeProvider","forwardRef","children","theme","mode","className","style","ref","isModeControlled","computedMode","setComputedMode","useState","themeElement","setThemeElement","useIsomorphicLayoutEffect","sourceElement","document","documentElement","setupBreakpointListener","useEffect","listenToSystemColourMode","contextValue","useMemo","_jsx","ThemeContext","Provider","value","mergeRefs"],"mappings":"2mBAUA,MAoEaA,EAAgBC,GApEF,EAEnBC,WACAC,QAAQ,SACRC,OAAO,OACPC,YACAC,SAEJC,KAEA,MAAMC,EAA4B,SAATJ,GAElBK,EAAcC,GAAmBC,EACpCH,EAAmBJ,EAAO,UAEvBQ,EAAcC,GAAmBF,EACpC,MAMJG,GAA0B,KACtB,MAAMC,EAAgBH,QAAAA,EAAgBI,SAASC,gBAE/C,OADgBC,EAAwBH,EAC1B,GACf,CAACH,EAAcT,EAAOM,IAEzBU,GAAU,KACN,IAAIX,EAKJ,OAAOY,EAAyBV,GAJ5BA,EAAgBN,EAI4B,GACjD,CAACI,EAAkBJ,IAEtB,MAAMiB,EAAeC,GACjB,KAAA,CACInB,QACAC,KAAMK,EACNG,kBAEJ,CAACT,EAAOM,EAAcG,IAG1B,OACIW,EAACC,EAAaC,UAASC,MAAOL,EAAYnB,SACtCqB,SACIhB,IAAKoB,EAAUpB,EAAKM,GAAgB,iBACpBV,EAAK,sBACAM,EACrBJ,UAAWA,EACXC,MAAOA,EAAKJ,SAEXA,KAEe"}
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
2
|
import type { ResolvedThemeMode, ThemeMode, ThemeType } from "../types";
|
|
3
|
+
/** Value exposed by the `ThemeProvider` context. */
|
|
3
4
|
export interface ThemeContextValue {
|
|
5
|
+
/** Active theme token set name. */
|
|
4
6
|
theme: ThemeType;
|
|
7
|
+
/** Resolved colour mode. */
|
|
5
8
|
mode: ResolvedThemeMode;
|
|
6
9
|
/**
|
|
7
10
|
* Element that hosts the current theme scope. Useful for scoped theming.
|
|
8
11
|
*/
|
|
9
12
|
themeElement: HTMLElement | null;
|
|
10
13
|
}
|
|
14
|
+
/** Props for the `ThemeProvider` component. */
|
|
11
15
|
export interface ThemeProviderProps {
|
|
12
16
|
children: React.ReactNode;
|
|
13
17
|
className?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Colour mode applied to the themed subtree.
|
|
20
|
+
*
|
|
21
|
+
* @default "auto"
|
|
22
|
+
*/
|
|
14
23
|
mode?: ThemeMode | undefined;
|
|
15
24
|
style?: CSSProperties | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Design token set to activate.
|
|
27
|
+
*
|
|
28
|
+
* @default "lifesg"
|
|
29
|
+
*/
|
|
16
30
|
theme?: ThemeType | undefined;
|
|
17
31
|
}
|
package/theme/tokens/border.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
/** Border width tokens. */
|
|
1
2
|
export declare const BorderThickness: {
|
|
2
3
|
readonly "width-005": "var(--fds-border-width-005)";
|
|
3
4
|
readonly "width-010": "var(--fds-border-width-010)";
|
|
4
5
|
readonly "width-020": "var(--fds-border-width-020)";
|
|
5
6
|
readonly "width-040": "var(--fds-border-width-040)";
|
|
6
7
|
};
|
|
8
|
+
/** Border style tokens. */
|
|
7
9
|
export declare const BorderStyle: {
|
|
8
10
|
readonly solid: "var(--fds-border-style-solid)";
|
|
9
11
|
};
|
|
12
|
+
/** Border tokens consisting of border width and border style. */
|
|
10
13
|
export declare const Border: {
|
|
11
14
|
readonly solid: "var(--fds-border-style-solid)";
|
|
12
15
|
readonly "width-005": "var(--fds-border-width-005)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"border.js","sources":["../../../src/theme/tokens/border.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"border.js","sources":["../../../src/theme/tokens/border.ts"],"sourcesContent":["/** Border width tokens. */\nexport const BorderThickness = {\n \"width-005\": \"var(--fds-border-width-005)\",\n \"width-010\": \"var(--fds-border-width-010)\",\n \"width-020\": \"var(--fds-border-width-020)\",\n \"width-040\": \"var(--fds-border-width-040)\",\n} as const;\n\n/** Border style tokens. */\nexport const BorderStyle = {\n solid: \"var(--fds-border-style-solid)\",\n} as const;\n\n/** Border tokens consisting of border width and border style. */\nexport const Border = {\n ...BorderThickness,\n ...BorderStyle,\n} as const;\n"],"names":["BorderThickness","BorderStyle","solid","Border","Object"],"mappings":"AACO,MAAMA,EAAkB,CAC3B,YAAa,8BACb,YAAa,8BACb,YAAa,8BACb,YAAa,+BAIJC,EAAc,CACvBC,MAAO,iCAIEC,EAASC,+BACfJ,GACAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breakpoint.js","sources":["../../../src/theme/tokens/breakpoint.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"breakpoint.js","sources":["../../../src/theme/tokens/breakpoint.ts"],"sourcesContent":["/**\n * Responsive breakpoint tokens for each named breakpoint.\n */\nexport const Breakpoint = {\n \"xxs-min\": \"var(--fds-breakpoint-xxs-min)\",\n \"xxs-max\": \"var(--fds-breakpoint-xxs-max)\",\n \"xs-min\": \"var(--fds-breakpoint-xs-min)\",\n \"xs-max\": \"var(--fds-breakpoint-xs-max)\",\n \"sm-min\": \"var(--fds-breakpoint-sm-min)\",\n \"sm-max\": \"var(--fds-breakpoint-sm-max)\",\n \"md-min\": \"var(--fds-breakpoint-md-min)\",\n \"md-max\": \"var(--fds-breakpoint-md-max)\",\n \"lg-min\": \"var(--fds-breakpoint-lg-min)\",\n \"lg-max\": \"var(--fds-breakpoint-lg-max)\",\n \"xl-min\": \"var(--fds-breakpoint-xl-min)\",\n \"xl-max\": \"var(--fds-breakpoint-xl-max)\",\n \"xxl-min\": \"var(--fds-breakpoint-xxl-min)\",\n\n \"xxs-column\": \"var(--fds-breakpoint-column-xxs)\",\n \"xs-column\": \"var(--fds-breakpoint-column-xs)\",\n \"sm-column\": \"var(--fds-breakpoint-column-sm)\",\n \"md-column\": \"var(--fds-breakpoint-column-md)\",\n \"lg-column\": \"var(--fds-breakpoint-column-lg)\",\n \"xl-column\": \"var(--fds-breakpoint-column-xl)\",\n \"xxl-column\": \"var(--fds-breakpoint-column-xxl)\",\n\n \"xxs-gutter\": \"var(--fds-breakpoint-gutter-xxs)\",\n \"xs-gutter\": \"var(--fds-breakpoint-gutter-xs)\",\n \"sm-gutter\": \"var(--fds-breakpoint-gutter-sm)\",\n \"md-gutter\": \"var(--fds-breakpoint-gutter-md)\",\n \"lg-gutter\": \"var(--fds-breakpoint-gutter-lg)\",\n \"xl-gutter\": \"var(--fds-breakpoint-gutter-xl)\",\n \"xxl-gutter\": \"var(--fds-breakpoint-gutter-xxl)\",\n\n \"xxs-margin\": \"var(--fds-breakpoint-margin-xxs)\",\n \"xs-margin\": \"var(--fds-breakpoint-margin-xs)\",\n \"sm-margin\": \"var(--fds-breakpoint-margin-sm)\",\n \"md-margin\": \"var(--fds-breakpoint-margin-md)\",\n \"lg-margin\": \"var(--fds-breakpoint-margin-lg)\",\n \"xl-margin\": \"var(--fds-breakpoint-margin-xl)\",\n \"xxl-margin\": \"var(--fds-breakpoint-margin-xxl)\",\n} as const;\n"],"names":["Breakpoint"],"mappings":"AAGO,MAAMA,EAAa,CACtB,UAAW,gCACX,UAAW,gCACX,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,SAAU,+BACV,UAAW,gCAEX,aAAc,mCACd,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,aAAc,mCAEd,aAAc,mCACd,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,aAAc,mCAEd,aAAc,mCACd,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,YAAa,kCACb,aAAc"}
|
package/theme/tokens/colour.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Base colour palette */
|
|
1
2
|
export declare const PrimitiveColours: {
|
|
2
3
|
readonly "brand-10": "var(--fds-colour-brand-10)";
|
|
3
4
|
readonly "brand-20": "var(--fds-colour-brand-20)";
|
|
@@ -91,6 +92,7 @@ export declare const PrimitiveColours: {
|
|
|
91
92
|
readonly black: "var(--fds-colour-black)";
|
|
92
93
|
readonly "primary-inverse": "var(--fds-colour-primary-inverse)";
|
|
93
94
|
};
|
|
95
|
+
/** Purpose-driven colour tokens. */
|
|
94
96
|
export declare const SemanticColours: {
|
|
95
97
|
readonly text: "var(--fds-colour-text)";
|
|
96
98
|
readonly "text-subtle": "var(--fds-colour-text-subtle)";
|
|
@@ -221,6 +223,7 @@ export declare const SemanticColours: {
|
|
|
221
223
|
readonly "focus-ring": "var(--fds-colour-focus-ring)";
|
|
222
224
|
readonly "focus-ring-inverse": "var(--fds-colour-focus-ring-inverse)";
|
|
223
225
|
};
|
|
226
|
+
/** Combined colour token set. */
|
|
224
227
|
export declare const Colour: {
|
|
225
228
|
readonly text: "var(--fds-colour-text)";
|
|
226
229
|
readonly "text-subtle": "var(--fds-colour-text-subtle)";
|