@dynamic-framework/ui-react 1.7.3 → 1.8.1

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 (229) hide show
  1. package/README.md +6 -2
  2. package/dist/css/dynamic-ui-non-root.css +17060 -0
  3. package/dist/css/dynamic-ui-non-root.min.css +1 -0
  4. package/dist/css/{dynamic-root.css → dynamic-ui-root.css} +5 -0
  5. package/dist/css/{dynamic-root.min.css → dynamic-ui-root.min.css} +1 -1
  6. package/dist/css/dynamic-ui.css +132 -60
  7. package/dist/css/dynamic-ui.min.css +1 -1
  8. package/dist/index.esm.js +413 -550
  9. package/dist/index.esm.js.map +1 -1
  10. package/dist/index.js +571 -724
  11. package/dist/index.js.map +1 -1
  12. package/dist/types/components/{DAlert.d.ts → DAlert/DAlert.d.ts} +3 -5
  13. package/dist/types/components/DAlert/index.d.ts +2 -0
  14. package/dist/types/components/{DBadge.d.ts → DBadge/DBadge.d.ts} +2 -4
  15. package/dist/types/components/DBadge/index.d.ts +2 -0
  16. package/dist/types/components/DBoxFile/DBoxFile.d.ts +9 -0
  17. package/dist/types/components/DBoxFile/index.d.ts +2 -0
  18. package/dist/types/components/{DButton.d.ts → DButton/DButton.d.ts} +3 -5
  19. package/dist/types/components/DButton/index.d.ts +2 -0
  20. package/dist/types/components/DCard/DCard.d.ts +13 -0
  21. package/dist/types/components/DCard/components/DCardBody.d.ts +5 -0
  22. package/dist/types/components/DCard/components/DCardFooter.d.ts +5 -0
  23. package/dist/types/components/DCard/components/DCardHeader.d.ts +5 -0
  24. package/dist/types/components/DCard/index.d.ts +5 -0
  25. package/dist/types/components/DCardAccount/DCardAccount.d.ts +13 -0
  26. package/dist/types/components/DCardAccount/index.d.ts +2 -0
  27. package/dist/types/components/DCarousel/DCarousel.d.ts +10 -0
  28. package/dist/types/components/DCarousel/index.d.ts +3 -0
  29. package/dist/types/components/DChip/DChip.d.ts +10 -0
  30. package/dist/types/components/DChip/index.d.ts +2 -0
  31. package/dist/types/components/DCollapse/DCollapse.d.ts +11 -0
  32. package/dist/types/components/DCollapse/index.d.ts +2 -0
  33. package/dist/types/components/{DCollapseIconText.d.ts → DCollapseIconText/DCollapseIconText.d.ts} +3 -3
  34. package/dist/types/components/DCollapseIconText/index.d.ts +2 -0
  35. package/dist/types/components/DCurrencyText/DCurrencyText.d.ts +7 -0
  36. package/dist/types/components/DCurrencyText/index.d.ts +2 -0
  37. package/dist/types/components/DDatePicker/DDatePicker.d.ts +21 -0
  38. package/dist/types/components/DDatePicker/index.d.ts +2 -0
  39. package/dist/types/components/{DDatePickerHeader.d.ts → DDatePickerHeader/DDatePickerHeader.d.ts} +5 -4
  40. package/dist/types/components/DDatePickerHeader/index.d.ts +2 -0
  41. package/dist/types/components/{DDatePickerInput.d.ts → DDatePickerInput/DDatePickerInput.d.ts} +3 -2
  42. package/dist/types/components/DDatePickerInput/index.d.ts +2 -0
  43. package/dist/types/components/DDatePickerTime/DDatePickerTime.d.ts +9 -0
  44. package/dist/types/components/DDatePickerTime/index.d.ts +2 -0
  45. package/dist/types/components/DIcon/DIcon.d.ts +16 -0
  46. package/dist/types/components/DIcon/index.d.ts +2 -0
  47. package/dist/types/components/DInput/DInput.d.ts +15 -0
  48. package/dist/types/components/DInput/index.d.ts +2 -0
  49. package/dist/types/components/{DInputCheck.d.ts → DInputCheck/DInputCheck.d.ts} +3 -3
  50. package/dist/types/components/DInputCheck/index.d.ts +2 -0
  51. package/dist/types/components/DInputCounter/DInputCounter.d.ts +20 -0
  52. package/dist/types/components/DInputCounter/index.d.ts +2 -0
  53. package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +21 -0
  54. package/dist/types/components/DInputCurrency/index.d.ts +2 -0
  55. package/dist/types/components/DInputCurrencyBase/DInputCurrencyBase.d.ts +23 -0
  56. package/dist/types/components/DInputCurrencyBase/index.d.ts +2 -0
  57. package/dist/types/components/DInputPassword/DInputPassword.d.ts +5 -0
  58. package/dist/types/components/DInputPassword/index.d.ts +2 -0
  59. package/dist/types/components/{DInputPin.d.ts → DInputPin/DInputPin.d.ts} +3 -3
  60. package/dist/types/components/DInputPin/index.d.ts +2 -0
  61. package/dist/types/components/DInputSearch/DInputSearch.d.ts +17 -0
  62. package/dist/types/components/DInputSearch/index.d.ts +2 -0
  63. package/dist/types/components/{DInputSelect.d.ts → DInputSelect/DInputSelect.d.ts} +3 -4
  64. package/dist/types/components/DInputSelect/index.d.ts +3 -0
  65. package/dist/types/components/{DInputSwitch.d.ts → DInputSwitch/DInputSwitch.d.ts} +4 -3
  66. package/dist/types/components/DInputSwitch/index.d.ts +2 -0
  67. package/dist/types/components/DList/DList.d.ts +14 -0
  68. package/dist/types/components/DList/components/DListItem.d.ts +10 -0
  69. package/dist/types/components/DList/index.d.ts +3 -0
  70. package/dist/types/components/DListItemMovement/DListItemMovement.d.ts +10 -0
  71. package/dist/types/components/DListItemMovement/index.d.ts +2 -0
  72. package/dist/types/components/DModal/DModal.d.ts +21 -0
  73. package/dist/types/components/DModal/components/DModalBody.d.ts +7 -0
  74. package/dist/types/components/DModal/components/DModalFooter.d.ts +7 -0
  75. package/dist/types/components/{DModalHeader.d.ts → DModal/components/DModalHeader.d.ts} +3 -2
  76. package/dist/types/components/DModal/index.d.ts +5 -0
  77. package/dist/types/components/DMonthPicker/DMonthPicker.d.ts +9 -0
  78. package/dist/types/components/DMonthPicker/index.d.ts +2 -0
  79. package/dist/types/components/DOffcanvas/DOffcanvas.d.ts +18 -0
  80. package/dist/types/components/DOffcanvas/components/DOffcanvasBody.d.ts +7 -0
  81. package/dist/types/components/{DOffcanvasFooter.d.ts → DOffcanvas/components/DOffcanvasFooter.d.ts} +3 -2
  82. package/dist/types/components/{DOffcanvasHeader.d.ts → DOffcanvas/components/DOffcanvasHeader.d.ts} +3 -2
  83. package/dist/types/components/DOffcanvas/index.d.ts +5 -0
  84. package/dist/types/components/DPaginator/index.d.ts +2 -0
  85. package/dist/types/components/{DPopover.d.ts → DPopover/DPopover.d.ts} +3 -2
  86. package/dist/types/components/DPopover/index.d.ts +2 -0
  87. package/dist/types/components/DProgress/DProgress.d.ts +10 -0
  88. package/dist/types/components/DProgress/index.d.ts +2 -0
  89. package/dist/types/components/{DQuickActionButton.d.ts → DQuickActionButton/DQuickActionButton.d.ts} +2 -4
  90. package/dist/types/components/DQuickActionButton/index.d.ts +2 -0
  91. package/dist/types/components/{DQuickActionCheck.d.ts → DQuickActionCheck/DQuickActionCheck.d.ts} +3 -3
  92. package/dist/types/components/DQuickActionCheck/index.d.ts +2 -0
  93. package/dist/types/components/{DQuickActionSelect.d.ts → DQuickActionSelect/DQuickActionSelect.d.ts} +3 -3
  94. package/dist/types/components/DQuickActionSelect/index.d.ts +2 -0
  95. package/dist/types/components/{DQuickActionSwitch.d.ts → DQuickActionSwitch/DQuickActionSwitch.d.ts} +3 -3
  96. package/dist/types/components/DQuickActionSwitch/index.d.ts +2 -0
  97. package/dist/types/components/DSkeleton/index.d.ts +2 -0
  98. package/dist/types/components/{DStepper.d.ts → DStepper/DStepper.d.ts} +3 -3
  99. package/dist/types/components/DStepper/index.d.ts +2 -0
  100. package/dist/types/components/{DStepperDesktop.d.ts → DStepperDesktop/DStepperDesktop.d.ts} +3 -2
  101. package/dist/types/components/DStepperDesktop/index.d.ts +2 -0
  102. package/dist/types/components/DStepperMobile/DStepperMobile.d.ts +12 -0
  103. package/dist/types/components/DStepperMobile/index.d.ts +2 -0
  104. package/dist/types/components/DTabs/DTabs.d.ts +19 -0
  105. package/dist/types/components/DTabs/TabContext.d.ts +8 -0
  106. package/dist/types/components/DTabs/components/DTabContent.d.ts +7 -0
  107. package/dist/types/components/DTabs/index.d.ts +5 -0
  108. package/dist/types/components/{DToastContainer.d.ts → DToastContainer/DToastContainer.d.ts} +3 -2
  109. package/dist/types/components/DToastContainer/index.d.ts +3 -0
  110. package/dist/types/{hooks → components/DToastContainer}/useToast.d.ts +1 -1
  111. package/dist/types/components/{DTooltip.d.ts → DTooltip/DTooltip.d.ts} +3 -4
  112. package/dist/types/components/DTooltip/index.d.ts +2 -0
  113. package/dist/types/components/index.d.ts +11 -26
  114. package/dist/types/components/interface.d.ts +9 -4
  115. package/dist/types/contexts/DContext.d.ts +13 -0
  116. package/dist/types/contexts/index.d.ts +1 -1
  117. package/dist/types/hooks/index.d.ts +3 -4
  118. package/dist/types/hooks/useInputCurrency.d.ts +16 -0
  119. package/dist/types/hooks/useProvidedRefOrCreate.d.ts +16 -0
  120. package/dist/types/types/index.d.ts +1 -0
  121. package/dist/types/types/polymorphic.d.ts +37 -0
  122. package/dist/types/utils/index.d.ts +0 -1
  123. package/package.json +48 -55
  124. package/src/style/abstracts/variables/_buttons.scss +1 -1
  125. package/src/style/abstracts/variables/_forms.scss +4 -4
  126. package/src/style/abstracts/variables/_toasts.scss +1 -1
  127. package/src/style/abstracts/variables/_typography.scss +1 -1
  128. package/src/style/base/_+import.scss +0 -3
  129. package/src/style/components/_d-input.scss +10 -5
  130. package/src/style/components/_d-monthpicker.scss +8 -0
  131. package/src/style/dynamic-ui-non-root.scss +13 -0
  132. package/src/style/dynamic-ui-root.scss +5 -0
  133. package/src/style/dynamic-ui.scss +2 -0
  134. package/src/style/root/_+import.scss +2 -0
  135. package/src/style/{base → root}/_root.scss +6 -0
  136. package/dist/types/components/DBoxFile.d.ts +0 -9
  137. package/dist/types/components/DCard.d.ts +0 -7
  138. package/dist/types/components/DCardAccount.d.ts +0 -13
  139. package/dist/types/components/DCardBody.d.ts +0 -6
  140. package/dist/types/components/DCardFooter.d.ts +0 -6
  141. package/dist/types/components/DCardHeader.d.ts +0 -6
  142. package/dist/types/components/DCarousel.d.ts +0 -7
  143. package/dist/types/components/DChip.d.ts +0 -10
  144. package/dist/types/components/DCollapse.d.ts +0 -11
  145. package/dist/types/components/DCurrencyText.d.ts +0 -6
  146. package/dist/types/components/DDatePicker.d.ts +0 -20
  147. package/dist/types/components/DDatePickerTime.d.ts +0 -8
  148. package/dist/types/components/DFormikInput.d.ts +0 -7
  149. package/dist/types/components/DFormikInputCurrency.d.ts +0 -7
  150. package/dist/types/components/DFormikInputSelect.d.ts +0 -6
  151. package/dist/types/components/DIcon.d.ts +0 -16
  152. package/dist/types/components/DInput.d.ts +0 -32
  153. package/dist/types/components/DInputCounter.d.ts +0 -22
  154. package/dist/types/components/DInputCurrency.d.ts +0 -5
  155. package/dist/types/components/DInputCurrencyBase.d.ts +0 -25
  156. package/dist/types/components/DInputPassword.d.ts +0 -17
  157. package/dist/types/components/DInputSearch.d.ts +0 -19
  158. package/dist/types/components/DList.d.ts +0 -11
  159. package/dist/types/components/DListItem.d.ts +0 -10
  160. package/dist/types/components/DListItemMovement.d.ts +0 -10
  161. package/dist/types/components/DModal.d.ts +0 -14
  162. package/dist/types/components/DModalBody.d.ts +0 -6
  163. package/dist/types/components/DModalFooter.d.ts +0 -6
  164. package/dist/types/components/DMonthPicker.d.ts +0 -7
  165. package/dist/types/components/DOffcanvas.d.ts +0 -11
  166. package/dist/types/components/DOffcanvasBody.d.ts +0 -6
  167. package/dist/types/components/DProgress.d.ts +0 -9
  168. package/dist/types/components/DStepperMobile.d.ts +0 -11
  169. package/dist/types/components/DTabContent.d.ts +0 -6
  170. package/dist/types/components/DTabs.d.ts +0 -19
  171. package/dist/types/contexts/LiquidContext.d.ts +0 -14
  172. package/dist/types/hooks/useScreenshot.d.ts +0 -5
  173. package/dist/types/hooks/useScreenshotDownload.d.ts +0 -5
  174. package/dist/types/hooks/useScreenshotWebShare.d.ts +0 -5
  175. package/dist/types/stories/components/DBadge.stories.d.ts +0 -8
  176. package/dist/types/stories/components/DBoxFile.stories.d.ts +0 -6
  177. package/dist/types/stories/components/DButton.stories.d.ts +0 -35
  178. package/dist/types/stories/components/DChip.stories.d.ts +0 -9
  179. package/dist/types/stories/components/DCurrencyText.stories.d.ts +0 -6
  180. package/dist/types/stories/components/DDatePicker.stories.d.ts +0 -14
  181. package/dist/types/stories/components/DFormikInput.stories.d.ts +0 -7
  182. package/dist/types/stories/components/DFormikInputCurrency.stories.d.ts +0 -8
  183. package/dist/types/stories/components/DFormikInputSelect.stories.d.ts +0 -7
  184. package/dist/types/stories/components/DIcon.stories.d.ts +0 -7
  185. package/dist/types/stories/components/DInput.stories.d.ts +0 -11
  186. package/dist/types/stories/components/DInputCheck.stories.d.ts +0 -13
  187. package/dist/types/stories/components/DInputCounter.stories.d.ts +0 -9
  188. package/dist/types/stories/components/DInputCurrency.stories.d.ts +0 -11
  189. package/dist/types/stories/components/DInputCurrencyBase.stories.d.ts +0 -11
  190. package/dist/types/stories/components/DInputPassword.stories.d.ts +0 -10
  191. package/dist/types/stories/components/DInputPin.stories.d.ts +0 -10
  192. package/dist/types/stories/components/DInputSearch.stories.d.ts +0 -10
  193. package/dist/types/stories/components/DInputSelect.stories.d.ts +0 -14
  194. package/dist/types/stories/components/DInputSwitch.stories.d.ts +0 -11
  195. package/dist/types/stories/components/DList.stories.d.ts +0 -10
  196. package/dist/types/stories/components/DListItem.stories.d.ts +0 -9
  197. package/dist/types/stories/components/DListItemMovement.stories.d.ts +0 -7
  198. package/dist/types/stories/components/DPaginator.stories.d.ts +0 -10
  199. package/dist/types/stories/components/DProgress.stories.d.ts +0 -12
  200. package/dist/types/stories/components/DQuickActionButton.stories.d.ts +0 -10
  201. package/dist/types/stories/components/DQuickActionCheck.stories.d.ts +0 -8
  202. package/dist/types/stories/components/DQuickActionSelect.stories.d.ts +0 -8
  203. package/dist/types/stories/components/DQuickActionSwitch.stories.d.ts +0 -9
  204. package/dist/types/stories/components/DSkeleton.stories.d.ts +0 -6
  205. package/dist/types/stories/components/DStepper.stories.d.ts +0 -7
  206. package/dist/types/stories/components/DStepperDesktop.stories.d.ts +0 -7
  207. package/dist/types/stories/components/DStepperMobile.stories.d.ts +0 -6
  208. package/dist/types/stories/components/DTooltip.stories.d.ts +0 -18
  209. package/dist/types/stories/config/constants.d.ts +0 -7
  210. package/dist/types/stories/config/liquidConfig.d.ts +0 -1
  211. package/dist/types/stories/hooks/useFormatCurrency.stories.d.ts +0 -6
  212. package/dist/types/stories/hooks/useModalContext.stories.d.ts +0 -6
  213. package/dist/types/stories/hooks/useOffcanvasContext.stories.d.ts +0 -7
  214. package/dist/types/stories/hooks/useToast.stories.d.ts +0 -17
  215. package/dist/types/stories/patterns/DAlert.stories.d.ts +0 -24
  216. package/dist/types/stories/patterns/DCard.stories.d.ts +0 -10
  217. package/dist/types/stories/patterns/DCardAccount.stories.d.ts +0 -6
  218. package/dist/types/stories/patterns/DCarousel.stories.d.ts +0 -9
  219. package/dist/types/stories/patterns/DCollapse.stories.d.ts +0 -8
  220. package/dist/types/stories/patterns/DCollapseIconText.stories.d.ts +0 -6
  221. package/dist/types/stories/patterns/DModal.stories.d.ts +0 -12
  222. package/dist/types/stories/patterns/DOffcanvas.stories.d.ts +0 -12
  223. package/dist/types/stories/patterns/DPopover.stories.d.ts +0 -9
  224. package/dist/types/stories/patterns/DTabs.stories.d.ts +0 -7
  225. package/dist/types/utils/liquid-parser.d.ts +0 -20
  226. package/src/style/dynamic-root.scss +0 -6
  227. /package/dist/types/components/{DCarouselSlide.d.ts → DCarousel/components/DCarouselSlide.d.ts} +0 -0
  228. /package/dist/types/components/{DPaginator.d.ts → DPaginator/DPaginator.d.ts} +0 -0
  229. /package/dist/types/components/{DSkeleton.d.ts → DSkeleton/DSkeleton.d.ts} +0 -0
