@charcoal-ui/react 6.0.0-rc.8 → 6.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/dist/_lib/compat.d.ts.map +1 -1
- package/dist/_lib/createDivComponent.cjs +0 -1
- package/dist/_lib/createDivComponent.cjs.map +1 -1
- package/dist/_lib/createDivComponent.d.ts +1 -1
- package/dist/_lib/createDivComponent.js.map +1 -1
- package/dist/_lib/index.cjs.map +1 -1
- package/dist/_lib/index.js.map +1 -1
- package/dist/_lib/useClassNames.cjs +0 -1
- package/dist/_lib/useClassNames.cjs.map +1 -1
- package/dist/_lib/useClassNames.js.map +1 -1
- package/dist/_lib/useForwardedRef.cjs +1 -1
- package/dist/_lib/useForwardedRef.cjs.map +1 -1
- package/dist/_lib/useForwardedRef.js.map +1 -1
- package/dist/_lib/useIsomorphicLayoutEffect.cjs +0 -1
- package/dist/_lib/useIsomorphicLayoutEffect.cjs.map +1 -1
- package/dist/_lib/useIsomorphicLayoutEffect.d.ts +2 -2
- package/dist/_lib/useIsomorphicLayoutEffect.d.ts.map +1 -1
- package/dist/_lib/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/components/Button/index.d.ts +1 -1
- package/dist/components/Button/index.d.ts.map +1 -1
- package/dist/components/Button/index2.cjs +1 -1
- package/dist/components/Button/index2.cjs.map +1 -1
- package/dist/components/Button/index2.js.map +1 -1
- package/dist/components/Carousel/CarouselItem.cjs +0 -1
- package/dist/components/Carousel/CarouselItem.cjs.map +1 -1
- package/dist/components/Carousel/CarouselItem.d.ts.map +1 -1
- package/dist/components/Carousel/CarouselItem.js.map +1 -1
- package/dist/components/Carousel/carouselStore.cjs.map +1 -1
- package/dist/components/Carousel/carouselStore.js.map +1 -1
- package/dist/components/Carousel/index.d.ts +1 -1
- package/dist/components/Carousel/index.d.ts.map +1 -1
- package/dist/components/Carousel/index2.cjs +0 -1
- package/dist/components/Carousel/index2.cjs.map +1 -1
- package/dist/components/Carousel/index2.js.map +1 -1
- package/dist/components/Carousel/intersectionObserver.cjs.map +1 -1
- package/dist/components/Carousel/intersectionObserver.js.map +1 -1
- package/dist/components/Carousel/resizeObserver.cjs.map +1 -1
- package/dist/components/Carousel/resizeObserver.js.map +1 -1
- package/dist/components/Carousel/store.cjs.map +1 -1
- package/dist/components/Carousel/store.js.map +1 -1
- package/dist/components/Carousel/useCarouselScroller.cjs +0 -1
- package/dist/components/Carousel/useCarouselScroller.cjs.map +1 -1
- package/dist/components/Carousel/useCarouselScroller.js.map +1 -1
- package/dist/components/Checkbox/CheckboxInput/index.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxInput/index2.cjs +0 -1
- package/dist/components/Checkbox/CheckboxInput/index2.cjs.map +1 -1
- package/dist/components/Checkbox/CheckboxInput/index2.js.map +1 -1
- package/dist/components/Checkbox/CheckboxWithLabel.cjs +1 -1
- package/dist/components/Checkbox/CheckboxWithLabel.cjs.map +1 -1
- package/dist/components/Checkbox/CheckboxWithLabel.d.ts +2 -2
- package/dist/components/Checkbox/CheckboxWithLabel.d.ts.map +1 -1
- package/dist/components/Checkbox/CheckboxWithLabel.js.map +1 -1
- package/dist/components/Checkbox/index.d.ts.map +1 -1
- package/dist/components/Checkbox/index2.cjs +0 -1
- package/dist/components/Checkbox/index2.cjs.map +1 -1
- package/dist/components/Checkbox/index2.js.map +1 -1
- package/dist/components/Clickable/index.d.ts +1 -1
- package/dist/components/Clickable/index.d.ts.map +1 -1
- package/dist/components/Clickable/index2.cjs +1 -1
- package/dist/components/Clickable/index2.cjs.map +1 -1
- package/dist/components/Clickable/index2.js.map +1 -1
- package/dist/components/DropdownSelector/DropdownMenuItem/index2.cjs +0 -1
- package/dist/components/DropdownSelector/DropdownMenuItem/index2.cjs.map +1 -1
- package/dist/components/DropdownSelector/DropdownMenuItem/index2.js.map +1 -1
- package/dist/components/DropdownSelector/DropdownPopover.cjs +0 -1
- package/dist/components/DropdownSelector/DropdownPopover.cjs.map +1 -1
- package/dist/components/DropdownSelector/DropdownPopover.js.map +1 -1
- package/dist/components/DropdownSelector/ListItem/index.d.ts +1 -1
- package/dist/components/DropdownSelector/ListItem/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/ListItem/index2.cjs +0 -1
- package/dist/components/DropdownSelector/ListItem/index2.cjs.map +1 -1
- package/dist/components/DropdownSelector/ListItem/index2.js.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/index.cjs +29 -2
- package/dist/components/DropdownSelector/MenuItem/index.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/index.js +30 -2
- package/dist/components/DropdownSelector/MenuItem/index.js.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/internals/handleFocusByKeyBoard.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/internals/handleFocusByKeyBoard.js.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.cjs +0 -1
- package/dist/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuItem/internals/useMenuItemHandleKeyDown.js.map +1 -1
- package/dist/components/DropdownSelector/MenuItemGroup/index2.cjs +0 -1
- package/dist/components/DropdownSelector/MenuItemGroup/index2.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuItemGroup/index2.js.map +1 -1
- package/dist/components/DropdownSelector/MenuList/MenuListContext.cjs +0 -1
- package/dist/components/DropdownSelector/MenuList/MenuListContext.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuList/MenuListContext.js.map +1 -1
- package/dist/components/DropdownSelector/MenuList/index2.cjs +0 -1
- package/dist/components/DropdownSelector/MenuList/index2.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuList/index2.js.map +1 -1
- package/dist/components/DropdownSelector/MenuList/internals/getValuesRecursive.cjs +1 -1
- package/dist/components/DropdownSelector/MenuList/internals/getValuesRecursive.cjs.map +1 -1
- package/dist/components/DropdownSelector/MenuList/internals/getValuesRecursive.js.map +1 -1
- package/dist/components/DropdownSelector/Popover/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/Popover/index2.cjs +18 -1
- package/dist/components/DropdownSelector/Popover/index2.cjs.map +1 -1
- package/dist/components/DropdownSelector/Popover/index2.js +19 -1
- package/dist/components/DropdownSelector/Popover/index2.js.map +1 -1
- package/dist/components/DropdownSelector/Popover/usePreventScroll.cjs +0 -1
- package/dist/components/DropdownSelector/Popover/usePreventScroll.cjs.map +1 -1
- package/dist/components/DropdownSelector/Popover/usePreventScroll.js.map +1 -1
- package/dist/components/DropdownSelector/index.d.ts.map +1 -1
- package/dist/components/DropdownSelector/index2.cjs +27 -10
- package/dist/components/DropdownSelector/index2.cjs.map +1 -1
- package/dist/components/DropdownSelector/index2.js +26 -9
- package/dist/components/DropdownSelector/index2.js.map +1 -1
- package/dist/components/DropdownSelector/utils/findPreviewRecursive.cjs +1 -1
- package/dist/components/DropdownSelector/utils/findPreviewRecursive.cjs.map +1 -1
- package/dist/components/DropdownSelector/utils/findPreviewRecursive.js.map +1 -1
- package/dist/components/FieldLabel/index.d.ts.map +1 -1
- package/dist/components/FieldLabel/index2.cjs +1 -1
- package/dist/components/FieldLabel/index2.cjs.map +1 -1
- package/dist/components/FieldLabel/index2.js.map +1 -1
- package/dist/components/HintText/index2.cjs +0 -1
- package/dist/components/HintText/index2.cjs.map +1 -1
- package/dist/components/HintText/index2.js.map +1 -1
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.cjs.map +1 -1
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Icon/index.js.map +1 -1
- package/dist/components/IconButton/index.d.ts +1 -1
- package/dist/components/IconButton/index.d.ts.map +1 -1
- package/dist/components/IconButton/index2.cjs +1 -1
- package/dist/components/IconButton/index2.cjs.map +1 -1
- package/dist/components/IconButton/index2.js.map +1 -1
- package/dist/components/LoadingSpinner/index.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/index2.cjs +0 -1
- package/dist/components/LoadingSpinner/index2.cjs.map +1 -1
- package/dist/components/LoadingSpinner/index2.js.map +1 -1
- package/dist/components/Modal/Dialog/index2.cjs +1 -1
- package/dist/components/Modal/Dialog/index2.cjs.map +1 -1
- package/dist/components/Modal/Dialog/index2.js.map +1 -1
- package/dist/components/Modal/ModalBackgroundContext.cjs +1 -1
- package/dist/components/Modal/ModalBackgroundContext.cjs.map +1 -1
- package/dist/components/Modal/ModalBackgroundContext.js.map +1 -1
- package/dist/components/Modal/ModalPlumbing.d.ts +3 -3
- package/dist/components/Modal/ModalPlumbing2.cjs +0 -1
- package/dist/components/Modal/ModalPlumbing2.cjs.map +1 -1
- package/dist/components/Modal/ModalPlumbing2.js.map +1 -1
- package/dist/components/Modal/index.d.ts.map +1 -1
- package/dist/components/Modal/index2.cjs +1 -1
- package/dist/components/Modal/index2.cjs.map +1 -1
- package/dist/components/Modal/index2.js.map +1 -1
- package/dist/components/Modal/useCustomModalOverlay.cjs +1 -1
- package/dist/components/Modal/useCustomModalOverlay.cjs.map +1 -1
- package/dist/components/Modal/useCustomModalOverlay.js.map +1 -1
- package/dist/components/Modal/useTransitionPresence.cjs +1 -3
- package/dist/components/Modal/useTransitionPresence.cjs.map +1 -1
- package/dist/components/Modal/useTransitionPresence.js +1 -2
- package/dist/components/Modal/useTransitionPresence.js.map +1 -1
- package/dist/components/MultiSelect/context.cjs +0 -1
- package/dist/components/MultiSelect/context.cjs.map +1 -1
- package/dist/components/MultiSelect/context.js.map +1 -1
- package/dist/components/MultiSelect/index.d.ts +1 -1
- package/dist/components/MultiSelect/index.d.ts.map +1 -1
- package/dist/components/MultiSelect/index2.cjs +2 -2
- package/dist/components/MultiSelect/index2.cjs.map +1 -1
- package/dist/components/MultiSelect/index2.js.map +1 -1
- package/dist/components/Pagination/PaginationContext.cjs +0 -1
- package/dist/components/Pagination/PaginationContext.cjs.map +1 -1
- package/dist/components/Pagination/PaginationContext.js.map +1 -1
- package/dist/components/Pagination/helper.cjs.map +1 -1
- package/dist/components/Pagination/helper.js.map +1 -1
- package/dist/components/Pagination/index2.cjs +26 -135
- package/dist/components/Pagination/index2.cjs.map +1 -1
- package/dist/components/Pagination/index2.js +86 -182
- package/dist/components/Pagination/index2.js.map +1 -1
- package/dist/components/Radio/RadioGroup/index2.cjs +1 -1
- package/dist/components/Radio/RadioGroup/index2.cjs.map +1 -1
- package/dist/components/Radio/RadioGroup/index2.js.map +1 -1
- package/dist/components/Radio/RadioGroupContext.cjs.map +1 -1
- package/dist/components/Radio/RadioGroupContext.js.map +1 -1
- package/dist/components/Radio/RadioInput/index.d.ts.map +1 -1
- package/dist/components/Radio/RadioInput/index2.cjs +0 -1
- package/dist/components/Radio/RadioInput/index2.cjs.map +1 -1
- package/dist/components/Radio/RadioInput/index2.js.map +1 -1
- package/dist/components/Radio/index.d.ts.map +1 -1
- package/dist/components/Radio/index2.cjs +2 -2
- package/dist/components/Radio/index2.cjs.map +1 -1
- package/dist/components/Radio/index2.js.map +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.cjs +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.cjs.map +1 -1
- package/dist/components/SegmentedControl/RadioGroupContext.js.map +1 -1
- package/dist/components/SegmentedControl/index.d.ts.map +1 -1
- package/dist/components/SegmentedControl/index2.cjs +1 -1
- package/dist/components/SegmentedControl/index2.cjs.map +1 -1
- package/dist/components/SegmentedControl/index2.js.map +1 -1
- package/dist/components/Switch/SwitchInput/index.d.ts.map +1 -1
- package/dist/components/Switch/SwitchInput/index2.cjs +0 -1
- package/dist/components/Switch/SwitchInput/index2.cjs.map +1 -1
- package/dist/components/Switch/SwitchInput/index2.js.map +1 -1
- package/dist/components/Switch/SwitchWithLabel.cjs +1 -1
- package/dist/components/Switch/SwitchWithLabel.cjs.map +1 -1
- package/dist/components/Switch/SwitchWithLabel.d.ts +2 -2
- package/dist/components/Switch/SwitchWithLabel.d.ts.map +1 -1
- package/dist/components/Switch/SwitchWithLabel.js.map +1 -1
- package/dist/components/Switch/index.d.ts +1 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index2.cjs +0 -1
- package/dist/components/Switch/index2.cjs.map +1 -1
- package/dist/components/Switch/index2.js.map +1 -1
- package/dist/components/TagItem/index.d.ts +1 -1
- package/dist/components/TagItem/index.d.ts.map +1 -1
- package/dist/components/TagItem/index2.cjs +1 -1
- package/dist/components/TagItem/index2.cjs.map +1 -1
- package/dist/components/TagItem/index2.js.map +1 -1
- package/dist/components/TextArea/index.d.ts.map +1 -1
- package/dist/components/TextArea/index2.cjs +0 -1
- package/dist/components/TextArea/index2.cjs.map +1 -1
- package/dist/components/TextArea/index2.js.map +1 -1
- package/dist/components/TextEllipsis/helper.cjs +2 -1
- package/dist/components/TextEllipsis/helper.cjs.map +1 -1
- package/dist/components/TextEllipsis/helper.d.ts.map +1 -1
- package/dist/components/TextEllipsis/helper.js +1 -1
- package/dist/components/TextEllipsis/helper.js.map +1 -1
- package/dist/components/TextEllipsis/index2.cjs +14 -98
- package/dist/components/TextEllipsis/index2.cjs.map +1 -1
- package/dist/components/TextEllipsis/index2.js +14 -93
- package/dist/components/TextEllipsis/index2.js.map +1 -1
- package/dist/components/TextField/AssistiveText/index.d.ts +1 -1
- package/dist/components/TextField/AssistiveText/index2.cjs.map +1 -1
- package/dist/components/TextField/AssistiveText/index2.js.map +1 -1
- package/dist/components/TextField/index.d.ts +1 -1
- package/dist/components/TextField/index.d.ts.map +1 -1
- package/dist/components/TextField/index2.cjs +1 -1
- package/dist/components/TextField/index2.cjs.map +1 -1
- package/dist/components/TextField/index2.js.map +1 -1
- package/dist/components/TextField/useFocusWithClick.cjs +0 -1
- package/dist/components/TextField/useFocusWithClick.cjs.map +1 -1
- package/dist/components/TextField/useFocusWithClick.js.map +1 -1
- package/dist/core/CharcoalProvider.cjs +1 -1
- package/dist/core/CharcoalProvider.cjs.map +1 -1
- package/dist/core/CharcoalProvider.js.map +1 -1
- package/dist/core/SSRProvider.cjs +1 -1
- package/dist/core/SSRProvider.cjs.map +1 -1
- package/dist/core/SSRProvider.js +1 -1
- package/dist/core/SSRProvider.js.map +1 -1
- package/dist/core/SetThemeScript.cjs +0 -1
- package/dist/core/SetThemeScript.cjs.map +1 -1
- package/dist/core/SetThemeScript.js.map +1 -1
- package/dist/core/themeHelper.cjs +0 -1
- package/dist/core/themeHelper.cjs.map +1 -1
- package/dist/core/themeHelper.d.ts +2 -2
- package/dist/core/themeHelper.d.ts.map +1 -1
- package/dist/core/themeHelper.js.map +1 -1
- package/dist/index.cjs +22 -23
- package/dist/index.css +907 -901
- package/dist/layered.css +907 -901
- package/dist/layered.css.map +1 -1
- package/package.json +10 -10
- package/src/__tests__/css-shorthand-safety.test.ts +150 -0
- package/src/_lib/compat.ts +1 -7
- package/src/components/Button/__snapshots__/index.css.snap +8 -3
- package/src/components/Button/index.css +8 -3
- package/src/components/Carousel/index.browser.test.tsx +1 -1
- package/src/components/Carousel/intersectionObserver.test.ts +12 -12
- package/src/components/Carousel/resizeObserver.test.ts +1 -1
- package/src/components/DropdownSelector/MenuItem/index.tsx +40 -2
- package/src/components/DropdownSelector/Popover/index.tsx +20 -1
- package/src/components/DropdownSelector/index.browser.test.tsx +94 -0
- package/src/components/DropdownSelector/index.test.tsx +57 -2
- package/src/components/DropdownSelector/index.tsx +37 -12
- package/src/components/FieldLabel/index.tsx +1 -2
- package/src/components/Icon/index.tsx +2 -1
- package/src/components/LoadingSpinner/__snapshots__/index.css.snap +1 -2
- package/src/components/LoadingSpinner/index.css +1 -2
- package/src/components/Modal/__snapshots__/index.css.snap +1 -0
- package/src/components/Pagination/__snapshots__/index.css.snap +3 -1
- package/src/components/Pagination/index.css +3 -1
- package/src/components/TextEllipsis/TextEllipsis.story.tsx +1 -1
- package/src/css.d.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../../src/components/Radio/RadioGroup/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { forwardRef, useCallback, useMemo, type JSX } from 'react'\nimport * as React from 'react'\nimport { useClassNames } from '../../../_lib/useClassNames'\nimport { RadioGroupContext } from '../RadioGroupContext'\n\nexport type RadioGroupProps<Value extends string = string> =\n React.PropsWithChildren<{\n className?: string\n value?: Value\n /**\n * aria-label of RadioGroup\n */\n label?: string\n name: string\n onChange(next: Value): void\n disabled?: boolean\n readonly?: boolean\n invalid?: boolean\n ref?: React.Ref<HTMLDivElement>\n 'aria-labelledby'?: React.ComponentProps<'div'>['aria-labelledby']\n 'aria-orientation'?: React.ComponentProps<'div'>['aria-orientation']\n }>\n\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps<string>>(\n function RadioGroupInner(\n {\n value,\n label,\n name,\n onChange,\n disabled,\n readonly,\n invalid,\n children,\n 'aria-orientation': ariaOrientation = 'vertical',\n ...props\n },\n ref,\n ) {\n const classNames = useClassNames('charcoal-radio-group', props.className)\n\n const handleChange = useCallback(\n (next: string) => {\n onChange(next)\n },\n [onChange],\n )\n\n const contextValue = useMemo(\n () => ({\n name,\n selected: value,\n disabled: disabled ?? false,\n readonly: readonly ?? false,\n invalid: invalid ?? false,\n onChange: handleChange,\n }),\n [disabled, handleChange, invalid, name, readonly, value],\n )\n\n return (\n <RadioGroupContext.Provider value={contextValue}>\n <div\n role=\"radiogroup\"\n aria-disabled={disabled}\n aria-invalid={invalid}\n aria-label={label}\n aria-labelledby={props['aria-labelledby']}\n aria-orientation={ariaOrientation}\n className={classNames}\n ref={ref}\n >\n {children}\n </div>\n </RadioGroupContext.Provider>\n )\n },\n) as <Value extends string>(props: RadioGroupProps<Value>) => JSX.Element\n"],"mappings":";;;;;;;;;;AAyBA,MAAa,mCACX,SAAS,gBACP,EACE,OACA,OACA,MACA,UACA,UACA,UACA,SACA,UACA,oBAAoB,kBAAkB,YACtC,GAAG,SAEL,KACA;CACA,MAAM,aAAa,oCAAc,wBAAwB,MAAM,SAAS;CAExE,MAAM,uCACH,SAAiB;EAChB,SAAS,IAAI;CACf,GACA,CAAC,QAAQ,CACX;CAEA,MAAM,yCACG;EACL;EACA,UAAU;EACV,UAAU,YAAY;EACtB,UAAU,YAAY;EACtB,SAAS,WAAW;EACpB,UAAU;CACZ,IACA;EAAC;EAAU;EAAc;EAAS;EAAM;EAAU;CAAK,CACzD;CAEA,OACE,2CAAC,4CAAkB,UAAnB;EAA4B,OAAO;YACjC,2CAAC,OAAD;GACE,MAAK;GACL,iBAAe;GACf,gBAAc;GACd,cAAY;GACZ,mBAAiB,MAAM;GACvB,oBAAkB;GAClB,WAAW;GACN;GAEJ;EACE;CACqB;AAEhC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../../src/components/Radio/RadioGroup/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { forwardRef, useCallback, useMemo, type JSX } from 'react'\nimport * as React from 'react'\nimport { useClassNames } from '../../../_lib/useClassNames'\nimport { RadioGroupContext } from '../RadioGroupContext'\n\nexport type RadioGroupProps<Value extends string = string> =\n React.PropsWithChildren<{\n className?: string\n value?: Value\n /**\n * aria-label of RadioGroup\n */\n label?: string\n name: string\n onChange(next: Value): void\n disabled?: boolean\n readonly?: boolean\n invalid?: boolean\n ref?: React.Ref<HTMLDivElement>\n 'aria-labelledby'?: React.ComponentProps<'div'>['aria-labelledby']\n 'aria-orientation'?: React.ComponentProps<'div'>['aria-orientation']\n }>\n\nexport const RadioGroup = forwardRef<HTMLDivElement, RadioGroupProps<string>>(\n function RadioGroupInner(\n {\n value,\n label,\n name,\n onChange,\n disabled,\n readonly,\n invalid,\n children,\n 'aria-orientation': ariaOrientation = 'vertical',\n ...props\n },\n ref,\n ) {\n const classNames = useClassNames('charcoal-radio-group', props.className)\n\n const handleChange = useCallback(\n (next: string) => {\n onChange(next)\n },\n [onChange],\n )\n\n const contextValue = useMemo(\n () => ({\n name,\n selected: value,\n disabled: disabled ?? false,\n readonly: readonly ?? false,\n invalid: invalid ?? false,\n onChange: handleChange,\n }),\n [disabled, handleChange, invalid, name, readonly, value],\n )\n\n return (\n <RadioGroupContext.Provider value={contextValue}>\n <div\n role=\"radiogroup\"\n aria-disabled={disabled}\n aria-invalid={invalid}\n aria-label={label}\n aria-labelledby={props['aria-labelledby']}\n aria-orientation={ariaOrientation}\n className={classNames}\n ref={ref}\n >\n {children}\n </div>\n </RadioGroupContext.Provider>\n )\n },\n) as <Value extends string>(props: RadioGroupProps<Value>) => JSX.Element\n"],"mappings":";;;;;;;;AAyBA,MAAa,aAAa,WACxB,SAAS,gBACP,EACE,OACA,OACA,MACA,UACA,UACA,UACA,SACA,UACA,oBAAoB,kBAAkB,YACtC,GAAG,SAEL,KACA;CACA,MAAM,aAAa,cAAc,wBAAwB,MAAM,SAAS;CAExE,MAAM,eAAe,aAClB,SAAiB;EAChB,SAAS,IAAI;CACf,GACA,CAAC,QAAQ,CACX;CAEA,MAAM,eAAe,eACZ;EACL;EACA,UAAU;EACV,UAAU,YAAY;EACtB,UAAU,YAAY;EACtB,SAAS,WAAW;EACpB,UAAU;CACZ,IACA;EAAC;EAAU;EAAc;EAAS;EAAM;EAAU;CAAK,CACzD;CAEA,OACE,oBAAC,kBAAkB,UAAnB;EAA4B,OAAO;YACjC,oBAAC,OAAD;GACE,MAAK;GACL,iBAAe;GACf,gBAAc;GACd,cAAY;GACZ,mBAAiB,MAAM;GACvB,oBAAkB;GAClB,WAAW;GACN;GAEJ;EACE;CACqB;AAEhC,CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupContext.cjs","names":[
|
|
1
|
+
{"version":3,"file":"RadioGroupContext.cjs","names":[],"sources":["../../../src/components/Radio/RadioGroupContext.ts"],"sourcesContent":["import * as React from 'react'\n\nexport interface RadioGroupContext {\n name: string\n selected?: string\n disabled: boolean\n readonly: boolean\n invalid: boolean\n onChange: (next: string) => void\n}\n\nexport const RadioGroupContext = React.createContext<RadioGroupContext>({\n name: undefined as never,\n selected: undefined,\n disabled: false,\n readonly: false,\n invalid: false,\n onChange() {\n throw new Error(\n 'Cannot find onChange() handler. Perhaps you forgot to wrap with <RadioGroup> ?',\n )\n },\n})\n"],"mappings":";;;;;;AAWA,MAAa,oBAAoB,MAAM,cAAiC;CACtE,MAAM;CACN,UAAU;CACV,UAAU;CACV,UAAU;CACV,SAAS;CACT,WAAW;EACT,MAAM,IAAI,MACR,gFACF;CACF;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupContext.js","names":[
|
|
1
|
+
{"version":3,"file":"RadioGroupContext.js","names":[],"sources":["../../../src/components/Radio/RadioGroupContext.ts"],"sourcesContent":["import * as React from 'react'\n\nexport interface RadioGroupContext {\n name: string\n selected?: string\n disabled: boolean\n readonly: boolean\n invalid: boolean\n onChange: (next: string) => void\n}\n\nexport const RadioGroupContext = React.createContext<RadioGroupContext>({\n name: undefined as never,\n selected: undefined,\n disabled: false,\n readonly: false,\n invalid: false,\n onChange() {\n throw new Error(\n 'Cannot find onChange() handler. Perhaps you forgot to wrap with <RadioGroup> ?',\n )\n },\n})\n"],"mappings":";;;;AAWA,MAAa,oBAAoB,QAAM,cAAiC;CACtE,MAAM;CACN,UAAU;CACV,UAAU;CACV,UAAU;CACV,SAAS;CACT,WAAW;EACT,MAAM,IAAI,MACR,gFACF;CACF;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/RadioInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAKpB,KAAK,uBAAuB,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAEnD,MAAM,MAAM,eAAe,GAAG,uBAAuB,GACnD,IAAI,CAAC,UAAU,EAAE,MAAM,uBAAuB,GAAG,KAAK,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Radio/RadioInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAKpB,KAAK,uBAAuB,GAAG;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACnC,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAEnD,MAAM,MAAM,eAAe,GAAG,uBAAuB,GACnD,IAAI,CAAC,UAAU,EAAE,MAAM,uBAAuB,GAAG,KAAK,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../../src/components/Radio/RadioInput/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { forwardRef, memo, useCallback } from 'react'\nimport { useClassNames } from '../../../_lib/useClassNames'\n\ntype CharcoalRadioInputProps = {\n invalid?: boolean\n onChange?: (value: string) => void\n}\n\ntype InputProps = React.HTMLProps<HTMLInputElement>\n\nexport type RadioInputProps = CharcoalRadioInputProps &\n Omit<InputProps, keyof CharcoalRadioInputProps | 'ref'>\n\nconst RadioInput = forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ onChange, invalid, className, ...props }, ref) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const el = e.currentTarget\n onChange?.(el.value)\n },\n [onChange],\n )\n\n const classNames = useClassNames('charcoal-radio-input', className)\n\n return (\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <input\n className={classNames}\n ref={ref}\n type=\"radio\"\n onChange={handleChange}\n aria-invalid={invalid}\n {...props}\n />\n )\n },\n)\n\nexport default memo(RadioInput)\n"],"mappings":";;;;;;;AAeA,MAAM,mCACJ,SAAS,WAAW,EAAE,UAAU,SAAS,WAAW,GAAG,SAAS,KAAK;CACnE,MAAM,uCACH,MAA2C;EAC1C,MAAM,KAAK,EAAE;EACb,WAAW,GAAG,KAAK;CACrB,GACA,CAAC,QAAQ,CACX;CAIA,OAEE,2CAAC,SAAD;EACE,WALe,oCAAc,wBAAwB,SAK1C;EACN;EACL,MAAK;EACL,UAAU;EACV,gBAAc;EACd,GAAI;CAAM;AAGhB,CACF;AAEA,yCAAoB,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../../src/components/Radio/RadioInput/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { forwardRef, memo, useCallback } from 'react'\nimport { useClassNames } from '../../../_lib/useClassNames'\n\ntype CharcoalRadioInputProps = {\n invalid?: boolean\n onChange?: (value: string) => void\n}\n\ntype InputProps = React.HTMLProps<HTMLInputElement>\n\nexport type RadioInputProps = CharcoalRadioInputProps &\n Omit<InputProps, keyof CharcoalRadioInputProps | 'ref'>\n\nconst RadioInput = forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ onChange, invalid, className, ...props }, ref) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const el = e.currentTarget\n onChange?.(el.value)\n },\n [onChange],\n )\n\n const classNames = useClassNames('charcoal-radio-input', className)\n\n return (\n // eslint-disable-next-line jsx-a11y/role-supports-aria-props\n <input\n className={classNames}\n ref={ref}\n type=\"radio\"\n onChange={handleChange}\n aria-invalid={invalid}\n {...props}\n />\n )\n },\n)\n\nexport default memo(RadioInput)\n"],"mappings":";;;;;;;AAeA,MAAM,aAAa,WACjB,SAAS,WAAW,EAAE,UAAU,SAAS,WAAW,GAAG,SAAS,KAAK;CACnE,MAAM,eAAe,aAClB,MAA2C;EAC1C,MAAM,KAAK,EAAE;EACb,WAAW,GAAG,KAAK;CACrB,GACA,CAAC,QAAQ,CACX;CAIA,OAEE,oBAAC,SAAD;EACE,WALe,cAAc,wBAAwB,SAK1C;EACN;EACL,MAAK;EACL,UAAU;EACV,gBAAc;EACd,GAAI;CAAM;AAGhB,CACF;AAEA,yBAAe,KAAK,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;;WAHO,MAAM;eACF,OAAO;gBACN,MAAM
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Radio/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;;WAHO,MAAM;eACF,OAAO;gBACN,MAAM"}
|
|
@@ -5,10 +5,10 @@ require('./index.cjs');
|
|
|
5
5
|
const require_RadioGroupContext = require('./RadioGroupContext.cjs');
|
|
6
6
|
const require_index$1 = require('./RadioInput/index2.cjs');
|
|
7
7
|
let react = require("react");
|
|
8
|
-
react = require_runtime.__toESM(react);
|
|
8
|
+
react = require_runtime.__toESM(react, 1);
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let warning = require("warning");
|
|
11
|
-
warning = require_runtime.__toESM(warning);
|
|
11
|
+
warning = require_runtime.__toESM(warning, 1);
|
|
12
12
|
|
|
13
13
|
//#region src/components/Radio/index.tsx
|
|
14
14
|
const Radio = (0, react.forwardRef)(function RadioInner({ value, disabled = false, children, ...props }, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../src/components/Radio/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { memo, forwardRef, useContext } from 'react'\nimport * as React from 'react'\nimport warning from 'warning'\nimport { useClassNames } from '../../_lib/useClassNames'\n\nimport { RadioGroupContext } from './RadioGroupContext'\nimport RadioInput from './RadioInput'\n\nexport type RadioProps = React.PropsWithChildren<{\n value: string\n disabled?: boolean\n className?: string\n}>\n\nconst Radio = forwardRef<HTMLInputElement, RadioProps>(function RadioInner(\n { value, disabled = false, children, ...props },\n ref,\n) {\n const {\n name,\n selected,\n disabled: isParentDisabled,\n readonly,\n invalid,\n onChange,\n } = useContext(RadioGroupContext)\n\n const classNames = useClassNames('charcoal-radio__label', props.className)\n\n warning(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n name !== undefined,\n `\"name\" is not Provided for <Radio>. Perhaps you forgot to wrap with <RadioGroup> ?`,\n )\n\n const isSelected = value === selected\n const isDisabled = disabled || isParentDisabled\n const isReadonly = readonly && !isSelected\n\n return (\n <label aria-disabled={isDisabled || isReadonly} className={classNames}>\n <RadioInput\n name={name}\n value={value}\n checked={isSelected}\n aria-invalid={invalid}\n onChange={onChange}\n disabled={isDisabled || isReadonly}\n ref={ref}\n />\n {children != null && (\n <div className=\"charcoal-radio__label_div\">{children}</div>\n )}\n </label>\n )\n})\n\nexport default memo(Radio)\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAM,8BAAiD,SAAS,WAC9D,EAAE,OAAO,WAAW,OAAO,UAAU,GAAG,SACxC,KACA;CACA,MAAM,EACJ,MACA,UACA,UAAU,kBACV,UACA,SACA,mCACa,2CAAiB;CAEhC,MAAM,aAAa,oCAAc,yBAAyB,MAAM,SAAS;CAEzE,qBAEE,SAAS,QACT,oFACF;CAEA,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,YAAY;CAC/B,MAAM,aAAa,YAAY,CAAC;CAEhC,OACE,4CAAC,SAAD;EAAO,iBAAe,cAAc;EAAY,WAAW;YAA3D,CACE,2CAAC,yBAAD;GACQ;GACC;GACP,SAAS;GACT,gBAAc;GACJ;GACV,UAAU,cAAc;GACnB;EAAI,IAEV,YAAY,QACX,2CAAC,OAAD;GAAK,WAAU;GAA6B;EAAc,EAEvD;;AAEX,CAAC;AAED,oCAAoB,KAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../src/components/Radio/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { memo, forwardRef, useContext } from 'react'\nimport * as React from 'react'\nimport warning from 'warning'\nimport { useClassNames } from '../../_lib/useClassNames'\n\nimport { RadioGroupContext } from './RadioGroupContext'\nimport RadioInput from './RadioInput'\n\nexport type RadioProps = React.PropsWithChildren<{\n value: string\n disabled?: boolean\n className?: string\n}>\n\nconst Radio = forwardRef<HTMLInputElement, RadioProps>(function RadioInner(\n { value, disabled = false, children, ...props },\n ref,\n) {\n const {\n name,\n selected,\n disabled: isParentDisabled,\n readonly,\n invalid,\n onChange,\n } = useContext(RadioGroupContext)\n\n const classNames = useClassNames('charcoal-radio__label', props.className)\n\n warning(\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n name !== undefined,\n `\"name\" is not Provided for <Radio>. Perhaps you forgot to wrap with <RadioGroup> ?`,\n )\n\n const isSelected = value === selected\n const isDisabled = disabled || isParentDisabled\n const isReadonly = readonly && !isSelected\n\n return (\n <label aria-disabled={isDisabled || isReadonly} className={classNames}>\n <RadioInput\n name={name}\n value={value}\n checked={isSelected}\n aria-invalid={invalid}\n onChange={onChange}\n disabled={isDisabled || isReadonly}\n ref={ref}\n />\n {children != null && (\n <div className=\"charcoal-radio__label_div\">{children}</div>\n )}\n </label>\n )\n})\n\nexport default memo(Radio)\n"],"mappings":";;;;;;;;;;AAgBA,MAAM,QAAQ,WAAyC,SAAS,WAC9D,EAAE,OAAO,WAAW,OAAO,UAAU,GAAG,SACxC,KACA;CACA,MAAM,EACJ,MACA,UACA,UAAU,kBACV,UACA,SACA,aACE,WAAW,iBAAiB;CAEhC,MAAM,aAAa,cAAc,yBAAyB,MAAM,SAAS;CAEzE,QAEE,SAAS,QACT,oFACF;CAEA,MAAM,aAAa,UAAU;CAC7B,MAAM,aAAa,YAAY;CAC/B,MAAM,aAAa,YAAY,CAAC;CAEhC,OACE,qBAAC,SAAD;EAAO,iBAAe,cAAc;EAAY,WAAW;YAA3D,CACE,oBAAC,oBAAD;GACQ;GACC;GACP,SAAS;GACT,gBAAc;GACJ;GACV,UAAU,cAAc;GACnB;EAAI,IAEV,YAAY,QACX,oBAAC,OAAD;GAAK,WAAU;GAA6B;EAAc,EAEvD;;AAEX,CAAC;AAED,oBAAe,KAAK,KAAK"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
let react = require("react");
|
|
4
|
-
react = require_runtime.__toESM(react);
|
|
4
|
+
react = require_runtime.__toESM(react, 1);
|
|
5
5
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
6
|
|
|
7
7
|
//#region src/components/SegmentedControl/RadioGroupContext.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupContext.cjs","names":[
|
|
1
|
+
{"version":3,"file":"RadioGroupContext.cjs","names":[],"sources":["../../../src/components/SegmentedControl/RadioGroupContext.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport * as React from 'react'\nimport { RadioGroupState } from 'react-stately/useRadioGroupState'\n\nconst RadioContext = createContext<RadioGroupState | null>(null)\n\ntype RadioProviderProps = React.PropsWithChildren<{\n value: RadioGroupState\n}>\nexport const RadioProvider: React.FC<RadioProviderProps> = ({\n value,\n children,\n}) => {\n return <RadioContext.Provider value={value}>{children}</RadioContext.Provider>\n}\nexport const useRadioContext = () => {\n const state = useContext(RadioContext)\n\n if (state === null)\n throw new Error('`<RadioProvider>` is not likely mounted.')\n\n return state\n}\n"],"mappings":";;;;;;;AAIA,MAAM,wCAAqD,IAAI;AAK/D,MAAa,iBAA+C,EAC1D,OACA,eACI;CACJ,OAAO,2CAAC,aAAa,UAAd;EAA8B;EAAQ;CAAgC;AAC/E;AACA,MAAa,wBAAwB;CACnC,MAAM,8BAAmB,YAAY;CAErC,IAAI,UAAU,MACZ,MAAM,IAAI,MAAM,0CAA0C;CAE5D,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupContext.js","names":[
|
|
1
|
+
{"version":3,"file":"RadioGroupContext.js","names":[],"sources":["../../../src/components/SegmentedControl/RadioGroupContext.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport * as React from 'react'\nimport { RadioGroupState } from 'react-stately/useRadioGroupState'\n\nconst RadioContext = createContext<RadioGroupState | null>(null)\n\ntype RadioProviderProps = React.PropsWithChildren<{\n value: RadioGroupState\n}>\nexport const RadioProvider: React.FC<RadioProviderProps> = ({\n value,\n children,\n}) => {\n return <RadioContext.Provider value={value}>{children}</RadioContext.Provider>\n}\nexport const useRadioContext = () => {\n const state = useContext(RadioContext)\n\n if (state === null)\n throw new Error('`<RadioProvider>` is not likely mounted.')\n\n return state\n}\n"],"mappings":";;;;;AAIA,MAAM,eAAe,cAAsC,IAAI;AAK/D,MAAa,iBAA+C,EAC1D,OACA,eACI;CACJ,OAAO,oBAAC,aAAa,UAAd;EAA8B;EAAQ;CAAgC;AAC/E;AACA,MAAa,wBAAwB;CACnC,MAAM,QAAQ,WAAW,YAAY;CAErC,IAAI,UAAU,MACZ,MAAM,IAAI,MAAM,0CAA0C;CAE5D,OAAO;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,aAAa,CAAA;AAUpB,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAE5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAE9B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAAA;IAEhD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SegmentedControl/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,aAAa,CAAA;AAUpB,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;IAE5B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAA;IAE9B,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAAA;IAEhD,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAC5C,CAAA"}
|
|
@@ -4,7 +4,7 @@ const require_useClassNames = require('../../_lib/useClassNames.cjs');
|
|
|
4
4
|
const require_RadioGroupContext = require('./RadioGroupContext.cjs');
|
|
5
5
|
require('./index.cjs');
|
|
6
6
|
let react = require("react");
|
|
7
|
-
react = require_runtime.__toESM(react);
|
|
7
|
+
react = require_runtime.__toESM(react, 1);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let react_aria_useRadioGroup = require("react-aria/useRadioGroup");
|
|
10
10
|
let react_stately_useRadioGroupState = require("react-stately/useRadioGroupState");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../src/components/SegmentedControl/index.tsx"],"sourcesContent":["import { ReactNode, forwardRef, memo, useMemo, useRef } from 'react'\nimport * as React from 'react'\nimport { RadioProvider, useRadioContext } from './RadioGroupContext'\nimport { useClassNames } from '../../_lib/useClassNames'\nimport './index.css'\nimport {\n AriaRadioGroupProps,\n AriaRadioProps,\n useRadio,\n useRadioGroup,\n} from 'react-aria/useRadioGroup'\n\nimport { useRadioGroupState } from 'react-stately/useRadioGroupState'\n\ntype SegmentedControlItem = {\n label: React.ReactNode\n value: string\n disabled?: boolean\n}\n\nexport type SegmentedControlProps = {\n readonly id?: string\n readonly name?: string\n readonly disabled?: boolean\n readonly readonly?: boolean\n readonly required?: boolean\n readonly className?: string\n readonly uniformSegmentWidth?: boolean\n readonly fullWidth?: boolean\n\n readonly value?: string\n readonly defaultValue?: string\n\n readonly data: string[] | SegmentedControlItem[]\n\n readonly onChange?: (value: string) => void\n}\n\nconst SegmentedControl = forwardRef<HTMLDivElement, SegmentedControlProps>(\n function SegmentedControlInner(props, ref) {\n const className = useClassNames(\n 'charcoal-segmented-control',\n props.className,\n )\n\n const ariaRadioGroupProps = useMemo<AriaRadioGroupProps>(\n () => ({\n ...props,\n isDisabled: props.disabled,\n isReadOnly: props.readonly,\n isRequired: props.required,\n 'aria-label': props.name,\n }),\n [props],\n )\n const state = useRadioGroupState(ariaRadioGroupProps)\n const { radioGroupProps } = useRadioGroup(ariaRadioGroupProps, state)\n const segmentedControlItems = useMemo<SegmentedControlItem[]>(() => {\n return props.data.map((d) =>\n typeof d === 'string' ? { value: d, label: d } : d,\n )\n }, [props.data])\n\n return (\n <div\n ref={ref}\n {...radioGroupProps}\n className={className}\n data-uniform-segment-width={props.uniformSegmentWidth}\n data-full-width={props.fullWidth}\n >\n <RadioProvider value={state}>\n {segmentedControlItems.map((item) => (\n <Segmented\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n uniformSegmentWidth={props.uniformSegmentWidth}\n >\n {item.label}\n </Segmented>\n ))}\n </RadioProvider>\n </div>\n )\n },\n)\n\nexport default memo(SegmentedControl)\n\ntype RadioProps = {\n value: string\n disabled?: boolean\n children?: ReactNode\n uniformSegmentWidth?: boolean\n fullWidth?: boolean\n}\n\nconst Segmented = (props: RadioProps) => {\n const state = useRadioContext()\n const ref = useRef<HTMLInputElement>(null)\n const ariaRadioProps = useMemo<AriaRadioProps>(\n () => ({\n value: props.value,\n isDisabled: props.disabled,\n children: props.children,\n }),\n [props],\n )\n\n const { inputProps, isDisabled, isSelected } = useRadio(\n ariaRadioProps,\n state,\n ref,\n )\n\n return (\n <label\n className=\"charcoal-segmented-control-radio__label\"\n aria-disabled={isDisabled || state.isReadOnly}\n data-checked={isSelected}\n data-uniform-segment-width={props.uniformSegmentWidth}\n data-full-width={props.fullWidth}\n >\n <input\n className=\"charcoal-segmented-control-radio__input\"\n {...inputProps}\n ref={ref}\n />\n {props.children}\n </label>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,MAAM,yCACJ,SAAS,sBAAsB,OAAO,KAAK;CACzC,MAAM,YAAY,oCAChB,8BACA,MAAM,SACR;CAEA,MAAM,gDACG;EACL,GAAG;EACH,YAAY,MAAM;EAClB,YAAY,MAAM;EAClB,YAAY,MAAM;EAClB,cAAc,MAAM;CACtB,IACA,CAAC,KAAK,CACR;CACA,MAAM,iEAA2B,mBAAmB;CACpD,MAAM,EAAE,gEAAkC,qBAAqB,KAAK;CACpE,MAAM,iDAA8D;EAClE,OAAO,MAAM,KAAK,KAAK,MACrB,OAAO,MAAM,WAAW;GAAE,OAAO;GAAG,OAAO;EAAE,IAAI,CACnD;CACF,GAAG,CAAC,MAAM,IAAI,CAAC;CAEf,OACE,2CAAC,OAAD;EACO;EACL,GAAI;EACO;EACX,8BAA4B,MAAM;EAClC,mBAAiB,MAAM;YAEvB,2CAAC,yCAAD;GAAe,OAAO;aACnB,sBAAsB,KAAK,SAC1B,2CAAC,WAAD;IAEE,OAAO,KAAK;IACZ,UAAU,KAAK;IACf,qBAAqB,MAAM;cAE1B,KAAK;GACG,GANJ,KAAK,KAMD,CACZ;EACY;CACZ;AAET,CACF;AAEA,+CAAoB,gBAAgB;AAUpC,MAAM,aAAa,UAAsB;CACvC,MAAM,QAAQ,0CAAgB;CAC9B,MAAM,wBAA+B,IAAI;CAUzC,MAAM,EAAE,YAAY,YAAY,gFARvB;EACL,OAAO,MAAM;EACb,YAAY,MAAM;EAClB,UAAU,MAAM;CAClB,IACA,CAAC,KAAK,CAIN,GACA,OACA,GACF;CAEA,OACE,4CAAC,SAAD;EACE,WAAU;EACV,iBAAe,cAAc,MAAM;EACnC,gBAAc;EACd,8BAA4B,MAAM;EAClC,mBAAiB,MAAM;YALzB,CAOE,2CAAC,SAAD;GACE,WAAU;GACV,GAAI;GACC;EAAI,IAEV,MAAM,QACF;;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../src/components/SegmentedControl/index.tsx"],"sourcesContent":["import { ReactNode, forwardRef, memo, useMemo, useRef } from 'react'\nimport * as React from 'react'\nimport { RadioProvider, useRadioContext } from './RadioGroupContext'\nimport { useClassNames } from '../../_lib/useClassNames'\nimport './index.css'\nimport {\n AriaRadioGroupProps,\n AriaRadioProps,\n useRadio,\n useRadioGroup,\n} from 'react-aria/useRadioGroup'\n\nimport { useRadioGroupState } from 'react-stately/useRadioGroupState'\n\ntype SegmentedControlItem = {\n label: React.ReactNode\n value: string\n disabled?: boolean\n}\n\nexport type SegmentedControlProps = {\n readonly id?: string\n readonly name?: string\n readonly disabled?: boolean\n readonly readonly?: boolean\n readonly required?: boolean\n readonly className?: string\n readonly uniformSegmentWidth?: boolean\n readonly fullWidth?: boolean\n\n readonly value?: string\n readonly defaultValue?: string\n\n readonly data: string[] | SegmentedControlItem[]\n\n readonly onChange?: (value: string) => void\n}\n\nconst SegmentedControl = forwardRef<HTMLDivElement, SegmentedControlProps>(\n function SegmentedControlInner(props, ref) {\n const className = useClassNames(\n 'charcoal-segmented-control',\n props.className,\n )\n\n const ariaRadioGroupProps = useMemo<AriaRadioGroupProps>(\n () => ({\n ...props,\n isDisabled: props.disabled,\n isReadOnly: props.readonly,\n isRequired: props.required,\n 'aria-label': props.name,\n }),\n [props],\n )\n const state = useRadioGroupState(ariaRadioGroupProps)\n const { radioGroupProps } = useRadioGroup(ariaRadioGroupProps, state)\n const segmentedControlItems = useMemo<SegmentedControlItem[]>(() => {\n return props.data.map((d) =>\n typeof d === 'string' ? { value: d, label: d } : d,\n )\n }, [props.data])\n\n return (\n <div\n ref={ref}\n {...radioGroupProps}\n className={className}\n data-uniform-segment-width={props.uniformSegmentWidth}\n data-full-width={props.fullWidth}\n >\n <RadioProvider value={state}>\n {segmentedControlItems.map((item) => (\n <Segmented\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n uniformSegmentWidth={props.uniformSegmentWidth}\n >\n {item.label}\n </Segmented>\n ))}\n </RadioProvider>\n </div>\n )\n },\n)\n\nexport default memo(SegmentedControl)\n\ntype RadioProps = {\n value: string\n disabled?: boolean\n children?: ReactNode\n uniformSegmentWidth?: boolean\n fullWidth?: boolean\n}\n\nconst Segmented = (props: RadioProps) => {\n const state = useRadioContext()\n const ref = useRef<HTMLInputElement>(null)\n const ariaRadioProps = useMemo<AriaRadioProps>(\n () => ({\n value: props.value,\n isDisabled: props.disabled,\n children: props.children,\n }),\n [props],\n )\n\n const { inputProps, isDisabled, isSelected } = useRadio(\n ariaRadioProps,\n state,\n ref,\n )\n\n return (\n <label\n className=\"charcoal-segmented-control-radio__label\"\n aria-disabled={isDisabled || state.isReadOnly}\n data-checked={isSelected}\n data-uniform-segment-width={props.uniformSegmentWidth}\n data-full-width={props.fullWidth}\n >\n <input\n className=\"charcoal-segmented-control-radio__input\"\n {...inputProps}\n ref={ref}\n />\n {props.children}\n </label>\n )\n}\n"],"mappings":";;;;;;;;;;AAsCA,MAAM,mBAAmB,WACvB,SAAS,sBAAsB,OAAO,KAAK;CACzC,MAAM,YAAY,cAChB,8BACA,MAAM,SACR;CAEA,MAAM,sBAAsB,eACnB;EACL,GAAG;EACH,YAAY,MAAM;EAClB,YAAY,MAAM;EAClB,YAAY,MAAM;EAClB,cAAc,MAAM;CACtB,IACA,CAAC,KAAK,CACR;CACA,MAAM,QAAQ,mBAAmB,mBAAmB;CACpD,MAAM,EAAE,oBAAoB,cAAc,qBAAqB,KAAK;CACpE,MAAM,wBAAwB,cAAsC;EAClE,OAAO,MAAM,KAAK,KAAK,MACrB,OAAO,MAAM,WAAW;GAAE,OAAO;GAAG,OAAO;EAAE,IAAI,CACnD;CACF,GAAG,CAAC,MAAM,IAAI,CAAC;CAEf,OACE,oBAAC,OAAD;EACO;EACL,GAAI;EACO;EACX,8BAA4B,MAAM;EAClC,mBAAiB,MAAM;YAEvB,oBAAC,eAAD;GAAe,OAAO;aACnB,sBAAsB,KAAK,SAC1B,oBAAC,WAAD;IAEE,OAAO,KAAK;IACZ,UAAU,KAAK;IACf,qBAAqB,MAAM;cAE1B,KAAK;GACG,GANJ,KAAK,KAMD,CACZ;EACY;CACZ;AAET,CACF;AAEA,+BAAe,KAAK,gBAAgB;AAUpC,MAAM,aAAa,UAAsB;CACvC,MAAM,QAAQ,gBAAgB;CAC9B,MAAM,MAAM,OAAyB,IAAI;CAUzC,MAAM,EAAE,YAAY,YAAY,eAAe,SATxB,eACd;EACL,OAAO,MAAM;EACb,YAAY,MAAM;EAClB,UAAU,MAAM;CAClB,IACA,CAAC,KAAK,CAIN,GACA,OACA,GACF;CAEA,OACE,qBAAC,SAAD;EACE,WAAU;EACV,iBAAe,cAAc,MAAM;EACnC,gBAAc;EACd,8BAA4B,MAAM;EAClC,mBAAiB,MAAM;YALzB,CAOE,oBAAC,SAAD;GACE,WAAU;GACV,GAAI;GACC;EAAI,IAEV,MAAM,QACF;;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/SwitchInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAKpB,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAEnD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAChD,IAAI,CAAC,UAAU,EAAE,MAAM,mBAAmB,GAAG,KAAK,CAAC,CAAA;AAErD,QAAA,MAAM,WAAW,iIAsBf,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch/SwitchInput/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAKpB,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;CACtC,CAAA;AAED,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAA;AAEnD,MAAM,MAAM,gBAAgB,GAAG,mBAAmB,GAChD,IAAI,CAAC,UAAU,EAAE,MAAM,mBAAmB,GAAG,KAAK,CAAC,CAAA;AAErD,QAAA,MAAM,WAAW,iIAsBf,CAAA;eAEa,WAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../../src/components/Switch/SwitchInput/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { forwardRef, useCallback } from 'react'\nimport { useClassNames } from '../../../_lib/useClassNames'\n\nexport type CharcoalSwitchProps = {\n onChange?: (checked: boolean) => void\n}\n\ntype InputProps = React.HTMLProps<HTMLInputElement>\n\nexport type SwitchInputProps = CharcoalSwitchProps &\n Omit<InputProps, keyof CharcoalSwitchProps | 'ref'>\n\nconst SwitchInput = forwardRef<\n HTMLInputElement,\n Omit<SwitchInputProps, 'children'>\n>(function SwitchInput({ onChange, className, ...props }, ref) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const el = e.currentTarget\n onChange?.(el.checked)\n },\n [onChange],\n )\n\n const classNames = useClassNames('charcoal-switch-input', className)\n return (\n <input\n ref={ref}\n className={classNames}\n type=\"checkbox\"\n onChange={handleChange}\n {...props}\n />\n )\n})\n\nexport default SwitchInput\n"],"mappings":";;;;;;;AAcA,MAAM,oCAGJ,SAAS,YAAY,EAAE,UAAU,WAAW,GAAG,SAAS,KAAK;CAC7D,MAAM,uCACH,MAA2C;EAC1C,MAAM,KAAK,EAAE;EACb,WAAW,GAAG,OAAO;CACvB,GACA,CAAC,QAAQ,CACX;CAGA,OACE,2CAAC,SAAD;EACO;EACL,WAJe,oCAAc,yBAAyB,SAI3C;EACX,MAAK;EACL,UAAU;EACV,GAAI;CAAM;AAGhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../../src/components/Switch/SwitchInput/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { forwardRef, useCallback } from 'react'\nimport { useClassNames } from '../../../_lib/useClassNames'\n\nexport type CharcoalSwitchProps = {\n onChange?: (checked: boolean) => void\n}\n\ntype InputProps = React.HTMLProps<HTMLInputElement>\n\nexport type SwitchInputProps = CharcoalSwitchProps &\n Omit<InputProps, keyof CharcoalSwitchProps | 'ref'>\n\nconst SwitchInput = forwardRef<\n HTMLInputElement,\n Omit<SwitchInputProps, 'children'>\n>(function SwitchInput({ onChange, className, ...props }, ref) {\n const handleChange = useCallback(\n (e: React.ChangeEvent<HTMLInputElement>) => {\n const el = e.currentTarget\n onChange?.(el.checked)\n },\n [onChange],\n )\n\n const classNames = useClassNames('charcoal-switch-input', className)\n return (\n <input\n ref={ref}\n className={classNames}\n type=\"checkbox\"\n onChange={handleChange}\n {...props}\n />\n )\n})\n\nexport default SwitchInput\n"],"mappings":";;;;;;;AAcA,MAAM,cAAc,WAGlB,SAAS,YAAY,EAAE,UAAU,WAAW,GAAG,SAAS,KAAK;CAC7D,MAAM,eAAe,aAClB,MAA2C;EAC1C,MAAM,KAAK,EAAE;EACb,WAAW,GAAG,OAAO;CACvB,GACA,CAAC,QAAQ,CACX;CAGA,OACE,oBAAC,SAAD;EACO;EACL,WAJe,cAAc,yBAAyB,SAI3C;EACX,MAAK;EACL,UAAU;EACV,GAAI;CAAM;AAGhB,CAAC"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
3
|
const require_useClassNames = require('../../_lib/useClassNames.cjs');
|
|
4
4
|
let react = require("react");
|
|
5
|
-
react = require_runtime.__toESM(react);
|
|
5
|
+
react = require_runtime.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
|
|
8
8
|
//#region src/components/Switch/SwitchWithLabel.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchWithLabel.cjs","names":[
|
|
1
|
+
{"version":3,"file":"SwitchWithLabel.cjs","names":[],"sources":["../../../src/components/Switch/SwitchWithLabel.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useClassNames } from '../../_lib/useClassNames'\n\nexport const SwitchWithLabel = React.memo(function SwitchWithLabel({\n children,\n className,\n disabled,\n id,\n input,\n}: {\n children: React.ReactNode\n className?: string\n disabled?: boolean\n id?: string\n input: React.ReactNode\n}) {\n const classNames = useClassNames('charcoal-switch__label', className)\n return (\n <label htmlFor={id} className={classNames} aria-disabled={disabled}>\n {input}\n <div className=\"charcoal-switch__label_div\">{children}</div>\n </label>\n )\n})\n"],"mappings":";;;;;;;;AAGA,MAAa,kBAAkB,MAAM,KAAK,SAAS,gBAAgB,EACjE,UACA,WACA,UACA,IACA,SAOC;CAED,OACE,4CAAC,SAAD;EAAO,SAAS;EAAI,WAFH,oCAAc,0BAA0B,SAE1B;EAAY,iBAAe;YAA1D,CACG,OACD,2CAAC,OAAD;GAAK,WAAU;GAA8B;EAAc,EACtD;;AAEX,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
export declare const SwitchWithLabel: React.
|
|
2
|
+
export declare const SwitchWithLabel: React.MemoExoticComponent<({ children, className, disabled, id, input, }: {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
className?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
id?: string;
|
|
7
7
|
input: React.ReactNode;
|
|
8
|
-
}>;
|
|
8
|
+
}) => import("react/jsx-runtime").JSX.Element>;
|
|
9
9
|
//# sourceMappingURL=SwitchWithLabel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchWithLabel.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/SwitchWithLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,eAAO,MAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"SwitchWithLabel.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/SwitchWithLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,eAAO,MAAM,eAAe,4EAMzB;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB,6CAQC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwitchWithLabel.js","names":[
|
|
1
|
+
{"version":3,"file":"SwitchWithLabel.js","names":[],"sources":["../../../src/components/Switch/SwitchWithLabel.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useClassNames } from '../../_lib/useClassNames'\n\nexport const SwitchWithLabel = React.memo(function SwitchWithLabel({\n children,\n className,\n disabled,\n id,\n input,\n}: {\n children: React.ReactNode\n className?: string\n disabled?: boolean\n id?: string\n input: React.ReactNode\n}) {\n const classNames = useClassNames('charcoal-switch__label', className)\n return (\n <label htmlFor={id} className={classNames} aria-disabled={disabled}>\n {input}\n <div className=\"charcoal-switch__label_div\">{children}</div>\n </label>\n )\n})\n"],"mappings":";;;;;;AAGA,MAAa,kBAAkB,QAAM,KAAK,SAAS,gBAAgB,EACjE,UACA,WACA,UACA,IACA,SAOC;CAED,OACE,qBAAC,SAAD;EAAO,SAAS;EAAI,WAFH,cAAc,0BAA0B,SAE1B;EAAY,iBAAe;YAA1D,CACG,OACD,oBAAC,OAAD;GAAK,WAAU;GAA8B;EAAc,EACtD;;AAEX,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
import { type SwitchInputProps } from './SwitchInput';
|
|
3
3
|
export type SwitchProps = SwitchInputProps;
|
|
4
|
-
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SwitchInput").CharcoalSwitchProps & Omit<import("react").HTMLProps<HTMLInputElement>, "
|
|
4
|
+
declare const _default: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<import("./SwitchInput").CharcoalSwitchProps & Omit<import("react").HTMLProps<HTMLInputElement>, "onChange" | "ref"> & import("react").RefAttributes<HTMLInputElement>>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAIlE,MAAM,MAAM,WAAW,GAAG,gBAAgB,CAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Switch/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAGpB,OAAoB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAIlE,MAAM,MAAM,WAAW,GAAG,gBAAgB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../src/components/Switch/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { memo, forwardRef } from 'react'\nimport SwitchInput, { type SwitchInputProps } from './SwitchInput'\nimport { SwitchWithLabel } from './SwitchWithLabel'\nimport { useId } from 'react-aria/useId'\n\nexport type SwitchProps = SwitchInputProps\n\nconst Switch = forwardRef<HTMLInputElement, SwitchProps>(function Switch(\n { children, onChange, disabled, className, id, ...props },\n ref,\n) {\n const htmlId = useId(id)\n const noChildren = children === undefined\n const input = (\n <SwitchInput\n {...props}\n disabled={disabled}\n className={noChildren ? className : undefined}\n id={htmlId}\n onChange={onChange}\n ref={ref}\n role=\"switch\"\n type=\"checkbox\"\n />\n )\n\n if (noChildren) {\n return input\n }\n\n return (\n <SwitchWithLabel\n className={className}\n disabled={disabled}\n id={htmlId}\n input={input}\n >\n {children}\n </SwitchWithLabel>\n )\n})\n\nexport default memo(Switch)\n"],"mappings":";;;;;;;;;AASA,MAAM,+BAAmD,SAAS,OAChE,EAAE,UAAU,UAAU,UAAU,WAAW,IAAI,GAAG,SAClD,KACA;CACA,MAAM,qCAAe,EAAE;CACvB,MAAM,aAAa,aAAa;CAChC,MAAM,QACJ,2CAAC,yBAAD;EACE,GAAI;EACM;EACV,WAAW,aAAa,YAAY;EACpC,IAAI;EACM;EACL;EACL,MAAK;EACL,MAAK;CAAU;CAInB,IAAI,YACF,OAAO;CAGT,OACE,2CAAC,yCAAD;EACa;EACD;EACV,IAAI;EACG;EAEN;CACc;AAErB,CAAC;AAED,qCAAoB,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../src/components/Switch/index.tsx"],"sourcesContent":["import './index.css'\n\nimport { memo, forwardRef } from 'react'\nimport SwitchInput, { type SwitchInputProps } from './SwitchInput'\nimport { SwitchWithLabel } from './SwitchWithLabel'\nimport { useId } from 'react-aria/useId'\n\nexport type SwitchProps = SwitchInputProps\n\nconst Switch = forwardRef<HTMLInputElement, SwitchProps>(function Switch(\n { children, onChange, disabled, className, id, ...props },\n ref,\n) {\n const htmlId = useId(id)\n const noChildren = children === undefined\n const input = (\n <SwitchInput\n {...props}\n disabled={disabled}\n className={noChildren ? className : undefined}\n id={htmlId}\n onChange={onChange}\n ref={ref}\n role=\"switch\"\n type=\"checkbox\"\n />\n )\n\n if (noChildren) {\n return input\n }\n\n return (\n <SwitchWithLabel\n className={className}\n disabled={disabled}\n id={htmlId}\n input={input}\n >\n {children}\n </SwitchWithLabel>\n )\n})\n\nexport default memo(Switch)\n"],"mappings":";;;;;;;;;AASA,MAAM,SAAS,WAA0C,SAAS,OAChE,EAAE,UAAU,UAAU,UAAU,WAAW,IAAI,GAAG,SAClD,KACA;CACA,MAAM,SAAS,MAAM,EAAE;CACvB,MAAM,aAAa,aAAa;CAChC,MAAM,QACJ,oBAAC,aAAD;EACE,GAAI;EACM;EACV,WAAW,aAAa,YAAY;EACpC,IAAI;EACM;EACL;EACL,MAAK;EACL,MAAK;CAAU;CAInB,IAAI,YACF,OAAO;CAGT,OACE,oBAAC,iBAAD;EACa;EACD;EACV,IAAI;EACG;EAEN;CACc;AAErB,CAAC;AAED,qBAAe,KAAK,MAAM"}
|
|
@@ -18,6 +18,6 @@ export type TagItemProps<T extends React.ElementType = 'a'> = {
|
|
|
18
18
|
*/
|
|
19
19
|
component?: T;
|
|
20
20
|
} & Omit<React.ComponentPropsWithRef<T>, 'children' | 'disabled'>;
|
|
21
|
-
declare const _default: React.MemoExoticComponent
|
|
21
|
+
declare const _default: React.MemoExoticComponent<<T extends React.ElementType = "a">(p: TagItemProps<T>) => JSX.Element>;
|
|
22
22
|
export default _default;
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA2C,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAGhF,OAAO,aAAa,CAAA;AAKpB,KAAK,OAAO,GAAG;IACb,CAAC,EAAE,EAAE,CAAA;IACL,CAAC,EAAE,EAAE,CAAA;CACN,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAA;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAA;CACd,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TagItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA2C,KAAK,GAAG,EAAE,MAAM,OAAO,CAAA;AAGhF,OAAO,aAAa,CAAA;AAKpB,KAAK,OAAO,GAAG;IACb,CAAC,EAAE,EAAE,CAAA;IACL,CAAC,EAAE,EAAE,CAAA;CACN,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,IAAI;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAA;IAC1C,IAAI,CAAC,EAAE,MAAM,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,CAAA;CACd,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC,CAAA;mDA+E3D,CAAC,SAAS,KAAK,CAAC,WAAW,WAAW,YAAY,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO"}
|
|
@@ -4,7 +4,7 @@ const require_useClassNames = require('../../_lib/useClassNames.cjs');
|
|
|
4
4
|
const require_index = require('../Icon/index.cjs');
|
|
5
5
|
require('./index.cjs');
|
|
6
6
|
let react = require("react");
|
|
7
|
-
react = require_runtime.__toESM(react);
|
|
7
|
+
react = require_runtime.__toESM(react, 1);
|
|
8
8
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
9
|
let react_aria_useObjectRef = require("react-aria/useObjectRef");
|
|
10
10
|
let react_aria = require("react-aria");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.cjs","names":[
|
|
1
|
+
{"version":3,"file":"index2.cjs","names":[],"sources":["../../../src/components/TagItem/index.tsx"],"sourcesContent":["import React, { forwardRef, memo, useMemo, ForwardedRef, type JSX } from 'react'\nimport Icon from '../Icon'\nimport { useClassNames } from '../../_lib/useClassNames'\nimport './index.css'\n\nimport { useObjectRef } from 'react-aria/useObjectRef'\nimport { useLink } from 'react-aria'\n\ntype SizeMap = {\n S: 32\n M: 40\n}\n\nexport type TagItemProps<T extends React.ElementType = 'a'> = {\n label: string\n translatedLabel?: string\n bgColor?: string\n bgImage?: string\n status?: 'default' | 'active' | 'inactive'\n size?: keyof SizeMap\n disabled?: boolean\n /**\n * The component used for root element.\n * @type T extends React.ElementType = 'a'\n */\n component?: T\n} & Omit<React.ComponentPropsWithRef<T>, 'children' | 'disabled'>\n\nconst TagItem = forwardRef<HTMLAnchorElement, TagItemProps>(\n function TagItemInner<T extends React.ElementType>(\n {\n component,\n label,\n translatedLabel,\n bgColor = '#7ACCB1',\n bgImage,\n size = 'M',\n status = 'default',\n disabled,\n 'aria-disabled': ariaDisabled,\n ...props\n }: TagItemProps<T>,\n _ref: ForwardedRef<HTMLAnchorElement>,\n ) {\n const ref = useObjectRef(_ref)\n\n const hasTranslatedLabel =\n translatedLabel !== undefined && translatedLabel.length > 0\n const className = useClassNames(\n 'charcoal-tag-item',\n 'charcoal-tag-item__bg',\n props.className,\n )\n\n const bgVariant =\n bgImage !== undefined && bgImage.length > 0 ? 'image' : 'color'\n const bg = bgVariant === 'color' ? bgColor : `url(${bgImage ?? ''})`\n\n const Component = useMemo(() => component ?? 'a', [component])\n const isButton = Component === 'button'\n\n const { linkProps } = useLink(\n {\n ...props,\n isDisabled: disabled,\n elementType: typeof Component === 'string' ? Component : 'a',\n },\n ref,\n )\n\n const disabledProps = isButton\n ? { disabled, 'aria-disabled': ariaDisabled }\n : linkProps\n\n return (\n <Component\n {...props}\n {...disabledProps}\n ref={ref}\n className={className}\n data-state={status}\n data-bg-variant={bgVariant}\n data-size={hasTranslatedLabel ? 'M' : size}\n style={{ '--charcoal-tag-item-bg': bg }}\n >\n <div\n className=\"charcoal-tag-item__label\"\n data-has-translate={hasTranslatedLabel}\n >\n {hasTranslatedLabel && (\n <span className=\"charcoal-tag-item__label__translated\">\n {translatedLabel}\n </span>\n )}\n <span\n className=\"charcoal-tag-item__label__text\"\n data-has-translate={hasTranslatedLabel}\n >\n {label}\n </span>\n </div>\n {status === 'active' && <Icon name=\"16/Remove\" />}\n </Component>\n )\n },\n) as <T extends React.ElementType = 'a'>(p: TagItemProps<T>) => JSX.Element\n\nexport default memo(TagItem)\n"],"mappings":";;;;;;;;;;;;AA4BA,MAAM,gCACJ,SAAS,aACP,EACE,WACA,OACA,iBACA,UAAU,WACV,SACA,OAAO,KACP,SAAS,WACT,UACA,iBAAiB,cACjB,GAAG,SAEL,MACA;CACA,MAAM,gDAAmB,IAAI;CAE7B,MAAM,qBACJ,oBAAoB,UAAa,gBAAgB,SAAS;CAC5D,MAAM,YAAY,oCAChB,qBACA,yBACA,MAAM,SACR;CAEA,MAAM,YACJ,YAAY,UAAa,QAAQ,SAAS,IAAI,UAAU;CAC1D,MAAM,KAAK,cAAc,UAAU,UAAU,OAAO,WAAW,GAAE;CAEjE,MAAM,qCAA0B,aAAa,KAAK,CAAC,SAAS,CAAC;CAC7D,MAAM,WAAW,cAAc;CAE/B,MAAM,EAAE,sCACN;EACE,GAAG;EACH,YAAY;EACZ,aAAa,OAAO,cAAc,WAAW,YAAY;CAC3D,GACA,GACF;CAEA,MAAM,gBAAgB,WAClB;EAAE;EAAU,iBAAiB;CAAa,IAC1C;CAEJ,OACE,4CAAC,WAAD;EACE,GAAI;EACJ,GAAI;EACC;EACM;EACX,cAAY;EACZ,mBAAiB;EACjB,aAAW,qBAAqB,MAAM;EACtC,OAAO,EAAE,0BAA0B,GAAG;YARxC,CAUE,4CAAC,OAAD;GACE,WAAU;GACV,sBAAoB;aAFtB,CAIG,sBACC,2CAAC,QAAD;IAAM,WAAU;cACb;GACG,IAER,2CAAC,QAAD;IACE,WAAU;IACV,sBAAoB;cAEnB;GACG,EACH;MACJ,WAAW,YAAY,2CAAC,uBAAD,EAAM,MAAK,YAAW,EACrC;;AAEf,CACF;AAEA,sCAAoB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","names":[
|
|
1
|
+
{"version":3,"file":"index2.js","names":[],"sources":["../../../src/components/TagItem/index.tsx"],"sourcesContent":["import React, { forwardRef, memo, useMemo, ForwardedRef, type JSX } from 'react'\nimport Icon from '../Icon'\nimport { useClassNames } from '../../_lib/useClassNames'\nimport './index.css'\n\nimport { useObjectRef } from 'react-aria/useObjectRef'\nimport { useLink } from 'react-aria'\n\ntype SizeMap = {\n S: 32\n M: 40\n}\n\nexport type TagItemProps<T extends React.ElementType = 'a'> = {\n label: string\n translatedLabel?: string\n bgColor?: string\n bgImage?: string\n status?: 'default' | 'active' | 'inactive'\n size?: keyof SizeMap\n disabled?: boolean\n /**\n * The component used for root element.\n * @type T extends React.ElementType = 'a'\n */\n component?: T\n} & Omit<React.ComponentPropsWithRef<T>, 'children' | 'disabled'>\n\nconst TagItem = forwardRef<HTMLAnchorElement, TagItemProps>(\n function TagItemInner<T extends React.ElementType>(\n {\n component,\n label,\n translatedLabel,\n bgColor = '#7ACCB1',\n bgImage,\n size = 'M',\n status = 'default',\n disabled,\n 'aria-disabled': ariaDisabled,\n ...props\n }: TagItemProps<T>,\n _ref: ForwardedRef<HTMLAnchorElement>,\n ) {\n const ref = useObjectRef(_ref)\n\n const hasTranslatedLabel =\n translatedLabel !== undefined && translatedLabel.length > 0\n const className = useClassNames(\n 'charcoal-tag-item',\n 'charcoal-tag-item__bg',\n props.className,\n )\n\n const bgVariant =\n bgImage !== undefined && bgImage.length > 0 ? 'image' : 'color'\n const bg = bgVariant === 'color' ? bgColor : `url(${bgImage ?? ''})`\n\n const Component = useMemo(() => component ?? 'a', [component])\n const isButton = Component === 'button'\n\n const { linkProps } = useLink(\n {\n ...props,\n isDisabled: disabled,\n elementType: typeof Component === 'string' ? Component : 'a',\n },\n ref,\n )\n\n const disabledProps = isButton\n ? { disabled, 'aria-disabled': ariaDisabled }\n : linkProps\n\n return (\n <Component\n {...props}\n {...disabledProps}\n ref={ref}\n className={className}\n data-state={status}\n data-bg-variant={bgVariant}\n data-size={hasTranslatedLabel ? 'M' : size}\n style={{ '--charcoal-tag-item-bg': bg }}\n >\n <div\n className=\"charcoal-tag-item__label\"\n data-has-translate={hasTranslatedLabel}\n >\n {hasTranslatedLabel && (\n <span className=\"charcoal-tag-item__label__translated\">\n {translatedLabel}\n </span>\n )}\n <span\n className=\"charcoal-tag-item__label__text\"\n data-has-translate={hasTranslatedLabel}\n >\n {label}\n </span>\n </div>\n {status === 'active' && <Icon name=\"16/Remove\" />}\n </Component>\n )\n },\n) as <T extends React.ElementType = 'a'>(p: TagItemProps<T>) => JSX.Element\n\nexport default memo(TagItem)\n"],"mappings":";;;;;;;;;;AA4BA,MAAM,UAAU,WACd,SAAS,aACP,EACE,WACA,OACA,iBACA,UAAU,WACV,SACA,OAAO,KACP,SAAS,WACT,UACA,iBAAiB,cACjB,GAAG,SAEL,MACA;CACA,MAAM,MAAM,aAAa,IAAI;CAE7B,MAAM,qBACJ,oBAAoB,UAAa,gBAAgB,SAAS;CAC5D,MAAM,YAAY,cAChB,qBACA,yBACA,MAAM,SACR;CAEA,MAAM,YACJ,YAAY,UAAa,QAAQ,SAAS,IAAI,UAAU;CAC1D,MAAM,KAAK,cAAc,UAAU,UAAU,OAAO,WAAW,GAAE;CAEjE,MAAM,YAAY,cAAc,aAAa,KAAK,CAAC,SAAS,CAAC;CAC7D,MAAM,WAAW,cAAc;CAE/B,MAAM,EAAE,cAAc,QACpB;EACE,GAAG;EACH,YAAY;EACZ,aAAa,OAAO,cAAc,WAAW,YAAY;CAC3D,GACA,GACF;CAEA,MAAM,gBAAgB,WAClB;EAAE;EAAU,iBAAiB;CAAa,IAC1C;CAEJ,OACE,qBAAC,WAAD;EACE,GAAI;EACJ,GAAI;EACC;EACM;EACX,cAAY;EACZ,mBAAiB;EACjB,aAAW,qBAAqB,MAAM;EACtC,OAAO,EAAE,0BAA0B,GAAG;YARxC,CAUE,qBAAC,OAAD;GACE,WAAU;GACV,sBAAoB;aAFtB,CAIG,sBACC,oBAAC,QAAD;IAAM,WAAU;cACb;GACG,IAER,oBAAC,QAAD;IACE,WAAU;IACV,sBAAoB;cAEnB;GACG,EACH;MACJ,WAAW,YAAY,oBAAC,MAAD,EAAM,MAAK,YAAW,EACrC;;AAEf,CACF;AAEA,sBAAe,KAAK,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAmBpB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;IAEnD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACrC,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAA;AAEhE,QAAA,MAAM,QAAQ;YApBJ,MAAM;eACH,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;oBAClB,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC;gBAEvC,OAAO;gBACP,OAAO;oBACH,MAAM;cACZ,OAAO;YAET,MAAM;mBACC,MAAM;eACV,OAAO;eACP,KAAK,CAAC,SAAS;iBACb,OAAO;cAEV,MAAM;eAEL,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM;4MA8LrC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextArea/index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAmBpB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,aAAa,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAA;IAEnD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CACrC,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,CAAA;AAEhE,QAAA,MAAM,QAAQ;YApBJ,MAAM;eACH,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;oBAClB,KAAK,CAAC,GAAG,CAAC,wBAAwB,CAAC;gBAEvC,OAAO;gBACP,OAAO;oBACH,MAAM;cACZ,OAAO;YAET,MAAM;mBACC,MAAM;eACV,OAAO;eACP,KAAK,CAAC,SAAS;iBACb,OAAO;cAEV,MAAM;eAEL,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM;4MA8LrC,CAAA;eAEc,QAAQ"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
|
|
3
2
|
const require_useClassNames = require('../../_lib/useClassNames.cjs');
|
|
4
3
|
const require_index = require('../FieldLabel/index2.cjs');
|
|
5
4
|
const require_index$1 = require('../../_lib/index.cjs');
|