@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,103 +0,0 @@
|
|
|
1
|
-
import { Input } from '../index.js';
|
|
2
|
-
import { Form } from './form.component.js';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Components/Form',
|
|
5
|
-
component: Form,
|
|
6
|
-
tags: [
|
|
7
|
-
'autodocs'
|
|
8
|
-
],
|
|
9
|
-
decorators: [
|
|
10
|
-
(Story)=>React.createElement(Story, null)
|
|
11
|
-
]
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
export const Default = {
|
|
15
|
-
args: {},
|
|
16
|
-
render: ()=>{
|
|
17
|
-
return React.createElement(React.Fragment, null, React.createElement("h2", {
|
|
18
|
-
className: "typography-body-7 my-4 font-bold"
|
|
19
|
-
}, "Default size and spacing"), React.createElement(Form, null, React.createElement(Form.Section, null, React.createElement(Form.ChitChat, null, "Hello, I’m the friendly conversational text component. I live at the top of the form pod if required.")), React.createElement(Form.Section, null, React.createElement(Form.Group, null, React.createElement(Form.Label, {
|
|
20
|
-
htmlFor: "example-default-1"
|
|
21
|
-
}, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
22
|
-
message: "This is an error message"
|
|
23
|
-
}), React.createElement(Input, {
|
|
24
|
-
name: "example-default-1"
|
|
25
|
-
})), React.createElement(Form.Group, null, React.createElement(Form.Label, {
|
|
26
|
-
htmlFor: "example-default-2"
|
|
27
|
-
}, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
28
|
-
message: "This is an error message"
|
|
29
|
-
}), React.createElement(Input, {
|
|
30
|
-
name: "example-default-2"
|
|
31
|
-
}))), React.createElement(Form.Section, null, React.createElement(Form.Group, null, React.createElement(Form.Label, {
|
|
32
|
-
htmlFor: "example-default-3"
|
|
33
|
-
}, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
34
|
-
message: "This is an error message"
|
|
35
|
-
}), React.createElement(Input, {
|
|
36
|
-
name: "example-default-3"
|
|
37
|
-
})))), React.createElement("hr", null), React.createElement("h2", {
|
|
38
|
-
className: "typography-body-7 my-4 font-bold"
|
|
39
|
-
}, "Large size with large spacing"), React.createElement(Form, {
|
|
40
|
-
size: "large",
|
|
41
|
-
spacing: "large"
|
|
42
|
-
}, React.createElement(Form.Section, null, React.createElement(Form.ChitChat, null, "Hello, I’m the friendly conversational text component. I live at the top of the form pod if required.")), React.createElement(Form.Section, null, React.createElement(Form.Group, null, React.createElement(Form.Label, {
|
|
43
|
-
htmlFor: "example-large-1"
|
|
44
|
-
}, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
45
|
-
message: "This is an error message"
|
|
46
|
-
}), React.createElement(Input, {
|
|
47
|
-
name: "example-large-1"
|
|
48
|
-
})), React.createElement(Form.Group, null, React.createElement(Form.Label, {
|
|
49
|
-
htmlFor: "example-large-2"
|
|
50
|
-
}, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
51
|
-
message: "This is an error message"
|
|
52
|
-
}), React.createElement(Input, {
|
|
53
|
-
name: "example-large-2"
|
|
54
|
-
}))), React.createElement(Form.Section, null, React.createElement(Form.Group, null, React.createElement(Form.Label, {
|
|
55
|
-
htmlFor: "example-large-3"
|
|
56
|
-
}, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
57
|
-
message: "This is an error message"
|
|
58
|
-
}), React.createElement(Input, {
|
|
59
|
-
name: "example-large-3"
|
|
60
|
-
})))));
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
export const MultipleErrors = {
|
|
64
|
-
args: {},
|
|
65
|
-
render: ()=>{
|
|
66
|
-
return React.createElement(Form, null, React.createElement(Form.Label, null, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
67
|
-
message: [
|
|
68
|
-
'This is an error message',
|
|
69
|
-
'another error message'
|
|
70
|
-
]
|
|
71
|
-
}), React.createElement(Input, null));
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
export const AllSizes = {
|
|
75
|
-
args: {},
|
|
76
|
-
render: ()=>{
|
|
77
|
-
return React.createElement("div", {
|
|
78
|
-
className: "flex flex-col gap-3"
|
|
79
|
-
}, [
|
|
80
|
-
'small',
|
|
81
|
-
'medium'
|
|
82
|
-
].map((size)=>React.createElement(Form, {
|
|
83
|
-
size: size
|
|
84
|
-
}, React.createElement("h3", null, "Form with size: ", size), React.createElement(Form.Label, null, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
85
|
-
message: "This is an error message"
|
|
86
|
-
}), React.createElement(Input, null))));
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
export const AllSpacings = {
|
|
90
|
-
args: {},
|
|
91
|
-
render: ()=>{
|
|
92
|
-
return React.createElement("div", {
|
|
93
|
-
className: "flex flex-col gap-3"
|
|
94
|
-
}, [
|
|
95
|
-
'medium',
|
|
96
|
-
'large'
|
|
97
|
-
].map((size)=>React.createElement(Form, {
|
|
98
|
-
spacing: size
|
|
99
|
-
}, React.createElement("h3", null, "Form with Spacing:", size), React.createElement(Form.Label, null, "This is a label"), React.createElement(Form.Hint, null, "This is a hint"), React.createElement(Form.ErrorMessage, {
|
|
100
|
-
message: "This is an error message"
|
|
101
|
-
}), React.createElement(Input, null))));
|
|
102
|
-
}
|
|
103
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { Container, Item } from './components/index.js';
|
|
2
|
-
import { Grid } from './grid.component.js';
|
|
3
|
-
const meta = {
|
|
4
|
-
title: 'Foundation/Grid',
|
|
5
|
-
component: Grid,
|
|
6
|
-
tags: [
|
|
7
|
-
'autodocs'
|
|
8
|
-
],
|
|
9
|
-
decorators: [
|
|
10
|
-
(Story)=>React.createElement(Story, null)
|
|
11
|
-
]
|
|
12
|
-
};
|
|
13
|
-
export default meta;
|
|
14
|
-
export const Default = ()=>{
|
|
15
|
-
const items = Array(12).fill(null);
|
|
16
|
-
return React.createElement(Grid, null, items.map((_, i)=>React.createElement(Item, {
|
|
17
|
-
key: i,
|
|
18
|
-
className: "border border-border bg-light p-2 text-center"
|
|
19
|
-
}, i + 1)));
|
|
20
|
-
};
|
|
21
|
-
export const DefaultContainer = ()=>{
|
|
22
|
-
const items = Array(12).fill(null);
|
|
23
|
-
return React.createElement(Container, null, React.createElement(Grid, null, items.map((_, i)=>React.createElement(Item, {
|
|
24
|
-
key: i,
|
|
25
|
-
className: "border border-border bg-light p-2 text-center"
|
|
26
|
-
}, i + 1))));
|
|
27
|
-
};
|
|
28
|
-
export const ResponsiveItems = ()=>{
|
|
29
|
-
return React.createElement(Container, null, React.createElement(Grid, null, React.createElement(Item, {
|
|
30
|
-
span: {
|
|
31
|
-
initial: 6,
|
|
32
|
-
lg: 2
|
|
33
|
-
},
|
|
34
|
-
className: "border border-border bg-light p-2 text-center"
|
|
35
|
-
}, "span - (xs:6, lg:3)"), React.createElement(Item, {
|
|
36
|
-
span: {
|
|
37
|
-
initial: 6,
|
|
38
|
-
lg: 10
|
|
39
|
-
},
|
|
40
|
-
className: "border border-border bg-light p-2 text-center"
|
|
41
|
-
}, "span - (xs:6, lg:10)")));
|
|
42
|
-
};
|
|
43
|
-
export const Positioning = ()=>{
|
|
44
|
-
return React.createElement(Container, null, React.createElement(Grid, null, React.createElement(Item, {
|
|
45
|
-
span: 4,
|
|
46
|
-
className: "border border-border bg-light p-2 text-center"
|
|
47
|
-
}, "Top Left"), React.createElement(Item, {
|
|
48
|
-
start: 9,
|
|
49
|
-
span: 4,
|
|
50
|
-
className: "border border-border bg-light p-2 text-center"
|
|
51
|
-
}, "Top Right"), React.createElement(Item, {
|
|
52
|
-
start: 5,
|
|
53
|
-
span: 4,
|
|
54
|
-
className: "border border-border bg-light p-2 text-center"
|
|
55
|
-
}, "Middle"), React.createElement(Item, {
|
|
56
|
-
start: 1,
|
|
57
|
-
span: 4,
|
|
58
|
-
className: "border border-border bg-light p-2 text-center"
|
|
59
|
-
}, "Bottom Left"), React.createElement(Item, {
|
|
60
|
-
start: 9,
|
|
61
|
-
span: 4,
|
|
62
|
-
className: "border border-border bg-light p-2 text-center"
|
|
63
|
-
}, "Bottom Right")));
|
|
64
|
-
};
|
|
65
|
-
export const HolyGrailLayout = ()=>{
|
|
66
|
-
return React.createElement(Container, null, React.createElement(Grid, null, React.createElement(Item, {
|
|
67
|
-
span: 12,
|
|
68
|
-
className: "h-12 border border-border bg-light p-2 text-center"
|
|
69
|
-
}, "Header"), React.createElement(Item, {
|
|
70
|
-
span: 3,
|
|
71
|
-
className: "h-10 border border-border bg-light p-2 text-center"
|
|
72
|
-
}, "Menu"), React.createElement(Item, {
|
|
73
|
-
span: 6,
|
|
74
|
-
className: "h-10 border border-border bg-light p-2 text-center"
|
|
75
|
-
}, "Content"), React.createElement(Item, {
|
|
76
|
-
span: 3,
|
|
77
|
-
className: "h-10 border border-border bg-light p-2 text-center"
|
|
78
|
-
}, "Ads"), React.createElement(Item, {
|
|
79
|
-
span: 12,
|
|
80
|
-
className: "h-12 border border-border bg-light p-2 text-center"
|
|
81
|
-
}, "Footer")));
|
|
82
|
-
};
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source){
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
15
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
16
|
-
import * as AllIcons from './index.js';
|
|
17
|
-
const AllIconsExample = (props)=>{
|
|
18
|
-
const [search, setSearch] = useState('');
|
|
19
|
-
const filteredIcons = useMemo(()=>{
|
|
20
|
-
return Object.entries(AllIcons).reduce((acc, [iconName, Icon])=>{
|
|
21
|
-
if (iconName.toUpperCase().indexOf(search.toUpperCase()) === -1) {
|
|
22
|
-
return acc;
|
|
23
|
-
}
|
|
24
|
-
return [
|
|
25
|
-
...acc,
|
|
26
|
-
{
|
|
27
|
-
key: iconName,
|
|
28
|
-
Icon
|
|
29
|
-
}
|
|
30
|
-
];
|
|
31
|
-
}, []);
|
|
32
|
-
}, [
|
|
33
|
-
search
|
|
34
|
-
]);
|
|
35
|
-
const handleOnChange = useCallback(({ target: { value } })=>{
|
|
36
|
-
setSearch(value);
|
|
37
|
-
}, []);
|
|
38
|
-
const handleOnClick = useCallback(async (key)=>{
|
|
39
|
-
try {
|
|
40
|
-
await navigator.clipboard.writeText(`<${key} />`);
|
|
41
|
-
console.log('Content copied to clipboard');
|
|
42
|
-
} catch (err) {
|
|
43
|
-
console.error('Failed to copy: ', err);
|
|
44
|
-
}
|
|
45
|
-
}, [
|
|
46
|
-
props.className
|
|
47
|
-
]);
|
|
48
|
-
return React.createElement("div", {
|
|
49
|
-
className: "flex flex-col gap-2"
|
|
50
|
-
}, React.createElement("input", {
|
|
51
|
-
className: "rounded-sm border border-border px-3 py-2",
|
|
52
|
-
onChange: handleOnChange,
|
|
53
|
-
placeholder: "e.g: Accessibiliy"
|
|
54
|
-
}), React.createElement("div", {
|
|
55
|
-
className: "flex flex-row flex-wrap justify-center gap-2"
|
|
56
|
-
}, filteredIcons.map(({ key , Icon })=>React.createElement("button", {
|
|
57
|
-
onClick: ()=>handleOnClick(key),
|
|
58
|
-
className: "flex h-15 w-23 flex-col items-center justify-center gap-2 border border-border",
|
|
59
|
-
key: key
|
|
60
|
-
}, React.createElement(Icon, _extends({}, props)), React.createElement("span", {
|
|
61
|
-
className: "whitespace-pre-wrap text-xs"
|
|
62
|
-
}, `<${key} />`)))));
|
|
63
|
-
};
|
|
64
|
-
const meta = {
|
|
65
|
-
title: 'Foundation/Icons',
|
|
66
|
-
component: AllIconsExample,
|
|
67
|
-
tags: [
|
|
68
|
-
'autodocs'
|
|
69
|
-
],
|
|
70
|
-
decorators: [
|
|
71
|
-
(Story)=>React.createElement(Story, null)
|
|
72
|
-
],
|
|
73
|
-
argTypes: {
|
|
74
|
-
children: {
|
|
75
|
-
description: 'Children',
|
|
76
|
-
type: {
|
|
77
|
-
name: 'string'
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
copyrightYear: {
|
|
81
|
-
description: 'CopyrightYear',
|
|
82
|
-
type: {
|
|
83
|
-
name: 'string'
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
size: {
|
|
87
|
-
description: 'size',
|
|
88
|
-
type: {
|
|
89
|
-
name: 'enum',
|
|
90
|
-
value: [
|
|
91
|
-
'xsmall',
|
|
92
|
-
'small',
|
|
93
|
-
'medium',
|
|
94
|
-
'large',
|
|
95
|
-
'xlarge'
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
color: {
|
|
100
|
-
description: 'color',
|
|
101
|
-
type: {
|
|
102
|
-
name: 'enum',
|
|
103
|
-
value: [
|
|
104
|
-
'success',
|
|
105
|
-
'info',
|
|
106
|
-
'warning',
|
|
107
|
-
'danger',
|
|
108
|
-
'system',
|
|
109
|
-
'white',
|
|
110
|
-
'black',
|
|
111
|
-
'background',
|
|
112
|
-
'border',
|
|
113
|
-
'borderDark',
|
|
114
|
-
'focus',
|
|
115
|
-
'heading',
|
|
116
|
-
'hero',
|
|
117
|
-
'light',
|
|
118
|
-
'link',
|
|
119
|
-
'muted',
|
|
120
|
-
'neutral',
|
|
121
|
-
'pop',
|
|
122
|
-
'primary',
|
|
123
|
-
'text'
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
export default meta;
|
|
130
|
-
export const Default = {
|
|
131
|
-
args: {}
|
|
132
|
-
};
|
|
133
|
-
export const Primary = {
|
|
134
|
-
args: {
|
|
135
|
-
color: 'primary'
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
export const Size = {
|
|
139
|
-
args: {
|
|
140
|
-
size: 'xlarge'
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
export const Outlined = {
|
|
144
|
-
args: {
|
|
145
|
-
look: 'outlined'
|
|
146
|
-
}
|
|
147
|
-
};
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { Input } from './input.component.js';
|
|
2
|
-
const meta = {
|
|
3
|
-
title: 'Components/Input',
|
|
4
|
-
component: Input,
|
|
5
|
-
tags: [
|
|
6
|
-
'autodocs'
|
|
7
|
-
],
|
|
8
|
-
decorators: [
|
|
9
|
-
(Story)=>React.createElement("div", {
|
|
10
|
-
className: "flex"
|
|
11
|
-
}, React.createElement(Story, null))
|
|
12
|
-
]
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
const SIZES = [
|
|
16
|
-
'small',
|
|
17
|
-
'medium',
|
|
18
|
-
'large',
|
|
19
|
-
'xlarge'
|
|
20
|
-
];
|
|
21
|
-
const FIXED_WIDTHS = [
|
|
22
|
-
2,
|
|
23
|
-
3,
|
|
24
|
-
4,
|
|
25
|
-
5,
|
|
26
|
-
10,
|
|
27
|
-
20,
|
|
28
|
-
30
|
|
29
|
-
];
|
|
30
|
-
export const Default = {
|
|
31
|
-
args: {
|
|
32
|
-
placeholder: 'placeholder',
|
|
33
|
-
size: 'medium'
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
export const Invalid = {
|
|
37
|
-
args: {
|
|
38
|
-
invalid: true
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
export const Disabled = {
|
|
42
|
-
args: {
|
|
43
|
-
disabled: true
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
export const Sizes = ()=>React.createElement("div", {
|
|
47
|
-
className: "flex flex-col gap-2"
|
|
48
|
-
}, SIZES.map((size)=>React.createElement(Input, {
|
|
49
|
-
size: size,
|
|
50
|
-
placeholder: size
|
|
51
|
-
})));
|
|
52
|
-
export const ReadOnly = {
|
|
53
|
-
args: {
|
|
54
|
-
readOnly: true
|
|
55
|
-
}
|
|
56
|
-
};
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
2
|
-
import { ClearIcon, RefreshIcon, SearchIcon, VisibilityIcon, VisibilityOffIcon } from '../icon/index.js';
|
|
3
|
-
import { Button, Input, Select, Textarea } from '../index.js';
|
|
4
|
-
import { InputField } from './input-field.component.js';
|
|
5
|
-
const meta = {
|
|
6
|
-
title: 'Components/InputField/Scenarios',
|
|
7
|
-
component: InputField,
|
|
8
|
-
tags: [
|
|
9
|
-
'autodocs'
|
|
10
|
-
],
|
|
11
|
-
decorators: [
|
|
12
|
-
(Story)=>React.createElement(Story, null)
|
|
13
|
-
]
|
|
14
|
-
};
|
|
15
|
-
export default meta;
|
|
16
|
-
export const NumberStepper = {
|
|
17
|
-
args: {},
|
|
18
|
-
render: ()=>{
|
|
19
|
-
const [numberOfDependents, setNumberOfDependents] = useState(0);
|
|
20
|
-
const minusButton = useCallback(()=>setNumberOfDependents((state)=>--state), []);
|
|
21
|
-
const plusButton = useCallback(()=>setNumberOfDependents((state)=>++state), []);
|
|
22
|
-
return React.createElement(InputField, {
|
|
23
|
-
label: "Number of dependents",
|
|
24
|
-
before: React.createElement(Button, {
|
|
25
|
-
onClick: minusButton
|
|
26
|
-
}, "-"),
|
|
27
|
-
after: React.createElement(Button, {
|
|
28
|
-
onClick: plusButton
|
|
29
|
-
}, "+")
|
|
30
|
-
}, React.createElement(Input, {
|
|
31
|
-
value: numberOfDependents
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
export const MaskedCharacters = {
|
|
36
|
-
args: {},
|
|
37
|
-
render: ()=>{
|
|
38
|
-
const [typeInput, setTypeInput] = useState('password');
|
|
39
|
-
const toggleType = useCallback(()=>setTypeInput((state)=>state === 'password' ? 'text' : 'password'), []);
|
|
40
|
-
return React.createElement(InputField, {
|
|
41
|
-
label: "Password",
|
|
42
|
-
after: {
|
|
43
|
-
inset: true,
|
|
44
|
-
element: React.createElement(Button, {
|
|
45
|
-
onClick: toggleType,
|
|
46
|
-
look: "link",
|
|
47
|
-
iconAfter: typeInput === 'password' ? VisibilityIcon : VisibilityOffIcon,
|
|
48
|
-
iconColor: "muted"
|
|
49
|
-
})
|
|
50
|
-
}
|
|
51
|
-
}, React.createElement(Input, {
|
|
52
|
-
type: typeInput
|
|
53
|
-
}));
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
export const SearchWithLeftIconAndClearButton = {
|
|
57
|
-
args: {},
|
|
58
|
-
render: ()=>{
|
|
59
|
-
const [inputValue, setInputValue] = useState('');
|
|
60
|
-
const clearInput = useCallback(()=>setInputValue(''), []);
|
|
61
|
-
return React.createElement(InputField, {
|
|
62
|
-
label: "Search",
|
|
63
|
-
before: {
|
|
64
|
-
icon: SearchIcon
|
|
65
|
-
},
|
|
66
|
-
after: {
|
|
67
|
-
inset: true,
|
|
68
|
-
element: React.createElement(Button, {
|
|
69
|
-
onClick: clearInput,
|
|
70
|
-
look: "link",
|
|
71
|
-
iconAfter: ClearIcon,
|
|
72
|
-
iconColor: "muted"
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
}, React.createElement(Input, {
|
|
76
|
-
onChange: ({ target: { value } })=>setInputValue(value),
|
|
77
|
-
value: inputValue
|
|
78
|
-
}));
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
export const InlineFieldValidationFlow = {
|
|
82
|
-
args: {},
|
|
83
|
-
render: ()=>{
|
|
84
|
-
const [inputValue, setInputValue] = useState('');
|
|
85
|
-
const [validating, setValidating] = useState(false);
|
|
86
|
-
const [error, setError] = useState();
|
|
87
|
-
const validate = useCallback(()=>{
|
|
88
|
-
setValidating(true);
|
|
89
|
-
setError(undefined);
|
|
90
|
-
setTimeout(()=>{
|
|
91
|
-
if (inputValue !== '647453') {
|
|
92
|
-
setError('Routing number not found');
|
|
93
|
-
}
|
|
94
|
-
setValidating(false);
|
|
95
|
-
}, 1500);
|
|
96
|
-
}, [
|
|
97
|
-
inputValue
|
|
98
|
-
]);
|
|
99
|
-
return React.createElement(InputField, {
|
|
100
|
-
label: "Enter ABA routing number",
|
|
101
|
-
hint: "For a valid response use: 647453, all other numbers will show the invalid response",
|
|
102
|
-
after: validating ? {
|
|
103
|
-
icon: RefreshIcon
|
|
104
|
-
} : React.createElement(Button, {
|
|
105
|
-
onClick: validate
|
|
106
|
-
}, "Check"),
|
|
107
|
-
errorMessage: error
|
|
108
|
-
}, React.createElement(Input, {
|
|
109
|
-
invalid: !!error,
|
|
110
|
-
onChange: ({ target: { value } })=>setInputValue(value),
|
|
111
|
-
value: inputValue
|
|
112
|
-
}));
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
export const CurrencyAndFrequency = {
|
|
116
|
-
args: {},
|
|
117
|
-
render: ()=>{
|
|
118
|
-
const [inputValue, setInputValue] = useState('');
|
|
119
|
-
return React.createElement(InputField, {
|
|
120
|
-
label: "Salary",
|
|
121
|
-
before: "$AUD",
|
|
122
|
-
after: React.createElement(Select, null, React.createElement("option", null, "Select"), React.createElement("option", null, "Per Year"), React.createElement("option", null, "Per Month"), React.createElement("option", null, "Per Week"))
|
|
123
|
-
}, React.createElement(Input, {
|
|
124
|
-
onChange: ({ target: { value } })=>setInputValue(value),
|
|
125
|
-
value: inputValue
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
const MAX_LENGTH = 250;
|
|
130
|
-
export const TextareaWithCharacterCount = {
|
|
131
|
-
args: {},
|
|
132
|
-
render: ()=>{
|
|
133
|
-
const [inputValue, setInputValue] = useState('');
|
|
134
|
-
const counterText = useMemo(()=>{
|
|
135
|
-
const lengthLeft = MAX_LENGTH - inputValue.length;
|
|
136
|
-
return `${lengthLeft} remaining`;
|
|
137
|
-
}, [
|
|
138
|
-
inputValue
|
|
139
|
-
]);
|
|
140
|
-
return React.createElement(InputField, {
|
|
141
|
-
label: "Comments",
|
|
142
|
-
hint: "I am a hint",
|
|
143
|
-
supportingText: counterText
|
|
144
|
-
}, React.createElement(Textarea, {
|
|
145
|
-
onChange: ({ target: { value } })=>setInputValue(value),
|
|
146
|
-
value: inputValue
|
|
147
|
-
}));
|
|
148
|
-
}
|
|
149
|
-
};
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { VisibilityIcon } from '../icon/index.js';
|
|
2
|
-
import { Button, Input, Select } from '../index.js';
|
|
3
|
-
import { InputField } from './input-field.component.js';
|
|
4
|
-
const meta = {
|
|
5
|
-
title: 'Components/InputField/Sizes',
|
|
6
|
-
component: InputField,
|
|
7
|
-
tags: [
|
|
8
|
-
'autodocs'
|
|
9
|
-
],
|
|
10
|
-
decorators: [
|
|
11
|
-
(Story)=>React.createElement(Story, null)
|
|
12
|
-
]
|
|
13
|
-
};
|
|
14
|
-
export default meta;
|
|
15
|
-
export const InputFieldWithDifferentSizes = {
|
|
16
|
-
args: {},
|
|
17
|
-
render: ()=>{
|
|
18
|
-
return React.createElement(React.Fragment, null, [
|
|
19
|
-
'small',
|
|
20
|
-
'medium',
|
|
21
|
-
'large',
|
|
22
|
-
'xlarge'
|
|
23
|
-
].map((size)=>React.createElement("div", {
|
|
24
|
-
key: size,
|
|
25
|
-
className: "border-b border-b-border py-3"
|
|
26
|
-
}, React.createElement("h3", {
|
|
27
|
-
className: "typography-body-7 mb-4 font-bold"
|
|
28
|
-
}, "Size: ", size), React.createElement(InputField, {
|
|
29
|
-
size: size,
|
|
30
|
-
label: "Text",
|
|
31
|
-
hint: "I am a hint",
|
|
32
|
-
supportingText: "I am supporting text",
|
|
33
|
-
before: "$AUD",
|
|
34
|
-
after: "Text"
|
|
35
|
-
}, React.createElement(Input, null)), React.createElement(InputField, {
|
|
36
|
-
size: size,
|
|
37
|
-
label: "Icon",
|
|
38
|
-
hint: "I am a hint",
|
|
39
|
-
supportingText: "I am supporting text",
|
|
40
|
-
before: {
|
|
41
|
-
icon: VisibilityIcon,
|
|
42
|
-
inset: true
|
|
43
|
-
},
|
|
44
|
-
after: {
|
|
45
|
-
icon: VisibilityIcon,
|
|
46
|
-
inset: true
|
|
47
|
-
}
|
|
48
|
-
}, React.createElement(Input, null)), React.createElement(InputField, {
|
|
49
|
-
size: size,
|
|
50
|
-
label: "Icon Button",
|
|
51
|
-
hint: "I am a hint",
|
|
52
|
-
supportingText: "I am supporting text",
|
|
53
|
-
before: {
|
|
54
|
-
element: React.createElement(Button, {
|
|
55
|
-
size: size,
|
|
56
|
-
look: "link",
|
|
57
|
-
iconAfter: VisibilityIcon,
|
|
58
|
-
iconColor: "pop"
|
|
59
|
-
}),
|
|
60
|
-
inset: true
|
|
61
|
-
},
|
|
62
|
-
after: {
|
|
63
|
-
element: React.createElement(Button, {
|
|
64
|
-
size: size,
|
|
65
|
-
look: "link",
|
|
66
|
-
iconAfter: VisibilityIcon,
|
|
67
|
-
iconColor: "pop"
|
|
68
|
-
}),
|
|
69
|
-
inset: true
|
|
70
|
-
}
|
|
71
|
-
}, React.createElement(Input, null)), React.createElement(InputField, {
|
|
72
|
-
size: size,
|
|
73
|
-
label: "Button",
|
|
74
|
-
hint: "I am a hint",
|
|
75
|
-
supportingText: "I am supporting text",
|
|
76
|
-
before: React.createElement(Button, null, "Check"),
|
|
77
|
-
after: React.createElement(Button, null, "Check")
|
|
78
|
-
}, React.createElement(Input, null)), React.createElement(InputField, {
|
|
79
|
-
size: size,
|
|
80
|
-
label: "Select",
|
|
81
|
-
hint: "I am a hint",
|
|
82
|
-
supportingText: "I am supporting text",
|
|
83
|
-
before: React.createElement(Select, null, React.createElement("option", {
|
|
84
|
-
value: "Select"
|
|
85
|
-
}, "Select")),
|
|
86
|
-
after: React.createElement(Select, null, React.createElement("option", {
|
|
87
|
-
value: "Select"
|
|
88
|
-
}, "Select"))
|
|
89
|
-
}, React.createElement(Input, null)))));
|
|
90
|
-
}
|
|
91
|
-
};
|