This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { API, FileInfo, JSXAttribute, Options } from "jscodeshift"; | |
| /** | |
| * JSCodeshift codemod to transform Chakra UI layout components to HTML elements with Tailwind CSS classes. | |
| * | |
| * This codemod handles: | |
| * - Component transformations (Stack, HStack, VStack, Box, Flex, Grid, etc.) | |
| * - Prop-to-class mappings for common Chakra props (spacing, sizing, colors, etc.) | |
| * - Conditional prop handling with cx utility | |
| * - Import management (adds cx, removes converted Chakra components) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cloneProps(props) { | |
| const propKeys = Object.keys(props); | |
| return propKeys.reduce((memo, k) => { | |
| const prop = props[k]; | |
| memo[k] = Object.assign({}, prop); | |
| if (isObject$4(prop.value) && !isFunction$3(prop.value) && !Array.isArray(prop.value)) memo[k].value = Object.assign({}, prop.value); | |
| if (Array.isArray(prop.value)) memo[k].value = prop.value.slice(0); | |
| return memo; | |
| }, {}); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const taxIdTypes = [ | |
| { | |
| type: 'ae_trn', | |
| code: 'AE TRN', | |
| name: 'United Arab Emirates', | |
| emoji: '🇦🇪', | |
| placeholder: '123456789012345', | |
| }, | |
| { | |
| type: 'au_abn', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://stripe.com/docs/currencies#zero-decimal | |
| const isZeroDecimalCurrency = (currency: string) => | |
| [ | |
| 'BIF', | |
| 'CLP', | |
| 'DJF', | |
| 'GNF', | |
| 'JPY', | |
| 'KMF', | |
| 'KRW', |