@spark-ui/components 10.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/CHANGELOG.md +15 -0
- package/LICENSE.md +21 -0
- package/README.md +19 -0
- package/dist/DialogTrigger-5SI4dvpK.d.mts +142 -0
- package/dist/DialogTrigger-5SI4dvpK.d.ts +142 -0
- package/dist/Input-g0LpWuv0.d.mts +17 -0
- package/dist/Input-g0LpWuv0.d.ts +17 -0
- package/dist/InputGroup-aoaZxCLk.d.mts +28 -0
- package/dist/InputGroup-aoaZxCLk.d.ts +28 -0
- package/dist/InputTrailingIcon-BBp7sE6D.d.mts +20 -0
- package/dist/InputTrailingIcon-ZZx8PoJy.d.ts +20 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.mts +19 -0
- package/dist/LabelRequiredIndicator-DRnCzHMU.d.ts +19 -0
- package/dist/accordion/index.d.mts +85 -0
- package/dist/accordion/index.d.ts +85 -0
- package/dist/accordion/index.js +461 -0
- package/dist/accordion/index.js.map +1 -0
- package/dist/accordion/index.mjs +249 -0
- package/dist/accordion/index.mjs.map +1 -0
- package/dist/alert-dialog/index.d.mts +119 -0
- package/dist/alert-dialog/index.d.ts +119 -0
- package/dist/alert-dialog/index.js +1451 -0
- package/dist/alert-dialog/index.js.map +1 -0
- package/dist/alert-dialog/index.mjs +177 -0
- package/dist/alert-dialog/index.mjs.map +1 -0
- package/dist/badge/index.d.mts +47 -0
- package/dist/badge/index.d.ts +47 -0
- package/dist/badge/index.js +122 -0
- package/dist/badge/index.js.map +1 -0
- package/dist/badge/index.mjs +95 -0
- package/dist/badge/index.mjs.map +1 -0
- package/dist/breadcrumb/index.d.mts +64 -0
- package/dist/breadcrumb/index.d.ts +64 -0
- package/dist/breadcrumb/index.js +326 -0
- package/dist/breadcrumb/index.js.map +1 -0
- package/dist/breadcrumb/index.mjs +149 -0
- package/dist/breadcrumb/index.mjs.map +1 -0
- package/dist/button/index.d.mts +40 -0
- package/dist/button/index.d.ts +40 -0
- package/dist/button/index.js +877 -0
- package/dist/button/index.js.map +1 -0
- package/dist/button/index.mjs +10 -0
- package/dist/button/index.mjs.map +1 -0
- package/dist/carousel/index.d.mts +253 -0
- package/dist/carousel/index.d.ts +253 -0
- package/dist/carousel/index.js +1678 -0
- package/dist/carousel/index.js.map +1 -0
- package/dist/carousel/index.mjs +716 -0
- package/dist/carousel/index.mjs.map +1 -0
- package/dist/checkbox/index.d.mts +120 -0
- package/dist/checkbox/index.d.ts +120 -0
- package/dist/checkbox/index.js +873 -0
- package/dist/checkbox/index.js.map +1 -0
- package/dist/checkbox/index.mjs +349 -0
- package/dist/checkbox/index.mjs.map +1 -0
- package/dist/chip/index.d.mts +97 -0
- package/dist/chip/index.d.ts +97 -0
- package/dist/chip/index.js +905 -0
- package/dist/chip/index.js.map +1 -0
- package/dist/chip/index.mjs +793 -0
- package/dist/chip/index.mjs.map +1 -0
- package/dist/chunk-2KPFQEAA.mjs +52 -0
- package/dist/chunk-2KPFQEAA.mjs.map +1 -0
- package/dist/chunk-4F5DOL57.mjs +26 -0
- package/dist/chunk-4F5DOL57.mjs.map +1 -0
- package/dist/chunk-6JOA37TZ.mjs +742 -0
- package/dist/chunk-6JOA37TZ.mjs.map +1 -0
- package/dist/chunk-7PMPYEHJ.mjs +379 -0
- package/dist/chunk-7PMPYEHJ.mjs.map +1 -0
- package/dist/chunk-AESXFMCC.mjs +68 -0
- package/dist/chunk-AESXFMCC.mjs.map +1 -0
- package/dist/chunk-B42LOFIZ.mjs +308 -0
- package/dist/chunk-B42LOFIZ.mjs.map +1 -0
- package/dist/chunk-FGOZHKBT.mjs +97 -0
- package/dist/chunk-FGOZHKBT.mjs.map +1 -0
- package/dist/chunk-HLXYG643.mjs +52 -0
- package/dist/chunk-HLXYG643.mjs.map +1 -0
- package/dist/chunk-JKNBJHD5.mjs +601 -0
- package/dist/chunk-JKNBJHD5.mjs.map +1 -0
- package/dist/chunk-K7VP7DH3.mjs +66 -0
- package/dist/chunk-K7VP7DH3.mjs.map +1 -0
- package/dist/chunk-MUNDKRAE.mjs +80 -0
- package/dist/chunk-MUNDKRAE.mjs.map +1 -0
- package/dist/chunk-NBZKMCHF.mjs +36 -0
- package/dist/chunk-NBZKMCHF.mjs.map +1 -0
- package/dist/chunk-PZWESKAR.mjs +314 -0
- package/dist/chunk-PZWESKAR.mjs.map +1 -0
- package/dist/collapsible/index.d.mts +60 -0
- package/dist/collapsible/index.d.ts +60 -0
- package/dist/collapsible/index.js +140 -0
- package/dist/collapsible/index.js.map +1 -0
- package/dist/collapsible/index.mjs +8 -0
- package/dist/collapsible/index.mjs.map +1 -0
- package/dist/combobox/index.d.mts +285 -0
- package/dist/combobox/index.d.ts +285 -0
- package/dist/combobox/index.js +2920 -0
- package/dist/combobox/index.js.map +1 -0
- package/dist/combobox/index.mjs +1267 -0
- package/dist/combobox/index.mjs.map +1 -0
- package/dist/dialog/index.d.mts +33 -0
- package/dist/dialog/index.d.ts +33 -0
- package/dist/dialog/index.js +1286 -0
- package/dist/dialog/index.js.map +1 -0
- package/dist/dialog/index.mjs +13 -0
- package/dist/dialog/index.mjs.map +1 -0
- package/dist/divider/index.d.mts +61 -0
- package/dist/divider/index.d.ts +61 -0
- package/dist/divider/index.js +223 -0
- package/dist/divider/index.js.map +1 -0
- package/dist/divider/index.mjs +196 -0
- package/dist/divider/index.mjs.map +1 -0
- package/dist/drawer/index.d.mts +148 -0
- package/dist/drawer/index.d.ts +148 -0
- package/dist/drawer/index.js +1266 -0
- package/dist/drawer/index.js.map +1 -0
- package/dist/drawer/index.mjs +299 -0
- package/dist/drawer/index.mjs.map +1 -0
- package/dist/dropdown/index.d.mts +233 -0
- package/dist/dropdown/index.d.ts +233 -0
- package/dist/dropdown/index.js +2402 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/dropdown/index.mjs +741 -0
- package/dist/dropdown/index.mjs.map +1 -0
- package/dist/form-field/index.d.mts +176 -0
- package/dist/form-field/index.d.ts +176 -0
- package/dist/form-field/index.js +540 -0
- package/dist/form-field/index.js.map +1 -0
- package/dist/form-field/index.mjs +13 -0
- package/dist/form-field/index.mjs.map +1 -0
- package/dist/icon/index.d.mts +28 -0
- package/dist/icon/index.d.ts +28 -0
- package/dist/icon/index.js +127 -0
- package/dist/icon/index.js.map +1 -0
- package/dist/icon/index.mjs +9 -0
- package/dist/icon/index.mjs.map +1 -0
- package/dist/icon-button/index.d.mts +16 -0
- package/dist/icon-button/index.d.ts +16 -0
- package/dist/icon-button/index.js +921 -0
- package/dist/icon-button/index.js.map +1 -0
- package/dist/icon-button/index.mjs +11 -0
- package/dist/icon-button/index.mjs.map +1 -0
- package/dist/input/index.d.mts +78 -0
- package/dist/input/index.d.ts +78 -0
- package/dist/input/index.js +1119 -0
- package/dist/input/index.js.map +1 -0
- package/dist/input/index.mjs +16 -0
- package/dist/input/index.mjs.map +1 -0
- package/dist/kbd/index.d.mts +9 -0
- package/dist/kbd/index.d.ts +9 -0
- package/dist/kbd/index.js +46 -0
- package/dist/kbd/index.js.map +1 -0
- package/dist/kbd/index.mjs +19 -0
- package/dist/kbd/index.mjs.map +1 -0
- package/dist/label/index.d.mts +11 -0
- package/dist/label/index.d.ts +11 -0
- package/dist/label/index.js +78 -0
- package/dist/label/index.js.map +1 -0
- package/dist/label/index.mjs +7 -0
- package/dist/label/index.mjs.map +1 -0
- package/dist/link-box/index.d.mts +34 -0
- package/dist/link-box/index.d.ts +34 -0
- package/dist/link-box/index.js +92 -0
- package/dist/link-box/index.js.map +1 -0
- package/dist/link-box/index.mjs +58 -0
- package/dist/link-box/index.mjs.map +1 -0
- package/dist/pagination/index.d.mts +143 -0
- package/dist/pagination/index.d.ts +143 -0
- package/dist/pagination/index.js +1303 -0
- package/dist/pagination/index.js.map +1 -0
- package/dist/pagination/index.mjs +326 -0
- package/dist/pagination/index.mjs.map +1 -0
- package/dist/popover/index.d.mts +93 -0
- package/dist/popover/index.d.ts +93 -0
- package/dist/popover/index.js +1280 -0
- package/dist/popover/index.js.map +1 -0
- package/dist/popover/index.mjs +13 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/portal/index.d.mts +13 -0
- package/dist/portal/index.d.ts +13 -0
- package/dist/portal/index.js +37 -0
- package/dist/portal/index.js.map +1 -0
- package/dist/portal/index.mjs +10 -0
- package/dist/portal/index.mjs.map +1 -0
- package/dist/progress/index.d.mts +48 -0
- package/dist/progress/index.d.ts +48 -0
- package/dist/progress/index.js +201 -0
- package/dist/progress/index.js.map +1 -0
- package/dist/progress/index.mjs +174 -0
- package/dist/progress/index.mjs.map +1 -0
- package/dist/progress-tracker/index.d.mts +81 -0
- package/dist/progress-tracker/index.d.ts +81 -0
- package/dist/progress-tracker/index.js +834 -0
- package/dist/progress-tracker/index.js.map +1 -0
- package/dist/progress-tracker/index.mjs +716 -0
- package/dist/progress-tracker/index.mjs.map +1 -0
- package/dist/radio-group/index.d.mts +100 -0
- package/dist/radio-group/index.d.ts +100 -0
- package/dist/radio-group/index.js +824 -0
- package/dist/radio-group/index.js.map +1 -0
- package/dist/radio-group/index.mjs +297 -0
- package/dist/radio-group/index.mjs.map +1 -0
- package/dist/rating/index.d.mts +78 -0
- package/dist/rating/index.d.ts +78 -0
- package/dist/rating/index.js +362 -0
- package/dist/rating/index.js.map +1 -0
- package/dist/rating/index.mjs +247 -0
- package/dist/rating/index.mjs.map +1 -0
- package/dist/scrolling-list/index.d.mts +105 -0
- package/dist/scrolling-list/index.d.ts +105 -0
- package/dist/scrolling-list/index.js +1367 -0
- package/dist/scrolling-list/index.js.map +1 -0
- package/dist/scrolling-list/index.mjs +407 -0
- package/dist/scrolling-list/index.mjs.map +1 -0
- package/dist/select/index.d.mts +167 -0
- package/dist/select/index.d.ts +167 -0
- package/dist/select/index.js +991 -0
- package/dist/select/index.js.map +1 -0
- package/dist/select/index.mjs +470 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/skeleton/index.d.mts +67 -0
- package/dist/skeleton/index.d.ts +67 -0
- package/dist/skeleton/index.js +206 -0
- package/dist/skeleton/index.js.map +1 -0
- package/dist/skeleton/index.mjs +147 -0
- package/dist/skeleton/index.mjs.map +1 -0
- package/dist/slider/index.d.mts +97 -0
- package/dist/slider/index.d.ts +97 -0
- package/dist/slider/index.js +209 -0
- package/dist/slider/index.js.map +1 -0
- package/dist/slider/index.mjs +182 -0
- package/dist/slider/index.mjs.map +1 -0
- package/dist/slot/index.d.mts +17 -0
- package/dist/slot/index.d.ts +17 -0
- package/dist/slot/index.js +51 -0
- package/dist/slot/index.js.map +1 -0
- package/dist/slot/index.mjs +11 -0
- package/dist/slot/index.mjs.map +1 -0
- package/dist/snackbar/index.d.mts +158 -0
- package/dist/snackbar/index.d.ts +158 -0
- package/dist/snackbar/index.js +1693 -0
- package/dist/snackbar/index.js.map +1 -0
- package/dist/snackbar/index.mjs +733 -0
- package/dist/snackbar/index.mjs.map +1 -0
- package/dist/spinner/index.d.mts +21 -0
- package/dist/spinner/index.d.ts +21 -0
- package/dist/spinner/index.js +139 -0
- package/dist/spinner/index.js.map +1 -0
- package/dist/spinner/index.mjs +9 -0
- package/dist/spinner/index.mjs.map +1 -0
- package/dist/stepper/index.d.mts +82 -0
- package/dist/stepper/index.d.ts +82 -0
- package/dist/stepper/index.js +2178 -0
- package/dist/stepper/index.js.map +1 -0
- package/dist/stepper/index.mjs +229 -0
- package/dist/stepper/index.mjs.map +1 -0
- package/dist/switch/index.d.mts +64 -0
- package/dist/switch/index.d.ts +64 -0
- package/dist/switch/index.js +768 -0
- package/dist/switch/index.js.map +1 -0
- package/dist/switch/index.mjs +245 -0
- package/dist/switch/index.mjs.map +1 -0
- package/dist/tabs/index.d.mts +103 -0
- package/dist/tabs/index.d.ts +103 -0
- package/dist/tabs/index.js +1315 -0
- package/dist/tabs/index.js.map +1 -0
- package/dist/tabs/index.mjs +391 -0
- package/dist/tabs/index.mjs.map +1 -0
- package/dist/tag/index.d.mts +27 -0
- package/dist/tag/index.d.ts +27 -0
- package/dist/tag/index.js +269 -0
- package/dist/tag/index.js.map +1 -0
- package/dist/tag/index.mjs +237 -0
- package/dist/tag/index.mjs.map +1 -0
- package/dist/text-link/index.d.mts +20 -0
- package/dist/text-link/index.d.ts +20 -0
- package/dist/text-link/index.js +99 -0
- package/dist/text-link/index.js.map +1 -0
- package/dist/text-link/index.mjs +8 -0
- package/dist/text-link/index.mjs.map +1 -0
- package/dist/textarea/index.d.mts +47 -0
- package/dist/textarea/index.d.ts +47 -0
- package/dist/textarea/index.js +1180 -0
- package/dist/textarea/index.js.map +1 -0
- package/dist/textarea/index.mjs +77 -0
- package/dist/textarea/index.mjs.map +1 -0
- package/dist/visually-hidden/index.d.mts +16 -0
- package/dist/visually-hidden/index.d.ts +16 -0
- package/dist/visually-hidden/index.js +67 -0
- package/dist/visually-hidden/index.js.map +1 -0
- package/dist/visually-hidden/index.mjs +8 -0
- package/dist/visually-hidden/index.mjs.map +1 -0
- package/global.d.ts +12 -0
- package/package.json +75 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.json +9 -0
- package/tsup.config.ts +11 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/progress-tracker/ProgressTracker.tsx","../../src/progress-tracker/ProgressTracker.styles.ts","../../src/progress-tracker/ProgressTrackerContext.ts","../../src/progress-tracker/ProgressTrackerStep.tsx","../../src/progress-tracker/ProgressTrackerStep.styles.ts","../../src/progress-tracker/ProgressTrackerStepIndicator.tsx","../../src/progress-tracker/ProgressTrackerStepIndicator.styles.ts","../../src/progress-tracker/stepIndicatorVariants/outline.ts","../../src/progress-tracker/stepIndicatorVariants/tinted.ts","../../src/progress-tracker/ProgressTrackerStepLabel.styles.ts","../../src/progress-tracker/ProgressTrackerStepLabel.tsx","../../src/progress-tracker/index.ts"],"sourcesContent":["import { cx } from 'class-variance-authority'\nimport { type ComponentPropsWithRef, type PropsWithChildren, useState } from 'react'\n\nimport { progressList } from './ProgressTracker.styles'\nimport {\n ProgressTrackerContext,\n type ProgressTrackerContextInterface,\n} from './ProgressTrackerContext'\nimport type { StepIndicatorVariantProps } from './ProgressTrackerStepIndicator.styles'\n\nexport interface ProgressTrackerProps\n extends ComponentPropsWithRef<'div'>,\n Pick<StepIndicatorVariantProps, 'size' | 'intent' | 'design'> {\n /**\n * The orientation of the progress tracker\n * @default 'horizontal\"\n */\n orientation?: 'horizontal' | 'vertical'\n /**\n * The index of the current step.\n * @default 0\n */\n stepIndex?: number\n /**\n * Event handler called when clicking on a step.\n */\n onStepClick?: (stepIndex: number) => void\n /**\n * Sets the component as interactive or not.\n * @default false\n */\n readOnly?: boolean\n}\n\nexport const ProgressTracker = ({\n stepIndex = 0,\n onStepClick,\n readOnly = false,\n intent = 'basic',\n size = 'lg',\n design = 'outline',\n orientation = 'horizontal',\n children,\n className,\n ref,\n ...rest\n}: PropsWithChildren<ProgressTrackerProps>) => {\n const [steps, setSteps] = useState<ProgressTrackerContextInterface['steps']>(new Map())\n\n const Component = readOnly ? 'div' : 'nav'\n\n return (\n <ProgressTrackerContext.Provider\n value={{ stepIndex, onStepClick, steps, setSteps, size, intent, design, readOnly }}\n >\n <Component\n ref={ref}\n data-spark-component=\"progress-tracker\"\n className={cx('inline-flex', className)}\n {...rest}\n >\n <ol\n data-orientation={orientation}\n className={progressList}\n style={{ counterReset: 'step' }}\n >\n {children}\n </ol>\n </Component>\n </ProgressTrackerContext.Provider>\n )\n}\n\nProgressTracker.displayName = 'ProgressTracker'\n","import { cx } from 'class-variance-authority'\n\nexport const progressList = cx([\n 'flex flex-nowrap items-start group/list',\n 'data-[orientation=horizontal]:flex-row data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:flex-col',\n])\n","import { createContext, type Dispatch, type SetStateAction, useContext } from 'react'\n\nimport type { ProgressTrackerProps } from './ProgressTracker'\n\n// Interfaces\nexport type ProgressTrackerContextInterface = Required<\n Pick<ProgressTrackerProps, 'stepIndex' | 'size' | 'intent' | 'design' | 'readOnly'>\n> &\n Pick<ProgressTrackerProps, 'onStepClick'> & {\n steps: Map<string, string[]>\n setSteps: Dispatch<SetStateAction<Map<string, string[]>>>\n }\n\nexport interface ProgressTrackerStepContextInterface {\n index: number\n state: 'active' | 'complete' | 'incomplete'\n}\n\n// Contexts\nexport const ProgressTrackerContext = createContext<ProgressTrackerContextInterface>(\n {} as ProgressTrackerContextInterface\n)\n\nexport const ProgressTrackerStepContext = createContext<ProgressTrackerStepContextInterface>(\n {} as ProgressTrackerStepContextInterface\n)\n\n// Hooks\nexport const useProgressTrackerContext = () => useContext(ProgressTrackerContext)\n\nexport const useProgressTrackerStepContext = () => useContext(ProgressTrackerStepContext)\n\nexport const ID_PREFIX = ':progress-tracker'\n","import { type ComponentPropsWithRef, type ReactNode, useEffect, useId } from 'react'\n\nimport {\n ID_PREFIX,\n ProgressTrackerStepContext,\n useProgressTrackerContext,\n} from './ProgressTrackerContext'\nimport { stepButtonVariant, stepItemVariant } from './ProgressTrackerStep.styles'\nimport { ProgressTrackerStepIndicator } from './ProgressTrackerStepIndicator'\n\nexport type ProgressTrackerStepProps = ComponentPropsWithRef<'li'> &\n (\n | {\n disabled?: boolean\n children: ReactNode\n }\n | {\n disabled?: boolean\n 'aria-label': string\n }\n )\n\nexport const ProgressTrackerStep = ({\n disabled = false,\n children,\n 'aria-label': ariaLabel,\n className,\n ref,\n ...rest\n}: ProgressTrackerStepProps) => {\n const {\n stepIndex: currentStepIndex,\n steps,\n onStepClick,\n setSteps,\n size,\n intent,\n readOnly,\n } = useProgressTrackerContext()\n\n const stepId = `${ID_PREFIX}-step-${useId()}`\n const stepIndex = [...steps.keys()].indexOf(stepId)\n\n const disabledAfter = (() => {\n const nextStepId = [...steps.keys()][stepIndex + 1]\n\n return !!(nextStepId && steps.get(nextStepId)?.includes('disabled'))\n })()\n\n const progressState = (() => {\n if (stepIndex === currentStepIndex) return 'active'\n else if (stepIndex < currentStepIndex) return 'complete'\n else return 'incomplete'\n })()\n\n useEffect(() => {\n setSteps(steps => {\n const newSteps = new Map(steps)\n\n return newSteps.set(\n stepId,\n [progressState, disabled ? 'disabled' : ''].filter(v => !!v)\n )\n })\n\n return () => {\n setSteps(steps => {\n steps.delete(stepId)\n\n return steps\n })\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n return (\n <li\n id={stepId}\n ref={ref}\n data-state={progressState}\n {...(progressState === 'active' && {\n 'aria-current': 'step',\n })}\n className={stepItemVariant({\n size,\n intent,\n disabled,\n disabledAfter,\n })}\n {...rest}\n >\n <button\n type=\"button\"\n aria-label={ariaLabel}\n data-interactive={!disabled && !readOnly}\n {...(!disabled &&\n !readOnly && {\n onClick: () => onStepClick?.(stepIndex),\n })}\n disabled={disabled}\n className={stepButtonVariant({\n size,\n readOnly,\n className,\n })}\n >\n <ProgressTrackerStepContext.Provider\n value={{\n index: stepIndex,\n state: progressState,\n }}\n >\n {children || <ProgressTrackerStepIndicator />}\n </ProgressTrackerStepContext.Provider>\n </button>\n </li>\n )\n}\n\nProgressTrackerStep.displayName = 'ProgressTracker.Step'\n","import { cva } from 'class-variance-authority'\n\nexport const stepItemVariant = cva(\n [\n 'relative inline-flex items-start flex-auto first:grow-0 justify-center group/item',\n // Progress Track\n 'after:absolute after:z-base',\n 'last:after:content-none',\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:px-[1px]',\n 'group-data-[orientation=horizontal]/list:before:absolute group-data-[orientation=horizontal]/list:before:z-base',\n 'group-data-[orientation=horizontal]/list:before:left-0 group-data-[orientation=horizontal]/list:after:right-0',\n 'group-data-[orientation=horizontal]/list:before:h-[1px] group-data-[orientation=horizontal]/list:after:h-[1px]',\n 'first:group-data-[orientation=horizontal]/list:before:content-none',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:py-[1px]',\n 'group-data-[orientation=vertical]/list:items-start',\n 'group-data-[orientation=vertical]/list:after:w-[1px] group-data-[orientation=vertical]/list:after:bottom-[-1px]',\n ],\n {\n variants: {\n size: {\n sm: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[8px] group-data-[orientation=horizontal]/list:after:top-[8px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+12px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+12px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+10px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+10px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[8px]',\n 'group-data-[orientation=vertical]/list:after:top-[25px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[21px]',\n ],\n md: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[12px] group-data-[orientation=horizontal]/list:after:top-[12px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+16px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+16px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+14px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+14px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[12px]',\n 'group-data-[orientation=vertical]/list:after:top-[33px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[29px]',\n ],\n lg: [\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:before:top-[16px] group-data-[orientation=horizontal]/list:after:top-[16px]',\n 'group-data-[orientation=horizontal]/list:before:right-[calc(50%+20px)] group-data-[orientation=horizontal]/list:after:left-[calc(50%+20px)]',\n 'first:group-data-[orientation=horizontal]/list:after:left-[calc(50%+18px)]',\n 'last:group-data-[orientation=horizontal]/list:before:right-[calc(50%+18px)]',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:after:left-[16px]',\n 'group-data-[orientation=vertical]/list:after:top-[41px]',\n 'first:group-data-[orientation=vertical]/list:after:top-[37px]',\n ],\n },\n intent: {\n basic: ['after:bg-basic', 'group-data-[orientation=horizontal]/list:before:bg-basic'],\n support: ['after:bg-support', 'group-data-[orientation=horizontal]/list:before:bg-support'],\n main: ['after:bg-main', 'group-data-[orientation=horizontal]/list:before:bg-main'],\n neutral: ['after:bg-neutral', 'group-data-[orientation=horizontal]/list:before:bg-neutral'],\n info: ['after:bg-info', 'group-data-[orientation=horizontal]/list:before:bg-info'],\n accent: ['after:bg-accent', 'group-data-[orientation=horizontal]/list:before:bg-accent'],\n danger: ['after:bg-error', 'group-data-[orientation=horizontal]/list:before:bg-error'],\n alert: ['after:bg-alert', 'group-data-[orientation=horizontal]/list:before:bg-alert'],\n success: ['after:bg-success', 'group-data-[orientation=horizontal]/list:before:bg-success'],\n },\n disabled: {\n true: 'before:opacity-dim-3',\n false: '',\n },\n disabledAfter: {\n true: 'after:opacity-dim-3',\n false: '',\n },\n },\n defaultVariants: {\n disabled: false,\n disabledAfter: false,\n size: 'lg',\n intent: 'basic',\n },\n }\n)\n\nexport const stepButtonVariant = cva(\n [\n 'relative flex group/btn disabled:cursor-default',\n // Horizontal orientation\n 'group-data-[orientation=horizontal]/list:flex-col group-data-[orientation=horizontal]/list:items-center',\n 'group-data-[orientation=horizontal]/list:text-center group-data-[orientation=horizontal]/list:mx-sm',\n 'group-first/item:group-data-[orientation=horizontal]/list:ml-0 group-last/item:group-data-[orientation=horizontal]/list:mr-0',\n // Vertical orientation\n 'group-data-[orientation=vertical]/list:flex-row group-data-[orientation=vertical]/list:items-start',\n 'group-data-[orientation=vertical]/list:text-left group-data-[orientation=vertical]/list:my-sm',\n 'group-first/item:group-data-[orientation=vertical]/list:mt-0 group-last/item:group-data-[orientation=vertical]/list:mb-0',\n ],\n {\n variants: {\n size: {\n sm: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-16 group-data-[orientation=horizontal]/list:mt-[16px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-16 group-data-[orientation=vertical]/list:ml-[16px]',\n ],\n md: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-24 group-data-[orientation=horizontal]/list:mt-[24px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-24 group-data-[orientation=vertical]/list:ml-[24px]',\n ],\n lg: [\n 'group-data-[orientation=horizontal]/list:min-w-sz-32 group-data-[orientation=horizontal]/list:mt-[32px]',\n 'group-data-[orientation=vertical]/list:min-h-sz-32 group-data-[orientation=vertical]/list:ml-[32px]',\n ],\n },\n readOnly: {\n true: 'cursor-default',\n false: 'cursor-pointer',\n },\n },\n defaultVariants: {\n size: 'lg',\n readOnly: false,\n },\n }\n)\n","import { Check } from '@spark-ui/icons/Check'\nimport type { ComponentPropsWithoutRef, ReactNode } from 'react'\n\nimport { Icon } from '../icon'\nimport { useProgressTrackerContext, useProgressTrackerStepContext } from './ProgressTrackerContext'\nimport { stepIndicatorVariant } from './ProgressTrackerStepIndicator.styles'\n\nexport type ProgressTrackerStepIndicatorProps = ComponentPropsWithoutRef<'span'> & {\n /**\n * The content to be rendered when step status is complete (checkmark icon by default)\n */\n complete?: ReactNode\n /**\n * The content to be rendered when step status is incomplete (step index by default)\n */\n incomplete?: ReactNode\n}\n\nconst CompleteIndicator = () => (\n <Icon size=\"sm\">\n <Check />\n </Icon>\n)\n\nexport const ProgressTrackerStepIndicator = ({\n complete,\n incomplete,\n className,\n}: ProgressTrackerStepIndicatorProps) => {\n const { size, intent, design } = useProgressTrackerContext()\n const { index, state } = useProgressTrackerStepContext()\n\n return (\n <span\n className={stepIndicatorVariant({ size, intent, design, state, className })}\n aria-hidden=\"true\"\n >\n {size !== 'sm' && (\n <>\n {state === 'complete' && (complete === undefined ? <CompleteIndicator /> : complete)}\n {state !== 'complete' && (incomplete === undefined ? `${index + 1}` : incomplete)}\n </>\n )}\n </span>\n )\n}\n\nProgressTrackerStepIndicator.displayName = 'ProgressTracker.StepIndicator'\n","import { cva, type VariantProps } from 'class-variance-authority'\n\nimport { outlineVariants, tintedVariants } from './stepIndicatorVariants'\n\nexport const stepIndicatorVariant = cva(\n [\n 'relative flex shrink-0 justify-center items-center',\n 'rounded-full',\n 'text-body-2 font-bold',\n 'group-disabled/btn:opacity-dim-3',\n ],\n {\n variants: {\n size: {\n sm: [\n 'w-sz-16 h-sz-16',\n 'group-data-[orientation=horizontal]/list:mt-[-16px]',\n 'group-data-[orientation=vertical]/list:ml-[-16px]',\n ],\n md: [\n 'w-sz-24 h-sz-24',\n 'group-data-[orientation=horizontal]/list:mt-[-24px]',\n 'group-data-[orientation=vertical]/list:ml-[-24px]',\n ],\n lg: [\n 'w-sz-32 h-sz-32',\n 'group-data-[orientation=horizontal]/list:mt-[-32px]',\n 'group-data-[orientation=vertical]/list:ml-[-32px]',\n ],\n },\n intent: {\n basic: '',\n support: '',\n main: '',\n neutral: '',\n info: '',\n accent: '',\n danger: '',\n alert: '',\n success: '',\n },\n design: {\n outline: 'border-sm',\n tinted: '',\n },\n state: {\n complete: '',\n incomplete: '',\n active: '',\n },\n },\n /**\n * Known type issue with CVA compoundVariants and VS Code/Intellisense:\n * https://github.com/joe-bell/cva/discussions/195#discussioncomment-6750163\n * */\n /* eslint-disable-next-line @typescript-eslint/ban-ts-comment */\n /* @ts-ignore */\n compoundVariants: [...outlineVariants, ...tintedVariants],\n defaultVariants: {\n size: 'lg',\n state: 'incomplete',\n intent: 'basic',\n design: 'outline',\n },\n }\n)\n\nexport type StepIndicatorVariantProps = VariantProps<typeof stepIndicatorVariant>\n","export const outlineVariants = [\n {\n design: 'outline',\n intent: 'basic',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-basic-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'basic',\n state: 'active',\n class: 'text-on-basic-container bg-basic-container',\n },\n {\n design: 'outline',\n intent: 'support',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-support-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'support',\n state: 'active',\n class: 'text-on-support-container bg-support-container',\n },\n {\n design: 'outline',\n intent: 'main',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-main-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-main-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'main',\n state: 'active',\n class: 'text-on-main-container bg-main-container',\n },\n {\n design: 'outline',\n intent: 'neutral',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-neutral-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'neutral',\n state: 'active',\n class: 'text-on-neutral-container bg-neutral-container',\n },\n {\n design: 'outline',\n intent: 'info',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-info-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-info-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'info',\n state: 'active',\n class: 'text-on-info-container bg-info-container',\n },\n {\n design: 'outline',\n intent: 'accent',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-accent-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-accent-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'accent',\n state: 'active',\n class: 'text-on-accent-container bg-accent-container',\n },\n {\n design: 'outline',\n intent: 'danger',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-error-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-error-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'danger',\n state: 'active',\n class: 'text-on-error-container bg-error-container',\n },\n {\n design: 'outline',\n intent: 'alert',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-alert-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-alert-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'alert',\n state: 'active',\n class: 'text-on-alert-container bg-alert-container',\n },\n {\n design: 'outline',\n intent: 'success',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-success-container bg-transparent',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-transparent',\n ],\n },\n {\n design: 'outline',\n intent: 'success',\n state: 'active',\n class: 'text-on-success-container bg-success-container',\n },\n] as const\n","export const tintedVariants = [\n {\n design: 'tinted',\n intent: 'basic',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-basic-container bg-basic-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-basic-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-basic-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'basic',\n state: 'active',\n class: 'text-on-basic bg-basic',\n },\n {\n design: 'tinted',\n intent: 'support',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-support-container bg-support-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-support-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-support-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'support',\n state: 'active',\n class: 'text-on-support bg-support',\n },\n {\n design: 'tinted',\n intent: 'main',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-main-container bg-main-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-main-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-main-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'main',\n state: 'active',\n class: 'text-on-main bg-main',\n },\n {\n design: 'tinted',\n intent: 'neutral',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-neutral-container bg-neutral-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-neutral-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-neutral-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'neutral',\n state: 'active',\n class: 'text-on-neutral bg-neutral',\n },\n {\n design: 'tinted',\n intent: 'info',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-info-container bg-info-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-info-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-info-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'info',\n state: 'active',\n class: 'text-on-info bg-info',\n },\n {\n design: 'tinted',\n intent: 'accent',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-accent-container bg-accent-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-accent-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-accent-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'accent',\n state: 'active',\n class: 'text-on-accent bg-accent',\n },\n {\n design: 'tinted',\n intent: 'danger',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-error-container bg-error-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-error-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-error-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'danger',\n state: 'active',\n class: 'text-on-error bg-error',\n },\n {\n design: 'tinted',\n intent: 'alert',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-alert-container bg-alert-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-alert-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-alert-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'alert',\n state: 'active',\n class: 'text-on-alert bg-alert',\n },\n {\n design: 'tinted',\n intent: 'success',\n state: ['complete', 'incomplete'],\n class: [\n 'text-on-success-container bg-success-container',\n 'group-hover/btn:group-data-[interactive=true]/btn:bg-success-container-hovered',\n 'group-hover/btn:group-data-[interactive=false]/btn:bg-success-container',\n ],\n },\n {\n design: 'tinted',\n intent: 'success',\n state: 'active',\n class: 'text-on-success bg-success',\n },\n] as const\n","import { cva } from 'class-variance-authority'\n\nexport const stepLabel = cva([\n 'flex text-body-2 font-bold',\n 'text-on-surface group-disabled/btn:text-on-surface/dim-1',\n 'group-data-[orientation=horizontal]/list:mt-md',\n 'group-data-[orientation=vertical]/list:ml-md',\n 'group-data-[orientation=vertical]/list:my-auto',\n])\n","import type { ComponentPropsWithoutRef, ReactNode } from 'react'\n\nimport { stepLabel } from './ProgressTrackerStepLabel.styles'\n\ntype ProgressTrackerStepLabelProps = ComponentPropsWithoutRef<'span'> & {\n children: ReactNode\n}\n\nexport const ProgressTrackerStepLabel = ({\n className,\n children,\n}: ProgressTrackerStepLabelProps) => <span className={stepLabel({ className })}>{children}</span>\n\nProgressTrackerStepLabel.displayName = 'ProgressTracker.StepLabel'\n","import { ProgressTracker as Root, type ProgressTrackerProps } from './ProgressTracker'\nimport { ProgressTrackerStep as Step, type ProgressTrackerStepProps } from './ProgressTrackerStep'\nimport {\n ProgressTrackerStepIndicator as StepIndicator,\n type ProgressTrackerStepIndicatorProps,\n} from './ProgressTrackerStepIndicator'\nimport { ProgressTrackerStepLabel as StepLabel } from './ProgressTrackerStepLabel'\n\nexport const ProgressTracker: typeof Root & {\n Step: typeof Step\n StepLabel: typeof StepLabel\n StepIndicator: typeof StepIndicator\n} = Object.assign(Root, {\n Step,\n StepLabel,\n StepIndicator,\n})\n\nProgressTracker.displayName = 'ProgressTracker'\nStep.displayName = 'ProgressTracker.Step'\nStepLabel.displayName = 'ProgressTracker.StepLabel'\nStepIndicator.displayName = 'ProgressTracker.StepIndicator'\n\nexport type { ProgressTrackerProps, ProgressTrackerStepProps, ProgressTrackerStepIndicatorProps }\n"],"mappings":";;;;;;;AAAA,SAAS,MAAAA,WAAU;AACnB,SAA6D,gBAAgB;;;ACD7E,SAAS,UAAU;AAEZ,IAAM,eAAe,GAAG;AA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,oBAAK,cAAc;AACnB,yBAAU,cAAc;AACxB,6BAAc,cAAc;","names":["cx","cx","cva","cva","jsx","jsx","steps","cva","jsx","ProgressTracker"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonHTMLAttributes, Ref, HTMLAttributes } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const radioInputVariants: (props?: ({
|
|
7
|
+
intent?: "main" | "support" | "accent" | "basic" | "success" | "alert" | "error" | "info" | "neutral" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
type RadioInputVariantsProps = VariantProps<typeof radioInputVariants>;
|
|
10
|
+
|
|
11
|
+
interface RadioInputProps extends RadioInputVariantsProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange'> {
|
|
12
|
+
/**
|
|
13
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
14
|
+
*/
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The value given as data when submitted with a name.
|
|
18
|
+
*/
|
|
19
|
+
value: string;
|
|
20
|
+
/**
|
|
21
|
+
* When true, prevents the user from interacting with the radio item.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* When true, indicates that the user must check the radio item before the owning form can be submitted.
|
|
26
|
+
*/
|
|
27
|
+
required?: boolean;
|
|
28
|
+
ref?: Ref<HTMLButtonElement>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type RadioProps = RadioInputProps & {
|
|
32
|
+
ref?: Ref<HTMLButtonElement>;
|
|
33
|
+
};
|
|
34
|
+
declare const Radio: {
|
|
35
|
+
({ className, children, id, disabled: disabledProp, ref, ...others }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
declare const radioGroupStyles: (props?: ({
|
|
40
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
41
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
42
|
+
type RadioGroupVariantsProps = VariantProps<typeof radioGroupStyles>;
|
|
43
|
+
|
|
44
|
+
interface RadioGroupProps extends RadioGroupVariantsProps, Pick<RadioInputVariantsProps, 'intent'>, Omit<HTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue' | 'dir' | 'onChange'> {
|
|
45
|
+
/**
|
|
46
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
47
|
+
*/
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The value of the radio item that should be checked when initially rendered. Use when you do not need to control the state of the radio items.
|
|
51
|
+
*/
|
|
52
|
+
defaultValue?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
|
55
|
+
*/
|
|
56
|
+
value?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Event handler called when the value changes.
|
|
59
|
+
*/
|
|
60
|
+
onValueChange?: (value: string) => void;
|
|
61
|
+
/**
|
|
62
|
+
* When true, prevents the user from interacting with radio items.
|
|
63
|
+
*/
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
67
|
+
*/
|
|
68
|
+
name?: string;
|
|
69
|
+
/**
|
|
70
|
+
* When true, indicates that the user must check a radio item before the owning form can be submitted.
|
|
71
|
+
*/
|
|
72
|
+
required?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The orientation of the component.
|
|
75
|
+
*/
|
|
76
|
+
orientation?: 'horizontal' | 'vertical';
|
|
77
|
+
/**
|
|
78
|
+
* The reading direction of the radio group.
|
|
79
|
+
*/
|
|
80
|
+
dir?: 'ltr' | 'rtl';
|
|
81
|
+
/**
|
|
82
|
+
* When true, keyboard navigation will loop from last item to first, and vice versa.
|
|
83
|
+
*/
|
|
84
|
+
loop?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* When true, the label will be placed on the left side of the Radio
|
|
87
|
+
*/
|
|
88
|
+
reverse?: boolean;
|
|
89
|
+
ref?: Ref<HTMLDivElement>;
|
|
90
|
+
}
|
|
91
|
+
declare const RadioGroup$1: {
|
|
92
|
+
({ orientation, loop, intent, disabled, className, required: requiredProp, reverse, ref, ...others }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
93
|
+
displayName: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
declare const RadioGroup: typeof RadioGroup$1 & {
|
|
97
|
+
Radio: typeof Radio;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { RadioGroup, type RadioGroupProps, type RadioProps };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonHTMLAttributes, Ref, HTMLAttributes } from 'react';
|
|
3
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
|
|
6
|
+
declare const radioInputVariants: (props?: ({
|
|
7
|
+
intent?: "main" | "support" | "accent" | "basic" | "success" | "alert" | "error" | "info" | "neutral" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
type RadioInputVariantsProps = VariantProps<typeof radioInputVariants>;
|
|
10
|
+
|
|
11
|
+
interface RadioInputProps extends RadioInputVariantsProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'value' | 'onChange'> {
|
|
12
|
+
/**
|
|
13
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
14
|
+
*/
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The value given as data when submitted with a name.
|
|
18
|
+
*/
|
|
19
|
+
value: string;
|
|
20
|
+
/**
|
|
21
|
+
* When true, prevents the user from interacting with the radio item.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* When true, indicates that the user must check the radio item before the owning form can be submitted.
|
|
26
|
+
*/
|
|
27
|
+
required?: boolean;
|
|
28
|
+
ref?: Ref<HTMLButtonElement>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type RadioProps = RadioInputProps & {
|
|
32
|
+
ref?: Ref<HTMLButtonElement>;
|
|
33
|
+
};
|
|
34
|
+
declare const Radio: {
|
|
35
|
+
({ className, children, id, disabled: disabledProp, ref, ...others }: RadioProps): react_jsx_runtime.JSX.Element;
|
|
36
|
+
displayName: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
declare const radioGroupStyles: (props?: ({
|
|
40
|
+
orientation?: "vertical" | "horizontal" | null | undefined;
|
|
41
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
42
|
+
type RadioGroupVariantsProps = VariantProps<typeof radioGroupStyles>;
|
|
43
|
+
|
|
44
|
+
interface RadioGroupProps extends RadioGroupVariantsProps, Pick<RadioInputVariantsProps, 'intent'>, Omit<HTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue' | 'dir' | 'onChange'> {
|
|
45
|
+
/**
|
|
46
|
+
* Change the component to the HTML tag or custom component of the only child.
|
|
47
|
+
*/
|
|
48
|
+
asChild?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* The value of the radio item that should be checked when initially rendered. Use when you do not need to control the state of the radio items.
|
|
51
|
+
*/
|
|
52
|
+
defaultValue?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The controlled value of the radio item to check. Should be used in conjunction with onValueChange.
|
|
55
|
+
*/
|
|
56
|
+
value?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Event handler called when the value changes.
|
|
59
|
+
*/
|
|
60
|
+
onValueChange?: (value: string) => void;
|
|
61
|
+
/**
|
|
62
|
+
* When true, prevents the user from interacting with radio items.
|
|
63
|
+
*/
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The name of the group. Submitted with its owning form as part of a name/value pair.
|
|
67
|
+
*/
|
|
68
|
+
name?: string;
|
|
69
|
+
/**
|
|
70
|
+
* When true, indicates that the user must check a radio item before the owning form can be submitted.
|
|
71
|
+
*/
|
|
72
|
+
required?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* The orientation of the component.
|
|
75
|
+
*/
|
|
76
|
+
orientation?: 'horizontal' | 'vertical';
|
|
77
|
+
/**
|
|
78
|
+
* The reading direction of the radio group.
|
|
79
|
+
*/
|
|
80
|
+
dir?: 'ltr' | 'rtl';
|
|
81
|
+
/**
|
|
82
|
+
* When true, keyboard navigation will loop from last item to first, and vice versa.
|
|
83
|
+
*/
|
|
84
|
+
loop?: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* When true, the label will be placed on the left side of the Radio
|
|
87
|
+
*/
|
|
88
|
+
reverse?: boolean;
|
|
89
|
+
ref?: Ref<HTMLDivElement>;
|
|
90
|
+
}
|
|
91
|
+
declare const RadioGroup$1: {
|
|
92
|
+
({ orientation, loop, intent, disabled, className, required: requiredProp, reverse, ref, ...others }: RadioGroupProps): react_jsx_runtime.JSX.Element;
|
|
93
|
+
displayName: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
declare const RadioGroup: typeof RadioGroup$1 & {
|
|
97
|
+
Radio: typeof Radio;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { RadioGroup, type RadioGroupProps, type RadioProps };
|