@westpac/ui 0.7.1 → 0.9.0
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/CHANGELOG.md +13 -0
- package/assets/icons/filled/exit-filled.svg +3 -3
- package/assets/icons/outlined/exit-outlined.svg +3 -3
- package/dist/component-type.json +1 -1
- package/dist/components/accordion/components/accordion-item/accordion-item.styles.d.ts +2 -0
- package/dist/components/accordion/components/accordion-item/accordion-item.styles.js +2 -1
- package/dist/components/alert/alert.styles.js +4 -4
- package/dist/components/badge/badge.styles.js +1 -1
- package/dist/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.component.js +1 -1
- package/dist/components/button/button.styles.js +3 -3
- package/dist/components/button-dropdown/components/panel/panel.styles.js +1 -1
- package/dist/components/compacta/compacta.styles.js +4 -4
- package/dist/components/error-message/error-message.styles.js +2 -2
- package/dist/components/form/components/form-group/form-group.styles.d.ts +1 -1
- package/dist/components/form/components/form-group/form-group.styles.js +1 -1
- package/dist/components/form/form.component.d.ts +1 -1
- package/dist/components/form/form.component.js +1 -2
- package/dist/components/form/form.stories.d.ts +2 -2
- package/dist/components/form/form.types.d.ts +0 -4
- package/dist/components/form-hint/form-hint.styles.d.ts +1 -1
- package/dist/components/form-hint/form-hint.styles.js +1 -1
- package/dist/components/form-label/form-label.styles.d.ts +1 -1
- package/dist/components/form-label/form-label.styles.js +1 -1
- package/dist/components/icon/components/exit-icon.js +2 -2
- package/dist/components/input-field/components/add-ons/components/icon-add-on/icon-add-on.styles.js +6 -6
- package/dist/components/input-field/components/add-ons/components/text-add-on/text-add-on.styles.js +5 -5
- package/dist/components/list/components/item/item.styles.js +4 -4
- package/dist/components/modal/components/dialog/dialog.styles.js +1 -1
- package/dist/components/pagination/components/pagination-item/pagination-item.styles.d.ts +1 -1
- package/dist/components/pagination/components/pagination-item/pagination-item.styles.js +1 -1
- package/dist/components/panel/panel.styles.js +1 -1
- package/dist/components/pictogram/components/decorative/wbc-bank-card-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/accessibility-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/accounts-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/aeroplane-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/arrow-down-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/arrow-left-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/arrow-right-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/arrow-up-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/arrows-passing-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/atm-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/australia-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/bank-card-locked-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/bank-card-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/bank-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/birth-certificate-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/building-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/buoy-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/bus-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/business-person-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/calculator-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/calendar-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/car-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/cash-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/celebration-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/chat-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/clock-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/coffee-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/coins-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/compass-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/customer-profile-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/desktop-computer-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/document-and-pen-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/dollar-sign-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/drivers-licence-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/education-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/eftpos-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/envelope-email-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/envelope-printed-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/face-happy-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/face-unhappy-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/face-unsure-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/finger-motion-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/fingerprint-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/football-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/fork-knife-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/generic-document-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/gift-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/globe-australia-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/globe-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/graph-decreasing-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/graph-increasing-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/gym-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/headset-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/heart-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/house-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/light-bulb-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/loop-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/medicare-card-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/mobile-device-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/money-in-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/money-out-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/movie-tickets-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/nest-egg-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/noodles-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/number-1-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/number-2-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/number-3-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/number-4-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/number-5-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/padlock-locked-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/padlock-unlocked-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/passport-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/percent-sign-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/person-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/piggy-bank-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/pizza-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/plant-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/search-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/secure-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/shop-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/shopping-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/star-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/stopwatch-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/tax-document-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/telephone-call-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/thumbs-up-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/tick-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/tools-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/tractor-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/truck-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/umbrella-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/unsecure-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/wallet-pictogram.js +1 -0
- package/dist/components/pictogram/components/informative/wearables-pictogram.js +1 -0
- package/dist/components/pictogram/pictogram.component.js +1 -0
- package/dist/components/popover/components/panel/panel.component.d.ts +1 -1
- package/dist/components/popover/components/panel/panel.component.js +39 -5
- package/dist/components/popover/components/panel/panel.styles.js +5 -5
- package/dist/components/popover/components/panel/panel.types.d.ts +12 -2
- package/dist/components/popover/popover.component.d.ts +4 -0
- package/dist/components/popover/popover.component.js +12 -6
- package/dist/components/popover/popover.hooks.d.ts +3 -0
- package/dist/components/popover/popover.hooks.js +37 -0
- package/dist/components/popover/popover.stories.d.ts +9 -5
- package/dist/components/popover/popover.types.d.ts +1 -1
- package/dist/components/progress-bar/progress-bar.styles.js +2 -2
- package/dist/components/repeater/repeater.styles.d.ts +6 -0
- package/dist/components/repeater/repeater.styles.js +10 -7
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/table/components/row/row.styles.js +1 -1
- package/dist/components/tabs/components/tab/tab.styles.d.ts +1 -1
- package/dist/components/tabs/components/tab/tab.styles.js +4 -4
- package/dist/css/westpac-ui.css +551 -373
- package/dist/css/westpac-ui.min.css +551 -373
- package/dist/stories/foundation/spacing.stories.d.ts +15 -0
- package/dist/stories/foundation/typography.stories.d.ts +8 -0
- package/dist/tailwind/__mocks__/utils.constants.d.ts +73 -36
- package/dist/tailwind/__mocks__/utils.constants.js +73 -36
- package/dist/tailwind/constants/spacing.d.ts +2 -36
- package/dist/tailwind/constants/spacing.js +2 -1
- package/dist/tailwind/constants/typography.d.ts +4 -0
- package/dist/tailwind/constants/typography.js +4 -0
- package/dist/tailwind/tailwind-plugin.js +9 -1
- package/dist/tailwind/types/index.d.ts +0 -1
- package/dist/tailwind/types/index.js +0 -1
- package/dist/tailwind/utils/create-spacing.d.ts +2 -3
- package/dist/tailwind/utils/create-spacing.js +7 -7
- package/package.json +4 -2
- package/src/components/accordion/components/accordion-item/accordion-item.styles.ts +1 -0
- package/src/components/alert/alert.styles.ts +4 -4
- package/src/components/badge/badge.styles.ts +1 -1
- package/src/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.component.tsx +1 -1
- package/src/components/button/button.styles.ts +3 -3
- package/src/components/button-dropdown/components/panel/panel.styles.ts +1 -2
- package/src/components/compacta/compacta.styles.ts +4 -4
- package/src/components/error-message/error-message.component.tsx +1 -7
- package/src/components/error-message/error-message.styles.ts +3 -2
- package/src/components/form/components/form-group/form-group.styles.ts +1 -1
- package/src/components/form/form.component.tsx +2 -2
- package/src/components/form/form.types.ts +0 -4
- package/src/components/form-hint/form-hint.styles.ts +1 -1
- package/src/components/form-label/form-label.styles.ts +1 -1
- package/src/components/icon/components/exit-icon.tsx +2 -2
- package/src/components/icon/index.ts +1 -0
- package/src/components/input-field/components/add-ons/components/icon-add-on/icon-add-on.styles.ts +16 -16
- package/src/components/input-field/components/add-ons/components/text-add-on/text-add-on.styles.ts +5 -5
- package/src/components/list/components/item/item.styles.ts +4 -4
- package/src/components/modal/components/dialog/dialog.styles.ts +1 -1
- package/src/components/pagination/components/pagination-item/pagination-item.styles.ts +1 -1
- package/src/components/panel/panel.styles.ts +1 -1
- package/src/components/pictogram/components/decorative/wbc-bank-card-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/accessibility-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/accounts-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/aeroplane-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/arrow-down-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/arrow-left-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/arrow-right-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/arrow-up-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/arrows-passing-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/atm-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/australia-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/bank-card-locked-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/bank-card-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/bank-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/birth-certificate-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/building-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/buoy-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/bus-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/business-person-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/calculator-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/calendar-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/car-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/cash-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/celebration-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/chat-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/clock-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/coffee-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/coins-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/compass-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/customer-profile-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/desktop-computer-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/document-and-pen-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/dollar-sign-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/drivers-licence-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/education-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/eftpos-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/envelope-email-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/envelope-printed-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/face-happy-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/face-unhappy-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/face-unsure-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/finger-motion-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/fingerprint-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/football-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/fork-knife-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/generic-document-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/gift-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/globe-australia-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/globe-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/graph-decreasing-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/graph-increasing-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/gym-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/headset-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/heart-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/house-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/light-bulb-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/loop-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/medicare-card-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/mobile-device-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/money-in-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/money-out-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/movie-tickets-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/nest-egg-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/noodles-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/number-1-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/number-2-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/number-3-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/number-4-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/number-5-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/padlock-locked-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/padlock-unlocked-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/passport-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/percent-sign-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/person-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/piggy-bank-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/pizza-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/plant-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/search-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/secure-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/shop-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/shopping-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/star-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/stopwatch-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/tax-document-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/telephone-call-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/thumbs-up-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/tick-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/tools-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/tractor-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/truck-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/umbrella-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/unsecure-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/wallet-pictogram.tsx +2 -0
- package/src/components/pictogram/components/informative/wearables-pictogram.tsx +2 -0
- package/src/components/pictogram/pictogram.component.tsx +2 -0
- package/src/components/popover/components/panel/panel.component.tsx +36 -6
- package/src/components/popover/components/panel/panel.styles.ts +5 -5
- package/src/components/popover/components/panel/panel.types.ts +13 -2
- package/src/components/popover/popover.component.tsx +13 -2
- package/src/components/popover/popover.hooks.tsx +56 -0
- package/src/components/popover/popover.types.ts +1 -1
- package/src/components/progress-bar/progress-bar.styles.ts +2 -2
- package/src/components/repeater/repeater.styles.ts +10 -7
- package/src/components/switch/switch.styles.ts +1 -1
- package/src/components/table/components/row/row.styles.ts +1 -1
- package/src/components/tabs/components/tab/tab.styles.ts +4 -4
- package/src/css/global.css +4 -2
- package/src/tailwind/__mocks__/utils.constants.ts +73 -36
- package/src/tailwind/constants/spacing.ts +2 -1
- package/src/tailwind/constants/typography.ts +4 -0
- package/src/tailwind/tailwind-plugin.ts +9 -0
- package/src/tailwind/types/index.ts +0 -1
- package/src/tailwind/utils/create-spacing.ts +9 -13
- package/.storybook/global.css +0 -108
- package/.storybook/main.ts +0 -33
- package/.storybook/manager.ts +0 -6
- package/.storybook/preview.tsx +0 -91
- package/.storybook/theme.ts +0 -9
- package/dist/components/accordion/accordion.stories.js +0 -139
- package/dist/components/alert/alert.stories.js +0 -144
- package/dist/components/autocomplete/autocomplete.stories.js +0 -219
- package/dist/components/badge/badge.stories.js +0 -118
- package/dist/components/breadcrumb/breadcrumb.stories.js +0 -30
- package/dist/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.stories.js +0 -24
- package/dist/components/button/button.stories.js +0 -221
- package/dist/components/button-dropdown/button-dropdown.stories.js +0 -134
- package/dist/components/button-group/button-group.stories.js +0 -153
- package/dist/components/checkbox-group/checkbox-group.stories.js +0 -225
- package/dist/components/checkbox-group/components/checkbox/checkbox.stories.js +0 -42
- package/dist/components/circle/circle.stories.js +0 -17
- package/dist/components/collapsible/collapsible.stories.js +0 -43
- package/dist/components/compacta/compacta.stories.js +0 -52
- package/dist/components/date-picker/date-picker.stories.js +0 -112
- package/dist/components/field/field.stories.js +0 -37
- package/dist/components/flexi-cell/flexi-cell.stories.js +0 -759
- package/dist/components/form/form.stories.js +0 -103
- package/dist/components/grid/grid.stories.js +0 -82
- package/dist/components/icon/icon.stories.js +0 -147
- package/dist/components/input/input.stories.js +0 -56
- package/dist/components/input-field/input-field.scenarios.stories.js +0 -149
- package/dist/components/input-field/input-field.sizes.stories.js +0 -91
- package/dist/components/input-field/input-field.state.stories.js +0 -127
- package/dist/components/input-field/input-field.stories.js +0 -71
- package/dist/components/input-field/input-field.type.stories.js +0 -186
- package/dist/components/link/link.stories.js +0 -93
- package/dist/components/list/list.stories.js +0 -86
- package/dist/components/modal/modal.stories.js +0 -129
- package/dist/components/pagination/pagination.stories.js +0 -199
- package/dist/components/panel/panel.stories.js +0 -53
- package/dist/components/pictogram/pictogram.stories.js +0 -60
- package/dist/components/popover/popover.stories.js +0 -57
- package/dist/components/progress-bar/progress-bar.stories.js +0 -70
- package/dist/components/progress-rope/progress-rope.stories.js +0 -126
- package/dist/components/radio-group/components/radio/radio.stories.js +0 -40
- package/dist/components/radio-group/radio-group.stories.js +0 -215
- package/dist/components/repeater/repeater.stories.js +0 -29
- package/dist/components/select/select.stories.js +0 -74
- package/dist/components/selector/selector.stories.js +0 -512
- package/dist/components/skip-link/skip-link.stories.js +0 -29
- package/dist/components/switch/switch.stories.js +0 -67
- package/dist/components/symbol/symbol.stories.js +0 -113
- package/dist/components/table/table.stories.js +0 -66
- package/dist/components/tabs/tabs.stories.js +0 -95
- package/dist/components/textarea/textarea.stories.js +0 -44
- package/dist/components/visually-hidden/visually-hidden.stories.js +0 -17
- package/dist/components/well/well.stories.js +0 -44
- package/dist/stories/foundation/breakpoints.stories.js +0 -12
- package/dist/stories/foundation/colours.stories.js +0 -386
- package/dist/stories/foundation/theme.stories.js +0 -16
- package/dist/stories/foundation/typography.stories.js +0 -109
- package/dist/tailwind/types/theme.types.d.ts +0 -1
- package/dist/tailwind/types/theme.types.js +0 -1
- package/scaffold/component/scaffold.component.hbs +0 -12
- package/scaffold/component/scaffold.index.hbs +0 -2
- package/scaffold/component/scaffold.spec.hbs +0 -16
- package/scaffold/component/scaffold.stories.hbs +0 -23
- package/scaffold/component/scaffold.styles.hbs +0 -9
- package/scaffold/component/scaffold.types.hbs +0 -12
- package/src/components/accordion/accordion.stories.tsx +0 -144
- package/src/components/alert/alert.stories.tsx +0 -142
- package/src/components/autocomplete/autocomplete.stories.tsx +0 -184
- package/src/components/badge/badge.stories.tsx +0 -134
- package/src/components/breadcrumb/breadcrumb.stories.tsx +0 -32
- package/src/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.stories.tsx +0 -33
- package/src/components/button/button.stories.tsx +0 -269
- package/src/components/button-dropdown/button-dropdown.stories.tsx +0 -220
- package/src/components/button-group/button-group.stories.tsx +0 -141
- package/src/components/checkbox-group/checkbox-group.stories.tsx +0 -212
- package/src/components/checkbox-group/components/checkbox/checkbox.stories.tsx +0 -46
- package/src/components/circle/circle.stories.tsx +0 -22
- package/src/components/collapsible/collapsible.stories.tsx +0 -94
- package/src/components/compacta/compacta.stories.tsx +0 -71
- package/src/components/date-picker/date-picker.stories.tsx +0 -139
- package/src/components/field/field.stories.tsx +0 -57
- package/src/components/flexi-cell/flexi-cell.stories.tsx +0 -792
- package/src/components/form/form.stories.tsx +0 -158
- package/src/components/grid/grid.stories.tsx +0 -106
- package/src/components/icon/icon.stories.tsx +0 -142
- package/src/components/input/input.stories.tsx +0 -70
- package/src/components/input-field/input-field.scenarios.stories.tsx +0 -174
- package/src/components/input-field/input-field.sizes.stories.tsx +0 -102
- package/src/components/input-field/input-field.state.stories.tsx +0 -148
- package/src/components/input-field/input-field.stories.tsx +0 -104
- package/src/components/input-field/input-field.type.stories.tsx +0 -236
- package/src/components/link/link.stories.tsx +0 -113
- package/src/components/list/list.stories.tsx +0 -121
- package/src/components/modal/modal.stories.tsx +0 -140
- package/src/components/pagination/pagination.stories.tsx +0 -174
- package/src/components/panel/panel.stories.tsx +0 -147
- package/src/components/pictogram/pictogram.stories.tsx +0 -50
- package/src/components/popover/popover.stories.tsx +0 -81
- package/src/components/progress-bar/progress-bar.stories.tsx +0 -85
- package/src/components/progress-rope/progress-rope.stories.tsx +0 -109
- package/src/components/radio-group/components/radio/radio.stories.tsx +0 -40
- package/src/components/radio-group/radio-group.stories.tsx +0 -199
- package/src/components/repeater/repeater.stories.tsx +0 -40
- package/src/components/select/select.stories.tsx +0 -88
- package/src/components/selector/selector.stories.tsx +0 -618
- package/src/components/skip-link/skip-link.stories.tsx +0 -55
- package/src/components/switch/switch.stories.tsx +0 -90
- package/src/components/symbol/symbol.stories.tsx +0 -131
- package/src/components/table/table.stories.tsx +0 -244
- package/src/components/tabs/tabs.stories.tsx +0 -111
- package/src/components/textarea/textarea.stories.tsx +0 -70
- package/src/components/visually-hidden/visually-hidden.stories.tsx +0 -25
- package/src/components/well/well.stories.tsx +0 -71
- package/src/stories/foundation/breakpoints.stories.tsx +0 -55
- package/src/stories/foundation/colours.stories.tsx +0 -380
- package/src/stories/foundation/theme.stories.tsx +0 -29
- package/src/stories/foundation/typography.stories.tsx +0 -93
- package/src/tailwind/types/theme.types.ts +0 -37
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Well } from './well.component.js';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof Well> = {
|
|
6
|
-
title: 'Components/Well',
|
|
7
|
-
component: Well,
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
type Story = StoryObj<typeof meta>;
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* > Default usage example
|
|
17
|
-
*/
|
|
18
|
-
export const Default: Story = {
|
|
19
|
-
args: {
|
|
20
|
-
children: "Look, I'm in a well",
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* > Nested usage example
|
|
26
|
-
*/
|
|
27
|
-
export const Nested: Story = {
|
|
28
|
-
args: {
|
|
29
|
-
children: (
|
|
30
|
-
<>
|
|
31
|
-
I am outside
|
|
32
|
-
<Well color="white">I am inside</Well>
|
|
33
|
-
</>
|
|
34
|
-
),
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* > Tag as <article>
|
|
40
|
-
*/
|
|
41
|
-
export const CustomTag: Story = {
|
|
42
|
-
args: {
|
|
43
|
-
tag: 'article',
|
|
44
|
-
children: "Look, I'm in a well",
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* > Nested tag as <article>
|
|
50
|
-
*/
|
|
51
|
-
export const CustomTagNested: Story = {
|
|
52
|
-
args: {
|
|
53
|
-
tag: 'article',
|
|
54
|
-
children: (
|
|
55
|
-
<>
|
|
56
|
-
I am outside
|
|
57
|
-
<Well color="white">I am inside</Well>
|
|
58
|
-
</>
|
|
59
|
-
),
|
|
60
|
-
},
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* > Tag as <aside> with child <san>, passed as a component
|
|
65
|
-
*/
|
|
66
|
-
export const ComplexCustomTagNested: Story = {
|
|
67
|
-
args: {
|
|
68
|
-
tag: 'aside',
|
|
69
|
-
children: <span>Look, I'm in a well</span>,
|
|
70
|
-
},
|
|
71
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Table } from '../../components/index.js';
|
|
4
|
-
|
|
5
|
-
const meta: Meta = {
|
|
6
|
-
title: 'Foundation/Breakpoints',
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Breakpoints are a set of predefined viewport widths that can be used to change the layout of a webpage to ensure it accommodates different devices.
|
|
15
|
-
* For styling GEL is using Tailwind and refer https://tailwindcss.com/docs/responsive-design for detailed documentation.
|
|
16
|
-
*/
|
|
17
|
-
export const Breakpoints = () => (
|
|
18
|
-
<Table>
|
|
19
|
-
<Table.Caption>GEL breakpoint tokens</Table.Caption>
|
|
20
|
-
<Table.Header>
|
|
21
|
-
<Table.HeaderRow>
|
|
22
|
-
<Table.HeaderCell>Token</Table.HeaderCell>
|
|
23
|
-
<Table.HeaderCell>Value</Table.HeaderCell>
|
|
24
|
-
<Table.HeaderCell>Tailwind prefix</Table.HeaderCell>
|
|
25
|
-
</Table.HeaderRow>
|
|
26
|
-
</Table.Header>
|
|
27
|
-
<Table.Body>
|
|
28
|
-
<Table.Row>
|
|
29
|
-
<Table.Cell>xsl</Table.Cell>
|
|
30
|
-
<Table.Cell>0px and up</Table.Cell>
|
|
31
|
-
<Table.Cell>xsl:</Table.Cell>
|
|
32
|
-
</Table.Row>
|
|
33
|
-
<Table.Row>
|
|
34
|
-
<Table.Cell>sm</Table.Cell>
|
|
35
|
-
<Table.Cell>768px and up</Table.Cell>
|
|
36
|
-
<Table.Cell>sm:</Table.Cell>
|
|
37
|
-
</Table.Row>
|
|
38
|
-
<Table.Row>
|
|
39
|
-
<Table.Cell>md</Table.Cell>
|
|
40
|
-
<Table.Cell>992 and up</Table.Cell>
|
|
41
|
-
<Table.Cell>md:</Table.Cell>
|
|
42
|
-
</Table.Row>
|
|
43
|
-
<Table.Row>
|
|
44
|
-
<Table.Cell>lg</Table.Cell>
|
|
45
|
-
<Table.Cell>1200 and up</Table.Cell>
|
|
46
|
-
<Table.Cell>lg:</Table.Cell>
|
|
47
|
-
</Table.Row>
|
|
48
|
-
<Table.Row>
|
|
49
|
-
<Table.Cell>xl</Table.Cell>
|
|
50
|
-
<Table.Cell>1900 and up</Table.Cell>
|
|
51
|
-
<Table.Cell>xl:</Table.Cell>
|
|
52
|
-
</Table.Row>
|
|
53
|
-
</Table.Body>
|
|
54
|
-
</Table>
|
|
55
|
-
);
|
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, StoryObj } from '@storybook/react';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import { Field, Select } from '../../components/index.js';
|
|
5
|
-
import { BASE_COLORS } from '../../tailwind/constants/colors.js';
|
|
6
|
-
import { ALL_THEMES } from '../../tailwind/themes/index.js';
|
|
7
|
-
import { generateColorTints } from '../../tailwind/utils/generate-color-tints.js';
|
|
8
|
-
|
|
9
|
-
const meta: Meta = {
|
|
10
|
-
title: 'Foundation/Colours',
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
13
|
-
parameters: {
|
|
14
|
-
layout: 'fullscreen',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default meta;
|
|
19
|
-
type Story = StoryObj<typeof meta>;
|
|
20
|
-
|
|
21
|
-
// NOTE: Although unused this needs to be here so all colors load correctly
|
|
22
|
-
const LOAD_COLORS = {
|
|
23
|
-
background: [
|
|
24
|
-
'bg-background',
|
|
25
|
-
'bg-background-90',
|
|
26
|
-
'bg-background-80',
|
|
27
|
-
'bg-background-70',
|
|
28
|
-
'bg-background-60',
|
|
29
|
-
'bg-background-50',
|
|
30
|
-
'bg-background-40',
|
|
31
|
-
'bg-background-30',
|
|
32
|
-
'bg-background-20',
|
|
33
|
-
'bg-background-10',
|
|
34
|
-
'bg-background-5',
|
|
35
|
-
],
|
|
36
|
-
border: [
|
|
37
|
-
'bg-border',
|
|
38
|
-
'bg-border-90',
|
|
39
|
-
'bg-border-80',
|
|
40
|
-
'bg-border-70',
|
|
41
|
-
'bg-border-60',
|
|
42
|
-
'bg-border-50',
|
|
43
|
-
'bg-border-40',
|
|
44
|
-
'bg-border-30',
|
|
45
|
-
'bg-border-20',
|
|
46
|
-
'bg-border-10',
|
|
47
|
-
'bg-border-5',
|
|
48
|
-
],
|
|
49
|
-
borderDark: [
|
|
50
|
-
'bg-borderDark',
|
|
51
|
-
'bg-borderDark-90',
|
|
52
|
-
'bg-borderDark-80',
|
|
53
|
-
'bg-borderDark-70',
|
|
54
|
-
'bg-borderDark-60',
|
|
55
|
-
'bg-borderDark-50',
|
|
56
|
-
'bg-borderDark-40',
|
|
57
|
-
'bg-borderDark-30',
|
|
58
|
-
'bg-borderDark-20',
|
|
59
|
-
'bg-borderDark-10',
|
|
60
|
-
'bg-borderDark-5',
|
|
61
|
-
],
|
|
62
|
-
focus: [
|
|
63
|
-
'bg-focus',
|
|
64
|
-
'bg-focus-90',
|
|
65
|
-
'bg-focus-80',
|
|
66
|
-
'bg-focus-70',
|
|
67
|
-
'bg-focus-60',
|
|
68
|
-
'bg-focus-50',
|
|
69
|
-
'bg-focus-40',
|
|
70
|
-
'bg-focus-30',
|
|
71
|
-
'bg-focus-20',
|
|
72
|
-
'bg-focus-10',
|
|
73
|
-
'bg-focus-5',
|
|
74
|
-
],
|
|
75
|
-
heading: [
|
|
76
|
-
'bg-heading',
|
|
77
|
-
'bg-heading-90',
|
|
78
|
-
'bg-heading-80',
|
|
79
|
-
'bg-heading-70',
|
|
80
|
-
'bg-heading-60',
|
|
81
|
-
'bg-heading-50',
|
|
82
|
-
'bg-heading-40',
|
|
83
|
-
'bg-heading-30',
|
|
84
|
-
'bg-heading-20',
|
|
85
|
-
'bg-heading-10',
|
|
86
|
-
'bg-heading-5',
|
|
87
|
-
],
|
|
88
|
-
hero: [
|
|
89
|
-
'bg-hero',
|
|
90
|
-
'bg-hero-90',
|
|
91
|
-
'bg-hero-80',
|
|
92
|
-
'bg-hero-70',
|
|
93
|
-
'bg-hero-60',
|
|
94
|
-
'bg-hero-50',
|
|
95
|
-
'bg-hero-40',
|
|
96
|
-
'bg-hero-30',
|
|
97
|
-
'bg-hero-20',
|
|
98
|
-
'bg-hero-10',
|
|
99
|
-
'bg-hero-5',
|
|
100
|
-
],
|
|
101
|
-
light: [
|
|
102
|
-
'bg-light',
|
|
103
|
-
'bg-light-90',
|
|
104
|
-
'bg-light-80',
|
|
105
|
-
'bg-light-70',
|
|
106
|
-
'bg-light-60',
|
|
107
|
-
'bg-light-50',
|
|
108
|
-
'bg-light-40',
|
|
109
|
-
'bg-light-30',
|
|
110
|
-
'bg-light-20',
|
|
111
|
-
'bg-light-10',
|
|
112
|
-
'bg-light-5',
|
|
113
|
-
],
|
|
114
|
-
link: [
|
|
115
|
-
'bg-link',
|
|
116
|
-
'bg-link-90',
|
|
117
|
-
'bg-link-80',
|
|
118
|
-
'bg-link-70',
|
|
119
|
-
'bg-link-60',
|
|
120
|
-
'bg-link-50',
|
|
121
|
-
'bg-link-40',
|
|
122
|
-
'bg-link-30',
|
|
123
|
-
'bg-link-20',
|
|
124
|
-
'bg-link-10',
|
|
125
|
-
'bg-link-5',
|
|
126
|
-
],
|
|
127
|
-
muted: [
|
|
128
|
-
'bg-muted',
|
|
129
|
-
'bg-muted-90',
|
|
130
|
-
'bg-muted-80',
|
|
131
|
-
'bg-muted-70',
|
|
132
|
-
'bg-muted-60',
|
|
133
|
-
'bg-muted-50',
|
|
134
|
-
'bg-muted-40',
|
|
135
|
-
'bg-muted-30',
|
|
136
|
-
'bg-muted-20',
|
|
137
|
-
'bg-muted-10',
|
|
138
|
-
'bg-muted-5',
|
|
139
|
-
],
|
|
140
|
-
neutral: [
|
|
141
|
-
'bg-neutral',
|
|
142
|
-
'bg-neutral-90',
|
|
143
|
-
'bg-neutral-80',
|
|
144
|
-
'bg-neutral-70',
|
|
145
|
-
'bg-neutral-60',
|
|
146
|
-
'bg-neutral-50',
|
|
147
|
-
'bg-neutral-40',
|
|
148
|
-
'bg-neutral-30',
|
|
149
|
-
'bg-neutral-20',
|
|
150
|
-
'bg-neutral-10',
|
|
151
|
-
'bg-neutral-5',
|
|
152
|
-
],
|
|
153
|
-
pop: [
|
|
154
|
-
'bg-pop',
|
|
155
|
-
'bg-pop-90',
|
|
156
|
-
'bg-pop-80',
|
|
157
|
-
'bg-pop-70',
|
|
158
|
-
'bg-pop-60',
|
|
159
|
-
'bg-pop-50',
|
|
160
|
-
'bg-pop-40',
|
|
161
|
-
'bg-pop-30',
|
|
162
|
-
'bg-pop-20',
|
|
163
|
-
'bg-pop-10',
|
|
164
|
-
'bg-pop-5',
|
|
165
|
-
],
|
|
166
|
-
primary: [
|
|
167
|
-
'bg-primary',
|
|
168
|
-
'bg-primary-90',
|
|
169
|
-
'bg-primary-80',
|
|
170
|
-
'bg-primary-70',
|
|
171
|
-
'bg-primary-60',
|
|
172
|
-
'bg-primary-40',
|
|
173
|
-
'bg-primary-50',
|
|
174
|
-
'bg-primary-30',
|
|
175
|
-
'bg-primary-20',
|
|
176
|
-
'bg-primary-10',
|
|
177
|
-
'bg-primary-5',
|
|
178
|
-
],
|
|
179
|
-
text: [
|
|
180
|
-
'bg-text',
|
|
181
|
-
'bg-text-90',
|
|
182
|
-
'bg-text-80',
|
|
183
|
-
'bg-text-70',
|
|
184
|
-
'bg-text-60',
|
|
185
|
-
'bg-text-50',
|
|
186
|
-
'bg-text-40',
|
|
187
|
-
'bg-text-30',
|
|
188
|
-
'bg-text-20',
|
|
189
|
-
'bg-text-10',
|
|
190
|
-
'bg-text-5',
|
|
191
|
-
],
|
|
192
|
-
success: [
|
|
193
|
-
'bg-success',
|
|
194
|
-
'bg-success-90',
|
|
195
|
-
'bg-success-80',
|
|
196
|
-
'bg-success-70',
|
|
197
|
-
'bg-success-60',
|
|
198
|
-
'bg-success-50',
|
|
199
|
-
'bg-success-40',
|
|
200
|
-
'bg-success-30',
|
|
201
|
-
'bg-success-20',
|
|
202
|
-
'bg-success-10',
|
|
203
|
-
'bg-success-5',
|
|
204
|
-
],
|
|
205
|
-
info: [
|
|
206
|
-
'bg-info',
|
|
207
|
-
'bg-info-90',
|
|
208
|
-
'bg-info-80',
|
|
209
|
-
'bg-info-70',
|
|
210
|
-
'bg-info-60',
|
|
211
|
-
'bg-info-50',
|
|
212
|
-
'bg-info-40',
|
|
213
|
-
'bg-info-30',
|
|
214
|
-
'bg-info-20',
|
|
215
|
-
'bg-info-10',
|
|
216
|
-
'bg-info-5',
|
|
217
|
-
],
|
|
218
|
-
warning: [
|
|
219
|
-
'bg-warning',
|
|
220
|
-
'bg-warning-90',
|
|
221
|
-
'bg-warning-80',
|
|
222
|
-
'bg-warning-70',
|
|
223
|
-
'bg-warning-60',
|
|
224
|
-
'bg-warning-50',
|
|
225
|
-
'bg-warning-40',
|
|
226
|
-
'bg-warning-30',
|
|
227
|
-
'bg-warning-20',
|
|
228
|
-
'bg-warning-10',
|
|
229
|
-
'bg-warning-5',
|
|
230
|
-
],
|
|
231
|
-
danger: [
|
|
232
|
-
'bg-danger',
|
|
233
|
-
'bg-danger-90',
|
|
234
|
-
'bg-danger-80',
|
|
235
|
-
'bg-danger-70',
|
|
236
|
-
'bg-danger-60',
|
|
237
|
-
'bg-danger-50',
|
|
238
|
-
'bg-danger-40',
|
|
239
|
-
'bg-danger-30',
|
|
240
|
-
'bg-danger-20',
|
|
241
|
-
'bg-danger-10',
|
|
242
|
-
'bg-danger-5',
|
|
243
|
-
],
|
|
244
|
-
system: [
|
|
245
|
-
'bg-system',
|
|
246
|
-
'bg-system-90',
|
|
247
|
-
'bg-system-80',
|
|
248
|
-
'bg-system-70',
|
|
249
|
-
'bg-system-60',
|
|
250
|
-
'bg-system-50',
|
|
251
|
-
'bg-system-40',
|
|
252
|
-
'bg-system-30',
|
|
253
|
-
'bg-system-20',
|
|
254
|
-
'bg-system-10',
|
|
255
|
-
'bg-system-5',
|
|
256
|
-
],
|
|
257
|
-
};
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* Examples for all colors that change with brand
|
|
261
|
-
*/
|
|
262
|
-
export const BrandColors: Story = {
|
|
263
|
-
render: (args, { globals: { theme } }) => {
|
|
264
|
-
const currThemeToken = theme ? theme : 'WBC';
|
|
265
|
-
const currColors = ALL_THEMES.find(brand => brand.code === currThemeToken)?.colors;
|
|
266
|
-
const brandColors = [
|
|
267
|
-
'background',
|
|
268
|
-
'border',
|
|
269
|
-
'borderDark',
|
|
270
|
-
'heading',
|
|
271
|
-
'hero',
|
|
272
|
-
'light',
|
|
273
|
-
'link',
|
|
274
|
-
'muted',
|
|
275
|
-
'neutral',
|
|
276
|
-
'pop',
|
|
277
|
-
'primary',
|
|
278
|
-
'text',
|
|
279
|
-
];
|
|
280
|
-
const TINTS = ['DEFAULT', 90, 80, 70, 60, 50, 40, 30, 20, 10, 5];
|
|
281
|
-
const [selectedTint, setSelectedTint] = useState('DEFAULT');
|
|
282
|
-
const tintString = selectedTint !== 'DEFAULT' ? `-${selectedTint}` : '';
|
|
283
|
-
|
|
284
|
-
return (
|
|
285
|
-
<>
|
|
286
|
-
<div className="p-2">
|
|
287
|
-
<Field label="Select a tint:">
|
|
288
|
-
<Select onChange={e => setSelectedTint(e.target.value)}>
|
|
289
|
-
{TINTS.map(tint => (
|
|
290
|
-
<option value={tint} key={tint}>
|
|
291
|
-
{tint}
|
|
292
|
-
</option>
|
|
293
|
-
))}
|
|
294
|
-
</Select>
|
|
295
|
-
</Field>
|
|
296
|
-
</div>
|
|
297
|
-
<div className="flex flex-wrap">
|
|
298
|
-
{brandColors.map(color => (
|
|
299
|
-
<div className="w-[33%] min-w-[200px] max-w-[300px] p-2" key={color}>
|
|
300
|
-
<div className={`bg-${color}${tintString} h-[80px]`} />
|
|
301
|
-
<div className="divide-y divide-border border border-border p-2">
|
|
302
|
-
<div className="pb-2 font-bold">{color}</div>
|
|
303
|
-
<div className="typography-body-10 py-2 font-light">{`Tailwind eg: bg-${color}${tintString}`}</div>
|
|
304
|
-
{/* Below comments to get rid of type nightmare when trying to get hex value */}
|
|
305
|
-
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
|
306
|
-
{/* @ts-ignore */}
|
|
307
|
-
<div className="typography-body-10 pt-2 font-light">{currColors[color][selectedTint]}</div>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
))}
|
|
311
|
-
</div>
|
|
312
|
-
</>
|
|
313
|
-
);
|
|
314
|
-
},
|
|
315
|
-
};
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* All reserved colors that do not change with brand
|
|
319
|
-
*/
|
|
320
|
-
export const ReservedColors = () => {
|
|
321
|
-
const reservedColors = Object.keys(BASE_COLORS);
|
|
322
|
-
const TINTS = ['DEFAULT', 90, 80, 70, 60, 50, 40, 30, 20, 10, 5];
|
|
323
|
-
const [selectedTint, setSelectedTint] = useState('DEFAULT');
|
|
324
|
-
const tintString = selectedTint !== 'DEFAULT' ? `-${selectedTint}` : '';
|
|
325
|
-
const baseColorTints = generateColorTints(BASE_COLORS);
|
|
326
|
-
return (
|
|
327
|
-
<>
|
|
328
|
-
<div className="p-2">
|
|
329
|
-
<Field label="Select a tint:">
|
|
330
|
-
<Select onChange={e => setSelectedTint(e.target.value)}>
|
|
331
|
-
{TINTS.map(tint => (
|
|
332
|
-
<option value={tint} key={tint}>
|
|
333
|
-
{tint}
|
|
334
|
-
</option>
|
|
335
|
-
))}
|
|
336
|
-
</Select>
|
|
337
|
-
</Field>
|
|
338
|
-
</div>
|
|
339
|
-
<div className="flex flex-wrap">
|
|
340
|
-
{reservedColors.map(color => (
|
|
341
|
-
<div className="w-[33%] min-w-[200px] max-w-[300px] p-2" key={color}>
|
|
342
|
-
<div className={`bg-${color}${tintString} h-[80px]`} />
|
|
343
|
-
<div className="divide-y divide-border border border-border p-2">
|
|
344
|
-
<div className="pb-2 font-bold">{color}</div>
|
|
345
|
-
<div className="typography-body-10 py-2 font-light">{`Tailwind eg: bg-${color}${tintString}`}</div>
|
|
346
|
-
{/* Below comments to get rid of type nightmare when trying to get hex value */}
|
|
347
|
-
{/* eslint-disable-next-line @typescript-eslint/ban-ts-comment */}
|
|
348
|
-
{/* @ts-ignore */}
|
|
349
|
-
<div className="typography-body-10 pt-2 font-light">{baseColorTints[color][selectedTint]}</div>
|
|
350
|
-
</div>
|
|
351
|
-
</div>
|
|
352
|
-
))}
|
|
353
|
-
</div>
|
|
354
|
-
</>
|
|
355
|
-
);
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
/**
|
|
359
|
-
* Colors that are reserved but have no extra tints
|
|
360
|
-
*/
|
|
361
|
-
export const ReservedWithNoTints = () => (
|
|
362
|
-
<div className="flex">
|
|
363
|
-
<div className="w-[33%] min-w-[200px] max-w-[300px] p-2">
|
|
364
|
-
<div className={`h-[80px] bg-black`} />
|
|
365
|
-
<div className="divide-y divide-border border border-border p-2">
|
|
366
|
-
<div className="pb-2 font-bold">black</div>
|
|
367
|
-
<div className="typography-body-10 py-2 font-light">{`Tailwind eg: bg-black`}</div>
|
|
368
|
-
<div className="typography-body-10 pt-2 font-light">#000</div>
|
|
369
|
-
</div>
|
|
370
|
-
</div>
|
|
371
|
-
<div className="w-[33%] min-w-[200px] max-w-[300px] p-2">
|
|
372
|
-
<div className={`h-[80px] border border-border bg-white`} />
|
|
373
|
-
<div className="divide-y divide-border border border-border p-2">
|
|
374
|
-
<div className="pb-2 font-bold">white</div>
|
|
375
|
-
<div className="typography-body-10 py-2 font-light">{`Tailwind eg: bg-white`}</div>
|
|
376
|
-
<div className="typography-body-10 pt-2 font-light">#FFF</div>
|
|
377
|
-
</div>
|
|
378
|
-
</div>
|
|
379
|
-
</div>
|
|
380
|
-
);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
const meta: Meta = {
|
|
4
|
-
title: 'Foundation/Theme',
|
|
5
|
-
tags: ['autodocs'],
|
|
6
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
7
|
-
parameters: {
|
|
8
|
-
layout: 'centered',
|
|
9
|
-
},
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default meta;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Providing themeing is a matter of wrapping with HTML or div with data-theme="theme-name", see code of story for example
|
|
16
|
-
*/
|
|
17
|
-
export const Theme = () => (
|
|
18
|
-
/**
|
|
19
|
-
* Valid theme tokens:
|
|
20
|
-
* bom
|
|
21
|
-
* bsa
|
|
22
|
-
* btfg
|
|
23
|
-
* rams
|
|
24
|
-
* stg
|
|
25
|
-
* wbc
|
|
26
|
-
* wbg
|
|
27
|
-
*/
|
|
28
|
-
<div data-theme="wbc">Click on show code</div>
|
|
29
|
-
);
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Table } from '../../components/index.js';
|
|
4
|
-
|
|
5
|
-
const meta: Meta = {
|
|
6
|
-
title: 'Foundation/Typography',
|
|
7
|
-
tags: ['autodocs'],
|
|
8
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
export default meta;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Brand fonts
|
|
15
|
-
*/
|
|
16
|
-
export const BrandFont = () => {
|
|
17
|
-
const typographyBrandScale = [
|
|
18
|
-
{ className: 'typography-brand-1', size: '3.75rem (60px)' },
|
|
19
|
-
{ className: 'typography-brand-2', size: '3.375rem (54px)' },
|
|
20
|
-
{ className: 'typography-brand-3', size: '3rem (48px)' },
|
|
21
|
-
{ className: 'typography-brand-4', size: '2.625rem (42px)' },
|
|
22
|
-
{ className: 'typography-brand-5', size: '2.25rem (36px)' },
|
|
23
|
-
{ className: 'typography-brand-6', size: '1.875rem (30px)' },
|
|
24
|
-
{ className: 'typography-brand-7', size: '1.5rem (24px)' },
|
|
25
|
-
{ className: 'typography-brand-8', size: '1.125rem (18px)' },
|
|
26
|
-
{ className: 'typography-brand-9', size: '1rem (16px)' },
|
|
27
|
-
{ className: 'typography-brand-10', size: '0.875rem (14px)' },
|
|
28
|
-
];
|
|
29
|
-
return (
|
|
30
|
-
<Table>
|
|
31
|
-
<Table.Caption>GEL brand typography tokens</Table.Caption>
|
|
32
|
-
<Table.Header>
|
|
33
|
-
<Table.HeaderRow>
|
|
34
|
-
<Table.HeaderCell>Token</Table.HeaderCell>
|
|
35
|
-
<Table.HeaderCell>Value</Table.HeaderCell>
|
|
36
|
-
<Table.HeaderCell>Tailwind class</Table.HeaderCell>
|
|
37
|
-
</Table.HeaderRow>
|
|
38
|
-
</Table.Header>
|
|
39
|
-
<Table.Body>
|
|
40
|
-
{typographyBrandScale.map(i => (
|
|
41
|
-
<Table.Row key={i.className}>
|
|
42
|
-
<Table.Cell>
|
|
43
|
-
<span className={i.className}>{i.className.replace('typography-', '')}</span>
|
|
44
|
-
</Table.Cell>
|
|
45
|
-
<Table.Cell>{i.size}</Table.Cell>
|
|
46
|
-
<Table.Cell>{i.className}</Table.Cell>
|
|
47
|
-
</Table.Row>
|
|
48
|
-
))}
|
|
49
|
-
</Table.Body>
|
|
50
|
-
</Table>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Body fonts
|
|
56
|
-
*/
|
|
57
|
-
export const BodyFont = () => {
|
|
58
|
-
const typographyBrandScale = [
|
|
59
|
-
{ className: 'typography-body-1', size: '3.75rem (60px)' },
|
|
60
|
-
{ className: 'typography-body-2', size: '3.375rem (54px)' },
|
|
61
|
-
{ className: 'typography-body-3', size: '3rem (48px)' },
|
|
62
|
-
{ className: 'typography-body-4', size: '2.625rem (42px)' },
|
|
63
|
-
{ className: 'typography-body-5', size: '2.25rem (36px)' },
|
|
64
|
-
{ className: 'typography-body-6', size: '1.875rem (30px)' },
|
|
65
|
-
{ className: 'typography-body-7', size: '1.5rem (24px)' },
|
|
66
|
-
{ className: 'typography-body-8', size: '1.125rem (18px)' },
|
|
67
|
-
{ className: 'typography-body-9', size: '1rem (16px)' },
|
|
68
|
-
{ className: 'typography-body-10', size: '0.875rem (14px)' },
|
|
69
|
-
];
|
|
70
|
-
return (
|
|
71
|
-
<Table>
|
|
72
|
-
<Table.Caption>GEL body typography tokens</Table.Caption>
|
|
73
|
-
<Table.Header>
|
|
74
|
-
<Table.HeaderRow>
|
|
75
|
-
<Table.HeaderCell>Token</Table.HeaderCell>
|
|
76
|
-
<Table.HeaderCell>Value</Table.HeaderCell>
|
|
77
|
-
<Table.HeaderCell>Tailwind class</Table.HeaderCell>
|
|
78
|
-
</Table.HeaderRow>
|
|
79
|
-
</Table.Header>
|
|
80
|
-
<Table.Body>
|
|
81
|
-
{typographyBrandScale.map(i => (
|
|
82
|
-
<Table.Row key={i.className}>
|
|
83
|
-
<Table.Cell>
|
|
84
|
-
<span className={i.className}>{i.className.replace('typography-', '')}</span>
|
|
85
|
-
</Table.Cell>
|
|
86
|
-
<Table.Cell>{i.size}</Table.Cell>
|
|
87
|
-
<Table.Cell>{i.className}</Table.Cell>
|
|
88
|
-
</Table.Row>
|
|
89
|
-
))}
|
|
90
|
-
</Table.Body>
|
|
91
|
-
</Table>
|
|
92
|
-
);
|
|
93
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export type SPACING_KEY =
|
|
2
|
-
| 0
|
|
3
|
-
| 1
|
|
4
|
-
| 2
|
|
5
|
-
| 3
|
|
6
|
-
| 4
|
|
7
|
-
| 5
|
|
8
|
-
| 6
|
|
9
|
-
| 7
|
|
10
|
-
| 8
|
|
11
|
-
| 9
|
|
12
|
-
| 10
|
|
13
|
-
| 11
|
|
14
|
-
| 12
|
|
15
|
-
| 13
|
|
16
|
-
| 14
|
|
17
|
-
| 15
|
|
18
|
-
| 16
|
|
19
|
-
| 17
|
|
20
|
-
| 18
|
|
21
|
-
| 19
|
|
22
|
-
| 20
|
|
23
|
-
| 21
|
|
24
|
-
| 22
|
|
25
|
-
| 23
|
|
26
|
-
| 24
|
|
27
|
-
| 25
|
|
28
|
-
| 26
|
|
29
|
-
| 27
|
|
30
|
-
| 28
|
|
31
|
-
| 29
|
|
32
|
-
| 30
|
|
33
|
-
| 31
|
|
34
|
-
| 32
|
|
35
|
-
| 33
|
|
36
|
-
| 34
|
|
37
|
-
| 35;
|