Skip to content

Commit 7e18ecc

Browse files
authored
feat(cli): simplify cli (#397)
1 parent b64b877 commit 7e18ecc

File tree

684 files changed

+1256
-3849
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

684 files changed

+1256
-3849
lines changed

.github/workflows/main.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ jobs:
1313
name: main
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- uses: oven-sh/setup-bun@v1
16+
- uses: actions/checkout@v4
17+
- uses: oven-sh/setup-bun@v2
1818

19+
- name: Install Dependencies
20+
run: bun install
21+
22+
- name: Typecheck
23+
run: bun run typecheck
24+
25+
- name: Lint
26+
run: bun run lint

bun.lockb

6.02 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Accordion from './primitives/accordion'
1+
export * as Accordion from './styled/accordion'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Alert from './primitives/alert'
1+
export * as Alert from './styled/alert'

components/react/src/components/ui/avatar.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { forwardRef } from 'react'
2-
import * as ArkAvatar from './primitives/avatar'
2+
import * as StyledAvatar from './styled/avatar'
33

4-
export interface AvatarProps extends ArkAvatar.RootProps {
4+
export interface AvatarProps extends StyledAvatar.RootProps {
55
name?: string
66
src?: string
77
}
@@ -10,10 +10,10 @@ export const Avatar = forwardRef<HTMLDivElement, AvatarProps>((props, ref) => {
1010
const { name, src, ...rootProps } = props
1111

1212
return (
13-
<ArkAvatar.Root ref={ref} {...rootProps}>
14-
<ArkAvatar.Fallback>{getInitials(name) || <UserIcon />}</ArkAvatar.Fallback>
15-
<ArkAvatar.Image src={src} alt={name} />
16-
</ArkAvatar.Root>
13+
<StyledAvatar.Root ref={ref} {...rootProps}>
14+
<StyledAvatar.Fallback>{getInitials(name) || <UserIcon />}</StyledAvatar.Fallback>
15+
<StyledAvatar.Image src={src} alt={name} />
16+
</StyledAvatar.Root>
1717
)
1818
})
1919

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Badge, type BadgeProps } from './primitives/badge'
1+
export { Badge, type BadgeProps } from './styled/badge'

components/react/src/components/ui/button.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { forwardRef } from 'react'
22
import { Center, styled } from 'styled-system/jsx'
3-
import { Button as StyledButton, type ButtonProps as StyledButtonProps } from './primitives/button'
43
import { Spinner } from './spinner'
4+
import { Button as StyledButton, type ButtonProps as StyledButtonProps } from './styled/button'
55

66
interface ButtonLoadingProps {
77
loading?: boolean
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Card from './primitives/card'
1+
export * as Card from './styled/card'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Carousel from './primitives/carousel'
1+
export * as Carousel from './styled/carousel'

components/react/src/components/ui/checkbox.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
import { forwardRef } from 'react'
2-
import * as ArkCheckbox from './primitives/checkbox'
2+
import * as StyledCheckbox from './styled/checkbox'
33

4-
export interface CheckboxProps extends ArkCheckbox.RootProps {}
4+
export interface CheckboxProps extends StyledCheckbox.RootProps {}
55

66
export const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {
77
const { children, ...rootProps } = props
88

99
return (
10-
<ArkCheckbox.Root ref={ref} {...rootProps}>
11-
<ArkCheckbox.Control>
12-
<ArkCheckbox.Indicator>
10+
<StyledCheckbox.Root ref={ref} {...rootProps}>
11+
<StyledCheckbox.Control>
12+
<StyledCheckbox.Indicator>
1313
<CheckIcon />
14-
</ArkCheckbox.Indicator>
15-
<ArkCheckbox.Indicator indeterminate>
14+
</StyledCheckbox.Indicator>
15+
<StyledCheckbox.Indicator indeterminate>
1616
<MinusIcon />
17-
</ArkCheckbox.Indicator>
18-
</ArkCheckbox.Control>
19-
{children && <ArkCheckbox.Label>{children}</ArkCheckbox.Label>}
20-
<ArkCheckbox.HiddenInput />
21-
</ArkCheckbox.Root>
17+
</StyledCheckbox.Indicator>
18+
</StyledCheckbox.Control>
19+
{children && <StyledCheckbox.Label>{children}</StyledCheckbox.Label>}
20+
<StyledCheckbox.HiddenInput />
21+
</StyledCheckbox.Root>
2222
)
2323
})
2424

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Clipboard from './primitives/clipboard'
1+
export * as Clipboard from './styled/clipboard'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Clipboard from './primitives/clipboard'
1+
export * as Clipboard from './styled/clipboard'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Code, type CodeProps } from './primitives/code'
1+
export { Code, type CodeProps } from './styled/code'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Collapsible from './primitives/collapsible'
1+
export * as Collapsible from './styled/collapsible'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as ColorPicker from './primitives/color-picker'
1+
export * as ColorPicker from './styled/color-picker'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Combobox from './primitives/combobox'
1+
export * as Combobox from './styled/combobox'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as DatePicker from './primitives/date-picker'
1+
export * as DatePicker from './styled/date-picker'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Dialog from './primitives/dialog'
1+
export * as Dialog from './styled/dialog'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Drawer from './primitives/drawer'
1+
export * as Drawer from './styled/drawer'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Editable from './primitives/editable'
1+
export * as Editable from './styled/editable'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Field from './primitives/field'
1+
export * as Field from './styled/field'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as FileUpload from './primitives/file-upload'
1+
export * as FileUpload from './styled/file-upload'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { FormLabel, type FormLabelProps } from './primitives/form-label'
1+
export { FormLabel, type FormLabelProps } from './styled/form-label'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Heading, type HeadingProps } from './primitives/heading'
1+
export { Heading, type HeadingProps } from './styled/heading'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as HoverCard from './primitives/hover-card'
1+
export * as HoverCard from './styled/hover-card'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { IconButton, type IconButtonProps } from './primitives/icon-button'
1+
export { IconButton, type IconButtonProps } from './styled/icon-button'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Icon, type IconProps } from './primitives/icon'
1+
export { Icon, type IconProps } from './styled/icon'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Input, type InputProps } from './primitives/input'
1+
export { Input, type InputProps } from './styled/input'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Kbd, type KbdProps } from './primitives/kbd'
1+
export { Kbd, type KbdProps } from './styled/kbd'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { Link, type LinkProps } from './primitives/link'
1+
export { Link, type LinkProps } from './styled/link'
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Menu from './primitives/menu'
1+
export * as Menu from './styled/menu'

