@digigov/react-core 2.0.0-rc.30 → 2.0.0-rc.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/Accordion/index.native.d.ts +1 -5
  2. package/AccordionSection/index.native.d.ts +1 -3
  3. package/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  4. package/Base/compat/Input/RadioInput.native.js.map +2 -2
  5. package/Base/index.native.js.map +2 -2
  6. package/Base/index.web.js.map +1 -1
  7. package/Base/mapping.native.d.ts +1 -1
  8. package/Base/mapping.native.js.map +2 -2
  9. package/Button/index.js +1 -0
  10. package/Button/index.js.map +2 -2
  11. package/{CircularProgress → CircularProgressBase}/index.d.ts +5 -5
  12. package/{CircularProgress → CircularProgressBase}/index.js +4 -4
  13. package/CircularProgressBase/index.js.map +7 -0
  14. package/{CircularProgress → CircularProgressBase}/package.json +1 -1
  15. package/CopyToClipboardMessage/index.native.d.ts +1 -3
  16. package/DateInputItem/index.native.d.ts +1 -3
  17. package/Details/index.native.d.ts +1 -3
  18. package/LinkBase/index.js +1 -0
  19. package/LinkBase/index.js.map +2 -2
  20. package/NavListItemActionContainer/index.native.d.ts +0 -2
  21. package/NotificationBannerLink/index.native.d.ts +1 -3
  22. package/Table/index.d.ts +9 -0
  23. package/Table/index.js +4 -1
  24. package/Table/index.js.map +2 -2
  25. package/TableDataCell/index.d.ts +13 -0
  26. package/TableDataCell/index.js +10 -1
  27. package/TableDataCell/index.js.map +2 -2
  28. package/TextArea/index.native.d.ts +1 -3
  29. package/TextInput/index.native.d.ts +1 -3
  30. package/Typography/index.d.ts +1 -1
  31. package/Typography/index.js +15 -17
  32. package/Typography/index.js.map +2 -2
  33. package/WarningText/index.d.ts +7 -0
  34. package/WarningText/index.js +10 -2
  35. package/WarningText/index.js.map +2 -2
  36. package/cjs/Base/compat/Input/CheckboxInput.native.js.map +2 -2
  37. package/cjs/Base/compat/Input/RadioInput.native.js.map +2 -2
  38. package/cjs/Base/index.native.js.map +2 -2
  39. package/cjs/Base/index.web.js.map +1 -1
  40. package/cjs/Base/mapping.native.js.map +2 -2
  41. package/cjs/Button/index.js +1 -0
  42. package/cjs/Button/index.js.map +2 -2
  43. package/cjs/{CircularProgress → CircularProgressBase}/index.js +8 -8
  44. package/cjs/CircularProgressBase/index.js.map +7 -0
  45. package/cjs/LinkBase/index.js +1 -0
  46. package/cjs/LinkBase/index.js.map +2 -2
  47. package/cjs/Table/index.js +4 -1
  48. package/cjs/Table/index.js.map +2 -2
  49. package/cjs/TableDataCell/index.js +10 -1
  50. package/cjs/TableDataCell/index.js.map +2 -2
  51. package/cjs/Typography/index.js +15 -17
  52. package/cjs/Typography/index.js.map +2 -2
  53. package/cjs/WarningText/index.js +10 -2
  54. package/cjs/WarningText/index.js.map +2 -2
  55. package/cjs/index.js +2 -4
  56. package/cjs/index.js.map +2 -2
  57. package/cjs/lazy/index.js +3 -4
  58. package/cjs/lazy.js.map +2 -2
  59. package/cjs/registry/index.js +40 -42
  60. package/cjs/registry.js.map +2 -2
  61. package/cjs/utils/index.native/index.js +32 -34
  62. package/cjs/utils/index.native.js.map +2 -2
  63. package/index.d.ts +1 -2
  64. package/index.js +2 -3
  65. package/index.js.map +2 -2
  66. package/lazy/index.js +3 -4
  67. package/package.json +5 -5
  68. package/registry/index.js +40 -42
  69. package/src/Base/compat/Input/CheckboxInput.native.tsx +2 -6
  70. package/src/Base/compat/Input/RadioInput.native.tsx +2 -6
  71. package/src/Base/index.native.tsx +2 -2
  72. package/src/Base/index.web.tsx +1 -1
  73. package/src/Base/mapping.native.tsx +1 -1
  74. package/src/Button/index.tsx +1 -0
  75. package/src/Checkbox/__snapshots__/index.test.tsx.snap +0 -5
  76. package/src/CheckboxItem/__snapshots__/index.test.tsx.snap +0 -4
  77. package/src/{CircularProgress → CircularProgressBase}/__snapshots__/index.test.tsx.snap +6 -6
  78. package/src/CircularProgressBase/index.test.tsx +38 -0
  79. package/src/{CircularProgress → CircularProgressBase}/index.tsx +7 -7
  80. package/src/LinkBase/index.tsx +1 -0
  81. package/src/RadioItem/__snapshots__/index.test.tsx.snap +0 -4
  82. package/src/Table/index.tsx +12 -0
  83. package/src/TableDataCell/__snapshots__/index.test.tsx.snap +2 -2
  84. package/src/TableDataCell/index.tsx +23 -1
  85. package/src/Typography/index.tsx +21 -20
  86. package/src/WarningText/__snapshots__/index.test.tsx.snap +26 -0
  87. package/src/WarningText/index.test.tsx +5 -0
  88. package/src/WarningText/index.tsx +17 -2
  89. package/src/index.ts +1 -2
  90. package/src/lazy.js +3 -4
  91. package/src/registry.js +40 -42
  92. package/src/utils/index.native.tsx +56 -54
  93. package/utils/index.native/index.js +32 -34
  94. package/utils/index.native.d.ts +3 -6
  95. package/utils/index.native.js.map +2 -2
  96. package/AutoCompleteInputTypeahead/index.d.ts +0 -11
  97. package/AutoCompleteInputTypeahead/index.js +0 -25
  98. package/AutoCompleteInputTypeahead/index.js.map +0 -7
  99. package/AutoCompleteInputTypeahead/package.json +0 -6
  100. package/CircularProgress/index.js.map +0 -7
  101. package/CircularProgress/index.test.d.ts +0 -1
  102. package/cjs/AutoCompleteInputTypeahead/index.js +0 -58
  103. package/cjs/AutoCompleteInputTypeahead/index.js.map +0 -7
  104. package/cjs/CircularProgress/index.js.map +0 -7
  105. package/src/AutoCompleteInputTypeahead/__snapshots__/index.test.tsx.snap +0 -16
  106. package/src/AutoCompleteInputTypeahead/index.test.tsx +0 -8
  107. package/src/AutoCompleteInputTypeahead/index.tsx +0 -32
  108. package/src/CircularProgress/index.test.tsx +0 -34
  109. /package/{AutoCompleteInputTypeahead → CircularProgressBase}/index.test.d.ts +0 -0
