@easypost/easy-ui 1.0.0-alpha.2 → 1.0.0-alpha.21
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/Badge/Badge.d.ts +59 -0
- package/Badge/Badge.d.ts.map +1 -0
- package/Badge/Badge.stories.d.ts +12 -0
- package/Badge/Badge.stories.d.ts.map +1 -0
- package/Badge/Badge.test.d.ts +2 -0
- package/Badge/Badge.test.d.ts.map +1 -0
- package/Badge/index.d.ts +2 -0
- package/Badge/index.d.ts.map +1 -0
- package/Badge/index.js +64 -0
- package/Badge/index.mjs +64 -0
- package/Banner/Banner.d.ts +47 -0
- package/Banner/Banner.d.ts.map +1 -0
- package/Banner/Banner.stories.d.ts +12 -0
- package/Banner/Banner.stories.d.ts.map +1 -0
- package/Banner/Banner.test.d.ts +2 -0
- package/Banner/Banner.test.d.ts.map +1 -0
- package/Banner/index.d.ts +2 -0
- package/Banner/index.d.ts.map +1 -0
- package/Banner/index.js +29 -0
- package/Banner/index.mjs +29 -0
- package/Button/Button.d.ts +84 -3
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.stories.d.ts +16 -0
- package/Button/Button.stories.d.ts.map +1 -0
- package/Button/index.js +50 -67
- package/Button/index.mjs +50 -67
- package/Button/utilities.d.ts +4 -0
- package/Button/utilities.d.ts.map +1 -1
- package/CHANGELOG.md +232 -0
- package/Card/Card.d.ts +93 -0
- package/Card/Card.d.ts.map +1 -0
- package/Card/Card.stories.d.ts +20 -0
- package/Card/Card.stories.d.ts.map +1 -0
- package/Card/Card.test.d.ts +2 -0
- package/Card/Card.test.d.ts.map +1 -0
- package/Card/index.d.ts +2 -0
- package/Card/index.d.ts.map +1 -0
- package/Card/index.js +86 -0
- package/Card/index.mjs +86 -0
- package/Checkbox/Checkbox.d.ts +90 -0
- package/Checkbox/Checkbox.d.ts.map +1 -0
- package/Checkbox/Checkbox.stories.d.ts +13 -0
- package/Checkbox/Checkbox.stories.d.ts.map +1 -0
- package/Checkbox/Checkbox.test.d.ts +3 -0
- package/Checkbox/Checkbox.test.d.ts.map +1 -0
- package/Checkbox/index.d.ts +2 -0
- package/Checkbox/index.d.ts.map +1 -0
- package/Checkbox/index.js +251 -0
- package/Checkbox/index.mjs +235 -0
- package/CodeBlock/CodeBlock.d.ts +70 -0
- package/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/CodeBlock/CodeBlock.stories.d.ts +10 -0
- package/CodeBlock/CodeBlock.stories.d.ts.map +1 -0
- package/CodeBlock/CodeBlock.test.d.ts +2 -0
- package/CodeBlock/CodeBlock.test.d.ts.map +1 -0
- package/CodeBlock/CopyButton.d.ts +9 -0
- package/CodeBlock/CopyButton.d.ts.map +1 -0
- package/CodeBlock/LanguageMenu.d.ts +18 -0
- package/CodeBlock/LanguageMenu.d.ts.map +1 -0
- package/CodeBlock/context.d.ts +11 -0
- package/CodeBlock/context.d.ts.map +1 -0
- package/CodeBlock/index.d.ts +2 -0
- package/CodeBlock/index.d.ts.map +1 -0
- package/CodeBlock/index.js +370 -0
- package/CodeBlock/index.mjs +354 -0
- package/CodeSnippet/CodeSnippet.d.ts +82 -0
- package/CodeSnippet/CodeSnippet.d.ts.map +1 -0
- package/CodeSnippet/CodeSnippet.stories.d.ts +14 -0
- package/CodeSnippet/CodeSnippet.stories.d.ts.map +1 -0
- package/CodeSnippet/CodeSnippet.test.d.ts +2 -0
- package/CodeSnippet/CodeSnippet.test.d.ts.map +1 -0
- package/CodeSnippet/SyntaxHighlighter.d.ts +8 -0
- package/CodeSnippet/SyntaxHighlighter.d.ts.map +1 -0
- package/CodeSnippet/index.d.ts +2 -0
- package/CodeSnippet/index.d.ts.map +1 -0
- package/CodeSnippet/index.js +11 -0
- package/CodeSnippet/index.mjs +11 -0
- package/CodeSnippet/theme.d.ts +20 -0
- package/CodeSnippet/theme.d.ts.map +1 -0
- package/CodeSnippet/useScrollbar.d.ts +12 -0
- package/CodeSnippet/useScrollbar.d.ts.map +1 -0
- package/DataGrid/ActionsCellContent.d.ts +8 -0
- package/DataGrid/ActionsCellContent.d.ts.map +1 -0
- package/DataGrid/Cell.d.ts +10 -0
- package/DataGrid/Cell.d.ts.map +1 -0
- package/DataGrid/ColumnHeader.d.ts +10 -0
- package/DataGrid/ColumnHeader.d.ts.map +1 -0
- package/DataGrid/DataGrid.d.ts +39 -0
- package/DataGrid/DataGrid.d.ts.map +1 -0
- package/DataGrid/DataGrid.stories.d.ts +15 -0
- package/DataGrid/DataGrid.stories.d.ts.map +1 -0
- package/DataGrid/DataGrid.test.d.ts +2 -0
- package/DataGrid/DataGrid.test.d.ts.map +1 -0
- package/DataGrid/ExpandCellContent.d.ts +8 -0
- package/DataGrid/ExpandCellContent.d.ts.map +1 -0
- package/DataGrid/ExpandedRowContent.d.ts +7 -0
- package/DataGrid/ExpandedRowContent.d.ts.map +1 -0
- package/DataGrid/HeaderRow.d.ts +11 -0
- package/DataGrid/HeaderRow.d.ts.map +1 -0
- package/DataGrid/Row.d.ts +12 -0
- package/DataGrid/Row.d.ts.map +1 -0
- package/DataGrid/RowGroup.d.ts +8 -0
- package/DataGrid/RowGroup.d.ts.map +1 -0
- package/DataGrid/SortIndicator.d.ts +7 -0
- package/DataGrid/SortIndicator.d.ts.map +1 -0
- package/DataGrid/Table.d.ts +8 -0
- package/DataGrid/Table.d.ts.map +1 -0
- package/DataGrid/UnstyledPressButton.d.ts +10 -0
- package/DataGrid/UnstyledPressButton.d.ts.map +1 -0
- package/DataGrid/VisuallyHiddenCellContent.d.ts +7 -0
- package/DataGrid/VisuallyHiddenCellContent.d.ts.map +1 -0
- package/DataGrid/constants.d.ts +4 -0
- package/DataGrid/constants.d.ts.map +1 -0
- package/DataGrid/context.d.ts +27 -0
- package/DataGrid/context.d.ts.map +1 -0
- package/DataGrid/index.d.ts +2 -0
- package/DataGrid/index.d.ts.map +1 -0
- package/DataGrid/index.js +3630 -0
- package/DataGrid/index.mjs +3614 -0
- package/DataGrid/useEdgeInterceptors.d.ts +15 -0
- package/DataGrid/useEdgeInterceptors.d.ts.map +1 -0
- package/DataGrid/useExpandedRow.d.ts +14 -0
- package/DataGrid/useExpandedRow.d.ts.map +1 -0
- package/DataGrid/useGridTemplate.d.ts +14 -0
- package/DataGrid/useGridTemplate.d.ts.map +1 -0
- package/DropdownButton/DropdownButton.d.ts +61 -3
- package/DropdownButton/DropdownButton.d.ts.map +1 -1
- package/DropdownButton/DropdownButton.stories.d.ts +12 -0
- package/DropdownButton/DropdownButton.stories.d.ts.map +1 -0
- package/DropdownButton/index.js +38 -89
- package/DropdownButton/index.mjs +36 -71
- package/FocusedProductLayout/BackArrow.d.ts +4 -0
- package/FocusedProductLayout/BackArrow.d.ts.map +1 -0
- package/FocusedProductLayout/Content.d.ts +10 -0
- package/FocusedProductLayout/Content.d.ts.map +1 -0
- package/FocusedProductLayout/FocusedProductLayout.d.ts +111 -0
- package/FocusedProductLayout/FocusedProductLayout.d.ts.map +1 -0
- package/FocusedProductLayout/FocusedProductLayout.stories.d.ts +12 -0
- package/FocusedProductLayout/FocusedProductLayout.stories.d.ts.map +1 -0
- package/FocusedProductLayout/FocusedProductLayout.test.d.ts +2 -0
- package/FocusedProductLayout/FocusedProductLayout.test.d.ts.map +1 -0
- package/FocusedProductLayout/HeaderAtTopOfPage.d.ts +11 -0
- package/FocusedProductLayout/HeaderAtTopOfPage.d.ts.map +1 -0
- package/FocusedProductLayout/HeaderInContentArea.d.ts +11 -0
- package/FocusedProductLayout/HeaderInContentArea.d.ts.map +1 -0
- package/FocusedProductLayout/SidePanel.d.ts +13 -0
- package/FocusedProductLayout/SidePanel.d.ts.map +1 -0
- package/FocusedProductLayout/WizardContent.d.ts +49 -0
- package/FocusedProductLayout/WizardContent.d.ts.map +1 -0
- package/FocusedProductLayout/index.d.ts +2 -0
- package/FocusedProductLayout/index.d.ts.map +1 -0
- package/FocusedProductLayout/index.js +266 -0
- package/FocusedProductLayout/index.mjs +250 -0
- package/FormLayout/FormLayout.d.ts +55 -0
- package/FormLayout/FormLayout.d.ts.map +1 -0
- package/FormLayout/FormLayout.stories.d.ts +13 -0
- package/FormLayout/FormLayout.stories.d.ts.map +1 -0
- package/FormLayout/FormLayout.test.d.ts +2 -0
- package/FormLayout/FormLayout.test.d.ts.map +1 -0
- package/FormLayout/Grid.d.ts +19 -0
- package/FormLayout/Grid.d.ts.map +1 -0
- package/FormLayout/Header.d.ts +9 -0
- package/FormLayout/Header.d.ts.map +1 -0
- package/FormLayout/HelperText.d.ts +13 -0
- package/FormLayout/HelperText.d.ts.map +1 -0
- package/FormLayout/Section.d.ts +12 -0
- package/FormLayout/Section.d.ts.map +1 -0
- package/FormLayout/Title.d.ts +23 -0
- package/FormLayout/Title.d.ts.map +1 -0
- package/FormLayout/context.d.ts +3 -0
- package/FormLayout/context.d.ts.map +1 -0
- package/FormLayout/index.d.ts +2 -0
- package/FormLayout/index.d.ts.map +1 -0
- package/FormLayout/index.js +127 -0
- package/FormLayout/index.mjs +127 -0
- package/HorizontalGrid/HorizontalGrid.d.ts +52 -0
- package/HorizontalGrid/HorizontalGrid.d.ts.map +1 -0
- package/HorizontalGrid/HorizontalGrid.stories.d.ts +14 -0
- package/HorizontalGrid/HorizontalGrid.stories.d.ts.map +1 -0
- package/HorizontalGrid/HorizontalGrid.test.d.ts +2 -0
- package/HorizontalGrid/HorizontalGrid.test.d.ts.map +1 -0
- package/HorizontalGrid/index.d.ts +2 -0
- package/HorizontalGrid/index.d.ts.map +1 -0
- package/HorizontalGrid/index.js +64 -0
- package/HorizontalGrid/index.mjs +64 -0
- package/HorizontalGrid/utilities.d.ts +4 -0
- package/HorizontalGrid/utilities.d.ts.map +1 -0
- package/HorizontalStack/HorizontalStack.d.ts +47 -0
- package/HorizontalStack/HorizontalStack.d.ts.map +1 -0
- package/HorizontalStack/HorizontalStack.stories.d.ts +12 -0
- package/HorizontalStack/HorizontalStack.stories.d.ts.map +1 -0
- package/HorizontalStack/HorizontalStack.test.d.ts +2 -0
- package/HorizontalStack/HorizontalStack.test.d.ts.map +1 -0
- package/HorizontalStack/index.d.ts +2 -0
- package/HorizontalStack/index.d.ts.map +1 -0
- package/HorizontalStack/index.js +50 -0
- package/HorizontalStack/index.mjs +50 -0
- package/Icon/Icon.d.ts +56 -5
- package/Icon/Icon.d.ts.map +1 -1
- package/Icon/Icon.stories.d.ts +7 -0
- package/Icon/Icon.stories.d.ts.map +1 -0
- package/Icon/index.js +38 -4
- package/Icon/index.mjs +38 -4
- package/IconButton/IconButton.d.ts +77 -3
- package/IconButton/IconButton.d.ts.map +1 -1
- package/IconButton/IconButton.stories.d.ts +12 -0
- package/IconButton/IconButton.stories.d.ts.map +1 -0
- package/IconButton/index.js +42 -39
- package/IconButton/index.mjs +42 -39
- package/InputField/InputCaption.d.ts +15 -0
- package/InputField/InputCaption.d.ts.map +1 -0
- package/InputField/InputField.d.ts +80 -0
- package/InputField/InputField.d.ts.map +1 -0
- package/InputField/InputField.test.d.ts +3 -0
- package/InputField/InputField.test.d.ts.map +1 -0
- package/InputField/InputIcon.d.ts +30 -0
- package/InputField/InputIcon.d.ts.map +1 -0
- package/InputField/Label.d.ts +29 -0
- package/InputField/Label.d.ts.map +1 -0
- package/InputField/PasswordButton.d.ts +39 -0
- package/InputField/PasswordButton.d.ts.map +1 -0
- package/InputField/index.d.ts +2 -0
- package/InputField/index.d.ts.map +1 -0
- package/InputField/index.js +312 -0
- package/InputField/index.mjs +296 -0
- package/InputField/useInputField.d.ts +9 -0
- package/InputField/useInputField.d.ts.map +1 -0
- package/InputField/utilities.d.ts +8 -0
- package/InputField/utilities.d.ts.map +1 -0
- package/Menu/Menu.d.ts +71 -0
- package/Menu/Menu.d.ts.map +1 -0
- package/Menu/Menu.stories.d.ts +16 -0
- package/Menu/Menu.stories.d.ts.map +1 -0
- package/Menu/Menu.test.d.ts +2 -0
- package/Menu/Menu.test.d.ts.map +1 -0
- package/Menu/MenuContext.d.ts +14 -0
- package/Menu/MenuContext.d.ts.map +1 -0
- package/Menu/MenuItem.d.ts +40 -0
- package/Menu/MenuItem.d.ts.map +1 -0
- package/Menu/MenuOverlay.d.ts +29 -0
- package/Menu/MenuOverlay.d.ts.map +1 -0
- package/Menu/MenuSection.d.ts +22 -0
- package/Menu/MenuSection.d.ts.map +1 -0
- package/Menu/MenuTrigger.d.ts +7 -0
- package/Menu/MenuTrigger.d.ts.map +1 -0
- package/Menu/index.d.ts +2 -0
- package/Menu/index.d.ts.map +1 -0
- package/Menu/index.js +234 -0
- package/Menu/index.mjs +234 -0
- package/Menu/useTriggerWidth.d.ts +3 -0
- package/Menu/useTriggerWidth.d.ts.map +1 -0
- package/Menu/utilities.d.ts +11 -0
- package/Menu/utilities.d.ts.map +1 -0
- package/Modal/Modal.d.ts +53 -0
- package/Modal/Modal.d.ts.map +1 -0
- package/Modal/Modal.stories.d.ts +15 -0
- package/Modal/Modal.stories.d.ts.map +1 -0
- package/Modal/Modal.test.d.ts +2 -0
- package/Modal/Modal.test.d.ts.map +1 -0
- package/Modal/ModalBody.d.ts +10 -0
- package/Modal/ModalBody.d.ts.map +1 -0
- package/Modal/ModalContainer.d.ts +26 -0
- package/Modal/ModalContainer.d.ts.map +1 -0
- package/Modal/ModalFooter.d.ts +25 -0
- package/Modal/ModalFooter.d.ts.map +1 -0
- package/Modal/ModalHeader.d.ts +35 -0
- package/Modal/ModalHeader.d.ts.map +1 -0
- package/Modal/ModalTrigger.d.ts +26 -0
- package/Modal/ModalTrigger.d.ts.map +1 -0
- package/Modal/ModalUnderlay.d.ts +19 -0
- package/Modal/ModalUnderlay.d.ts.map +1 -0
- package/Modal/context.d.ts +23 -0
- package/Modal/context.d.ts.map +1 -0
- package/Modal/index.d.ts +2 -0
- package/Modal/index.d.ts.map +1 -0
- package/Modal/index.js +298 -0
- package/Modal/index.mjs +298 -0
- package/Modal/useIntersectionDetection.d.ts +10 -0
- package/Modal/useIntersectionDetection.d.ts.map +1 -0
- package/Notification/Notification.d.ts +231 -0
- package/Notification/Notification.d.ts.map +1 -0
- package/Notification/Notification.stories.d.ts +10 -0
- package/Notification/Notification.stories.d.ts.map +1 -0
- package/Notification/Notification.test.d.ts +2 -0
- package/Notification/Notification.test.d.ts.map +1 -0
- package/Notification/NotificationContainer.d.ts +23 -0
- package/Notification/NotificationContainer.d.ts.map +1 -0
- package/Notification/NotificationQueue.d.ts +20 -0
- package/Notification/NotificationQueue.d.ts.map +1 -0
- package/Notification/NotificationRegion.d.ts +17 -0
- package/Notification/NotificationRegion.d.ts.map +1 -0
- package/Notification/index.d.ts +2 -0
- package/Notification/index.d.ts.map +1 -0
- package/Notification/index.js +1449 -0
- package/Notification/index.mjs +1433 -0
- package/Notification/useNotificationState.d.ts +8 -0
- package/Notification/useNotificationState.d.ts.map +1 -0
- package/ProductLayout/HelpMenu.d.ts +8 -0
- package/ProductLayout/HelpMenu.d.ts.map +1 -0
- package/ProductLayout/LayoutScreenSizeRenderer.d.ts +21 -0
- package/ProductLayout/LayoutScreenSizeRenderer.d.ts.map +1 -0
- package/ProductLayout/ProductLayout.d.ts +75 -0
- package/ProductLayout/ProductLayout.d.ts.map +1 -0
- package/ProductLayout/ProductLayout.stories.d.ts +8 -0
- package/ProductLayout/ProductLayout.stories.d.ts.map +1 -0
- package/ProductLayout/ProductLayout.test.d.ts +2 -0
- package/ProductLayout/ProductLayout.test.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutContent.d.ts +9 -0
- package/ProductLayout/ProductLayoutContent.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutHeader.d.ts +44 -0
- package/ProductLayout/ProductLayoutHeader.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutSidebar.d.ts +9 -0
- package/ProductLayout/ProductLayoutSidebar.d.ts.map +1 -0
- package/ProductLayout/ProductLayoutTabbedContent.d.ts +15 -0
- package/ProductLayout/ProductLayoutTabbedContent.d.ts.map +1 -0
- package/ProductLayout/constants.d.ts +2 -0
- package/ProductLayout/constants.d.ts.map +1 -0
- package/ProductLayout/context.d.ts +13 -0
- package/ProductLayout/context.d.ts.map +1 -0
- package/ProductLayout/index.d.ts +2 -0
- package/ProductLayout/index.d.ts.map +1 -0
- package/ProductLayout/index.js +292 -0
- package/ProductLayout/index.mjs +292 -0
- package/Provider/Provider.d.ts +56 -2
- package/Provider/Provider.d.ts.map +1 -1
- package/Provider/index.js +22 -5
- package/Provider/index.mjs +22 -5
- package/RadioGroup/RadioGroup.d.ts +71 -0
- package/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/RadioGroup/RadioGroup.stories.d.ts +17 -0
- package/RadioGroup/RadioGroup.stories.d.ts.map +1 -0
- package/RadioGroup/RadioGroup.test.d.ts +2 -0
- package/RadioGroup/RadioGroup.test.d.ts.map +1 -0
- package/RadioGroup/RadioGroupContext.d.ts +8 -0
- package/RadioGroup/RadioGroupContext.d.ts.map +1 -0
- package/RadioGroup/RadioGroupItem.d.ts +28 -0
- package/RadioGroup/RadioGroupItem.d.ts.map +1 -0
- package/RadioGroup/index.d.ts +2 -0
- package/RadioGroup/index.d.ts.map +1 -0
- package/RadioGroup/index.js +327 -0
- package/RadioGroup/index.mjs +327 -0
- package/SearchNav/CTAGroup.d.ts +21 -0
- package/SearchNav/CTAGroup.d.ts.map +1 -0
- package/SearchNav/CondensedSearchNav.d.ts +9 -0
- package/SearchNav/CondensedSearchNav.d.ts.map +1 -0
- package/SearchNav/Logo.d.ts +13 -0
- package/SearchNav/Logo.d.ts.map +1 -0
- package/SearchNav/LogoGroup.d.ts +21 -0
- package/SearchNav/LogoGroup.d.ts.map +1 -0
- package/SearchNav/PrimaryCTAItem.d.ts +14 -0
- package/SearchNav/PrimaryCTAItem.d.ts.map +1 -0
- package/SearchNav/Search.d.ts +13 -0
- package/SearchNav/Search.d.ts.map +1 -0
- package/SearchNav/SearchNav.d.ts +99 -0
- package/SearchNav/SearchNav.d.ts.map +1 -0
- package/SearchNav/SearchNav.stories.d.ts +13 -0
- package/SearchNav/SearchNav.stories.d.ts.map +1 -0
- package/SearchNav/SearchNav.test.d.ts +2 -0
- package/SearchNav/SearchNav.test.d.ts.map +1 -0
- package/SearchNav/SecondaryCTAItem.d.ts +23 -0
- package/SearchNav/SecondaryCTAItem.d.ts.map +1 -0
- package/SearchNav/Selector.d.ts +15 -0
- package/SearchNav/Selector.d.ts.map +1 -0
- package/SearchNav/SelectorTrigger.d.ts +14 -0
- package/SearchNav/SelectorTrigger.d.ts.map +1 -0
- package/SearchNav/Separator.d.ts +9 -0
- package/SearchNav/Separator.d.ts.map +1 -0
- package/SearchNav/Title.d.ts +12 -0
- package/SearchNav/Title.d.ts.map +1 -0
- package/SearchNav/context.d.ts +19 -0
- package/SearchNav/context.d.ts.map +1 -0
- package/SearchNav/index.d.ts +2 -0
- package/SearchNav/index.d.ts.map +1 -0
- package/SearchNav/index.js +544 -0
- package/SearchNav/index.mjs +528 -0
- package/SearchNav/utilities.d.ts +14 -0
- package/SearchNav/utilities.d.ts.map +1 -0
- package/Select/Select.d.ts +89 -0
- package/Select/Select.d.ts.map +1 -0
- package/Select/Select.stories.d.ts +17 -0
- package/Select/Select.stories.d.ts.map +1 -0
- package/Select/Select.test.d.ts +2 -0
- package/Select/Select.test.d.ts.map +1 -0
- package/Select/SelectContext.d.ts +14 -0
- package/Select/SelectContext.d.ts.map +1 -0
- package/Select/SelectField.d.ts +61 -0
- package/Select/SelectField.d.ts.map +1 -0
- package/Select/SelectOption.d.ts +23 -0
- package/Select/SelectOption.d.ts.map +1 -0
- package/Select/SelectOverlay.d.ts +3 -0
- package/Select/SelectOverlay.d.ts.map +1 -0
- package/Select/SelectSection.d.ts +22 -0
- package/Select/SelectSection.d.ts.map +1 -0
- package/Select/SelectTrigger.d.ts +30 -0
- package/Select/SelectTrigger.d.ts.map +1 -0
- package/Select/index.d.ts +2 -0
- package/Select/index.d.ts.map +1 -0
- package/Select/index.js +136 -0
- package/Select/index.mjs +136 -0
- package/SelectorErrorTooltip/SelectorErrorTooltip.d.ts +4 -0
- package/SelectorErrorTooltip/SelectorErrorTooltip.d.ts.map +1 -0
- package/SelectorErrorTooltip/index.d.ts +2 -0
- package/SelectorErrorTooltip/index.d.ts.map +1 -0
- package/SelectorErrorTooltip/index.js +106 -0
- package/SelectorErrorTooltip/index.mjs +90 -0
- package/Stepper/Step.d.ts +33 -0
- package/Stepper/Step.d.ts.map +1 -0
- package/Stepper/StepButton.d.ts +25 -0
- package/Stepper/StepButton.d.ts.map +1 -0
- package/Stepper/Stepper.d.ts +104 -0
- package/Stepper/Stepper.d.ts.map +1 -0
- package/Stepper/Stepper.stories.d.ts +10 -0
- package/Stepper/Stepper.stories.d.ts.map +1 -0
- package/Stepper/Stepper.test.d.ts +2 -0
- package/Stepper/Stepper.test.d.ts.map +1 -0
- package/Stepper/StepperContext.d.ts +12 -0
- package/Stepper/StepperContext.d.ts.map +1 -0
- package/Stepper/index.d.ts +2 -0
- package/Stepper/index.d.ts.map +1 -0
- package/Stepper/index.js +172 -0
- package/Stepper/index.mjs +172 -0
- package/TabNav/TabNav.d.ts +29 -0
- package/TabNav/TabNav.d.ts.map +1 -0
- package/TabNav/TabNav.stories.d.ts +9 -0
- package/TabNav/TabNav.stories.d.ts.map +1 -0
- package/TabNav/TabNav.test.d.ts +2 -0
- package/TabNav/TabNav.test.d.ts.map +1 -0
- package/TabNav/TabNavItem.d.ts +12 -0
- package/TabNav/TabNavItem.d.ts.map +1 -0
- package/TabNav/index.d.ts +2 -0
- package/TabNav/index.d.ts.map +1 -0
- package/TabNav/index.js +64 -0
- package/TabNav/index.mjs +64 -0
- package/TabPanels/TabPanels.d.ts +68 -0
- package/TabPanels/TabPanels.d.ts.map +1 -0
- package/TabPanels/TabPanels.stories.d.ts +14 -0
- package/TabPanels/TabPanels.stories.d.ts.map +1 -0
- package/TabPanels/TabPanels.test.d.ts +2 -0
- package/TabPanels/TabPanels.test.d.ts.map +1 -0
- package/TabPanels/TabPanelsItem.d.ts +15 -0
- package/TabPanels/TabPanelsItem.d.ts.map +1 -0
- package/TabPanels/TabPanelsPanels.d.ts +14 -0
- package/TabPanels/TabPanelsPanels.d.ts.map +1 -0
- package/TabPanels/TabPanelsTabs.d.ts +15 -0
- package/TabPanels/TabPanelsTabs.d.ts.map +1 -0
- package/TabPanels/context.d.ts +11 -0
- package/TabPanels/context.d.ts.map +1 -0
- package/TabPanels/index.d.ts +2 -0
- package/TabPanels/index.d.ts.map +1 -0
- package/TabPanels/index.js +317 -0
- package/TabPanels/index.mjs +317 -0
- package/Tabs/Edge.d.ts +8 -0
- package/Tabs/Edge.d.ts.map +1 -0
- package/Tabs/Tabs.d.ts +23 -0
- package/Tabs/Tabs.d.ts.map +1 -0
- package/Tabs/TabsItem.d.ts +13 -0
- package/Tabs/TabsItem.d.ts.map +1 -0
- package/Tabs/context.d.ts +8 -0
- package/Tabs/context.d.ts.map +1 -0
- package/Tabs/index.d.ts +2 -0
- package/Tabs/index.d.ts.map +1 -0
- package/Tabs/index.js +253 -0
- package/Tabs/index.mjs +253 -0
- package/Tabs/useIndicatorSizing.d.ts +11 -0
- package/Tabs/useIndicatorSizing.d.ts.map +1 -0
- package/Tabs/useScrollIntoViewIfNeeded.d.ts +11 -0
- package/Tabs/useScrollIntoViewIfNeeded.d.ts.map +1 -0
- package/Tabs/useScrollbar.d.ts +6 -0
- package/Tabs/useScrollbar.d.ts.map +1 -0
- package/Tabs/util.d.ts +9 -0
- package/Tabs/util.d.ts.map +1 -0
- package/Text/Text.d.ts +11 -6
- package/Text/Text.d.ts.map +1 -1
- package/Text/Text.stories.d.ts +8 -0
- package/Text/Text.stories.d.ts.map +1 -0
- package/Text/index.js +93 -4
- package/Text/index.mjs +93 -4
- package/TextField/TextField.d.ts +110 -0
- package/TextField/TextField.d.ts.map +1 -0
- package/TextField/TextField.stories.d.ts +15 -0
- package/TextField/TextField.stories.d.ts.map +1 -0
- package/TextField/TextField.test.d.ts +2 -0
- package/TextField/TextField.test.d.ts.map +1 -0
- package/TextField/index.d.ts +2 -0
- package/TextField/index.d.ts.map +1 -0
- package/TextField/index.js +56 -0
- package/TextField/index.mjs +56 -0
- package/Textarea/Textarea.d.ts +87 -0
- package/Textarea/Textarea.d.ts.map +1 -0
- package/Textarea/Textarea.stories.d.ts +13 -0
- package/Textarea/Textarea.stories.d.ts.map +1 -0
- package/Textarea/Textarea.test.d.ts +2 -0
- package/Textarea/Textarea.test.d.ts.map +1 -0
- package/Textarea/index.d.ts +2 -0
- package/Textarea/index.d.ts.map +1 -0
- package/Textarea/index.js +57 -0
- package/Textarea/index.mjs +57 -0
- package/Theme/Theme.d.ts +13 -23
- package/Theme/Theme.d.ts.map +1 -1
- package/Theme/index.js +145 -6
- package/Theme/index.mjs +145 -6
- package/Toggle/Switch.d.ts +24 -0
- package/Toggle/Switch.d.ts.map +1 -0
- package/Toggle/Toggle.d.ts +72 -0
- package/Toggle/Toggle.d.ts.map +1 -0
- package/Toggle/Toggle.stories.d.ts +10 -0
- package/Toggle/Toggle.stories.d.ts.map +1 -0
- package/Toggle/Toggle.test.d.ts +2 -0
- package/Toggle/Toggle.test.d.ts.map +1 -0
- package/Toggle/index.d.ts +2 -0
- package/Toggle/index.d.ts.map +1 -0
- package/Toggle/index.js +119 -0
- package/Toggle/index.mjs +119 -0
- package/Tooltip/Tooltip.d.ts +75 -0
- package/Tooltip/Tooltip.d.ts.map +1 -0
- package/Tooltip/Tooltip.stories.d.ts +14 -0
- package/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/Tooltip/Tooltip.test.d.ts +5 -0
- package/Tooltip/Tooltip.test.d.ts.map +1 -0
- package/Tooltip/index.d.ts +2 -0
- package/Tooltip/index.d.ts.map +1 -0
- package/Tooltip/index.js +13 -0
- package/Tooltip/index.mjs +13 -0
- package/UnstyledButton/UnstyledButton.d.ts +32 -0
- package/UnstyledButton/UnstyledButton.d.ts.map +1 -0
- package/UnstyledButton/UnstyledButton.test.d.ts +2 -0
- package/UnstyledButton/UnstyledButton.test.d.ts.map +1 -0
- package/UnstyledButton/index.d.ts +2 -0
- package/UnstyledButton/index.d.ts.map +1 -0
- package/UnstyledButton/index.js +9 -0
- package/UnstyledButton/index.mjs +9 -0
- package/VerticalNav/Container.d.ts +4 -0
- package/VerticalNav/Container.d.ts.map +1 -0
- package/VerticalNav/ExpandButton.d.ts +7 -0
- package/VerticalNav/ExpandButton.d.ts.map +1 -0
- package/VerticalNav/Item.d.ts +37 -0
- package/VerticalNav/Item.d.ts.map +1 -0
- package/VerticalNav/ListVerticalNav.d.ts +28 -0
- package/VerticalNav/ListVerticalNav.d.ts.map +1 -0
- package/VerticalNav/NavItem.d.ts +13 -0
- package/VerticalNav/NavItem.d.ts.map +1 -0
- package/VerticalNav/Subnav.d.ts +17 -0
- package/VerticalNav/Subnav.d.ts.map +1 -0
- package/VerticalNav/SubnavItem.d.ts +9 -0
- package/VerticalNav/SubnavItem.d.ts.map +1 -0
- package/VerticalNav/SubnavItemDot.d.ts +7 -0
- package/VerticalNav/SubnavItemDot.d.ts.map +1 -0
- package/VerticalNav/SupplementaryAction.d.ts +35 -0
- package/VerticalNav/SupplementaryAction.d.ts.map +1 -0
- package/VerticalNav/TreeVerticalNav.d.ts +57 -0
- package/VerticalNav/TreeVerticalNav.d.ts.map +1 -0
- package/VerticalNav/VerticalNav.d.ts +32 -0
- package/VerticalNav/VerticalNav.d.ts.map +1 -0
- package/VerticalNav/VerticalNav.stories.d.ts +13 -0
- package/VerticalNav/VerticalNav.stories.d.ts.map +1 -0
- package/VerticalNav/VerticalNav.test.d.ts +2 -0
- package/VerticalNav/VerticalNav.test.d.ts.map +1 -0
- package/VerticalNav/context.d.ts +5 -0
- package/VerticalNav/context.d.ts.map +1 -0
- package/VerticalNav/index.d.ts +2 -0
- package/VerticalNav/index.d.ts.map +1 -0
- package/VerticalNav/index.js +292 -0
- package/VerticalNav/index.mjs +292 -0
- package/VerticalStack/VerticalStack.d.ts +43 -0
- package/VerticalStack/VerticalStack.d.ts.map +1 -0
- package/VerticalStack/VerticalStack.stories.d.ts +12 -0
- package/VerticalStack/VerticalStack.stories.d.ts.map +1 -0
- package/VerticalStack/VerticalStack.test.d.ts +2 -0
- package/VerticalStack/VerticalStack.test.d.ts.map +1 -0
- package/VerticalStack/index.d.ts +2 -0
- package/VerticalStack/index.d.ts.map +1 -0
- package/VerticalStack/index.js +55 -0
- package/VerticalStack/index.mjs +55 -0
- package/__chunks__/ArrowForwardIos-kdkKbymv.mjs +49 -0
- package/__chunks__/ArrowForwardIos-rGvloreW.js +65 -0
- package/__chunks__/CheckCircle-VrvUCl5A.mjs +49 -0
- package/__chunks__/CheckCircle-mghrdMPJ.js +65 -0
- package/__chunks__/Close-Q99KJrcY.mjs +49 -0
- package/__chunks__/Close-pWwB1aCW.js +65 -0
- package/__chunks__/ExpandMore400-I7nIZ4Dn.mjs +49 -0
- package/__chunks__/ExpandMore400-f7xxwtIT.js +65 -0
- package/__chunks__/HelpMenu-1bqTnIvB.mjs +126 -0
- package/__chunks__/HelpMenu-y362u7gM.js +141 -0
- package/__chunks__/InputIcon-hOHYE5S-.js +150 -0
- package/__chunks__/InputIcon-xeJdcCCh.mjs +151 -0
- package/__chunks__/Menu-0hmX2JEQ.mjs +49 -0
- package/__chunks__/Menu-RHS5rIdQ.js +65 -0
- package/__chunks__/SelectOverlay-h8LO-mD1.js +570 -0
- package/__chunks__/SelectOverlay-nsHV3sqa.mjs +571 -0
- package/__chunks__/import-7ZKjlAKP.js +69 -0
- package/__chunks__/import-AZ4w4eWw.js +253 -0
- package/__chunks__/import-AdSP9fsz.js +148 -0
- package/__chunks__/import-Ekm8ZDnU.js +1185 -0
- package/__chunks__/import-ExASbr5t.js +231 -0
- package/__chunks__/import-GC-6m69n.js +55 -0
- package/__chunks__/import-IfQTmXIx.mjs +254 -0
- package/__chunks__/import-J0seVzci.js +838 -0
- package/__chunks__/import-JQFwSCR1.mjs +803 -0
- package/__chunks__/import-KOdyVb_J.js +61 -0
- package/__chunks__/import-LK6z3Rbv.js +802 -0
- package/__chunks__/import-MTWfZF9m.js +82 -0
- package/__chunks__/import-NiNGs5I6.mjs +2079 -0
- package/__chunks__/import-Or39Vly5.mjs +62 -0
- package/__chunks__/import-TNDlVovt.mjs +1186 -0
- package/__chunks__/import-UQDaRxXn.mjs +149 -0
- package/__chunks__/import-aPNpLCPX.mjs +83 -0
- package/__chunks__/import-g7ky1-Ys.mjs +70 -0
- package/__chunks__/import-ijN4GSZi.mjs +232 -0
- package/__chunks__/import-j-cSWNWF.mjs +56 -0
- package/__chunks__/import-lusj6TWW.js +2078 -0
- package/__chunks__/import-nR1_P3eP.mjs +839 -0
- package/__chunks__/import-o4U8ziRk.mjs +720 -0
- package/__chunks__/import-wq7kHiMa.js +719 -0
- package/__chunks__/index-5R7PFgPK.js +295 -0
- package/__chunks__/index-9weLpYXa.mjs +308 -0
- package/__chunks__/index-DwufPu37.js +138 -0
- package/__chunks__/index-N6LQdNb-.mjs +5421 -0
- package/__chunks__/index-hnDwuSY-.js +307 -0
- package/__chunks__/index-jU_AQEXu.mjs +139 -0
- package/__chunks__/index-o-2A9v85.mjs +296 -0
- package/__chunks__/index-woJu1seq.js +5420 -0
- package/__chunks__/omit-B9V4OM3c.mjs +1301 -0
- package/__chunks__/omit-tcSejr4A.js +1300 -0
- package/__chunks__/overlayscrollbars-react.es-NlOewPvv.js +2628 -0
- package/__chunks__/overlayscrollbars-react.es-a9_Jn69l.mjs +2629 -0
- package/__chunks__/real-module-Uc20aFZv.mjs +218 -0
- package/__chunks__/real-module-falp70Qi.js +217 -0
- package/__chunks__/tokens-84b2vvbl.mjs +379 -0
- package/__chunks__/tokens-UaksNJl0.js +378 -0
- package/__chunks__/useEdgeInterceptors--B2TTbVz.mjs +49 -0
- package/__chunks__/useEdgeInterceptors-FIoss04S.js +48 -0
- package/__chunks__/useIntersectionDetection-AE3_5rD0.js +21 -0
- package/__chunks__/useIntersectionDetection-u9UnfEyl.mjs +22 -0
- package/__chunks__/useTriggerWidth-Hviphp1H.mjs +594 -0
- package/__chunks__/useTriggerWidth-qcuq0bMp.js +593 -0
- package/package.json +16 -6
- package/style.css +4716 -587
- package/types.d.ts +23 -5
- package/types.d.ts.map +1 -1
- package/utilities/Noop.d.ts +9 -0
- package/utilities/Noop.d.ts.map +1 -0
- package/utilities/css.d.ts +23 -7
- package/utilities/css.d.ts.map +1 -1
- package/utilities/css.js +38 -35
- package/utilities/css.mjs +38 -35
- package/utilities/react.d.ts +31 -0
- package/utilities/react.d.ts.map +1 -0
- package/utilities/react.js +70 -0
- package/utilities/react.mjs +70 -0
- package/utilities/storybook.d.ts +48 -1
- package/utilities/storybook.d.ts.map +1 -1
- package/utilities/test.d.ts +79 -0
- package/utilities/test.d.ts.map +1 -0
- package/utilities/tokens.js +1 -1
- package/utilities/tokens.mjs +1 -1
- package/utilities/useScrollbar.d.ts +9 -0
- package/utilities/useScrollbar.d.ts.map +1 -0
- package/utilities/useScrollbar.js +22 -0
- package/utilities/useScrollbar.mjs +22 -0
- package/__chunks__/Icon-20c12b7b.js +0 -44
- package/__chunks__/Icon-e8b720b1.mjs +0 -45
- package/__chunks__/Text-0bfa486d.mjs +0 -100
- package/__chunks__/Text-65018aa7.js +0 -99
- package/__chunks__/Theme-917009e1.mjs +0 -492
- package/__chunks__/Theme-926e312c.js +0 -491
- package/__chunks__/tokens-091603c0.js +0 -209
- package/__chunks__/tokens-5139e277.mjs +0 -210
- package/__chunks__/utilities-4c42a295.mjs +0 -1296
- package/__chunks__/utilities-c5e3cfdd.js +0 -1295
- package/utilities/storybook.js +0 -51
- package/utilities/storybook.mjs +0 -51
package/Badge/Badge.d.ts
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { IconSymbol } from "../types";
|
|
3
|
+
export declare const DEFAULT_VARIANT = "primary";
|
|
4
|
+
export type BadgeVariant = "primary" | "secondary" | "black" | "inverse" | "gray" | "success" | "warning" | "danger";
|
|
5
|
+
export type BadgeProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Accessible label for the badge if it differs from its content. Required
|
|
8
|
+
* for icon badges.
|
|
9
|
+
*/
|
|
10
|
+
accessibilityLabel?: string;
|
|
11
|
+
/** Primary badge label. */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
/** Badge icon */
|
|
14
|
+
icon?: IconSymbol;
|
|
15
|
+
/**
|
|
16
|
+
* Any additional text to support the primary label on text badges.
|
|
17
|
+
*/
|
|
18
|
+
secondaryLabel?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Badge variant.
|
|
21
|
+
* @default primary
|
|
22
|
+
*/
|
|
23
|
+
variant?: BadgeVariant;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A visual text label for small bits of supporting information.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Badges can be used to support categorizing information, getting a user's
|
|
30
|
+
* attention, and describing metadata.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* _Simple text:_
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <Badge>Badge text</Badge>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* _Simple icon:_
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Badge accessibilityLabel="Intent of badge" icon={IconSymbol} />
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* _Detailed text:_
|
|
46
|
+
* ```tsx
|
|
47
|
+
* <Badge secondaryLabel="Last updated: Jan 3. 2023">
|
|
48
|
+
* Deprecated
|
|
49
|
+
* </Badge>
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* _Detailed icon:_
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <Badge icon={IconSymbol}>Badge text</Badge>
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
export declare function Badge(props: BadgeProps): React.JSX.Element;
|
|
59
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGzC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAKtC,eAAO,MAAM,eAAe,YAAY,CAAC;AAEzC,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,WAAW,GACX,OAAO,GACP,SAAS,GACT,MAAM,GACN,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,MAAM,MAAM,UAAU,GAAG;IACvB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,iBAAiB;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,qBAiDtC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Badge } from "./Badge";
|
|
3
|
+
type Story = StoryObj<typeof Badge>;
|
|
4
|
+
declare const meta: Meta<typeof Badge>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const SimpleText: Story;
|
|
7
|
+
export declare const SimpleIcon: Story;
|
|
8
|
+
export declare const DetailedIcon: Story;
|
|
9
|
+
export declare const DetailedText: Story;
|
|
10
|
+
export declare const ColorVariants: Story;
|
|
11
|
+
export declare const WithTooltip: Story;
|
|
12
|
+
//# sourceMappingURL=Badge.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.stories.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMlD,OAAO,EAAE,KAAK,EAAc,MAAM,SAAS,CAAC;AAG5C,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAIpC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAiB5B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAWxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAW1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAuB3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAWzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.test.d.ts","sourceRoot":"","sources":["../../src/Badge/Badge.test.tsx"],"names":[],"mappings":""}
|
package/Badge/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Badge/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
package/Badge/index.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const Icon_index = require("../Icon/index.js");
|
|
5
|
+
const Text_index = require("../Text/index.js");
|
|
6
|
+
const utilities_css = require("../utilities/css.js");
|
|
7
|
+
const root = "_root_1i1hd_5";
|
|
8
|
+
const primary = "_primary_1i1hd_16";
|
|
9
|
+
const secondary = "_secondary_1i1hd_17";
|
|
10
|
+
const text = "_text_1i1hd_32";
|
|
11
|
+
const variantPrimary = "_variantPrimary_1i1hd_37";
|
|
12
|
+
const variantSecondary = "_variantSecondary_1i1hd_44";
|
|
13
|
+
const variantBlack = "_variantBlack_1i1hd_51";
|
|
14
|
+
const variantInverse = "_variantInverse_1i1hd_58";
|
|
15
|
+
const variantGray = "_variantGray_1i1hd_65";
|
|
16
|
+
const variantSuccess = "_variantSuccess_1i1hd_72";
|
|
17
|
+
const variantWarning = "_variantWarning_1i1hd_79";
|
|
18
|
+
const variantDanger = "_variantDanger_1i1hd_86";
|
|
19
|
+
const styles = {
|
|
20
|
+
root,
|
|
21
|
+
primary,
|
|
22
|
+
secondary,
|
|
23
|
+
text,
|
|
24
|
+
variantPrimary,
|
|
25
|
+
variantSecondary,
|
|
26
|
+
variantBlack,
|
|
27
|
+
variantInverse,
|
|
28
|
+
variantGray,
|
|
29
|
+
variantSuccess,
|
|
30
|
+
variantWarning,
|
|
31
|
+
variantDanger
|
|
32
|
+
};
|
|
33
|
+
const DEFAULT_VARIANT = "primary";
|
|
34
|
+
function Badge(props) {
|
|
35
|
+
const { accessibilityLabel, children, secondaryLabel, icon, variant = DEFAULT_VARIANT } = props;
|
|
36
|
+
const className = utilities_css.classNames(styles.root, styles[utilities_css.variationName("variant", variant)]);
|
|
37
|
+
if (!icon && !children) {
|
|
38
|
+
console.warn("Badge requires one of children or icon");
|
|
39
|
+
}
|
|
40
|
+
if (secondaryLabel && icon) {
|
|
41
|
+
console.warn("secondaryLabel is not supported on a Badge with icon");
|
|
42
|
+
}
|
|
43
|
+
if (icon && !children && !accessibilityLabel) {
|
|
44
|
+
console.warn("Badge with only icon must have accessibilityLabel");
|
|
45
|
+
}
|
|
46
|
+
return React.createElement("span", {
|
|
47
|
+
className
|
|
48
|
+
}, accessibilityLabel && React.createElement(Text_index.Text, {
|
|
49
|
+
visuallyHidden: true
|
|
50
|
+
}, accessibilityLabel), React.createElement("span", {
|
|
51
|
+
className: styles.primary
|
|
52
|
+
}, icon ? React.createElement(Icon_index.Icon, {
|
|
53
|
+
symbol: icon,
|
|
54
|
+
size: "sm"
|
|
55
|
+
}) : React.createElement("span", {
|
|
56
|
+
className: styles.text
|
|
57
|
+
}, children)), children && (icon || secondaryLabel) && React.createElement("span", {
|
|
58
|
+
className: styles.secondary
|
|
59
|
+
}, React.createElement("span", {
|
|
60
|
+
className: styles.text
|
|
61
|
+
}, icon ? React.createElement(React.Fragment, null, children) : React.createElement(React.Fragment, null, secondaryLabel))));
|
|
62
|
+
}
|
|
63
|
+
exports.Badge = Badge;
|
|
64
|
+
exports.DEFAULT_VARIANT = DEFAULT_VARIANT;
|
package/Badge/index.mjs
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React__default from "react";
|
|
2
|
+
import { Icon } from "../Icon/index.mjs";
|
|
3
|
+
import { Text } from "../Text/index.mjs";
|
|
4
|
+
import { classNames, variationName } from "../utilities/css.mjs";
|
|
5
|
+
const root = "_root_1i1hd_5";
|
|
6
|
+
const primary = "_primary_1i1hd_16";
|
|
7
|
+
const secondary = "_secondary_1i1hd_17";
|
|
8
|
+
const text = "_text_1i1hd_32";
|
|
9
|
+
const variantPrimary = "_variantPrimary_1i1hd_37";
|
|
10
|
+
const variantSecondary = "_variantSecondary_1i1hd_44";
|
|
11
|
+
const variantBlack = "_variantBlack_1i1hd_51";
|
|
12
|
+
const variantInverse = "_variantInverse_1i1hd_58";
|
|
13
|
+
const variantGray = "_variantGray_1i1hd_65";
|
|
14
|
+
const variantSuccess = "_variantSuccess_1i1hd_72";
|
|
15
|
+
const variantWarning = "_variantWarning_1i1hd_79";
|
|
16
|
+
const variantDanger = "_variantDanger_1i1hd_86";
|
|
17
|
+
const styles = {
|
|
18
|
+
root,
|
|
19
|
+
primary,
|
|
20
|
+
secondary,
|
|
21
|
+
text,
|
|
22
|
+
variantPrimary,
|
|
23
|
+
variantSecondary,
|
|
24
|
+
variantBlack,
|
|
25
|
+
variantInverse,
|
|
26
|
+
variantGray,
|
|
27
|
+
variantSuccess,
|
|
28
|
+
variantWarning,
|
|
29
|
+
variantDanger
|
|
30
|
+
};
|
|
31
|
+
const DEFAULT_VARIANT = "primary";
|
|
32
|
+
function Badge(props) {
|
|
33
|
+
const { accessibilityLabel, children, secondaryLabel, icon, variant = DEFAULT_VARIANT } = props;
|
|
34
|
+
const className = classNames(styles.root, styles[variationName("variant", variant)]);
|
|
35
|
+
if (!icon && !children) {
|
|
36
|
+
console.warn("Badge requires one of children or icon");
|
|
37
|
+
}
|
|
38
|
+
if (secondaryLabel && icon) {
|
|
39
|
+
console.warn("secondaryLabel is not supported on a Badge with icon");
|
|
40
|
+
}
|
|
41
|
+
if (icon && !children && !accessibilityLabel) {
|
|
42
|
+
console.warn("Badge with only icon must have accessibilityLabel");
|
|
43
|
+
}
|
|
44
|
+
return React__default.createElement("span", {
|
|
45
|
+
className
|
|
46
|
+
}, accessibilityLabel && React__default.createElement(Text, {
|
|
47
|
+
visuallyHidden: true
|
|
48
|
+
}, accessibilityLabel), React__default.createElement("span", {
|
|
49
|
+
className: styles.primary
|
|
50
|
+
}, icon ? React__default.createElement(Icon, {
|
|
51
|
+
symbol: icon,
|
|
52
|
+
size: "sm"
|
|
53
|
+
}) : React__default.createElement("span", {
|
|
54
|
+
className: styles.text
|
|
55
|
+
}, children)), children && (icon || secondaryLabel) && React__default.createElement("span", {
|
|
56
|
+
className: styles.secondary
|
|
57
|
+
}, React__default.createElement("span", {
|
|
58
|
+
className: styles.text
|
|
59
|
+
}, icon ? React__default.createElement(React__default.Fragment, null, children) : React__default.createElement(React__default.Fragment, null, secondaryLabel))));
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
Badge,
|
|
63
|
+
DEFAULT_VARIANT
|
|
64
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export type BannerColor = "primary" | "success" | "neutral";
|
|
3
|
+
export type BannerProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Banner color
|
|
6
|
+
* @default success
|
|
7
|
+
*/
|
|
8
|
+
color?: BannerColor;
|
|
9
|
+
/** Banner emphasis text */
|
|
10
|
+
emphasisText?: ReactNode;
|
|
11
|
+
/** Banner content */
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Displays a prominent message that cannot be dismissed.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* The color property controls presentational color while emphasisText and children are
|
|
19
|
+
* for the text content within the banner.
|
|
20
|
+
*
|
|
21
|
+
* The difference between the text rendered as children vs the text rendered with the
|
|
22
|
+
* emphasisText prop is the style of text applied. With respect to Easy UI, emphasisText
|
|
23
|
+
* is semibold1 and the text rendered via children is body1. Behind the scenes, emphasisText
|
|
24
|
+
* and children are being wrapped by Easy UI's Text component.
|
|
25
|
+
*
|
|
26
|
+
* When rendering a banner with both emphasisText and text via children, a delimeter ":" is
|
|
27
|
+
* automatically applied.
|
|
28
|
+
*
|
|
29
|
+
* This component is useful when wanting to inform users of new features, promotions and
|
|
30
|
+
* other offerings.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* Default success color with emphasis and body:
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <Banner emphasisText={<>Limited Time Only:</>}>
|
|
36
|
+
* Get your first $250 of labels free!
|
|
37
|
+
* </Banner>
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* Primary color with body only:
|
|
42
|
+
* ```tsx
|
|
43
|
+
* <Banner color="primary">No fees on 120,000 packages per year.</Banner>;
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare function Banner(props: BannerProps): React.JSX.Element;
|
|
47
|
+
//# sourceMappingURL=Banner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAC5D,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,qBAqBxC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Banner } from "./Banner";
|
|
3
|
+
type Story = StoryObj<typeof Banner>;
|
|
4
|
+
declare const meta: Meta<typeof Banner>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Controls: Story;
|
|
7
|
+
export declare const Success: Story;
|
|
8
|
+
export declare const Primary: Story;
|
|
9
|
+
export declare const Neutral: Story;
|
|
10
|
+
export declare const WithoutEmphasisText: Story;
|
|
11
|
+
export declare const OnlyEmphasisText: Story;
|
|
12
|
+
//# sourceMappingURL=Banner.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.stories.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAE/C,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAIrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAW7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAKjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Banner.test.d.ts","sourceRoot":"","sources":["../../src/Banner/Banner.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Banner/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/Banner/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const React = require("react");
|
|
4
|
+
const Text_index = require("../Text/index.js");
|
|
5
|
+
const utilities_css = require("../utilities/css.js");
|
|
6
|
+
const colorSuccess = "_colorSuccess_i04r5_5";
|
|
7
|
+
const colorPrimary = "_colorPrimary_i04r5_10";
|
|
8
|
+
const colorNeutral = "_colorNeutral_i04r5_11";
|
|
9
|
+
const Banner$1 = "_Banner_i04r5_23";
|
|
10
|
+
const styles = {
|
|
11
|
+
colorSuccess,
|
|
12
|
+
colorPrimary,
|
|
13
|
+
colorNeutral,
|
|
14
|
+
Banner: Banner$1
|
|
15
|
+
};
|
|
16
|
+
function Banner(props) {
|
|
17
|
+
const { color = "success", emphasisText, children } = props;
|
|
18
|
+
return React.createElement("div", {
|
|
19
|
+
className: utilities_css.classNames(styles.Banner, styles[utilities_css.variationName("color", color)])
|
|
20
|
+
}, emphasisText && React.createElement(Text_index.Text, {
|
|
21
|
+
as: "strong",
|
|
22
|
+
variant: "subtitle1",
|
|
23
|
+
alignment: "center"
|
|
24
|
+
}, !children ? React.createElement(React.Fragment, null, emphasisText) : React.createElement(React.Fragment, null, emphasisText, ": ")), children && React.createElement(Text_index.Text, {
|
|
25
|
+
variant: "body1",
|
|
26
|
+
alignment: "center"
|
|
27
|
+
}, children));
|
|
28
|
+
}
|
|
29
|
+
exports.Banner = Banner;
|
package/Banner/index.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React__default from "react";
|
|
2
|
+
import { Text } from "../Text/index.mjs";
|
|
3
|
+
import { classNames, variationName } from "../utilities/css.mjs";
|
|
4
|
+
const colorSuccess = "_colorSuccess_i04r5_5";
|
|
5
|
+
const colorPrimary = "_colorPrimary_i04r5_10";
|
|
6
|
+
const colorNeutral = "_colorNeutral_i04r5_11";
|
|
7
|
+
const Banner$1 = "_Banner_i04r5_23";
|
|
8
|
+
const styles = {
|
|
9
|
+
colorSuccess,
|
|
10
|
+
colorPrimary,
|
|
11
|
+
colorNeutral,
|
|
12
|
+
Banner: Banner$1
|
|
13
|
+
};
|
|
14
|
+
function Banner(props) {
|
|
15
|
+
const { color = "success", emphasisText, children } = props;
|
|
16
|
+
return React__default.createElement("div", {
|
|
17
|
+
className: classNames(styles.Banner, styles[variationName("color", color)])
|
|
18
|
+
}, emphasisText && React__default.createElement(Text, {
|
|
19
|
+
as: "strong",
|
|
20
|
+
variant: "subtitle1",
|
|
21
|
+
alignment: "center"
|
|
22
|
+
}, !children ? React__default.createElement(React__default.Fragment, null, emphasisText) : React__default.createElement(React__default.Fragment, null, emphasisText, ": ")), children && React__default.createElement(Text, {
|
|
23
|
+
variant: "body1",
|
|
24
|
+
alignment: "center"
|
|
25
|
+
}, children));
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
Banner
|
|
29
|
+
};
|
package/Button/Button.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
2
|
import { IconSymbol } from "../types";
|
|
3
|
+
import { AriaButtonProps } from "react-aria";
|
|
3
4
|
export type ButtonColor = "primary" | "secondary" | "success" | "warning" | "neutral" | "support" | "inverse";
|
|
4
5
|
export type ButtonVariant = "filled" | "outlined" | "link";
|
|
5
6
|
export type ButtonSize = "sm" | "md";
|
|
6
|
-
export type ButtonProps = {
|
|
7
|
+
export type ButtonProps = AriaButtonProps & {
|
|
7
8
|
/** Button color */
|
|
8
9
|
color?: ButtonColor;
|
|
9
10
|
/** Button variant */
|
|
@@ -23,5 +24,85 @@ export type ButtonProps = {
|
|
|
23
24
|
/** Link's destination */
|
|
24
25
|
href?: string;
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Allow users to perform an action or to navigate to another page.
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
* Use to communicate an action the user can take in order to continue
|
|
32
|
+
* flow in the UI. Supports icons, multiple colors, outlined and link variations,
|
|
33
|
+
* and small size buttons. Underlying element is a button, but becomes an
|
|
34
|
+
* anchor when `href` is provided.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* _Default:_
|
|
38
|
+
* ```tsx
|
|
39
|
+
* import { Button } from "@easypost/easy-ui/Button";
|
|
40
|
+
*
|
|
41
|
+
* export function Component() {
|
|
42
|
+
* return <Button onPress={() => alert("clicked")}>Button</Button>;
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* _Outlined variant:_
|
|
48
|
+
* ```tsx
|
|
49
|
+
* import { Button } from "@easypost/easy-ui/Button";
|
|
50
|
+
*
|
|
51
|
+
* export function Component() {
|
|
52
|
+
* return (
|
|
53
|
+
* <Button onPress={() => alert("clicked")} variant="outlined">
|
|
54
|
+
* Button
|
|
55
|
+
* </Button>
|
|
56
|
+
* );
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* _Success color:_
|
|
62
|
+
* ```tsx
|
|
63
|
+
* import { Button } from "@easypost/easy-ui/Button";
|
|
64
|
+
*
|
|
65
|
+
* export function Component() {
|
|
66
|
+
* return (
|
|
67
|
+
* <Button onPress={() => alert("clicked")} color="success">
|
|
68
|
+
* Button
|
|
69
|
+
* </Button>
|
|
70
|
+
* );
|
|
71
|
+
* }
|
|
72
|
+
* ```
|
|
73
|
+
* @example
|
|
74
|
+
* _With href and icon:_
|
|
75
|
+
* ```tsx
|
|
76
|
+
* import { Button } from "@easypost/easy-ui/Button";
|
|
77
|
+
* import ArrowBackIcon from "@easypost/easy-ui-icons/ArrowBack";
|
|
78
|
+
*
|
|
79
|
+
* export function Component() {
|
|
80
|
+
* return (
|
|
81
|
+
* <Button href="https://www.easypost.com/" iconAtEnd={ArrowBackIcon}>
|
|
82
|
+
* Button
|
|
83
|
+
* </Button>
|
|
84
|
+
* );
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
export declare const Button: React.ForwardRefExoticComponent<AriaButtonProps<"button"> & {
|
|
89
|
+
/** Button color */
|
|
90
|
+
color?: ButtonColor | undefined;
|
|
91
|
+
/** Button variant */
|
|
92
|
+
variant?: ButtonVariant | undefined;
|
|
93
|
+
/** Button size */
|
|
94
|
+
size?: ButtonSize | undefined;
|
|
95
|
+
/** Disables button */
|
|
96
|
+
isDisabled?: boolean | undefined;
|
|
97
|
+
/** Button will grow to width of container */
|
|
98
|
+
isBlock?: boolean | undefined;
|
|
99
|
+
/** Positions icon symbol before children */
|
|
100
|
+
iconAtStart?: IconSymbol | undefined;
|
|
101
|
+
/** Positions icon symbol after children */
|
|
102
|
+
iconAtEnd?: IconSymbol | undefined;
|
|
103
|
+
/** Content inside button */
|
|
104
|
+
children?: ReactNode;
|
|
105
|
+
/** Link's destination */
|
|
106
|
+
href?: string | undefined;
|
|
107
|
+
} & React.RefAttributes<null>>;
|
|
27
108
|
//# sourceMappingURL=Button.d.ts.map
|
package/Button/Button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAc,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAK7C,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,WAAW,GACX,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAC;AAEd,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAC3D,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,CAAC;AAErC,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG;IAC1C,mBAAmB;IACnB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,qBAAqB;IACrB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,kBAAkB;IAClB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sBAAsB;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,eAAO,MAAM,MAAM;IAjFjB,mBAAmB;;IAEnB,qBAAqB;;IAErB,kBAAkB;;IAElB,sBAAsB;;IAEtB,6CAA6C;;IAE7C,4CAA4C;;IAE5C,2CAA2C;;IAE3C,6BAA6B;eAClB,SAAS;IACpB,yBAAyB;;8BAuHzB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Button } from "./Button";
|
|
3
|
+
type Story = StoryObj<typeof Button>;
|
|
4
|
+
declare const meta: Meta<typeof Button>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const Controls: Story;
|
|
7
|
+
export declare const FilledButtons: Story;
|
|
8
|
+
export declare const OutlinedButtons: Story;
|
|
9
|
+
export declare const LinkButtons: Story;
|
|
10
|
+
export declare const InverseButtons: Story;
|
|
11
|
+
export declare const WithHref: Story;
|
|
12
|
+
export declare const WithIcons: Story;
|
|
13
|
+
export declare const BlockButton: Story;
|
|
14
|
+
export declare const DisabledButtons: Story;
|
|
15
|
+
export declare const ClickEvent: Story;
|
|
16
|
+
//# sourceMappingURL=Button.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../src/Button/Button.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAOlD,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAE/C,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAIrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAgB7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,QAAQ,EAAE,KAGtB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAgB3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAY7B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAQ5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAQ7B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAGxB,CAAC"}
|
package/Button/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __defProps = Object.defineProperties;
|
|
4
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
3
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
5
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -17,28 +15,42 @@ var __spreadValues = (a, b) => {
|
|
|
17
15
|
}
|
|
18
16
|
return a;
|
|
19
17
|
};
|
|
20
|
-
var
|
|
18
|
+
var __objRest = (source, exclude) => {
|
|
19
|
+
var target = {};
|
|
20
|
+
for (var prop in source)
|
|
21
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
22
|
+
target[prop] = source[prop];
|
|
23
|
+
if (source != null && __getOwnPropSymbols)
|
|
24
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
25
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
}
|
|
28
|
+
return target;
|
|
29
|
+
};
|
|
21
30
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
22
31
|
const React = require("react");
|
|
23
|
-
const
|
|
32
|
+
const UnstyledButton_index = require("../__chunks__/index-DwufPu37.js");
|
|
33
|
+
const Icon_index = require("../Icon/index.js");
|
|
24
34
|
const utilities_css = require("../utilities/css.js");
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
const
|
|
41
|
-
const
|
|
35
|
+
require("../__chunks__/import-LK6z3Rbv.js");
|
|
36
|
+
require("../__chunks__/omit-tcSejr4A.js");
|
|
37
|
+
require("../__chunks__/import-lusj6TWW.js");
|
|
38
|
+
const Button$1 = "_Button_qhxr0_5";
|
|
39
|
+
const colorPrimary = "_colorPrimary_qhxr0_20";
|
|
40
|
+
const colorSecondary = "_colorSecondary_qhxr0_28";
|
|
41
|
+
const colorSuccess = "_colorSuccess_qhxr0_36";
|
|
42
|
+
const colorWarning = "_colorWarning_qhxr0_44";
|
|
43
|
+
const colorNeutral = "_colorNeutral_qhxr0_52";
|
|
44
|
+
const colorSupport = "_colorSupport_qhxr0_60";
|
|
45
|
+
const colorInverse = "_colorInverse_qhxr0_66";
|
|
46
|
+
const variantFilled = "_variantFilled_qhxr0_72";
|
|
47
|
+
const variantOutlined = "_variantOutlined_qhxr0_99";
|
|
48
|
+
const variantLink = "_variantLink_qhxr0_127";
|
|
49
|
+
const sizeMd = "_sizeMd_qhxr0_151";
|
|
50
|
+
const sizeSm = "_sizeSm_qhxr0_159";
|
|
51
|
+
const block = "_block_qhxr0_176";
|
|
52
|
+
const iconAtStart = "_iconAtStart_qhxr0_181";
|
|
53
|
+
const iconAtEnd = "_iconAtEnd_qhxr0_185";
|
|
42
54
|
const styles = {
|
|
43
55
|
Button: Button$1,
|
|
44
56
|
colorPrimary,
|
|
@@ -57,55 +69,26 @@ const styles = {
|
|
|
57
69
|
iconAtStart,
|
|
58
70
|
iconAtEnd
|
|
59
71
|
};
|
|
60
|
-
|
|
61
|
-
const {
|
|
62
|
-
color = "primary",
|
|
63
|
-
variant = "filled",
|
|
64
|
-
size = "md",
|
|
65
|
-
isDisabled = false,
|
|
66
|
-
isBlock = false,
|
|
67
|
-
iconAtStart: iconAtStart2,
|
|
68
|
-
iconAtEnd: iconAtEnd2,
|
|
69
|
-
children = "Button",
|
|
70
|
-
href = ""
|
|
71
|
-
} = props;
|
|
72
|
-
const ref = React.useRef(null);
|
|
73
|
-
const As = href ? "a" : "button";
|
|
74
|
-
const { buttonProps: elementProps } = utilities.$701a24aa0da5b062$export$ea18c227d4417cc3(
|
|
75
|
-
__spreadProps(__spreadValues({}, props), { elementType: As }),
|
|
76
|
-
ref
|
|
77
|
-
);
|
|
72
|
+
const Button = React.forwardRef((props, inRef) => {
|
|
73
|
+
const _a = props, { color = "primary", variant = "filled", size = "md", isDisabled = false, isBlock = false, iconAtStart: iconAtStart2, iconAtEnd: iconAtEnd2, children = "Button", href = "" } = _a, restProps = __objRest(_a, ["color", "variant", "size", "isDisabled", "isBlock", "iconAtStart", "iconAtEnd", "children", "href"]);
|
|
78
74
|
const bothIconPropsDefined = iconAtEnd2 && iconAtStart2;
|
|
79
75
|
if (bothIconPropsDefined) {
|
|
80
76
|
console.warn("Cannot simultaneously define `iconAtEnd` and `iconAtStart`");
|
|
81
77
|
}
|
|
82
78
|
const canUseIcon = (iconAtEnd2 || iconAtStart2) && !bothIconPropsDefined && variant !== "link" && size !== "sm";
|
|
83
|
-
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
/* @__PURE__ */ React.createElement(
|
|
99
|
-
"span",
|
|
100
|
-
{
|
|
101
|
-
className: utilities_css.classNames(
|
|
102
|
-
iconAtStart2 && canUseIcon && styles.iconAtStart,
|
|
103
|
-
iconAtEnd2 && canUseIcon && styles.iconAtEnd
|
|
104
|
-
)
|
|
105
|
-
},
|
|
106
|
-
children
|
|
107
|
-
),
|
|
108
|
-
iconAtEnd2 && canUseIcon && /* @__PURE__ */ React.createElement(Icon.Icon, { symbol: iconAtEnd2 })
|
|
109
|
-
);
|
|
110
|
-
}
|
|
79
|
+
UnstyledButton_index.logWarningIfInvalidColorVariantCombination(color, variant);
|
|
80
|
+
return React.createElement(UnstyledButton_index.UnstyledButton, __spreadValues({
|
|
81
|
+
isDisabled,
|
|
82
|
+
ref: inRef,
|
|
83
|
+
className: utilities_css.classNames(styles.Button, styles[utilities_css.variationName("color", color)], styles[utilities_css.variationName("variant", variant)], styles[utilities_css.variationName("size", size)], isBlock && styles.block),
|
|
84
|
+
href
|
|
85
|
+
}, restProps), iconAtStart2 && canUseIcon && React.createElement(Icon_index.Icon, {
|
|
86
|
+
symbol: iconAtStart2
|
|
87
|
+
}), React.createElement("span", {
|
|
88
|
+
className: utilities_css.classNames(iconAtStart2 && canUseIcon && styles.iconAtStart, iconAtEnd2 && canUseIcon && styles.iconAtEnd)
|
|
89
|
+
}, children), iconAtEnd2 && canUseIcon && React.createElement(Icon_index.Icon, {
|
|
90
|
+
symbol: iconAtEnd2
|
|
91
|
+
}));
|
|
92
|
+
});
|
|
93
|
+
Button.displayName = "Button";
|
|
111
94
|
exports.Button = Button;
|