@jongh/cli 1.1.0 → 1.2.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.
Files changed (36) hide show
  1. package/dist/index.cjs +7 -0
  2. package/dist/index.js +6 -1
  3. package/package.json +26 -5
  4. package/.lintstagedrc.json +0 -4
  5. package/CHANGELOG.md +0 -7
  6. package/dist/components/Accordion/Accordion.tsx +0 -281
  7. package/dist/components/Accordion/index.tsx +0 -37
  8. package/dist/components/Accordion/useAccordionHeight.ts +0 -25
  9. package/dist/components/Avatar/Avatar.tsx +0 -18
  10. package/dist/components/Avatar/useAvatar.ts +0 -73
  11. package/dist/components/Button/index.tsx +0 -32
  12. package/dist/components/Primitive/index.tsx +0 -58
  13. package/dist/components/RovingIndex/RovingItem.tsx +0 -47
  14. package/dist/components/RovingIndex/RovingTabIndexRoot.tsx +0 -92
  15. package/dist/components/RovingIndex/index.ts +0 -3
  16. package/dist/components/RovingIndex/useRovingTabIndex.tsx +0 -76
  17. package/dist/components/Select/index.tsx +0 -231
  18. package/dist/components/Slider/index.tsx +0 -141
  19. package/dist/components/Slider/style.ts +0 -29
  20. package/dist/components/Tabs/Tab.tsx +0 -39
  21. package/dist/components/Tabs/TabContent.tsx +0 -62
  22. package/dist/components/Tabs/TabIndicator.tsx +0 -6
  23. package/dist/components/Tabs/TabList.tsx +0 -117
  24. package/dist/components/Tabs/index.ts +0 -43
  25. package/dist/components/Tabs/useRovingTabIndex.tsx +0 -171
  26. package/dist/components/Tabs/useTabContext.ts +0 -11
  27. package/dist/components/TagButton/TagButton.tsx +0 -75
  28. package/dist/components/TagButton/style.ts +0 -35
  29. package/dist/components/core/Polymorphic/index.ts +0 -26
  30. package/dist/components/index.ts +0 -5
  31. package/dist/index.d.ts +0 -1
  32. package/src/copyComponent.ts +0 -29
  33. package/src/getConfig.ts +0 -56
  34. package/src/index.ts +0 -46
  35. package/tsconfig.json +0 -14
  36. package/tsup.config.ts +0 -14