components/react/src/components/ui/number-input.tsx

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import { forwardRef } from 'react'
2-
import * as ArkNumberInput from './primitives/number-input'
2+
import * as StyledNumberInput from './styled/number-input'
33

4-
export interface NumberInputProps extends ArkNumberInput.RootProps {}
4+
export interface NumberInputProps extends StyledNumberInput.RootProps {}
55

66
export const NumberInput = forwardRef<HTMLDivElement, NumberInputProps>((props, ref) => {
77
const { children, ...rootProps } = props
88
return (
9-
<ArkNumberInput.Root ref={ref} {...rootProps}>
10-
{children && <ArkNumberInput.Label>{children}</ArkNumberInput.Label>}
11-
<ArkNumberInput.Control>
12-
<ArkNumberInput.Input />
13-
<ArkNumberInput.IncrementTrigger>
9+
<StyledNumberInput.Root ref={ref} {...rootProps}>
10+
{children && <StyledNumberInput.Label>{children}</StyledNumberInput.Label>}
11+
<StyledNumberInput.Control>
12+
<StyledNumberInput.Input />
13+
<StyledNumberInput.IncrementTrigger>
1414
<ChevronUpIcon />
15-
</ArkNumberInput.IncrementTrigger>
16-
<ArkNumberInput.DecrementTrigger>
15+
</StyledNumberInput.IncrementTrigger>
16+
<StyledNumberInput.DecrementTrigger>
1717
<ChevronDownIcon />
18-
</ArkNumberInput.DecrementTrigger>
19-
</ArkNumberInput.Control>
20-
</ArkNumberInput.Root>
18+
</StyledNumberInput.DecrementTrigger>
19+
</StyledNumberInput.Control>
20+
</StyledNumberInput.Root>
2121
)
2222
})
2323

