react-restyle-components 0.4.39 → 0.4.41

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 (243) hide show
  1. package/lib/index.js +3 -1
  2. package/lib/src/core-components/index.js +1 -1
  3. package/lib/src/core-components/src/components/Accordion/AccordionSection/Accordion.js +15 -1
  4. package/lib/src/core-components/src/components/Accordion/AccordionSection/AccordionContext.js +6 -1
  5. package/lib/src/core-components/src/components/Accordion/AccordionSection/AccordionSection.js +39 -1
  6. package/lib/src/core-components/src/components/Accordion/AccordionSection/Header.js +39 -1
  7. package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.js +94 -57
  8. package/lib/src/core-components/src/components/Accordion/AccordionSection/hooks/useCurrentAccordionIndex.js +13 -1
  9. package/lib/src/core-components/src/components/Accordion/AccordionSection/index.js +3 -1
  10. package/lib/src/core-components/src/components/Accordion/AccordionSection/types.js +9 -1
  11. package/lib/src/core-components/src/components/Accordion/Collapsible/Collapsible2.component.js +249 -1
  12. package/lib/src/core-components/src/components/Action/types.js +8 -1
  13. package/lib/src/core-components/src/components/AlertBanner/AlertBanner.js +45 -1
  14. package/lib/src/core-components/src/components/AlertBanner/elements.js +120 -45
  15. package/lib/src/core-components/src/components/AlertBanner/index.js +2 -1
  16. package/lib/src/core-components/src/components/AlertBanner/types.js +10 -1
  17. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-group-by-multiple-select-multiple-fields-display/auto-complete-filter-group-by-multiple-select-multiple-fields-display.component.js +334 -1
  18. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multi-select-multi-fields-display-drag-drop/auto-complete-filter-multi-select-multi-fields-display-drag-drop.component.js +229 -1
  19. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multi-select-selected-top-display/auto-complete-filter-multi-select-selected-top-display.component.js +174 -1
  20. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +129 -2
  21. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +55 -1
  22. package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +308 -2
  23. package/lib/src/core-components/src/components/AutoComplete/auto-complete-group-by/auto-complete-group-by.component.js +115 -1
  24. package/lib/src/core-components/src/components/AutoComplete/autocomplete/autocomplete.js +442 -2
  25. package/lib/src/core-components/src/components/AutoComplete/index.js +8 -1
  26. package/lib/src/core-components/src/components/Avatar/Avatar.js +148 -14
  27. package/lib/src/core-components/src/components/Badge/Badge.js +25 -2
  28. package/lib/src/core-components/src/components/Badge/InnerBadge/Inline.js +25 -1
  29. package/lib/src/core-components/src/components/Badge/InnerBadge/InnerBadge.js +25 -1
  30. package/lib/src/core-components/src/components/Badge/InnerBadge/elements.js +78 -32
  31. package/lib/src/core-components/src/components/Badge/InnerBadge/index.js +1 -1
  32. package/lib/src/core-components/src/components/Badge/index.js +1 -1
  33. package/lib/src/core-components/src/components/Badge/types.js +5 -1
  34. package/lib/src/core-components/src/components/Breadcrumb/Breadcrumb.js +83 -1
  35. package/lib/src/core-components/src/components/Breadcrumb/elements.js +166 -94
  36. package/lib/src/core-components/src/components/Breadcrumb/index.js +3 -1
  37. package/lib/src/core-components/src/components/Breadcrumb/types.js +3 -1
  38. package/lib/src/core-components/src/components/Button/button.component.js +18 -1
  39. package/lib/src/core-components/src/components/Button/buttonGroup/buttonGroup.component.js +4 -1
  40. package/lib/src/core-components/src/components/Button/index.js +2 -1
  41. package/lib/src/core-components/src/components/Button/types.js +1 -1
  42. package/lib/src/core-components/src/components/Chip/Chip.js +64 -1
  43. package/lib/src/core-components/src/components/Chip/elements.js +148 -48
  44. package/lib/src/core-components/src/components/Chip/index.js +2 -1
  45. package/lib/src/core-components/src/components/Chip/types.js +4 -1
  46. package/lib/src/core-components/src/components/Divider/Divider.js +25 -1
  47. package/lib/src/core-components/src/components/Divider/elements.js +68 -31
  48. package/lib/src/core-components/src/components/Divider/index.js +2 -1
  49. package/lib/src/core-components/src/components/Divider/types.js +4 -1
  50. package/lib/src/core-components/src/components/DynamicGrid/DynamicGrid.js +147 -1
  51. package/lib/src/core-components/src/components/DynamicGrid/GridContainer.js +24 -17
  52. package/lib/src/core-components/src/components/DynamicGrid/elements.js +162 -100
  53. package/lib/src/core-components/src/components/DynamicGrid/index.js +3 -1
  54. package/lib/src/core-components/src/components/DynamicGrid/types.js +28 -1
  55. package/lib/src/core-components/src/components/DynamicGrid/utils.js +193 -1
  56. package/lib/src/core-components/src/components/FormField/FormField.js +103 -1
  57. package/lib/src/core-components/src/components/FormField/components/CheckboxGroupInput.js +37 -1
  58. package/lib/src/core-components/src/components/FormField/components/CheckboxInput.js +8 -1
  59. package/lib/src/core-components/src/components/FormField/components/CssMultilineInput.js +192 -1
  60. package/lib/src/core-components/src/components/FormField/components/DatePickerInput.js +99 -1
  61. package/lib/src/core-components/src/components/FormField/components/DropdownInput.js +70 -1
  62. package/lib/src/core-components/src/components/FormField/components/OtpInput.js +81 -1
  63. package/lib/src/core-components/src/components/FormField/components/PasswordInput.js +40 -1
  64. package/lib/src/core-components/src/components/FormField/components/PinInput.js +75 -1
  65. package/lib/src/core-components/src/components/FormField/components/RadioInput.js +54 -1
  66. package/lib/src/core-components/src/components/FormField/components/TextDropdownInput.js +94 -1
  67. package/lib/src/core-components/src/components/FormField/components/ToggleInput.js +36 -1
  68. package/lib/src/core-components/src/components/FormField/components/index.js +11 -1
  69. package/lib/src/core-components/src/components/FormField/css-properties.js +161 -1
  70. package/lib/src/core-components/src/components/FormField/index.js +2 -1
  71. package/lib/src/core-components/src/components/Icon/Icon.js +79 -1
  72. package/lib/src/core-components/src/components/Icon/index.js +2 -1
  73. package/lib/src/core-components/src/components/Icon/types.js +9 -1
  74. package/lib/src/core-components/src/components/Loader/loader.component.js +215 -2
  75. package/lib/src/core-components/src/components/Masonry/Masonry.js +73 -1
  76. package/lib/src/core-components/src/components/Masonry/elements.js +46 -29
  77. package/lib/src/core-components/src/components/Masonry/hooks.js +100 -1
  78. package/lib/src/core-components/src/components/Masonry/index.js +3 -1
  79. package/lib/src/core-components/src/components/Masonry/types.js +1 -1
  80. package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.js +116 -1
  81. package/lib/src/core-components/src/components/Modal/index.js +2 -1
  82. package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.js +147 -1
  83. package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.js +12 -1
  84. package/lib/src/core-components/src/components/Picker/color-picker-modal/color-picker-modal.component.js +40 -1
  85. package/lib/src/core-components/src/components/Picker/index.js +2 -1
  86. package/lib/src/core-components/src/components/Selection/index.js +4 -1
  87. package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.js +49 -1
  88. package/lib/src/core-components/src/components/Selection/multi-select-with-field/multi-select-with-field.component.js +58 -1
  89. package/lib/src/core-components/src/components/Selection/multi-selection-dropdown/multi-selection-dropdown.component.js +43 -1
  90. package/lib/src/core-components/src/components/Selection/single-select/single-select.component.js +87 -1
  91. package/lib/src/core-components/src/components/Skeleton/Skeleton.js +51 -1
  92. package/lib/src/core-components/src/components/Skeleton/elements.js +143 -54
  93. package/lib/src/core-components/src/components/Skeleton/index.js +2 -1
  94. package/lib/src/core-components/src/components/Skeleton/types.js +4 -1
  95. package/lib/src/core-components/src/components/SpeedDial/SpeedDial.js +128 -1
  96. package/lib/src/core-components/src/components/SpeedDial/elements.js +132 -62
  97. package/lib/src/core-components/src/components/SpeedDial/index.js +2 -1
  98. package/lib/src/core-components/src/components/SpeedDial/types.js +3 -1
  99. package/lib/src/core-components/src/components/Stepper2/stepper.component.js +139 -1
  100. package/lib/src/core-components/src/components/Switch/Switch.js +26 -1
  101. package/lib/src/core-components/src/components/Switch/elements.js +103 -34
  102. package/lib/src/core-components/src/components/Switch/index.js +2 -1
  103. package/lib/src/core-components/src/components/Switch/types.js +3 -1
  104. package/lib/src/core-components/src/components/Table/Table.js +1357 -1
  105. package/lib/src/core-components/src/components/Table/columnReorder.d.ts +128 -0
  106. package/lib/src/core-components/src/components/Table/columnReorder.js +530 -0
  107. package/lib/src/core-components/src/components/Table/columnResize.d.ts +99 -0
  108. package/lib/src/core-components/src/components/Table/columnResize.js +399 -0
  109. package/lib/src/core-components/src/components/Table/elements.d.ts +9 -1
  110. package/lib/src/core-components/src/components/Table/elements.js +324 -155
  111. package/lib/src/core-components/src/components/Table/filters.js +555 -30
  112. package/lib/src/core-components/src/components/Table/hooks.js +536 -2
  113. package/lib/src/core-components/src/components/Table/index.d.ts +4 -0
  114. package/lib/src/core-components/src/components/Table/index.js +6 -1
  115. package/lib/src/core-components/src/components/Table/types.d.ts +58 -0
  116. package/lib/src/core-components/src/components/Table/types.js +1 -1
  117. package/lib/src/core-components/src/components/Tabs/tabs.component.js +22 -1
  118. package/lib/src/core-components/src/components/Tags1/Tags.component.js +118 -1
  119. package/lib/src/core-components/src/components/Tags1/types.js +20 -1
  120. package/lib/src/core-components/src/components/Timer1/timer.component.js +76 -1
  121. package/lib/src/core-components/src/components/Toast/Toast.js +50 -1
  122. package/lib/src/core-components/src/components/Toast/elements.js +122 -41
  123. package/lib/src/core-components/src/components/Toast/index.js +2 -1
  124. package/lib/src/core-components/src/components/Toast/types.js +9 -1
  125. package/lib/src/core-components/src/components/Tooltip/Tooltip.js +200 -1
  126. package/lib/src/core-components/src/components/Tooltip/elements.js +117 -55
  127. package/lib/src/core-components/src/components/Tooltip/index.js +2 -1
  128. package/lib/src/core-components/src/components/Tooltip/types.js +17 -1
  129. package/lib/src/core-components/src/components/Tooltip/utils.js +140 -1
  130. package/lib/src/core-components/src/components/TreeSelect/TreeSelect.js +303 -1
  131. package/lib/src/core-components/src/components/TreeSelect/elements.js +216 -117
  132. package/lib/src/core-components/src/components/TreeSelect/hooks.js +252 -1
  133. package/lib/src/core-components/src/components/TreeSelect/index.js +3 -1
  134. package/lib/src/core-components/src/components/TreeSelect/types.js +1 -1
  135. package/lib/src/core-components/src/components/ag-grid/AgGrid.d.ts +11 -0
  136. package/lib/src/core-components/src/components/ag-grid/AgGrid.js +733 -0
  137. package/lib/src/core-components/src/components/ag-grid/elements.d.ts +246 -0
  138. package/lib/src/core-components/src/components/ag-grid/elements.js +1156 -0
  139. package/lib/src/core-components/src/components/ag-grid/hooks.d.ts +196 -0
  140. package/lib/src/core-components/src/components/ag-grid/hooks.js +943 -0
  141. package/lib/src/core-components/src/components/ag-grid/index.d.ts +9 -0
  142. package/lib/src/core-components/src/components/ag-grid/index.js +13 -0
  143. package/lib/src/core-components/src/components/ag-grid/types.d.ts +1367 -0
  144. package/lib/src/core-components/src/components/ag-grid/types.js +6 -0
  145. package/lib/src/core-components/src/components/index.d.ts +1 -0
  146. package/lib/src/core-components/src/components/index.js +31 -1
  147. package/lib/src/core-components/src/components/pdf/pdf-images.components.js +7 -1
  148. package/lib/src/core-components/src/components/pdf/pdf-table.components.js +48 -5
  149. package/lib/src/core-components/src/components/pdf/pdf-typography.components.js +70 -1
  150. package/lib/src/core-components/src/components/pdf/pdf-wrapped-view.components.js +50 -1
  151. package/lib/src/core-components/src/core-components/Avatar.js +33 -4
  152. package/lib/src/core-components/src/core-components/CoreButton/CoreButton.js +10 -1
  153. package/lib/src/core-components/src/core-components/CoreButton/elements.js +176 -67
  154. package/lib/src/core-components/src/core-components/CoreButton/index.js +3 -1
  155. package/lib/src/core-components/src/core-components/CoreButton/types.js +6 -1
  156. package/lib/src/core-components/src/core-components/CoreButton/utils.js +12 -1
  157. package/lib/src/core-components/src/core-components/Divider/Divider.js +19 -4
  158. package/lib/src/core-components/src/core-components/Divider/index.js +1 -1
  159. package/lib/src/core-components/src/core-components/SelectionCardStrip/index.js +1 -1
  160. package/lib/src/core-components/src/core-components/SelectionCardStrip/selectionCardStrip.js +33 -10
  161. package/lib/src/core-components/src/core-components/StateLayer.js +5 -3
  162. package/lib/src/core-components/src/core-components/ToggleCore/elements.js +50 -25
  163. package/lib/src/core-components/src/core-components/ToggleCore/index.js +2 -1
  164. package/lib/src/core-components/src/core-components/ToggleCore/toggleCore.js +14 -1
  165. package/lib/src/core-components/src/core-components/atoms/Input/Input.js +22 -1
  166. package/lib/src/core-components/src/core-components/atoms/Label/Label.js +21 -1
  167. package/lib/src/core-components/src/core-components/atoms/Textarea/Textarea.js +19 -1
  168. package/lib/src/core-components/src/core-components/index.js +3 -1
  169. package/lib/src/core-components/src/helpers/constants.js +11 -1
  170. package/lib/src/core-components/src/hooks/index.js +1 -1
  171. package/lib/src/core-components/src/hooks/outside.hook.js +28 -1
  172. package/lib/src/core-components/src/index.js +12 -1
  173. package/lib/src/core-components/src/tc.global.css +16 -3
  174. package/lib/src/core-components/src/tc.module.css +2 -2
  175. package/lib/src/core-components/src/utils/abstracts/breakpoints/index.js +28 -1
  176. package/lib/src/core-components/src/utils/abstracts/colors/index.js +49 -1
  177. package/lib/src/core-components/src/utils/abstracts/index.js +5 -1
  178. package/lib/src/core-components/src/utils/abstracts/space/index.js +26 -1
  179. package/lib/src/core-components/src/utils/abstracts/theme/ThemeBoundary.js +8 -1
  180. package/lib/src/core-components/src/utils/abstracts/theme/default-themes.js +30 -1
  181. package/lib/src/core-components/src/utils/abstracts/theme/index.js +3 -1
  182. package/lib/src/core-components/src/utils/abstracts/theme/theme.js +30 -1
  183. package/lib/src/core-components/src/utils/abstracts/theme/types.js +1 -1
  184. package/lib/src/core-components/src/utils/abstracts/theme/useTheme.js +17 -1
  185. package/lib/src/core-components/src/utils/abstracts/typography/index.js +25 -1
  186. package/lib/src/core-components/src/utils/context/DefaultsProvider.js +8 -1
  187. package/lib/src/core-components/src/utils/context/InternalProvider.js +24 -1
  188. package/lib/src/core-components/src/utils/context/index.js +2 -1
  189. package/lib/src/core-components/src/utils/designTokens.js +125 -1
  190. package/lib/src/core-components/src/utils/helpers/attachSubComponents.js +23 -1
  191. package/lib/src/core-components/src/utils/helpers/flattenChildren.js +11 -1
  192. package/lib/src/core-components/src/utils/helpers/getChildByType.js +3 -1
  193. package/lib/src/core-components/src/utils/helpers/index.js +5 -1
  194. package/lib/src/core-components/src/utils/helpers/isComponentType.js +16 -1
  195. package/lib/src/core-components/src/utils/helpers/separateChildrenByType.js +12 -1
  196. package/lib/src/core-components/src/utils/hooks/index.js +18 -1
  197. package/lib/src/core-components/src/utils/hooks/useClickOutside.js +18 -1
  198. package/lib/src/core-components/src/utils/hooks/useCombinedRefs.js +17 -1
  199. package/lib/src/core-components/src/utils/hooks/useDebouncedCallback.js +12 -1
  200. package/lib/src/core-components/src/utils/hooks/useDebouncedValue.js +20 -1
  201. package/lib/src/core-components/src/utils/hooks/useDeprecation.js +40 -1
  202. package/lib/src/core-components/src/utils/hooks/useDeviceDetect.js +10 -1
  203. package/lib/src/core-components/src/utils/hooks/useDeviceForm.js +24 -1
  204. package/lib/src/core-components/src/utils/hooks/useDisableBodyScroll.js +16 -1
  205. package/lib/src/core-components/src/utils/hooks/useHoverState.js +36 -1
  206. package/lib/src/core-components/src/utils/hooks/useId.js +7 -1
  207. package/lib/src/core-components/src/utils/hooks/useIsBrowser.js +11 -1
  208. package/lib/src/core-components/src/utils/hooks/useMediaQuery.js +16 -1
  209. package/lib/src/core-components/src/utils/hooks/useOverflow.js +22 -1
  210. package/lib/src/core-components/src/utils/hooks/useSafeLayoutEffect.js +5 -1
  211. package/lib/src/core-components/src/utils/hooks/useScrollingUp.js +18 -1
  212. package/lib/src/core-components/src/utils/hooks/useTrapFocus.js +30 -1
  213. package/lib/src/core-components/src/utils/hooks/useWindowDimensions.js +23 -1
  214. package/lib/src/core-components/src/utils/index.js +9 -1
  215. package/lib/src/core-components/src/utils/stories/Wrappers.js +23 -8
  216. package/lib/src/core-components/src/utils/stories/cleanProps.js +5 -1
  217. package/lib/src/core-components/src/utils/stories/index.js +4 -1
  218. package/lib/src/core-components/src/utils/stories/sleep.js +4 -1
  219. package/lib/src/core-components/src/utils/stories/view-ports.js +50 -1
  220. package/lib/src/core-components/src/utils/styling/calcWidthOfColumns.js +5 -1
  221. package/lib/src/core-components/src/utils/styling/createGridContainer.js +12 -6
  222. package/lib/src/core-components/src/utils/styling/createTransition.js +7 -2
  223. package/lib/src/core-components/src/utils/styling/forwardProps.js +10 -1
  224. package/lib/src/core-components/src/utils/styling/index.js +5 -1
  225. package/lib/src/core-components/src/utils/styling/pxToRem.js +6 -1
  226. package/lib/src/core-components/src/utils/testing/getComputedStyle.js +3 -1
  227. package/lib/src/core-components/src/utils/testing/index.js +1 -1
  228. package/lib/src/core-components/src/utils/utility.util.js +14 -1
  229. package/lib/src/core-components/tailwind.config.js +233 -1
  230. package/lib/src/core-hooks/index.js +3 -1
  231. package/lib/src/core-hooks/src/useClickOutside/useClickOutside.hook.js +46 -1
  232. package/lib/src/core-hooks/src/useDebounce/useDebounce.hook.js +30 -1
  233. package/lib/src/core-hooks/src/usePreventEKey/usePreventEKey.hook.js +8 -1
  234. package/lib/src/core-utils/index.js +7 -1
  235. package/lib/src/core-utils/src/calculation/calculation.util.js +89 -1
  236. package/lib/src/core-utils/src/colors/color.util.js +15 -1
  237. package/lib/src/core-utils/src/convert/numberToWords/numToWords.util.js +145 -1
  238. package/lib/src/core-utils/src/convert/typography/camelCaseToTitleCase.util.js +5 -1
  239. package/lib/src/core-utils/src/form-helper/form-helper.util.js +82 -1
  240. package/lib/src/core-utils/src/index.js +7 -1
  241. package/lib/src/core-utils/src/utility/utility.util.js +12 -1
  242. package/lib/src/core-utils/src/uuid/uuid.util.js +8 -1
  243. package/package.json +1 -1
