@chotot/clad-ui 0.16.1
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/LICENSE +201 -0
- package/README.md +75 -0
- package/brand/ChototLogoText.d.ts +5 -0
- package/brand/CtC2C.d.ts +5 -0
- package/brand/CtProperty.d.ts +5 -0
- package/brand/CtVehicle.d.ts +5 -0
- package/brand/Tot.d.ts +5 -0
- package/brand/index.d.ts +5 -0
- package/components/Announcer/Announcer.d.ts +30 -0
- package/components/Announcer/Announcer.js +163 -0
- package/components/Announcer/Announcer.stories.js +388 -0
- package/components/Announcer/Announcer.styles.d.ts +20 -0
- package/components/Announcer/Announcer.styles.js +214 -0
- package/components/Box/Box.d.ts +79 -0
- package/components/Box/Box.js +314 -0
- package/components/Box/Box.spec.js +425 -0
- package/components/Box/Box.stories.js +491 -0
- package/components/Box/Box.styles.d.ts +5 -0
- package/components/Box/Box.styles.js +71 -0
- package/components/Breadcrumbs/Breadcrumbs.d.ts +20 -0
- package/components/Breadcrumbs/Breadcrumbs.js +92 -0
- package/components/Breadcrumbs/Breadcrumbs.stories.js +170 -0
- package/components/Breadcrumbs/Breadcrumbs.styles.d.ts +6 -0
- package/components/Breadcrumbs/Breadcrumbs.styles.js +44 -0
- package/components/Button/Button.d.ts +34 -0
- package/components/Button/Button.js +165 -0
- package/components/Button/Button.stories.js +370 -0
- package/components/Button/Button.styles.d.ts +2 -0
- package/components/Button/Button.styles.js +327 -0
- package/components/Button/ButtonLink.d.ts +29 -0
- package/components/Button/ButtonLink.js +89 -0
- package/components/Button/ButtonLink.stories.js +31 -0
- package/components/Button/IconButton.d.ts +28 -0
- package/components/Button/IconButton.js +81 -0
- package/components/Button/IconButton.stories.js +62 -0
- package/components/Checkbox/Checkbox.d.ts +30 -0
- package/components/Checkbox/Checkbox.js +106 -0
- package/components/Checkbox/Checkbox.stories.js +194 -0
- package/components/Checkbox/Checkbox.styles.d.ts +4 -0
- package/components/Checkbox/Checkbox.styles.js +112 -0
- package/components/Chip/Chip.d.ts +26 -0
- package/components/Chip/Chip.js +84 -0
- package/components/Chip/Chip.stories.js +130 -0
- package/components/Chip/Chip.styles.d.ts +5 -0
- package/components/Chip/Chip.styles.js +41 -0
- package/components/CurrencyInput/CurrencyInput.d.ts +53 -0
- package/components/CurrencyInput/CurrencyInput.js +369 -0
- package/components/CurrencyInput/CurrencyInput.spec.js +151 -0
- package/components/CurrencyInput/CurrencyInput.stories.js +202 -0
- package/components/CurrencyInput/CurrencyInput.styles.d.ts +18 -0
- package/components/CurrencyInput/CurrencyInput.styles.js +169 -0
- package/components/CurrencyInput/utils/_cleanValue.d.ts +11 -0
- package/components/CurrencyInput/utils/_cleanValue.js +55 -0
- package/components/CurrencyInput/utils/_cleanValue.spec.js +20 -0
- package/components/CurrencyInput/utils/_formatValue.d.ts +5 -0
- package/components/CurrencyInput/utils/_formatValue.js +99 -0
- package/components/CurrencyInput/utils/_formatValue.spec.js +32 -0
- package/components/Dropdown/Dropdown.d.ts +47 -0
- package/components/Dropdown/Dropdown.js +214 -0
- package/components/Dropdown/Dropdown.stories.js +323 -0
- package/components/Grid/Col.d.ts +30 -0
- package/components/Grid/Col.js +93 -0
- package/components/Grid/Col.spec.js +249 -0
- package/components/Grid/Grid.d.ts +36 -0
- package/components/Grid/Grid.js +180 -0
- package/components/Grid/Grid.spec.js +524 -0
- package/components/Grid/Grid.styles.d.ts +12 -0
- package/components/Grid/Grid.styles.js +228 -0
- package/components/Grid/aGrid.stories.js +577 -0
- package/components/Grid/bCol.stories.js +217 -0
- package/components/Input/Input.d.ts +50 -0
- package/components/Input/Input.js +342 -0
- package/components/Input/Input.spec.js +177 -0
- package/components/Input/Input.stories.js +424 -0
- package/components/Input/Input.styles.d.ts +20 -0
- package/components/Input/Input.styles.js +236 -0
- package/components/RadioButton/RadioButton.d.ts +30 -0
- package/components/RadioButton/RadioButton.js +107 -0
- package/components/RadioButton/RadioButton.stories.js +208 -0
- package/components/ShapeIcon/ShapeIcon.d.ts +36 -0
- package/components/ShapeIcon/ShapeIcon.js +74 -0
- package/components/ShapeIcon/ShapeIcon.stories.js +94 -0
- package/components/Snack/Snack.d.ts +20 -0
- package/components/Snack/Snack.js +82 -0
- package/components/Snack/Snack.spec.js +24 -0
- package/components/Snack/Snack.stories.js +235 -0
- package/components/Snack/Snack.styles.d.ts +6 -0
- package/components/Snack/Snack.styles.js +69 -0
- package/components/Tabs/Tab.d.ts +34 -0
- package/components/Tabs/Tab.js +145 -0
- package/components/Tabs/Tabs.d.ts +24 -0
- package/components/Tabs/Tabs.js +107 -0
- package/components/Tabs/Tabs.spec.js +57 -0
- package/components/Tabs/Tabs.stories.js +165 -0
- package/components/Tabs/Tabs.styles.d.ts +18 -0
- package/components/Tabs/Tabs.styles.js +86 -0
- package/components/TextArea/TextArea.d.ts +48 -0
- package/components/TextArea/TextArea.js +211 -0
- package/components/TextArea/TextArea.stories.js +411 -0
- package/components/TextArea/TextArea.styles.d.ts +16 -0
- package/components/TextArea/TextArea.styles.js +150 -0
- package/components/Tooltip/Tooltip.d.ts +34 -0
- package/components/Tooltip/Tooltip.js +188 -0
- package/components/Tooltip/Tooltip.spec.js +26 -0
- package/components/Tooltip/Tooltip.stories.js +467 -0
- package/components/Tooltip/Tooltip.styles.d.ts +5 -0
- package/components/Tooltip/Tooltip.styles.js +57 -0
- package/components/components-index.spec.js +29 -0
- package/components/index.d.ts +20 -0
- package/components/index.js +20 -0
- package/css/__snapshots__/baseline.spec.js.snap +3 -0
- package/css/baseline.d.ts +14 -0
- package/css/baseline.js +420 -0
- package/css/baseline.spec.js +32 -0
- package/declarations.d.ts +1 -0
- package/docs/1.1-intro.stories.mdx +18 -0
- package/docs/1.2-getting-started.stories.mdx +111 -0
- package/docs/1.3-theming.stories.mdx +193 -0
- package/docs/1.4-development-guide.stories.mdx +448 -0
- package/docs/1.5-contribution-guide.stories.mdx +19 -0
- package/docs/1.6-solution-rationale.stories.mdx +155 -0
- package/docs/1.7-team-members.stories.mdx +138 -0
- package/docs/2.1-tokens-intro.stories.mdx +51 -0
- package/docs/2.2-colors.stories.mdx +124 -0
- package/docs/2.2-typography.stories.mdx +126 -0
- package/docs/2.4-others.stories.mdx +180 -0
- package/docs/2.5-icons.stories.mdx +64 -0
- package/docs/2.6-baselinecss.stories.mdx +439 -0
- package/docs/2.7-layout-breakpoints.stories.mdx +185 -0
- package/icons/ArrowDown.d.ts +5 -0
- package/icons/ArrowDown.js +21 -0
- package/icons/ArrowDownB.d.ts +5 -0
- package/icons/ArrowDownB.js +21 -0
- package/icons/ArrowLeft.d.ts +5 -0
- package/icons/ArrowLeft.js +24 -0
- package/icons/ArrowRight.d.ts +5 -0
- package/icons/ArrowRight.js +24 -0
- package/icons/Back.d.ts +5 -0
- package/icons/Back.js +21 -0
- package/icons/Bell.d.ts +5 -0
- package/icons/Bell.js +21 -0
- package/icons/BellOutline.d.ts +5 -0
- package/icons/BellOutline.js +21 -0
- package/icons/BinOutline.d.ts +5 -0
- package/icons/BinOutline.js +25 -0
- package/icons/Bookmark.d.ts +5 -0
- package/icons/Bookmark.js +21 -0
- package/icons/BookmarkOutline.d.ts +5 -0
- package/icons/BookmarkOutline.js +21 -0
- package/icons/BoyFace.d.ts +5 -0
- package/icons/BoyFace.js +25 -0
- package/icons/BoyFaceOutline.d.ts +5 -0
- package/icons/BoyFaceOutline.js +21 -0
- package/icons/Bump.d.ts +5 -0
- package/icons/Bump.js +33 -0
- package/icons/BumpTime.d.ts +5 -0
- package/icons/BumpTime.js +35 -0
- package/icons/CallOutline.d.ts +5 -0
- package/icons/CallOutline.js +24 -0
- package/icons/Camera.d.ts +5 -0
- package/icons/Camera.js +31 -0
- package/icons/CardPayment.d.ts +5 -0
- package/icons/CardPayment.js +21 -0
- package/icons/Certificate.d.ts +5 -0
- package/icons/Certificate.js +25 -0
- package/icons/Chart.d.ts +5 -0
- package/icons/Chart.js +27 -0
- package/icons/ChartImpression.d.ts +5 -0
- package/icons/ChartImpression.js +28 -0
- package/icons/ChartView.d.ts +5 -0
- package/icons/ChartView.js +27 -0
- package/icons/Chat.d.ts +5 -0
- package/icons/Chat.js +29 -0
- package/icons/Check.d.ts +5 -0
- package/icons/Check.js +18 -0
- package/icons/CircleCheck.d.ts +5 -0
- package/icons/CircleCheck.js +27 -0
- package/icons/CircleCopylink.d.ts +5 -0
- package/icons/CircleCopylink.js +23 -0
- package/icons/CircleFacebook.d.ts +5 -0
- package/icons/CircleFacebook.js +22 -0
- package/icons/CircleMessenger.d.ts +5 -0
- package/icons/CircleMessenger.js +19 -0
- package/icons/CircleSms.d.ts +5 -0
- package/icons/CircleSms.js +22 -0
- package/icons/CircleUser.d.ts +5 -0
- package/icons/CircleUser.js +24 -0
- package/icons/CircleViber.d.ts +5 -0
- package/icons/CircleViber.js +28 -0
- package/icons/CircleZalo.d.ts +5 -0
- package/icons/CircleZalo.js +63 -0
- package/icons/Clock.d.ts +5 -0
- package/icons/Clock.js +21 -0
- package/icons/Close.d.ts +5 -0
- package/icons/Close.js +21 -0
- package/icons/CtCoin.d.ts +5 -0
- package/icons/CtCoin.js +218 -0
- package/icons/Download.d.ts +5 -0
- package/icons/Download.js +25 -0
- package/icons/Edit.d.ts +5 -0
- package/icons/Edit.js +23 -0
- package/icons/EditAd.d.ts +5 -0
- package/icons/EditAd.js +22 -0
- package/icons/Ellipsis.d.ts +5 -0
- package/icons/Ellipsis.js +21 -0
- package/icons/EllipsisOutline.d.ts +5 -0
- package/icons/EllipsisOutline.js +21 -0
- package/icons/FacebookOutline.d.ts +5 -0
- package/icons/FacebookOutline.js +32 -0
- package/icons/Follow.d.ts +5 -0
- package/icons/Follow.js +38 -0
- package/icons/Gallery.d.ts +5 -0
- package/icons/Gallery.js +24 -0
- package/icons/Gift.d.ts +5 -0
- package/icons/Gift.js +24 -0
- package/icons/GiftOutline.d.ts +5 -0
- package/icons/GiftOutline.js +21 -0
- package/icons/Heart.d.ts +5 -0
- package/icons/Heart.js +23 -0
- package/icons/HeartOutline.d.ts +5 -0
- package/icons/HeartOutline.js +23 -0
- package/icons/HideAd.d.ts +5 -0
- package/icons/HideAd.js +22 -0
- package/icons/Hot.d.ts +5 -0
- package/icons/Hot.js +21 -0
- package/icons/House.d.ts +5 -0
- package/icons/House.js +21 -0
- package/icons/HouseOutline.d.ts +5 -0
- package/icons/HouseOutline.js +21 -0
- package/icons/Impression.d.ts +5 -0
- package/icons/Impression.js +56 -0
- package/icons/Info.d.ts +5 -0
- package/icons/Info.js +21 -0
- package/icons/InsertAd.d.ts +5 -0
- package/icons/InsertAd.js +21 -0
- package/icons/InternationalPayment.d.ts +5 -0
- package/icons/InternationalPayment.js +43 -0
- package/icons/Label.d.ts +5 -0
- package/icons/Label.js +24 -0
- package/icons/Loan.d.ts +5 -0
- package/icons/Loan.js +48 -0
- package/icons/Location.d.ts +5 -0
- package/icons/Location.js +25 -0
- package/icons/LocationOutline.d.ts +5 -0
- package/icons/LocationOutline.js +27 -0
- package/icons/MailOutline.d.ts +5 -0
- package/icons/MailOutline.js +32 -0
- package/icons/Medal.d.ts +5 -0
- package/icons/Medal.js +21 -0
- package/icons/Msg.d.ts +5 -0
- package/icons/Msg.js +42 -0
- package/icons/PageIndicator.d.ts +5 -0
- package/icons/PageIndicator.js +25 -0
- package/icons/PaymentInfo.d.ts +5 -0
- package/icons/PaymentInfo.js +42 -0
- package/icons/PercentMsg.d.ts +5 -0
- package/icons/PercentMsg.js +51 -0
- package/icons/PhoneOutline.d.ts +5 -0
- package/icons/PhoneOutline.js +21 -0
- package/icons/Profile.d.ts +5 -0
- package/icons/Profile.js +29 -0
- package/icons/Search.d.ts +5 -0
- package/icons/Search.js +21 -0
- package/icons/Selected.d.ts +5 -0
- package/icons/Selected.js +34 -0
- package/icons/SellFaster.d.ts +5 -0
- package/icons/SellFaster.js +32 -0
- package/icons/Shop.d.ts +5 -0
- package/icons/Shop.js +22 -0
- package/icons/ShopFree.d.ts +5 -0
- package/icons/ShopFree.js +49 -0
- package/icons/ShopOutline.d.ts +5 -0
- package/icons/ShopOutline.js +24 -0
- package/icons/SpeechBubbles.d.ts +5 -0
- package/icons/SpeechBubbles.js +25 -0
- package/icons/SpeechBubblesOutline.d.ts +5 -0
- package/icons/SpeechBubblesOutline.js +21 -0
- package/icons/Star.d.ts +5 -0
- package/icons/Star.js +22 -0
- package/icons/StarOutline.d.ts +5 -0
- package/icons/StarOutline.js +23 -0
- package/icons/Stats.d.ts +5 -0
- package/icons/Stats.js +25 -0
- package/icons/Sticky.d.ts +5 -0
- package/icons/Sticky.js +29 -0
- package/icons/Suitcase.d.ts +5 -0
- package/icons/Suitcase.js +25 -0
- package/icons/Tot.d.ts +5 -0
- package/icons/Tot.js +21 -0
- package/icons/UnhideOutline.d.ts +5 -0
- package/icons/UnhideOutline.js +25 -0
- package/icons/User.d.ts +5 -0
- package/icons/User.js +138 -0
- package/icons/UserOutline.d.ts +5 -0
- package/icons/UserOutline.js +22 -0
- package/icons/Users.d.ts +5 -0
- package/icons/Users.js +44 -0
- package/icons/Verification.d.ts +5 -0
- package/icons/Verification.js +22 -0
- package/icons/VerifiedHouse.d.ts +5 -0
- package/icons/VerifiedHouse.js +30 -0
- package/icons/ViewMore.d.ts +5 -0
- package/icons/ViewMore.js +25 -0
- package/icons/Wallet.d.ts +5 -0
- package/icons/Wallet.js +35 -0
- package/icons/Warning.d.ts +5 -0
- package/icons/Warning.js +33 -0
- package/icons/index.d.ts +88 -0
- package/icons/index.js +88 -0
- package/index.d.ts +25 -0
- package/index.js +25 -0
- package/index.spec.js +50 -0
- package/package.json +178 -0
- package/patterns/Dialog/Dialog.d.ts +32 -0
- package/patterns/Dialog/Dialog.js +130 -0
- package/patterns/Dialog/Dialog.stories.js +388 -0
- package/patterns/Dialog/Dialog.styles.d.ts +14 -0
- package/patterns/Dialog/Dialog.styles.js +194 -0
- package/patterns/InputGroup/InputGroup.d.ts +18 -0
- package/patterns/InputGroup/InputGroup.js +52 -0
- package/patterns/InputGroup/InputGroup.spec.js +58 -0
- package/patterns/InputGroup/InputGroup.stories.js +203 -0
- package/patterns/InputGroup/InputGroup.styles.d.ts +6 -0
- package/patterns/InputGroup/InputGroup.styles.js +83 -0
- package/patterns/Popup/Popup.d.ts +41 -0
- package/patterns/Popup/Popup.js +175 -0
- package/patterns/Popup/Popup.spec.js +74 -0
- package/patterns/Popup/Popup.stories.js +548 -0
- package/patterns/Popup/Popup.styles.d.ts +20 -0
- package/patterns/Popup/Popup.styles.js +230 -0
- package/patterns/SearchInput/SearchInput.d.ts +66 -0
- package/patterns/SearchInput/SearchInput.js +355 -0
- package/patterns/SearchInput/SearchInput.stories.js +505 -0
- package/patterns/SearchInput/SearchInput.styles.d.ts +2 -0
- package/patterns/SearchInput/SearchInput.styles.js +49 -0
- package/patterns/TagCloud/TagCloud.d.ts +37 -0
- package/patterns/TagCloud/TagCloud.js +120 -0
- package/patterns/TagCloud/TagCloud.spec.js +163 -0
- package/patterns/TagCloud/TagCloud.stories.js +364 -0
- package/patterns/TagCloud/TagCloud.styles.d.ts +10 -0
- package/patterns/TagCloud/TagCloud.styles.js +39 -0
- package/patterns/TagCloud/TagCloudMultiActive.d.ts +42 -0
- package/patterns/TagCloud/TagCloudMultiActive.js +116 -0
- package/patterns/TagCloud/TagCloudSingleActive.d.ts +29 -0
- package/patterns/TagCloud/TagCloudSingleActive.js +64 -0
- package/patterns/index.d.ts +5 -0
- package/patterns/index.js +5 -0
- package/patterns/patterns-index.spec.js +25 -0
- package/scripts/create-badge-svg.d.ts +2 -0
- package/scripts/template-icons-index.d.ts +2 -0
- package/scripts/template-svg-icon.d.ts +16 -0
- package/shared/global.d.ts +12 -0
- package/shared/global.js +17 -0
- package/storybook/components/Bar.d.ts +10 -0
- package/storybook/components/BorderRadius.d.ts +12 -0
- package/storybook/components/BorderWidth.d.ts +10 -0
- package/storybook/components/Gradient.d.ts +16 -0
- package/storybook/components/GuideImage.d.ts +22 -0
- package/storybook/components/Icons.d.ts +2 -0
- package/storybook/components/Member.d.ts +26 -0
- package/storybook/components/Shadow.d.ts +10 -0
- package/storybook/components/Square.d.ts +10 -0
- package/storybook/components/Swatch.d.ts +10 -0
- package/storybook/components/Transition.d.ts +10 -0
- package/storybook/components/Type.d.ts +42 -0
- package/storybook/main.d.ts +3 -0
- package/storybook/manager.d.ts +1 -0
- package/storybook/preview.d.ts +76 -0
- package/storybook/theme-clad.d.ts +2 -0
- package/storybook/utils/jsonStringify.d.ts +8 -0
- package/storybook/utils/loadFontsForStorybook.d.ts +1 -0
- package/theme/__snapshots__/chotot.spec.js.snap +262 -0
- package/theme/__snapshots__/mudah.spec.js.snap +161 -0
- package/theme/chotot.d.ts +555 -0
- package/theme/chotot.js +937 -0
- package/theme/chotot.spec.js +72 -0
- package/theme/index.d.ts +2 -0
- package/theme/index.js +7 -0
- package/theme/mudah.d.ts +214 -0
- package/theme/mudah.js +333 -0
- package/theme/mudah.spec.js +9 -0
- package/types.d.ts +14 -0
- package/utils/_normalizeArrowKey.d.ts +9 -0
- package/utils/_normalizeArrowKey.js +17 -0
- package/utils/_simulateChangeEvent.d.ts +9 -0
- package/utils/_simulateChangeEvent.js +34 -0
- package/utils/_simulateChangeEvent.spec.js +54 -0
- package/utils/cleanHtml.d.ts +8 -0
- package/utils/cleanHtml.js +14 -0
- package/utils/cleanHtml.spec.js +45 -0
- package/utils/createUniversalPortal.d.ts +10 -0
- package/utils/createUniversalPortal.js +22 -0
- package/utils/createUniversalPortal.server.spec.js +13 -0
- package/utils/createUniversalPortal.spec.js +13 -0
- package/utils/getBreakpointsValues.d.ts +10 -0
- package/utils/getBreakpointsValues.js +24 -0
- package/utils/getBreakpointsValues.test.js +89 -0
- package/utils/index.d.ts +5 -0
- package/utils/index.js +5 -0
- package/utils/noop.d.ts +8 -0
- package/utils/noop.js +9 -0
- package/utils/noop.spec.js +12 -0
- package/utils/sx.d.ts +3770 -0
- package/utils/sx.js +95 -0
- package/utils/sx.spec.js +53 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { css } from 'linaria';
|
|
3
|
+
|
|
4
|
+
import Button from './Button';
|
|
5
|
+
import IconButton from './IconButton';
|
|
6
|
+
// import sx from '../../utils/sx';
|
|
7
|
+
import PhoneOutline from '../../icons/PhoneOutline';
|
|
8
|
+
import HeartOutline from '../../icons/HeartOutline';
|
|
9
|
+
import SpeechBubbles from '../../icons/SpeechBubbles';
|
|
10
|
+
import Download from '../../icons/Download';
|
|
11
|
+
import Location from '../../icons/Location';
|
|
12
|
+
|
|
13
|
+
const buttonStories = {
|
|
14
|
+
title: 'Components/Buttons/Button',
|
|
15
|
+
component: Button,
|
|
16
|
+
parameters: {
|
|
17
|
+
docs: {
|
|
18
|
+
description: {
|
|
19
|
+
component: `Renders a standard button element.
|
|
20
|
+
|
|
21
|
+
\`🧪 Beta\` [\`💎 Sketch Specs\`](https://www.sketch.com/s/061b5b52-f0d0-439f-9fde-2bfbcfaaf97e/a/5d0Y3L)
|
|
22
|
+
`,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
argTypes: {
|
|
27
|
+
children: {
|
|
28
|
+
control: {
|
|
29
|
+
type: 'text',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
as: {
|
|
33
|
+
options: ['button', 'a'],
|
|
34
|
+
control: {
|
|
35
|
+
type: 'select',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default buttonStories;
|
|
42
|
+
|
|
43
|
+
// top-most story will have the props breakdown
|
|
44
|
+
export const Overview = (args) => <Button {...args} />;
|
|
45
|
+
Overview.args = { children: 'Label', as: 'button' };
|
|
46
|
+
|
|
47
|
+
const storyClass = css`
|
|
48
|
+
& > * {
|
|
49
|
+
margin: 0.5em 1em 0.5em 0;
|
|
50
|
+
vertical-align: middle;
|
|
51
|
+
}
|
|
52
|
+
`;
|
|
53
|
+
|
|
54
|
+
export const ColorsAndWeights = (/* args */) => (
|
|
55
|
+
<div className={storyClass}>
|
|
56
|
+
<Button weight="bold" color="primary">
|
|
57
|
+
PRIMARY
|
|
58
|
+
</Button>
|
|
59
|
+
<Button weight="bold" color="secondary">
|
|
60
|
+
SECONDARY
|
|
61
|
+
</Button>
|
|
62
|
+
<Button weight="bold" color="accent">
|
|
63
|
+
ACCENT
|
|
64
|
+
</Button>
|
|
65
|
+
<Button weight="bold" color="critical">
|
|
66
|
+
CRITICAL
|
|
67
|
+
</Button>
|
|
68
|
+
<Button weight="bold" color="caution">
|
|
69
|
+
CAUTION
|
|
70
|
+
</Button>
|
|
71
|
+
<Button weight="bold" color="positive">
|
|
72
|
+
POSITIVE
|
|
73
|
+
</Button>
|
|
74
|
+
<Button weight="bold" color="info">
|
|
75
|
+
INFO
|
|
76
|
+
</Button>
|
|
77
|
+
<br />
|
|
78
|
+
<Button color="primary">primary</Button>
|
|
79
|
+
<Button color="secondary">secondary</Button>
|
|
80
|
+
<Button color="accent">accent</Button>
|
|
81
|
+
<Button color="critical">critical</Button>
|
|
82
|
+
<Button color="caution">caution</Button>
|
|
83
|
+
<Button color="positive">positive</Button>
|
|
84
|
+
<Button color="info">info</Button>
|
|
85
|
+
</div>
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
export const variantOutline = (/* args */) => (
|
|
89
|
+
<div className={storyClass}>
|
|
90
|
+
<Button weight="bold" color="primary" variant="outline">
|
|
91
|
+
PRIMARY
|
|
92
|
+
</Button>
|
|
93
|
+
<Button weight="bold" color="secondary" variant="outline">
|
|
94
|
+
SECONDARY
|
|
95
|
+
</Button>
|
|
96
|
+
<Button weight="bold" color="accent" variant="outline">
|
|
97
|
+
ACCENT
|
|
98
|
+
</Button>
|
|
99
|
+
<Button weight="bold" color="critical" variant="outline">
|
|
100
|
+
CRITICAL
|
|
101
|
+
</Button>
|
|
102
|
+
<Button weight="bold" color="caution" variant="outline">
|
|
103
|
+
CAUTION
|
|
104
|
+
</Button>
|
|
105
|
+
<Button weight="bold" color="positive" variant="outline">
|
|
106
|
+
POSITIVE
|
|
107
|
+
</Button>
|
|
108
|
+
<Button weight="bold" color="info" variant="outline">
|
|
109
|
+
INFO
|
|
110
|
+
</Button>
|
|
111
|
+
<br />
|
|
112
|
+
<Button color="primary" variant="outline">
|
|
113
|
+
primary
|
|
114
|
+
</Button>
|
|
115
|
+
<Button color="secondary" variant="outline">
|
|
116
|
+
secondary
|
|
117
|
+
</Button>
|
|
118
|
+
<Button color="accent" variant="outline">
|
|
119
|
+
accent
|
|
120
|
+
</Button>
|
|
121
|
+
<Button color="critical" variant="outline">
|
|
122
|
+
critical
|
|
123
|
+
</Button>
|
|
124
|
+
<Button color="caution" variant="outline">
|
|
125
|
+
caution
|
|
126
|
+
</Button>
|
|
127
|
+
<Button color="positive" variant="outline">
|
|
128
|
+
positive
|
|
129
|
+
</Button>
|
|
130
|
+
<Button color="info" variant="outline">
|
|
131
|
+
info
|
|
132
|
+
</Button>
|
|
133
|
+
</div>
|
|
134
|
+
);
|
|
135
|
+
|
|
136
|
+
export const sizes = (/* args */) => (
|
|
137
|
+
<div className={storyClass}>
|
|
138
|
+
<Button color="primary" size="small">
|
|
139
|
+
Small
|
|
140
|
+
</Button>
|
|
141
|
+
<Button color="primary" size="medium">
|
|
142
|
+
Medium
|
|
143
|
+
</Button>
|
|
144
|
+
<Button color="primary" size="large">
|
|
145
|
+
Large
|
|
146
|
+
</Button>
|
|
147
|
+
<Button color="critical" size="small" weight="bold">
|
|
148
|
+
SMALL
|
|
149
|
+
</Button>
|
|
150
|
+
<Button color="critical" size="medium" weight="bold">
|
|
151
|
+
MEDIUM
|
|
152
|
+
</Button>
|
|
153
|
+
<Button color="critical" size="large" weight="bold">
|
|
154
|
+
LARGE
|
|
155
|
+
</Button>
|
|
156
|
+
<br />
|
|
157
|
+
<Button color="info" variant="outline" size="small">
|
|
158
|
+
Small
|
|
159
|
+
</Button>
|
|
160
|
+
<Button color="info" variant="outline" size="medium">
|
|
161
|
+
Medium
|
|
162
|
+
</Button>
|
|
163
|
+
<Button color="info" variant="outline" size="large">
|
|
164
|
+
Large
|
|
165
|
+
</Button>
|
|
166
|
+
<Button color="positive" variant="outline" size="small" weight="bold">
|
|
167
|
+
SMALL
|
|
168
|
+
</Button>
|
|
169
|
+
<Button color="positive" variant="outline" size="medium" weight="bold">
|
|
170
|
+
MEDIUM
|
|
171
|
+
</Button>
|
|
172
|
+
<Button color="positive" variant="outline" size="large" weight="bold">
|
|
173
|
+
LARGE
|
|
174
|
+
</Button>
|
|
175
|
+
</div>
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
export const borderRadius = (/* args */) => (
|
|
179
|
+
<div className={storyClass}>
|
|
180
|
+
<Button color="positive" radius="normal">
|
|
181
|
+
Solid Normal
|
|
182
|
+
</Button>
|
|
183
|
+
<Button color="positive" radius="pill">
|
|
184
|
+
Solid Pill
|
|
185
|
+
</Button>
|
|
186
|
+
<Button color="critical" variant="outline" radius="normal">
|
|
187
|
+
Outline Normal
|
|
188
|
+
</Button>
|
|
189
|
+
<Button color="critical" variant="outline" radius="pill">
|
|
190
|
+
Outline Pill
|
|
191
|
+
</Button>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
|
|
195
|
+
export const disabled = (/* args */) => (
|
|
196
|
+
<div className={storyClass}>
|
|
197
|
+
<Button color="positive" radius="normal" disabled>
|
|
198
|
+
Solid Normal
|
|
199
|
+
</Button>
|
|
200
|
+
<Button color="positive" radius="pill" disabled>
|
|
201
|
+
Solid Pill
|
|
202
|
+
</Button>
|
|
203
|
+
<Button color="critical" variant="outline" radius="normal" disabled>
|
|
204
|
+
Outline Normal
|
|
205
|
+
</Button>
|
|
206
|
+
<Button color="critical" variant="outline" radius="pill" disabled>
|
|
207
|
+
Outline Pill
|
|
208
|
+
</Button>
|
|
209
|
+
</div>
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
disabled.parameters = {
|
|
213
|
+
docs: {
|
|
214
|
+
description: {
|
|
215
|
+
story: 'Disabled state',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export const withIcons = (/* args */) => (
|
|
221
|
+
<div className={storyClass}>
|
|
222
|
+
<Button color="positive" size="large">
|
|
223
|
+
<PhoneOutline /> Click to Dial
|
|
224
|
+
</Button>
|
|
225
|
+
|
|
226
|
+
<Button color="positive" size="large" variant="outline">
|
|
227
|
+
<SpeechBubbles /> Chat with Seller
|
|
228
|
+
</Button>
|
|
229
|
+
|
|
230
|
+
<Button color="critical" size="medium" radius="pill" variant="solid">
|
|
231
|
+
<HeartOutline /> Save
|
|
232
|
+
</Button>
|
|
233
|
+
|
|
234
|
+
<Button color="critical" size="medium" radius="pill" variant="outline">
|
|
235
|
+
Save <HeartOutline />
|
|
236
|
+
</Button>
|
|
237
|
+
|
|
238
|
+
<Button color="info" size="small" radius="normal" variant="solid">
|
|
239
|
+
Location <Location />
|
|
240
|
+
</Button>
|
|
241
|
+
|
|
242
|
+
<Button color="info" size="small" radius="normal" variant="outline">
|
|
243
|
+
<Location /> Location
|
|
244
|
+
</Button>
|
|
245
|
+
</div>
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
export const iconButtons = (/* args */) => (
|
|
249
|
+
<div className={storyClass}>
|
|
250
|
+
<IconButton color="positive" size="large">
|
|
251
|
+
<PhoneOutline />
|
|
252
|
+
</IconButton>
|
|
253
|
+
|
|
254
|
+
<IconButton color="positive" size="large" variant="outline">
|
|
255
|
+
<Download />
|
|
256
|
+
</IconButton>
|
|
257
|
+
|
|
258
|
+
<IconButton color="critical" size="large" radius="circle">
|
|
259
|
+
<SpeechBubbles />
|
|
260
|
+
</IconButton>
|
|
261
|
+
|
|
262
|
+
<IconButton color="critical" size="large" radius="circle" variant="outline">
|
|
263
|
+
<HeartOutline />
|
|
264
|
+
</IconButton>
|
|
265
|
+
|
|
266
|
+
<IconButton color="positive" size="medium">
|
|
267
|
+
<PhoneOutline />
|
|
268
|
+
</IconButton>
|
|
269
|
+
|
|
270
|
+
<IconButton color="positive" size="medium" variant="outline">
|
|
271
|
+
<Download />
|
|
272
|
+
</IconButton>
|
|
273
|
+
|
|
274
|
+
<IconButton color="critical" size="medium" radius="circle">
|
|
275
|
+
<SpeechBubbles />
|
|
276
|
+
</IconButton>
|
|
277
|
+
|
|
278
|
+
<IconButton color="critical" size="medium" radius="circle" variant="outline">
|
|
279
|
+
<HeartOutline />
|
|
280
|
+
</IconButton>
|
|
281
|
+
|
|
282
|
+
<IconButton color="positive" size="small">
|
|
283
|
+
<PhoneOutline />
|
|
284
|
+
</IconButton>
|
|
285
|
+
|
|
286
|
+
<IconButton color="positive" size="small" variant="outline">
|
|
287
|
+
<Download />
|
|
288
|
+
</IconButton>
|
|
289
|
+
|
|
290
|
+
<IconButton color="critical" size="small" radius="circle">
|
|
291
|
+
<SpeechBubbles />
|
|
292
|
+
</IconButton>
|
|
293
|
+
|
|
294
|
+
<IconButton color="critical" size="small" radius="circle" variant="outline">
|
|
295
|
+
<HeartOutline />
|
|
296
|
+
</IconButton>
|
|
297
|
+
</div>
|
|
298
|
+
);
|
|
299
|
+
|
|
300
|
+
iconButtons.parameters = {
|
|
301
|
+
docs: {
|
|
302
|
+
description: {
|
|
303
|
+
story: `To have square or circle icons, use \`<IconButton>\`. For example:
|
|
304
|
+
|
|
305
|
+
import { IconButton } from 'clad-ui'
|
|
306
|
+
|
|
307
|
+
<IconButton><Heart /><IconButton>`,
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
const stretchClass = css`
|
|
313
|
+
display: flex;
|
|
314
|
+
flex-wrap: wrap;
|
|
315
|
+
justify-content: space-between;
|
|
316
|
+
|
|
317
|
+
& > div {
|
|
318
|
+
flex-basis: calc(50% - 5px);
|
|
319
|
+
margin-bottom: 10px;
|
|
320
|
+
}
|
|
321
|
+
`;
|
|
322
|
+
|
|
323
|
+
export const stretch = (/* args */) => (
|
|
324
|
+
<div className={stretchClass}>
|
|
325
|
+
<div>
|
|
326
|
+
<Button stretch>Login</Button>
|
|
327
|
+
</div>
|
|
328
|
+
<div>
|
|
329
|
+
<Button variant="outline" stretch>
|
|
330
|
+
Register
|
|
331
|
+
</Button>
|
|
332
|
+
</div>
|
|
333
|
+
<Button stretch>Click here to continue</Button>
|
|
334
|
+
</div>
|
|
335
|
+
);
|
|
336
|
+
|
|
337
|
+
stretch.parameters = {
|
|
338
|
+
docs: {
|
|
339
|
+
description: {
|
|
340
|
+
story: '`strech` prop allows the button to expand to full content width of its container',
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
export const extraClasses = (/* args */) => {
|
|
346
|
+
// Below is sample class definition, colors should be from theme
|
|
347
|
+
const extraClass = css`
|
|
348
|
+
/* stylelint-disable declaration-no-important */
|
|
349
|
+
color: #222222 !important;
|
|
350
|
+
text-transform: uppercase;
|
|
351
|
+
|
|
352
|
+
:hover {
|
|
353
|
+
background-color: #cc9600 !important;
|
|
354
|
+
}
|
|
355
|
+
`;
|
|
356
|
+
|
|
357
|
+
return (
|
|
358
|
+
<div className={storyClass}>
|
|
359
|
+
<Button extraClasses={extraClass}>Customized button</Button>
|
|
360
|
+
</div>
|
|
361
|
+
);
|
|
362
|
+
};
|
|
363
|
+
|
|
364
|
+
extraClasses.parameters = {
|
|
365
|
+
docs: {
|
|
366
|
+
description: {
|
|
367
|
+
story: '`extraClasses` allow to overwrite default styling in some special cases',
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
};
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
import theme from '@clad-ui/theme';
|
|
2
|
+
import { css } from 'linaria';
|
|
3
|
+
|
|
4
|
+
const { colors, radii, fontSizes } = theme;
|
|
5
|
+
|
|
6
|
+
const buttonClass = css`
|
|
7
|
+
/* Regular buttton */
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
font-weight: normal;
|
|
11
|
+
align-items: center;
|
|
12
|
+
border-style: solid;
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
text-decoration: none;
|
|
15
|
+
|
|
16
|
+
/* Stretch */
|
|
17
|
+
&.stretch {
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* Inner icons */
|
|
24
|
+
&.i-left > svg {
|
|
25
|
+
margin-right: 0.5em;
|
|
26
|
+
margin-left: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.i-right > svg {
|
|
30
|
+
margin-right: 0;
|
|
31
|
+
margin-left: 0.5em;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Sizes */
|
|
35
|
+
&.small {
|
|
36
|
+
/* outer height: 24px */
|
|
37
|
+
font-size: ${fontSizes.xs};
|
|
38
|
+
line-height: 1;
|
|
39
|
+
padding: 5px 11px; /* minus borders */
|
|
40
|
+
|
|
41
|
+
&.icon {
|
|
42
|
+
font-size: ${fontSizes.xs};
|
|
43
|
+
padding: 0.3rem; /* 20% * 24px */
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.i-right > svg,
|
|
47
|
+
&.i-left > svg {
|
|
48
|
+
font-size: ${fontSizes.xs};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&,
|
|
53
|
+
&.medium {
|
|
54
|
+
/* outer height: 32px */
|
|
55
|
+
font-size: ${fontSizes.sm};
|
|
56
|
+
line-height: 1;
|
|
57
|
+
padding: 8px 16px;
|
|
58
|
+
|
|
59
|
+
&.icon {
|
|
60
|
+
font-size: ${fontSizes.md};
|
|
61
|
+
padding: 0.4rem; /* 20% * 32px */
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&.i-right > svg,
|
|
65
|
+
&.i-left > svg {
|
|
66
|
+
font-size: ${fontSizes.md};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.large {
|
|
71
|
+
/* outer height: 40px */
|
|
72
|
+
font-size: ${fontSizes.md};
|
|
73
|
+
line-height: 1.25;
|
|
74
|
+
padding: 9px 19px; /* minus borders */
|
|
75
|
+
|
|
76
|
+
&.icon {
|
|
77
|
+
font-size: ${fontSizes.xl};
|
|
78
|
+
padding: 0.5rem; /* 20% * 40px */
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.i-right > svg,
|
|
82
|
+
&.i-left > svg {
|
|
83
|
+
font-size: ${fontSizes.xl};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&,
|
|
88
|
+
&.primary {
|
|
89
|
+
color: ${colors.white};
|
|
90
|
+
background-color: ${colors.primary};
|
|
91
|
+
border-color: ${colors.primary};
|
|
92
|
+
&:hover {
|
|
93
|
+
color: ${colors.white};
|
|
94
|
+
background-color: ${colors.primaryLight};
|
|
95
|
+
border-color: ${colors.primaryLight};
|
|
96
|
+
}
|
|
97
|
+
&:active {
|
|
98
|
+
color: ${colors.white};
|
|
99
|
+
background-color: ${colors.primaryDark};
|
|
100
|
+
border-color: ${colors.primaryDark};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
&.info {
|
|
104
|
+
color: ${colors.white};
|
|
105
|
+
background-color: ${colors.info};
|
|
106
|
+
border-color: ${colors.info};
|
|
107
|
+
&:hover {
|
|
108
|
+
color: ${colors.white};
|
|
109
|
+
background-color: ${colors.infoLight};
|
|
110
|
+
border-color: ${colors.infoLight};
|
|
111
|
+
}
|
|
112
|
+
&:active {
|
|
113
|
+
color: ${colors.white};
|
|
114
|
+
background-color: ${colors.infoDark};
|
|
115
|
+
border-color: ${colors.infoDark};
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
&.critical {
|
|
119
|
+
color: ${colors.white};
|
|
120
|
+
background-color: ${colors.critical};
|
|
121
|
+
border-color: ${colors.critical};
|
|
122
|
+
&:hover {
|
|
123
|
+
color: ${colors.white};
|
|
124
|
+
background-color: ${colors.criticalLight};
|
|
125
|
+
border-color: ${colors.criticalLight};
|
|
126
|
+
}
|
|
127
|
+
&:active {
|
|
128
|
+
color: ${colors.white};
|
|
129
|
+
background-color: ${colors.criticalDark};
|
|
130
|
+
border-color: ${colors.criticalDark};
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
&.caution {
|
|
134
|
+
color: ${colors.white};
|
|
135
|
+
background-color: ${colors.caution};
|
|
136
|
+
border-color: ${colors.caution};
|
|
137
|
+
&:hover {
|
|
138
|
+
color: ${colors.white};
|
|
139
|
+
background-color: ${colors.cautionLight};
|
|
140
|
+
border-color: ${colors.cautionLight};
|
|
141
|
+
}
|
|
142
|
+
&:active {
|
|
143
|
+
color: ${colors.white};
|
|
144
|
+
background-color: ${colors.cautionDark};
|
|
145
|
+
border-color: ${colors.cautionDark};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
&.positive {
|
|
149
|
+
color: ${colors.white};
|
|
150
|
+
background-color: ${colors.positive};
|
|
151
|
+
border-color: ${colors.positive};
|
|
152
|
+
&:hover {
|
|
153
|
+
color: ${colors.white};
|
|
154
|
+
background-color: ${colors.positiveLight};
|
|
155
|
+
border-color: ${colors.positiveLight};
|
|
156
|
+
}
|
|
157
|
+
&:active {
|
|
158
|
+
color: ${colors.white};
|
|
159
|
+
background-color: ${colors.positiveDark};
|
|
160
|
+
border-color: ${colors.positiveDark};
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
&.accent {
|
|
164
|
+
color: ${colors.white};
|
|
165
|
+
background-color: ${colors.accent};
|
|
166
|
+
border-color: ${colors.accent};
|
|
167
|
+
&:hover {
|
|
168
|
+
color: ${colors.white};
|
|
169
|
+
background-color: ${colors.accentLight};
|
|
170
|
+
border-color: ${colors.accentLight};
|
|
171
|
+
}
|
|
172
|
+
&:active {
|
|
173
|
+
color: ${colors.white};
|
|
174
|
+
background-color: ${colors.accentDark};
|
|
175
|
+
border-color: ${colors.accentDark};
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
&.secondary {
|
|
179
|
+
color: ${colors.white};
|
|
180
|
+
background-color: ${colors.secondary};
|
|
181
|
+
border-color: ${colors.secondary};
|
|
182
|
+
&:hover {
|
|
183
|
+
color: ${colors.white};
|
|
184
|
+
background-color: ${colors.secondaryLight};
|
|
185
|
+
border-color: ${colors.secondaryLight};
|
|
186
|
+
}
|
|
187
|
+
&:active {
|
|
188
|
+
color: ${colors.white};
|
|
189
|
+
background-color: ${colors.secondaryDark};
|
|
190
|
+
border-color: ${colors.secondaryDark};
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Outline button */
|
|
195
|
+
&.outline,
|
|
196
|
+
&.outline.o-primary {
|
|
197
|
+
color: ${colors.primary};
|
|
198
|
+
background: transparent;
|
|
199
|
+
border-color: currentColor;
|
|
200
|
+
|
|
201
|
+
&:hover {
|
|
202
|
+
color: ${colors.primaryLight};
|
|
203
|
+
background: ${colors.primaryBG};
|
|
204
|
+
border-color: currentColor;
|
|
205
|
+
}
|
|
206
|
+
&:active {
|
|
207
|
+
color: ${colors.primaryDark};
|
|
208
|
+
background: transparent;
|
|
209
|
+
border-color: currentColor;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&.o-info {
|
|
214
|
+
color: ${colors.info};
|
|
215
|
+
&:hover {
|
|
216
|
+
background: ${colors.infoBG};
|
|
217
|
+
color: ${colors.infoLight};
|
|
218
|
+
}
|
|
219
|
+
&:active {
|
|
220
|
+
color: ${colors.infoDark};
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
&.o-critical {
|
|
224
|
+
color: ${colors.critical};
|
|
225
|
+
&:hover {
|
|
226
|
+
background: ${colors.criticalBG};
|
|
227
|
+
color: ${colors.criticalLight};
|
|
228
|
+
}
|
|
229
|
+
&:active {
|
|
230
|
+
color: ${colors.criticalDark};
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
&.o-caution {
|
|
234
|
+
color: ${colors.caution};
|
|
235
|
+
&:hover {
|
|
236
|
+
background: ${colors.cautionBG};
|
|
237
|
+
color: ${colors.cautionLight};
|
|
238
|
+
}
|
|
239
|
+
&:active {
|
|
240
|
+
color: ${colors.cautionDark};
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
&.o-positive {
|
|
244
|
+
color: ${colors.positive};
|
|
245
|
+
&:hover {
|
|
246
|
+
background: ${colors.positiveBG};
|
|
247
|
+
color: ${colors.positiveLight};
|
|
248
|
+
}
|
|
249
|
+
&:active {
|
|
250
|
+
color: ${colors.positiveDark};
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
&.o-accent {
|
|
254
|
+
color: ${colors.accent};
|
|
255
|
+
&:hover {
|
|
256
|
+
background: ${colors.accentBG};
|
|
257
|
+
color: ${colors.accentLight};
|
|
258
|
+
}
|
|
259
|
+
&:active {
|
|
260
|
+
color: ${colors.accentDark};
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
&.o-secondary {
|
|
264
|
+
color: ${colors.secondary};
|
|
265
|
+
&:hover {
|
|
266
|
+
background: ${colors.secondaryBG};
|
|
267
|
+
color: ${colors.secondaryLight};
|
|
268
|
+
}
|
|
269
|
+
&:active {
|
|
270
|
+
color: ${colors.secondaryDark};
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* disabled override all colors */
|
|
275
|
+
&.disabled,
|
|
276
|
+
&:disabled,
|
|
277
|
+
&[disabled] {
|
|
278
|
+
color: ${colors.white};
|
|
279
|
+
background-color: ${colors.neutral};
|
|
280
|
+
border-color: ${colors.neutral};
|
|
281
|
+
cursor: default;
|
|
282
|
+
|
|
283
|
+
&:hover,
|
|
284
|
+
&:active {
|
|
285
|
+
color: ${colors.white};
|
|
286
|
+
background-color: ${colors.neutral};
|
|
287
|
+
border-color: ${colors.neutral};
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&.outline.disabled,
|
|
292
|
+
&.outline:disabled,
|
|
293
|
+
&.outline[disabled] {
|
|
294
|
+
color: ${colors.neutral};
|
|
295
|
+
background-color: transparent;
|
|
296
|
+
border-color: ${colors.neutral};
|
|
297
|
+
|
|
298
|
+
&:hover,
|
|
299
|
+
&:active {
|
|
300
|
+
color: ${colors.neutral};
|
|
301
|
+
background-color: transparent;
|
|
302
|
+
border-color: ${colors.neutral};
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Border radius */
|
|
307
|
+
&.r-normal {
|
|
308
|
+
border-radius: ${radii.sm};
|
|
309
|
+
}
|
|
310
|
+
&.r-pill {
|
|
311
|
+
border-radius: ${radii.pill};
|
|
312
|
+
}
|
|
313
|
+
&.r-circle {
|
|
314
|
+
border-radius: ${radii.circle};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Label font weight */
|
|
318
|
+
&.w-normal {
|
|
319
|
+
font-weight: normal;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
&.w-bold {
|
|
323
|
+
font-weight: bold;
|
|
324
|
+
}
|
|
325
|
+
`;
|
|
326
|
+
|
|
327
|
+
export default buttonClass;
|