@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,386 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import { Field, Select } from '../../components/index.js';
|
|
3
|
-
import { BASE_COLORS } from '../../tailwind/constants/colors.js';
|
|
4
|
-
import { ALL_THEMES } from '../../tailwind/themes/index.js';
|
|
5
|
-
import { generateColorTints } from '../../tailwind/utils/generate-color-tints.js';
|
|
6
|
-
const meta = {
|
|
7
|
-
title: 'Foundation/Colours',
|
|
8
|
-
tags: [
|
|
9
|
-
'autodocs'
|
|
10
|
-
],
|
|
11
|
-
decorators: [
|
|
12
|
-
(Story)=>React.createElement(Story, null)
|
|
13
|
-
],
|
|
14
|
-
parameters: {
|
|
15
|
-
layout: 'fullscreen'
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export default meta;
|
|
19
|
-
const LOAD_COLORS = {
|
|
20
|
-
background: [
|
|
21
|
-
'bg-background',
|
|
22
|
-
'bg-background-90',
|
|
23
|
-
'bg-background-80',
|
|
24
|
-
'bg-background-70',
|
|
25
|
-
'bg-background-60',
|
|
26
|
-
'bg-background-50',
|
|
27
|
-
'bg-background-40',
|
|
28
|
-
'bg-background-30',
|
|
29
|
-
'bg-background-20',
|
|
30
|
-
'bg-background-10',
|
|
31
|
-
'bg-background-5'
|
|
32
|
-
],
|
|
33
|
-
border: [
|
|
34
|
-
'bg-border',
|
|
35
|
-
'bg-border-90',
|
|
36
|
-
'bg-border-80',
|
|
37
|
-
'bg-border-70',
|
|
38
|
-
'bg-border-60',
|
|
39
|
-
'bg-border-50',
|
|
40
|
-
'bg-border-40',
|
|
41
|
-
'bg-border-30',
|
|
42
|
-
'bg-border-20',
|
|
43
|
-
'bg-border-10',
|
|
44
|
-
'bg-border-5'
|
|
45
|
-
],
|
|
46
|
-
borderDark: [
|
|
47
|
-
'bg-borderDark',
|
|
48
|
-
'bg-borderDark-90',
|
|
49
|
-
'bg-borderDark-80',
|
|
50
|
-
'bg-borderDark-70',
|
|
51
|
-
'bg-borderDark-60',
|
|
52
|
-
'bg-borderDark-50',
|
|
53
|
-
'bg-borderDark-40',
|
|
54
|
-
'bg-borderDark-30',
|
|
55
|
-
'bg-borderDark-20',
|
|
56
|
-
'bg-borderDark-10',
|
|
57
|
-
'bg-borderDark-5'
|
|
58
|
-
],
|
|
59
|
-
focus: [
|
|
60
|
-
'bg-focus',
|
|
61
|
-
'bg-focus-90',
|
|
62
|
-
'bg-focus-80',
|
|
63
|
-
'bg-focus-70',
|
|
64
|
-
'bg-focus-60',
|
|
65
|
-
'bg-focus-50',
|
|
66
|
-
'bg-focus-40',
|
|
67
|
-
'bg-focus-30',
|
|
68
|
-
'bg-focus-20',
|
|
69
|
-
'bg-focus-10',
|
|
70
|
-
'bg-focus-5'
|
|
71
|
-
],
|
|
72
|
-
heading: [
|
|
73
|
-
'bg-heading',
|
|
74
|
-
'bg-heading-90',
|
|
75
|
-
'bg-heading-80',
|
|
76
|
-
'bg-heading-70',
|
|
77
|
-
'bg-heading-60',
|
|
78
|
-
'bg-heading-50',
|
|
79
|
-
'bg-heading-40',
|
|
80
|
-
'bg-heading-30',
|
|
81
|
-
'bg-heading-20',
|
|
82
|
-
'bg-heading-10',
|
|
83
|
-
'bg-heading-5'
|
|
84
|
-
],
|
|
85
|
-
hero: [
|
|
86
|
-
'bg-hero',
|
|
87
|
-
'bg-hero-90',
|
|
88
|
-
'bg-hero-80',
|
|
89
|
-
'bg-hero-70',
|
|
90
|
-
'bg-hero-60',
|
|
91
|
-
'bg-hero-50',
|
|
92
|
-
'bg-hero-40',
|
|
93
|
-
'bg-hero-30',
|
|
94
|
-
'bg-hero-20',
|
|
95
|
-
'bg-hero-10',
|
|
96
|
-
'bg-hero-5'
|
|
97
|
-
],
|
|
98
|
-
light: [
|
|
99
|
-
'bg-light',
|
|
100
|
-
'bg-light-90',
|
|
101
|
-
'bg-light-80',
|
|
102
|
-
'bg-light-70',
|
|
103
|
-
'bg-light-60',
|
|
104
|
-
'bg-light-50',
|
|
105
|
-
'bg-light-40',
|
|
106
|
-
'bg-light-30',
|
|
107
|
-
'bg-light-20',
|
|
108
|
-
'bg-light-10',
|
|
109
|
-
'bg-light-5'
|
|
110
|
-
],
|
|
111
|
-
link: [
|
|
112
|
-
'bg-link',
|
|
113
|
-
'bg-link-90',
|
|
114
|
-
'bg-link-80',
|
|
115
|
-
'bg-link-70',
|
|
116
|
-
'bg-link-60',
|
|
117
|
-
'bg-link-50',
|
|
118
|
-
'bg-link-40',
|
|
119
|
-
'bg-link-30',
|
|
120
|
-
'bg-link-20',
|
|
121
|
-
'bg-link-10',
|
|
122
|
-
'bg-link-5'
|
|
123
|
-
],
|
|
124
|
-
muted: [
|
|
125
|
-
'bg-muted',
|
|
126
|
-
'bg-muted-90',
|
|
127
|
-
'bg-muted-80',
|
|
128
|
-
'bg-muted-70',
|
|
129
|
-
'bg-muted-60',
|
|
130
|
-
'bg-muted-50',
|
|
131
|
-
'bg-muted-40',
|
|
132
|
-
'bg-muted-30',
|
|
133
|
-
'bg-muted-20',
|
|
134
|
-
'bg-muted-10',
|
|
135
|
-
'bg-muted-5'
|
|
136
|
-
],
|
|
137
|
-
neutral: [
|
|
138
|
-
'bg-neutral',
|
|
139
|
-
'bg-neutral-90',
|
|
140
|
-
'bg-neutral-80',
|
|
141
|
-
'bg-neutral-70',
|
|
142
|
-
'bg-neutral-60',
|
|
143
|
-
'bg-neutral-50',
|
|
144
|
-
'bg-neutral-40',
|
|
145
|
-
'bg-neutral-30',
|
|
146
|
-
'bg-neutral-20',
|
|
147
|
-
'bg-neutral-10',
|
|
148
|
-
'bg-neutral-5'
|
|
149
|
-
],
|
|
150
|
-
pop: [
|
|
151
|
-
'bg-pop',
|
|
152
|
-
'bg-pop-90',
|
|
153
|
-
'bg-pop-80',
|
|
154
|
-
'bg-pop-70',
|
|
155
|
-
'bg-pop-60',
|
|
156
|
-
'bg-pop-50',
|
|
157
|
-
'bg-pop-40',
|
|
158
|
-
'bg-pop-30',
|
|
159
|
-
'bg-pop-20',
|
|
160
|
-
'bg-pop-10',
|
|
161
|
-
'bg-pop-5'
|
|
162
|
-
],
|
|
163
|
-
primary: [
|
|
164
|
-
'bg-primary',
|
|
165
|
-
'bg-primary-90',
|
|
166
|
-
'bg-primary-80',
|
|
167
|
-
'bg-primary-70',
|
|
168
|
-
'bg-primary-60',
|
|
169
|
-
'bg-primary-40',
|
|
170
|
-
'bg-primary-50',
|
|
171
|
-
'bg-primary-30',
|
|
172
|
-
'bg-primary-20',
|
|
173
|
-
'bg-primary-10',
|
|
174
|
-
'bg-primary-5'
|
|
175
|
-
],
|
|
176
|
-
text: [
|
|
177
|
-
'bg-text',
|
|
178
|
-
'bg-text-90',
|
|
179
|
-
'bg-text-80',
|
|
180
|
-
'bg-text-70',
|
|
181
|
-
'bg-text-60',
|
|
182
|
-
'bg-text-50',
|
|
183
|
-
'bg-text-40',
|
|
184
|
-
'bg-text-30',
|
|
185
|
-
'bg-text-20',
|
|
186
|
-
'bg-text-10',
|
|
187
|
-
'bg-text-5'
|
|
188
|
-
],
|
|
189
|
-
success: [
|
|
190
|
-
'bg-success',
|
|
191
|
-
'bg-success-90',
|
|
192
|
-
'bg-success-80',
|
|
193
|
-
'bg-success-70',
|
|
194
|
-
'bg-success-60',
|
|
195
|
-
'bg-success-50',
|
|
196
|
-
'bg-success-40',
|
|
197
|
-
'bg-success-30',
|
|
198
|
-
'bg-success-20',
|
|
199
|
-
'bg-success-10',
|
|
200
|
-
'bg-success-5'
|
|
201
|
-
],
|
|
202
|
-
info: [
|
|
203
|
-
'bg-info',
|
|
204
|
-
'bg-info-90',
|
|
205
|
-
'bg-info-80',
|
|
206
|
-
'bg-info-70',
|
|
207
|
-
'bg-info-60',
|
|
208
|
-
'bg-info-50',
|
|
209
|
-
'bg-info-40',
|
|
210
|
-
'bg-info-30',
|
|
211
|
-
'bg-info-20',
|
|
212
|
-
'bg-info-10',
|
|
213
|
-
'bg-info-5'
|
|
214
|
-
],
|
|
215
|
-
warning: [
|
|
216
|
-
'bg-warning',
|
|
217
|
-
'bg-warning-90',
|
|
218
|
-
'bg-warning-80',
|
|
219
|
-
'bg-warning-70',
|
|
220
|
-
'bg-warning-60',
|
|
221
|
-
'bg-warning-50',
|
|
222
|
-
'bg-warning-40',
|
|
223
|
-
'bg-warning-30',
|
|
224
|
-
'bg-warning-20',
|
|
225
|
-
'bg-warning-10',
|
|
226
|
-
'bg-warning-5'
|
|
227
|
-
],
|
|
228
|
-
danger: [
|
|
229
|
-
'bg-danger',
|
|
230
|
-
'bg-danger-90',
|
|
231
|
-
'bg-danger-80',
|
|
232
|
-
'bg-danger-70',
|
|
233
|
-
'bg-danger-60',
|
|
234
|
-
'bg-danger-50',
|
|
235
|
-
'bg-danger-40',
|
|
236
|
-
'bg-danger-30',
|
|
237
|
-
'bg-danger-20',
|
|
238
|
-
'bg-danger-10',
|
|
239
|
-
'bg-danger-5'
|
|
240
|
-
],
|
|
241
|
-
system: [
|
|
242
|
-
'bg-system',
|
|
243
|
-
'bg-system-90',
|
|
244
|
-
'bg-system-80',
|
|
245
|
-
'bg-system-70',
|
|
246
|
-
'bg-system-60',
|
|
247
|
-
'bg-system-50',
|
|
248
|
-
'bg-system-40',
|
|
249
|
-
'bg-system-30',
|
|
250
|
-
'bg-system-20',
|
|
251
|
-
'bg-system-10',
|
|
252
|
-
'bg-system-5'
|
|
253
|
-
]
|
|
254
|
-
};
|
|
255
|
-
export const BrandColors = {
|
|
256
|
-
render: (args, { globals: { theme } })=>{
|
|
257
|
-
var _ALL_THEMES_find;
|
|
258
|
-
const currThemeToken = theme ? theme : 'WBC';
|
|
259
|
-
const currColors = (_ALL_THEMES_find = ALL_THEMES.find((brand)=>brand.code === currThemeToken)) === null || _ALL_THEMES_find === void 0 ? void 0 : _ALL_THEMES_find.colors;
|
|
260
|
-
const brandColors = [
|
|
261
|
-
'background',
|
|
262
|
-
'border',
|
|
263
|
-
'borderDark',
|
|
264
|
-
'heading',
|
|
265
|
-
'hero',
|
|
266
|
-
'light',
|
|
267
|
-
'link',
|
|
268
|
-
'muted',
|
|
269
|
-
'neutral',
|
|
270
|
-
'pop',
|
|
271
|
-
'primary',
|
|
272
|
-
'text'
|
|
273
|
-
];
|
|
274
|
-
const TINTS = [
|
|
275
|
-
'DEFAULT',
|
|
276
|
-
90,
|
|
277
|
-
80,
|
|
278
|
-
70,
|
|
279
|
-
60,
|
|
280
|
-
50,
|
|
281
|
-
40,
|
|
282
|
-
30,
|
|
283
|
-
20,
|
|
284
|
-
10,
|
|
285
|
-
5
|
|
286
|
-
];
|
|
287
|
-
const [selectedTint, setSelectedTint] = useState('DEFAULT');
|
|
288
|
-
const tintString = selectedTint !== 'DEFAULT' ? `-${selectedTint}` : '';
|
|
289
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
290
|
-
className: "p-2"
|
|
291
|
-
}, React.createElement(Field, {
|
|
292
|
-
label: "Select a tint:"
|
|
293
|
-
}, React.createElement(Select, {
|
|
294
|
-
onChange: (e)=>setSelectedTint(e.target.value)
|
|
295
|
-
}, TINTS.map((tint)=>React.createElement("option", {
|
|
296
|
-
value: tint,
|
|
297
|
-
key: tint
|
|
298
|
-
}, tint))))), React.createElement("div", {
|
|
299
|
-
className: "flex flex-wrap"
|
|
300
|
-
}, brandColors.map((color)=>React.createElement("div", {
|
|
301
|
-
className: "w-[33%] min-w-[200px] max-w-[300px] p-2",
|
|
302
|
-
key: color
|
|
303
|
-
}, React.createElement("div", {
|
|
304
|
-
className: `bg-${color}${tintString} h-[80px]`
|
|
305
|
-
}), React.createElement("div", {
|
|
306
|
-
className: "divide-y divide-border border border-border p-2"
|
|
307
|
-
}, React.createElement("div", {
|
|
308
|
-
className: "pb-2 font-bold"
|
|
309
|
-
}, color), React.createElement("div", {
|
|
310
|
-
className: "typography-body-10 py-2 font-light"
|
|
311
|
-
}, `Tailwind eg: bg-${color}${tintString}`), React.createElement("div", {
|
|
312
|
-
className: "typography-body-10 pt-2 font-light"
|
|
313
|
-
}, currColors[color][selectedTint]))))));
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
export const ReservedColors = ()=>{
|
|
317
|
-
const reservedColors = Object.keys(BASE_COLORS);
|
|
318
|
-
const TINTS = [
|
|
319
|
-
'DEFAULT',
|
|
320
|
-
90,
|
|
321
|
-
80,
|
|
322
|
-
70,
|
|
323
|
-
60,
|
|
324
|
-
50,
|
|
325
|
-
40,
|
|
326
|
-
30,
|
|
327
|
-
20,
|
|
328
|
-
10,
|
|
329
|
-
5
|
|
330
|
-
];
|
|
331
|
-
const [selectedTint, setSelectedTint] = useState('DEFAULT');
|
|
332
|
-
const tintString = selectedTint !== 'DEFAULT' ? `-${selectedTint}` : '';
|
|
333
|
-
const baseColorTints = generateColorTints(BASE_COLORS);
|
|
334
|
-
return React.createElement(React.Fragment, null, React.createElement("div", {
|
|
335
|
-
className: "p-2"
|
|
336
|
-
}, React.createElement(Field, {
|
|
337
|
-
label: "Select a tint:"
|
|
338
|
-
}, React.createElement(Select, {
|
|
339
|
-
onChange: (e)=>setSelectedTint(e.target.value)
|
|
340
|
-
}, TINTS.map((tint)=>React.createElement("option", {
|
|
341
|
-
value: tint,
|
|
342
|
-
key: tint
|
|
343
|
-
}, tint))))), React.createElement("div", {
|
|
344
|
-
className: "flex flex-wrap"
|
|
345
|
-
}, reservedColors.map((color)=>React.createElement("div", {
|
|
346
|
-
className: "w-[33%] min-w-[200px] max-w-[300px] p-2",
|
|
347
|
-
key: color
|
|
348
|
-
}, React.createElement("div", {
|
|
349
|
-
className: `bg-${color}${tintString} h-[80px]`
|
|
350
|
-
}), React.createElement("div", {
|
|
351
|
-
className: "divide-y divide-border border border-border p-2"
|
|
352
|
-
}, React.createElement("div", {
|
|
353
|
-
className: "pb-2 font-bold"
|
|
354
|
-
}, color), React.createElement("div", {
|
|
355
|
-
className: "typography-body-10 py-2 font-light"
|
|
356
|
-
}, `Tailwind eg: bg-${color}${tintString}`), React.createElement("div", {
|
|
357
|
-
className: "typography-body-10 pt-2 font-light"
|
|
358
|
-
}, baseColorTints[color][selectedTint]))))));
|
|
359
|
-
};
|
|
360
|
-
export const ReservedWithNoTints = ()=>React.createElement("div", {
|
|
361
|
-
className: "flex"
|
|
362
|
-
}, React.createElement("div", {
|
|
363
|
-
className: "w-[33%] min-w-[200px] max-w-[300px] p-2"
|
|
364
|
-
}, React.createElement("div", {
|
|
365
|
-
className: `h-[80px] bg-black`
|
|
366
|
-
}), React.createElement("div", {
|
|
367
|
-
className: "divide-y divide-border border border-border p-2"
|
|
368
|
-
}, React.createElement("div", {
|
|
369
|
-
className: "pb-2 font-bold"
|
|
370
|
-
}, "black"), React.createElement("div", {
|
|
371
|
-
className: "typography-body-10 py-2 font-light"
|
|
372
|
-
}, `Tailwind eg: bg-black`), React.createElement("div", {
|
|
373
|
-
className: "typography-body-10 pt-2 font-light"
|
|
374
|
-
}, "#000"))), React.createElement("div", {
|
|
375
|
-
className: "w-[33%] min-w-[200px] max-w-[300px] p-2"
|
|
376
|
-
}, React.createElement("div", {
|
|
377
|
-
className: `h-[80px] border border-border bg-white`
|
|
378
|
-
}), React.createElement("div", {
|
|
379
|
-
className: "divide-y divide-border border border-border p-2"
|
|
380
|
-
}, React.createElement("div", {
|
|
381
|
-
className: "pb-2 font-bold"
|
|
382
|
-
}, "white"), React.createElement("div", {
|
|
383
|
-
className: "typography-body-10 py-2 font-light"
|
|
384
|
-
}, `Tailwind eg: bg-white`), React.createElement("div", {
|
|
385
|
-
className: "typography-body-10 pt-2 font-light"
|
|
386
|
-
}, "#FFF"))));
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const meta = {
|
|
2
|
-
title: 'Foundation/Theme',
|
|
3
|
-
tags: [
|
|
4
|
-
'autodocs'
|
|
5
|
-
],
|
|
6
|
-
decorators: [
|
|
7
|
-
(Story)=>React.createElement(Story, null)
|
|
8
|
-
],
|
|
9
|
-
parameters: {
|
|
10
|
-
layout: 'centered'
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
export const Theme = ()=>React.createElement("div", {
|
|
15
|
-
"data-theme": "wbc"
|
|
16
|
-
}, "Click on show code");
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { Table } from '../../components/index.js';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Foundation/Typography',
|
|
4
|
-
tags: [
|
|
5
|
-
'autodocs'
|
|
6
|
-
],
|
|
7
|
-
decorators: [
|
|
8
|
-
(Story)=>React.createElement(Story, null)
|
|
9
|
-
]
|
|
10
|
-
};
|
|
11
|
-
export default meta;
|
|
12
|
-
export const BrandFont = ()=>{
|
|
13
|
-
const typographyBrandScale = [
|
|
14
|
-
{
|
|
15
|
-
className: 'typography-brand-1',
|
|
16
|
-
size: '3.75rem (60px)'
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
className: 'typography-brand-2',
|
|
20
|
-
size: '3.375rem (54px)'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
className: 'typography-brand-3',
|
|
24
|
-
size: '3rem (48px)'
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
className: 'typography-brand-4',
|
|
28
|
-
size: '2.625rem (42px)'
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
className: 'typography-brand-5',
|
|
32
|
-
size: '2.25rem (36px)'
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
className: 'typography-brand-6',
|
|
36
|
-
size: '1.875rem (30px)'
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
className: 'typography-brand-7',
|
|
40
|
-
size: '1.5rem (24px)'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
className: 'typography-brand-8',
|
|
44
|
-
size: '1.125rem (18px)'
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
className: 'typography-brand-9',
|
|
48
|
-
size: '1rem (16px)'
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
className: 'typography-brand-10',
|
|
52
|
-
size: '0.875rem (14px)'
|
|
53
|
-
}
|
|
54
|
-
];
|
|
55
|
-
return React.createElement(Table, null, React.createElement(Table.Caption, null, "GEL brand typography tokens"), React.createElement(Table.Header, null, React.createElement(Table.HeaderRow, null, React.createElement(Table.HeaderCell, null, "Token"), React.createElement(Table.HeaderCell, null, "Value"), React.createElement(Table.HeaderCell, null, "Tailwind class"))), React.createElement(Table.Body, null, typographyBrandScale.map((i)=>React.createElement(Table.Row, {
|
|
56
|
-
key: i.className
|
|
57
|
-
}, React.createElement(Table.Cell, null, React.createElement("span", {
|
|
58
|
-
className: i.className
|
|
59
|
-
}, i.className.replace('typography-', ''))), React.createElement(Table.Cell, null, i.size), React.createElement(Table.Cell, null, i.className)))));
|
|
60
|
-
};
|
|
61
|
-
export const BodyFont = ()=>{
|
|
62
|
-
const typographyBrandScale = [
|
|
63
|
-
{
|
|
64
|
-
className: 'typography-body-1',
|
|
65
|
-
size: '3.75rem (60px)'
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
className: 'typography-body-2',
|
|
69
|
-
size: '3.375rem (54px)'
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
className: 'typography-body-3',
|
|
73
|
-
size: '3rem (48px)'
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
className: 'typography-body-4',
|
|
77
|
-
size: '2.625rem (42px)'
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
className: 'typography-body-5',
|
|
81
|
-
size: '2.25rem (36px)'
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
className: 'typography-body-6',
|
|
85
|
-
size: '1.875rem (30px)'
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
className: 'typography-body-7',
|
|
89
|
-
size: '1.5rem (24px)'
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
className: 'typography-body-8',
|
|
93
|
-
size: '1.125rem (18px)'
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
className: 'typography-body-9',
|
|
97
|
-
size: '1rem (16px)'
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
className: 'typography-body-10',
|
|
101
|
-
size: '0.875rem (14px)'
|
|
102
|
-
}
|
|
103
|
-
];
|
|
104
|
-
return React.createElement(Table, null, React.createElement(Table.Caption, null, "GEL body typography tokens"), React.createElement(Table.Header, null, React.createElement(Table.HeaderRow, null, React.createElement(Table.HeaderCell, null, "Token"), React.createElement(Table.HeaderCell, null, "Value"), React.createElement(Table.HeaderCell, null, "Tailwind class"))), React.createElement(Table.Body, null, typographyBrandScale.map((i)=>React.createElement(Table.Row, {
|
|
105
|
-
key: i.className
|
|
106
|
-
}, React.createElement(Table.Cell, null, React.createElement("span", {
|
|
107
|
-
className: i.className
|
|
108
|
-
}, i.className.replace('typography-', ''))), React.createElement(Table.Cell, null, i.size), React.createElement(Table.Cell, null, i.className)))));
|
|
109
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type SPACING_KEY = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { styles } from './{{kebabCase name}}.styles.js';
|
|
4
|
-
import { type {{name}}Props } from './{{kebabCase name}}.types.js';
|
|
5
|
-
|
|
6
|
-
export function {{name}}({ className, tag: Tag = 'div', children, ...props }: {{name}}Props) {
|
|
7
|
-
return (
|
|
8
|
-
<Tag className={styles({ className })} {...props}>
|
|
9
|
-
{children}
|
|
10
|
-
</Tag>
|
|
11
|
-
);
|
|
12
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
2
|
-
|
|
3
|
-
import { {{name}} } from './{{kebabCase name}}.component.js';
|
|
4
|
-
import { styles } from './{{kebabCase name}}.styles.js';
|
|
5
|
-
|
|
6
|
-
describe('{{name}}', () => {
|
|
7
|
-
it('renders the component', () => {
|
|
8
|
-
const { container } = render(<{{name}} />);
|
|
9
|
-
expect(container).toBeInTheDocument();
|
|
10
|
-
});
|
|
11
|
-
it('renders the style correctly', () => {
|
|
12
|
-
const style = styles();
|
|
13
|
-
// TODO: use some variants for test
|
|
14
|
-
expect(style).toBe('');
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { {{name}} } from './{{kebabCase name}}.component.js';
|
|
4
|
-
|
|
5
|
-
const meta: Meta<typeof {{name}}> = {
|
|
6
|
-
title: 'Components/{{name}}',
|
|
7
|
-
component: {{name}},
|
|
8
|
-
tags: ['autodocs'],
|
|
9
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
10
|
-
parameters: {
|
|
11
|
-
layout: 'centered',
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* > Default usage example
|
|
20
|
-
*/
|
|
21
|
-
export const DefaultStory: Story = {
|
|
22
|
-
args: {},
|
|
23
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { type VariantProps } from 'tailwind-variants';
|
|
3
|
-
|
|
4
|
-
import { styles } from './{{kebabCase name}}.styles.js';
|
|
5
|
-
|
|
6
|
-
export type {{name}}Props = {
|
|
7
|
-
/**
|
|
8
|
-
* Tag to render
|
|
9
|
-
*/
|
|
10
|
-
tag?: keyof JSX.IntrinsicElements;
|
|
11
|
-
} & VariantProps<typeof styles> &
|
|
12
|
-
HTMLAttributes<Element>;
|