@@ -0,0 +1,37 @@
1
+ /**
2
+ * This file is originally from `@radix-ui/react-polymorphic` before the package
3
+ * was deprecated. The original source for this lived in the URL below.
4
+ *
5
+ * @see https://github.com/radix-ui/primitives/blob/17ffcb7aaa42cbd36b3c210ba86d7d73d218e5be/packages/react/polymorphic/src/polymorphic.ts
6
+ */
7
+ import * as React from 'react';
8
+ type Merge<P1 = {}, P2 = {}> = Omit<P1, keyof P2> & P2;
9
+ /**
10
+ * Infers the OwnProps if E is a ForwardRefExoticComponentWithAs
11
+ */
12
+ type OwnProps<E> = E extends ForwardRefComponent<any, infer P> ? P : {};
13
+ /**
14
+ * Infers the JSX.IntrinsicElement if E is a ForwardRefExoticComponentWithAs
15
+ */
16
+ type IntrinsicElement<E> = E extends ForwardRefComponent<infer I, any> ? I : never;
17
+ type ForwardRefExoticComponent<E, OwnProps> = React.ForwardRefExoticComponent<Merge<E extends React.ElementType ? React.ComponentPropsWithRef<E> : never, OwnProps & {
18
+ as?: E;
19
+ }>>;
20
+ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends ForwardRefExoticComponent<IntrinsicElementString, OwnProps> {
21
+ /**
22
+ * When `as` prop is passed, use this overload.
23
+ * Merges original own props (without DOM props) and the inferred props
24
+ * from `as` element with the own props taking precendence.
25
+ *
26
+ * We explicitly avoid `React.ElementType` and manually narrow the prop types
27
+ * so that events are typed when using JSX.IntrinsicElements.
28
+ */
29
+ <As = IntrinsicElementString>(props: As extends '' ? {
30
+ as: keyof JSX.IntrinsicElements;
31
+ } : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
32
+ as: As;
33
+ }> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
34
+ as: As;
35
+ }> : never): React.ReactElement | null;
36
+ }
37
+ export type { ForwardRefComponent, OwnProps, IntrinsicElement, Merge };
@@ -1,3 +1,2 @@
1
- export { default as liquidParser } from './liquid-parser';
2
1
  export { default as formatCurrency } from './format-currency';
