@channel.io/bezier-react 2.0.6 → 2.0.8
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/cjs/components/AlphaAvatar/Avatar.js +2 -2
- package/dist/cjs/components/AlphaAvatar/Avatar.js.map +1 -1
- package/dist/cjs/components/AlphaAvatar/AvatarSizeContext.js +11 -0
- package/dist/cjs/components/AlphaAvatar/AvatarSizeContext.js.map +1 -0
- package/dist/cjs/components/AlphaAvatarGroup/AvatarGroup.js +2 -4
- package/dist/cjs/components/AlphaAvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/cjs/components/AlphaButton/Button.js +4 -12
- package/dist/cjs/components/AlphaButton/Button.js.map +1 -1
- package/dist/cjs/components/AlphaButton/Button.module.scss.js +1 -1
- package/dist/cjs/components/AlphaFloatingButton/FloatingButton.js +4 -12
- package/dist/cjs/components/AlphaFloatingButton/FloatingButton.js.map +1 -1
- package/dist/cjs/components/AlphaFloatingButton/FloatingButton.module.scss.js +1 -1
- package/dist/cjs/components/AlphaFloatingIconButton/FloatingIconButton.js +4 -12
- package/dist/cjs/components/AlphaFloatingIconButton/FloatingIconButton.js.map +1 -1
- package/dist/cjs/components/AlphaFloatingIconButton/FloatingIconButton.module.scss.js +1 -1
- package/dist/cjs/components/AlphaIconButton/IconButton.js +4 -12
- package/dist/cjs/components/AlphaIconButton/IconButton.js.map +1 -1
- package/dist/cjs/components/AlphaIconButton/IconButton.module.scss.js +1 -1
- package/dist/cjs/components/AlphaSpinner/Spinner.js +36 -0
- package/dist/cjs/components/AlphaSpinner/Spinner.js.map +1 -0
- package/dist/cjs/components/AlphaSpinner/Spinner.module.scss.js +8 -0
- package/dist/cjs/components/AlphaSpinner/Spinner.module.scss.js.map +1 -0
- package/dist/cjs/components/AutoFocus/AutoFocus.js +2 -1
- package/dist/cjs/components/AutoFocus/AutoFocus.js.map +1 -1
- package/dist/cjs/components/Avatar/Avatar.js.map +1 -1
- package/dist/cjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/cjs/components/Banner/Banner.js.map +1 -1
- package/dist/cjs/components/BaseTagBadge/BaseTagBadge.js +3 -2
- package/dist/cjs/components/BaseTagBadge/BaseTagBadge.js.map +1 -1
- package/dist/cjs/components/Box/Box.js.map +1 -1
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/Center/Center.js.map +1 -1
- package/dist/cjs/components/CheckableAvatar/CheckableAvatar.js.map +1 -1
- package/dist/cjs/components/Emoji/Emoji.js.map +1 -1
- package/dist/cjs/components/FeatureProvider/FeatureProvider.js +2 -1
- package/dist/cjs/components/FeatureProvider/FeatureProvider.js.map +1 -1
- package/dist/cjs/components/FeatureProvider/SmoothCornersFeature/smoothCornersScript.js.map +1 -1
- package/dist/cjs/components/FormControl/FormControl.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.js +1 -12
- package/dist/cjs/components/Icon/Icon.js.map +1 -1
- package/dist/cjs/components/Icon/Icon.module.scss.js +1 -1
- package/dist/cjs/components/LegacyStack/LegacyStack/LegacyStack.js.map +1 -1
- package/dist/cjs/components/LegacyStack/LegacyStackItem/LegacyStackItem.js.map +1 -1
- package/dist/cjs/components/LegacyTooltip/utils.js.map +1 -1
- package/dist/cjs/components/ListItem/ListItem.js.map +1 -1
- package/dist/cjs/components/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/NavGroup/NavGroup.js.map +1 -1
- package/dist/cjs/components/OutlineItem/OutlineItem.js.map +1 -1
- package/dist/cjs/components/Overlay/Overlay.js +3 -2
- package/dist/cjs/components/Overlay/Overlay.js.map +1 -1
- package/dist/cjs/components/Overlay/utils.js.map +1 -1
- package/dist/cjs/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/cjs/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/cjs/components/Slider/Slider.js.map +1 -1
- package/dist/cjs/components/SmoothCornersBox/SmoothCornersBox.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/Stack/Stack.js.map +1 -1
- package/dist/cjs/components/Status/Status.js.map +1 -1
- package/dist/cjs/components/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.js.map +1 -1
- package/dist/cjs/components/Text/Text.js.map +1 -1
- package/dist/cjs/components/TextArea/TextArea.js +2 -1
- package/dist/cjs/components/TextArea/TextArea.js.map +1 -1
- package/dist/cjs/components/TextField/TextField.js.map +1 -1
- package/dist/cjs/components/Toast/Toast.js +3 -2
- package/dist/cjs/components/Toast/Toast.js.map +1 -1
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js +13 -0
- package/dist/cjs/hooks/useIsomorphicLayoutEffect.js.map +1 -0
- package/dist/cjs/hooks/useMergeRefs.js.map +1 -1
- package/dist/cjs/index.js +4 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/styles.css +1 -1
- package/dist/cjs/types/props-helpers.js.map +1 -1
- package/dist/cjs/utils/react.js.map +1 -1
- package/dist/cjs/utils/string.js.map +1 -1
- package/dist/cjs/utils/style.js.map +1 -1
- package/dist/esm/components/AlphaAvatar/Avatar.mjs +2 -2
- package/dist/esm/components/AlphaAvatar/Avatar.mjs.map +1 -1
- package/dist/esm/components/AlphaAvatar/AvatarSizeContext.mjs +8 -0
- package/dist/esm/components/AlphaAvatar/AvatarSizeContext.mjs.map +1 -0
- package/dist/esm/components/AlphaAvatarGroup/AvatarGroup.mjs +3 -4
- package/dist/esm/components/AlphaAvatarGroup/AvatarGroup.mjs.map +1 -1
- package/dist/esm/components/AlphaButton/Button.mjs +4 -12
- package/dist/esm/components/AlphaButton/Button.mjs.map +1 -1
- package/dist/esm/components/AlphaButton/Button.module.scss.mjs +1 -1
- package/dist/esm/components/AlphaFloatingButton/FloatingButton.mjs +4 -12
- package/dist/esm/components/AlphaFloatingButton/FloatingButton.mjs.map +1 -1
- package/dist/esm/components/AlphaFloatingButton/FloatingButton.module.scss.mjs +1 -1
- package/dist/esm/components/AlphaFloatingIconButton/FloatingIconButton.mjs +4 -12
- package/dist/esm/components/AlphaFloatingIconButton/FloatingIconButton.mjs.map +1 -1
- package/dist/esm/components/AlphaFloatingIconButton/FloatingIconButton.module.scss.mjs +1 -1
- package/dist/esm/components/AlphaIconButton/IconButton.mjs +4 -12
- package/dist/esm/components/AlphaIconButton/IconButton.mjs.map +1 -1
- package/dist/esm/components/AlphaIconButton/IconButton.module.scss.mjs +1 -1
- package/dist/esm/components/AlphaSpinner/Spinner.mjs +33 -0
- package/dist/esm/components/AlphaSpinner/Spinner.mjs.map +1 -0
- package/dist/esm/components/AlphaSpinner/Spinner.module.scss.mjs +4 -0
- package/dist/esm/components/AlphaSpinner/Spinner.module.scss.mjs.map +1 -0
- package/dist/esm/components/AutoFocus/AutoFocus.mjs +3 -2
- package/dist/esm/components/AutoFocus/AutoFocus.mjs.map +1 -1
- package/dist/esm/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/esm/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
- package/dist/esm/components/Banner/Banner.mjs.map +1 -1
- package/dist/esm/components/BaseTagBadge/BaseTagBadge.mjs +3 -2
- package/dist/esm/components/BaseTagBadge/BaseTagBadge.mjs.map +1 -1
- package/dist/esm/components/Box/Box.mjs.map +1 -1
- package/dist/esm/components/Button/Button.mjs.map +1 -1
- package/dist/esm/components/Center/Center.mjs.map +1 -1
- package/dist/esm/components/CheckableAvatar/CheckableAvatar.mjs.map +1 -1
- package/dist/esm/components/Emoji/Emoji.mjs.map +1 -1
- package/dist/esm/components/FeatureProvider/FeatureProvider.mjs +3 -2
- package/dist/esm/components/FeatureProvider/FeatureProvider.mjs.map +1 -1
- package/dist/esm/components/FeatureProvider/SmoothCornersFeature/smoothCornersScript.mjs.map +1 -1
- package/dist/esm/components/FormControl/FormControl.mjs.map +1 -1
- package/dist/esm/components/Icon/Icon.mjs +1 -12
- package/dist/esm/components/Icon/Icon.mjs.map +1 -1
- package/dist/esm/components/Icon/Icon.module.scss.mjs +1 -1
- package/dist/esm/components/LegacyStack/LegacyStack/LegacyStack.mjs.map +1 -1
- package/dist/esm/components/LegacyStack/LegacyStackItem/LegacyStackItem.mjs.map +1 -1
- package/dist/esm/components/LegacyTooltip/utils.mjs.map +1 -1
- package/dist/esm/components/ListItem/ListItem.mjs.map +1 -1
- package/dist/esm/components/Modal/Modal.mjs.map +1 -1
- package/dist/esm/components/NavGroup/NavGroup.mjs.map +1 -1
- package/dist/esm/components/OutlineItem/OutlineItem.mjs.map +1 -1
- package/dist/esm/components/Overlay/Overlay.mjs +4 -3
- package/dist/esm/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/esm/components/Overlay/utils.mjs.map +1 -1
- package/dist/esm/components/ProgressBar/ProgressBar.mjs.map +1 -1
- package/dist/esm/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/esm/components/Slider/Slider.mjs.map +1 -1
- package/dist/esm/components/SmoothCornersBox/SmoothCornersBox.mjs.map +1 -1
- package/dist/esm/components/Spinner/Spinner.mjs.map +1 -1
- package/dist/esm/components/Stack/Stack.mjs.map +1 -1
- package/dist/esm/components/Status/Status.mjs.map +1 -1
- package/dist/esm/components/Switch/Switch.mjs.map +1 -1
- package/dist/esm/components/Tabs/Tabs.mjs.map +1 -1
- package/dist/esm/components/Text/Text.mjs.map +1 -1
- package/dist/esm/components/TextArea/TextArea.mjs +3 -2
- package/dist/esm/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/esm/components/TextField/TextField.mjs.map +1 -1
- package/dist/esm/components/Toast/Toast.mjs +3 -2
- package/dist/esm/components/Toast/Toast.mjs.map +1 -1
- package/dist/esm/hooks/useIsomorphicLayoutEffect.mjs +11 -0
- package/dist/esm/hooks/useIsomorphicLayoutEffect.mjs.map +1 -0
- package/dist/esm/hooks/useMergeRefs.mjs.map +1 -1
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/styles.css +1 -1
- package/dist/esm/types/props-helpers.mjs.map +1 -1
- package/dist/esm/utils/react.mjs.map +1 -1
- package/dist/esm/utils/string.mjs.map +1 -1
- package/dist/esm/utils/style.mjs.map +1 -1
- package/dist/types/components/AlphaAvatar/AvatarSizeContext.d.ts +5 -0
- package/dist/types/components/AlphaAvatar/AvatarSizeContext.d.ts.map +1 -0
- package/dist/types/components/AlphaAvatarGroup/AvatarGroup.d.ts +1 -3
- package/dist/types/components/AlphaAvatarGroup/AvatarGroup.d.ts.map +1 -1
- package/dist/types/components/AlphaAvatarGroup/AvatarGroup.types.d.ts +1 -3
- package/dist/types/components/AlphaAvatarGroup/AvatarGroup.types.d.ts.map +1 -1
- package/dist/types/components/AlphaButton/Button.d.ts.map +1 -1
- package/dist/types/components/AlphaFloatingButton/FloatingButton.d.ts.map +1 -1
- package/dist/types/components/AlphaFloatingIconButton/FloatingIconButton.d.ts.map +1 -1
- package/dist/types/components/AlphaIconButton/IconButton.d.ts.map +1 -1
- package/dist/types/components/AlphaSpinner/Spinner.d.ts +5 -0
- package/dist/types/components/AlphaSpinner/Spinner.d.ts.map +1 -0
- package/dist/types/components/AlphaSpinner/Spinner.types.d.ts +13 -0
- package/dist/types/components/AlphaSpinner/Spinner.types.d.ts.map +1 -0
- package/dist/types/components/AlphaSpinner/index.d.ts +3 -0
- package/dist/types/components/AlphaSpinner/index.d.ts.map +1 -0
- package/dist/types/components/AutoFocus/AutoFocus.d.ts.map +1 -1
- package/dist/types/components/BaseTagBadge/BaseTagBadge.d.ts.map +1 -1
- package/dist/types/components/FeatureProvider/FeatureProvider.d.ts.map +1 -1
- package/dist/types/components/Icon/Icon.d.ts.map +1 -1
- package/dist/types/components/Icon/Icon.types.d.ts +1 -1
- package/dist/types/components/Overlay/Overlay.d.ts.map +1 -1
- package/dist/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/types/components/Toast/Toast.d.ts.map +1 -1
- package/dist/types/hooks/useIsomorphicLayoutEffect.d.ts +8 -0
- package/dist/types/hooks/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/AlphaAvatar/Avatar.tsx +2 -2
- package/src/components/AlphaAvatar/AvatarSizeContext.ts +9 -0
- package/src/components/AlphaAvatarGroup/AvatarGroup.tsx +4 -13
- package/src/components/AlphaAvatarGroup/AvatarGroup.types.ts +0 -3
- package/src/components/AlphaAvatarGroup/__snapshots__/AvatarGroup.test.tsx.snap +3 -3
- package/src/components/AlphaButton/Button.module.scss +22 -8
- package/src/components/AlphaButton/Button.tsx +11 -16
- package/src/components/AlphaFloatingButton/FloatingButton.module.scss +18 -6
- package/src/components/AlphaFloatingButton/FloatingButton.tsx +11 -16
- package/src/components/AlphaFloatingIconButton/FloatingIconButton.module.scss +14 -4
- package/src/components/AlphaFloatingIconButton/FloatingIconButton.tsx +11 -16
- package/src/components/AlphaIconButton/IconButton.module.scss +21 -9
- package/src/components/AlphaIconButton/IconButton.tsx +11 -16
- package/src/components/AlphaSpinner/AlphaSpinner.stories.tsx +23 -0
- package/src/components/AlphaSpinner/Spinner.module.scss +75 -0
- package/src/components/AlphaSpinner/Spinner.test.tsx +34 -0
- package/src/components/AlphaSpinner/Spinner.tsx +49 -0
- package/src/components/AlphaSpinner/Spinner.types.ts +21 -0
- package/src/components/AlphaSpinner/index.ts +2 -0
- package/src/components/AutoFocus/AutoFocus.tsx +3 -2
- package/src/components/AvatarGroup/__snapshots__/AvatarGroup.test.tsx.snap +3 -3
- package/src/components/BaseTagBadge/BaseTagBadge.tsx +2 -1
- package/src/components/FeatureProvider/FeatureProvider.tsx +3 -2
- package/src/components/Help/__snapshots__/Help.test.tsx.snap +3 -3
- package/src/components/Icon/Icon.module.scss +18 -0
- package/src/components/Icon/Icon.tsx +7 -17
- package/src/components/Icon/Icon.types.ts +1 -1
- package/src/components/NavGroup/__snapshots__/NavGroup.test.tsx.snap +12 -12
- package/src/components/NavItem/__snapshots__/NavItem.test.tsx.snap +6 -6
- package/src/components/Overlay/Overlay.tsx +3 -3
- package/src/components/TextArea/TextArea.tsx +3 -2
- package/src/components/Toast/Toast.module.scss +1 -1
- package/src/components/Toast/Toast.tsx +1 -2
- package/src/hooks/useIsomorphicLayoutEffect.ts +9 -0
- package/src/index.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props-helpers.mjs","sources":["../../../src/types/props-helpers.ts"],"sourcesContent":["import classNames from 'classnames'\n\nimport {\n type FormFieldSize,\n type LayoutProps,\n type MarginProps,\n} from '~/src/types/props'\nimport { type Elevation, type Radius, type ZIndex } from '~/src/types/tokens'\nimport { cssDimension, tokenCssVar } from '~/src/utils/style'\n\n// NOTE: 'typescript-plugin-css-modules' does not support path alias\n/* eslint-disable no-restricted-imports */\nimport elevationStyles from '../styles/components/elevation.module.scss'\nimport formFieldSizeStyles from '../styles/components/form-field-size.module.scss'\nimport layoutStyles from '../styles/components/layout.module.scss'\nimport marginStyles from '../styles/components/margin.module.scss'\nimport radiusStyles from '../styles/components/radius.module.scss'\nimport zIndexStyles from '../styles/components/z-index.module.scss'\n/* eslint-enable no-restricted-imports */\n\nexport const splitByMarginProps = <Props extends MarginProps>({\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n ...rest\n}: Props): [MarginProps, Omit<Props, keyof MarginProps>] => [\n {\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n },\n rest,\n]\n\nexport const splitByLayoutProps = <Props extends LayoutProps>({\n padding,\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n width,\n height,\n maxWidth,\n minWidth,\n maxHeight,\n minHeight,\n position,\n inset,\n top,\n right,\n bottom,\n left,\n shrink,\n grow,\n backgroundColor,\n borderColor,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n elevation,\n zIndex,\n overflow,\n overflowX,\n overflowY,\n ...rest\n}: Props): [LayoutProps, Omit<Props, keyof LayoutProps>] => [\n {\n padding,\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n width,\n height,\n maxWidth,\n minWidth,\n maxHeight,\n minHeight,\n position,\n inset,\n top,\n right,\n bottom,\n left,\n shrink,\n grow,\n backgroundColor,\n borderColor,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n elevation,\n zIndex,\n overflow,\n overflowX,\n overflowY,\n },\n rest,\n]\n\nfunction getElevationClassName(elevation: Elevation) {\n return elevationStyles[`elevation-${elevation}`]\n}\n\nfunction getRadiusClassName(radius: Radius) {\n return radiusStyles[`radius-${radius}`]\n}\n\nexport function getZIndexClassName(zIndex: ZIndex) {\n return zIndexStyles[`z-index-${zIndex}`]\n}\n\nexport const getMarginStyles = ({\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n}: MarginProps) => ({\n style: {\n '--b-margin': cssDimension(margin),\n '--b-margin-horizontal': cssDimension(marginHorizontal),\n '--b-margin-vertical': cssDimension(marginVertical),\n '--b-margin-top': cssDimension(marginTop),\n '--b-margin-right': cssDimension(marginRight),\n '--b-margin-bottom': cssDimension(marginBottom),\n '--b-margin-left': cssDimension(marginLeft),\n },\n className: marginStyles.margin,\n})\n\nexport const getLayoutStyles = ({\n padding,\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n width,\n height,\n maxWidth,\n minWidth,\n maxHeight,\n minHeight,\n position,\n inset,\n top,\n right,\n bottom,\n left,\n shrink,\n grow,\n backgroundColor,\n borderColor,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n elevation,\n zIndex,\n overflow,\n overflowX,\n overflowY,\n}: LayoutProps) => ({\n style: {\n '--b-padding': cssDimension(padding),\n '--b-padding-horizontal': cssDimension(paddingHorizontal),\n '--b-padding-vertical': cssDimension(paddingVertical),\n '--b-padding-top': cssDimension(paddingTop),\n '--b-padding-right': cssDimension(paddingRight),\n '--b-padding-bottom': cssDimension(paddingBottom),\n '--b-padding-left': cssDimension(paddingLeft),\n '--b-width': cssDimension(width),\n '--b-height': cssDimension(height),\n '--b-max-width': cssDimension(maxWidth),\n '--b-min-width': cssDimension(minWidth),\n '--b-max-height': cssDimension(maxHeight),\n '--b-min-height': cssDimension(minHeight),\n '--b-inset': cssDimension(inset),\n '--b-top': cssDimension(top),\n '--b-right': cssDimension(right),\n '--b-bottom': cssDimension(bottom),\n '--b-left': cssDimension(left),\n '--b-shrink': shrink,\n '--b-grow': grow,\n '--b-background-color': tokenCssVar(backgroundColor),\n '--b-border-color': tokenCssVar(borderColor),\n '--b-border-width': cssDimension(borderWidth),\n '--b-border-top-width': cssDimension(borderTopWidth),\n '--b-border-right-width': cssDimension(borderRightWidth),\n '--b-border-bottom-width': cssDimension(borderBottomWidth),\n '--b-border-left-width': cssDimension(borderLeftWidth),\n },\n className: classNames(\n layoutStyles.layout,\n position && layoutStyles[`position-${position}`],\n overflow && layoutStyles[`overflow-${overflow}`],\n overflowX && layoutStyles[`overflow-x-${overflowX}`],\n overflowY && layoutStyles[`overflow-y-${overflowY}`],\n elevation && getElevationClassName(elevation),\n borderRadius && getRadiusClassName(borderRadius),\n zIndex && getZIndexClassName(zIndex)\n ),\n})\n\nexport function getFormFieldSizeClassName(size: FormFieldSize) {\n return formFieldSizeStyles[`size-${size}`]\n}\n"],"names":["splitByMarginProps","margin","marginHorizontal","marginVertical","marginTop","marginRight","marginBottom","marginLeft","rest","splitByLayoutProps","padding","paddingHorizontal","paddingVertical","paddingTop","paddingRight","paddingBottom","paddingLeft","width","height","maxWidth","minWidth","maxHeight","minHeight","position","inset","top","right","bottom","left","shrink","grow","backgroundColor","borderColor","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","elevation","zIndex","overflow","overflowX","overflowY","getElevationClassName","elevationStyles","getRadiusClassName","radius","radiusStyles","getZIndexClassName","zIndexStyles","getMarginStyles","style","cssDimension","className","marginStyles","getLayoutStyles","tokenCssVar","classNames","layoutStyles","layout","getFormFieldSizeClassName","size","formFieldSizeStyles"],"mappings":";;;;;;;;;AAkBA;;AAEO,MAAMA,kBAAkB,GAAGA,CAA4B;EAC5DC,MAAM;EACNC,gBAAgB;EAChBC,cAAc;EACdC,SAAS;EACTC,WAAW;EACXC,YAAY;EACZC,UAAU;EACV,GAAGC,IAAAA;AACE,CAAC,KAAoD,CAC1D;EACEP,MAAM;EACNC,gBAAgB;EAChBC,cAAc;EACdC,SAAS;EACTC,WAAW;EACXC,YAAY;AACZC,EAAAA,UAAAA;AACF,CAAC,EACDC,IAAI,EACL;AAEM,MAAMC,kBAAkB,GAAGA,CAA4B;EAC5DC,OAAO;EACPC,iBAAiB;EACjBC,eAAe;EACfC,UAAU;EACVC,YAAY;EACZC,aAAa;EACbC,WAAW;EACXC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACRC,KAAK;EACLC,GAAG;EACHC,KAAK;EACLC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC,eAAe;EACfC,WAAW;EACXC,YAAY;EACZC,WAAW;EACXC,cAAc;EACdC,gBAAgB;EAChBC,iBAAiB;EACjBC,eAAe;EACfC,SAAS;EACTC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACT,GAAGnC,IAAAA;AACE,CAAC,KAAoD,CAC1D;EACEE,OAAO;EACPC,iBAAiB;EACjBC,eAAe;EACfC,UAAU;EACVC,YAAY;EACZC,aAAa;EACbC,WAAW;EACXC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACRC,KAAK;EACLC,GAAG;EAC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BAAkB,CAACT,MAAM,CACrC,CAAA;AACF,CAAC,EAAC;AAEK,SAASqB,yBAAyBA,CAACC,IAAmB,EAAE;AAC7D,EAAA,OAAOC,mBAAmB,CAAE,CAAOD,KAAAA,EAAAA,IAAK,EAAC,CAAC,CAAA;AAC5C;;;;"}
|
|
1
|
+
{"version":3,"file":"props-helpers.mjs","sources":["../../../src/types/props-helpers.ts"],"sourcesContent":["import classNames from 'classnames'\n\nimport {\n type FormFieldSize,\n type LayoutProps,\n type MarginProps,\n} from '~/src/types/props'\nimport { type Elevation, type Radius, type ZIndex } from '~/src/types/tokens'\nimport { cssDimension, tokenCssVar } from '~/src/utils/style'\n\n// NOTE: 'typescript-plugin-css-modules' does not support path alias\n/* eslint-disable no-restricted-imports */\nimport elevationStyles from '../styles/components/elevation.module.scss'\nimport formFieldSizeStyles from '../styles/components/form-field-size.module.scss'\nimport layoutStyles from '../styles/components/layout.module.scss'\nimport marginStyles from '../styles/components/margin.module.scss'\nimport radiusStyles from '../styles/components/radius.module.scss'\nimport zIndexStyles from '../styles/components/z-index.module.scss'\n/* eslint-enable no-restricted-imports */\n\nexport const splitByMarginProps = <Props extends MarginProps>({\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n ...rest\n}: Props): [MarginProps, Omit<Props, keyof MarginProps>] => [\n {\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n },\n rest,\n]\n\nexport const splitByLayoutProps = <Props extends LayoutProps>({\n padding,\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n width,\n height,\n maxWidth,\n minWidth,\n maxHeight,\n minHeight,\n position,\n inset,\n top,\n right,\n bottom,\n left,\n shrink,\n grow,\n backgroundColor,\n borderColor,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n elevation,\n zIndex,\n overflow,\n overflowX,\n overflowY,\n ...rest\n}: Props): [LayoutProps, Omit<Props, keyof LayoutProps>] => [\n {\n padding,\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n width,\n height,\n maxWidth,\n minWidth,\n maxHeight,\n minHeight,\n position,\n inset,\n top,\n right,\n bottom,\n left,\n shrink,\n grow,\n backgroundColor,\n borderColor,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n elevation,\n zIndex,\n overflow,\n overflowX,\n overflowY,\n },\n rest,\n]\n\nfunction getElevationClassName(elevation: Elevation) {\n return elevationStyles[`elevation-${elevation}`]\n}\n\nfunction getRadiusClassName(radius: Radius) {\n return radiusStyles[`radius-${radius}`]\n}\n\nexport function getZIndexClassName(zIndex: ZIndex) {\n return zIndexStyles[`z-index-${zIndex}`]\n}\n\nexport const getMarginStyles = ({\n margin,\n marginHorizontal,\n marginVertical,\n marginTop,\n marginRight,\n marginBottom,\n marginLeft,\n}: MarginProps) => ({\n style: {\n '--b-margin': cssDimension(margin),\n '--b-margin-horizontal': cssDimension(marginHorizontal),\n '--b-margin-vertical': cssDimension(marginVertical),\n '--b-margin-top': cssDimension(marginTop),\n '--b-margin-right': cssDimension(marginRight),\n '--b-margin-bottom': cssDimension(marginBottom),\n '--b-margin-left': cssDimension(marginLeft),\n },\n className: marginStyles.margin,\n})\n\nexport const getLayoutStyles = ({\n padding,\n paddingHorizontal,\n paddingVertical,\n paddingTop,\n paddingRight,\n paddingBottom,\n paddingLeft,\n width,\n height,\n maxWidth,\n minWidth,\n maxHeight,\n minHeight,\n position,\n inset,\n top,\n right,\n bottom,\n left,\n shrink,\n grow,\n backgroundColor,\n borderColor,\n borderRadius,\n borderWidth,\n borderTopWidth,\n borderRightWidth,\n borderBottomWidth,\n borderLeftWidth,\n elevation,\n zIndex,\n overflow,\n overflowX,\n overflowY,\n}: LayoutProps) => ({\n style: {\n '--b-padding': cssDimension(padding),\n '--b-padding-horizontal': cssDimension(paddingHorizontal),\n '--b-padding-vertical': cssDimension(paddingVertical),\n '--b-padding-top': cssDimension(paddingTop),\n '--b-padding-right': cssDimension(paddingRight),\n '--b-padding-bottom': cssDimension(paddingBottom),\n '--b-padding-left': cssDimension(paddingLeft),\n '--b-width': cssDimension(width),\n '--b-height': cssDimension(height),\n '--b-max-width': cssDimension(maxWidth),\n '--b-min-width': cssDimension(minWidth),\n '--b-max-height': cssDimension(maxHeight),\n '--b-min-height': cssDimension(minHeight),\n '--b-inset': cssDimension(inset),\n '--b-top': cssDimension(top),\n '--b-right': cssDimension(right),\n '--b-bottom': cssDimension(bottom),\n '--b-left': cssDimension(left),\n '--b-shrink': shrink,\n '--b-grow': grow,\n '--b-background-color': tokenCssVar(backgroundColor),\n '--b-border-color': tokenCssVar(borderColor),\n '--b-border-width': cssDimension(borderWidth),\n '--b-border-top-width': cssDimension(borderTopWidth),\n '--b-border-right-width': cssDimension(borderRightWidth),\n '--b-border-bottom-width': cssDimension(borderBottomWidth),\n '--b-border-left-width': cssDimension(borderLeftWidth),\n },\n className: classNames(\n layoutStyles.layout,\n position && layoutStyles[`position-${position}`],\n overflow && layoutStyles[`overflow-${overflow}`],\n overflowX && layoutStyles[`overflow-x-${overflowX}`],\n overflowY && layoutStyles[`overflow-y-${overflowY}`],\n elevation && getElevationClassName(elevation),\n borderRadius && getRadiusClassName(borderRadius),\n zIndex && getZIndexClassName(zIndex)\n ),\n})\n\nexport function getFormFieldSizeClassName(size: FormFieldSize) {\n return formFieldSizeStyles[`size-${size}`]\n}\n"],"names":["splitByMarginProps","margin","marginHorizontal","marginVertical","marginTop","marginRight","marginBottom","marginLeft","rest","splitByLayoutProps","padding","paddingHorizontal","paddingVertical","paddingTop","paddingRight","paddingBottom","paddingLeft","width","height","maxWidth","minWidth","maxHeight","minHeight","position","inset","top","right","bottom","left","shrink","grow","backgroundColor","borderColor","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","elevation","zIndex","overflow","overflowX","overflowY","getElevationClassName","elevationStyles","getRadiusClassName","radius","radiusStyles","getZIndexClassName","zIndexStyles","getMarginStyles","style","cssDimension","className","marginStyles","getLayoutStyles","tokenCssVar","classNames","layoutStyles","layout","getFormFieldSizeClassName","size","formFieldSizeStyles"],"mappings":";;;;;;;;;AAkBA;;AAEO,MAAMA,kBAAkB,GAAGA,CAA4B;EAC5DC,MAAM;EACNC,gBAAgB;EAChBC,cAAc;EACdC,SAAS;EACTC,WAAW;EACXC,YAAY;EACZC,UAAU;EACV,GAAGC,IAAAA;AACE,CAAC,KAAoD,CAC1D;EACEP,MAAM;EACNC,gBAAgB;EAChBC,cAAc;EACdC,SAAS;EACTC,WAAW;EACXC,YAAY;AACZC,EAAAA,UAAAA;AACF,CAAC,EACDC,IAAI,EACL;AAEM,MAAMC,kBAAkB,GAAGA,CAA4B;EAC5DC,OAAO;EACPC,iBAAiB;EACjBC,eAAe;EACfC,UAAU;EACVC,YAAY;EACZC,aAAa;EACbC,WAAW;EACXC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACRC,KAAK;EACLC,GAAG;EACHC,KAAK;EACLC,MAAM;EACNC,IAAI;EACJC,MAAM;EACNC,IAAI;EACJC,eAAe;EACfC,WAAW;EACXC,YAAY;EACZC,WAAW;EACXC,cAAc;EACdC,gBAAgB;EAChBC,iBAAiB;EACjBC,eAAe;EACfC,SAAS;EACTC,MAAM;EACNC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACT,GAAGnC,IAAAA;AACE,CAAC,KAAoD,CAC1D;EACEE,OAAO;EACPC,iBAAiB;EACjBC,eAAe;EACfC,UAAU;EACVC,YAAY;EACZC,aAAa;EACbC,WAAW;EACXC,KAAK;EACLC,MAAM;EACNC,QAAQ;EACRC,QAAQ;EACRC,SAAS;EACTC,SAAS;EACTC,QAAQ;EACRC,KAAK;EACLC,GAAG;EACHC,KA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AAkB,CAACT,MAAM,CACrC,CAAA;AACF,CAAC,EAAC;AAEK,SAASqB,yBAAyBA,CAACC,IAAmB,EAAE;AAC7D,EAAA,OAAOC,mBAAmB,CAAC,CAAQD,KAAAA,EAAAA,IAAI,EAAE,CAAC,CAAA;AAC5C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.mjs","sources":["../../../src/utils/react.ts"],"sourcesContent":["import React from 'react'\n\nimport { assert } from './assert'\n\nexport const getReactVersion = () => {\n const [major, minor, patch] = React.version.split('.').map(Number)\n return { major, minor, patch }\n}\n\ntype NonNullableValue = object | number | string | boolean | bigint | symbol\n\ntype NonStrictContextValue = NonNullableValue | undefined\ntype StrictContextValue = NonNullableValue | null\n\n/**\n * A function that makes it easy to use the React `createContext` function.\n * @param defaultValue The default value of the context.\n * @param providerName The name of the provider component.\n * **Required if `defaultValue` is `null`able. (not `undefined`!)** Used to make the error message human-readable if contextValue is `null`.\n */\nexport function createContext<ContextValue extends NonStrictContextValue>(\n defaultValue: ContextValue\n): [React.Provider<ContextValue>, () => ContextValue]\nexport function createContext<ContextValue extends StrictContextValue>(\n defaultValue: ContextValue,\n providerName: string\n): [\n React.Provider<ContextValue>,\n (consumerName: string) => NonNullable<ContextValue>,\n]\nexport function createContext<ContextValue extends StrictContextValue>(\n defaultValue: ContextValue,\n providerName?: string\n) {\n const Context = React.createContext<ContextValue>(defaultValue)\n\n function useContext(consumerName?: any) {\n const contextValue = React.useContext(Context)\n\n assert(\n contextValue !== null,\n `'${consumerName}' must be used within '${providerName}'`\n )\n\n return contextValue\n }\n\n return [Context.Provider, useContext] as const\n}\n"],"names":["getReactVersion","major","minor","patch","React","version","split","map","Number","createContext","defaultValue","providerName","Context","useContext","consumerName","contextValue","assert","Provider"],"mappings":";;;AAIaA,MAAAA,eAAe,GAAGA,MAAM;EACnC,MAAM,CAACC,KAAK,EAAEC,KAAK,EAAEC,KAAK,CAAC,GAAGC,cAAK,CAACC,OAAO,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC,CAAA;EAClE,OAAO;IAAEP,KAAK;IAAEC,KAAK;AAAEC,IAAAA,KAAAA;GAAO,CAAA;AAChC,EAAC;;AAOD;AACA;AACA;AACA;AACA;AACA;;AAWO,SAASM,aAAaA,CAC3BC,YAA0B,EAC1BC,YAAqB,EACrB;AACA,EAAA,MAAMC,OAAO,gBAAGR,cAAK,CAACK,aAAa,CAAeC,YAAY,CAAC,CAAA;EAE/D,SAASG,UAAUA,CAACC,YAAkB,EAAE;AACtC,IAAA,MAAMC,YAAY,GAAGX,cAAK,CAACS,UAAU,CAACD,OAAO,CAAC,CAAA;IAE9CI,MAAM,CACJD,YAAY,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"react.mjs","sources":["../../../src/utils/react.ts"],"sourcesContent":["import React from 'react'\n\nimport { assert } from './assert'\n\nexport const getReactVersion = () => {\n const [major, minor, patch] = React.version.split('.').map(Number)\n return { major, minor, patch }\n}\n\ntype NonNullableValue = object | number | string | boolean | bigint | symbol\n\ntype NonStrictContextValue = NonNullableValue | undefined\ntype StrictContextValue = NonNullableValue | null\n\n/**\n * A function that makes it easy to use the React `createContext` function.\n * @param defaultValue The default value of the context.\n * @param providerName The name of the provider component.\n * **Required if `defaultValue` is `null`able. (not `undefined`!)** Used to make the error message human-readable if contextValue is `null`.\n */\nexport function createContext<ContextValue extends NonStrictContextValue>(\n defaultValue: ContextValue\n): [React.Provider<ContextValue>, () => ContextValue]\nexport function createContext<ContextValue extends StrictContextValue>(\n defaultValue: ContextValue,\n providerName: string\n): [\n React.Provider<ContextValue>,\n (consumerName: string) => NonNullable<ContextValue>,\n]\nexport function createContext<ContextValue extends StrictContextValue>(\n defaultValue: ContextValue,\n providerName?: string\n) {\n const Context = React.createContext<ContextValue>(defaultValue)\n\n function useContext(consumerName?: any) {\n const contextValue = React.useContext(Context)\n\n assert(\n contextValue !== null,\n `'${consumerName}' must be used within '${providerName}'`\n )\n\n return contextValue\n }\n\n return [Context.Provider, useContext] as const\n}\n"],"names":["getReactVersion","major","minor","patch","React","version","split","map","Number","createContext","defaultValue","providerName","Context","useContext","consumerName","contextValue","assert","Provider"],"mappings":";;;AAIaA,MAAAA,eAAe,GAAGA,MAAM;EACnC,MAAM,CAACC,KAAK,EAAEC,KAAK,EAAEC,KAAK,CAAC,GAAGC,cAAK,CAACC,OAAO,CAACC,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,CAACC,MAAM,CAAC,CAAA;EAClE,OAAO;IAAEP,KAAK;IAAEC,KAAK;AAAEC,IAAAA,KAAAA;GAAO,CAAA;AAChC,EAAC;;AAOD;AACA;AACA;AACA;AACA;AACA;;AAWO,SAASM,aAAaA,CAC3BC,YAA0B,EAC1BC,YAAqB,EACrB;AACA,EAAA,MAAMC,OAAO,gBAAGR,cAAK,CAACK,aAAa,CAAeC,YAAY,CAAC,CAAA;EAE/D,SAASG,UAAUA,CAACC,YAAkB,EAAE;AACtC,IAAA,MAAMC,YAAY,GAAGX,cAAK,CAACS,UAAU,CAACD,OAAO,CAAC,CAAA;IAE9CI,MAAM,CACJD,YAAY,KAAK,IAAI,EACrB,IAAID,YAAY,CAAA,uBAAA,EAA0BH,YAAY,CAAA,CAAA,CACxD,CAAC,CAAA;AAED,IAAA,OAAOI,YAAY,CAAA;AACrB,GAAA;AAEA,EAAA,OAAO,CAACH,OAAO,CAACK,QAAQ,EAAEJ,UAAU,CAAC,CAAA;AACvC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.mjs","sources":["../../../src/utils/string.ts"],"sourcesContent":["import { isArray, isSymbol } from '~/src/utils/type'\n\nexport function toString(value: unknown): string {\n if (value == null) {\n return ''\n }\n if (typeof value === 'string') {\n return value\n }\n if (isArray(value)) {\n return `${value.map((other) => {\n if (other == null) {\n return other\n }\n return toString(other)\n })}`\n }\n if (isSymbol(value)) {\n return value.toString()\n }\n if (Object.is(-0, value)) {\n return '-0'\n }\n return `${value}`\n}\n\nexport const kebabCase = (value: string): string =>\n value\n .trim()\n .replace(/([a-z])([A-Z0-9])/g, '$1-$2')\n .replace(/([0-9])([a-zA-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase()\n\nexport const camelCase = (value: string): string =>\n kebabCase(value)\n .replace(/-([a-z])/g, (_, p1) => p1.toUpperCase())\n .replace(/-([0-9])/g, (_, p1) => p1.toUpperCase())\n"],"names":["toString","value","isArray","map","other","isSymbol","Object","is"],"mappings":";;AAEO,SAASA,QAAQA,CAACC,KAAc,EAAU;EAC/C,IAAIA,KAAK,IAAI,IAAI,EAAE;AACjB,IAAA,OAAO,EAAE,CAAA;AACX,GAAA;AACA,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;AAC7B,IAAA,OAAOA,KAAK,CAAA;AACd,GAAA;AACA,EAAA,IAAIC,OAAO,CAACD,KAAK,CAAC,EAAE;AAClB,IAAA,
|
|
1
|
+
{"version":3,"file":"string.mjs","sources":["../../../src/utils/string.ts"],"sourcesContent":["import { isArray, isSymbol } from '~/src/utils/type'\n\nexport function toString(value: unknown): string {\n if (value == null) {\n return ''\n }\n if (typeof value === 'string') {\n return value\n }\n if (isArray(value)) {\n return `${value.map((other) => {\n if (other == null) {\n return other\n }\n return toString(other)\n })}`\n }\n if (isSymbol(value)) {\n return value.toString()\n }\n if (Object.is(-0, value)) {\n return '-0'\n }\n return `${value}`\n}\n\nexport const kebabCase = (value: string): string =>\n value\n .trim()\n .replace(/([a-z])([A-Z0-9])/g, '$1-$2')\n .replace(/([0-9])([a-zA-Z])/g, '$1-$2')\n .replace(/[\\s_]+/g, '-')\n .toLowerCase()\n\nexport const camelCase = (value: string): string =>\n kebabCase(value)\n .replace(/-([a-z])/g, (_, p1) => p1.toUpperCase())\n .replace(/-([0-9])/g, (_, p1) => p1.toUpperCase())\n"],"names":["toString","value","isArray","map","other","isSymbol","Object","is"],"mappings":";;AAEO,SAASA,QAAQA,CAACC,KAAc,EAAU;EAC/C,IAAIA,KAAK,IAAI,IAAI,EAAE;AACjB,IAAA,OAAO,EAAE,CAAA;AACX,GAAA;AACA,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;AAC7B,IAAA,OAAOA,KAAK,CAAA;AACd,GAAA;AACA,EAAA,IAAIC,OAAO,CAACD,KAAK,CAAC,EAAE;AAClB,IAAA,OAAO,GAAGA,KAAK,CAACE,GAAG,CAAEC,KAAK,IAAK;MAC7B,IAAIA,KAAK,IAAI,IAAI,EAAE;AACjB,QAAA,OAAOA,KAAK,CAAA;AACd,OAAA;MACA,OAAOJ,QAAQ,CAACI,KAAK,CAAC,CAAA;AACxB,KAAC,CAAC,CAAE,CAAA,CAAA;AACN,GAAA;AACA,EAAA,IAAIC,QAAQ,CAACJ,KAAK,CAAC,EAAE;AACnB,IAAA,OAAOA,KAAK,CAACD,QAAQ,EAAE,CAAA;AACzB,GAAA;EACA,IAAIM,MAAM,CAACC,EAAE,CAAC,CAAC,CAAC,EAAEN,KAAK,CAAC,EAAE;AACxB,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;EACA,OAAO,CAAA,EAAGA,KAAK,CAAE,CAAA,CAAA;AACnB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../src/utils/style.ts"],"sourcesContent":["import { type FlattenAllToken } from '~/src/types/tokens'\nimport { isNil, isString } from '~/src/utils/type'\n\n/**\n * Convert a number to a string with `px` suffix.\n * If the value is `0`, it will return `0` instead of `0px`.\n */\nexport function px<Value extends number>(value?: Value) {\n if (isNil(value)) {\n return undefined\n }\n if (value !== 0) {\n return `${value}px` as const\n }\n return value as 0\n}\n\n/**\n * Convert a number or string to a string with `px` suffix.\n * If the value is `0`, it will return `0` instead of `0px`.\n */\nexport function cssDimension<Value extends number | string>(value?: Value) {\n if (isNil(value)) {\n return undefined\n }\n if (isString(value)) {\n return value\n }\n if (value !== 0) {\n return `${value}px` as const\n }\n return value as 0\n}\n\n/**\n * Generates a CSS variable string with the given property name.\n */\nexport function cssVar<PropertyName extends string | undefined>(\n propertyName: PropertyName\n) {\n /* eslint-disable no-nested-ternary */\n return !isNil(propertyName) ? (`var(--${propertyName})` as const) : undefined\n /* eslint-enable no-nested-ternary */\n}\n\n/**\n * Wrapper function for `cssVar` to handle tokens specifically.\n * It generates a CSS variable string for a given design token.\n */\nexport function tokenCssVar<PropertyName extends FlattenAllToken | undefined>(\n propertyName: PropertyName\n) {\n return cssVar(propertyName)\n}\n\n/**\n * Formats a given URL string into a CSS `url()` function format.\n */\nexport function cssUrl(url?: string) {\n return isNil(url) ? undefined : `url(${url})`\n}\n"],"names":["px","value","isNil","undefined","cssDimension","isString","cssVar","propertyName","tokenCssVar","cssUrl","url"],"mappings":";;AAGA;AACA;AACA;AACA;AACO,SAASA,EAAEA,CAAuBC,KAAa,EAAE;AACtD,EAAA,IAAIC,KAAK,CAACD,KAAK,CAAC,EAAE;AAChB,IAAA,OAAOE,SAAS,CAAA;AAClB,GAAA;EACA,IAAIF,KAAK,KAAK,CAAC,EAAE;IACf,
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../src/utils/style.ts"],"sourcesContent":["import { type FlattenAllToken } from '~/src/types/tokens'\nimport { isNil, isString } from '~/src/utils/type'\n\n/**\n * Convert a number to a string with `px` suffix.\n * If the value is `0`, it will return `0` instead of `0px`.\n */\nexport function px<Value extends number>(value?: Value) {\n if (isNil(value)) {\n return undefined\n }\n if (value !== 0) {\n return `${value}px` as const\n }\n return value as 0\n}\n\n/**\n * Convert a number or string to a string with `px` suffix.\n * If the value is `0`, it will return `0` instead of `0px`.\n */\nexport function cssDimension<Value extends number | string>(value?: Value) {\n if (isNil(value)) {\n return undefined\n }\n if (isString(value)) {\n return value\n }\n if (value !== 0) {\n return `${value}px` as const\n }\n return value as 0\n}\n\n/**\n * Generates a CSS variable string with the given property name.\n */\nexport function cssVar<PropertyName extends string | undefined>(\n propertyName: PropertyName\n) {\n /* eslint-disable no-nested-ternary */\n return !isNil(propertyName) ? (`var(--${propertyName})` as const) : undefined\n /* eslint-enable no-nested-ternary */\n}\n\n/**\n * Wrapper function for `cssVar` to handle tokens specifically.\n * It generates a CSS variable string for a given design token.\n */\nexport function tokenCssVar<PropertyName extends FlattenAllToken | undefined>(\n propertyName: PropertyName\n) {\n return cssVar(propertyName)\n}\n\n/**\n * Formats a given URL string into a CSS `url()` function format.\n */\nexport function cssUrl(url?: string) {\n return isNil(url) ? undefined : `url(${url})`\n}\n"],"names":["px","value","isNil","undefined","cssDimension","isString","cssVar","propertyName","tokenCssVar","cssUrl","url"],"mappings":";;AAGA;AACA;AACA;AACA;AACO,SAASA,EAAEA,CAAuBC,KAAa,EAAE;AACtD,EAAA,IAAIC,KAAK,CAACD,KAAK,CAAC,EAAE;AAChB,IAAA,OAAOE,SAAS,CAAA;AAClB,GAAA;EACA,IAAIF,KAAK,KAAK,CAAC,EAAE;IACf,OAAO,CAAA,EAAGA,KAAK,CAAI,EAAA,CAAA,CAAA;AACrB,GAAA;AACA,EAAA,OAAOA,KAAK,CAAA;AACd,CAAA;;AAEA;AACA;AACA;AACA;AACO,SAASG,YAAYA,CAAgCH,KAAa,EAAE;AACzE,EAAA,IAAIC,KAAK,CAACD,KAAK,CAAC,EAAE;AAChB,IAAA,OAAOE,SAAS,CAAA;AAClB,GAAA;AACA,EAAA,IAAIE,QAAQ,CAACJ,KAAK,CAAC,EAAE;AACnB,IAAA,OAAOA,KAAK,CAAA;AACd,GAAA;EACA,IAAIA,KAAK,KAAK,CAAC,EAAE;IACf,OAAO,CAAA,EAAGA,KAAK,CAAI,EAAA,CAAA,CAAA;AACrB,GAAA;AACA,EAAA,OAAOA,KAAK,CAAA;AACd,CAAA;;AAEA;AACA;AACA;AACO,SAASK,MAAMA,CACpBC,YAA0B,EAC1B;AACA;EACA,OAAO,CAACL,KAAK,CAACK,YAAY,CAAC,GAAI,CAASA,MAAAA,EAAAA,YAAY,CAAG,CAAA,CAAA,GAAaJ,SAAS,CAAA;AAC7E;AACF,CAAA;;AAEA;AACA;AACA;AACA;AACO,SAASK,WAAWA,CACzBD,YAA0B,EAC1B;EACA,OAAOD,MAAM,CAACC,YAAY,CAAC,CAAA;AAC7B,CAAA;;AAEA;AACA;AACA;AACO,SAASE,MAAMA,CAACC,GAAY,EAAE;EACnC,OAAOR,KAAK,CAACQ,GAAG,CAAC,GAAGP,SAAS,GAAG,CAAOO,IAAAA,EAAAA,GAAG,CAAG,CAAA,CAAA,CAAA;AAC/C;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type AvatarProps } from './Avatar.types';
|
|
3
|
+
declare const AvatarContextProvider: import("react").Provider<Pick<AvatarProps, "size">>, useAvatarContext: () => Pick<AvatarProps, "size">;
|
|
4
|
+
export { AvatarContextProvider, useAvatarContext };
|
|
5
|
+
//# sourceMappingURL=AvatarSizeContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AvatarSizeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaAvatar/AvatarSizeContext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,QAAA,MAAO,qBAAqB,uDAAE,gBAAgB,iCAExB,CAAA;AAEtB,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
3
|
-
declare const useAvatarGroupContext: () => AvatarGroupContextValue | undefined;
|
|
4
|
-
export { useAvatarGroupContext };
|
|
2
|
+
import { type AvatarGroupProps } from './AvatarGroup.types';
|
|
5
3
|
export declare const AVATAR_GROUP_ELLIPSIS_ICON_TEST_ID = "bezier-avatar-group-ellipsis-icon";
|
|
6
4
|
/**
|
|
7
5
|
* `AvatarGroup` is a component for grouping `Avatar` components
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaAvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAkB/D,OAAO,
|
|
1
|
+
{"version":3,"file":"AvatarGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaAvatarGroup/AvatarGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAkB/D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAM3D,eAAO,MAAM,kCAAkC,sCACV,CAAA;AA2CrC;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,WAAW,yFAsIvB,CAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BezierComponentProps, ChildrenProps, SizeProps } from "../../types/props";
|
|
2
|
-
import { type
|
|
2
|
+
import { type AlphaAvatarSize } from "../AlphaAvatar";
|
|
3
3
|
type AvatarGroupEllipsisType = 'icon' | 'count';
|
|
4
4
|
interface AvatarGroupOwnProps {
|
|
5
5
|
/**
|
|
@@ -20,8 +20,6 @@ interface AvatarGroupOwnProps {
|
|
|
20
20
|
*/
|
|
21
21
|
ellipsisType?: AvatarGroupEllipsisType;
|
|
22
22
|
}
|
|
23
|
-
export interface AvatarGroupContextValue extends Pick<AlphaAvatarProps, 'size'> {
|
|
24
|
-
}
|
|
25
23
|
export interface AvatarGroupProps extends BezierComponentProps<'div'>, ChildrenProps, SizeProps<AlphaAvatarSize>, AvatarGroupOwnProps {
|
|
26
24
|
}
|
|
27
25
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarGroup.types.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaAvatarGroup/AvatarGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,SAAS,EACV,0BAAyB;AAE1B,OAAO,
|
|
1
|
+
{"version":3,"file":"AvatarGroup.types.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaAvatarGroup/AvatarGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,oBAAoB,EACpB,aAAa,EACb,SAAS,EACV,0BAAyB;AAE1B,OAAO,EAEL,KAAK,eAAe,EACrB,uBAAoC;AAErC,KAAK,uBAAuB,GAAG,MAAM,GAAG,OAAO,CAAA;AAE/C,UAAU,mBAAmB;IAC3B;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAA;IAEX;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,YAAY,CAAC,EAAE,uBAAuB,CAAA;CACvC;AAED,MAAM,WAAW,gBACf,SAAQ,oBAAoB,CAAC,KAAK,CAAC,EACjC,aAAa,EACb,SAAS,CAAC,eAAe,CAAC,EAC1B,mBAAmB;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaButton/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EACL,KAAK,WAAW,EAEjB,uBAAiD;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaButton/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EACL,KAAK,WAAW,EAEjB,uBAAiD;AAkDlD,eAAO,MAAM,MAAM,uFA0ElB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaFloatingButton/FloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EACL,KAAK,mBAAmB,EAEzB,+BAAiE;
|
|
1
|
+
{"version":3,"file":"FloatingButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaFloatingButton/FloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EACL,KAAK,mBAAmB,EAEzB,+BAAiE;AAkDlE,eAAO,MAAM,cAAc,+FAwEzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FloatingIconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaFloatingIconButton/FloatingIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,KAAK,4BAA4B,EAAE,WAAgD;
|
|
1
|
+
{"version":3,"file":"FloatingIconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaFloatingIconButton/FloatingIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,KAAK,4BAA4B,EAAE,WAAgD;AAoB5F,eAAO,MAAM,kBAAkB,wGA4D7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaIconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,WAAwC;
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaIconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAKzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,WAAwC;AAoB5E,eAAO,MAAM,UAAU,gGAiEtB,CAAA"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SpinnerProps } from './Spinner.types';
|
|
3
|
+
export declare const SPINNER_TEST_ID = "bezier-spinner";
|
|
4
|
+
export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaSpinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAIzC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAInD,eAAO,MAAM,eAAe,mBAAmB,CAAA;AAE/C,eAAO,MAAM,OAAO,sFAsCnB,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type BezierComponentProps, type ColorProps, type SizeProps } from "../../types/props";
|
|
2
|
+
type SpinnerSize = 's' | 'm';
|
|
3
|
+
interface SpinnerOwnProps {
|
|
4
|
+
/**
|
|
5
|
+
* The style variant of Spinner.
|
|
6
|
+
* @default 'secondary'
|
|
7
|
+
*/
|
|
8
|
+
variant?: 'primary' | 'secondary' | 'on-overlay';
|
|
9
|
+
}
|
|
10
|
+
export interface SpinnerProps extends Omit<BezierComponentProps<'span'>, keyof ColorProps>, SizeProps<SpinnerSize>, ColorProps, SpinnerOwnProps {
|
|
11
|
+
}
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Spinner.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.types.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaSpinner/Spinner.types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,0BAAyB;AAE1B,KAAK,WAAW,GAAG,GAAG,GAAG,GAAG,CAAA;AAE5B,UAAU,eAAe;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAA;CACjD;AAED,MAAM,WAAW,YACf,SAAQ,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,MAAM,UAAU,CAAC,EAC1D,SAAS,CAAC,WAAW,CAAC,EACtB,UAAU,EACV,eAAe;CAAG"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/AlphaSpinner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,WAAW,CAAA;AACnD,OAAO,EAAE,KAAK,YAAY,IAAI,iBAAiB,EAAE,MAAM,iBAAiB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoFocus.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoFocus/AutoFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"AutoFocus.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoFocus/AutoFocus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAA;AAOnD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,SAAS,oFAwBrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseTagBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseTagBadge/BaseTagBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAA;AAe7B;;GAEG;AACH,eAAO,MAAM,YAAY,0FAiBxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"BaseTagBadge.d.ts","sourceRoot":"","sources":["../../../../src/components/BaseTagBadge/BaseTagBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAMzC,OAAO,EACL,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAC3B,MAAM,sBAAsB,CAAA;AAe7B;;GAEG;AACH,eAAO,MAAM,YAAY,0FAiBxB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,8FAa3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FeatureProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/FeatureProvider/FeatureProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"FeatureProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/FeatureProvider/FeatureProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAA;AAMhD,OAAO,EAEL,KAAK,oBAAoB,EACzB,WAAW,EACZ,MAAM,yBAAyB,CAAA;AAShC;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,oBAAoB,qBA6B3E;AAED,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,WAItD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAO/C,OAAO,EAAE,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../../../src/components/Icon/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAO/C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,eAAO,MAAM,YAAY,gBAAgB,CAAA;AAEzC,eAAO,MAAM,IAAI,4GAmChB,CAAA"}
|
|
@@ -4,7 +4,7 @@ export type IconSize = 'xl' | 'l' | 'm' | 's' | 'xs' | 'xxs' | 'xxxs';
|
|
|
4
4
|
interface IconOwnProps {
|
|
5
5
|
/**
|
|
6
6
|
* Controls which icon should be rendered.
|
|
7
|
-
* Inject the icon component from the
|
|
7
|
+
* Inject the icon component from the `@channel.io/bezier-icons` package into this prop.
|
|
8
8
|
* @example
|
|
9
9
|
* ```tsx
|
|
10
10
|
* import { HeartFilledIcon } from '@channel.io/bezier-icons'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAON,MAAM,OAAO,CAAA;AAad,OAAO,KAAK,EAEV,YAAY,EAEb,MAAM,iBAAiB,CAAA;AAKxB,eAAO,MAAM,iBAAiB,qBAAqB,CAAA;AACnD,eAAO,MAAM,eAAe,mBAAmB,CAAA;AAC/C,eAAO,MAAM,UAAU,WAAW,CAAA;AAElC,eAAO,MAAM,OAAO,qFAyPnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAA;AAcjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAIrD,eAAO,MAAM,QAAQ,2FA4DpB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA2BvE,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,eAAe,CAAA;AA8BtB,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,UAAU,EAAE,cAAc,EAC1B,MAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,OAAO,EACP,MAAgB,EAChB,WAAkB,EAClB,kBAAkB,EAClB,OAAW,EACX,SAAS,GACV,EAAE,UAAU,qBAmGZ;AAkBD,wBAAgB,aAAa,CAAC,EAC5B,kBAAyB,EACzB,SAAS,EAAE,cAAc,EACzB,MAAuB,EACvB,QAAa,GACd,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA2BvE,OAAO,EAIL,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACf,MAAM,eAAe,CAAA;AA8BtB,wBAAgB,KAAK,CAAC,EACpB,SAAS,EACT,UAAU,EAAE,cAAc,EAC1B,MAAkB,EAClB,IAAI,EAAE,QAAQ,EACd,OAAO,EACP,MAAgB,EAChB,WAAkB,EAClB,kBAAkB,EAClB,OAAW,EACX,SAAS,GACV,EAAE,UAAU,qBAmGZ;AAkBD,wBAAgB,aAAa,CAAC,EAC5B,kBAAyB,EACzB,SAAS,EAAE,cAAc,EACzB,MAAuB,EACvB,QAAa,GACd,EAAE,kBAAkB,qBAgDpB;AAED,wBAAgB,QAAQ;;;;;;;EAevB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { useLayoutEffect } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @description This hook is used to handle the layout effect in a way that is compatible with SSR.
|
|
4
|
+
* In Server Environments, this hook will use `useEffect` instead of `useLayoutEffect`.
|
|
5
|
+
* @see https://react.dev/reference/react/useLayoutEffect#troubleshooting
|
|
6
|
+
*/
|
|
7
|
+
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
|
8
|
+
//# sourceMappingURL=useIsomorphicLayoutEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsomorphicLayoutEffect.d.ts","sourceRoot":"","sources":["../../../src/hooks/useIsomorphicLayoutEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,eAAe,EAAE,MAAM,OAAO,CAAA;AAElD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,wBACuB,CAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from "./components/AlphaDialogPrimitive";
|
|
|
7
7
|
export * from "./components/AlphaFloatingButton";
|
|
8
8
|
export * from "./components/AlphaFloatingIconButton";
|
|
9
9
|
export * from "./components/AlphaIconButton";
|
|
10
|
+
export * from "./components/AlphaSpinner";
|
|
10
11
|
export * from "./components/AlphaTooltipPrimitive";
|
|
11
12
|
export * from "./components/AppProvider";
|
|
12
13
|
export * from "./components/AutoFocus";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,yBAAyB,CAAA;AAGhC,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AAGlD,yCAA4C;AAC5C,8CAAiD;AACjD,yCAA4C;AAC5C,kDAAqD;AACrD,iDAAoD;AACpD,qDAAwD;AACxD,6CAAgD;AAChD,mDAAsD;AACtD,yCAA4C;AAC5C,uCAA0C;AAC1C,oCAAuC;AACvC,yCAA4C;AAC5C,mCAAsC;AACtC,oCAAuC;AACvC,iCAAoC;AACpC,oCAAuC;AACvC,yCAA4C;AAC5C,oCAAuC;AACvC,6CAAgD;AAChD,sCAAyC;AACzC,0CAA6C;AAC7C,qCAAwC;AACxC,mCAAsC;AACtC,6CAAgD;AAChD,yCAA4C;AAC5C,uCA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C;AAC5C,2CAA8C;AAC9C,sCAAyC;AACzC,mCAAsC;AACtC,sCAAyC;AACzC,qCAAwC;AACxC,yCAA4C;AAC5C,qCAAwC;AACxC,yCAA4C;AAC5C,wCAA2C;AAC3C,0CAA6C;AAC7C,8CAAiD;AACjD,oCAAuC;AACvC,oCAAuC;AACvC,8CAAiD;AACjD,qCAAwC;AACxC,mCAAsC;AACtC,oCAAuC;AACvC,oCAAuC;AACvC,kCAAqC;AACrC,iCAAoC;AACpC,kCAAqC;AACrC,sCAAyC;AACzC,uCAA0C;AAC1C,2CAA8C;AAC9C,mCAAsC;AACtC,qCAAwC;AACxC,4CAA+C;AAC/C,4CAA+C;AAG/C,8DAAiE;AAGjE,8BAAiC;AACjC,+BAAkC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@channel.io/bezier-react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "React components library that implements Bezier design system.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@babel/preset-env": "^7.23.9",
|
|
64
64
|
"@babel/preset-react": "^7.23.3",
|
|
65
65
|
"@babel/preset-typescript": "^7.23.3",
|
|
66
|
-
"@channel.io/bezier-icons": "0.
|
|
66
|
+
"@channel.io/bezier-icons": "0.26.0",
|
|
67
67
|
"@rollup/plugin-alias": "^5.1.0",
|
|
68
68
|
"@rollup/plugin-babel": "^6.0.4",
|
|
69
69
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
"dependencies": {
|
|
130
|
-
"@channel.io/bezier-tokens": "0.2.
|
|
130
|
+
"@channel.io/bezier-tokens": "0.2.5",
|
|
131
131
|
"@radix-ui/react-checkbox": "^1.0.4",
|
|
132
132
|
"@radix-ui/react-dialog": "^1.0.5",
|
|
133
133
|
"@radix-ui/react-radio-group": "^1.1.3",
|
|
@@ -4,7 +4,7 @@ import classNames from 'classnames'
|
|
|
4
4
|
|
|
5
5
|
import { isEmpty } from '~/src/utils/type'
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { useAvatarContext } from '~/src/components/AlphaAvatar/AvatarSizeContext'
|
|
8
8
|
import {
|
|
9
9
|
SmoothCornersBox,
|
|
10
10
|
type SmoothCornersBoxProps,
|
|
@@ -85,7 +85,7 @@ export const Avatar = forwardRef<HTMLDivElement, AvatarProps>(function Avatar(
|
|
|
85
85
|
},
|
|
86
86
|
forwardedRef
|
|
87
87
|
) {
|
|
88
|
-
const avatarGroupContext =
|
|
88
|
+
const avatarGroupContext = useAvatarContext()
|
|
89
89
|
const size = avatarGroupContext?.size ?? sizeProps
|
|
90
90
|
const loadedAvatarUrl = useProgressiveImage(avatarUrl, fallbackUrl)
|
|
91
91
|
const AVATAR_BORDER_RADIUS = useAvatarRadiusToken()
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext } from '~/src/utils/react'
|
|
2
|
+
|
|
3
|
+
import { type AvatarProps } from './Avatar.types'
|
|
4
|
+
|
|
5
|
+
const [AvatarContextProvider, useAvatarContext] = createContext<
|
|
6
|
+
Pick<AvatarProps, 'size'>
|
|
7
|
+
>({ size: undefined })
|
|
8
|
+
|
|
9
|
+
export { AvatarContextProvider, useAvatarContext }
|
|
@@ -4,7 +4,6 @@ import { MoreIcon } from '@channel.io/bezier-icons'
|
|
|
4
4
|
import classNames from 'classnames'
|
|
5
5
|
|
|
6
6
|
import { isLastIndex } from '~/src/utils/array'
|
|
7
|
-
import { createContext } from '~/src/utils/react'
|
|
8
7
|
import { px } from '~/src/utils/style'
|
|
9
8
|
|
|
10
9
|
import {
|
|
@@ -12,23 +11,15 @@ import {
|
|
|
12
11
|
type AlphaAvatarSize,
|
|
13
12
|
useAlphaAvatarRadiusToken,
|
|
14
13
|
} from '~/src/components/AlphaAvatar'
|
|
14
|
+
import { AvatarContextProvider } from '~/src/components/AlphaAvatar/AvatarSizeContext'
|
|
15
15
|
import { Icon } from '~/src/components/Icon'
|
|
16
16
|
import { SmoothCornersBox } from '~/src/components/SmoothCornersBox'
|
|
17
17
|
import { Text } from '~/src/components/Text'
|
|
18
18
|
|
|
19
|
-
import {
|
|
20
|
-
type AvatarGroupContextValue,
|
|
21
|
-
type AvatarGroupProps,
|
|
22
|
-
} from './AvatarGroup.types'
|
|
19
|
+
import { type AvatarGroupProps } from './AvatarGroup.types'
|
|
23
20
|
|
|
24
21
|
import styles from './AvatarGroup.module.scss'
|
|
25
22
|
|
|
26
|
-
const [AvatarGroupContextProvider, useAvatarGroupContext] = createContext<
|
|
27
|
-
AvatarGroupContextValue | undefined
|
|
28
|
-
>(undefined)
|
|
29
|
-
|
|
30
|
-
export { useAvatarGroupContext }
|
|
31
|
-
|
|
32
23
|
const MAX_AVATAR_LIST_COUNT = 99
|
|
33
24
|
const AVATAR_GROUP_DEFAULT_SPACING = 4
|
|
34
25
|
export const AVATAR_GROUP_ELLIPSIS_ICON_TEST_ID =
|
|
@@ -197,7 +188,7 @@ export const AvatarGroup = forwardRef<HTMLDivElement, AvatarGroupProps>(
|
|
|
197
188
|
])
|
|
198
189
|
|
|
199
190
|
return (
|
|
200
|
-
<
|
|
191
|
+
<AvatarContextProvider
|
|
201
192
|
value={useMemo(
|
|
202
193
|
() => ({
|
|
203
194
|
size,
|
|
@@ -223,7 +214,7 @@ export const AvatarGroup = forwardRef<HTMLDivElement, AvatarGroupProps>(
|
|
|
223
214
|
>
|
|
224
215
|
{AvatarListComponent}
|
|
225
216
|
</div>
|
|
226
|
-
</
|
|
217
|
+
</AvatarContextProvider>
|
|
227
218
|
)
|
|
228
219
|
}
|
|
229
220
|
)
|
|
@@ -33,9 +33,6 @@ interface AvatarGroupOwnProps {
|
|
|
33
33
|
ellipsisType?: AvatarGroupEllipsisType
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export interface AvatarGroupContextValue
|
|
37
|
-
extends Pick<AlphaAvatarProps, 'size'> {}
|
|
38
|
-
|
|
39
36
|
export interface AvatarGroupProps
|
|
40
37
|
extends BezierComponentProps<'div'>,
|
|
41
38
|
ChildrenProps,
|
|
@@ -180,13 +180,13 @@ exports[`AvatarGroup Ellipsis type - Icon Snapshot 1`] = `
|
|
|
180
180
|
style="--b-smooth-corners-box-border-radius: 42%; --b-smooth-corners-box-shadow-blur-radius: 0px; --b-smooth-corners-box-shadow-spread-radius: 0px; --b-smooth-corners-box-padding: 0px; --b-smooth-corners-box-margin: 0px; --b-smooth-corners-box-background-color: var(--bgtxt-absolute-black-lightest);"
|
|
181
181
|
>
|
|
182
182
|
<svg
|
|
183
|
-
class="Icon margin"
|
|
183
|
+
class="Icon size-xs margin"
|
|
184
184
|
data-testid="bezier-icon"
|
|
185
185
|
fill="none"
|
|
186
|
-
height="
|
|
186
|
+
height="1em"
|
|
187
187
|
style="--b-icon-color: var(--bgtxt-absolute-white-dark);"
|
|
188
188
|
viewBox="0 0 24 24"
|
|
189
|
-
width="
|
|
189
|
+
width="1em"
|
|
190
190
|
xmlns="http://www.w3.org/2000/svg"
|
|
191
191
|
>
|
|
192
192
|
<path
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
@use '../../styles/mixins/dimension';
|
|
2
|
+
|
|
3
|
+
@import '../Icon/Icon.module';
|
|
4
|
+
|
|
1
5
|
$chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
2
6
|
|
|
3
7
|
.Button {
|
|
@@ -67,10 +71,11 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
67
71
|
purple: var(--alpha-color-bg-purple-normal),
|
|
68
72
|
dark-grey: var(--alpha-color-bg-grey-darkest),
|
|
69
73
|
light-grey: var(--alpha-color-bg-black-dark),
|
|
74
|
+
white: var(--alpha-color-bg-absolute-white-dark),
|
|
70
75
|
);
|
|
71
76
|
|
|
72
77
|
@each $color, $background-color in $background-color-by-color {
|
|
73
|
-
&:where(.color-#{$color}) {
|
|
78
|
+
&:where(.color-#{'' + $color}) {
|
|
74
79
|
background-color: $background-color;
|
|
75
80
|
}
|
|
76
81
|
}
|
|
@@ -87,17 +92,18 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
87
92
|
purple: var(--alpha-color-bg-purple-lightest),
|
|
88
93
|
dark-grey: var(--alpha-color-bg-black-lighter),
|
|
89
94
|
light-grey: var(--alpha-color-bg-black-lighter),
|
|
95
|
+
white: var(--alpha-color-bg-absolute-white-lightest),
|
|
90
96
|
);
|
|
91
97
|
|
|
92
98
|
@each $color, $background-color in $background-color-by-color {
|
|
93
|
-
&:where(.color-#{$color}) {
|
|
99
|
+
&:where(.color-#{'' + $color}) {
|
|
94
100
|
background-color: $background-color;
|
|
95
101
|
}
|
|
96
102
|
}
|
|
97
103
|
}
|
|
98
104
|
|
|
99
105
|
&:where(.variant-tertiary) {
|
|
100
|
-
background-color:
|
|
106
|
+
background-color: var(--alpha-color-bg-white-white-alpha-transparent);
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
/* color */
|
|
@@ -128,7 +134,7 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
128
134
|
);
|
|
129
135
|
|
|
130
136
|
@each $button-color, $color in $color-map {
|
|
131
|
-
&:where(.color-#{$button-color}) {
|
|
137
|
+
&:where(.color-#{'' + $button-color}) {
|
|
132
138
|
color: $color;
|
|
133
139
|
}
|
|
134
140
|
}
|
|
@@ -179,7 +185,7 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
179
185
|
&:where(.active, :hover):where(:not(:disabled)) {
|
|
180
186
|
&:where(.variant-primary) {
|
|
181
187
|
@each $color in $chromatic-colors {
|
|
182
|
-
&:where(.color-#{$color}) {
|
|
188
|
+
&:where(.color-#{'' + $color}) {
|
|
183
189
|
background-color: var(--bgtxt-#{$color}-dark);
|
|
184
190
|
}
|
|
185
191
|
}
|
|
@@ -195,7 +201,7 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
195
201
|
|
|
196
202
|
&:where(.variant-secondary) {
|
|
197
203
|
@each $color in $chromatic-colors {
|
|
198
|
-
&:where(.color-#{$color}) {
|
|
204
|
+
&:where(.color-#{'' + $color}) {
|
|
199
205
|
background-color: var(--bgtxt-#{$color}-lighter);
|
|
200
206
|
}
|
|
201
207
|
}
|
|
@@ -207,7 +213,7 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
207
213
|
|
|
208
214
|
&:where(.variant-tertiary) {
|
|
209
215
|
@each $color in $chromatic-colors {
|
|
210
|
-
&:where(.color-#{$color}) {
|
|
216
|
+
&:where(.color-#{'' + $color}) {
|
|
211
217
|
background-color: var(--bgtxt-#{$color}-lightest);
|
|
212
218
|
}
|
|
213
219
|
}
|
|
@@ -256,12 +262,20 @@ $chromatic-colors: 'blue', 'red', 'green', 'cobalt', 'orange', 'pink', 'purple';
|
|
|
256
262
|
}
|
|
257
263
|
}
|
|
258
264
|
|
|
259
|
-
.ButtonLoader {
|
|
265
|
+
& :where(.ButtonLoader) {
|
|
260
266
|
position: absolute;
|
|
261
267
|
inset: 0;
|
|
262
268
|
|
|
263
269
|
display: flex;
|
|
264
270
|
align-items: center;
|
|
265
271
|
justify-content: center;
|
|
272
|
+
|
|
273
|
+
@each $size, $value in $size-map {
|
|
274
|
+
&:where(.size-#{$size}) {
|
|
275
|
+
& :is(.Spinner) {
|
|
276
|
+
@include dimension.square(#{$value}px);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
266
280
|
}
|
|
267
281
|
}
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
type ButtonProps,
|
|
8
8
|
type ButtonSize,
|
|
9
9
|
} from '~/src/components/AlphaButton/Button.types'
|
|
10
|
+
import { AlphaSpinner } from '~/src/components/AlphaSpinner'
|
|
10
11
|
import { BaseButton } from '~/src/components/BaseButton'
|
|
11
12
|
import { Icon, type IconSize } from '~/src/components/Icon'
|
|
12
|
-
import { Spinner } from '~/src/components/Spinner'
|
|
13
13
|
import { Text } from '~/src/components/Text'
|
|
14
14
|
|
|
15
15
|
import styles from './Button.module.scss'
|
|
@@ -44,18 +44,6 @@ function getIconSize(size: ButtonSize) {
|
|
|
44
44
|
)[size]
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
function getSpinnerSize(size: ButtonSize) {
|
|
48
|
-
return (
|
|
49
|
-
{
|
|
50
|
-
xs: 'xs',
|
|
51
|
-
s: 'xs',
|
|
52
|
-
m: 's',
|
|
53
|
-
l: 's',
|
|
54
|
-
xl: 's',
|
|
55
|
-
} as const
|
|
56
|
-
)[size]
|
|
57
|
-
}
|
|
58
|
-
|
|
59
47
|
function getTypography(size: ButtonSize) {
|
|
60
48
|
return (
|
|
61
49
|
{
|
|
@@ -126,10 +114,17 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
126
114
|
/>
|
|
127
115
|
</div>
|
|
128
116
|
|
|
129
|
-
{/* TODO: use AlphaSpinner */}
|
|
130
117
|
{loading && (
|
|
131
|
-
<div
|
|
132
|
-
|
|
118
|
+
<div
|
|
119
|
+
className={classNames(
|
|
120
|
+
styles.ButtonLoader,
|
|
121
|
+
styles[`size-${getIconSize(size)}`]
|
|
122
|
+
)}
|
|
123
|
+
>
|
|
124
|
+
<AlphaSpinner
|
|
125
|
+
className={styles.Spinner}
|
|
126
|
+
variant="on-overlay"
|
|
127
|
+
/>
|
|
133
128
|
</div>
|
|
134
129
|
)}
|
|
135
130
|
</Comp>
|