gd-design-library 0.8.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/README.md +12 -8
- package/ai/codegen.d.ts +0 -10
- package/ai/index.d.ts +0 -1
- package/ai/schemas/components/Box.d.ts +101 -0
- package/ai/schemas/components/Button.d.ts +1 -7
- package/ai/schemas/components/Card.d.ts +16 -4
- package/ai/schemas/components/Icon.d.ts +1 -0
- package/assets/styles.css +1 -1
- package/components/core/Box/Box.d.ts +2 -0
- package/components/core/Box/Box.js +26 -0
- package/components/core/Box/Box.types.d.ts +18 -0
- package/components/core/Box/BoxStyled.d.ts +2 -0
- package/components/core/Box/BoxStyled.js +26 -0
- package/components/core/Box/constants.d.ts +1 -0
- package/components/core/Box/constants.js +4 -0
- package/components/core/Box/index.d.ts +3 -0
- package/components/core/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/components/core/Breadcrumbs/BreadcrumbsStyled.d.ts +1 -1
- package/components/core/Breadcrumbs/BreadcrumbsStyled.js +48 -39
- package/components/core/Button/Button.d.ts +1 -1
- package/components/core/Button/Button.js +26 -26
- package/components/core/Button/Button.types.d.ts +7 -5
- package/components/core/Button/ButtonStyled.d.ts +4 -4
- package/components/core/Button/ButtonStyled.js +40 -35
- package/components/core/Dropdown/DropdownStyled.js +15 -10
- package/components/core/DropdownItem/DropdownItemStyled.js +15 -9
- package/components/core/Form/FormStyled.d.ts +1 -1
- package/components/core/Form/FormStyled.js +15 -9
- package/components/core/Icon/Icon.js +9 -9
- package/components/core/Image/Image.d.ts +1 -1
- package/components/core/Image/Image.js +27 -27
- package/components/core/Image/ImageStyled.d.ts +1 -1
- package/components/core/Image/ImageStyled.js +54 -32
- package/components/core/InlineNotification/InlineNotificationStyled.d.ts +1 -1
- package/components/core/InlineNotification/InlineNotificationStyled.js +21 -18
- package/components/core/Input/Input.d.ts +1 -1
- package/components/core/Input/InputAdornment/InputAdornmentStyled.js +14 -8
- package/components/core/Input/InputHelper/InputHelperStyled.js +14 -8
- package/components/core/Input/InputStyled.js +14 -8
- package/components/core/Input/InputWrapper/InputWrapperStyled.js +14 -9
- package/components/core/Label/LabelStyled.js +13 -12
- package/components/core/Link/LinkStyled.js +19 -14
- package/components/core/List/ListStyled.js +29 -22
- package/components/core/Loader/LoaderStyled.js +30 -32
- package/components/core/Menu/Menu.d.ts +1 -1
- package/components/core/Menu/MenuStyled.d.ts +1 -1
- package/components/core/Menu/MenuStyled.js +29 -20
- package/components/core/Modal/ModalStyled.js +76 -45
- package/components/core/Portal/Portal.d.ts +1 -1
- package/components/core/Scroll/ScrollStyled.d.ts +1 -1
- package/components/core/Scroll/ScrollStyled.js +42 -36
- package/components/core/Select/Select.js +60 -57
- package/components/core/Select/SelectStyled.d.ts +1 -2
- package/components/core/Select/SelectStyled.js +62 -48
- package/components/core/Separator/SeparatorStyled.d.ts +1 -1
- package/components/core/Separator/SeparatorStyled.js +56 -45
- package/components/core/Skeleton/SkeletonStyled.d.ts +1 -1
- package/components/core/Skeleton/SkeletonStyled.js +20 -19
- package/components/core/Slider/SliderStyled.js +14 -12
- package/components/core/Snackbar/SnackbarStyled.js +98 -71
- package/components/core/Switch/SwitchStyled.js +59 -34
- package/components/core/Textarea/TextareaStyled.js +19 -14
- package/components/core/Toggle/Toggle.js +17 -17
- package/components/core/Toggle/ToggleStyled.js +15 -10
- package/components/core/Tooltip/TooltipStyled.js +24 -17
- package/components/core/Tooltip/utils.d.ts +1 -1
- package/components/core/Typography/Typography.js +10 -10
- package/components/core/Typography/TypographyStyled.d.ts +1 -1
- package/components/core/Typography/TypographyStyled.js +28 -23
- package/components/core/Wrapper/WrapperStyled.js +18 -17
- package/components/core/index.d.ts +1 -0
- package/components/domainSpecific/Accordion/AccordionStyled.js +39 -26
- package/components/domainSpecific/Accordion/index.d.ts +1 -0
- package/components/domainSpecific/Avatar/Avatar.js +16 -16
- package/components/domainSpecific/Avatar/AvatarStyled.js +62 -46
- package/components/domainSpecific/Card/Card.d.ts +11 -13
- package/components/domainSpecific/Card/Card.js +28 -40
- package/components/domainSpecific/Card/Card.types.d.ts +2 -16
- package/components/domainSpecific/Card/CardButton/CardButtonStyled.js +17 -11
- package/components/domainSpecific/Card/CardCounter/CardCounterStyled.js +16 -10
- package/components/domainSpecific/Card/CardDescription/CardDescriptionStyled.js +17 -16
- package/components/domainSpecific/Card/CardImage/CardImageStyled.js +16 -10
- package/components/domainSpecific/Card/CardPrice/CardPriceStyled.js +16 -10
- package/components/domainSpecific/Card/CardRating/CardRatingStyled.js +16 -10
- package/components/domainSpecific/Card/CardTitle/CardTitleStyled.js +16 -15
- package/components/domainSpecific/Carousel/Carousel.js +72 -72
- package/components/domainSpecific/Carousel/CarouselStyled.js +112 -97
- package/components/domainSpecific/ChatBubble/ChatBubbleStyled.d.ts +1 -1
- package/components/domainSpecific/ChatBubble/ChatBubbleStyled.js +50 -28
- package/components/domainSpecific/ContentCarousel/ContentCarousel.d.ts +1 -1
- package/components/domainSpecific/ContentCarousel/ContentCarousel.js +37 -38
- package/components/domainSpecific/ContentCarousel/ContentCarouselStyled.js +24 -20
- package/components/domainSpecific/Counter/CounterStyled.js +20 -17
- package/components/domainSpecific/DragAndDropFiles/DragAndDropFilesStyled.js +12 -10
- package/components/domainSpecific/Header/HeaderStyled.js +101 -88
- package/components/domainSpecific/Price/Price.d.ts +1 -1
- package/components/domainSpecific/Price/PriceStyled.js +28 -24
- package/components/domainSpecific/ProgressBar/ProgressBarStyled.js +47 -42
- package/components/domainSpecific/RadioGroup/RadioGroup.js +38 -38
- package/components/domainSpecific/RadioGroup/RadioGroupStyled.js +89 -84
- package/components/domainSpecific/Rating/Rating.d.ts +1 -1
- package/components/domainSpecific/Rating/Rating.js +41 -41
- package/components/domainSpecific/Rating/RatingStyled.js +42 -37
- package/components/domainSpecific/Search/SearchStyled.js +15 -9
- package/components/domainSpecific/SearchModal/SearchInput/SearchInputStyled.js +18 -15
- package/components/domainSpecific/SearchModal/SearchItems/SearchItemsStyled.js +63 -54
- package/components/domainSpecific/SearchModal/SearchLoader/SearchLoaderStyled.js +9 -7
- package/components/domainSpecific/SearchModal/SearchModalStyled.d.ts +1 -1
- package/components/domainSpecific/SearchModal/SearchModalStyled.js +25 -18
- package/components/domainSpecific/SearchModal/constants.d.ts +1 -1
- package/components/domainSpecific/SearchModal/constants.js +1 -1
- package/components/domainSpecific/Stepper/StepperStyled.js +41 -35
- package/components/domainSpecific/Tabs/TabsStyled.js +51 -43
- package/components/index.d.ts +0 -1
- package/components/index.types.d.ts +14 -0
- package/components/layout/ChatContainer/ChatContainerStyled.d.ts +1 -1
- package/components/layout/ChatContainer/ChatContainerStyled.js +118 -59
- package/components/layout/Column/ColumnStyled.js +28 -27
- package/components/layout/FlexContainer/FlexContainerStyled.js +13 -12
- package/components/layout/Row/RowStyled.js +26 -25
- package/components/templates/index.d.ts +0 -1
- package/components/widget/DragAndDrop/DragAndDrop.d.ts +1 -1
- package/components/widget/DragAndDrop/DragAndDrop.js +15 -15
- package/components/widget/DragAndDrop/DragAndDropStyled.d.ts +1 -1
- package/components/widget/DragAndDrop/DragAndDropStyled.js +48 -41
- package/hooks/useTheme/useTheme.types.d.ts +1 -0
- package/index.js +359 -352
- package/llms.txt +87 -363
- package/package.json +1 -1
- package/tokens/accordion.d.ts +1 -62
- package/tokens/accordion.js +30 -33
- package/tokens/avatar.d.ts +1 -120
- package/tokens/avatar.js +29 -31
- package/tokens/box.d.ts +5 -0
- package/tokens/box.js +50 -0
- package/tokens/breadcrumbs.d.ts +1 -30
- package/tokens/breadcrumbs.js +12 -12
- package/tokens/button.d.ts +1 -155
- package/tokens/button.js +104 -160
- package/tokens/card.d.ts +5 -175
- package/tokens/card.js +101 -149
- package/tokens/carousel.d.ts +1 -197
- package/tokens/carousel.js +44 -46
- package/tokens/chat.d.ts +1 -128
- package/tokens/chat.js +77 -60
- package/tokens/chatbubble.d.ts +1 -48
- package/tokens/chatbubble.js +42 -41
- package/tokens/colors.d.ts +193 -48
- package/tokens/colors.js +202 -57
- package/tokens/constants.js +1 -1
- package/tokens/counter.d.ts +1 -38
- package/tokens/counter.js +7 -7
- package/tokens/defaultTheme.d.ts +586 -3555
- package/tokens/defaultTheme.js +16 -12
- package/tokens/draganddrop.d.ts +1 -61
- package/tokens/draganddrop.js +35 -38
- package/tokens/font.d.ts +7 -0
- package/tokens/font.js +7 -0
- package/tokens/header.d.ts +1 -107
- package/tokens/header.js +34 -36
- package/tokens/image.d.ts +1 -31
- package/tokens/image.js +18 -20
- package/tokens/index.d.ts +512 -3161
- package/tokens/index.js +119 -112
- package/tokens/inlineNotification.d.ts +1 -62
- package/tokens/inlineNotification.js +25 -26
- package/tokens/input.d.ts +1 -212
- package/tokens/input.js +69 -62
- package/tokens/link.d.ts +1 -80
- package/tokens/link.js +66 -40
- package/tokens/list.d.ts +1 -89
- package/tokens/list.js +38 -46
- package/tokens/loader.d.ts +1 -135
- package/tokens/loader.js +31 -33
- package/tokens/menu.d.ts +1 -15
- package/tokens/menu.js +6 -9
- package/tokens/modal.d.ts +1 -89
- package/tokens/modal.js +59 -49
- package/tokens/price.d.ts +1 -23
- package/tokens/price.js +16 -18
- package/tokens/progressbar.d.ts +1 -51
- package/tokens/progressbar.js +20 -23
- package/tokens/radiogroup.d.ts +1 -80
- package/tokens/radiogroup.js +32 -34
- package/tokens/radius.d.ts +1 -1
- package/tokens/radius.js +8 -9
- package/tokens/rating.d.ts +1 -65
- package/tokens/rating.js +16 -15
- package/tokens/scroll.d.ts +1 -91
- package/tokens/scroll.js +20 -22
- package/tokens/search.d.ts +1 -39
- package/tokens/search.js +7 -8
- package/tokens/searchModal.d.ts +1 -155
- package/tokens/searchModal.js +81 -58
- package/tokens/select.d.ts +1 -93
- package/tokens/select.js +39 -40
- package/tokens/shadow.d.ts +9 -8
- package/tokens/shadow.js +14 -16
- package/tokens/skeleton.d.ts +1 -68
- package/tokens/skeleton.js +20 -22
- package/tokens/slider.d.ts +1 -58
- package/tokens/slider.js +11 -11
- package/tokens/snackbar.d.ts +1 -156
- package/tokens/snackbar.js +83 -79
- package/tokens/spacing.d.ts +23 -0
- package/tokens/spacing.js +23 -0
- package/tokens/stepper.d.ts +1 -132
- package/tokens/stepper.js +52 -58
- package/tokens/switch.d.ts +1 -67
- package/tokens/switch.js +15 -15
- package/tokens/tabs.d.ts +1 -88
- package/tokens/tabs.js +33 -37
- package/tokens/toggle.d.ts +1 -9
- package/tokens/toggle.js +10 -11
- package/tokens/tooltip.d.ts +1 -61
- package/tokens/tooltip.js +22 -23
- package/tokens/typography.d.ts +1 -127
- package/tokens/typography.js +106 -90
- package/tokens/utils.d.ts +7 -2
- package/tokens/utils.js +27 -21
- package/types/button.d.ts +3 -11
- package/types/button.js +3 -4
- package/types/typography.d.ts +3 -0
- package/types/typography.js +3 -3
- package/utils/helpers.d.ts +8 -0
- package/utils/helpers.js +52 -40
- package/components/domainSpecific/Card/CartStyled.d.ts +0 -2
- package/components/domainSpecific/Card/CartStyled.js +0 -26
- package/components/templates/SkeletonSearch/SkeletonSearch.d.ts +0 -2
- package/components/templates/SkeletonSearch/SkeletonSearch.js +0 -30
- package/components/templates/SkeletonSearch/SkeletonSearch.types.d.ts +0 -6
- package/components/templates/SkeletonSearch/SkeletonSearchStyled.d.ts +0 -11
- package/components/templates/SkeletonSearch/SkeletonSearchStyled.js +0 -97
- package/components/templates/SkeletonSearch/constants.d.ts +0 -2
- package/components/templates/SkeletonSearch/constants.js +0 -5
- package/components/templates/SkeletonSearch/index.d.ts +0 -2
package/ai/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Core rule (must follow):
|
|
|
14
14
|
|
|
15
15
|
Single-source import (enforced):
|
|
16
16
|
|
|
17
|
-
- Correct: `import { Form, Input, Button, Typography, FlexContainer, Column, Card, Link } from 'gd-design-library';`
|
|
17
|
+
- Correct: `import { Form, Input, Button, Typography, Box, FlexContainer, Column, Card, Link } from 'gd-design-library';`
|
|
18
18
|
- Incorrect: `import Button from 'some-ui-lib';`, `import { Box } from '@mui/material';`, or using `./styles.css` for layout spacing.
|
|
19
19
|
|
|
20
20
|
How to use the AI helpers
|
|
@@ -48,12 +48,12 @@ Practical generation tips (what the model should output)
|
|
|
48
48
|
|
|
49
49
|
API guardrails from the schema/prompt (must-follow)
|
|
50
50
|
|
|
51
|
-
- Row/Column/Card.Row/Card.Column: use `isWrap` (boolean), NOT `wrap`.
|
|
51
|
+
- Row/Column/Card.Row/Card.Column: use `isWrap` (boolean), NOT `wrap`. **IMPORTANT: `isWrap` defaults to `true`**, use `isWrap={false}` to prevent wrapping.
|
|
52
|
+
- Icon: **ONLY use icon names from the available list**: cross, success, error, warning, info, dot, check, arrowDown, arrowRight, arrowLeft, arrowForward, keyboardArrowDown, keyboardArrowUp, mobileMenu, home, slash, localShipping, favorite, favoriteOutlined, shoppingBag, paymentCard, accountCircle, portrait, deleteOutlined, minus, plus, edit, search, filter, ruler, attachment, upload, folder, folderOpen, contentCopy, fileCopy, eye, volumeUp, send, chat, chatBubble, phone, processing, wifiTethering, star, starOutlined, thumbUp, thumbDown, thumbUpFilled, thumbDownFilled, errorOutline. Do NOT use icons not in this list (e.g., no "settings", "close", "add", "info" icons).
|
|
52
53
|
- Image and Card.Image: `width` and `height` props are numbers only (e.g., `width={96}`), not strings like `"96px"`.
|
|
53
54
|
- Card.Title and other Card subcomponents: `sizeVariant` only accepts `CardSizeVariant.Default` or `CardSizeVariant.Sm`.
|
|
54
55
|
- Counter and Card.Counter: use `initial` (not `value`) for the starting quantity; use `onCounterChange` as the change handler.
|
|
55
|
-
- Button `variant` must be one of `ButtonVariant.
|
|
56
|
-
- Button `color` must be one of `ButtonColorVariant.Primary | ButtonColorVariant.Secondary`.
|
|
56
|
+
- Button `variant` must be one of `ButtonVariant.Primary | ButtonVariant.Secondary | ButtonVariant.Tertiary | ButtonVariant.Outlined | ButtonVariant.Text | ButtonVariant.Inherit`.
|
|
57
57
|
|
|
58
58
|
Component catalog
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ Component catalog
|
|
|
63
63
|
- The list includes layout, forms, feedback, display, navigation, and theme provider/hook entries. Always consult these when unsure.
|
|
64
64
|
- Quick categories (from schema v1.0.0):
|
|
65
65
|
- Theme: useTheme.provider (ThemeProvider), useTheme.hook (useTheme)
|
|
66
|
-
- Layout: FlexContainer, Column, Row, Wrapper, Scroll, Separator
|
|
66
|
+
- Layout: Box, FlexContainer, Column, Row, Wrapper, Scroll, Separator
|
|
67
67
|
- Forms: Form, Input, Select, Search, Label, Textarea, Switch, Toggle, RadioGroup, Slider, InputFile, DragAndDropFiles
|
|
68
68
|
- Feedback & overlays: InlineNotification, Loader, Skeleton, Snackbar, SnackbarManager, Tooltip, Modal, Portal
|
|
69
69
|
- Navigation & structure: Breadcrumbs, Tabs, Stepper, List, Accordion, Link
|
|
@@ -79,11 +79,14 @@ Patterns from stories (grounded tips)
|
|
|
79
79
|
- Accessibility: use `ariaDescribedBy` to connect helper/error text; set `readOnly`/`disabled` as needed; `autoFocus` is available.
|
|
80
80
|
- Limits and events: `maxLength` to constrain length; `onCustomResize` receives `{ height, width }` when user resizes.
|
|
81
81
|
- Buttons:
|
|
82
|
-
- Variants: `ButtonVariant.
|
|
82
|
+
- Variants: `ButtonVariant.Primary | Secondary | Tertiary | Outlined | Text | Inherit`. For icon-only buttons, set `isIcon`.
|
|
83
|
+
- Rounded: Use `rounded` prop with values: `none | xs | sm | md | lg | xl | round`. Use `round` for circular icon buttons.
|
|
83
84
|
- Forms and labels:
|
|
84
85
|
- Always provide a visible label via the `label` prop or a separate `<Label htmlFor>` paired with the input `name/id`. Wrap controls with `<Form>` and handle submit via `onSubmit`.
|
|
85
86
|
- Layout composition:
|
|
87
|
+
- Use `Box` as the foundational layout primitive with built-in flexbox support and interaction states. Box provides `variant` (horizontal/vertical), `isBordered`, `isHighlighted`, and `withShadowHover` props.
|
|
86
88
|
- Use `FlexContainer` with `Column`/`Row` and `gap` to manage spacing. Avoid raw CSS margins except where necessary.
|
|
89
|
+
- Prefer `Box` over raw divs for all container needs to maintain design system consistency and leverage built-in theming.
|
|
87
90
|
- Communication icons:
|
|
88
91
|
- Use `Icon name="chat"` for general chat or messaging functionality indicators
|
|
89
92
|
- Apply `Icon name="chatBubble"` for individual message bubbles or conversation threads
|
|
@@ -140,7 +143,6 @@ Patterns from stories (grounded tips)
|
|
|
140
143
|
- Combine with emoji picker or formatting toolbar
|
|
141
144
|
- Use `rows` with `dynamicHeightAdjustment` for initial size with growth
|
|
142
145
|
- Apply with consistent padding and font size
|
|
143
|
-
- Set with wrap attribute control for long lines
|
|
144
146
|
- Use with keyboard shortcuts for power users
|
|
145
147
|
- Apply in `Card` components for comment sections
|
|
146
148
|
- Combine with mention/autocomplete functionality
|
|
@@ -155,12 +157,14 @@ Patterns from stories (grounded tips)
|
|
|
155
157
|
- Prefer `resize="vertical"` for longer text areas
|
|
156
158
|
- Provide `ariaDescribedBy` for helper text or character counters
|
|
157
159
|
- Cards and images:
|
|
160
|
+
- `Card` now accepts all `Box` props including `variant`, `isBordered`, `isHighlighted`, and `withShadowHover`.
|
|
161
|
+
- Use `Card withShadowHover` for interactive/clickable cards with elevation effect on hover. Combine with `backgroundColor="#fff"` and `cursor: "pointer"` for better visibility.
|
|
158
162
|
- `Card.Title` uses `sizeVariant={CardSizeVariant.Default | CardSizeVariant.Sm}` only. `Card.Image` and `Image` require numeric `width`/`height` props.
|
|
159
163
|
|
|
160
164
|
Example: Correct usage
|
|
161
165
|
|
|
162
166
|
```
|
|
163
|
-
import { Form, Input, Button, Typography, FlexContainer, Column, Card, Link } from 'gd-design-library';
|
|
167
|
+
import { Form, Input, Button, Typography, Box, FlexContainer, Column, Card, Link } from 'gd-design-library';
|
|
164
168
|
|
|
165
169
|
export function LoginCard() {
|
|
166
170
|
return (
|
package/ai/codegen.d.ts
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type AIIntent = 'login';
|
|
2
|
-
export interface GenerateOptions {
|
|
3
|
-
componentName?: string;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Returns a TSX string for a classic Login page composed with gd-design-library components.
|
|
7
|
-
* The output is intentionally framework-agnostic TSX that can be pasted into a React project.
|
|
8
|
-
*/
|
|
9
|
-
export declare function generateLoginPageTSX(options?: GenerateOptions): string;
|
|
10
|
-
export declare function generateUIFromIntent(intent: AIIntent, options?: GenerateOptions): string;
|
package/ai/index.d.ts
CHANGED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
component: {
|
|
3
|
+
name: string;
|
|
4
|
+
import: string;
|
|
5
|
+
description: string;
|
|
6
|
+
category: string;
|
|
7
|
+
complexity: string;
|
|
8
|
+
accessibility: string;
|
|
9
|
+
performance: string;
|
|
10
|
+
dependencies: string[];
|
|
11
|
+
peerDependencies: string[];
|
|
12
|
+
bundleSize: string;
|
|
13
|
+
browserSupport: string;
|
|
14
|
+
touchSupport: boolean;
|
|
15
|
+
keyboardSupport: boolean;
|
|
16
|
+
screenReaderSupport: boolean;
|
|
17
|
+
props: ({
|
|
18
|
+
name: string;
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
default: string;
|
|
22
|
+
enum: string[];
|
|
23
|
+
required: boolean;
|
|
24
|
+
} | {
|
|
25
|
+
name: string;
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
default: boolean;
|
|
29
|
+
enum?: undefined;
|
|
30
|
+
required?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
name: string;
|
|
33
|
+
type: string;
|
|
34
|
+
description: string;
|
|
35
|
+
required: boolean;
|
|
36
|
+
default?: undefined;
|
|
37
|
+
enum?: undefined;
|
|
38
|
+
} | {
|
|
39
|
+
name: string;
|
|
40
|
+
type: string;
|
|
41
|
+
description: string;
|
|
42
|
+
default: number;
|
|
43
|
+
enum?: undefined;
|
|
44
|
+
required?: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
name: string;
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
default?: undefined;
|
|
50
|
+
enum?: undefined;
|
|
51
|
+
required?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
type: string;
|
|
55
|
+
description: string;
|
|
56
|
+
default: {};
|
|
57
|
+
enum?: undefined;
|
|
58
|
+
required?: undefined;
|
|
59
|
+
})[];
|
|
60
|
+
quickStart: {
|
|
61
|
+
basic: string;
|
|
62
|
+
horizontal: string;
|
|
63
|
+
bordered: string;
|
|
64
|
+
interactive: string;
|
|
65
|
+
centered: string;
|
|
66
|
+
};
|
|
67
|
+
commonPatterns: {
|
|
68
|
+
'Card Container': {
|
|
69
|
+
code: string;
|
|
70
|
+
useCase: string;
|
|
71
|
+
};
|
|
72
|
+
'Horizontal Layout': {
|
|
73
|
+
code: string;
|
|
74
|
+
useCase: string;
|
|
75
|
+
};
|
|
76
|
+
'Vertical Stack': {
|
|
77
|
+
code: string;
|
|
78
|
+
useCase: string;
|
|
79
|
+
};
|
|
80
|
+
'Centered Content': {
|
|
81
|
+
code: string;
|
|
82
|
+
useCase: string;
|
|
83
|
+
};
|
|
84
|
+
'Dashboard Section': {
|
|
85
|
+
code: string;
|
|
86
|
+
useCase: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
examples: string[];
|
|
90
|
+
troubleshooting: {
|
|
91
|
+
'Children not aligning correctly': string;
|
|
92
|
+
'Hover effects not working': string;
|
|
93
|
+
'Border not showing': string;
|
|
94
|
+
'Gap not working': string;
|
|
95
|
+
'Focus ring not visible': string;
|
|
96
|
+
};
|
|
97
|
+
bestPractices: string[];
|
|
98
|
+
};
|
|
99
|
+
compositionTips: string[];
|
|
100
|
+
};
|
|
101
|
+
export default _default;
|
|
@@ -21,13 +21,6 @@ declare const _default: {
|
|
|
21
21
|
default: string;
|
|
22
22
|
enum: string[];
|
|
23
23
|
required?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
name: string;
|
|
26
|
-
type: string;
|
|
27
|
-
description: string;
|
|
28
|
-
default: string;
|
|
29
|
-
enum?: undefined;
|
|
30
|
-
required?: undefined;
|
|
31
24
|
} | {
|
|
32
25
|
name: string;
|
|
33
26
|
type: string;
|
|
@@ -68,6 +61,7 @@ declare const _default: {
|
|
|
68
61
|
basic: string;
|
|
69
62
|
primary: string;
|
|
70
63
|
secondary: string;
|
|
64
|
+
rounded: string;
|
|
71
65
|
icon: string;
|
|
72
66
|
withIcon: string;
|
|
73
67
|
};
|
|
@@ -55,22 +55,32 @@ declare const _default: {
|
|
|
55
55
|
bordered: string;
|
|
56
56
|
horizontal: string;
|
|
57
57
|
highlighted: string;
|
|
58
|
+
interactive: string;
|
|
59
|
+
combined: string;
|
|
58
60
|
scrollable: string;
|
|
59
61
|
};
|
|
60
62
|
commonPatterns: {
|
|
61
|
-
'
|
|
63
|
+
'E-commerce Product Card (Vertical)': {
|
|
62
64
|
code: string;
|
|
63
65
|
useCase: string;
|
|
64
66
|
};
|
|
65
|
-
'Media Card': {
|
|
67
|
+
'Horizontal Media Card': {
|
|
66
68
|
code: string;
|
|
67
69
|
useCase: string;
|
|
68
70
|
};
|
|
69
|
-
'
|
|
71
|
+
'Compact Interactive Card': {
|
|
70
72
|
code: string;
|
|
71
73
|
useCase: string;
|
|
72
74
|
};
|
|
73
|
-
'
|
|
75
|
+
'Simple Content Card': {
|
|
76
|
+
code: string;
|
|
77
|
+
useCase: string;
|
|
78
|
+
};
|
|
79
|
+
'Clickable Card with Shadow': {
|
|
80
|
+
code: string;
|
|
81
|
+
useCase: string;
|
|
82
|
+
};
|
|
83
|
+
'Combined Effects Card': {
|
|
74
84
|
code: string;
|
|
75
85
|
useCase: string;
|
|
76
86
|
};
|
|
@@ -82,6 +92,8 @@ declare const _default: {
|
|
|
82
92
|
'Inconsistent spacing': string;
|
|
83
93
|
'Horizontal layout not working': string;
|
|
84
94
|
'Border not showing': string;
|
|
95
|
+
'Shadow hover not visible': string;
|
|
96
|
+
'Hover effects not working': string;
|
|
85
97
|
};
|
|
86
98
|
bestPractices: string[];
|
|
87
99
|
};
|
package/assets/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Fira Sans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap";@import"https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;600;700&display=swap";*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:Fira Sans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:Fira Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as n } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as p } from "react";
|
|
4
|
+
import { COMPONENT_NAME as e } from "./constants.js";
|
|
5
|
+
import { BoxStyled as c } from "./BoxStyled.js";
|
|
6
|
+
import { TabIndex as x } from "../../../types/accesability.js";
|
|
7
|
+
import { useTheme as v } from "../../../hooks/useTheme/useTheme.js";
|
|
8
|
+
const w = p((r, t) => {
|
|
9
|
+
const {
|
|
10
|
+
variant: o = "vertical",
|
|
11
|
+
isBordered: i = !1,
|
|
12
|
+
children: a,
|
|
13
|
+
tabIndex: s = x.Default,
|
|
14
|
+
isHighlighted: d = !1,
|
|
15
|
+
withShadowHover: m = !1,
|
|
16
|
+
styles: f = {},
|
|
17
|
+
...l
|
|
18
|
+
} = r, {
|
|
19
|
+
theme: h
|
|
20
|
+
} = v();
|
|
21
|
+
return /* @__PURE__ */ n(c, { ref: t, tabIndex: s, "data-testid": e, theme: h, styles: f, $variant: o, $isBordered: i, $isHighlighted: d, $withShadowHover: m, ...l, children: a });
|
|
22
|
+
});
|
|
23
|
+
w.displayName = e;
|
|
24
|
+
export {
|
|
25
|
+
w as Box
|
|
26
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { BoxCssComponentProps, BoxCssComponentStyledProps } from '../..';
|
|
3
|
+
import { EnumOrPrimitive, TabIndex } from '../../../types';
|
|
4
|
+
export type BoxVariant = 'horizontal' | 'vertical';
|
|
5
|
+
export interface BoxProps extends Omit<BoxCssComponentProps, 'tabIndex'>, PropsWithChildren {
|
|
6
|
+
variant?: BoxVariant;
|
|
7
|
+
isBordered?: boolean;
|
|
8
|
+
isHighlighted?: boolean;
|
|
9
|
+
withShadowHover?: boolean;
|
|
10
|
+
tabIndex?: EnumOrPrimitive<TabIndex>;
|
|
11
|
+
}
|
|
12
|
+
export interface BoxStyledProps extends Omit<BoxCssComponentStyledProps, 'tabIndex'> {
|
|
13
|
+
$variant: BoxVariant;
|
|
14
|
+
$isBordered?: boolean;
|
|
15
|
+
$isHighlighted?: boolean;
|
|
16
|
+
$withShadowHover?: boolean;
|
|
17
|
+
tabIndex?: EnumOrPrimitive<TabIndex>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as x } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as y } from "react";
|
|
4
|
+
import { getBoxStyles as g, tokensHandler as S } from "../../../tokens/utils.js";
|
|
5
|
+
import { get as t } from "../../../utils/helpers.js";
|
|
6
|
+
const H = y((r, s) => {
|
|
7
|
+
const {
|
|
8
|
+
theme: {
|
|
9
|
+
box: d,
|
|
10
|
+
...i
|
|
11
|
+
} = {},
|
|
12
|
+
$variant: o,
|
|
13
|
+
$isBordered: l,
|
|
14
|
+
$isHighlighted: m,
|
|
15
|
+
$withShadowHover: n,
|
|
16
|
+
styles: h = {},
|
|
17
|
+
...f
|
|
18
|
+
} = r, {
|
|
19
|
+
boxStyles: p,
|
|
20
|
+
restProps: a
|
|
21
|
+
} = g(f), e = new Proxy(d || {}, S(i)), c = [t(e, "default", {}), t(e, [o, "default"], {}), n ? t(e, "shadowHover", {}) : {}, l ? t(e, [o, "bordered"], {}) : {}, m ? t(e, [o, "highlighted"], {}) : {}, p, h];
|
|
22
|
+
return /* @__PURE__ */ x("div", { css: c, ...a, ref: s });
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
H as BoxStyled
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const COMPONENT_NAME = "Box";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { BreadcrumbsProps } from './
|
|
1
|
+
import { BreadcrumbsProps } from './';
|
|
2
2
|
export declare const Breadcrumbs: import('react').ForwardRefExoticComponent<BreadcrumbsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreadcrumbsStyledProps } from './
|
|
1
|
+
import { BreadcrumbsStyledProps } from './';
|
|
2
2
|
export declare const BreadcrumbsStyled: import('react').ForwardRefExoticComponent<Omit<BreadcrumbsStyledProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
3
|
export declare const BreadcrumbItemStyled: (props: BreadcrumbsStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare const SeparatorStyled: (props: BreadcrumbsStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +1,67 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import { jsx as d } from "@emotion/react/jsx-runtime";
|
|
3
|
+
import { forwardRef as u } from "react";
|
|
4
|
+
import { getBoxStyles as S, tokensHandler as y } from "../../../tokens/utils.js";
|
|
5
|
+
import { get as m } from "../../../utils/helpers.js";
|
|
6
|
+
const x = u((e, t) => {
|
|
6
7
|
const {
|
|
7
8
|
theme: {
|
|
8
|
-
breadcrumbs:
|
|
9
|
+
breadcrumbs: s,
|
|
10
|
+
...r
|
|
9
11
|
} = {},
|
|
10
|
-
$bordered:
|
|
11
|
-
styles:
|
|
12
|
-
...
|
|
13
|
-
} = e,
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
$bordered: o = !1,
|
|
13
|
+
styles: n = {},
|
|
14
|
+
...c
|
|
15
|
+
} = e, {
|
|
16
|
+
boxStyles: l,
|
|
17
|
+
restProps: b
|
|
18
|
+
} = S(c), a = new Proxy(s || {}, y(r)), p = [m(a, "default", {}), o ? m(a, "bordered", {}) : {}, l, n];
|
|
19
|
+
return /* @__PURE__ */ d("div", { css: p, ...b, ref: t });
|
|
20
|
+
}), B = (e) => {
|
|
16
21
|
const {
|
|
17
22
|
theme: {
|
|
18
|
-
breadcrumbs:
|
|
23
|
+
breadcrumbs: t,
|
|
24
|
+
...s
|
|
19
25
|
} = {},
|
|
20
|
-
styles:
|
|
21
|
-
...
|
|
22
|
-
} = e,
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
},
|
|
26
|
+
styles: r = {},
|
|
27
|
+
...o
|
|
28
|
+
} = e, n = new Proxy(t || {}, y(s)), c = [m(n, "item", {}), r];
|
|
29
|
+
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
30
|
+
}, w = (e) => {
|
|
25
31
|
const {
|
|
26
32
|
theme: {
|
|
27
|
-
breadcrumbs:
|
|
33
|
+
breadcrumbs: t,
|
|
34
|
+
...s
|
|
28
35
|
} = {},
|
|
29
|
-
styles:
|
|
30
|
-
...
|
|
31
|
-
} = e,
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
},
|
|
36
|
+
styles: r = {},
|
|
37
|
+
...o
|
|
38
|
+
} = e, n = new Proxy(t || {}, y(s)), c = [m(n, "separator", {}), r];
|
|
39
|
+
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
40
|
+
}, v = (e) => {
|
|
34
41
|
const {
|
|
35
42
|
theme: {
|
|
36
|
-
breadcrumbs:
|
|
43
|
+
breadcrumbs: t,
|
|
44
|
+
...s
|
|
37
45
|
} = {},
|
|
38
|
-
styles:
|
|
39
|
-
...
|
|
40
|
-
} = e,
|
|
41
|
-
return /* @__PURE__ */
|
|
42
|
-
},
|
|
46
|
+
styles: r = {},
|
|
47
|
+
...o
|
|
48
|
+
} = e, n = new Proxy(t || {}, y(s)), c = [m(n, "item.itemStart", {}), r];
|
|
49
|
+
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
50
|
+
}, I = (e) => {
|
|
43
51
|
const {
|
|
44
52
|
theme: {
|
|
45
|
-
breadcrumbs:
|
|
53
|
+
breadcrumbs: t,
|
|
54
|
+
...s
|
|
46
55
|
} = {},
|
|
47
|
-
styles:
|
|
48
|
-
...
|
|
49
|
-
} = e,
|
|
50
|
-
return /* @__PURE__ */
|
|
56
|
+
styles: r = {},
|
|
57
|
+
...o
|
|
58
|
+
} = e, n = new Proxy(t || {}, y(s)), c = [m(n, "item.itemEnd", {}), r];
|
|
59
|
+
return /* @__PURE__ */ d("div", { css: c, ...o });
|
|
51
60
|
};
|
|
52
61
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
62
|
+
B as BreadcrumbItemStyled,
|
|
63
|
+
x as BreadcrumbsStyled,
|
|
64
|
+
I as ItemEndStyled,
|
|
65
|
+
v as ItemStartStyled,
|
|
66
|
+
w as SeparatorStyled
|
|
58
67
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ButtonProps } from './
|
|
1
|
+
import { ButtonProps } from './';
|
|
2
2
|
export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as $, jsx as
|
|
2
|
+
import { jsxs as $, jsx as n } from "@emotion/react/jsx-runtime";
|
|
3
3
|
import { forwardRef as x } from "react";
|
|
4
4
|
import { convertToInlineBoxStyles as b } from "../../../tokens/utils.js";
|
|
5
5
|
import { COMPONENT_NAME as t } from "./constants.js";
|
|
6
|
-
import { ButtonStyled as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { TabIndex as
|
|
10
|
-
const
|
|
6
|
+
import { ButtonStyled as T, StartIconStyled as E, ContentStyled as N, EndIconStyled as v } from "./ButtonStyled.js";
|
|
7
|
+
import { ButtonVariant as C, ButtonTypes as P, ButtonRole as j } from "../../../types/button.js";
|
|
8
|
+
import { useTheme as M } from "../../../hooks/useTheme/useTheme.js";
|
|
9
|
+
import { TabIndex as O } from "../../../types/accesability.js";
|
|
10
|
+
const R = x((s, m) => {
|
|
11
11
|
const {
|
|
12
|
-
theme:
|
|
13
|
-
} =
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
children:
|
|
12
|
+
theme: e
|
|
13
|
+
} = M(), {
|
|
14
|
+
variant: u = C.Primary,
|
|
15
|
+
rounded: c = "none",
|
|
16
|
+
children: o,
|
|
17
17
|
iconStart: r = null,
|
|
18
18
|
iconEnd: a = null,
|
|
19
|
-
type: f =
|
|
19
|
+
type: f = P.Button,
|
|
20
20
|
disabled: p = !1,
|
|
21
21
|
isIcon: y = !1,
|
|
22
|
-
ariaLabel:
|
|
23
|
-
ariaPressed:
|
|
24
|
-
role:
|
|
25
|
-
fullWidth:
|
|
26
|
-
tabIndex: I =
|
|
22
|
+
ariaLabel: i,
|
|
23
|
+
ariaPressed: l,
|
|
24
|
+
role: h = j.Button,
|
|
25
|
+
fullWidth: B = !1,
|
|
26
|
+
tabIndex: I = O.Default,
|
|
27
27
|
onClick: S,
|
|
28
28
|
...d
|
|
29
29
|
} = s;
|
|
30
|
-
return /* @__PURE__ */ $(
|
|
31
|
-
"aria-label":
|
|
32
|
-
} : {}, ...
|
|
33
|
-
"aria-pressed":
|
|
30
|
+
return /* @__PURE__ */ $(T, { ref: m, $variant: u, $isIcon: y, $fullWidth: B, $rounded: c, disabled: p, onClick: S, type: f, role: h, theme: e, tabIndex: I, "data-testid": t, ...b(d), ...i ? {
|
|
31
|
+
"aria-label": i
|
|
32
|
+
} : {}, ...l ? {
|
|
33
|
+
"aria-pressed": l
|
|
34
34
|
} : {}, ...d, children: [
|
|
35
|
-
r ? /* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
a ? /* @__PURE__ */
|
|
35
|
+
r ? /* @__PURE__ */ n(E, { theme: e, "data-testid": `${t}-icon-start`, children: r }) : null,
|
|
36
|
+
o ? /* @__PURE__ */ n(N, { theme: e, "data-testid": `${t}-content`, children: o }) : null,
|
|
37
|
+
a ? /* @__PURE__ */ n(v, { theme: e, "data-testid": `${t}-icon-end`, children: a }) : null
|
|
38
38
|
] });
|
|
39
39
|
});
|
|
40
|
-
|
|
40
|
+
R.displayName = t;
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
R as Button
|
|
43
43
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ButtonRole, ButtonTypes, ButtonVariant, EnumOrPrimitive } from '../../../types';
|
|
3
3
|
import { BoxCssComponentProps, BoxCssComponentStyledProps } from '../..';
|
|
4
4
|
export interface ButtonProps extends BoxCssComponentProps<HTMLButtonElement>, PropsWithChildren {
|
|
5
5
|
variant?: EnumOrPrimitive<ButtonVariant>;
|
|
6
|
-
|
|
6
|
+
rounded?: 'none' | 'default' | 'round' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
7
|
iconStart?: ReactNode;
|
|
8
8
|
iconEnd?: ReactNode;
|
|
9
9
|
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -11,16 +11,18 @@ export interface ButtonProps extends BoxCssComponentProps<HTMLButtonElement>, Pr
|
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
fullWidth?: boolean;
|
|
13
13
|
isIcon?: boolean;
|
|
14
|
-
ariaLabel?:
|
|
14
|
+
ariaLabel?: string;
|
|
15
15
|
ariaPressed?: boolean;
|
|
16
16
|
role?: ButtonRole | `${ButtonRole}`;
|
|
17
17
|
tabIndex?: number;
|
|
18
18
|
}
|
|
19
|
-
export interface
|
|
19
|
+
export interface ButtonCommonStyledProps extends BoxCssComponentStyledProps<HTMLButtonElement>, PropsWithChildren {
|
|
20
20
|
$variant?: EnumOrPrimitive<ButtonVariant>;
|
|
21
|
-
$color?: EnumOrPrimitive<ButtonColorVariant>;
|
|
22
21
|
$isIcon?: boolean;
|
|
23
22
|
$fullWidth?: boolean;
|
|
24
23
|
disabled?: boolean;
|
|
25
24
|
type?: ButtonTypes | `${ButtonTypes}`;
|
|
26
25
|
}
|
|
26
|
+
export interface ButtonStyledProps extends ButtonCommonStyledProps {
|
|
27
|
+
$rounded: 'none' | 'default' | 'round' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
28
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ButtonStyledProps } from './
|
|
1
|
+
import { ButtonCommonStyledProps, ButtonStyledProps } from './';
|
|
2
2
|
export declare const ButtonStyled: import('react').ForwardRefExoticComponent<Omit<ButtonStyledProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
3
|
-
export declare const ContentStyled: (props:
|
|
4
|
-
export declare const StartIconStyled: (props:
|
|
5
|
-
export declare const EndIconStyled: (props:
|
|
3
|
+
export declare const ContentStyled: (props: ButtonCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const StartIconStyled: (props: ButtonCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const EndIconStyled: (props: ButtonCommonStyledProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|