components/react/src/components/ui/pagination.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,39 @@
22
import { forwardRef } from 'react'
33
import { Button } from './button'
44
import { IconButton } from './icon-button'
5-
import * as ArkPagination from './primitives/pagination'
5+
import * as StyledPagination from './styled/pagination'
66

7-
export interface PaginationProps extends ArkPagination.RootProps {}
7+
export interface PaginationProps extends StyledPagination.RootProps {}
88

99
export const Pagination = forwardRef<HTMLElement, PaginationProps>((props, ref) => {
1010
return (
11-
<ArkPagination.Root ref={ref} {...props}>
12-
<ArkPagination.PrevTrigger asChild>
11+
<StyledPagination.Root ref={ref} {...props}>
12+
<StyledPagination.PrevTrigger asChild>
1313
<IconButton variant="ghost" aria-label="Next Page">
1414
<ChevronLeftIcon />
1515
</IconButton>
16-
</ArkPagination.PrevTrigger>
17-
<ArkPagination.Context>
16+
</StyledPagination.PrevTrigger>
17+
<StyledPagination.Context>
1818
{(pagination) =>
1919
pagination.pages.map((page, index) =>
2020
page.type === 'page' ? (
21-
<ArkPagination.Item key={index} {...page} asChild>
21+
<StyledPagination.Item key={index} {...page} asChild>
2222
<Button variant="outline">{page.value}</Button>
23-
</ArkPagination.Item>
23+
</StyledPagination.Item>
2424
) : (
25-
<ArkPagination.Ellipsis key={index} index={index}>
25+
<StyledPagination.Ellipsis key={index} index={index}>
2626
&#8230;
27-
</ArkPagination.Ellipsis>
27+
</StyledPagination.Ellipsis>
2828
),
2929
)
3030
}
31-
</ArkPagination.Context>
32-
<ArkPagination.NextTrigger asChild>
31+
</StyledPagination.Context>
32+
<StyledPagination.NextTrigger asChild>
3333
<IconButton variant="ghost" aria-label="Next Page">
3434
<ChevronRightIcon />
3535
</IconButton>
36-
</ArkPagination.NextTrigger>
37-
</ArkPagination.Root>
36+
</StyledPagination.NextTrigger>
37+
</StyledPagination.Root>
3838
)
3939
})
4040

components/react/src/components/ui/pin-input.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { forwardRef } from 'react'
22
import { Input } from './input'
3-
import * as ArkPinInput from './primitives/pin-input'
3+
import * as StyledPinInput from './styled/pin-input'
44