3
2
  export { default as configureI18n } from './configureI18n';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dynamic-framework/ui-react",
3
3
  "sideEffects": false,
4
- "version": "1.7.3",
4
+ "version": "1.8.1",
5
5
  "description": "React Dynamic Framework",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -40,15 +40,18 @@
40
40
  "scripts": {
41
41
  "test": "jest",
42
42
  "test:watch": "jest --watch",
43
- "build": "pnpm build:react && pnpm build:scss",
44
- "build:react": "rimraf dist && tsc -p . && rollup -c rollup.config.js",
45
- "build:react:watch": "tsc -p . && rollup -c rollup.config.js",
43
+ "build": "pnpm clean && pnpm build:react && pnpm build:scss",
44
+ "build:react": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.mjs",
45
+ "build:react:watch": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.mjs",
46
46
  "build:scss": "./scripts/build-scss.sh",
47
- "clean": "rimraf dist",
48
- "compile": "tsc -p . && rollup -c rollup.config.js",
47
+ "clean": "rimraf dist-transpiled && rimraf dist",
48
+ "compile": "tsc -p . && rollup -c rollup.config.mjs",
49
49
  "storybook": "storybook dev -p 6006",
50
50
  "build:storybook": "storybook build -o docs",
51
- "eslint": "eslint src/**/*{.ts,.tsx}",
51
+ "eslint": "pnpm eslint:src && pnpm eslint:stories && pnpm eslint:test",
52
+ "eslint:src": "eslint src/**/*{.ts,.tsx} --ignore-pattern '**/*.spec.tsx'",
53
+ "eslint:stories": "eslint stories/**/*.stories.tsx",
54
+ "eslint:test": "eslint src/**/*.spec.tsx",
52
55
  "stylelint": "stylelint \"**/*.{css,scss}\" --rd",
53
56
  "lint-staged": "lint-staged"
54
57
  },
