@westpac/ui 0.7.1 → 0.8.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/.storybook/global.css +98 -97
- package/CHANGELOG.md +6 -0
- package/dist/component-type.json +1 -1
- package/dist/components/accordion/accordion.styles.js +1 -1
- package/dist/components/button/button.styles.js +1 -1
- package/dist/components/button-dropdown/components/panel/panel.styles.js +1 -1
- package/dist/components/button-group/components/button/button.styles.js +1 -1
- package/dist/components/checkbox-group/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/error-message/error-message.styles.js +2 -2
- package/dist/components/flexi-cell/flexi-cell.styles.js +1 -1
- 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/pagination/components/pagination-item/pagination-item.styles.js +2 -2
- 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.styles.js +1 -1
- package/dist/components/repeater/repeater.styles.d.ts +6 -0
- package/dist/components/repeater/repeater.styles.js +6 -3
- package/dist/components/well/well.styles.d.ts +1 -1
- package/dist/components/well/well.styles.js +1 -1
- package/dist/css/westpac-ui.css +96 -71
- package/dist/css/westpac-ui.min.css +96 -71
- package/dist/stories/foundation/spacing.stories.d.ts +15 -0
- package/dist/stories/foundation/typography.stories.d.ts +4 -0
- package/dist/tailwind/__mocks__/utils.constants.d.ts +2 -0
- package/dist/tailwind/__mocks__/utils.constants.js +2 -0
- package/dist/tailwind/constants/typography.d.ts +4 -0
- package/dist/tailwind/constants/typography.js +4 -0
- package/dist/tailwind/tailwind-plugin.js +6 -1
- package/package.json +2 -2
- package/src/components/accordion/accordion.styles.ts +1 -1
- package/src/components/button/button.styles.ts +1 -1
- package/src/components/button-dropdown/components/panel/panel.styles.ts +1 -1
- package/src/components/button-group/components/button/button.styles.ts +1 -1
- package/src/components/checkbox-group/components/checkbox/checkbox.styles.ts +1 -1
- package/src/components/error-message/error-message.styles.ts +3 -2
- package/src/components/flexi-cell/flexi-cell.styles.ts +1 -1
- 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/pagination/components/pagination-item/pagination-item.styles.ts +2 -2
- 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.styles.ts +1 -1
- package/src/components/repeater/repeater.styles.ts +6 -3
- package/src/components/well/well.styles.ts +1 -1
- package/src/css/global.css +4 -2
- package/src/tailwind/__mocks__/utils.constants.ts +2 -0
- package/src/tailwind/constants/typography.ts +4 -0
- package/src/tailwind/tailwind-plugin.ts +6 -0
- 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/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
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { VisibilityIcon } from '../icon/index.js';
|
|
4
|
-
import { Button, Input, Select } from '../index.js';
|
|
5
|
-
|
|
6
|
-
import { InputField } from './input-field.component.js';
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof InputField> = {
|
|
9
|
-
title: 'Components/InputField/Sizes',
|
|
10
|
-
component: InputField,
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* > Input field with different sizes
|
|
20
|
-
*/
|
|
21
|
-
export const InputFieldWithDifferentSizes: Story = {
|
|
22
|
-
args: {},
|
|
23
|
-
render: () => {
|
|
24
|
-
return (
|
|
25
|
-
<>
|
|
26
|
-
{(['small', 'medium', 'large', 'xlarge'] as const).map(size => (
|
|
27
|
-
<div key={size} className="border-b border-b-border py-3">
|
|
28
|
-
<h3 className="typography-body-7 mb-4 font-bold">Size: {size}</h3>
|
|
29
|
-
<InputField
|
|
30
|
-
size={size}
|
|
31
|
-
label="Text"
|
|
32
|
-
hint="I am a hint"
|
|
33
|
-
supportingText="I am supporting text"
|
|
34
|
-
before="$AUD"
|
|
35
|
-
after="Text"
|
|
36
|
-
>
|
|
37
|
-
<Input />
|
|
38
|
-
</InputField>
|
|
39
|
-
|
|
40
|
-
<InputField
|
|
41
|
-
size={size}
|
|
42
|
-
label="Icon"
|
|
43
|
-
hint="I am a hint"
|
|
44
|
-
supportingText="I am supporting text"
|
|
45
|
-
before={{ icon: VisibilityIcon, inset: true }}
|
|
46
|
-
after={{ icon: VisibilityIcon, inset: true }}
|
|
47
|
-
>
|
|
48
|
-
<Input />
|
|
49
|
-
</InputField>
|
|
50
|
-
|
|
51
|
-
<InputField
|
|
52
|
-
size={size}
|
|
53
|
-
label="Icon Button"
|
|
54
|
-
hint="I am a hint"
|
|
55
|
-
supportingText="I am supporting text"
|
|
56
|
-
before={{
|
|
57
|
-
element: <Button size={size} look="link" iconAfter={VisibilityIcon} iconColor="pop" />,
|
|
58
|
-
inset: true,
|
|
59
|
-
}}
|
|
60
|
-
after={{
|
|
61
|
-
element: <Button size={size} look="link" iconAfter={VisibilityIcon} iconColor="pop" />,
|
|
62
|
-
inset: true,
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
<Input />
|
|
66
|
-
</InputField>
|
|
67
|
-
|
|
68
|
-
<InputField
|
|
69
|
-
size={size}
|
|
70
|
-
label="Button"
|
|
71
|
-
hint="I am a hint"
|
|
72
|
-
supportingText="I am supporting text"
|
|
73
|
-
before={<Button>Check</Button>}
|
|
74
|
-
after={<Button>Check</Button>}
|
|
75
|
-
>
|
|
76
|
-
<Input />
|
|
77
|
-
</InputField>
|
|
78
|
-
|
|
79
|
-
<InputField
|
|
80
|
-
size={size}
|
|
81
|
-
label="Select"
|
|
82
|
-
hint="I am a hint"
|
|
83
|
-
supportingText="I am supporting text"
|
|
84
|
-
before={
|
|
85
|
-
<Select>
|
|
86
|
-
<option value="Select">Select</option>
|
|
87
|
-
</Select>
|
|
88
|
-
}
|
|
89
|
-
after={
|
|
90
|
-
<Select>
|
|
91
|
-
<option value="Select">Select</option>
|
|
92
|
-
</Select>
|
|
93
|
-
}
|
|
94
|
-
>
|
|
95
|
-
<Input />
|
|
96
|
-
</InputField>
|
|
97
|
-
</div>
|
|
98
|
-
))}
|
|
99
|
-
</>
|
|
100
|
-
);
|
|
101
|
-
},
|
|
102
|
-
};
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { SearchIcon } from '../icon/index.js';
|
|
4
|
-
import { Button, Input, Select } from '../index.js';
|
|
5
|
-
|
|
6
|
-
import { InputField } from './input-field.component.js';
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof InputField> = {
|
|
9
|
-
title: 'Components/InputField/State',
|
|
10
|
-
component: InputField,
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* > Invalid with error message/s
|
|
20
|
-
*/
|
|
21
|
-
export const InvalidWithErrorMessages: Story = {
|
|
22
|
-
args: {},
|
|
23
|
-
render: () => {
|
|
24
|
-
return (
|
|
25
|
-
<>
|
|
26
|
-
<InputField
|
|
27
|
-
label="Text after"
|
|
28
|
-
hint="I am a hint"
|
|
29
|
-
supportingText="I am supporting text"
|
|
30
|
-
errorMessage="If there is an error it can go here"
|
|
31
|
-
after={<Button>Check</Button>}
|
|
32
|
-
>
|
|
33
|
-
<Input invalid />
|
|
34
|
-
</InputField>
|
|
35
|
-
<InputField
|
|
36
|
-
label="Text after"
|
|
37
|
-
hint="I am a hint"
|
|
38
|
-
supportingText="I am supporting text"
|
|
39
|
-
errorMessage={['If there is an error it can go here', 'If there is another error it can go here']}
|
|
40
|
-
after={<Button>Check</Button>}
|
|
41
|
-
before={<Button>Check</Button>}
|
|
42
|
-
>
|
|
43
|
-
<Input invalid />
|
|
44
|
-
</InputField>
|
|
45
|
-
<InputField
|
|
46
|
-
label="Text after"
|
|
47
|
-
hint="I am a hint"
|
|
48
|
-
supportingText="I am supporting text"
|
|
49
|
-
errorMessage="If there is an error it can go here"
|
|
50
|
-
after={{ icon: SearchIcon }}
|
|
51
|
-
before={{ icon: SearchIcon }}
|
|
52
|
-
>
|
|
53
|
-
<Input invalid />
|
|
54
|
-
</InputField>
|
|
55
|
-
<InputField
|
|
56
|
-
label="Text after"
|
|
57
|
-
hint="I am a hint"
|
|
58
|
-
supportingText="I am supporting text"
|
|
59
|
-
errorMessage="If there is an error it can go here"
|
|
60
|
-
after="Text"
|
|
61
|
-
before="Text"
|
|
62
|
-
>
|
|
63
|
-
<Input invalid />
|
|
64
|
-
</InputField>
|
|
65
|
-
<InputField
|
|
66
|
-
label="Text after"
|
|
67
|
-
hint="I am a hint"
|
|
68
|
-
supportingText="I am supporting text"
|
|
69
|
-
errorMessage="If there is an error it can go here"
|
|
70
|
-
after={
|
|
71
|
-
<Select invalid>
|
|
72
|
-
<option>Select</option>
|
|
73
|
-
</Select>
|
|
74
|
-
}
|
|
75
|
-
before={
|
|
76
|
-
<Select invalid>
|
|
77
|
-
<option>Select</option>
|
|
78
|
-
</Select>
|
|
79
|
-
}
|
|
80
|
-
>
|
|
81
|
-
<Input invalid />
|
|
82
|
-
</InputField>
|
|
83
|
-
</>
|
|
84
|
-
);
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* > Input field with disabled state
|
|
90
|
-
*/
|
|
91
|
-
export const InputFieldWithDisabledState: Story = {
|
|
92
|
-
args: {},
|
|
93
|
-
render: () => {
|
|
94
|
-
return (
|
|
95
|
-
<>
|
|
96
|
-
<InputField
|
|
97
|
-
label="Text after"
|
|
98
|
-
hint="I am a hint"
|
|
99
|
-
supportingText="I am supporting text"
|
|
100
|
-
after={{ icon: SearchIcon }}
|
|
101
|
-
before={{ icon: SearchIcon }}
|
|
102
|
-
>
|
|
103
|
-
<Input disabled />
|
|
104
|
-
</InputField>
|
|
105
|
-
<InputField
|
|
106
|
-
label="Text after"
|
|
107
|
-
hint="I am a hint"
|
|
108
|
-
supportingText="I am supporting text"
|
|
109
|
-
before="$AUD"
|
|
110
|
-
after="Text"
|
|
111
|
-
>
|
|
112
|
-
<Input disabled />
|
|
113
|
-
</InputField>
|
|
114
|
-
</>
|
|
115
|
-
);
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* > Input field with read-only state
|
|
121
|
-
*/
|
|
122
|
-
export const InputFieldWithReadOnlyState: Story = {
|
|
123
|
-
args: {},
|
|
124
|
-
render: () => {
|
|
125
|
-
return (
|
|
126
|
-
<>
|
|
127
|
-
<InputField
|
|
128
|
-
label="Text after"
|
|
129
|
-
hint="I am a hint"
|
|
130
|
-
supportingText="I am supporting text"
|
|
131
|
-
after={{ icon: SearchIcon }}
|
|
132
|
-
before={{ icon: SearchIcon }}
|
|
133
|
-
>
|
|
134
|
-
<Input readOnly />
|
|
135
|
-
</InputField>
|
|
136
|
-
<InputField
|
|
137
|
-
label="Text after"
|
|
138
|
-
hint="I am a hint"
|
|
139
|
-
supportingText="I am supporting text"
|
|
140
|
-
before="$AUD"
|
|
141
|
-
after="Text"
|
|
142
|
-
>
|
|
143
|
-
<Input readOnly />
|
|
144
|
-
</InputField>
|
|
145
|
-
</>
|
|
146
|
-
);
|
|
147
|
-
},
|
|
148
|
-
};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { Button, Input } from '../index.js';
|
|
4
|
-
|
|
5
|
-
import { InputField } from './input-field.component.js';
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof InputField> = {
|
|
8
|
-
title: 'Components/InputField',
|
|
9
|
-
component: InputField,
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* > Default usage example
|
|
19
|
-
*/
|
|
20
|
-
export const Default: Story = {
|
|
21
|
-
args: {},
|
|
22
|
-
render: () => {
|
|
23
|
-
return (
|
|
24
|
-
<InputField label="Label" hint="I am a hint" supportingText="I am supporting text" after={<Button>Check</Button>}>
|
|
25
|
-
<Input />
|
|
26
|
-
</InputField>
|
|
27
|
-
);
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* > Another usage example
|
|
33
|
-
*/
|
|
34
|
-
export const AnotherDefault: Story = {
|
|
35
|
-
args: {},
|
|
36
|
-
render: () => {
|
|
37
|
-
return (
|
|
38
|
-
<InputField label="Label" hint="I am a hint" supportingText="I am supporting text">
|
|
39
|
-
<Input />
|
|
40
|
-
</InputField>
|
|
41
|
-
);
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* > SrOnlyLabel usage example
|
|
47
|
-
*/
|
|
48
|
-
export const SrOnlyLabel: Story = {
|
|
49
|
-
args: {},
|
|
50
|
-
render: () => {
|
|
51
|
-
return (
|
|
52
|
-
<InputField
|
|
53
|
-
label="Label"
|
|
54
|
-
hideLabel
|
|
55
|
-
hint="I am a hint"
|
|
56
|
-
supportingText="I am supporting text"
|
|
57
|
-
after={<Button>Check</Button>}
|
|
58
|
-
>
|
|
59
|
-
<Input />
|
|
60
|
-
</InputField>
|
|
61
|
-
);
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* > Combination usage example
|
|
67
|
-
*/
|
|
68
|
-
export const Combination: Story = {
|
|
69
|
-
args: {},
|
|
70
|
-
render: () => {
|
|
71
|
-
return (
|
|
72
|
-
<InputField
|
|
73
|
-
label="Label"
|
|
74
|
-
hint="I am a hint"
|
|
75
|
-
supportingText="I am supporting text"
|
|
76
|
-
after={<Button>Check</Button>}
|
|
77
|
-
before="$AUD"
|
|
78
|
-
>
|
|
79
|
-
<Input />
|
|
80
|
-
</InputField>
|
|
81
|
-
);
|
|
82
|
-
},
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
/**
|
|
86
|
-
* > Fieldset as tag
|
|
87
|
-
*/
|
|
88
|
-
export const WithFieldset: Story = {
|
|
89
|
-
args: {},
|
|
90
|
-
render: () => {
|
|
91
|
-
return (
|
|
92
|
-
<InputField
|
|
93
|
-
tag="fieldset"
|
|
94
|
-
label="Label"
|
|
95
|
-
hint="I am a hint"
|
|
96
|
-
supportingText="I am supporting text"
|
|
97
|
-
after={<Button>Check</Button>}
|
|
98
|
-
before="$AUD"
|
|
99
|
-
>
|
|
100
|
-
<Input />
|
|
101
|
-
</InputField>
|
|
102
|
-
);
|
|
103
|
-
},
|
|
104
|
-
};
|
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { SearchIcon, VisibilityIcon } from '../icon/index.js';
|
|
4
|
-
import { Button, Input, Select, Textarea } from '../index.js';
|
|
5
|
-
|
|
6
|
-
import { InputField } from './input-field.component.js';
|
|
7
|
-
|
|
8
|
-
const meta: Meta<typeof InputField> = {
|
|
9
|
-
title: 'Components/InputField/Types',
|
|
10
|
-
component: InputField,
|
|
11
|
-
tags: ['autodocs'],
|
|
12
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default meta;
|
|
16
|
-
type Story = StoryObj<typeof meta>;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* > Text Beforoe story example
|
|
20
|
-
*/
|
|
21
|
-
export const TextBeforeStory: Story = {
|
|
22
|
-
args: {},
|
|
23
|
-
render: () => {
|
|
24
|
-
return (
|
|
25
|
-
<InputField label="Text before" hint="I am a hint" supportingText="I am supporting text" before="$AUD">
|
|
26
|
-
<Input />
|
|
27
|
-
</InputField>
|
|
28
|
-
);
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* > Text Beforoe story example
|
|
34
|
-
*/
|
|
35
|
-
export const TextAfter: Story = {
|
|
36
|
-
args: {},
|
|
37
|
-
render: () => {
|
|
38
|
-
return (
|
|
39
|
-
<InputField label="Text after" hint="I am a hint" supportingText="I am supporting text" after="Text">
|
|
40
|
-
<Input />
|
|
41
|
-
</InputField>
|
|
42
|
-
);
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* > Text After and Beforoe story example
|
|
48
|
-
*/
|
|
49
|
-
export const TextAfterAndBefore: Story = {
|
|
50
|
-
args: {},
|
|
51
|
-
render: () => {
|
|
52
|
-
return (
|
|
53
|
-
<InputField
|
|
54
|
-
label="Text after"
|
|
55
|
-
hint="I am a hint"
|
|
56
|
-
supportingText="I am supporting text"
|
|
57
|
-
before="$AUD"
|
|
58
|
-
after="Text"
|
|
59
|
-
>
|
|
60
|
-
<Input />
|
|
61
|
-
</InputField>
|
|
62
|
-
);
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* > Textarea
|
|
68
|
-
*/
|
|
69
|
-
export const IconAddOn: Story = {
|
|
70
|
-
args: {},
|
|
71
|
-
render: () => {
|
|
72
|
-
return (
|
|
73
|
-
<>
|
|
74
|
-
<InputField
|
|
75
|
-
label="Icon before"
|
|
76
|
-
hint="I am a hint"
|
|
77
|
-
supportingText="I am supporting text"
|
|
78
|
-
before={{ icon: SearchIcon }}
|
|
79
|
-
>
|
|
80
|
-
<Input />
|
|
81
|
-
</InputField>
|
|
82
|
-
<InputField
|
|
83
|
-
label="Icon after"
|
|
84
|
-
hint="I am a hint"
|
|
85
|
-
supportingText="I am supporting text"
|
|
86
|
-
after={{ icon: SearchIcon }}
|
|
87
|
-
>
|
|
88
|
-
<Input />
|
|
89
|
-
</InputField>
|
|
90
|
-
<InputField
|
|
91
|
-
label="Icon after"
|
|
92
|
-
hint="I am a hint"
|
|
93
|
-
supportingText="I am supporting text"
|
|
94
|
-
after={{ icon: SearchIcon }}
|
|
95
|
-
before={{ icon: SearchIcon }}
|
|
96
|
-
>
|
|
97
|
-
<Input />
|
|
98
|
-
</InputField>
|
|
99
|
-
</>
|
|
100
|
-
);
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* > Icons in buttons
|
|
106
|
-
*/
|
|
107
|
-
export const IconInButtonsOn: Story = {
|
|
108
|
-
args: {},
|
|
109
|
-
render: () => {
|
|
110
|
-
return (
|
|
111
|
-
<>
|
|
112
|
-
<InputField
|
|
113
|
-
label="Icon button before"
|
|
114
|
-
hint="I am a hint"
|
|
115
|
-
supportingText="I am supporting text"
|
|
116
|
-
before={{ inset: true, element: <Button look="link" iconAfter={VisibilityIcon} iconColor="muted" /> }}
|
|
117
|
-
>
|
|
118
|
-
<Input />
|
|
119
|
-
</InputField>
|
|
120
|
-
<InputField
|
|
121
|
-
label="Icon button after"
|
|
122
|
-
hint="I am a hint"
|
|
123
|
-
supportingText="I am supporting text"
|
|
124
|
-
after={{ inset: true, element: <Button look="link" iconAfter={VisibilityIcon} iconColor="muted" /> }}
|
|
125
|
-
>
|
|
126
|
-
<Input />
|
|
127
|
-
</InputField>
|
|
128
|
-
<InputField
|
|
129
|
-
label="Icon button before and after"
|
|
130
|
-
hint="I am a hint"
|
|
131
|
-
supportingText="I am supporting text"
|
|
132
|
-
after={{ inset: true, element: <Button look="link" iconAfter={VisibilityIcon} iconColor="muted" /> }}
|
|
133
|
-
before={{ inset: true, element: <Button look="link" iconAfter={VisibilityIcon} iconColor="muted" /> }}
|
|
134
|
-
>
|
|
135
|
-
<Input />
|
|
136
|
-
</InputField>
|
|
137
|
-
</>
|
|
138
|
-
);
|
|
139
|
-
},
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
/**
|
|
143
|
-
* > Button add ons
|
|
144
|
-
*/
|
|
145
|
-
export const ButtonAddOn: Story = {
|
|
146
|
-
args: {},
|
|
147
|
-
render: () => {
|
|
148
|
-
return (
|
|
149
|
-
<>
|
|
150
|
-
<InputField
|
|
151
|
-
label="Button before"
|
|
152
|
-
hint="I am a hint"
|
|
153
|
-
supportingText="I am supporting text"
|
|
154
|
-
before={<Button>Check</Button>}
|
|
155
|
-
>
|
|
156
|
-
<Input />
|
|
157
|
-
</InputField>
|
|
158
|
-
<InputField
|
|
159
|
-
label="Button after"
|
|
160
|
-
hint="I am a hint"
|
|
161
|
-
supportingText="I am supporting text"
|
|
162
|
-
after={<Button>Check</Button>}
|
|
163
|
-
>
|
|
164
|
-
<Input />
|
|
165
|
-
</InputField>
|
|
166
|
-
<InputField
|
|
167
|
-
label="Button before and after"
|
|
168
|
-
hint="I am a hint"
|
|
169
|
-
supportingText="I am supporting text"
|
|
170
|
-
after={<Button>Check</Button>}
|
|
171
|
-
before={<Button>Check</Button>}
|
|
172
|
-
>
|
|
173
|
-
<Input />
|
|
174
|
-
</InputField>
|
|
175
|
-
<InputField
|
|
176
|
-
label="Primary button after"
|
|
177
|
-
hint="I am a hint"
|
|
178
|
-
supportingText="I am supporting text"
|
|
179
|
-
after={<Button look="primary">Check</Button>}
|
|
180
|
-
>
|
|
181
|
-
<Input />
|
|
182
|
-
</InputField>
|
|
183
|
-
<InputField
|
|
184
|
-
label="Faint button after"
|
|
185
|
-
hint="I am a hint"
|
|
186
|
-
supportingText="I am supporting text"
|
|
187
|
-
after={<Button look="faint">Check</Button>}
|
|
188
|
-
>
|
|
189
|
-
<Input />
|
|
190
|
-
</InputField>
|
|
191
|
-
</>
|
|
192
|
-
);
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* > Select add ons
|
|
198
|
-
*/
|
|
199
|
-
export const SelectAddOn: Story = {
|
|
200
|
-
args: {},
|
|
201
|
-
render: () => {
|
|
202
|
-
return (
|
|
203
|
-
<InputField
|
|
204
|
-
label="Select"
|
|
205
|
-
hint="I am a hint"
|
|
206
|
-
supportingText="I am supporting text"
|
|
207
|
-
before={
|
|
208
|
-
<Select>
|
|
209
|
-
<option>Select</option>
|
|
210
|
-
</Select>
|
|
211
|
-
}
|
|
212
|
-
after={
|
|
213
|
-
<Select>
|
|
214
|
-
<option>Select</option>
|
|
215
|
-
</Select>
|
|
216
|
-
}
|
|
217
|
-
>
|
|
218
|
-
<Input />
|
|
219
|
-
</InputField>
|
|
220
|
-
);
|
|
221
|
-
},
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
/**
|
|
225
|
-
* > Textarea
|
|
226
|
-
*/
|
|
227
|
-
export const TextArea: Story = {
|
|
228
|
-
args: {},
|
|
229
|
-
render: () => {
|
|
230
|
-
return (
|
|
231
|
-
<InputField label="Text after" hint="I am a hint" supportingText="I am supporting text">
|
|
232
|
-
<Textarea />
|
|
233
|
-
</InputField>
|
|
234
|
-
);
|
|
235
|
-
},
|
|
236
|
-
};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
|
|
2
|
-
|
|
3
|
-
import { ArrowRightIcon, PdfFileIcon } from '../icon/index.js';
|
|
4
|
-
|
|
5
|
-
import { Link } from './link.component.js';
|
|
6
|
-
|
|
7
|
-
const meta: Meta<typeof Link> = {
|
|
8
|
-
title: 'Components/Link',
|
|
9
|
-
component: Link,
|
|
10
|
-
tags: ['autodocs'],
|
|
11
|
-
decorators: [(Story: StoryFn) => <Story />],
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export default meta;
|
|
15
|
-
type Story = StoryObj<typeof meta>;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* > Default usage example
|
|
19
|
-
*/
|
|
20
|
-
export const Default: Story = {
|
|
21
|
-
args: {
|
|
22
|
-
children: "Look, I'm a default link",
|
|
23
|
-
href: '#',
|
|
24
|
-
},
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const SIZES = ['xsmall', 'small', 'medium', 'large', 'xlarge'] as const;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* > Standalone link with iconSizes, arrowRight is default but can be overridden.
|
|
31
|
-
* > If no icon is passed it defaults to ArrowRightIcon in the iconBefore position
|
|
32
|
-
*/
|
|
33
|
-
export const Standalone = () => (
|
|
34
|
-
<div className="space-y-1">
|
|
35
|
-
<h1 className="font-bold">Default</h1>
|
|
36
|
-
<Link href="#">Look I'm a standalone link</Link>
|
|
37
|
-
<h1 className="font-bold">Icon Before override</h1>
|
|
38
|
-
<Link href="#" iconBefore={PdfFileIcon}>
|
|
39
|
-
Look I'm a standalone link
|
|
40
|
-
</Link>
|
|
41
|
-
<h1 className="font-bold">Icon Before override</h1>
|
|
42
|
-
<Link href="#" iconAfter={ArrowRightIcon}>
|
|
43
|
-
Look I'm a standalone link
|
|
44
|
-
</Link>
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* > Inline link example
|
|
50
|
-
*/
|
|
51
|
-
export const Inline = () => (
|
|
52
|
-
<div className="space-y-1">
|
|
53
|
-
<p className="typography-body-10">
|
|
54
|
-
Lorem ipsum dolor{' '}
|
|
55
|
-
<Link href="#" type="inline">
|
|
56
|
-
look, I'm an inline link
|
|
57
|
-
</Link>{' '}
|
|
58
|
-
sit amet consectetur, adipisicing elit. Libero facilis odit voluptate reprehenderit laborum numquam ex optio
|
|
59
|
-
doloribus magni repudiandae vero fugiat iusto tempora debitis sunt laboriosam nobis, ut voluptatum?
|
|
60
|
-
</p>
|
|
61
|
-
<p className="typography-body-10">
|
|
62
|
-
Lorem ipsum dolor{' '}
|
|
63
|
-
<Link href="#" type="inline" underline={false}>
|
|
64
|
-
look, I'm an inline link with no underline
|
|
65
|
-
</Link>{' '}
|
|
66
|
-
sit amet consectetur, adipisicing elit. Libero facilis odit voluptate reprehenderit laborum numquam ex optio
|
|
67
|
-
doloribus magni repudiandae vero fugiat iusto tempora debitis sunt laboriosam nobis, ut voluptatum?
|
|
68
|
-
</p>
|
|
69
|
-
<p className="typography-body-10">
|
|
70
|
-
Lorem ipsum dolor{' '}
|
|
71
|
-
<Link href="#" type="inline" iconBefore={PdfFileIcon}>
|
|
72
|
-
look, I'm an inline link
|
|
73
|
-
</Link>{' '}
|
|
74
|
-
sit amet consectetur, adipisicing elit. Libero facilis odit voluptate reprehenderit laborum numquam ex optio
|
|
75
|
-
doloribus magni repudiandae vero fugiat iusto tempora debitis sunt laboriosam nobis, ut voluptatum?
|
|
76
|
-
</p>
|
|
77
|
-
<p className="typography-body-10">
|
|
78
|
-
Lorem ipsum dolor{' '}
|
|
79
|
-
<Link href="#" type="inline" iconAfter={PdfFileIcon}>
|
|
80
|
-
look, I'm an inline link
|
|
81
|
-
</Link>{' '}
|
|
82
|
-
sit amet consectetur, adipisicing elit. Libero facilis odit voluptate reprehenderit laborum numquam ex optio
|
|
83
|
-
doloribus magni repudiandae vero fugiat iusto tempora debitis sunt laboriosam nobis, ut voluptatum?
|
|
84
|
-
</p>
|
|
85
|
-
<Link href="#" type="inline" iconBefore={PdfFileIcon}>
|
|
86
|
-
look, I'm an inline link
|
|
87
|
-
</Link>
|
|
88
|
-
</div>
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* > example of icon sizes
|
|
93
|
-
*/
|
|
94
|
-
export const IconSizes = () => (
|
|
95
|
-
<div className="space-y-1">
|
|
96
|
-
{SIZES.map(size => (
|
|
97
|
-
<div key={size}>
|
|
98
|
-
<h1 className="font-bold">{size}</h1>
|
|
99
|
-
<Link href="#" iconSize={size} iconBefore={PdfFileIcon} iconAfter={PdfFileIcon}>
|
|
100
|
-
Look I'm a standalone link
|
|
101
|
-
</Link>
|
|
102
|
-
<p className="typography-body-10">
|
|
103
|
-
Lorem ipsum dolor{' '}
|
|
104
|
-
<Link href="#" type="inline" iconSize={size} iconBefore={PdfFileIcon} iconAfter={PdfFileIcon}>
|
|
105
|
-
look, I'm an inline link
|
|
106
|
-
</Link>{' '}
|
|
107
|
-
sit amet consectetur, adipisicing elit. Libero facilis odit voluptate reprehenderit laborum numquam ex optio
|
|
108
|
-
doloribus magni repudiandae vero fugiat iusto tempora debitis sunt laboriosam nobis, ut voluptatum?
|
|
109
|
-
</p>
|
|
110
|
-
</div>
|
|
111
|
-
))}
|
|
112
|
-
</div>
|
|
113
|
-
);
|