5-
export interface PinInputProps extends ArkPinInput.RootProps {
5+
export interface PinInputProps extends StyledPinInput.RootProps {
66
/**
77
* The number of inputs to render.
88
* @default 4
@@ -14,17 +14,17 @@ export const PinInput = forwardRef<HTMLDivElement, PinInputProps>((props, ref) =
1414
const { children, length = 4, ...rootProps } = props
1515

1616
return (
17-
<ArkPinInput.Root ref={ref} {...rootProps}>
18-
{children && <ArkPinInput.Label>{children}</ArkPinInput.Label>}
19-
<ArkPinInput.Control>
17+
<StyledPinInput.Root ref={ref} {...rootProps}>
18+
{children && <StyledPinInput.Label>{children}</StyledPinInput.Label>}
19+
<StyledPinInput.Control>
2020
{Array.from({ length }, (_, index) => index).map((id, index) => (
21-
<ArkPinInput.Input key={id} index={index} asChild>
21+
<StyledPinInput.Input key={id} index={index} asChild>
2222
<Input size={rootProps.size} />
23-
</ArkPinInput.Input>
23+
</StyledPinInput.Input>
2424
))}
25-
</ArkPinInput.Control>
26-
<ArkPinInput.HiddenInput />
27-
</ArkPinInput.Root>
25+
</StyledPinInput.Control>
26+
<StyledPinInput.HiddenInput />
27+
</StyledPinInput.Root>
2828
)
2929
})
3030

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Popover from './primitives/popover'
1+
export * as Popover from './styled/popover'

components/react/src/components/ui/progress.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { forwardRef } from 'react'
2-
import * as ArkProgress from './primitives/progress'
2+
import * as StyledProgress from './styled/progress'
33

4-
export interface ProgressProps extends ArkProgress.RootProps {
4+
export interface ProgressProps extends StyledProgress.RootProps {
55
/**
66
* The type of progress to render.
77
* @default linear
@@ -13,22 +13,22 @@ export const Progress = forwardRef<HTMLDivElement, ProgressProps>((props, ref) =
1313
const { children, type = 'linear', ...rootProps } = props
1414

1515
return (
16-
<ArkProgress.Root ref={ref} {...rootProps}>
17-
{children && <ArkProgress.Label>{children}</ArkProgress.Label>}
16+
<StyledProgress.Root ref={ref} {...rootProps}>
17+
{children && <StyledProgress.Label>{children}</StyledProgress.Label>}
1818
{type === 'linear' && (
19-
<ArkProgress.Track>
20-
<ArkProgress.Range />
21-
</ArkProgress.Track>
19+
<StyledProgress.Track>
20+
<StyledProgress.Range />
21+
</StyledProgress.Track>
2222
)}
2323
{type === 'circular' && (
24-
<ArkProgress.Circle>
25-
<ArkProgress.CircleTrack />
26-
<ArkProgress.CircleRange />
27-
<ArkProgress.ValueText />
28-
</ArkProgress.Circle>
24+
<StyledProgress.Circle>
25+
<StyledProgress.CircleTrack />
26+
<StyledProgress.CircleRange />
27+
<StyledProgress.ValueText />
28+
</StyledProgress.Circle>
2929
)}
30-
<ArkProgress.ValueText />
31-
</ArkProgress.Root>
30+
<StyledProgress.ValueText />
31+
</StyledProgress.Root>
3232
)
3333
})
3434

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as QrCode from './primitives/qr-code'
1+
export * as QrCode from './styled/qr-code'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as RadioButtonGroup from './primitives/radio-button-group'
1+
export * as RadioButtonGroup from './styled/radio-button-group'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as RadioGroup from './primitives/radio-group'
1+
export * as RadioGroup from './styled/radio-group'

components/react/src/components/ui/rating-group.tsx

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
'use client'
22
import { forwardRef } from 'react'
3-
import * as ArkRatingGroup from './primitives/rating-group'
3+
import * as StyledRatingGroup from './styled/rating-group'
44

5-
export interface RatingGroupProps extends ArkRatingGroup.RootProps {}
5+
export interface RatingGroupProps extends StyledRatingGroup.RootProps {}
66

77
export const RatingGroup = forwardRef<HTMLDivElement, RatingGroupProps>((props, ref) => {
88
const { children, ...rootProps } = props
99
return (
10-
<ArkRatingGroup.Root ref={ref} {...rootProps}>
11-
{children && <ArkRatingGroup.Label>{children}</ArkRatingGroup.Label>}
12-
<ArkRatingGroup.Control>
13-
<ArkRatingGroup.Context>
10+
<StyledRatingGroup.Root ref={ref} {...rootProps}>
11+
{children && <StyledRatingGroup.Label>{children}</StyledRatingGroup.Label>}
12+
<StyledRatingGroup.Control>
13+
<StyledRatingGroup.Context>
1414
{({ items }) =>
1515
items.map((index) => (
16-
<ArkRatingGroup.Item key={index} index={index}>
17-
<ArkRatingGroup.ItemContext>
16+
<StyledRatingGroup.Item key={index} index={index}>
17+
<StyledRatingGroup.ItemContext>
1818
{(item) => <StarIcon isHalf={item.half} />}
19-
</ArkRatingGroup.ItemContext>
20-
</ArkRatingGroup.Item>
19+
</StyledRatingGroup.ItemContext>
20+
</StyledRatingGroup.Item>
2121
))
2222
}
23-
</ArkRatingGroup.Context>
24-
</ArkRatingGroup.Control>
25-
<ArkRatingGroup.HiddenInput />
26-
</ArkRatingGroup.Root>
23+
</StyledRatingGroup.Context>
24+
</StyledRatingGroup.Control>
25+
<StyledRatingGroup.HiddenInput />
26+
</StyledRatingGroup.Root>
2727
)
2828
})
2929

Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as SegmentGroup from './primitives/segment-group'
1+
export * as SegmentGroup from './styled/segment-group'
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * as Select from './primitives/select'
1+
export * as Select from './styled/select'

0 commit comments

Comments
 (0)