@@ -60,20 +63,19 @@
60
63
  "src/style"
61
64
  ],
62
65
  "dependencies": {
63
- "@floating-ui/react": "^0.24.1",
66
+ "@floating-ui/react": "^0.26.1",
64
67
  "@splidejs/react-splide": "^0.7.12",
65
68
  "@splidejs/splide": "^4.1.4",
66
- "axios": "^1.1.2",
67
69
  "bootstrap": "^5.3.2",
68
70
  "classnames": "^2.3.2",
69
71
  "currency.js": "^2.0.4",
70
- "date-fns": "^2.29.3",
71
- "i18next": "~21.9.0",
72
- "react-content-loader": "~6.2.0",
73
- "react-datepicker": "~4.8.0",
72
+ "date-fns": "^2.30.0",
73
+ "i18next": "^23.6.0",
74
+ "react-content-loader": "^6.2.1",
75
+ "react-datepicker": "^4.21.0",
74
76
  "react-dropzone": "^14.2.3",
75
- "react-responsive-pagination": "^2.2.1",
76
- "yup": "^1.2.0"
77
+ "react-responsive-pagination": "^2.2.3",
78
+ "react-toastify": "^9.1.3"
77
79
  },
78
80
  "devDependencies": {
79
81
  "@babel/core": "^7.23.2",
@@ -82,66 +84,57 @@
82
84
  "@babel/preset-typescript": "^7.23.2",
83
85
  "@mdx-js/react": "^2.3.0",
84
86
  "@rollup/plugin-node-resolve": "^15.2.3",
85
- "@storybook/addon-actions": "^7.5.0",
86
- "@storybook/addon-essentials": "^7.5.0",
87
- "@storybook/addon-interactions": "^7.5.0",
88
- "@storybook/addon-links": "^7.5.0",
89
- "@storybook/addon-viewport": "^7.5.0",
90
- "@storybook/blocks": "^7.5.0",
91
- "@storybook/react": "^7.5.0",
92
- "@storybook/react-webpack5": "^7.5.0",
87
+ "@storybook/addon-actions": "^7.5.1",
88
+ "@storybook/addon-essentials": "^7.5.1",
89
+ "@storybook/addon-interactions": "^7.5.1",
90
+ "@storybook/addon-links": "^7.5.1",
91
+ "@storybook/addon-viewport": "^7.5.1",
92
+ "@storybook/blocks": "^7.5.1",
93
+ "@storybook/react": "^7.5.1",
94
+ "@storybook/react-webpack5": "^7.5.1",
93
95
  "@storybook/testing-library": "^0.2.2",
94
- "@storybook/theming": "^7.5.0",
95
- "@testing-library/jest-dom": "^5.16.5",
96
- "@testing-library/react": "^13.4.0",
97
- "@types/jest": "29.5.5",
98
- "@types/luxon": "^3.2.1",
96
+ "@storybook/theming": "^7.5.1",
97
+ "@testing-library/jest-dom": "^6.1.4",
98
+ "@testing-library/react": "^14.0.0",
99
+ "@types/jest": "^29.5.6",
99
100
  "@types/node": "^18.15.3",
100
- "@types/react": "^18.2.19",
101
- "@types/react-datepicker": "~4.8.0",
102
- "@types/react-dom": "^18.0.3",
103
- "@typescript-eslint/eslint-plugin": "^6.8.0",
104
- "@typescript-eslint/parser": "^6.8.0",
101
+ "@types/react": "^18.2.31",
102
+ "@types/react-datepicker": "^4.19.1",
103
+ "@types/react-dom": "^18.2.14",
104
+ "@typescript-eslint/eslint-plugin": "^6.9.0",
105
+ "@typescript-eslint/parser": "^6.9.0",
105
106
  "autoprefixer": "^10.4.16",
106
107
  "babel-loader": "^9.1.3",
107
108
  "bootstrap": "^5.3.2",
108
- "eslint": "8.51.0",
109
+ "eslint": "^8.52.0",
109
110
  "eslint-config-airbnb": "^19.0.4",
110
111
  "eslint-config-airbnb-typescript": "^17.1.0",
111
- "eslint-plugin-import": "^2.28.1",
112
+ "eslint-plugin-import": "^2.29.0",
112
113
  "eslint-plugin-jsx-a11y": "^6.7.1",
113
114
  "eslint-plugin-react": "^7.33.2",
114
115
  "eslint-plugin-react-hooks": "^4.6.0",
115
- "formik": "^2.2.9",
116
- "html2canvas": "^1.4.1",
117
116
  "jest": "^29.7.0",
118
117
  "jest-cli": "^29.7.0",
119
- "jest-environment-jsdom": "^29.1.2",
120
- "lint-staged": "^12.4.1",
121
- "luxon": "^3.2.1",
118
+ "jest-environment-jsdom": "^29.7.0",
119
+ "lint-staged": "^15.0.2",
122
120
  "postcss-cli": "^10.1.0",
123
121
  "react": "^18.2.0",
124
122
  "react-dom": "^18.2.0",
125
- "react-i18next": "~11.18.3",
126
- "react-toastify": "~9.0.8",
127
- "rimraf": "^2.6.3",
128
- "rollup": "^2.72.1",
129
- "sass": "^1.69.3",
130
- "storybook": "^7.5.0",
123
+ "react-i18next": "^13.3.1",
124
+ "rimraf": "^5.0.5",
125
+ "rollup": "^4.1.4",
126
+ "sass": "^1.69.4",
127
+ "storybook": "^7.5.1",
131
128
  "stylelint": "^15.11.0",
132
129
  "stylelint-config-twbs-bootstrap": "^11.0.1",
133
130
  "ts-jest": "^29.1.1",
134
- "tslib": "^2.4.0",
131
+ "tslib": "^2.6.2",
135
132
  "typescript": "^5.2.2"
136
133
  },