@@ -1,6 +1,2 @@
1
- export declare const Accordion: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("@digigov/react-core/Accordion/index.web").AccordionProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>, "ref"> & {
4
- ref?: ((instance: unknown) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<unknown> | null | undefined;
5
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const Accordion: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@digigov/react-core/Accordion/index.web").AccordionProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<unknown>, "ref"> & import("react").RefAttributes<unknown>>;
6
2
  export default Accordion;
@@ -1,4 +1,2 @@
1
- export declare const AccordionSection: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/AccordionSection/index.web").AccordionSectionProps, "ref"> & import("react").RefAttributes<HTMLDetailsElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const AccordionSection: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/AccordionSection/index.web").AccordionSectionProps, "ref"> & import("react").RefAttributes<HTMLDetailsElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default AccordionSection;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/Base/compat/Input/CheckboxInput.native.tsx"],
4
- "sourcesContent": ["import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n LegacyRef,\n} from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type CheckboxInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const CheckboxInput = React.forwardRef<\n HTMLInputElement,\n CheckboxInputProps\n>(function CheckboxInput({ checked, value, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n currentTarget: {\n value,\n checked: !checked,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n return (\n // @ts-ignore\n <TouchableOpacity\n ref={ref as LegacyRef<TouchableOpacity>}\n onPress={handlePress}\n {...props}\n >\n {checked && <View className=\"ds-checkboxes__input--checked\" />}\n </TouchableOpacity>\n );\n});\n\nexport default CheckboxInput;\n"],
5
- "mappings": "AAAA,OAAO,WAIA;AACP,SAAS,kBAAkB,YAAY;AAOhC,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eAAc,EAAE,SAAS,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,QAAM,cAAc,MAAM;AACxB,QAAI,UAAU;AACZ,YAAM,iBAAiB;AAAA,QACrB,eAAe;AAAA,UACb;AAAA,UACA,SAAS,CAAC;AAAA,QACZ;AAAA,MACF;AACA,eAAS,cAAc;AAAA,IACzB;AAAA,EACF;AACA;AAAA;AAAA,IAEE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAG;AAAA;AAAA,MAEH,WAAW,oCAAC,QAAK,WAAU,iCAAgC;AAAA,IAC9D;AAAA;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
4
+ "sourcesContent": ["import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type CheckboxInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const CheckboxInput = React.forwardRef<\n HTMLInputElement,\n CheckboxInputProps\n>(function CheckboxInput({ checked, value, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n currentTarget: {\n value,\n checked: !checked,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n return (\n // @ts-ignore\n <TouchableOpacity\n ref={ref as Ref<TouchableOpacity>}\n onPress={handlePress}\n {...props}\n >\n {checked && <View className=\"ds-checkboxes__input--checked\" />}\n </TouchableOpacity>\n );\n});\n\nexport default CheckboxInput;\n"],
5
+ "mappings": "AAAA,OAAO,WAA4D;AACnE,SAAS,kBAAkB,YAAY;AAOhC,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eAAc,EAAE,SAAS,OAAO,UAAU,GAAG,MAAM,GAAG,KAAK;AACpE,QAAM,cAAc,MAAM;AACxB,QAAI,UAAU;AACZ,YAAM,iBAAiB;AAAA,QACrB,eAAe;AAAA,UACb;AAAA,UACA,SAAS,CAAC;AAAA,QACZ;AAAA,MACF;AACA,eAAS,cAAc;AAAA,IACzB;AAAA,EACF;AACA;AAAA;AAAA,IAEE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAG;AAAA;AAAA,MAEH,WAAW,oCAAC,QAAK,WAAU,iCAAgC;AAAA,IAC9D;AAAA;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
6
6
  "names": ["CheckboxInput"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/Base/compat/Input/RadioInput.native.tsx"],
4
- "sourcesContent": ["import React, {\n DetailedHTMLProps,\n InputHTMLAttributes,\n LegacyRef,\n} from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type RadioInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ value, checked, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n target: {\n value: value,\n checked: true,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <TouchableOpacity\n ref={ref as LegacyRef<typeof TouchableOpacity>}\n onPress={handlePress}\n {...(props as any)}\n >\n {checked && <View className=\"ds-radios__input--checked\" />}\n </TouchableOpacity>\n );\n }\n);\n\nexport default RadioInput;\n"],
5
- "mappings": "AAAA,OAAO,WAIA;AACP,SAAS,kBAAkB,YAAY;AAOhC,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YAAW,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/D,UAAM,cAAc,MAAM;AACxB,UAAI,UAAU;AACZ,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,YACA,SAAS;AAAA,UACX;AAAA,QACF;AACA,iBAAS,cAAc;AAAA,MACzB;AAAA,IACF;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAI;AAAA;AAAA,MAEJ,WAAW,oCAAC,QAAK,WAAU,6BAA4B;AAAA,IAC1D;AAAA,EAEJ;AACF;AAEA,IAAO,4BAAQ;",
4
+ "sourcesContent": ["import React, { DetailedHTMLProps, InputHTMLAttributes, Ref } from 'react';\nimport { TouchableOpacity, View } from 'react-native';\n\nexport type RadioInputProps = Omit<\n DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>,\n 'ref'\n>;\n\nexport const RadioInput = React.forwardRef<HTMLInputElement, RadioInputProps>(\n function RadioInput({ value, checked, onChange, ...props }, ref) {\n const handlePress = () => {\n if (onChange) {\n const syntheticEvent = {\n target: {\n value: value,\n checked: true,\n },\n } as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n return (\n <TouchableOpacity\n ref={ref as Ref<typeof TouchableOpacity>}\n onPress={handlePress}\n {...(props as any)}\n >\n {checked && <View className=\"ds-radios__input--checked\" />}\n </TouchableOpacity>\n );\n }\n);\n\nexport default RadioInput;\n"],
5
+ "mappings": "AAAA,OAAO,WAA4D;AACnE,SAAS,kBAAkB,YAAY;AAOhC,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YAAW,EAAE,OAAO,SAAS,UAAU,GAAG,MAAM,GAAG,KAAK;AAC/D,UAAM,cAAc,MAAM;AACxB,UAAI,UAAU;AACZ,cAAM,iBAAiB;AAAA,UACrB,QAAQ;AAAA,YACN;AAAA,YACA,SAAS;AAAA,UACX;AAAA,QACF;AACA,iBAAS,cAAc;AAAA,MACzB;AAAA,IACF;AAEA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACR,GAAI;AAAA;AAAA,MAEJ,WAAW,oCAAC,QAAK,WAAU,6BAA4B;AAAA,IAC1D;AAAA,EAEJ;AACF;AAEA,IAAO,4BAAQ;",
6
6
  "names": ["RadioInput"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Base/index.native.tsx"],
4
- "sourcesContent": ["import React, { useMemo } from 'react';\nimport { Text, View, ViewProps } from 'react-native';\nimport { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';\nimport { mapping } from '@digigov/react-core/Base/mapping.native';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\nimport { wrap } from '@digigov/react-core/Base/wrap.native';\n\nexport type BaseProps<C extends React.ElementType> = CoreBaseProps<C> &\n ViewProps;\nexport type BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nconst BooleanMapper = {\n true: true,\n false: false,\n undefined: false,\n null: false,\n '': false,\n};\n\nconst textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType = 'span',\n>(\n {\n as,\n display,\n children,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n className,\n 'aria-expanded': ariaExpanded,\n ...props\n }: BaseProps<C>,\n ref: React.ComponentPropsWithRef<C>['ref']\n) {\n const classNames = className?.split(' ') || [];\n let applyBasePropsToWrapper = true;\n\n const basePropToClassName = basePropGenerator({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n });\n\n if (typeof children === 'string') {\n children = [children];\n }\n if (Array.isArray(children)) {\n const textClassNames = classNames\n ?.map((className) => `${className}__text`)\n .join(' ');\n children = children.map((child, index) => {\n if (Array.isArray(child)) {\n return child.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} className={textClassNames}>\n {child}\n </Text>\n );\n }\n return child;\n });\n } else if (typeof child === 'string') {\n if (as && textHtmlTags.includes(as as string)) {\n applyBasePropsToWrapper = false;\n }\n return (\n <Text\n key={index}\n className={\n applyBasePropsToWrapper\n ? textClassNames\n : `${textClassNames} ${basePropToClassName}`\n }\n {...(props.onClick && {\n onPress: props.onClick,\n })}\n >\n {child}\n </Text>\n );\n }\n return child;\n });\n }\n const Component = useMemo(() => {\n const C = mapping[as as keyof JSX.IntrinsicElements] || View;\n if (\n classNames.find((className) =>\n className.match(/__wrapper|__before|__after$/)\n )\n ) {\n return wrap(C);\n }\n return C;\n }, [className]);\n\n Object.keys(props).forEach((k) => {\n if (k.startsWith('aria')) {\n if (BooleanMapper[props[k as keyof typeof props]] !== undefined) {\n props[k as keyof typeof props] =\n BooleanMapper[props[k as keyof typeof props]];\n }\n }\n });\n return (\n <Component\n {...props}\n ref={ref}\n aria-expanded={\n (ariaExpanded as unknown as string) === 'false'\n ? false\n : ariaExpanded === true\n ? true\n : undefined\n }\n className={\n applyBasePropsToWrapper\n ? `${basePropToClassName} ${className}`\n : className\n }\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import React, { useMemo, type JSX } from 'react';\nimport { Text, View, ViewProps } from 'react-native';\nimport { BaseProps as CoreBaseProps } from '@digigov/react-core/Base/index.web';\nimport { mapping } from '@digigov/react-core/Base/mapping.native';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\nimport { wrap } from '@digigov/react-core/Base/wrap.native';\n\nexport type BaseProps<C extends React.ElementType> = CoreBaseProps<C> &\n ViewProps;\nexport type BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nconst BooleanMapper = {\n true: true,\n false: false,\n undefined: false,\n null: false,\n '': false,\n};\n\nconst textHtmlTags = ['h1', 'h2', 'h3', 'h4', 'h5', 'p', 'span'];\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType,\n>(\n {\n as,\n display,\n children,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n className,\n 'aria-expanded': ariaExpanded,\n ...props\n }: BaseProps<C>,\n ref: React.ComponentPropsWithRef<C>['ref']\n) {\n const classNames = className?.split(' ') || [];\n let applyBasePropsToWrapper = true;\n\n const basePropToClassName = basePropGenerator({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n });\n\n if (typeof children === 'string') {\n children = [children];\n }\n if (Array.isArray(children)) {\n const textClassNames = classNames\n ?.map((className) => `${className}__text`)\n .join(' ');\n children = children.map((child, index) => {\n if (Array.isArray(child)) {\n return child.map((child, index) => {\n if (typeof child === 'string') {\n return (\n <Text key={index} className={textClassNames}>\n {child}\n </Text>\n );\n }\n return child;\n });\n } else if (typeof child === 'string') {\n if (as && textHtmlTags.includes(as as string)) {\n applyBasePropsToWrapper = false;\n }\n return (\n <Text\n key={index}\n className={\n applyBasePropsToWrapper\n ? textClassNames\n : `${textClassNames} ${basePropToClassName}`\n }\n {...(props.onClick && {\n onPress: props.onClick,\n })}\n >\n {child}\n </Text>\n );\n }\n return child;\n });\n }\n const Component = useMemo(() => {\n const C = mapping[as as keyof JSX.IntrinsicElements] || View;\n if (\n classNames.find((className) =>\n className.match(/__wrapper|__before|__after$/)\n )\n ) {\n return wrap(C);\n }\n return C;\n }, [className]);\n\n Object.keys(props).forEach((k) => {\n if (k.startsWith('aria')) {\n if (BooleanMapper[props[k as keyof typeof props]] !== undefined) {\n props[k as keyof typeof props] =\n BooleanMapper[props[k as keyof typeof props]];\n }\n }\n });\n return (\n <Component\n {...props}\n ref={ref}\n aria-expanded={\n (ariaExpanded as unknown as string) === 'false'\n ? false\n : ariaExpanded === true\n ? true\n : undefined\n }\n className={\n applyBasePropsToWrapper\n ? `${basePropToClassName} ${className}`\n : className\n }\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
5
+ "mappings": "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",
6
6
  "names": ["Base", "className", "child", "index"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Base/index.web.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\ninterface AsProp<C extends React.ElementType> {\n as?: C | React.ElementType<any>;\n}\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);\n\n// This is the first reusable type utility we built\ntype PolymorphicComponentProp<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = React.PropsWithChildren<Props & AsProp<C>> &\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;\n\n// This is a new type utitlity with ref!\ntype PolymorphicComponentPropWithRef<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = PolymorphicComponentProp<C, Props> & { ref?: any };\n\n// This is the type for the \"ref\" only\ntype PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>['ref'];\n\n/**\n * This is the updated component props using PolymorphicComponentPropWithRef\n */\nexport type BaseProps<C extends React.ElementType> =\n PolymorphicComponentPropWithRef<\n C,\n {\n /** margin is optional. It has not a default value. */\n margin?: SpacingValues | SpacingMediaValues;\n /** marginTop is optional. It has not a default value. */\n marginTop?: SpacingValues | SpacingMediaValues;\n /** marginBottom is optional. It has not a default value. */\n marginBottom?: SpacingValues | SpacingMediaValues;\n /** marginLeft is optional. It has not a default value. */\n marginLeft?: SpacingValues | SpacingMediaValues;\n /** marginRight is optional. It has not a default value. */\n marginRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for margin. Margin is optional. It has not a default value. */\n m?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginTop. MarginTop is optional. It has not a default value. */\n mt?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */\n mb?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */\n ml?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginRight. MarginRight is optional. It has not a default value. */\n mr?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginX. MarginX is optional. It has not a default value. */\n mx?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginY. MarginY is optional. It has not a default value. */\n my?: SpacingValues | SpacingMediaValues;\n /** padding is optional. It has not a default value. */\n padding?: SpacingValues | SpacingMediaValues;\n /** paddingTop is optional. It has not a default value. */\n paddingTop?: SpacingValues | SpacingMediaValues;\n /** paddingBottom is optional. It has not a default value. */\n paddingBottom?: SpacingValues | SpacingMediaValues;\n /** paddingLeft is optional. It has not a default value. */\n paddingLeft?: SpacingValues | SpacingMediaValues;\n /** paddingRight is optional. It has not a default value. */\n paddingRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for padding. Padding is optional. It has not a default value. */\n p?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */\n pt?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */\n pb?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */\n pl?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */\n pr?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingX. PaddingX is optional. It has not a default value. */\n px?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingY. PaddingY is optional. It has not a default value. */\n py?: SpacingValues | SpacingMediaValues;\n /** printHidden is optional. Default value is false. When true, the component is hidden at print. */\n printHidden?: boolean;\n /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/\n printVisible?: 'block' | 'inline';\n /** Components will be hidden at all screen sizes. */\n hidden?: boolean;\n /** Components will be hidden from 'xs' screen size and up. */\n xsUpHidden?: boolean;\n /** Components will be hidden from 'sm' screen size and up. */\n smUpHidden?: boolean;\n /** Components will be hidden from 'md' screen size and up. */\n mdUpHidden?: boolean;\n /** Components will be hidden from 'lg' screen size and up. */\n lgUpHidden?: boolean;\n /** Components will be hidden from 'xl' screen size and up. */\n xlUpHidden?: boolean;\n /** Components will be hidden between xs and sm screen size. */\n xsHidden?: boolean;\n /** Components will be hidden between sm and md screen size. */\n smHidden?: boolean;\n /** Components will be hidden between md and lg screen size. */\n mdHidden?: boolean;\n /** Components will be hidden between lg and xl screen size. */\n lgHidden?: boolean;\n /** Components will be hidden between xl and 2xl screen size. */\n xlHidden?: boolean;\n /** display is optional. It has not a default value. */\n display?: 'flex' | 'block' | 'none';\n }\n >;\n\nexport type SpacingValues =\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 14\n | 16\n | 20\n | 24\n | 28\n | 32\n | 36\n | 40\n | 44\n | 48\n | 52\n | 56\n | 60\n | 64\n | 72\n | 80\n | 96;\n\nexport interface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\n\n/**\n * This is the type used in the type annotation for the component\n */\ntype BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType = 'span',\n>(\n {\n as,\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n children,\n className,\n ...props\n }: BaseProps<C>,\n ref?: PolymorphicRef<C>\n) {\n const Component = as || 'span';\n\n const basePropToClassName = basePropGenerator({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n });\n\n return (\n <Component\n className={clsx(basePropToClassName, className)}\n ref={ref}\n {...props}\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport { basePropGenerator } from '@digigov/react-core/Base/utils';\ninterface AsProp<C extends React.ElementType> {\n as?: C | React.ElementType<any>;\n}\n\ntype PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);\n\n// This is the first reusable type utility we built\ntype PolymorphicComponentProp<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = React.PropsWithChildren<Props & AsProp<C>> &\n Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;\n\n// This is a new type utitlity with ref!\ntype PolymorphicComponentPropWithRef<\n C extends React.ElementType,\n Props = Record<string, unknown>,\n> = PolymorphicComponentProp<C, Props> & { ref?: any };\n\n// This is the type for the \"ref\" only\ntype PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>['ref'];\n\n/**\n * This is the updated component props using PolymorphicComponentPropWithRef\n */\nexport type BaseProps<C extends React.ElementType> =\n PolymorphicComponentPropWithRef<\n C,\n {\n /** margin is optional. It has not a default value. */\n margin?: SpacingValues | SpacingMediaValues;\n /** marginTop is optional. It has not a default value. */\n marginTop?: SpacingValues | SpacingMediaValues;\n /** marginBottom is optional. It has not a default value. */\n marginBottom?: SpacingValues | SpacingMediaValues;\n /** marginLeft is optional. It has not a default value. */\n marginLeft?: SpacingValues | SpacingMediaValues;\n /** marginRight is optional. It has not a default value. */\n marginRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for margin. Margin is optional. It has not a default value. */\n m?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginTop. MarginTop is optional. It has not a default value. */\n mt?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginBottom. MarginBottom is optional. It has not a default value. */\n mb?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginLeft. MarginLeft is optional. It has not a default value. */\n ml?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginRight. MarginRight is optional. It has not a default value. */\n mr?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginX. MarginX is optional. It has not a default value. */\n mx?: SpacingValues | SpacingMediaValues;\n /** Alternative for marginY. MarginY is optional. It has not a default value. */\n my?: SpacingValues | SpacingMediaValues;\n /** padding is optional. It has not a default value. */\n padding?: SpacingValues | SpacingMediaValues;\n /** paddingTop is optional. It has not a default value. */\n paddingTop?: SpacingValues | SpacingMediaValues;\n /** paddingBottom is optional. It has not a default value. */\n paddingBottom?: SpacingValues | SpacingMediaValues;\n /** paddingLeft is optional. It has not a default value. */\n paddingLeft?: SpacingValues | SpacingMediaValues;\n /** paddingRight is optional. It has not a default value. */\n paddingRight?: SpacingValues | SpacingMediaValues;\n /** Alternative for padding. Padding is optional. It has not a default value. */\n p?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingTop. PaddingTop is optional. It has not a default value. */\n pt?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingBottom. PaddingBottom is optional. It has not a default value. */\n pb?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingLeft. PaddingLeft is optional. It has not a default value. */\n pl?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingRight. PaddingRight is optional. It has not a default value. */\n pr?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingX. PaddingX is optional. It has not a default value. */\n px?: SpacingValues | SpacingMediaValues;\n /** Alternative for paddingY. PaddingY is optional. It has not a default value. */\n py?: SpacingValues | SpacingMediaValues;\n /** printHidden is optional. Default value is false. When true, the component is hidden at print. */\n printHidden?: boolean;\n /** printVisible is optional. When block, the component is displayed as block. When inline, the component is displayed as inline.*/\n printVisible?: 'block' | 'inline';\n /** Components will be hidden at all screen sizes. */\n hidden?: boolean;\n /** Components will be hidden from 'xs' screen size and up. */\n xsUpHidden?: boolean;\n /** Components will be hidden from 'sm' screen size and up. */\n smUpHidden?: boolean;\n /** Components will be hidden from 'md' screen size and up. */\n mdUpHidden?: boolean;\n /** Components will be hidden from 'lg' screen size and up. */\n lgUpHidden?: boolean;\n /** Components will be hidden from 'xl' screen size and up. */\n xlUpHidden?: boolean;\n /** Components will be hidden between xs and sm screen size. */\n xsHidden?: boolean;\n /** Components will be hidden between sm and md screen size. */\n smHidden?: boolean;\n /** Components will be hidden between md and lg screen size. */\n mdHidden?: boolean;\n /** Components will be hidden between lg and xl screen size. */\n lgHidden?: boolean;\n /** Components will be hidden between xl and 2xl screen size. */\n xlHidden?: boolean;\n /** display is optional. It has not a default value. */\n display?: 'flex' | 'block' | 'none';\n }\n >;\n\nexport type SpacingValues =\n | 0\n | 0.5\n | 1\n | 1.5\n | 2\n | 2.5\n | 3\n | 3.5\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12\n | 14\n | 16\n | 20\n | 24\n | 28\n | 32\n | 36\n | 40\n | 44\n | 48\n | 52\n | 56\n | 60\n | 64\n | 72\n | 80\n | 96;\n\nexport interface SpacingMediaValues {\n xs?: SpacingValues;\n sm?: SpacingValues;\n md?: SpacingValues;\n lg?: SpacingValues;\n xl?: SpacingValues;\n}\n\n/**\n * This is the type used in the type annotation for the component\n */\ntype BaseComponent = <C extends React.ElementType = 'span'>(\n props: BaseProps<C>\n) => React.ReactNode | null;\n\nexport const Base: BaseComponent = React.forwardRef(function Base<\n C extends React.ElementType,\n>(\n {\n as,\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n children,\n className,\n ...props\n }: BaseProps<C>,\n ref?: PolymorphicRef<C>\n) {\n const Component = as || 'span';\n\n const basePropToClassName = basePropGenerator({\n display,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n m,\n mt,\n mb,\n ml,\n mr,\n mx,\n my,\n padding,\n paddingTop,\n paddingBottom,\n paddingLeft,\n paddingRight,\n p,\n pt,\n pb,\n pr,\n pl,\n px,\n py,\n printHidden,\n printVisible,\n hidden,\n xsUpHidden,\n smUpHidden,\n mdUpHidden,\n lgUpHidden,\n xlUpHidden,\n xsHidden,\n smHidden,\n mdHidden,\n lgHidden,\n xlHidden,\n });\n\n return (\n <Component\n className={clsx(basePropToClassName, className)}\n ref={ref}\n {...props}\n >\n {children}\n </Component>\n );\n});\n\nexport default Base;\n"],
5
5
  "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,yBAAyB;AAiK3B,MAAM,OAAsB,MAAM,WAAW,SAASA,MAG3D;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,QAAM,YAAY,MAAM;AAExB,QAAM,sBAAsB,kBAAkB;AAAA,IAC5C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AAED,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,KAAK,qBAAqB,SAAS;AAAA,MAC9C;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,oBAAQ;",
6
6
  "names": ["Base"]
7
7
  }
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { type JSX } from 'react';
2
2
  export type MapProps<T extends keyof JSX.IntrinsicElements> = React.ComponentPropsWithoutRef<T>;
3
3
  export type MappingType = {
4
4
  [K in keyof JSX.IntrinsicElements]?: (props: any) => JSX.Element | React.ReactNode;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Base/mapping.native.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport { Link } from 'expo-router';\nimport { cssInterop } from 'nativewind';\nimport { Image, View } from 'react-native';\nimport Svg, { Path, Circle, Rect, G, Polygon } from 'react-native-svg';\nimport { Button } from '@digigov/react-core/Base/compat/button.native';\nimport CompatDetails from '@digigov/react-core/Base/compat/details.native';\nimport BaseInput from '@digigov/react-core/Base/compat/Input/index.native';\nimport { Ol } from '@digigov/react-core/Base/compat/ol.native';\nexport type MapProps<T extends keyof JSX.IntrinsicElements> =\n React.ComponentPropsWithoutRef<T>;\n\n// TODO: use MapProps<K> instead of any for props type\nexport type MappingType = {\n [K in keyof JSX.IntrinsicElements]?: (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n ) => JSX.Element | React.ReactNode;\n};\n\nexport const mapping: MappingType = {\n a: ({ children, ...props }) => (\n <Link {...props} asChild>\n <View>{children}</View>\n </Link>\n ),\n img: (props) => <Image {...props} />,\n button: Button,\n input: BaseInput,\n textarea: BaseInput,\n details: CompatDetails,\n ol: Ol,\n path: (props) => <Path {...props} />,\n // @ts-ignore\n svg: cssInterop(Svg, {\n className: {\n target: 'style',\n nativeStyleToProp: { width: true, height: true },\n },\n }),\n rect: (props) => <Rect {...props} />,\n circle: (props) => <Circle {...props} />,\n g: (props) => <G {...props} />,\n polygon: (props) => <Polygon {...props} />,\n};\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,YAAY;AAC5B,OAAO,OAAO,MAAM,QAAQ,MAAM,GAAG,eAAe;AACpD,SAAS,cAAc;AACvB,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,SAAS,UAAU;AAYZ,MAAM,UAAuB;AAAA,EAClC,GAAG,CAAC,EAAE,UAAU,GAAG,MAAM,MACvB,oCAAC,QAAM,GAAG,OAAO,SAAO,QACtB,oCAAC,YAAM,QAAS,CAClB;AAAA,EAEF,KAAK,CAAC,UAAU,oCAAC,SAAO,GAAG,OAAO;AAAA,EAClC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM,CAAC,UAAU,oCAAC,QAAM,GAAG,OAAO;AAAA;AAAA,EAElC,KAAK,WAAW,KAAK;AAAA,IACnB,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,mBAAmB,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,IACjD;AAAA,EACF,CAAC;AAAA,EACD,MAAM,CAAC,UAAU,oCAAC,QAAM,GAAG,OAAO;AAAA,EAClC,QAAQ,CAAC,UAAU,oCAAC,UAAQ,GAAG,OAAO;AAAA,EACtC,GAAG,CAAC,UAAU,oCAAC,KAAG,GAAG,OAAO;AAAA,EAC5B,SAAS,CAAC,UAAU,oCAAC,WAAS,GAAG,OAAO;AAC1C;",
4
+ "sourcesContent": ["import React, { type JSX } from 'react';\nimport { Link } from 'expo-router';\nimport { cssInterop } from 'nativewind';\nimport { Image, View } from 'react-native';\nimport Svg, { Path, Circle, Rect, G, Polygon } from 'react-native-svg';\nimport { Button } from '@digigov/react-core/Base/compat/button.native';\nimport CompatDetails from '@digigov/react-core/Base/compat/details.native';\nimport BaseInput from '@digigov/react-core/Base/compat/Input/index.native';\nimport { Ol } from '@digigov/react-core/Base/compat/ol.native';\nexport type MapProps<T extends keyof JSX.IntrinsicElements> =\n React.ComponentPropsWithoutRef<T>;\n\n// TODO: use MapProps<K> instead of any for props type\nexport type MappingType = {\n [K in keyof JSX.IntrinsicElements]?: (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n ) => JSX.Element | React.ReactNode;\n};\n\nexport const mapping: MappingType = {\n a: ({ children, ...props }) => (\n <Link {...props} asChild>\n <View>{children}</View>\n </Link>\n ),\n img: (props) => <Image {...props} />,\n button: Button,\n input: BaseInput,\n textarea: BaseInput,\n details: CompatDetails,\n ol: Ol,\n path: (props) => <Path {...props} />,\n // @ts-ignore\n svg: cssInterop(Svg, {\n className: {\n target: 'style',\n nativeStyleToProp: { width: true, height: true },\n },\n }),\n rect: (props) => <Rect {...props} />,\n circle: (props) => <Circle {...props} />,\n g: (props) => <G {...props} />,\n polygon: (props) => <Polygon {...props} />,\n};\n"],
5
+ "mappings": "AAAA,OAAO,WAAyB;AAChC,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,OAAO,YAAY;AAC5B,OAAO,OAAO,MAAM,QAAQ,MAAM,GAAG,eAAe;AACpD,SAAS,cAAc;AACvB,OAAO,mBAAmB;AAC1B,OAAO,eAAe;AACtB,SAAS,UAAU;AAYZ,MAAM,UAAuB;AAAA,EAClC,GAAG,CAAC,EAAE,UAAU,GAAG,MAAM,MACvB,oCAAC,QAAM,GAAG,OAAO,SAAO,QACtB,oCAAC,YAAM,QAAS,CAClB;AAAA,EAEF,KAAK,CAAC,UAAU,oCAAC,SAAO,GAAG,OAAO;AAAA,EAClC,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,MAAM,CAAC,UAAU,oCAAC,QAAM,GAAG,OAAO;AAAA;AAAA,EAElC,KAAK,WAAW,KAAK;AAAA,IACnB,WAAW;AAAA,MACT,QAAQ;AAAA,MACR,mBAAmB,EAAE,OAAO,MAAM,QAAQ,KAAK;AAAA,IACjD;AAAA,EACF,CAAC;AAAA,EACD,MAAM,CAAC,UAAU,oCAAC,QAAM,GAAG,OAAO;AAAA,EAClC,QAAQ,CAAC,UAAU,oCAAC,UAAQ,GAAG,OAAO;AAAA,EACtC,GAAG,CAAC,UAAU,oCAAC,KAAG,GAAG,OAAO;AAAA,EAC5B,SAAS,CAAC,UAAU,oCAAC,WAAS,GAAG,OAAO;AAC1C;",
6
6
  "names": []
7
7
  }
package/Button/index.js CHANGED
@@ -22,6 +22,7 @@ const Button = React.forwardRef(
22
22
  className: clsx(className, {
23
23
  "ds-link": variant === "link",
24
24
  "ds-link-warning": variant === "link" && color === "warning",
25
+ "ds-link--disabled": variant === "link" && disabled,
25
26
  "ds-btn": variant === "button",
26
27
  "ds-btn--dense": dense,
27
28
  "ds-btn-primary": variant === "button" && color === "primary",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Button/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiCzB,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASA,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface ButtonProps extends BaseProps<'button'> {\n /**\n * color is optional.\n * 'primary' color is used for the main call to action on a page.\n * 'secondary' color is used for secondary calls to action on a page.\n * 'warning' color is used to make users think carefully before they use them.\n * The default value is 'primary'.\n * @value 'primary'\n * @value 'secondary'\n * @value 'warning'\n * @default 'primary'\n */\n color?: 'primary' | 'secondary' | 'warning';\n /**\n * variant is optional.\n * @value 'link'\n * @value 'button'\n * @default 'button'\n */\n variant?: 'link' | 'button';\n /**\n * dense is optional.\n * @value true Button will be dense.\n * @value false\n * @default false\n */\n dense?: boolean;\n}\n/**\n * Use the Button component to help users carry out an action.\n */\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function Button(\n {\n color = 'primary',\n variant = 'button',\n dense,\n disabled,\n printHidden = true,\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"button\"\n disabled={disabled}\n printHidden={printHidden}\n ref={ref}\n className={clsx(className, {\n 'ds-link': variant === 'link',\n 'ds-link-warning': variant === 'link' && color === 'warning',\n 'ds-link--disabled': variant === 'link' && disabled,\n 'ds-btn': variant === 'button',\n 'ds-btn--dense': dense,\n 'ds-btn-primary': variant === 'button' && color === 'primary',\n 'ds-btn-secondary': variant === 'button' && color === 'secondary',\n 'ds-btn-warning': variant === 'button' && color === 'warning',\n 'ds-btn--disabled': variant === 'button' && disabled,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Button;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiCzB,MAAM,SAAS,MAAM;AAAA,EAC1B,SAASA,QACP;AAAA,IACE,QAAQ;AAAA,IACR,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW,YAAY;AAAA,UACvB,mBAAmB,YAAY,UAAU,UAAU;AAAA,UACnD,qBAAqB,YAAY,UAAU;AAAA,UAC3C,UAAU,YAAY;AAAA,UACtB,iBAAiB;AAAA,UACjB,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY,UAAU;AAAA,UACtD,kBAAkB,YAAY,YAAY,UAAU;AAAA,UACpD,oBAAoB,YAAY,YAAY;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,iBAAQ;",
6
6
  "names": ["Button"]
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { BaseProps } from '@digigov/react-core/Base';
3
- export interface CircularProgressProps extends BaseProps<'svg'> {
3
+ export interface CircularProgressBaseProps extends BaseProps<'svg'> {
4
4
  /**
5
5
  * color prop is optional.
6
6
  * color prop is used to change the color of the loader.
@@ -20,8 +20,8 @@ export interface CircularProgressProps extends BaseProps<'svg'> {
20
20
  size?: 'sm' | 'md' | 'lg';
21
21
  }
22
22
  /**
23
- * Use CircularProgress component as an animated loader.
24
- * CircularProgress can be used inside LoaderContainer component.
23
+ * Use CircularProgressBase component as an animated loader.
24
+ * CircularProgressBase can be used inside LoaderContainer component.
25
25
  */
26
- export declare const CircularProgress: React.ForwardRefExoticComponent<Omit<CircularProgressProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
27
- export default CircularProgress;
26
+ export declare const CircularProgressBase: React.ForwardRefExoticComponent<Omit<CircularProgressBaseProps, "ref"> & React.RefAttributes<SVGElement>>;
27
+ export default CircularProgressBase;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const CircularProgress = React.forwardRef(function CircularProgress2({ color = "primary", size = "md", className, ...props }, ref) {
4
+ const CircularProgressBase = React.forwardRef(function CircularProgress({ color = "primary", size = "md", className, ...props }, ref) {
5
5
  return /* @__PURE__ */ React.createElement(
6
6
  Base,
7
7
  {
@@ -35,9 +35,9 @@ const CircularProgress = React.forwardRef(function CircularProgress2({ color = "
35
35
  )
36
36
  );
37
37
  });
38
- var CircularProgress_default = CircularProgress;
38
+ var CircularProgressBase_default = CircularProgressBase;
39
39
  export {
40
- CircularProgress,
41
- CircularProgress_default as default
40
+ CircularProgressBase,
41
+ CircularProgressBase_default as default
42
42
  };
43
43
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/CircularProgressBase/index.tsx"],
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface CircularProgressBaseProps extends BaseProps<'svg'> {\n /**\n * color prop is optional.\n * color prop is used to change the color of the loader.\n * @value 'primary' is the default color.\n * @value 'secondary' recommended for dark backgrounds.\n * @default 'primary'\n */\n color?: 'primary' | 'secondary';\n /**\n * size prop is optional.\n * size prop is used to change the size of the loader.\n * @value 'sm'\n * @value 'md'\n * @value 'lg'\n * @default 'md'\n */\n size?: 'sm' | 'md' | 'lg';\n}\n/**\n * Use CircularProgressBase component as an animated loader.\n * CircularProgressBase can be used inside LoaderContainer component.\n */\nexport const CircularProgressBase = React.forwardRef<\n SVGElement,\n CircularProgressBaseProps\n>(function CircularProgress(\n { color = 'primary', size = 'md', className, ...props },\n ref\n) {\n return (\n <Base\n as=\"svg\"\n ref={ref}\n className={clsx(className, {\n 'ds-circular-progress': true,\n 'ds-circular-progress--secondary': color === 'secondary',\n 'ds-circular-progress--sm': size === 'sm',\n 'ds-circular-progress--md': size === 'md',\n 'ds-circular-progress--lg': size === 'lg',\n })}\n focusable=\"false\"\n viewBox=\"0 0 200 200\"\n aria-hidden=\"true\"\n {...props}\n >\n <path\n className=\"ds-circular-progress__circle ds-circular-progress__circle--1\"\n d=\"M26,99.551C26,55.478,60.246,27.5,99.85,27.5S174,55.478,174,99.551,139.455,172.5,99.85,172.5C60.273,172.473,26,143.6,26,99.551Z\"\n />\n <path\n className=\"ds-circular-progress__circle ds-circular-progress__circle--2\"\n d=\"M26,99.551C26,55.478,60.246,27.5,99.85,27.5S174,55.478,174,99.551,139.455,172.5,99.85,172.5C60.273,172.473,26,143.6,26,99.551Z\"\n />\n </Base>\n );\n});\n\nexport default CircularProgressBase;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAyBzB,MAAM,uBAAuB,MAAM,WAGxC,SAAS,iBACT,EAAE,QAAQ,WAAW,OAAO,MAAM,WAAW,GAAG,MAAM,GACtD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,wBAAwB;AAAA,QACxB,mCAAmC,UAAU;AAAA,QAC7C,4BAA4B,SAAS;AAAA,QACrC,4BAA4B,SAAS;AAAA,QACrC,4BAA4B,SAAS;AAAA,MACvC,CAAC;AAAA,MACD,WAAU;AAAA,MACV,SAAQ;AAAA,MACR,eAAY;AAAA,MACX,GAAG;AAAA;AAAA,IAEJ;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,GAAE;AAAA;AAAA,IACJ;AAAA,EACF;AAEJ,CAAC;AAED,IAAO,+BAAQ;",
6
+ "names": []
7
+ }
@@ -2,5 +2,5 @@
2
2
  "sideEffects": false,
3
3
  "module": "./index.js",
4
4
  "types": "./index.d.ts",
5
- "main": "../cjs/CircularProgress/index.js"
5
+ "main": "../cjs/CircularProgressBase/index.js"
6
6
  }
@@ -1,6 +1,4 @@
1
1
  import { CopyToClipboardContainerProps } from '@digigov/react-core/CopyToClipboardContainer';
2
2
  import { CopyToClipboardMessageProps } from '@digigov/react-core/CopyToClipboardMessage/index.web';
3
- export declare const CopyToClipboardMessage: import("react").ForwardRefExoticComponent<Omit<CopyToClipboardMessageProps & CopyToClipboardContainerProps & {
4
- className?: string;
5
- }, "ref"> & import("react").RefAttributes<unknown>>;
3
+ export declare const CopyToClipboardMessage: import("react").ForwardRefExoticComponent<Omit<CopyToClipboardMessageProps & CopyToClipboardContainerProps, "ref"> & import("react").RefAttributes<unknown>>;
6
4
  export default CopyToClipboardMessage;
@@ -1,4 +1,2 @@
1
- export declare const DateInputItem: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/DateInputItem/index.web").DateInputItemProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const DateInputItem: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/DateInputItem/index.web").DateInputItemProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default DateInputItem;
@@ -1,4 +1,2 @@
1
- export declare const Details: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/Details/index.web").DetailsProps, "ref"> & import("react").RefAttributes<HTMLDetailsElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const Details: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/Details/index.web").DetailsProps, "ref"> & import("react").RefAttributes<HTMLDetailsElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default Details;
package/LinkBase/index.js CHANGED
@@ -12,6 +12,7 @@ const LinkBase = React.forwardRef(
12
12
  "ds-link": defaultStyle,
13
13
  "ds-link--no-underline": !underline
14
14
  }),
15
+ ...props.as && { defaultStyle, underline },
15
16
  ...props
16
17
  },
17
18
  children
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/LinkBase/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface LinkBaseProps extends BaseProps<'a'> {\n /**\n * underline is optional. The default value is 'true'.\n * Make it 'false' only if the context tells the user that the text is a link, even without the underline.\n * @value true\n * @value false\n */\n underline?: boolean;\n /**\n * defaultStyle is optional. The default value is 'true'.\n * Make it 'false' only if you need to use a link with different style, and the default style clashes over with your\n * custom styles. For example, BreadcrumbsListItem is a link but it has a different styling.\n * @value true\n * @value false\n */\n defaultStyle?: boolean;\n}\n/**\n * This component defines a hyperlink, which is used to link from one page to another.\n */\nexport const LinkBase = React.forwardRef<HTMLAnchorElement, LinkBaseProps>(\n function LinkBase(\n { underline = true, defaultStyle = true, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as=\"a\"\n ref={ref}\n className={clsx(className, {\n 'ds-link': defaultStyle,\n 'ds-link--no-underline': !underline,\n })}\n {...(props.as && { defaultStyle: defaultStyle, underline: underline })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default LinkBase;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAsBzB,MAAM,WAAW,MAAM;AAAA,EAC5B,SAASA,UACP,EAAE,YAAY,MAAM,eAAe,MAAM,WAAW,UAAU,GAAG,MAAM,GACvE,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,WAAW;AAAA,UACX,yBAAyB,CAAC;AAAA,QAC5B,CAAC;AAAA,QACA,GAAI,MAAM,MAAM,EAAE,cAA4B,UAAqB;AAAA,QACnE,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,mBAAQ;",
6
6
  "names": ["LinkBase"]
7
7
  }
@@ -1,7 +1,5 @@
1
1
  import { NavListItemActionContainerProps } from '@digigov/react-core/NavListItemActionContainer/index.web';
2
2
  export declare const NavListItemActionContainer: import("react").ForwardRefExoticComponent<Omit<NavListItemActionContainerProps & {
3
3
  borderBottom?: boolean;
4
- } & {
5
- className?: string;
6
4
  }, "ref"> & import("react").RefAttributes<unknown>>;
7
5
  export default NavListItemActionContainer;
@@ -2,7 +2,5 @@ import { NotificationBannerLinkProps } from '@digigov/react-core/NotificationBan
2
2
  interface AdditionalProps {
3
3
  variant?: 'error' | 'success';
4
4
  }
5
- export declare const NotificationBannerLink: import("react").ForwardRefExoticComponent<Omit<NotificationBannerLinkProps & AdditionalProps & {
6
- className?: string;
7
- }, "ref"> & import("react").RefAttributes<unknown>>;
5
+ export declare const NotificationBannerLink: import("react").ForwardRefExoticComponent<Omit<NotificationBannerLinkProps & AdditionalProps, "ref"> & import("react").RefAttributes<unknown>>;
8
6
  export default NotificationBannerLink;
package/Table/index.d.ts CHANGED
@@ -45,6 +45,15 @@ export interface TableProps extends BaseProps<'table'> {
45
45
  * @default 'default'
46
46
  */
47
47
  variant?: 'zebra' | 'default';
48
+ /**
49
+ * verticalAlign is optional.
50
+ * The verticalAlign property sets vertical alignment of the table-cells.
51
+ * @value 'top'
52
+ * @value 'middle'
53
+ * @value 'bottom'
54
+ * @default 'middle'
55
+ */
56
+ verticalAlign?: 'top' | 'middle' | 'bottom';
48
57
  }
49
58
  /**
50
59
  * Table component is used to wrap the sub components of a table
package/Table/index.js CHANGED
@@ -8,6 +8,7 @@ const Table = React.forwardRef(
8
8
  dense = false,
9
9
  verticalBorders = false,
10
10
  stacked = "never",
11
+ verticalAlign = "middle",
11
12
  className,
12
13
  children,
13
14
  ...props
@@ -26,7 +27,9 @@ const Table = React.forwardRef(
26
27
  "ds-table--light": headerVariant === "light",
27
28
  "ds-table--dense": dense,
28
29
  "ds-table--zebra": variant === "zebra",
29
- "ds-table--vertical-lines": verticalBorders
30
+ "ds-table--vertical-lines": verticalBorders,
31
+ "ds-table--align-top": verticalAlign === "top",
32
+ "ds-table--align-bottom": verticalAlign === "bottom"
30
33
  }),
31
34
  ...props
32
35
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Table/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAmDzB,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,YAAY;AAAA,UACZ,4BAA4B,YAAY;AAAA,UACxC,wBAAwB,YAAY;AAAA,UACpC,wBAAwB,WAAW;AAAA,UACnC,kBAAkB,kBAAkB;AAAA,UACpC,mBAAmB,kBAAkB;AAAA,UACrC,mBAAmB;AAAA,UACnB,mBAAmB,YAAY;AAAA,UAC/B,4BAA4B;AAAA,QAC9B,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TableProps extends BaseProps<'table'> {\n /**\n * headerVariant is optional.\n * The `headerVariant` prop is used to either give blue background color to th tags\n * or a light grey background.\n * Default value is undefined which results to an opaque background color.\n * @value 'dark'\n * @value 'light'\n */\n headerVariant?: 'dark' | 'light';\n /**\n * dense is optional.\n * The dense prop is used to make font size smaller and give\n * extra padding.\n * @value true\n * @value false\n * @default false\n */\n dense?: boolean;\n /**\n * verticalBorders is optional.\n * The verticalBorders prop gives extra vertical lines to the table.\n * @value true\n * @value false\n * @default false\n */\n verticalBorders?: boolean;\n /**\n * stacked is optional.\n * The stacked prop gives responsiveness to the table. If used, make sure to add \"data-label\" to TableDataCell components.\n * Default value is never.\n * @value 'always'\n * @value 'sm'\n * @value 'md'\n * @value 'never'\n * @default 'never'\n */\n stacked?: 'always' | 'sm' | 'md' | 'never';\n /**\n * variant is optional.\n * @value 'default'\n * @value 'zebra' is used to make zebra table lines. If you have 'zebra' variant, color prop to TableRow component adds nothing.\n * @default 'default'\n */\n variant?: 'zebra' | 'default';\n /**\n * verticalAlign is optional.\n * The verticalAlign property sets vertical alignment of the table-cells.\n * @value 'top'\n * @value 'middle'\n * @value 'bottom'\n * @default 'middle'\n */\n verticalAlign?: 'top' | 'middle' | 'bottom';\n}\n/**\n * Table component is used to wrap the sub components of a table\n */\nexport const Table = React.forwardRef<HTMLTableElement, TableProps>(\n function Table(\n {\n headerVariant,\n variant,\n dense = false,\n verticalBorders = false,\n stacked = 'never',\n verticalAlign = 'middle',\n className,\n children,\n ...props\n },\n ref\n ) {\n return (\n <Base\n as=\"table\"\n ref={ref}\n className={clsx(className, {\n 'ds-table': true,\n 'ds-table--stacked-always': stacked === 'always',\n 'ds-table--stacked-sm': stacked === 'sm',\n 'ds-table--stacked-md': stacked == 'md',\n 'ds-table--dark': headerVariant === 'dark',\n 'ds-table--light': headerVariant === 'light',\n 'ds-table--dense': dense,\n 'ds-table--zebra': variant === 'zebra',\n 'ds-table--vertical-lines': verticalBorders,\n 'ds-table--align-top': verticalAlign === 'top',\n 'ds-table--align-bottom': verticalAlign === 'bottom',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Table;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA4DzB,MAAM,QAAQ,MAAM;AAAA,EACzB,SAASA,OACP;AAAA,IACE;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,gBAAgB;AAAA,IAChB;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,GACA,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC,IAAG;AAAA,QACH;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,YAAY;AAAA,UACZ,4BAA4B,YAAY;AAAA,UACxC,wBAAwB,YAAY;AAAA,UACpC,wBAAwB,WAAW;AAAA,UACnC,kBAAkB,kBAAkB;AAAA,UACpC,mBAAmB,kBAAkB;AAAA,UACrC,mBAAmB;AAAA,UACnB,mBAAmB,YAAY;AAAA,UAC/B,4BAA4B;AAAA,UAC5B,uBAAuB,kBAAkB;AAAA,UACzC,0BAA0B,kBAAkB;AAAA,QAC9C,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,gBAAQ;",
6
6
  "names": ["Table"]
7
7
  }
@@ -10,6 +10,19 @@ export interface TableDataCellProps extends BaseProps<'td'> {
10
10
  * @default 'text'
11
11
  */
12
12
  dataType?: 'text' | 'numeric';
13
+ /**
14
+ * variant is optional.
15
+ * Use this prop to control the bottom border of the table-cell.
16
+ * @value 'border'
17
+ * @value 'none'
18
+ * @default 'border'
19
+ */
20
+ variant?: 'border' | 'none';
21
+ /**
22
+ * wordBreak is optional.
23
+ * Use this prop to control the word break of the table-cell contents.
24
+ */
25
+ wordBreak?: 'break-all' | 'none';
13
26
  }
14
27
  /**
15
28
  * Use TableDataCell inside the Table component to fill the data of a cell in a table.
@@ -1,7 +1,14 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const TableDataCell = React.forwardRef(function TableDataCell2({ dataType = "text", className, children, ...props }, ref) {
4
+ const TableDataCell = React.forwardRef(function TableDataCell2({
5
+ dataType = "text",
6
+ variant = "border",
7
+ wordBreak = "none",
8
+ className,
9
+ children,
10
+ ...props
11
+ }, ref) {
5
12
  return /* @__PURE__ */ React.createElement(
6
13
  Base,
7
14
  {
@@ -9,6 +16,8 @@ const TableDataCell = React.forwardRef(function TableDataCell2({ dataType = "tex
9
16
  ref,
10
17
  className: clsx(className, {
11
18
  "ds-table__cell": true,
19
+ "ds-table__cell--border": variant === "border",
20
+ "ds-table__cell--break-all": wordBreak === "break-all",
12
21
  "ds-table__cell--numeric": dataType === "numeric"
13
22
  }),
14
23
  ...props
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/TableDataCell/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n { dataType = 'text', className, children, ...props },\n ref\n) {\n return (\n <Base\n as=\"td\"\n ref={ref}\n className={clsx(className, {\n 'ds-table__cell': true,\n 'ds-table__cell--numeric': dataType === 'numeric',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AAiBzB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT,EAAE,WAAW,QAAQ,WAAW,UAAU,GAAG,MAAM,GACnD,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,kBAAkB;AAAA,QAClB,2BAA2B,aAAa;AAAA,MAC1C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n// import PhaseBannerTag from '@digigov/react-core/PhaseBannerTag';\n\nexport interface TableDataCellProps extends BaseProps<'td'> {\n /**\n * dataType is optional.\n * Use numeric value when comparing columns of numbers, align the numbers to the right in table cells\n * Default value is text which aligns texts to the center\n * @value 'text'\n * @value 'numeric'\n * @default 'text'\n */\n dataType?: 'text' | 'numeric';\n /**\n * variant is optional.\n * Use this prop to control the bottom border of the table-cell.\n * @value 'border'\n * @value 'none'\n * @default 'border'\n */\n variant?: 'border' | 'none';\n /**\n * wordBreak is optional.\n * Use this prop to control the word break of the table-cell contents.\n */\n wordBreak?: 'break-all' | 'none';\n}\n/**\n * Use TableDataCell inside the Table component to fill the data of a cell in a table.\n */\nexport const TableDataCell = React.forwardRef<\n HTMLTableCellElement,\n TableDataCellProps\n>(function TableDataCell(\n {\n dataType = 'text',\n variant = 'border',\n wordBreak = 'none',\n className,\n children,\n ...props\n },\n ref\n) {\n return (\n <Base\n as=\"td\"\n ref={ref}\n className={clsx(className, {\n 'ds-table__cell': true,\n 'ds-table__cell--border': variant === 'border',\n 'ds-table__cell--break-all': wordBreak === 'break-all',\n 'ds-table__cell--numeric': dataType === 'numeric',\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default TableDataCell;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA8BzB,MAAM,gBAAgB,MAAM,WAGjC,SAASA,eACT;AAAA,EACE,WAAW;AAAA,EACX,UAAU;AAAA,EACV,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA,GAAG;AACL,GACA,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,kBAAkB;AAAA,QAClB,0BAA0B,YAAY;AAAA,QACtC,6BAA6B,cAAc;AAAA,QAC3C,2BAA2B,aAAa;AAAA,MAC1C,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,wBAAQ;",
6
6
  "names": ["TableDataCell"]
7
7
  }
@@ -1,4 +1,2 @@
1
- export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const TextArea: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextArea/index.web").TextAreaProps, "ref"> & import("react").RefAttributes<HTMLTextAreaElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default TextArea;
@@ -1,4 +1,2 @@
1
- export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement> & {
2
- className?: string;
3
- }, "ref"> & import("react").RefAttributes<unknown>>;
1
+ export declare const TextInput: import("react").ForwardRefExoticComponent<Omit<Omit<import("@digigov/react-core/TextInput/index.web").TextInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<unknown>>;
4
2
  export default TextInput;
@@ -26,5 +26,5 @@ export interface TypographyProps extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | '
26
26
  * Typography component is used as generic component for typography.
27
27
  * Use Typography component to extend components such as Heading, NormalText Paragraph etc.
28
28
  */
29
- export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
29
+ export declare const Typography: React.ForwardRefExoticComponent<Omit<TypographyProps, "ref"> & React.RefAttributes<HTMLParagraphElement | HTMLHeadingElement | HTMLSpanElement>>;
30
30
  export default Typography;
@@ -1,23 +1,21 @@
1
1
  import React from "react";
2
2
  import clsx from "clsx";
3
3
  import Base from "@digigov/react-core/Base";
4
- const Typography = React.forwardRef(
5
- function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
6
- return /* @__PURE__ */ React.createElement(
7
- Base,
8
- {
9
- as,
10
- ref,
11
- className: clsx(className, {
12
- [`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
13
- [`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
14
- }),
15
- ...props
16
- },
17
- children
18
- );
19
- }
20
- );
4
+ const Typography = React.forwardRef(function Typography2({ as, fontSize, fontWeight, className, children, ...props }, ref) {
5
+ return /* @__PURE__ */ React.createElement(
6
+ Base,
7
+ {
8
+ as,
9
+ ref,
10
+ className: clsx(className, {
11
+ [`ds-!-font-size-${fontSize}`]: fontSize !== void 0,
12
+ [`ds-!-font-weight-${fontWeight}`]: fontWeight !== void 0
13
+ }),
14
+ ...props
15
+ },
16
+ children
17
+ );
18
+ });
21
19
  var Typography_default = Typography;
22
20
  export {
23
21
  Typography,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Typography/index.tsx"],
4
- "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef<HTMLHeadingElement, TypographyProps>(\n function Typography(\n { as, fontSize, fontWeight, className, children, ...props },\n ref\n ) {\n return (\n <Base\n as={as}\n ref={ref}\n className={clsx(className, {\n [`ds-!-font-size-${fontSize}`]: fontSize !== undefined,\n [`ds-!-font-weight-${fontWeight}`]: fontWeight !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n }\n);\n\nexport default Typography;\n"],
5
- "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM;AAAA,EAC9B,SAASA,YACP,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAW,KAAK,WAAW;AAAA,UACzB,CAAC,kBAAkB,QAAQ,EAAE,GAAG,aAAa;AAAA,UAC7C,CAAC,oBAAoB,UAAU,EAAE,GAAG,eAAe;AAAA,QACrD,CAAC;AAAA,QACA,GAAG;AAAA;AAAA,MAEH;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,IAAO,qBAAQ;",
4
+ "sourcesContent": ["import React from 'react';\nimport clsx from 'clsx';\nimport Base, { BaseProps } from '@digigov/react-core/Base';\n\nexport interface TypographyProps\n extends BaseProps<'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span' | 'p' | 'code'> {\n /**\n * fontSize is optional.\n * Add this fontSize override prop in order to change the font size.\n * @value 14\n * @value 16\n * @value 19\n * @value 24\n * @value 30\n * @value 36\n * @value 48\n * @value 72\n */\n fontSize?: 14 | 16 | 19 | 24 | 30 | 36 | 48 | 72;\n /**\n * fontWeight is optional.\n * You can add a fontWeight override prop to change the font weight to regular or bold.\n * @value 'regular'\n * @value 'bold'\n */\n fontWeight?: 'regular' | 'bold';\n}\n/**\n * Typography component is used as generic component for typography.\n * Use Typography component to extend components such as Heading, NormalText Paragraph etc.\n */\nexport const Typography = React.forwardRef<\n HTMLSpanElement | HTMLParagraphElement | HTMLHeadingElement,\n TypographyProps\n>(function Typography(\n { as, fontSize, fontWeight, className, children, ...props },\n ref\n) {\n return (\n <Base\n as={as}\n ref={ref}\n className={clsx(className, {\n [`ds-!-font-size-${fontSize}`]: fontSize !== undefined,\n [`ds-!-font-weight-${fontWeight}`]: fontWeight !== undefined,\n })}\n {...props}\n >\n {children}\n </Base>\n );\n});\n\nexport default Typography;\n"],
5
+ "mappings": "AAAA,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,OAAO,UAAyB;AA6BzB,MAAM,aAAa,MAAM,WAG9B,SAASA,YACT,EAAE,IAAI,UAAU,YAAY,WAAW,UAAU,GAAG,MAAM,GAC1D,KACA;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA,WAAW,KAAK,WAAW;AAAA,QACzB,CAAC,kBAAkB,QAAQ,EAAE,GAAG,aAAa;AAAA,QAC7C,CAAC,oBAAoB,UAAU,EAAE,GAAG,eAAe;AAAA,MACrD,CAAC;AAAA,MACA,GAAG;AAAA;AAAA,IAEH;AAAA,EACH;AAEJ,CAAC;AAED,IAAO,qBAAQ;",
6
6
  "names": ["Typography"]
7
7
  }
@@ -14,6 +14,13 @@ export interface WarningTextProps extends BaseProps<'div'> {
14
14
  * @default false
15
15
  * */
16
16
  dense?: boolean;
17
+ /**
18
+ * strong is optional.
19
+ * @value true if you want to emphasize importance, conveying meaning to both sighted and screen readers.
20
+ * @value false WarningText will be a simple div element.
21
+ * @default true
22
+ * */
23
+ strong?: boolean;
17
24
  }
18
25
  /**
19
26
  * WarningText.