@@ -1,58 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- //radix ui Primitive를 참고하여 작성한 코드
3
- import * as React from "react"
4
- import { Slot } from "@radix-ui/react-slot"
5
-
6
- const NODES = [
7
- "a",
8
- "button",
9
- "div",
10
- "form",
11
- "h2",
12
- "h3",
13
- "img",
14
- "input",
15
- "label",
16
- "li",
17
- "nav",
18
- "ol",
19
- "p",
20
- "span",
21
- "svg",
22
- "ul",
23
- ] as const
24
-
25
- type Primitives = {
26
- [E in (typeof NODES)[number]]: PrimitiveForwardRefComponent<E>
27
- }
28
- type PrimitivePropsWithRef<E extends React.ElementType> =
29
- React.ComponentPropsWithRef<E> & {
30
- asChild?: boolean
31
- }
32
-
33
- interface PrimitiveForwardRefComponent<E extends React.ElementType>
34
- extends React.ForwardRefExoticComponent<PrimitivePropsWithRef<E>> {}
35
-
36
- /* -------------------------------------------------------------------------------------------------
37
- * Primitive
38
- * -----------------------------------------------------------------------------------------------*/
39
-
40
- const Primitive = NODES.reduce((primitive, node) => {
41
- const Node = React.forwardRef(
42
- (props: PrimitivePropsWithRef<typeof node>, forwardedRef: any) => {
43
- const { asChild, ...primitiveProps } = props
44
- const Comp: any = asChild ? Slot : node
45
-
46
- return <Comp {...primitiveProps} ref={forwardedRef} />
47
- },
48
- )
49
-
50
- Node.displayName = `Primitive.${node}`
51
-
52
- return { ...primitive, [node]: Node }
53
- }, {} as Primitives)
54
-
55
- const Root = Primitive
56
-
57
- export { Primitive, Root }
58
- export type { PrimitivePropsWithRef }
@@ -1,47 +0,0 @@
1
- import type { ReactElement } from "react"
2
- import { useRovingTabIndex } from "./useRovingTabIndex"
3
- import { Slot } from "@radix-ui/react-slot"
4
- import isHotkey from "is-hotkey"
5
- import {
6
- getNextFocusableId,
7
- getPrevFocusableId,
8
- } from "../../utils/getFocusableId"
9
-
10
- export const RovingItem = ({
11
- value,
12
- children,
13
- }: {
14
- value: string
15
- children: ReactElement
16
- }) => {
17
- const { getOrderedItems, getRovingProps, dir } = useRovingTabIndex(value)
18
-
19
- return (
20
- <Slot
21
- {...getRovingProps<"button">({
22
- onKeyDown: (e) => {
23
- const items = getOrderedItems()
24
- let nextItem
25
- if (dir === "horizontal") {
26
- if (isHotkey("right", e)) {
27
- nextItem = getNextFocusableId(items, value)
28
- } else if (isHotkey("left", e)) {
29
- nextItem = getPrevFocusableId(items, value)
30
- }
31
- nextItem?.element.focus()
32
- }
33
- if (dir === "vertical") {
34
- if (e.key === "ArrowDown") {
35
- nextItem = getNextFocusableId(items, value)
36
- } else if (e.key === "ArrowUp") {
37
- nextItem = getPrevFocusableId(items, value)
38
- }
39
- nextItem?.element.focus()
40
- }
41
- },
42
- })}
43
- >
44
- {children}
45
- </Slot>
46
- )
47
- }
@@ -1,92 +0,0 @@
1
- import { ReactNode, useCallback, useRef, useState } from "react"
2
- import { useControlledState } from "../../hooks/useControllableState"
3
- import { RovingTabIndexProvider } from "./useRovingTabIndex"
4
- import { Slot } from "@radix-ui/react-slot"
5
-
6
- export const NODE_SELECTOR = "data-roving-tabindex-node"
7
- const ROOT_SELECTOR = "data-roving-tabindex-root"
8
- const NOT_FOCUSABLE_SELECTOR = "data-roving-tabindex-not-focusable"
9
- const SELECTOR_ACTIVE = `:where([${NODE_SELECTOR}=true]):not(:where([${NOT_FOCUSABLE_SELECTOR}=true] *))`
10
-
11
- type RovingTabIndexRootBaseProps = {
12
- children: ReactNode | ReactNode[]
13
- active?: string
14
- setActive?: (value: string) => void
15
- asChild?: boolean
16
- dir?: "horizontal" | "vertical"
17
- }
18
-
19
- type RovingTabIndexRootProps = RovingTabIndexRootBaseProps
20
-
21
- function onFocusFirst(candidates: HTMLElement[]) {
22
- const previousFocus = document.activeElement
23
- while (document.activeElement === previousFocus && candidates.length > 0) {
24
- candidates.shift()?.focus()
25
- }
26
- }
27
-
28
- export const RovingTabIndexRoot = ({
29
- children,
30
- active,
31
- setActive,
32
- asChild,
33
- dir = "horizontal",
34
- ...props
35
- }: RovingTabIndexRootProps) => {
36
- const [isShiftTabbing, setIsShiftTabbing] = useState(false)
37
-
38
- const [value = null, setValue] = useControlledState({
39
- prop: active,
40
- onChange: setActive,
41
- })
42
- const rootRef = useRef<HTMLDivElement | null>(null)
43
- const elementsRef = useRef<Map<string, HTMLElement>>(new Map())
44
- const getOrderedItems = useCallback(() => {
45
- if (!rootRef.current) return []
46
- const activeElements = Array.from(
47
- rootRef.current.querySelectorAll(SELECTOR_ACTIVE),
48
- )
49
-
50
- return Array.from(elementsRef.current)
51
- .sort(
52
- (a, b) => activeElements.indexOf(a[1]) - activeElements.indexOf(b[1]),
53
- )
54
- .map(([value, element]) => ({ value, element }))
55
- }, [])
56
-
57
- return (
58
- <RovingTabIndexProvider
59
- setFocusableId={(value: string) => {
60
- setValue(value)
61
- }}
62
- onShiftTab={() => {
63
- setIsShiftTabbing(true)
64
- }}
65
- currentFocusedValue={value}
66
- getOrderedItems={getOrderedItems}
67
- elements={elementsRef}
68
- dir={dir}
69
- >
70
- <Slot
71
- {...{ [ROOT_SELECTOR]: true }}
72
- tabIndex={isShiftTabbing ? -1 : 0}
73
- onFocus={(e) => {
74
- if (e.target !== e.currentTarget) return
75
- if (isShiftTabbing) return
76
- const orderedItems = getOrderedItems()
77
- if (orderedItems.length === 0) return
78
- const candidates = [
79
- elementsRef.current.get(value ?? ""),
80
- ...orderedItems.map((i) => i.element),
81
- ].filter((element): element is HTMLElement => element != null)
82
- onFocusFirst(candidates)
83
- }}
84
- onBlur={() => setIsShiftTabbing(false)}
85
- ref={rootRef}
86
- {...props}
87
- >
88
- {children}
89
- </Slot>
90
- </RovingTabIndexProvider>
91
- )
92
- }
@@ -1,3 +0,0 @@
1
- export * from "./RovingItem"
2
- export * from "./useRovingTabIndex"
3
- export * from "./RovingTabIndexRoot"
@@ -1,76 +0,0 @@
1
- import {
2
- FocusEvent,
3
- MouseEvent,
4
- KeyboardEvent,
5
- ComponentPropsWithoutRef,
6
- ElementType,
7
- MutableRefObject,
8
- } from "react"
9
- import { createContext } from "../../hooks/createContext"
10
- import { NODE_SELECTOR } from "./RovingTabIndexRoot"
11
-
12
- export type RovingTabIndexItem = {
13
- value: string
14
- element: HTMLElement
15
- }
16
-
17
- type RovingTabIndexContext = {
18
- currentFocusedValue: string | null
19
- setFocusableId: (id: string) => void
20
- onShiftTab: () => void
21
- getOrderedItems: () => RovingTabIndexItem[]
22
- elements: MutableRefObject<Map<string, HTMLElement>>
23
- dir?: "horizontal" | "vertical"
24
- }
25
-
26
- export const [RovingTabIndexProvider, useRovingTabIndexContext] =
27
- createContext<RovingTabIndexContext>("rovingTabIndex")
28
-
29
- export const useRovingTabIndex = (value: string) => {
30
- const {
31
- currentFocusedValue,
32
- setFocusableId,
33
- onShiftTab,
34
- getOrderedItems,
35
- elements,
36
- dir,
37
- } = useRovingTabIndexContext("rovingTabIndex")
38
-
39
- return {
40
- getOrderedItems,
41
- dir,
42
- isFocusable: currentFocusedValue === value,
43
- getRovingProps: <T extends ElementType>(
44
- props?: ComponentPropsWithoutRef<T>,
45
- ) => ({
46
- ...props,
47
- ref: (element: HTMLElement | null) => {
48
- if (element) {
49
- elements.current.set(value, element)
50
- } else {
51
- elements.current.delete(value)
52
- }
53
- },
54
- onMouseDown: (e: MouseEvent) => {
55
- props?.onMouseDown?.(e)
56
- if (e.target !== e.currentTarget) return
57
- setFocusableId(value)
58
- },
59
- onKeyDown: (e: KeyboardEvent) => {
60
- props?.onKeyDown?.(e)
61
- if (e.target !== e.currentTarget) return
62
- if (e.shiftKey && e.key === "Tab") {
63
- onShiftTab()
64
- return
65
- }
66
- },
67
- onFocus: (e: FocusEvent) => {
68
- props?.onFocus?.(e)
69
- if (e.target !== e.currentTarget) return
70
- setFocusableId(value)
71
- },
72
- [NODE_SELECTOR]: true,
73
- tabIndex: currentFocusedValue === value ? 0 : -1,
74
- }),
75
- }
76
- }
@@ -1,231 +0,0 @@
1
- import {
2
- forwardRef,
3
- type ComponentPropsWithoutRef,
4
- type CSSProperties,
5
- type ReactNode,
6
- } from "react"
7
- import { createContext } from "../../hooks/createContext"
8
- import { useControlledState } from "../../hooks/useControllableState"
9
- import { Slot } from "@radix-ui/react-slot"
10
- import { RovingTabIndexRoot } from "../RovingIndex/RovingTabIndexRoot"
11
- import {
12
- autoUpdate,
13
- flip,
14
- offset,
15
- size,
16
- useFloating,
17
- } from "@floating-ui/react-dom"
18
- import {
19
- useRovingTabIndex,
20
- useRovingTabIndexContext,
21
- } from "../RovingIndex/useRovingTabIndex"
22
- import {
23
- getNextFocusableId,
24
- getPrevFocusableId,
25
- } from "../../utils/getFocusableId"
26
- import { composeRefs } from "../../hooks/useComposedRefs"
27
- import { Primitive } from "src/components/Primitive"
28
-
29
- const CONTEXT_NAME = "select"
30
-
31
- interface SelectContext {
32
- isOpen: boolean //option들의 열림/닫힘 여부
33
- onOpenChange: (Open: boolean) => void
34
- selected: string | null //option들 중 선택된 value
35
- onSelectChange: (value: string) => void
36
- floatingStyles?: CSSProperties
37
- setFloating: (node: HTMLElement) => void
38
- setReference: (node: HTMLElement | null) => void
39
- dir: "horizontal" | "vertical"
40
- }
41
-
42
- const [SelectContextProvider, useSelectContext] =
43
- createContext<SelectContext>(CONTEXT_NAME)
44
-
45
- export interface SelectProps extends ComponentPropsWithoutRef<"div"> {
46
- isOpen?: boolean
47
- onOpenChange?: (open: boolean) => void
48
- defaultOpen?: boolean
49
- selected?: string
50
- onSelectChange?: (value: string) => void
51
- defaultValue?: string
52
- children: ReactNode
53
- dir?: "horizontal" | "vertical"
54
- }
55
-
56
- export const SelectRoot = ({
57
- isOpen,
58
- onOpenChange,
59
- defaultOpen,
60
- selected,
61
- onSelectChange,
62
- defaultValue,
63
- dir = "vertical",
64
- children,
65
- ...props
66
- }: SelectProps) => {
67
- const [open = false, setIsOpen] = useControlledState({
68
- prop: isOpen,
69
- defaultProp: defaultOpen,
70
- onChange: onOpenChange,
71
- })
72
-
73
- const [selectedValue, setSelectedValue] = useControlledState({
74
- prop: selected,
75
- defaultProp: defaultValue,
76
- onChange: onSelectChange,
77
- })
78
-
79
- const { refs, floatingStyles } = useFloating({
80
- strategy: "absolute",
81
- open: open,
82
- middleware: [
83
- offset(), //trigger와 얼마나 떨어져있는지
84
- flip(), //화면 밖으로 나가지 않도록
85
- size({
86
- apply({ elements, availableHeight }) {
87
- elements.floating.style.maxHeight = `${availableHeight}px`
88
- },
89
- }),
90
- ],
91
- whileElementsMounted: autoUpdate,
92
- })
93
-
94
- return (
95
- <SelectContextProvider
96
- isOpen={open}
97
- onOpenChange={setIsOpen}
98
- selected={selectedValue || null}
99
- onSelectChange={setSelectedValue}
100
- setFloating={refs.setFloating}
101
- setReference={refs.setReference}
102
- dir={dir}
103
- floatingStyles={floatingStyles}
104
- >
105
- <RovingTabIndexRoot active={selectedValue} dir="vertical">
106
- <div tabIndex={-1} {...props}>
107
- {children}
108
- </div>
109
- </RovingTabIndexRoot>
110
- </SelectContextProvider>
111
- )
112
- }
113
-
114
- export interface SelectTriggerProps
115
- extends ComponentPropsWithoutRef<typeof Primitive.button> {
116
- placeholder?: string
117
- }
118
-
119
- export const SelectTrigger = forwardRef<
120
- React.ElementRef<typeof Primitive.button>,
121
- SelectTriggerProps
122
- >((props, ref) => {
123
- const { getOrderedItems } = useRovingTabIndexContext("rovingTabIndex")
124
-
125
- const { setReference, onOpenChange, isOpen, selected } =
126
- useSelectContext(CONTEXT_NAME)
127
-
128
- const displayText = selected || props.placeholder || ""
129
-
130
- return (
131
- <Primitive.button
132
- ref={composeRefs((node) => setReference(node), ref)}
133
- onClick={(e) => {
134
- e.preventDefault()
135
- onOpenChange(!isOpen)
136
- props?.onClick?.(e)
137
- }}
138
- onKeyDown={(e) => {
139
- setTimeout(() => {
140
- if (e.key === "ArrowDown") {
141
- onOpenChange(true)
142
- getOrderedItems()[0]?.element.focus()
143
- }
144
- })
145
- }}
146
- {...props}
147
- >
148
- <span>{displayText}</span>
149
- </Primitive.button>
150
- )
151
- })
152
- export interface SelectPortalProps {
153
- children: ReactNode
154
- }
155
- export const SelectPortal = ({ children, ...props }: SelectPortalProps) => {
156
- const { isOpen, floatingStyles, setFloating } = useSelectContext(CONTEXT_NAME)
157
-
158
- if (!isOpen) {
159
- return null
160
- }
161
-
162
- return (
163
- <Slot
164
- style={floatingStyles}
165
- ref={(node) => {
166
- if (node instanceof HTMLElement) {
167
- setFloating(node)
168
- }
169
- }}
170
- {...props}
171
- >
172
- {children}
173
- </Slot>
174
- )
175
- }
176
-
177
- export interface SelectItemProps
178
- extends ComponentPropsWithoutRef<typeof Primitive.li> {
179
- value: string
180
- }
181
- export const SelectItem = forwardRef<
182
- React.ElementRef<typeof Primitive.li>,
183
- SelectItemProps
184
- >(({ children, value, asChild, ...props }, ref) => {
185
- const { onSelectChange, onOpenChange, dir } = useSelectContext(CONTEXT_NAME)
186
- const { getOrderedItems, getRovingProps } = useRovingTabIndex(value)
187
-
188
- return (
189
- <Primitive.li
190
- {...getRovingProps<typeof Primitive.li>({
191
- onClick: () => {
192
- onSelectChange?.(value)
193
- onOpenChange(false)
194
- },
195
- onKeyDown: (e) => {
196
- if (e.key === "Enter") {
197
- onSelectChange?.(value)
198
- onOpenChange(false)
199
- }
200
- const items = getOrderedItems()
201
- let nextItem
202
- if (dir === "horizontal") {
203
- if (e.key === "ArrowRight") {
204
- nextItem = getNextFocusableId(items, value)
205
- } else if (e.key === "ArrowLeft") {
206
- nextItem = getPrevFocusableId(items, value)
207
- }
208
- }
209
- if (dir === "vertical") {
210
- if (e.key === "ArrowDown") {
211
- nextItem = getNextFocusableId(items, value)
212
- } else if (e.key === "ArrowUp") {
213
- nextItem = getPrevFocusableId(items, value)
214
- }
215
- }
216
- nextItem?.element.focus()
217
- },
218
- })}
219
- ref={ref}
220
- {...props}
221
- >
222
- {children}
223
- </Primitive.li>
224
- )
225
- })
226
-
227
- export const Select = Object.assign(SelectRoot, {
228
- Trigger: SelectTrigger,
229
- Portal: SelectPortal,
230
- Item: SelectItem,
231
- })
@@ -1,141 +0,0 @@
1
- import { useState, type ComponentPropsWithoutRef } from "react"
2
- import { useControlledState } from "../../hooks/useControllableState"
3
- import { createContext } from "../../hooks/createContext"
4
- //TODO: props type 관련 정리 및 event composing 필요
5
- const [SliderProvider, useSliderContext] = createContext<{
6
- min: number
7
- max: number
8
- value: number
9
- onChange: (value: number) => void
10
- isDragging: boolean
11
- onPointerDown: (e: React.PointerEvent) => void
12
- onPointerMove: (e: React.PointerEvent) => void
13
- onPointerUp: (e: React.PointerEvent) => void
14
- }>("Slider")
15
-
16
- type SliderRootProps = {
17
- min: number
18
- max: number
19
- value: number
20
- defaultValue?: number
21
- onChange: (value: number) => void
22
- children: React.ReactNode
23
- }
24
-
25
- const getPercentage = (value: number, min: number, max: number) =>
26
- ((value - min) / (max - min)) * 100
27
-
28
- const SliderRoot = ({
29
- min = 0,
30
- max = 100,
31
- value,
32
- onChange,
33
- defaultValue,
34
- children,
35
- ...props
36
- }: SliderRootProps) => {
37
- const [isDragging, setIsDragging] = useState(false)
38
-
39
- const [innerValue = 0, setValue] = useControlledState({
40
- prop: value,
41
- defaultProp: defaultValue || min,
42
- onChange,
43
- })
44
-
45
- const handlePointerDown = (e: React.PointerEvent) => {
46
- e.preventDefault()
47
- setIsDragging(true)
48
- e.currentTarget.setPointerCapture(e.pointerId)
49
- }
50
-
51
- const handlePointerUp = (e: React.PointerEvent) => {
52
- e.preventDefault()
53
- setIsDragging(false)
54
- e.currentTarget.releasePointerCapture(e.pointerId)
55
- const { left, width } = e.currentTarget.getBoundingClientRect()
56
- let percentage = (e.clientX - left) / width
57
- percentage = Math.min(Math.max(percentage, 0), 1)
58
-
59
- const newValue = min + percentage * (max - min)
60
- setValue(newValue)
61
- }
62
-
63
- const handlePointerMove = (e: React.PointerEvent) => {
64
- e.preventDefault()
65
- if (!isDragging) return
66
-
67
- const { left, width } = e.currentTarget.getBoundingClientRect()
68
- let percentage = (e.clientX - left) / width
69
- percentage = Math.min(Math.max(percentage, 0), 1)
70
- const newValue = min + percentage * (max - min)
71
- setValue(newValue)
72
- }
73
-
74
- return (
75
- <SliderProvider
76
- min={min}
77
- max={max}
78
- value={innerValue}
79
- onChange={setValue}
80
- isDragging={isDragging}
81
- onPointerDown={handlePointerDown}
82
- onPointerMove={handlePointerMove}
83
- onPointerUp={handlePointerUp}
84
- >
85
- <div
86
- onPointerDown={handlePointerDown}
87
- onPointerUp={handlePointerUp}
88
- onPointerMove={handlePointerMove}
89
- {...props}
90
- >
91
- {children}
92
- </div>
93
- </SliderProvider>
94
- )
95
- }
96
-
97
- const SliderTrack = ({
98
- children,
99
- ...props
100
- }: {
101
- children?: React.ReactNode
102
- }) => {
103
- return <span {...props}>{children}</span>
104
- }
105
-
106
- const SliderRange = ({ ...props }: ComponentPropsWithoutRef<"span">) => {
107
- const { min, max, value } = useSliderContext()
108
- const percentage = getPercentage(value, min, max)
109
-
110
- return (
111
- <span
112
- {...props}
113
- style={{
114
- width: `${percentage}%`,
115
- }}
116
- />
117
- )
118
- }
119
-
120
- const SliderThumb = ({ ...props }: ComponentPropsWithoutRef<"span">) => {
121
- const { min, max, value } = useSliderContext()
122
- const percentage = getPercentage(value, min, max)
123
-
124
- return (
125
- <span
126
- {...props}
127
- style={{
128
- position: "absolute",
129
- left: `${percentage}%`,
130
- transform: "translateX(-50%)",
131
- }}
132
- />
133
- )
134
- }
135
-
136
- export const Slider = Object.assign(SliderRoot, {
137
- Root: SliderRoot,
138
- Track: SliderTrack,
139
- Range: SliderRange,
140
- Thumb: SliderThumb,
141
- })
@@ -1,29 +0,0 @@
1
- import type { Assign } from "../../types"
2
- import { slider } from "@styled-system/recipes"
3
- import type { ComponentProps, HTMLStyledProps } from "styled-system/types"
4
- import { createStyleContext } from "../../utils/createStyleContext"
5
- import { Slider } from "."
6
-
7
- const { withProvider, withContext } = createStyleContext(slider)
8
-
9
- export const Root = withProvider<
10
- HTMLDivElement,
11
- Assign<HTMLStyledProps<"div">, ComponentProps<typeof Slider.Root>>
12
- >(Slider.Root, "root")
13
-
14
- export const Track = withContext<
15
- HTMLSpanElement,
16
- Assign<HTMLStyledProps<"span">, ComponentProps<typeof Slider.Track>>
17
- >(Slider.Track, "track")
18
-
19
- export const Range = withContext<
20
- HTMLSpanElement,
21
- Assign<HTMLStyledProps<"span">, ComponentProps<typeof Slider.Range>>
22
- >(Slider.Range, "range")
23
-
24
- export const Thumb = withContext<
25
- HTMLSpanElement,
26
- Assign<HTMLStyledProps<"span">, ComponentProps<typeof Slider.Thumb>>
27
- >(Slider.Thumb, "thumb")
28
-
29
- export const StyledSlider = Object.assign(Root, { Track, Range, Thumb })