137
134
  "peerDependencies": {
138
- "formik": "^2.2.9",
139
- "html2canvas": "^1.4.1",
140
- "luxon": "^3.2.1",
141
- "react": "^18.1.0",
142
- "react-dom": "^18.1.0",
143
- "react-i18next": "~11.18.3",
144
- "react-toastify": "~9.0.8"
135
+ "react": "^18.2.0",
136
+ "react-dom": "^18.2.0",
137
+ "react-i18next": "^13.3.1"
145
138
  },
146
- "gitHead": "30d791ee7b67826662311484e202261b3c26fbd4"
139
+ "gitHead": "f3b7899a2a950129133d38fb0e5c32388564f2e6"
147
140
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  // scss-docs-start btn-variables
6
6
  $btn-color: var(--#{$prefix}body-color) !default;
7
- $btn-padding-y: .875rem !default;
7
+ $btn-padding-y: $small-font-size !default;
8
8
  $btn-padding-x: $spacer-4 !default;
9
9
  $btn-font-family: $input-btn-font-family !default;
10
10
  $btn-font-size: $input-btn-font-size !default;
@@ -8,17 +8,17 @@ $form-text-color: $text-muted !default;
8
8
 
9
9
  // scss-docs-start form-label-variables
10
10
  $form-label-margin-bottom: 0 !default;
11
- $form-label-font-size: $small-font-size !default;
11
+ $form-label-font-size: var(--#{$prefix}ref-fs-small) !default;
12
12
  $form-label-font-style: null !default;
13
- $form-label-font-weight: $font-weight-bold !default;
13
+ $form-label-font-weight: var(--#{$prefix}ref-fw-bold) !default;
14
14
  $form-label-color: var(--#{$prefix}gray) !default;
15
15
  // scss-docs-end form-label-variables
16
16
 
17
17
  // custom
18
18
  $form-label-has-value-color: var(--#{$prefix}dark) !default;
19
19
  $form-label-padding-y: 0 !default;
20
- $form-label-padding-x: $spacer-2 !default;
21
- $form-label-gap: $spacer-1 !default;
20
+ $form-label-padding-x: var(--#{$prefix}ref-spacer-2) !default;
21
+ $form-label-gap: var(--#{$prefix}ref-spacer-1) !default;
22
22
  // end custom
23
23
 
24
24
  // scss-docs-start form-input-variables
@@ -4,7 +4,7 @@
4
4
  $toast-max-width: 350px !default;
5
5
  $toast-padding-x: .75rem !default;
6
6
  $toast-padding-y: .5rem !default;
7
- $toast-font-size: .875rem !default;
7
+ $toast-font-size: $small-font-size !default;
8
8
  $toast-color: null !default;
9
9
  $toast-background-color: rgba(var(--#{$prefix}body-bg-rgb), .85) !default;
10
10
  $toast-border-width: var(--#{$prefix}border-width) !default;
@@ -82,7 +82,7 @@ $display-line-height: $headings-line-height !default;
82
82
  $lead-font-size: $font-size-base * 1.25 !default;
83
83
  $lead-font-weight: $font-weight-normal !default;
84
84
 
85
- $small-font-size: .875rem !default;
85
+ $small-font-size: $font-size-sm !default;
86
86
 
87
87
  $sub-sup-font-size: .75em !default;
88
88
 
@@ -1,6 +1,3 @@
1
- // @import "bootstrap/scss/root";
2
- @import "root";
3
-
4
1
  @import "bootstrap/scss/reboot";
5
2
 
6
3
  @import "bootstrap/scss/type";
@@ -64,10 +64,6 @@
64
64
  flex-direction: row;
65
65
  gap: var(--#{$prefix}input-label-gap);
66
66
  align-items: center;
67
- padding: var(--#{$prefix}input-label-padding-y) var(--#{$prefix}input-label-padding-x);
68
- font-size: var(--#{$prefix}input-label-font-size);
69
- font-weight: var(--#{$prefix}input-label-font-weight);
70
- color: var(--#{$prefix}input-label-color);
71
67
 
72
68
  .d-input-icon {
73
69
  .d-icon {
@@ -87,7 +83,7 @@
87
83
  $border-color: map-get($data, "border-color");
88
84
  $tooltip-bg-color: map-get($data, "tooltip-bg-color");
89
85
 
90
- &:has(.form-control.is-#{$state}){
86
+ &:has(.form-control.is-#{$state}) {
91
87
  .input-group {
92
88
  border-color: $border-color;
93
89
  }
@@ -148,6 +144,7 @@
148
144
 
149
145
 
150
146
  &:has(.form-control:disabled) {
147
+
151
148
  // input addons disabled
152
149
  .input-group-text {
153
150
  background: var(--#{$prefix}input-group-disabled-bg);
@@ -166,3 +163,11 @@
166
163
  }
167
164
  }
168
165
  }
166
+
167
+ .label,
168
+ label {
169
+ padding: var(--#{$prefix}input-label-padding-y, var(--#{$prefix}label-padding-y)) var(--#{$prefix}input-label-padding-x, var(--#{$prefix}label-padding-x));
170
+ font-size: var(--#{$prefix}input-label-font-size, var(--#{$prefix}label-font-size));
171
+ font-weight: var(--#{$prefix}input-label-font-weight, var(--#{$prefix}label-font-weight));
172
+ color: var(--#{$prefix}input-label-color, var(--#{$prefix}label-color));
173
+ }
@@ -26,6 +26,7 @@
26
26
  --#{$prefix}monthpicker-single-month-margin: 0;
27
27
  --#{$prefix}monthpicker-single-month-text-transform: capitalize;
28
28
  --#{$prefix}monthpicker-single-month-radius: var(--#{$prefix}ref-spacer-4);
29
+ --#{$prefix}monthpicker-single-month-line-height: var(--#{$prefix}ref-fs-6);
29
30
 
30
31
  --#{$prefix}monthpicker-single-month-after-display: inline;
31
32
  --#{$prefix}monthpicker-single-month-after-content: ".";
@@ -41,6 +42,12 @@
41
42
  font-weight: var(--#{$prefix}monthpicker-font-weight);
42
43
  color: var(--#{$prefix}monthpicker-header-color);
43
44
  background-color: var(--#{$prefix}monthpicker-header-bg);
45
+
46
+ .btn-sm {
47
+ --#{$prefix}btn-padding-x: 0;
48
+ --#{$prefix}btn-padding-y: 0;
49
+ --#{$prefix}btn-font-size: var(--#{$prefix}ref-fs-5);
50
+ }
44
51
  }
45
52
 
46
53
  .react-datepicker__month.react-datepicker__monthPicker,
@@ -70,6 +77,7 @@
70
77
  width: var(--#{$prefix}monthpicker-single-month-width);
71
78
  padding: var(--#{$prefix}monthpicker-single-month-padding);
72
79
  margin: var(--#{$prefix}monthpicker-single-month-margin);
80
+ line-height: var(--#{$prefix}monthpicker-single-month-line-height);
73
81
  text-transform: var(--#{$prefix}monthpicker-single-month-text-transform);
74
82
  border-radius: var(--#{$prefix}monthpicker-single-month-radius);
75
83
  &::after {
@@ -0,0 +1,13 @@
1
+ @charset "utf-8";
2
+
3
+ @import "abstracts/+import";
4
+
5
+ @import "base/+import";
6
+
7
+ @import "components/+import";
8
+
9
+ @import "helpers/+import";
10
+
11
+ @import "bootstrap/scss/utilities/api";
12
+
13
+ @import "shame";
@@ -0,0 +1,5 @@
1
+ @charset "utf-8";
2
+
3
+ @import "abstracts/+import";
4
+
5
+ @import "root/+import";
@@ -2,6 +2,8 @@
2
2
 
3
3
  @import "abstracts/+import";
4
4
 
5
+ @import "root/+import";
6
+
5
7
  @import "base/+import";
6
8
 
7
9
  @import "components/+import";
@@ -0,0 +1,2 @@
1
+ // @import "bootstrap/scss/root";
2
+ @import "root";
@@ -189,6 +189,12 @@
189
189
  --#{$prefix}ref-fw-semibold: #{$font-weight-semibold};
190
190
  --#{$prefix}ref-fw-bold: #{$font-weight-bold};
191
191
  --#{$prefix}ref-fw-bolder: #{$font-weight-bolder};
192
+
193
+ --#{$prefix}label-padding-y: var(--#{$prefix}ref-spacer-0);
194
+ --#{$prefix}label-padding-x: var(--#{$prefix}ref-spacer-2);
195
+ --#{$prefix}label-font-size: var(--#{$prefix}ref-fs-small);
196
+ --#{$prefix}label-font-weight: var(--#{$prefix}ref-fw-bold);
197
+ --#{$prefix}label-color: var(--#{$prefix}gray);
192
198
  }
193
199
 
194
200
  @if $enable-dark-mode {
@@ -1,9 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- import type { DropzoneOptions } from 'react-dropzone';
3
- import type { FamilyIcon } from './interface';
4
- type Props = FamilyIcon & PropsWithChildren<Pick<DropzoneOptions, 'accept' | 'minSize' | 'maxSize' | 'maxFiles' | 'onDrop' | 'onDropAccepted' | 'onDropRejected' | 'onFileDialogCancel' | 'onFileDialogOpen'> & {
5
- icon?: string;
6
- isDisabled: DropzoneOptions['disabled'];
7
- }>;
8
- export default function DBoxFile({ icon, iconFamilyClass, iconFamilyPrefix, isDisabled, children, ...dropzoneOptions }: Props): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,7 +0,0 @@
1
- import type { CSSProperties, PropsWithChildren } from 'react';
2
- type Props = PropsWithChildren<{
3
- className?: string;
4
- style?: CSSProperties;
5
- }>;
6
- export default function DCard({ className, style, children, }: Props): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,13 +0,0 @@
1
- type Props = {
2
- className?: string;
3
- icon: string;
4
- theme: string;
5
- name: string;
6
- number: string;
7
- balance: string;
8
- balanceText: string;
9
- onClick: () => void;
10
- actionText: string;
11
- };
12
- export default function DCardAccount({ className, icon, theme, name, number, balance, balanceText, onClick, actionText, }: Props): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,6 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- type Props = PropsWithChildren<{
3
- className?: string;
4
- }>;
5
- export default function DCardBody({ className, children, }: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,6 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- type Props = PropsWithChildren<{
3
- className?: string;
4
- }>;
5
- export default function DCardFooter({ className, children, }: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,6 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- type Props = PropsWithChildren<{
3
- className?: string;
4
- }>;
5
- export default function DCardHeader({ className, children, }: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,7 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- import type { SplideProps } from '@splidejs/react-splide';
3
- type Props = SplideProps & PropsWithChildren<{
4
- className?: string;
5
- }>;
6
- export default function DCarousel({ children, className, options, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,10 +0,0 @@
1
- import type { FamilyIcon } from './interface';
2
- type Props = FamilyIcon & {
3
- theme?: string;
4
- text?: string;
5
- icon?: string;
6
- showClose?: boolean;
7
- onClose?: () => void;
8
- };
9
- export default function DChip({ theme, text, icon, iconFamilyClass, iconFamilyPrefix, showClose, onClose, }: Props): import("react/jsx-runtime").JSX.Element;
10
- export {};
@@ -1,11 +0,0 @@
1
- import type { PropsWithChildren, ReactNode, ReactElement } from 'react';
2
- type Props = PropsWithChildren<{
3
- id?: string;
4
- className?: string;
5
- Component: ReactElement | ReactNode;
6
- hasSeparator?: boolean;
7
- defaultCollapsed?: boolean;
8
- onChange?: (value: boolean) => void;
9
- }>;
10
- export default function DCollapse({ id, className, Component, hasSeparator, defaultCollapsed, onChange, children, }: Props): import("react/jsx-runtime").JSX.Element;
11
- export {};
@@ -1,6 +0,0 @@
1
- type Props = {
2
- value: number;
3
- className?: string;
4
- };
5
- export default function DCurrencyText({ value, className, }: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,20 +0,0 @@
1
- import type { ReactDatePickerProps } from 'react-datepicker';
2
- import type { ButtonVariant, ComponentSize } from './interface';
3
- type Props = Omit<ReactDatePickerProps, 'onChange' | 'selectsRange'> & {
4
- date: string;
5
- onChangeDate: (value: Date | [Date | null, Date | null] | null) => void;
6
- selectsRange?: boolean;
7
- withMonthSelector?: boolean;
8
- inputLabel?: string;
9
- inputIcon?: string;
10
- inputId?: string;
11
- timeId?: string;
12
- timeLabel?: string;
13
- headerDecreaseMonthIcon?: string;
14
- headerIncreaseMonthIcon?: string;
15
- headerIconSize?: ComponentSize;
16
- headerButtonVariant?: ButtonVariant;
17
- headerButtonTheme?: string;
18
- };
19
- export default function DDatePicker({ onChangeDate, date, selectsRange, withMonthSelector, inputLabel, inputIcon, inputId, timeId, timeLabel, headerDecreaseMonthIcon, headerIncreaseMonthIcon, headerIconSize, headerButtonVariant, headerButtonTheme, ...props }: Props): import("react/jsx-runtime").JSX.Element;
20
- export {};
@@ -1,8 +0,0 @@
1
- import type { ComponentProps, FormEventHandler } from 'react';
2
- import DInput from './DInput';
3
- type Props = {
4
- value?: string | number;
5
- onChange?: ((value: string) => void) & FormEventHandler<HTMLInputElement>;
6
- } & Omit<ComponentProps<typeof DInput>, 'type' | 'isReadOnly' | 'onChange' | 'value'>;
7
- export default function DDatePickerTime({ value, onChange, id, label, ...props }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
@@ -1,7 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
- import DInput from './DInput';
3
- type Props = Omit<ComponentProps<typeof DInput>, 'name' | 'value'> & {
4
- name: string;
5
- };
6
- export default function DFormikInput({ name, hint, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,7 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
- import DInputCurrency from './DInputCurrency';
3
- type Props = Omit<ComponentProps<typeof DInputCurrency>, 'name' | 'value'> & {
4
- name: string;
5
- };
6
- export default function DFormikInputCurrency({ name, hint, ...props }: Props): import("react/jsx-runtime").JSX.Element;
7
- export {};
@@ -1,6 +0,0 @@
1
- import type { DefaultOption, Props as DInputSelectProps } from './DInputSelect';
2
- type Props<T> = Omit<DInputSelectProps<T>, 'name'> & {
3
- name: string;
4
- };
5
- export default function DFormikInputSelect<T extends object = DefaultOption>({ name, ...props }: Props<T>): import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,16 +0,0 @@
1
- type Props = {
2
- icon: string;
3
- theme?: string;
4
- className?: string;
5
- size?: string;
6
- isLoading?: boolean;
7
- loadingDuration?: number;
8
- hasCircle?: boolean;
9
- circleSize?: string;
10
- color?: string;
11
- backgroundColor?: string;
12
- familyClass?: string;
13
- familyPrefix?: string;
14
- };
15
- export default function DIcon({ icon, theme, className, size, isLoading, loadingDuration, hasCircle, circleSize, color, backgroundColor, familyClass, familyPrefix, }: Props): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,32 +0,0 @@
1
- import type { CSSProperties, ChangeEvent, FocusEvent, MouseEvent, ReactNode, WheelEvent } from 'react';
2
- import type { EndIcon, FamilyIcon, LabelIcon, StartIcon } from './interface';
3
- type Ref = {
4
- blur: () => void;
5
- focus: () => void;
6
- };
7
- declare const ForwardedDInput: import("react").ForwardRefExoticComponent<FamilyIcon & LabelIcon & StartIcon & EndIcon & {
8
- id: string;
9
- className?: string | undefined;
10
- style?: CSSProperties | undefined;
11
- name?: string | undefined;
12
- label?: string | undefined;
13
- placeholder?: string | undefined;
14
- type?: string | undefined;
15
- value?: string | number | undefined;
16
- innerInputMode?: 'text' | 'search' | 'email' | 'tel' | 'url' | 'none' | 'numeric' | 'decimal' | undefined;
17
- pattern?: string | undefined;
18
- isDisabled?: boolean | undefined;
19
- isReadOnly?: boolean | undefined;
20
- isLoading?: boolean | undefined;
21
- hint?: string | undefined;
22
- isInvalid?: boolean | undefined;
23
- isValid?: boolean | undefined;
24
- inputStart?: ReactNode;
25
- onChange?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
26
- onBlur?: ((event: FocusEvent<HTMLInputElement>) => void) | undefined;
27
- onFocus?: ((event: FocusEvent) => void) | undefined;
28
- onWheel?: ((event: WheelEvent) => void) | undefined;
29
- onIconStartClick?: ((event: MouseEvent) => void) | undefined;
30
- onIconEndClick?: ((event: MouseEvent) => void) | undefined;
31
- } & import("react").RefAttributes<Ref>>;
32
- export default ForwardedDInput;
@@ -1,22 +0,0 @@
1
- import type { CSSProperties } from 'react';
2
- import type { LabelIcon, StartIcon } from './interface';
3
- type Props = LabelIcon & StartIcon & {
4
- id: string;
5
- name?: string;
6
- label?: string;
7
- value: number;
8
- isDisabled?: boolean;
9
- isReadOnly?: boolean;
10
- isLoading?: boolean;
11
- iconEnd?: string;
12
- hint?: string;
13
- isInvalid?: boolean;
14
- isValid?: boolean;
15
- minValue: number;
16
- maxValue: number;
17
- style?: CSSProperties;
18
- className?: string;
19
- onChange?: (newNumber: number) => void;
20
- };
21
- export default function DInputCounter({ id, name, label, value, isDisabled, isReadOnly, isLoading, iconStart, iconEnd, hint, isInvalid, isValid, minValue, maxValue, style, className, onChange, ...rest }: Props): import("react/jsx-runtime").JSX.Element;
22
- export {};
@@ -1,5 +0,0 @@
1
- import type { ComponentProps } from 'react';
2
- import DInputCurrencyBase from './DInputCurrencyBase';
3
- type Props = Omit<ComponentProps<typeof DInputCurrencyBase>, 'currencyOptions'>;
4
- export default function DInputCurrency(props: Props): import("react/jsx-runtime").JSX.Element;
5
- export {};