@@ -0,0 +1,1156 @@
1
+ /**
2
+ * AG Grid Styled Components
3
+ * Beautiful, responsive styled components for the AG Grid-like table
4
+ */
5
+ import { styled, css, keyframes } from 'styled-components';
6
+ // ============================================================================
7
+ // Theme Definitions
8
+ // ============================================================================
9
+ const themes = {
10
+ alpine: {
11
+ backgroundColor: '#ffffff',
12
+ headerBackgroundColor: '#f8f8f8',
13
+ oddRowBackgroundColor: '#fcfcfc',
14
+ borderColor: '#dde2eb',
15
+ selectedRowBackgroundColor: '#b7e4ff',
16
+ hoverRowBackgroundColor: '#ecf0f1',
17
+ textColor: '#181d1f',
18
+ headerTextColor: '#181d1f',
19
+ accentColor: '#2196f3',
20
+ cellPadding: '0 12px',
21
+ headerPadding: '0 12px',
22
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
23
+ fontSize: '13px',
24
+ headerFontSize: '13px',
25
+ headerFontWeight: '600',
26
+ borderRadius: '0',
27
+ cellBorderWidth: '1px',
28
+ },
29
+ 'alpine-dark': {
30
+ backgroundColor: '#181d1f',
31
+ headerBackgroundColor: '#222628',
32
+ oddRowBackgroundColor: '#1f2426',
33
+ borderColor: '#3d4749',
34
+ selectedRowBackgroundColor: '#005880',
35
+ hoverRowBackgroundColor: '#2d3436',
36
+ textColor: '#f0f0f0',
37
+ headerTextColor: '#f0f0f0',
38
+ accentColor: '#2196f3',
39
+ cellPadding: '0 12px',
40
+ headerPadding: '0 12px',
41
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
42
+ fontSize: '13px',
43
+ headerFontSize: '13px',
44
+ headerFontWeight: '600',
45
+ borderRadius: '0',
46
+ cellBorderWidth: '1px',
47
+ },
48
+ balham: {
49
+ backgroundColor: '#ffffff',
50
+ headerBackgroundColor: '#f5f7f7',
51
+ oddRowBackgroundColor: '#fcfdfd',
52
+ borderColor: '#bdc3c7',
53
+ selectedRowBackgroundColor: '#b7e4ff',
54
+ hoverRowBackgroundColor: '#ecf0f1',
55
+ textColor: '#000000',
56
+ headerTextColor: '#000000',
57
+ accentColor: '#0091ea',
58
+ cellPadding: '0 4px',
59
+ headerPadding: '0 4px',
60
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
61
+ fontSize: '12px',
62
+ headerFontSize: '12px',
63
+ headerFontWeight: '600',
64
+ borderRadius: '0',
65
+ cellBorderWidth: '1px',
66
+ },
67
+ 'balham-dark': {
68
+ backgroundColor: '#2d3436',
69
+ headerBackgroundColor: '#1e272c',
70
+ oddRowBackgroundColor: '#32393c',
71
+ borderColor: '#424a4d',
72
+ selectedRowBackgroundColor: '#005880',
73
+ hoverRowBackgroundColor: '#3d4749',
74
+ textColor: '#f0f0f0',
75
+ headerTextColor: '#f0f0f0',
76
+ accentColor: '#0091ea',
77
+ cellPadding: '0 4px',
78
+ headerPadding: '0 4px',
79
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
80
+ fontSize: '12px',
81
+ headerFontSize: '12px',
82
+ headerFontWeight: '600',
83
+ borderRadius: '0',
84
+ cellBorderWidth: '1px',
85
+ },
86
+ material: {
87
+ backgroundColor: '#ffffff',
88
+ headerBackgroundColor: '#fafafa',
89
+ oddRowBackgroundColor: '#ffffff',
90
+ borderColor: '#e0e0e0',
91
+ selectedRowBackgroundColor: '#e3f2fd',
92
+ hoverRowBackgroundColor: '#f5f5f5',
93
+ textColor: 'rgba(0, 0, 0, 0.87)',
94
+ headerTextColor: 'rgba(0, 0, 0, 0.54)',
95
+ accentColor: '#3f51b5',
96
+ cellPadding: '0 24px 0 24px',
97
+ headerPadding: '0 24px 0 24px',
98
+ fontFamily: 'Roboto, "Helvetica Neue", sans-serif',
99
+ fontSize: '14px',
100
+ headerFontSize: '12px',
101
+ headerFontWeight: '500',
102
+ borderRadius: '0',
103
+ cellBorderWidth: '1px',
104
+ },
105
+ quartz: {
106
+ backgroundColor: '#ffffff',
107
+ headerBackgroundColor: '#ffffff',
108
+ oddRowBackgroundColor: '#fafafa',
109
+ borderColor: '#e2e8f0',
110
+ selectedRowBackgroundColor: '#dbeafe',
111
+ hoverRowBackgroundColor: '#f1f5f9',
112
+ textColor: '#1e293b',
113
+ headerTextColor: '#475569',
114
+ accentColor: '#3b82f6',
115
+ cellPadding: '0 16px',
116
+ headerPadding: '0 16px',
117
+ fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
118
+ fontSize: '14px',
119
+ headerFontSize: '12px',
120
+ headerFontWeight: '600',
121
+ borderRadius: '8px',
122
+ cellBorderWidth: '1px',
123
+ },
124
+ 'quartz-dark': {
125
+ backgroundColor: '#0f172a',
126
+ headerBackgroundColor: '#1e293b',
127
+ oddRowBackgroundColor: '#1e293b',
128
+ borderColor: '#334155',
129
+ selectedRowBackgroundColor: '#1e3a5f',
130
+ hoverRowBackgroundColor: '#334155',
131
+ textColor: '#e2e8f0',
132
+ headerTextColor: '#94a3b8',
133
+ accentColor: '#3b82f6',
134
+ cellPadding: '0 16px',
135
+ headerPadding: '0 16px',
136
+ fontFamily: 'Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
137
+ fontSize: '14px',
138
+ headerFontSize: '12px',
139
+ headerFontWeight: '600',
140
+ borderRadius: '8px',
141
+ cellBorderWidth: '1px',
142
+ },
143
+ };
144
+ export const getTheme = (variant, custom) => ({
145
+ ...themes[variant],
146
+ ...custom,
147
+ });
148
+ // ============================================================================
149
+ // Animations
150
+ // ============================================================================
151
+ const fadeIn = keyframes `
152
+ from { opacity: 0; }
153
+ to { opacity: 1; }
154
+ `;
155
+ const slideInRight = keyframes `
156
+ from { transform: translateX(10px); opacity: 0; }
157
+ to { transform: translateX(0); opacity: 1; }
158
+ `;
159
+ const pulse = keyframes `
160
+ 0%, 100% { opacity: 1; }
161
+ 50% { opacity: 0.5; }
162
+ `;
163
+ const shimmer = keyframes `
164
+ 0% { background-position: -200% 0; }
165
+ 100% { background-position: 200% 0; }
166
+ `;
167
+ const spin = keyframes `
168
+ from { transform: rotate(0deg); }
169
+ to { transform: rotate(360deg); }
170
+ `;
171
+ const rowEnter = keyframes `
172
+ from {
173
+ opacity: 0;
174
+ transform: translateY(-4px);
175
+ }
176
+ to {
177
+ opacity: 1;
178
+ transform: translateY(0);
179
+ }
180
+ `;
181
+ const cellFlash = keyframes `
182
+ 0% { background-color: rgba(76, 175, 80, 0.4); }
183
+ 100% { background-color: transparent; }
184
+ `;
185
+ // ============================================================================
186
+ // Grid Container
187
+ // ============================================================================
188
+ export const GridRoot = styled.div `
189
+ display: flex;
190
+ flex-direction: column;
191
+ width: 100%;
192
+ height: 100%;
193
+ background-color: ${({ $theme }) => $theme.backgroundColor};
194
+ font-family: ${({ $theme }) => $theme.fontFamily};
195
+ font-size: ${({ $theme }) => $theme.fontSize};
196
+ color: ${({ $theme }) => $theme.textColor};
197
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
198
+ border-radius: ${({ $theme }) => $theme.borderRadius};
199
+ overflow: hidden;
200
+ position: relative;
201
+
202
+ *, *::before, *::after {
203
+ box-sizing: border-box;
204
+ }
205
+
206
+ /* Responsive styles */
207
+ ${({ $responsive }) => $responsive &&
208
+ css `
209
+ @media (max-width: 768px) {
210
+ border-radius: 0;
211
+ border-left: none;
212
+ border-right: none;
213
+ }
214
+ `}
215
+ `;
216
+ export const GridWrapper = styled.div `
217
+ display: flex;
218
+ flex-direction: column;
219
+ flex: 1;
220
+ min-height: 0;
221
+ overflow: hidden;
222
+ `;
223
+ // ============================================================================
224
+ // Toolbar / Header Area
225
+ // ============================================================================
226
+ export const GridToolbar = styled.div `
227
+ display: flex;
228
+ align-items: center;
229
+ justify-content: space-between;
230
+ gap: 12px;
231
+ padding: 8px 12px;
232
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
233
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor};
234
+ flex-wrap: wrap;
235
+
236
+ @media (max-width: 640px) {
237
+ flex-direction: column;
238
+ align-items: stretch;
239
+ gap: 8px;
240
+ }
241
+ `;
242
+ export const ToolbarGroup = styled.div `
243
+ display: flex;
244
+ align-items: center;
245
+ gap: 8px;
246
+ flex-wrap: wrap;
247
+ `;
248
+ export const ToolbarButton = styled.button `
249
+ display: inline-flex;
250
+ align-items: center;
251
+ justify-content: center;
252
+ gap: 6px;
253
+ padding: 6px 12px;
254
+ font-size: 13px;
255
+ font-weight: 500;
256
+ border-radius: 4px;
257
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
258
+ background: ${({ $theme, $active }) => ($active ? $theme.accentColor : $theme.backgroundColor)};
259
+ color: ${({ $theme, $active }) => ($active ? '#ffffff' : $theme.textColor)};
260
+ cursor: pointer;
261
+ transition: all 0.15s ease;
262
+ white-space: nowrap;
263
+
264
+ ${({ $variant, $theme }) => $variant === 'primary' &&
265
+ css `
266
+ background: ${$theme.accentColor};
267
+ border-color: ${$theme.accentColor};
268
+ color: #ffffff;
269
+
270
+ &:hover {
271
+ filter: brightness(1.1);
272
+ }
273
+ `}
274
+
275
+ ${({ $variant }) => $variant === 'danger' &&
276
+ css `
277
+ background: #ef4444;
278
+ border-color: #ef4444;
279
+ color: #ffffff;
280
+
281
+ &:hover {
282
+ background: #dc2626;
283
+ border-color: #dc2626;
284
+ }
285
+ `}
286
+
287
+ &:hover:not(:disabled) {
288
+ background: ${({ $theme, $active }) => ($active ? $theme.accentColor : $theme.hoverRowBackgroundColor)};
289
+ }
290
+
291
+ &:disabled {
292
+ opacity: 0.5;
293
+ cursor: not-allowed;
294
+ }
295
+
296
+ svg {
297
+ width: 16px;
298
+ height: 16px;
299
+ }
300
+ `;
301
+ export const QuickFilter = styled.div `
302
+ position: relative;
303
+ display: flex;
304
+ align-items: center;
305
+
306
+ input {
307
+ width: 220px;
308
+ padding: 6px 12px 6px 32px;
309
+ font-size: 13px;
310
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
311
+ border-radius: 4px;
312
+ background: ${({ $theme }) => $theme.backgroundColor};
313
+ color: ${({ $theme }) => $theme.textColor};
314
+ outline: none;
315
+ transition: border-color 0.15s ease, box-shadow 0.15s ease;
316
+
317
+ &::placeholder {
318
+ color: ${({ $theme }) => $theme.headerTextColor};
319
+ opacity: 0.6;
320
+ }
321
+
322
+ &:focus {
323
+ border-color: ${({ $theme }) => $theme.accentColor};
324
+ box-shadow: 0 0 0 3px ${({ $theme }) => $theme.accentColor}20;
325
+ }
326
+
327
+ @media (max-width: 640px) {
328
+ width: 100%;
329
+ }
330
+ }
331
+
332
+ svg {
333
+ position: absolute;
334
+ left: 10px;
335
+ width: 14px;
336
+ height: 14px;
337
+ color: ${({ $theme }) => $theme.headerTextColor};
338
+ opacity: 0.6;
339
+ }
340
+ `;
341
+ // ============================================================================
342
+ // Table Container
343
+ // ============================================================================
344
+ export const TableContainer = styled.div `
345
+ flex: 1;
346
+ overflow: auto;
347
+ position: relative;
348
+ min-height: 0;
349
+
350
+ ${({ $maxHeight }) => $maxHeight &&
351
+ css `
352
+ max-height: ${typeof $maxHeight === 'number' ? `${$maxHeight}px` : $maxHeight};
353
+ `}
354
+ `;
355
+ export const StyledTable = styled.table `
356
+ width: 100%;
357
+ border-collapse: collapse;
358
+ table-layout: ${({ $fixedLayout }) => ($fixedLayout ? 'fixed' : 'auto')};
359
+ `;
360
+ // ============================================================================
361
+ // Header
362
+ // ============================================================================
363
+ export const TableHead = styled.thead `
364
+ ${({ $sticky, $theme }) => $sticky &&
365
+ css `
366
+ position: sticky;
367
+ top: 0;
368
+ z-index: 10;
369
+ background: ${$theme.headerBackgroundColor};
370
+ `}
371
+ `;
372
+ export const HeaderRow = styled.tr `
373
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
374
+ height: ${({ $height }) => ($height ? `${$height}px` : '42px')};
375
+ `;
376
+ export const HeaderCell = styled.th `
377
+ padding: ${({ $theme }) => $theme.headerPadding};
378
+ text-align: ${({ $align }) => $align || 'left'};
379
+ font-size: ${({ $theme }) => $theme.headerFontSize};
380
+ font-weight: ${({ $theme }) => $theme.headerFontWeight};
381
+ color: ${({ $theme }) => $theme.headerTextColor};
382
+ border-bottom: 2px solid ${({ $theme }) => $theme.borderColor};
383
+ border-right: 1px solid ${({ $theme }) => $theme.borderColor};
384
+ white-space: nowrap;
385
+ overflow: hidden;
386
+ text-overflow: ellipsis;
387
+ position: relative;
388
+ user-select: none;
389
+ vertical-align: middle;
390
+ text-transform: uppercase;
391
+ letter-spacing: 0.5px;
392
+
393
+ ${({ $width }) => $width && css `width: ${$width}px;`}
394
+ ${({ $minWidth }) => $minWidth && css `min-width: ${$minWidth}px;`}
395
+ ${({ $maxWidth }) => $maxWidth && css `max-width: ${$maxWidth}px;`}
396
+
397
+ ${({ $sortable, $theme }) => $sortable &&
398
+ css `
399
+ cursor: pointer;
400
+
401
+ &:hover {
402
+ background: ${$theme.hoverRowBackgroundColor};
403
+ }
404
+ `}
405
+
406
+ ${({ $sorted, $theme }) => $sorted &&
407
+ css `
408
+ background: ${$theme.selectedRowBackgroundColor}40;
409
+ `}
410
+
411
+ ${({ $pinned, $theme }) => $pinned &&
412
+ css `
413
+ position: sticky;
414
+ ${$pinned === 'left' ? 'left: 0;' : 'right: 0;'}
415
+ z-index: 11;
416
+ background: ${$theme.headerBackgroundColor};
417
+ box-shadow: ${$pinned === 'left' ? '2px 0 4px rgba(0,0,0,0.1)' : '-2px 0 4px rgba(0,0,0,0.1)'};
418
+ `}
419
+
420
+ &:last-child {
421
+ border-right: none;
422
+ }
423
+ `;
424
+ export const HeaderCellContent = styled.div `
425
+ display: flex;
426
+ align-items: center;
427
+ gap: 6px;
428
+ min-height: 24px;
429
+ `;
430
+ export const HeaderText = styled.span `
431
+ flex: 1;
432
+ overflow: hidden;
433
+ text-overflow: ellipsis;
434
+ `;
435
+ export const SortIndicator = styled.span `
436
+ display: flex;
437
+ align-items: center;
438
+ justify-content: center;
439
+ width: 18px;
440
+ height: 18px;
441
+ opacity: ${({ $active }) => ($active ? 1 : 0.3)};
442
+ transition: opacity 0.15s ease, transform 0.2s ease;
443
+
444
+ svg {
445
+ width: 14px;
446
+ height: 14px;
447
+ transition: transform 0.2s ease;
448
+ transform: ${({ $direction }) => ($direction === 'desc' ? 'rotate(180deg)' : 'rotate(0deg)')};
449
+ }
450
+ `;
451
+ export const FilterIndicator = styled.span `
452
+ display: flex;
453
+ align-items: center;
454
+ justify-content: center;
455
+ width: 18px;
456
+ height: 18px;
457
+ border-radius: 3px;
458
+ color: ${({ $active, $theme }) => ($active ? $theme.accentColor : $theme.headerTextColor)};
459
+ opacity: ${({ $active }) => ($active ? 1 : 0.4)};
460
+ transition: all 0.15s ease;
461
+
462
+ &:hover {
463
+ opacity: 1;
464
+ background: ${({ $theme }) => $theme.hoverRowBackgroundColor};
465
+ }
466
+
467
+ svg {
468
+ width: 12px;
469
+ height: 12px;
470
+ }
471
+ `;
472
+ export const ResizeHandle = styled.div `
473
+ position: absolute;
474
+ right: 0;
475
+ top: 0;
476
+ bottom: 0;
477
+ width: 6px;
478
+ cursor: col-resize;
479
+ z-index: 1;
480
+ transition: background-color 0.15s ease;
481
+
482
+ ${({ $resizing, $theme }) => $resizing &&
483
+ css `
484
+ background: ${$theme.accentColor};
485
+ `}
486
+
487
+ &:hover {
488
+ background: ${({ $theme }) => $theme.accentColor}60;
489
+ }
490
+
491
+ &::after {
492
+ content: '';
493
+ position: absolute;
494
+ right: 2px;
495
+ top: 25%;
496
+ height: 50%;
497
+ width: 2px;
498
+ background: ${({ $theme }) => $theme.borderColor};
499
+ border-radius: 1px;
500
+ }
501
+ `;
502
+ // ============================================================================
503
+ // Column Group Header
504
+ // ============================================================================
505
+ export const GroupHeaderRow = styled.tr `
506
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
507
+ `;
508
+ export const GroupHeaderCell = styled.th `
509
+ padding: ${({ $theme }) => $theme.headerPadding};
510
+ text-align: center;
511
+ font-size: ${({ $theme }) => $theme.headerFontSize};
512
+ font-weight: ${({ $theme }) => $theme.headerFontWeight};
513
+ color: ${({ $theme }) => $theme.headerTextColor};
514
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor};
515
+ border-right: 1px solid ${({ $theme }) => $theme.borderColor};
516
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
517
+ text-transform: uppercase;
518
+ letter-spacing: 0.5px;
519
+
520
+ &:last-child {
521
+ border-right: none;
522
+ }
523
+ `;
524
+ // ============================================================================
525
+ // Floating Filter Row
526
+ // ============================================================================
527
+ export const FloatingFilterRow = styled.tr `
528
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
529
+ height: ${({ $height }) => ($height ? `${$height}px` : '32px')};
530
+ `;
531
+ export const FloatingFilterCell = styled.td `
532
+ padding: 4px 8px;
533
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor};
534
+ border-right: 1px solid ${({ $theme }) => $theme.borderColor};
535
+ vertical-align: middle;
536
+
537
+ &:last-child {
538
+ border-right: none;
539
+ }
540
+
541
+ input,
542
+ select {
543
+ width: 100%;
544
+ padding: 4px 8px;
545
+ font-size: 12px;
546
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
547
+ border-radius: 3px;
548
+ background: ${({ $theme }) => $theme.backgroundColor};
549
+ color: ${({ $theme }) => $theme.textColor};
550
+ outline: none;
551
+
552
+ &:focus {
553
+ border-color: ${({ $theme }) => $theme.accentColor};
554
+ }
555
+ }
556
+ `;
557
+ // ============================================================================
558
+ // Body
559
+ // ============================================================================
560
+ export const TableBody = styled.tbody `
561
+ /* Base styles */
562
+ `;
563
+ export const TableRow = styled.tr `
564
+ height: ${({ $height }) => ($height ? `${$height}px` : '42px')};
565
+ background: ${({ $theme, $selected, $highlighted, $striped, $even, $group }) => {
566
+ if ($selected)
567
+ return $theme.selectedRowBackgroundColor;
568
+ if ($highlighted)
569
+ return `${$theme.accentColor}20`;
570
+ if ($group)
571
+ return $theme.headerBackgroundColor;
572
+ if ($striped && $even)
573
+ return $theme.oddRowBackgroundColor;
574
+ return $theme.backgroundColor;
575
+ }};
576
+ transition: background-color 0.15s ease;
577
+
578
+ ${({ $animate }) => $animate &&
579
+ css `
580
+ animation: ${rowEnter} 0.2s ease;
581
+ `}
582
+
583
+ ${({ $dragging }) => $dragging &&
584
+ css `
585
+ opacity: 0.5;
586
+ `}
587
+
588
+ ${({ $dragOver, $theme }) => $dragOver &&
589
+ css `
590
+ background: ${$theme.selectedRowBackgroundColor}60;
591
+ box-shadow: inset 0 -2px 0 ${$theme.accentColor};
592
+ `}
593
+
594
+ &:hover {
595
+ background: ${({ $theme, $selected }) => $selected ? $theme.selectedRowBackgroundColor : $theme.hoverRowBackgroundColor};
596
+ }
597
+
598
+ ${({ $group }) => $group &&
599
+ css `
600
+ cursor: pointer;
601
+ font-weight: 600;
602
+ `}
603
+ `;
604
+ export const TableCell = styled.td `
605
+ padding: ${({ $theme }) => $theme.cellPadding};
606
+ text-align: ${({ $align }) => $align || 'left'};
607
+ border-bottom: ${({ $theme }) => $theme.cellBorderWidth} solid ${({ $theme }) => $theme.borderColor};
608
+ border-right: ${({ $theme }) => $theme.cellBorderWidth} solid ${({ $theme }) => $theme.borderColor};
609
+ vertical-align: middle;
610
+ overflow: hidden;
611
+ text-overflow: ellipsis;
612
+ white-space: nowrap;
613
+
614
+ ${({ $width }) => $width && css `width: ${$width}px;`}
615
+
616
+ ${({ $pinned, $theme }) => $pinned &&
617
+ css `
618
+ position: sticky;
619
+ ${$pinned === 'left' ? 'left: 0;' : 'right: 0;'}
620
+ z-index: 5;
621
+ background: inherit;
622
+ box-shadow: ${$pinned === 'left' ? '2px 0 4px rgba(0,0,0,0.1)' : '-2px 0 4px rgba(0,0,0,0.1)'};
623
+ `}
624
+
625
+ ${({ $editing, $theme }) => $editing &&
626
+ css `
627
+ padding: 0;
628
+ background: ${$theme.backgroundColor};
629
+ box-shadow: inset 0 0 0 2px ${$theme.accentColor};
630
+ `}
631
+
632
+ ${({ $flashing }) => $flashing &&
633
+ css `
634
+ animation: ${cellFlash} 0.5s ease;
635
+ `}
636
+
637
+ &:last-child {
638
+ border-right: none;
639
+ }
640
+ `;
641
+ export const CellContent = styled.div `
642
+ display: flex;
643
+ align-items: center;
644
+ gap: 8px;
645
+ min-height: 20px;
646
+
647
+ ${({ $wrapText }) => $wrapText &&
648
+ css `
649
+ white-space: normal;
650
+ word-break: break-word;
651
+ `}
652
+ `;
653
+ // ============================================================================
654
+ // Checkbox
655
+ // ============================================================================
656
+ export const Checkbox = styled.input `
657
+ width: 16px;
658
+ height: 16px;
659
+ margin: 0;
660
+ cursor: pointer;
661
+ accent-color: ${({ $theme }) => $theme.accentColor};
662
+ flex-shrink: 0;
663
+
664
+ &:disabled {
665
+ opacity: 0.5;
666
+ cursor: not-allowed;
667
+ }
668
+ `;
669
+ export const CheckboxCell = styled.div `
670
+ display: flex;
671
+ align-items: center;
672
+ justify-content: center;
673
+ width: 100%;
674
+ `;
675
+ // ============================================================================
676
+ // Expand / Group
677
+ // ============================================================================
678
+ export const ExpandButton = styled.button `
679
+ display: flex;
680
+ align-items: center;
681
+ justify-content: center;
682
+ width: 20px;
683
+ height: 20px;
684
+ padding: 0;
685
+ margin-left: ${({ $level }) => ($level ? `${$level * 16}px` : '0')};
686
+ margin-right: 8px;
687
+ border: none;
688
+ border-radius: 3px;
689
+ background: transparent;
690
+ cursor: pointer;
691
+ transition: all 0.15s ease;
692
+ flex-shrink: 0;
693
+
694
+ &:hover {
695
+ background: ${({ $theme }) => $theme.hoverRowBackgroundColor};
696
+ }
697
+
698
+ svg {
699
+ width: 14px;
700
+ height: 14px;
701
+ transition: transform 0.2s ease;
702
+ transform: ${({ $expanded }) => ($expanded ? 'rotate(90deg)' : 'rotate(0deg)')};
703
+ }
704
+ `;
705
+ export const GroupCell = styled.div `
706
+ display: flex;
707
+ align-items: center;
708
+ padding-left: ${({ $level }) => ($level ? `${$level * 20}px` : '0')};
709
+ `;
710
+ // ============================================================================
711
+ // Row Drag Handle
712
+ // ============================================================================
713
+ export const DragHandle = styled.div `
714
+ display: flex;
715
+ align-items: center;
716
+ justify-content: center;
717
+ width: 20px;
718
+ height: 20px;
719
+ cursor: grab;
720
+ opacity: 0.4;
721
+ transition: opacity 0.15s ease;
722
+ flex-shrink: 0;
723
+
724
+ &:hover {
725
+ opacity: 1;
726
+ }
727
+
728
+ ${({ $dragging }) => $dragging &&
729
+ css `
730
+ cursor: grabbing;
731
+ opacity: 1;
732
+ `}
733
+
734
+ svg {
735
+ width: 14px;
736
+ height: 14px;
737
+ }
738
+ `;
739
+ // ============================================================================
740
+ // Cell Editor
741
+ // ============================================================================
742
+ export const CellEditor = styled.div `
743
+ width: 100%;
744
+ height: 100%;
745
+ display: flex;
746
+ align-items: center;
747
+
748
+ input,
749
+ textarea,
750
+ select {
751
+ width: 100%;
752
+ height: 100%;
753
+ padding: 8px 12px;
754
+ font-size: inherit;
755
+ font-family: inherit;
756
+ border: none;
757
+ background: ${({ $theme }) => $theme.backgroundColor};
758
+ color: ${({ $theme }) => $theme.textColor};
759
+ outline: none;
760
+ }
761
+
762
+ textarea {
763
+ resize: vertical;
764
+ min-height: 80px;
765
+ }
766
+ `;
767
+ // ============================================================================
768
+ // Footer
769
+ // ============================================================================
770
+ export const TableFooter = styled.tfoot `
771
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
772
+ `;
773
+ export const FooterRow = styled.tr `
774
+ height: 42px;
775
+ `;
776
+ export const FooterCell = styled.td `
777
+ padding: ${({ $theme }) => $theme.cellPadding};
778
+ text-align: ${({ $align }) => $align || 'left'};
779
+ font-weight: 600;
780
+ border-top: 2px solid ${({ $theme }) => $theme.borderColor};
781
+ color: ${({ $theme }) => $theme.headerTextColor};
782
+ `;
783
+ // ============================================================================
784
+ // Pagination
785
+ // ============================================================================
786
+ export const PaginationBar = styled.div `
787
+ display: flex;
788
+ align-items: center;
789
+ justify-content: space-between;
790
+ padding: 8px 16px;
791
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
792
+ border-top: 1px solid ${({ $theme }) => $theme.borderColor};
793
+ gap: 16px;
794
+ flex-wrap: wrap;
795
+
796
+ @media (max-width: 640px) {
797
+ flex-direction: column;
798
+ gap: 12px;
799
+ }
800
+ `;
801
+ export const PaginationInfo = styled.div `
802
+ font-size: 13px;
803
+ color: ${({ $theme }) => $theme.headerTextColor};
804
+ `;
805
+ export const PaginationControls = styled.div `
806
+ display: flex;
807
+ align-items: center;
808
+ gap: 4px;
809
+ `;
810
+ export const PageButton = styled.button `
811
+ display: flex;
812
+ align-items: center;
813
+ justify-content: center;
814
+ min-width: 32px;
815
+ height: 32px;
816
+ padding: 0 8px;
817
+ font-size: 13px;
818
+ font-weight: 500;
819
+ border: 1px solid ${({ $theme, $active }) => ($active ? $theme.accentColor : $theme.borderColor)};
820
+ border-radius: 4px;
821
+ background: ${({ $theme, $active }) => ($active ? $theme.accentColor : $theme.backgroundColor)};
822
+ color: ${({ $theme, $active }) => ($active ? '#ffffff' : $theme.textColor)};
823
+ cursor: pointer;
824
+ transition: all 0.15s ease;
825
+
826
+ &:hover:not(:disabled) {
827
+ background: ${({ $theme, $active }) => ($active ? $theme.accentColor : $theme.hoverRowBackgroundColor)};
828
+ }
829
+
830
+ &:disabled {
831
+ opacity: 0.5;
832
+ cursor: not-allowed;
833
+ }
834
+
835
+ svg {
836
+ width: 16px;
837
+ height: 16px;
838
+ }
839
+ `;
840
+ export const PageSizeSelect = styled.select `
841
+ padding: 6px 8px;
842
+ font-size: 13px;
843
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
844
+ border-radius: 4px;
845
+ background: ${({ $theme }) => $theme.backgroundColor};
846
+ color: ${({ $theme }) => $theme.textColor};
847
+ cursor: pointer;
848
+ outline: none;
849
+
850
+ &:focus {
851
+ border-color: ${({ $theme }) => $theme.accentColor};
852
+ }
853
+ `;
854
+ // ============================================================================
855
+ // Status Bar
856
+ // ============================================================================
857
+ export const StatusBar = styled.div `
858
+ display: flex;
859
+ align-items: center;
860
+ justify-content: space-between;
861
+ padding: 6px 16px;
862
+ background: ${({ $theme }) => $theme.headerBackgroundColor};
863
+ border-top: 1px solid ${({ $theme }) => $theme.borderColor};
864
+ font-size: 12px;
865
+ color: ${({ $theme }) => $theme.headerTextColor};
866
+ gap: 16px;
867
+ `;
868
+ export const StatusItem = styled.div `
869
+ display: flex;
870
+ align-items: center;
871
+ gap: 6px;
872
+
873
+ strong {
874
+ color: inherit;
875
+ }
876
+ `;
877
+ // ============================================================================
878
+ // Side Bar / Tool Panels
879
+ // ============================================================================
880
+ export const SideBar = styled.div `
881
+ width: ${({ $width }) => ($width ? `${$width}px` : '250px')};
882
+ min-width: 200px;
883
+ max-width: 400px;
884
+ background: ${({ $theme }) => $theme.backgroundColor};
885
+ border-${({ $position }) => ($position === 'left' ? 'right' : 'left')}: 1px solid ${({ $theme }) => $theme.borderColor};
886
+ display: flex;
887
+ flex-direction: column;
888
+ overflow: hidden;
889
+ `;
890
+ export const SideBarTabs = styled.div `
891
+ display: flex;
892
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor};
893
+ `;
894
+ export const SideBarTab = styled.button `
895
+ flex: 1;
896
+ padding: 10px 12px;
897
+ font-size: 12px;
898
+ font-weight: 500;
899
+ border: none;
900
+ background: ${({ $theme, $active }) => ($active ? $theme.backgroundColor : $theme.headerBackgroundColor)};
901
+ color: ${({ $theme, $active }) => ($active ? $theme.accentColor : $theme.headerTextColor)};
902
+ cursor: pointer;
903
+ transition: all 0.15s ease;
904
+ border-bottom: 2px solid ${({ $theme, $active }) => ($active ? $theme.accentColor : 'transparent')};
905
+
906
+ &:hover {
907
+ background: ${({ $theme }) => $theme.backgroundColor};
908
+ }
909
+ `;
910
+ export const SideBarContent = styled.div `
911
+ flex: 1;
912
+ overflow: auto;
913
+ padding: 12px;
914
+ `;
915
+ // ============================================================================
916
+ // Overlays
917
+ // ============================================================================
918
+ export const Overlay = styled.div `
919
+ position: absolute;
920
+ inset: 0;
921
+ display: flex;
922
+ align-items: center;
923
+ justify-content: center;
924
+ background: ${({ $theme }) => $theme.backgroundColor}e6;
925
+ z-index: 100;
926
+ animation: ${fadeIn} 0.2s ease;
927
+ `;
928
+ export const LoadingOverlay = styled(Overlay) `
929
+ flex-direction: column;
930
+ gap: 16px;
931
+ `;
932
+ export const Spinner = styled.div `
933
+ width: ${({ $size }) => ($size ? `${$size}px` : '40px')};
934
+ height: ${({ $size }) => ($size ? `${$size}px` : '40px')};
935
+ border: 3px solid ${({ $theme }) => $theme.borderColor};
936
+ border-top-color: ${({ $theme }) => $theme.accentColor};
937
+ border-radius: 50%;
938
+ animation: ${spin} 0.8s linear infinite;
939
+ `;
940
+ export const NoRowsOverlay = styled(Overlay) `
941
+ flex-direction: column;
942
+ gap: 12px;
943
+ color: ${({ $theme }) => $theme.headerTextColor};
944
+
945
+ svg {
946
+ width: 48px;
947
+ height: 48px;
948
+ opacity: 0.5;
949
+ }
950
+ `;
951
+ // ============================================================================
952
+ // Context Menu
953
+ // ============================================================================
954
+ export const ContextMenu = styled.div `
955
+ position: fixed;
956
+ top: ${({ $y }) => $y}px;
957
+ left: ${({ $x }) => $x}px;
958
+ min-width: 180px;
959
+ background: ${({ $theme }) => $theme.backgroundColor};
960
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
961
+ border-radius: 6px;
962
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
963
+ z-index: 1000;
964
+ overflow: hidden;
965
+ animation: ${slideInRight} 0.15s ease;
966
+ `;
967
+ export const ContextMenuItem = styled.div `
968
+ display: flex;
969
+ align-items: center;
970
+ gap: 10px;
971
+ padding: 8px 14px;
972
+ font-size: 13px;
973
+ cursor: ${({ $disabled }) => ($disabled ? 'not-allowed' : 'pointer')};
974
+ opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};
975
+ color: ${({ $danger, $theme }) => ($danger ? '#ef4444' : $theme.textColor)};
976
+ transition: background-color 0.1s ease;
977
+
978
+ &:hover {
979
+ background: ${({ $disabled, $theme }) => ($disabled ? 'transparent' : $theme.hoverRowBackgroundColor)};
980
+ }
981
+
982
+ svg {
983
+ width: 16px;
984
+ height: 16px;
985
+ opacity: 0.7;
986
+ }
987
+
988
+ span.shortcut {
989
+ margin-left: auto;
990
+ font-size: 11px;
991
+ opacity: 0.5;
992
+ }
993
+ `;
994
+ export const ContextMenuDivider = styled.div `
995
+ height: 1px;
996
+ background: ${({ $theme }) => $theme.borderColor};
997
+ margin: 4px 0;
998
+ `;
999
+ // ============================================================================
1000
+ // Column Menu
1001
+ // ============================================================================
1002
+ export const ColumnMenu = styled.div `
1003
+ position: absolute;
1004
+ top: 100%;
1005
+ right: 0;
1006
+ min-width: 200px;
1007
+ background: ${({ $theme }) => $theme.backgroundColor};
1008
+ border: 1px solid ${({ $theme }) => $theme.borderColor};
1009
+ border-radius: 6px;
1010
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1011
+ z-index: 100;
1012
+ overflow: hidden;
1013
+ animation: ${fadeIn} 0.15s ease;
1014
+ `;
1015
+ // ============================================================================
1016
+ // Mobile Card View
1017
+ // ============================================================================
1018
+ export const MobileCardContainer = styled.div `
1019
+ display: flex;
1020
+ flex-direction: column;
1021
+ gap: 12px;
1022
+ padding: 12px;
1023
+ `;
1024
+ export const MobileCard = styled.div `
1025
+ background: ${({ $theme }) => $theme.backgroundColor};
1026
+ border: 1px solid ${({ $theme, $selected }) => ($selected ? $theme.accentColor : $theme.borderColor)};
1027
+ border-radius: 8px;
1028
+ padding: 16px;
1029
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
1030
+ transition: all 0.15s ease;
1031
+
1032
+ ${({ $selected, $theme }) => $selected &&
1033
+ css `
1034
+ background: ${$theme.selectedRowBackgroundColor};
1035
+ `}
1036
+ `;
1037
+ export const MobileCardHeader = styled.div `
1038
+ display: flex;
1039
+ align-items: center;
1040
+ justify-content: space-between;
1041
+ margin-bottom: 12px;
1042
+ padding-bottom: 12px;
1043
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor};
1044
+ `;
1045
+ export const MobileCardRow = styled.div `
1046
+ display: flex;
1047
+ justify-content: space-between;
1048
+ padding: 6px 0;
1049
+ font-size: 13px;
1050
+
1051
+ &:not(:last-child) {
1052
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor}50;
1053
+ }
1054
+ `;
1055
+ export const MobileCardLabel = styled.span `
1056
+ color: ${({ $theme }) => $theme.headerTextColor};
1057
+ font-weight: 500;
1058
+ `;
1059
+ export const MobileCardValue = styled.span `
1060
+ color: ${({ $theme }) => $theme.textColor};
1061
+ text-align: right;
1062
+ `;
1063
+ // ============================================================================
1064
+ // Skeleton Loading
1065
+ // ============================================================================
1066
+ export const SkeletonRow = styled.tr `
1067
+ height: 42px;
1068
+ `;
1069
+ export const SkeletonCell = styled.td `
1070
+ padding: 8px 12px;
1071
+ border-bottom: 1px solid ${({ $theme }) => $theme.borderColor};
1072
+ border-right: 1px solid ${({ $theme }) => $theme.borderColor};
1073
+
1074
+ &:last-child {
1075
+ border-right: none;
1076
+ }
1077
+ `;
1078
+ export const SkeletonBlock = styled.div `
1079
+ height: 16px;
1080
+ width: ${({ $width }) => $width || '80%'};
1081
+ background: linear-gradient(
1082
+ 90deg,
1083
+ ${({ $theme }) => $theme.borderColor}40 25%,
1084
+ ${({ $theme }) => $theme.borderColor}80 50%,
1085
+ ${({ $theme }) => $theme.borderColor}40 75%
1086
+ );
1087
+ background-size: 200% 100%;
1088
+ animation: ${shimmer} 1.5s ease-in-out infinite;
1089
+ border-radius: 4px;
1090
+ `;
1091
+ // ============================================================================
1092
+ // Tooltip
1093
+ // ============================================================================
1094
+ export const TooltipContainer = styled.div `
1095
+ position: fixed;
1096
+ top: ${({ $y }) => $y}px;
1097
+ left: ${({ $x }) => $x}px;
1098
+ max-width: 300px;
1099
+ padding: 8px 12px;
1100
+ font-size: 12px;
1101
+ background: ${({ $theme }) => ($theme.textColor.includes('f0') ? '#333' : '#fff')};
1102
+ color: ${({ $theme }) => ($theme.textColor.includes('f0') ? '#fff' : '#333')};
1103
+ border-radius: 4px;
1104
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
1105
+ z-index: 1001;
1106
+ pointer-events: none;
1107
+ animation: ${fadeIn} 0.1s ease;
1108
+ `;
1109
+ // ============================================================================
1110
+ // Drag Ghost
1111
+ // ============================================================================
1112
+ export const DragGhost = styled.div `
1113
+ position: fixed;
1114
+ pointer-events: none;
1115
+ z-index: 10000;
1116
+ padding: 8px 16px;
1117
+ background: ${({ $theme }) => $theme.accentColor};
1118
+ color: #ffffff;
1119
+ font-size: 13px;
1120
+ font-weight: 500;
1121
+ border-radius: 6px;
1122
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
1123
+ opacity: ${({ $visible }) => ($visible ? 0.9 : 0)};
1124
+ transform: translate(-50%, -50%);
1125
+ transition: opacity 0.15s ease;
1126
+ `;
1127
+ // ============================================================================
1128
+ // Selection Info Bar
1129
+ // ============================================================================
1130
+ export const SelectionBar = styled.div `
1131
+ display: flex;
1132
+ align-items: center;
1133
+ justify-content: space-between;
1134
+ padding: 8px 16px;
1135
+ background: ${({ $theme }) => $theme.accentColor};
1136
+ color: #ffffff;
1137
+ font-size: 13px;
1138
+ font-weight: 500;
1139
+ transform: translateY(${({ $visible }) => ($visible ? '0' : '-100%')});
1140
+ opacity: ${({ $visible }) => ($visible ? 1 : 0)};
1141
+ transition: all 0.2s ease;
1142
+ position: absolute;
1143
+ top: 0;
1144
+ left: 0;
1145
+ right: 0;
1146
+ z-index: 50;
1147
+ `;
1148
+ export const SelectionActions = styled.div `
1149
+ display: flex;
1150
+ align-items: center;
1151
+ gap: 8px;
1152
+ `;
1153
+ // ============================================================================
1154
+ // Export all themes
1155
+ // ============================================================================
1156
+ export { themes };