react-restyle-components 0.4.47 → 0.4.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +3 -1
- package/lib/src/core-components/index.js +1 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/Accordion.js +15 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/AccordionContext.js +6 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/AccordionSection.js +39 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/Header.js +39 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.js +94 -57
- package/lib/src/core-components/src/components/Accordion/AccordionSection/hooks/useCurrentAccordionIndex.js +13 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/index.js +3 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/types.js +9 -1
- package/lib/src/core-components/src/components/Accordion/Collapsible/Collapsible2.component.js +249 -1
- package/lib/src/core-components/src/components/Action/types.js +8 -1
- package/lib/src/core-components/src/components/AlertBanner/AlertBanner.js +45 -1
- package/lib/src/core-components/src/components/AlertBanner/elements.js +120 -45
- package/lib/src/core-components/src/components/AlertBanner/index.js +2 -1
- package/lib/src/core-components/src/components/AlertBanner/types.js +10 -1
- 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.d.ts +3 -1
- 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 +466 -1
- 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
- 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
- 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
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +55 -1
- 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
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-group-by/auto-complete-group-by.component.js +115 -1
- package/lib/src/core-components/src/components/AutoComplete/autocomplete/autocomplete.js +442 -2
- package/lib/src/core-components/src/components/AutoComplete/index.js +8 -1
- package/lib/src/core-components/src/components/Avatar/Avatar.js +148 -14
- package/lib/src/core-components/src/components/Badge/Badge.js +25 -2
- package/lib/src/core-components/src/components/Badge/InnerBadge/Inline.js +25 -1
- package/lib/src/core-components/src/components/Badge/InnerBadge/InnerBadge.js +25 -1
- package/lib/src/core-components/src/components/Badge/InnerBadge/elements.js +78 -32
- package/lib/src/core-components/src/components/Badge/InnerBadge/index.js +1 -1
- package/lib/src/core-components/src/components/Badge/index.js +1 -1
- package/lib/src/core-components/src/components/Badge/types.js +5 -1
- package/lib/src/core-components/src/components/Breadcrumb/Breadcrumb.js +83 -1
- package/lib/src/core-components/src/components/Breadcrumb/elements.js +166 -94
- package/lib/src/core-components/src/components/Breadcrumb/index.js +3 -1
- package/lib/src/core-components/src/components/Breadcrumb/types.js +3 -1
- package/lib/src/core-components/src/components/Button/button.component.js +18 -1
- package/lib/src/core-components/src/components/Button/buttonGroup/buttonGroup.component.js +4 -1
- package/lib/src/core-components/src/components/Button/index.js +2 -1
- package/lib/src/core-components/src/components/Button/types.js +1 -1
- package/lib/src/core-components/src/components/Chip/Chip.js +64 -1
- package/lib/src/core-components/src/components/Chip/elements.js +148 -48
- package/lib/src/core-components/src/components/Chip/index.js +2 -1
- package/lib/src/core-components/src/components/Chip/types.js +4 -1
- package/lib/src/core-components/src/components/Divider/Divider.js +25 -1
- package/lib/src/core-components/src/components/Divider/elements.js +68 -31
- package/lib/src/core-components/src/components/Divider/index.js +2 -1
- package/lib/src/core-components/src/components/Divider/types.js +4 -1
- package/lib/src/core-components/src/components/DynamicGrid/DynamicGrid.js +147 -1
- package/lib/src/core-components/src/components/DynamicGrid/GridContainer.js +24 -17
- package/lib/src/core-components/src/components/DynamicGrid/elements.js +162 -100
- package/lib/src/core-components/src/components/DynamicGrid/index.js +3 -1
- package/lib/src/core-components/src/components/DynamicGrid/types.js +28 -1
- package/lib/src/core-components/src/components/DynamicGrid/utils.js +193 -1
- package/lib/src/core-components/src/components/FormField/FormField.js +103 -1
- package/lib/src/core-components/src/components/FormField/components/CheckboxGroupInput.js +37 -1
- package/lib/src/core-components/src/components/FormField/components/CheckboxInput.js +8 -1
- package/lib/src/core-components/src/components/FormField/components/CssMultilineInput.js +192 -1
- package/lib/src/core-components/src/components/FormField/components/DatePickerInput.js +99 -1
- package/lib/src/core-components/src/components/FormField/components/DropdownInput.js +70 -1
- package/lib/src/core-components/src/components/FormField/components/OtpInput.js +81 -1
- package/lib/src/core-components/src/components/FormField/components/PasswordInput.js +40 -1
- package/lib/src/core-components/src/components/FormField/components/PinInput.js +75 -1
- package/lib/src/core-components/src/components/FormField/components/RadioInput.js +54 -1
- package/lib/src/core-components/src/components/FormField/components/TextDropdownInput.js +94 -1
- package/lib/src/core-components/src/components/FormField/components/ToggleInput.js +36 -1
- package/lib/src/core-components/src/components/FormField/components/index.js +11 -1
- package/lib/src/core-components/src/components/FormField/css-properties.js +161 -1
- package/lib/src/core-components/src/components/FormField/index.js +2 -1
- package/lib/src/core-components/src/components/Icon/Icon.js +159 -1
- package/lib/src/core-components/src/components/Icon/index.js +2 -1
- package/lib/src/core-components/src/components/Icon/types.js +9 -1
- package/lib/src/core-components/src/components/Loader/loader.component.js +215 -2
- package/lib/src/core-components/src/components/Masonry/Masonry.js +73 -1
- package/lib/src/core-components/src/components/Masonry/elements.js +46 -29
- package/lib/src/core-components/src/components/Masonry/hooks.js +100 -1
- package/lib/src/core-components/src/components/Masonry/index.js +3 -1
- package/lib/src/core-components/src/components/Masonry/types.js +1 -1
- package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.js +116 -1
- package/lib/src/core-components/src/components/Modal/index.js +2 -1
- package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.js +147 -1
- package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.js +12 -1
- package/lib/src/core-components/src/components/Picker/color-picker-modal/color-picker-modal.component.js +40 -1
- package/lib/src/core-components/src/components/Picker/index.js +2 -1
- package/lib/src/core-components/src/components/Selection/index.js +4 -1
- package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.js +49 -1
- package/lib/src/core-components/src/components/Selection/multi-select-with-field/multi-select-with-field.component.js +58 -1
- package/lib/src/core-components/src/components/Selection/multi-selection-dropdown/multi-selection-dropdown.component.js +43 -1
- package/lib/src/core-components/src/components/Selection/single-select/single-select.component.js +87 -1
- package/lib/src/core-components/src/components/Skeleton/Skeleton.js +51 -1
- package/lib/src/core-components/src/components/Skeleton/elements.js +143 -54
- package/lib/src/core-components/src/components/Skeleton/index.js +2 -1
- package/lib/src/core-components/src/components/Skeleton/types.js +4 -1
- package/lib/src/core-components/src/components/SpeedDial/SpeedDial.js +128 -1
- package/lib/src/core-components/src/components/SpeedDial/elements.js +132 -62
- package/lib/src/core-components/src/components/SpeedDial/index.js +2 -1
- package/lib/src/core-components/src/components/SpeedDial/types.js +3 -1
- package/lib/src/core-components/src/components/Stepper2/stepper.component.js +139 -1
- package/lib/src/core-components/src/components/Switch/Switch.js +26 -1
- package/lib/src/core-components/src/components/Switch/elements.js +103 -34
- package/lib/src/core-components/src/components/Switch/index.js +2 -1
- package/lib/src/core-components/src/components/Switch/types.js +3 -1
- package/lib/src/core-components/src/components/Table/Table.js +1489 -1
- package/lib/src/core-components/src/components/Table/columnReorder.js +332 -36
- package/lib/src/core-components/src/components/Table/columnResize.js +284 -21
- package/lib/src/core-components/src/components/Table/elements.js +277 -173
- package/lib/src/core-components/src/components/Table/filters.js +555 -30
- package/lib/src/core-components/src/components/Table/hooks.js +536 -2
- package/lib/src/core-components/src/components/Table/index.js +6 -1
- package/lib/src/core-components/src/components/Table/types.js +1 -1
- package/lib/src/core-components/src/components/Tabs/tabs.component.js +22 -1
- package/lib/src/core-components/src/components/Tags1/Tags.component.js +118 -1
- package/lib/src/core-components/src/components/Tags1/types.js +20 -1
- package/lib/src/core-components/src/components/Timer1/timer.component.js +76 -1
- package/lib/src/core-components/src/components/Toast/Toast.js +50 -1
- package/lib/src/core-components/src/components/Toast/elements.js +122 -41
- package/lib/src/core-components/src/components/Toast/index.js +2 -1
- package/lib/src/core-components/src/components/Toast/types.js +9 -1
- package/lib/src/core-components/src/components/Tooltip/Tooltip.js +200 -1
- package/lib/src/core-components/src/components/Tooltip/elements.js +117 -55
- package/lib/src/core-components/src/components/Tooltip/index.js +2 -1
- package/lib/src/core-components/src/components/Tooltip/types.js +17 -1
- package/lib/src/core-components/src/components/Tooltip/utils.js +140 -1
- package/lib/src/core-components/src/components/TreeSelect/TreeSelect.js +303 -1
- package/lib/src/core-components/src/components/TreeSelect/elements.js +216 -117
- package/lib/src/core-components/src/components/TreeSelect/hooks.js +252 -1
- package/lib/src/core-components/src/components/TreeSelect/index.js +3 -1
- package/lib/src/core-components/src/components/TreeSelect/types.js +1 -1
- package/lib/src/core-components/src/components/ag-grid/AgGrid.js +1057 -1
- package/lib/src/core-components/src/components/ag-grid/elements.js +790 -396
- package/lib/src/core-components/src/components/ag-grid/hooks.js +1220 -4
- package/lib/src/core-components/src/components/ag-grid/index.js +15 -1
- package/lib/src/core-components/src/components/ag-grid/types.js +6 -1
- package/lib/src/core-components/src/components/index.js +31 -1
- package/lib/src/core-components/src/components/pdf/pdf-images.components.js +7 -1
- package/lib/src/core-components/src/components/pdf/pdf-table.components.js +48 -5
- package/lib/src/core-components/src/components/pdf/pdf-typography.components.js +70 -1
- package/lib/src/core-components/src/components/pdf/pdf-wrapped-view.components.js +50 -1
- package/lib/src/core-components/src/core-components/Avatar.js +33 -4
- package/lib/src/core-components/src/core-components/CoreButton/CoreButton.js +10 -1
- package/lib/src/core-components/src/core-components/CoreButton/elements.js +176 -67
- package/lib/src/core-components/src/core-components/CoreButton/index.js +3 -1
- package/lib/src/core-components/src/core-components/CoreButton/types.js +6 -1
- package/lib/src/core-components/src/core-components/CoreButton/utils.js +12 -1
- package/lib/src/core-components/src/core-components/Divider/Divider.js +19 -4
- package/lib/src/core-components/src/core-components/Divider/index.js +1 -1
- package/lib/src/core-components/src/core-components/SelectionCardStrip/index.js +1 -1
- package/lib/src/core-components/src/core-components/SelectionCardStrip/selectionCardStrip.js +33 -10
- package/lib/src/core-components/src/core-components/StateLayer.js +5 -3
- package/lib/src/core-components/src/core-components/ToggleCore/elements.js +50 -25
- package/lib/src/core-components/src/core-components/ToggleCore/index.js +2 -1
- package/lib/src/core-components/src/core-components/ToggleCore/toggleCore.js +14 -1
- package/lib/src/core-components/src/core-components/atoms/Input/Input.js +22 -1
- package/lib/src/core-components/src/core-components/atoms/Label/Label.js +21 -1
- package/lib/src/core-components/src/core-components/atoms/Textarea/Textarea.js +19 -1
- package/lib/src/core-components/src/core-components/index.js +3 -1
- package/lib/src/core-components/src/helpers/constants.js +11 -1
- package/lib/src/core-components/src/hooks/index.js +1 -1
- package/lib/src/core-components/src/hooks/outside.hook.js +28 -1
- package/lib/src/core-components/src/index.js +12 -1
- package/lib/src/core-components/src/tc.global.css +1 -0
- package/lib/src/core-components/src/tc.module.css +1 -1
- package/lib/src/core-components/src/utils/abstracts/breakpoints/index.js +28 -1
- package/lib/src/core-components/src/utils/abstracts/colors/index.js +49 -1
- package/lib/src/core-components/src/utils/abstracts/index.js +5 -1
- package/lib/src/core-components/src/utils/abstracts/space/index.js +26 -1
- package/lib/src/core-components/src/utils/abstracts/theme/ThemeBoundary.js +8 -1
- package/lib/src/core-components/src/utils/abstracts/theme/default-themes.js +30 -1
- package/lib/src/core-components/src/utils/abstracts/theme/index.js +3 -1
- package/lib/src/core-components/src/utils/abstracts/theme/theme.js +30 -1
- package/lib/src/core-components/src/utils/abstracts/theme/types.js +1 -1
- package/lib/src/core-components/src/utils/abstracts/theme/useTheme.js +17 -1
- package/lib/src/core-components/src/utils/abstracts/typography/index.js +25 -1
- package/lib/src/core-components/src/utils/context/DefaultsProvider.js +8 -1
- package/lib/src/core-components/src/utils/context/InternalProvider.js +24 -1
- package/lib/src/core-components/src/utils/context/index.js +2 -1
- package/lib/src/core-components/src/utils/designTokens.js +128 -1
- package/lib/src/core-components/src/utils/helpers/attachSubComponents.js +23 -1
- package/lib/src/core-components/src/utils/helpers/flattenChildren.js +11 -1
- package/lib/src/core-components/src/utils/helpers/getChildByType.js +3 -1
- package/lib/src/core-components/src/utils/helpers/index.js +5 -1
- package/lib/src/core-components/src/utils/helpers/isComponentType.js +16 -1
- package/lib/src/core-components/src/utils/helpers/separateChildrenByType.js +12 -1
- package/lib/src/core-components/src/utils/hooks/index.js +18 -1
- package/lib/src/core-components/src/utils/hooks/useClickOutside.js +18 -1
- package/lib/src/core-components/src/utils/hooks/useCombinedRefs.js +17 -1
- package/lib/src/core-components/src/utils/hooks/useDebouncedCallback.js +12 -1
- package/lib/src/core-components/src/utils/hooks/useDebouncedValue.js +20 -1
- package/lib/src/core-components/src/utils/hooks/useDeprecation.js +40 -1
- package/lib/src/core-components/src/utils/hooks/useDeviceDetect.js +10 -1
- package/lib/src/core-components/src/utils/hooks/useDeviceForm.js +24 -1
- package/lib/src/core-components/src/utils/hooks/useDisableBodyScroll.js +16 -1
- package/lib/src/core-components/src/utils/hooks/useHoverState.js +36 -1
- package/lib/src/core-components/src/utils/hooks/useId.js +7 -1
- package/lib/src/core-components/src/utils/hooks/useIsBrowser.js +11 -1
- package/lib/src/core-components/src/utils/hooks/useMediaQuery.js +16 -1
- package/lib/src/core-components/src/utils/hooks/useOverflow.js +22 -1
- package/lib/src/core-components/src/utils/hooks/useSafeLayoutEffect.js +5 -1
- package/lib/src/core-components/src/utils/hooks/useScrollingUp.js +18 -1
- package/lib/src/core-components/src/utils/hooks/useTrapFocus.js +30 -1
- package/lib/src/core-components/src/utils/hooks/useWindowDimensions.js +23 -1
- package/lib/src/core-components/src/utils/index.js +9 -1
- package/lib/src/core-components/src/utils/stories/Wrappers.js +23 -8
- package/lib/src/core-components/src/utils/stories/cleanProps.js +5 -1
- package/lib/src/core-components/src/utils/stories/index.js +4 -1
- package/lib/src/core-components/src/utils/stories/sleep.js +4 -1
- package/lib/src/core-components/src/utils/stories/view-ports.js +50 -1
- package/lib/src/core-components/src/utils/styling/calcWidthOfColumns.js +5 -1
- package/lib/src/core-components/src/utils/styling/createGridContainer.js +12 -6
- package/lib/src/core-components/src/utils/styling/createTransition.js +7 -2
- package/lib/src/core-components/src/utils/styling/forwardProps.js +10 -1
- package/lib/src/core-components/src/utils/styling/index.js +5 -1
- package/lib/src/core-components/src/utils/styling/pxToRem.js +6 -1
- package/lib/src/core-components/src/utils/testing/getComputedStyle.js +3 -1
- package/lib/src/core-components/src/utils/testing/index.js +1 -1
- package/lib/src/core-components/src/utils/utility.util.js +14 -1
- package/lib/src/core-components/tailwind.config.js +233 -1
- package/lib/src/core-hooks/index.js +3 -1
- package/lib/src/core-hooks/src/useClickOutside/useClickOutside.hook.js +46 -1
- package/lib/src/core-hooks/src/useDebounce/useDebounce.hook.js +30 -1
- package/lib/src/core-hooks/src/usePreventEKey/usePreventEKey.hook.js +8 -1
- package/lib/src/core-utils/index.js +7 -1
- package/lib/src/core-utils/src/calculation/calculation.util.js +89 -1
- package/lib/src/core-utils/src/colors/color.util.js +15 -1
- package/lib/src/core-utils/src/convert/numberToWords/numToWords.util.js +145 -1
- package/lib/src/core-utils/src/convert/typography/camelCaseToTitleCase.util.js +5 -1
- package/lib/src/core-utils/src/form-helper/form-helper.util.js +82 -1
- package/lib/src/core-utils/src/index.js +7 -1
- package/lib/src/core-utils/src/utility/utility.util.js +12 -1
- package/lib/src/core-utils/src/uuid/uuid.util.js +8 -1
- package/package.json +1 -1
|
@@ -1,38 +1,50 @@
|
|
|
1
|
-
|
|
1
|
+
import { styled, css, keyframes } from 'styled-components';
|
|
2
|
+
import { tokens } from '../../utils/designTokens';
|
|
3
|
+
// Animations
|
|
4
|
+
const shimmer = keyframes `
|
|
2
5
|
0% { background-position: -200% 0; }
|
|
3
6
|
100% { background-position: 200% 0; }
|
|
4
|
-
|
|
7
|
+
`;
|
|
8
|
+
const fadeIn = keyframes `
|
|
5
9
|
from { opacity: 0; }
|
|
6
10
|
to { opacity: 1; }
|
|
7
|
-
|
|
11
|
+
`;
|
|
12
|
+
const spin = keyframes `
|
|
8
13
|
from { transform: rotate(0deg); }
|
|
9
14
|
to { transform: rotate(360deg); }
|
|
10
|
-
|
|
15
|
+
`;
|
|
16
|
+
const pulse = keyframes `
|
|
11
17
|
0% { transform: scale(1); }
|
|
12
18
|
50% { transform: scale(1.1); }
|
|
13
19
|
100% { transform: scale(1); }
|
|
14
|
-
|
|
20
|
+
`;
|
|
21
|
+
const countUp = keyframes `
|
|
15
22
|
0% { transform: translateY(100%); opacity: 0; }
|
|
16
23
|
100% { transform: translateY(0); opacity: 1; }
|
|
17
|
-
|
|
24
|
+
`;
|
|
25
|
+
const countDown = keyframes `
|
|
18
26
|
0% { transform: translateY(-100%); opacity: 0; }
|
|
19
27
|
100% { transform: translateY(0); opacity: 1; }
|
|
20
|
-
|
|
28
|
+
`;
|
|
29
|
+
const slideIn = keyframes `
|
|
21
30
|
0% { transform: translateX(-20px); opacity: 0; }
|
|
22
31
|
100% { transform: translateX(0); opacity: 1; }
|
|
23
|
-
`;
|
|
32
|
+
`;
|
|
33
|
+
export const TableRoot = styled.div `
|
|
24
34
|
width: 100%;
|
|
25
35
|
font-family: inherit;
|
|
26
36
|
font-size: 14px;
|
|
27
|
-
color: ${
|
|
37
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
28
38
|
background: white;
|
|
29
39
|
border-radius: 8px;
|
|
30
40
|
overflow: hidden;
|
|
31
41
|
|
|
32
|
-
${({$bordered
|
|
33
|
-
|
|
42
|
+
${({ $bordered }) => $bordered &&
|
|
43
|
+
css `
|
|
44
|
+
border: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
34
45
|
`}
|
|
35
|
-
|
|
46
|
+
`;
|
|
47
|
+
export const Toolbar = styled.div `
|
|
36
48
|
display: flex;
|
|
37
49
|
flex-wrap: wrap;
|
|
38
50
|
align-items: center;
|
|
@@ -40,18 +52,20 @@
|
|
|
40
52
|
gap: 8px;
|
|
41
53
|
padding: 8px 12px;
|
|
42
54
|
background: white;
|
|
43
|
-
border-bottom: 1px solid ${
|
|
55
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
44
56
|
|
|
45
57
|
@media (max-width: 640px) {
|
|
46
58
|
flex-direction: column;
|
|
47
59
|
align-items: stretch;
|
|
48
60
|
}
|
|
49
|
-
|
|
61
|
+
`;
|
|
62
|
+
export const ToolbarGroup = styled.div `
|
|
50
63
|
display: flex;
|
|
51
64
|
align-items: center;
|
|
52
65
|
gap: 8px;
|
|
53
66
|
flex-wrap: wrap;
|
|
54
|
-
|
|
67
|
+
`;
|
|
68
|
+
export const SearchInput = styled.div `
|
|
55
69
|
position: relative;
|
|
56
70
|
display: flex;
|
|
57
71
|
align-items: center;
|
|
@@ -96,7 +110,8 @@
|
|
|
96
110
|
height: 14px;
|
|
97
111
|
color: #9ca3af;
|
|
98
112
|
}
|
|
99
|
-
|
|
113
|
+
`;
|
|
114
|
+
export const ToolbarButton = styled.button `
|
|
100
115
|
display: inline-flex;
|
|
101
116
|
align-items: center;
|
|
102
117
|
justify-content: center;
|
|
@@ -112,11 +127,11 @@
|
|
|
112
127
|
|
|
113
128
|
/* Default gray button style (matching existing TableBootstrap) */
|
|
114
129
|
color: white;
|
|
115
|
-
background: ${({$active
|
|
130
|
+
background: ${({ $active }) => $active ? tokens.primary || '#3b82f6' : '#6b7280'};
|
|
116
131
|
border: none;
|
|
117
132
|
|
|
118
133
|
&:hover:not(:disabled) {
|
|
119
|
-
background: ${({$active
|
|
134
|
+
background: ${({ $active }) => $active ? tokens.primary || '#2563eb' : '#5b6570'};
|
|
120
135
|
}
|
|
121
136
|
|
|
122
137
|
&:disabled {
|
|
@@ -128,14 +143,15 @@
|
|
|
128
143
|
width: 14px;
|
|
129
144
|
height: 14px;
|
|
130
145
|
}
|
|
131
|
-
|
|
146
|
+
`;
|
|
147
|
+
export const SelectionIndicator = styled.button `
|
|
132
148
|
display: inline-flex;
|
|
133
149
|
align-items: center;
|
|
134
150
|
gap: 8px;
|
|
135
151
|
padding: 8px 16px;
|
|
136
|
-
background: ${
|
|
152
|
+
background: ${tokens.primary || '#3b82f6'};
|
|
137
153
|
border-radius: 6px;
|
|
138
|
-
border: 2px solid ${
|
|
154
|
+
border: 2px solid ${tokens.primary || '#3b82f6'};
|
|
139
155
|
outline: none;
|
|
140
156
|
color: white;
|
|
141
157
|
font-weight: 600;
|
|
@@ -143,7 +159,7 @@
|
|
|
143
159
|
cursor: pointer;
|
|
144
160
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
145
161
|
transition: all 0.2s ease;
|
|
146
|
-
animation: ${
|
|
162
|
+
animation: ${slideIn} 0.3s ease-out;
|
|
147
163
|
|
|
148
164
|
&:hover {
|
|
149
165
|
border-color: white;
|
|
@@ -156,9 +172,10 @@
|
|
|
156
172
|
&:focus-visible {
|
|
157
173
|
border-color: white;
|
|
158
174
|
box-shadow: 0 0 0 3px
|
|
159
|
-
${
|
|
175
|
+
${tokens.primary ? `${tokens.primary}40` : 'rgba(59, 130, 246, 0.4)'};
|
|
160
176
|
}
|
|
161
|
-
|
|
177
|
+
`;
|
|
178
|
+
export const SelectionCount = styled.span `
|
|
162
179
|
display: inline-flex;
|
|
163
180
|
align-items: center;
|
|
164
181
|
justify-content: center;
|
|
@@ -172,18 +189,21 @@
|
|
|
172
189
|
font-size: 14px;
|
|
173
190
|
overflow: hidden;
|
|
174
191
|
|
|
175
|
-
${({$animate
|
|
192
|
+
${({ $animate }) => $animate === 'up' &&
|
|
193
|
+
css `
|
|
176
194
|
animation:
|
|
177
|
-
${
|
|
178
|
-
${
|
|
195
|
+
${countUp} 0.3s ease-out,
|
|
196
|
+
${pulse} 0.3s ease-out;
|
|
179
197
|
`}
|
|
180
198
|
|
|
181
|
-
${({$animate
|
|
199
|
+
${({ $animate }) => $animate === 'down' &&
|
|
200
|
+
css `
|
|
182
201
|
animation:
|
|
183
|
-
${
|
|
184
|
-
${
|
|
202
|
+
${countDown} 0.3s ease-out,
|
|
203
|
+
${pulse} 0.3s ease-out;
|
|
185
204
|
`}
|
|
186
|
-
|
|
205
|
+
`;
|
|
206
|
+
export const SelectionIcon = styled.span `
|
|
187
207
|
display: flex;
|
|
188
208
|
align-items: center;
|
|
189
209
|
justify-content: center;
|
|
@@ -194,82 +214,102 @@
|
|
|
194
214
|
width: 16px;
|
|
195
215
|
height: 16px;
|
|
196
216
|
}
|
|
197
|
-
|
|
217
|
+
`;
|
|
218
|
+
export const TableWrapper = styled.div `
|
|
198
219
|
width: 100%;
|
|
199
220
|
overflow-x: auto;
|
|
200
|
-
overflow-y: ${({$stickyHeader
|
|
201
|
-
${({$maxHeight
|
|
202
|
-
|
|
221
|
+
overflow-y: ${({ $stickyHeader }) => ($stickyHeader ? 'auto' : 'visible')};
|
|
222
|
+
${({ $maxHeight }) => $maxHeight &&
|
|
223
|
+
css `
|
|
224
|
+
max-height: ${typeof $maxHeight === 'number'
|
|
225
|
+
? `${$maxHeight}px`
|
|
226
|
+
: $maxHeight};
|
|
203
227
|
`}
|
|
204
|
-
|
|
228
|
+
`;
|
|
229
|
+
export const StyledTable = styled.table `
|
|
205
230
|
width: 100%;
|
|
206
231
|
border-collapse: collapse;
|
|
207
232
|
table-layout: auto;
|
|
208
233
|
|
|
209
|
-
${({$striped
|
|
234
|
+
${({ $striped }) => $striped &&
|
|
235
|
+
css `
|
|
210
236
|
tbody tr:nth-child(even) {
|
|
211
|
-
background: ${
|
|
212
|
-
color: ${
|
|
237
|
+
background: ${tokens.surface || '#f9fafb'};
|
|
238
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
213
239
|
}
|
|
214
240
|
`}
|
|
215
241
|
|
|
216
|
-
${({$hover
|
|
242
|
+
${({ $hover }) => $hover &&
|
|
243
|
+
css `
|
|
217
244
|
/* Hover effect - skip rows with custom selected style (data-custom-selected attribute) */
|
|
218
245
|
tbody tr:not([data-custom-selected='true']):hover {
|
|
219
246
|
background: #ececec !important;
|
|
220
|
-
color: ${
|
|
247
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
221
248
|
}
|
|
222
249
|
`}
|
|
223
|
-
|
|
224
|
-
|
|
250
|
+
`;
|
|
251
|
+
export const TableHeader = styled.thead `
|
|
252
|
+
${({ $sticky }) => $sticky &&
|
|
253
|
+
css `
|
|
225
254
|
position: sticky;
|
|
226
255
|
top: 0;
|
|
227
256
|
z-index: 10;
|
|
228
257
|
`}
|
|
229
|
-
|
|
258
|
+
`;
|
|
259
|
+
export const HeaderRow = styled.tr `
|
|
230
260
|
background: #6b7280;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
261
|
+
`;
|
|
262
|
+
export const HeaderCell = styled.th `
|
|
263
|
+
padding: ${({ $compact }) => ($compact ? '4px 6px' : '6px 8px')};
|
|
264
|
+
text-align: ${({ $align }) => $align};
|
|
234
265
|
vertical-align: middle;
|
|
235
266
|
user-select: none;
|
|
236
267
|
white-space: nowrap;
|
|
237
268
|
border-right: 1px solid rgba(255, 255, 255, 0.3);
|
|
238
269
|
|
|
239
270
|
/* Default styles - only applied when no custom class */
|
|
240
|
-
${({$customClass
|
|
271
|
+
${({ $customClass }) => !$customClass &&
|
|
272
|
+
css `
|
|
241
273
|
position: relative;
|
|
242
274
|
font-weight: 600;
|
|
243
275
|
font-size: 11px;
|
|
244
276
|
color: white;
|
|
245
277
|
background: #6b7280;
|
|
246
|
-
border-bottom: 1px solid ${
|
|
278
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
247
279
|
`}
|
|
248
280
|
|
|
249
|
-
${({$width
|
|
250
|
-
|
|
281
|
+
${({ $width }) => $width &&
|
|
282
|
+
css `
|
|
283
|
+
width: ${typeof $width === 'number' ? `${$width}px` : $width};
|
|
251
284
|
`}
|
|
252
285
|
|
|
253
|
-
${({$minWidth
|
|
254
|
-
|
|
286
|
+
${({ $minWidth }) => $minWidth &&
|
|
287
|
+
css `
|
|
288
|
+
min-width: ${typeof $minWidth === 'number'
|
|
289
|
+
? `${$minWidth}px`
|
|
290
|
+
: $minWidth};
|
|
255
291
|
`}
|
|
256
292
|
|
|
257
|
-
${({$pinned
|
|
293
|
+
${({ $pinned, $customClass }) => $pinned &&
|
|
294
|
+
!$customClass &&
|
|
295
|
+
css `
|
|
258
296
|
position: sticky;
|
|
259
|
-
${
|
|
297
|
+
${$pinned}: 0;
|
|
260
298
|
z-index: 11;
|
|
261
299
|
`}
|
|
262
300
|
|
|
263
301
|
/* Add left border separator when custom class is used (e.g., sticky action column) */
|
|
264
|
-
${({$customClass
|
|
302
|
+
${({ $customClass }) => $customClass &&
|
|
303
|
+
css `
|
|
265
304
|
border-left: 2px solid #d1d5db;
|
|
266
305
|
border-bottom: 2px solid #d1d5db;
|
|
267
306
|
`}
|
|
268
|
-
|
|
307
|
+
`;
|
|
308
|
+
export const SortIcon = styled.span `
|
|
269
309
|
display: inline-flex;
|
|
270
310
|
flex-direction: column;
|
|
271
311
|
gap: 1px;
|
|
272
|
-
opacity: ${({$active
|
|
312
|
+
opacity: ${({ $active }) => ($active ? 1 : 0.5)};
|
|
273
313
|
vertical-align: middle;
|
|
274
314
|
|
|
275
315
|
svg {
|
|
@@ -277,99 +317,119 @@
|
|
|
277
317
|
height: 8px;
|
|
278
318
|
|
|
279
319
|
&:first-child {
|
|
280
|
-
opacity: ${({$active
|
|
320
|
+
opacity: ${({ $active, $direction }) => $active && $direction === 'asc' ? 1 : 0.4};
|
|
281
321
|
}
|
|
282
322
|
|
|
283
323
|
&:last-child {
|
|
284
|
-
opacity: ${({$active
|
|
324
|
+
opacity: ${({ $active, $direction }) => $active && $direction === 'desc' ? 1 : 0.4};
|
|
285
325
|
}
|
|
286
326
|
}
|
|
287
|
-
|
|
327
|
+
`;
|
|
328
|
+
export const FilterRow = styled.tr `
|
|
288
329
|
background: #6b7280;
|
|
289
|
-
|
|
290
|
-
|
|
330
|
+
`;
|
|
331
|
+
export const FilterCell = styled.td `
|
|
332
|
+
padding: ${({ $compact }) => ($compact ? '2px 4px' : '4px 6px')};
|
|
291
333
|
vertical-align: middle;
|
|
292
|
-
border-bottom: 1px solid ${
|
|
293
|
-
|
|
334
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
335
|
+
`;
|
|
336
|
+
export const FilterInput = styled.input `
|
|
294
337
|
width: 100%;
|
|
295
338
|
height: 24px;
|
|
296
339
|
padding: 0 8px;
|
|
297
340
|
font-size: 11px;
|
|
298
|
-
border: 1px solid ${
|
|
341
|
+
border: 1px solid ${tokens.outline || '#e2e8f0'};
|
|
299
342
|
border-radius: 3px;
|
|
300
343
|
background: white;
|
|
301
344
|
transition: all 0.15s ease;
|
|
302
345
|
|
|
303
346
|
&:hover {
|
|
304
|
-
border-color: ${
|
|
347
|
+
border-color: ${tokens.primary || '#94a3b8'};
|
|
305
348
|
}
|
|
306
349
|
|
|
307
350
|
&:focus {
|
|
308
351
|
outline: none;
|
|
309
|
-
border-color: ${
|
|
352
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
310
353
|
}
|
|
311
354
|
|
|
312
355
|
&::placeholder {
|
|
313
|
-
color: ${
|
|
356
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}40` : '#9ca3af'};
|
|
314
357
|
}
|
|
315
|
-
|
|
358
|
+
`;
|
|
359
|
+
export const FilterSelect = styled.select `
|
|
316
360
|
width: 100%;
|
|
317
361
|
height: 28px;
|
|
318
362
|
padding: 0 8px;
|
|
319
363
|
font-size: 12px;
|
|
320
|
-
border: 1px solid ${
|
|
364
|
+
border: 1px solid ${tokens.outline || '#d1d5db'};
|
|
321
365
|
border-radius: 4px;
|
|
322
366
|
background: white;
|
|
323
367
|
cursor: pointer;
|
|
324
368
|
|
|
325
369
|
&:focus {
|
|
326
370
|
outline: none;
|
|
327
|
-
border-color: ${
|
|
371
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
328
372
|
}
|
|
329
|
-
|
|
373
|
+
`;
|
|
374
|
+
export const TableBody = styled.tbody ``;
|
|
375
|
+
export const TableRow = styled.tr `
|
|
330
376
|
transition: background 0.15s ease;
|
|
331
|
-
color: ${
|
|
377
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
332
378
|
background: white;
|
|
333
379
|
|
|
334
380
|
/* Hover effect - only apply when not selected with custom style */
|
|
335
|
-
${({$hasCustomSelectedStyle
|
|
381
|
+
${({ $hasCustomSelectedStyle }) => !$hasCustomSelectedStyle &&
|
|
382
|
+
css `
|
|
336
383
|
&:hover {
|
|
337
384
|
background: #ececec !important;
|
|
338
385
|
}
|
|
339
386
|
`}
|
|
340
387
|
|
|
341
388
|
/* Default selected styling - only when no custom style is provided */
|
|
342
|
-
${({$selected
|
|
343
|
-
|
|
344
|
-
|
|
389
|
+
${({ $selected, $hasCustomSelectedStyle }) => $selected &&
|
|
390
|
+
!$hasCustomSelectedStyle &&
|
|
391
|
+
css `
|
|
392
|
+
background: ${tokens.primary
|
|
393
|
+
? `${tokens.primary}10`
|
|
394
|
+
: '#fef3c7'} !important;
|
|
395
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
345
396
|
|
|
346
397
|
&:hover {
|
|
347
|
-
background: ${
|
|
398
|
+
background: ${tokens.primary
|
|
399
|
+
? `${tokens.primary}15`
|
|
400
|
+
: '#fde68a'} !important;
|
|
348
401
|
}
|
|
349
402
|
`}
|
|
350
403
|
|
|
351
|
-
${({$clickable
|
|
404
|
+
${({ $clickable, $disabled }) => $clickable &&
|
|
405
|
+
!$disabled &&
|
|
406
|
+
css `
|
|
352
407
|
cursor: pointer;
|
|
353
408
|
`}
|
|
354
409
|
|
|
355
|
-
${({$disabled
|
|
410
|
+
${({ $disabled }) => $disabled &&
|
|
411
|
+
css `
|
|
356
412
|
opacity: 0.5;
|
|
357
|
-
background: ${
|
|
358
|
-
color: ${
|
|
413
|
+
background: ${tokens.surface || '#e5e7eb'} !important;
|
|
414
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
359
415
|
cursor: not-allowed;
|
|
360
416
|
|
|
361
417
|
&:hover {
|
|
362
|
-
background: ${
|
|
418
|
+
background: ${tokens.surface || '#e5e7eb'} !important;
|
|
363
419
|
}
|
|
364
420
|
`}
|
|
365
|
-
|
|
421
|
+
`;
|
|
422
|
+
export const TableCellContent = styled.div.attrs({
|
|
423
|
+
className: 'tc-table-cell-content',
|
|
424
|
+
}) `
|
|
366
425
|
display: flex;
|
|
367
426
|
width: 100%;
|
|
368
427
|
min-width: 0;
|
|
369
428
|
align-items: stretch;
|
|
370
429
|
gap: 0;
|
|
371
430
|
|
|
372
|
-
${({$hasFormatter
|
|
431
|
+
${({ $hasFormatter }) => !$hasFormatter &&
|
|
432
|
+
css `
|
|
373
433
|
display: block;
|
|
374
434
|
`}
|
|
375
435
|
|
|
@@ -377,28 +437,33 @@
|
|
|
377
437
|
width: 100%;
|
|
378
438
|
min-width: 0;
|
|
379
439
|
}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
440
|
+
`;
|
|
441
|
+
export const TableCell = styled.td `
|
|
442
|
+
padding: ${({ $padding, $compact }) => $padding || ($compact ? '2px' : '2px')};
|
|
443
|
+
text-align: ${({ $align }) => $align};
|
|
383
444
|
border-bottom: 1px solid #d1d5db;
|
|
384
445
|
border-right: 1px solid #9ca3af;
|
|
385
446
|
vertical-align: middle;
|
|
386
447
|
font-size: 12px;
|
|
387
448
|
|
|
388
|
-
${({$hasCustomClass
|
|
389
|
-
|
|
449
|
+
${({ $hasCustomClass }) => !$hasCustomClass &&
|
|
450
|
+
css `
|
|
451
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
390
452
|
background: transparent;
|
|
391
453
|
`}
|
|
392
454
|
|
|
393
|
-
${({$pinned
|
|
455
|
+
${({ $pinned, $hasCustomClass }) => $pinned &&
|
|
456
|
+
!$hasCustomClass &&
|
|
457
|
+
css `
|
|
394
458
|
position: sticky;
|
|
395
|
-
${
|
|
459
|
+
${$pinned}: 0;
|
|
396
460
|
background: white;
|
|
397
461
|
z-index: 1;
|
|
398
462
|
`}
|
|
399
463
|
|
|
400
464
|
/* Add left border separator when custom class is used (e.g., sticky action column) */
|
|
401
|
-
${({$hasCustomClass
|
|
465
|
+
${({ $hasCustomClass }) => $hasCustomClass &&
|
|
466
|
+
css `
|
|
402
467
|
border-left: 2px solid #d1d5db;
|
|
403
468
|
`}
|
|
404
469
|
|
|
@@ -449,13 +514,17 @@
|
|
|
449
514
|
|
|
450
515
|
/* Disabled state - prevent clicks and show not-allowed cursor */
|
|
451
516
|
/* Only apply pointer-events: none if row is disabled AND column is NOT effectively editable */
|
|
452
|
-
${({$disabled
|
|
517
|
+
${({ $disabled, $isEditable }) => $disabled &&
|
|
518
|
+
!$isEditable &&
|
|
519
|
+
css `
|
|
453
520
|
cursor: not-allowed;
|
|
454
521
|
pointer-events: none;
|
|
455
522
|
`}
|
|
456
523
|
|
|
457
524
|
/* If row is disabled but column is effectively editable, ensure proper width and interaction */
|
|
458
|
-
${({$disabled
|
|
525
|
+
${({ $disabled, $isEditable }) => $disabled &&
|
|
526
|
+
$isEditable &&
|
|
527
|
+
css `
|
|
459
528
|
cursor: default;
|
|
460
529
|
pointer-events: auto !important;
|
|
461
530
|
opacity: 1 !important;
|
|
@@ -466,7 +535,9 @@
|
|
|
466
535
|
`}
|
|
467
536
|
|
|
468
537
|
/* Remove opacity for allowed columns when row is disabled and ensure proper width */
|
|
469
|
-
${({$disabled
|
|
538
|
+
${({ $disabled, $isInAllowedCells }) => $disabled &&
|
|
539
|
+
$isInAllowedCells &&
|
|
540
|
+
css `
|
|
470
541
|
opacity: 1 !important;
|
|
471
542
|
pointer-events: auto !important;
|
|
472
543
|
width: auto !important;
|
|
@@ -474,12 +545,14 @@
|
|
|
474
545
|
max-width: none !important;
|
|
475
546
|
box-sizing: border-box;
|
|
476
547
|
`}
|
|
477
|
-
|
|
548
|
+
`;
|
|
549
|
+
export const Checkbox = styled.input.attrs({ type: 'checkbox' }) `
|
|
478
550
|
width: 16px;
|
|
479
551
|
height: 16px;
|
|
480
552
|
cursor: pointer;
|
|
481
|
-
accent-color: ${
|
|
482
|
-
|
|
553
|
+
accent-color: ${tokens.primary || '#3b82f6'};
|
|
554
|
+
`;
|
|
555
|
+
export const ExpandButton = styled.button `
|
|
483
556
|
display: flex;
|
|
484
557
|
align-items: center;
|
|
485
558
|
justify-content: center;
|
|
@@ -493,30 +566,36 @@
|
|
|
493
566
|
transition: all 0.15s ease;
|
|
494
567
|
|
|
495
568
|
&:hover {
|
|
496
|
-
background: ${
|
|
569
|
+
background: ${tokens.surface || '#f3f4f6'};
|
|
497
570
|
}
|
|
498
571
|
|
|
499
572
|
svg {
|
|
500
573
|
width: 16px;
|
|
501
574
|
height: 16px;
|
|
502
|
-
color: ${
|
|
575
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}70` : '#6b7280'};
|
|
503
576
|
transition: transform 0.2s ease;
|
|
504
|
-
transform: ${({$expanded
|
|
577
|
+
transform: ${({ $expanded }) => ($expanded ? 'rotate(90deg)' : 'rotate(0)')};
|
|
505
578
|
}
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
579
|
+
`;
|
|
580
|
+
export const ExpandedRow = styled.tr `
|
|
581
|
+
animation: ${fadeIn} 0.2s ease;
|
|
582
|
+
`;
|
|
583
|
+
export const ExpandedCell = styled.td `
|
|
509
584
|
padding: 16px;
|
|
510
|
-
background: ${
|
|
511
|
-
border-bottom: 1px solid ${
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
585
|
+
background: ${tokens.surface || '#f9fafb'};
|
|
586
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
587
|
+
`;
|
|
588
|
+
export const TableFooter = styled.tfoot `
|
|
589
|
+
background: ${tokens.surface || '#f3f4f6'};
|
|
590
|
+
`;
|
|
591
|
+
export const FooterRow = styled.tr ``;
|
|
592
|
+
export const FooterCell = styled.td `
|
|
593
|
+
padding: ${({ $compact }) => ($compact ? '8px 12px' : '12px 16px')};
|
|
594
|
+
text-align: ${({ $align }) => $align};
|
|
517
595
|
font-weight: 600;
|
|
518
|
-
border-top: 2px solid ${
|
|
519
|
-
|
|
596
|
+
border-top: 2px solid ${tokens.outline || '#e5e7eb'};
|
|
597
|
+
`;
|
|
598
|
+
export const PaginationWrapper = styled.div `
|
|
520
599
|
display: flex;
|
|
521
600
|
flex-wrap: wrap;
|
|
522
601
|
align-items: center;
|
|
@@ -524,21 +603,24 @@
|
|
|
524
603
|
gap: 12px;
|
|
525
604
|
padding: 12px 16px;
|
|
526
605
|
background: #6b7280;
|
|
527
|
-
border-top: 1px solid ${
|
|
606
|
+
border-top: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
528
607
|
color: white;
|
|
529
608
|
|
|
530
609
|
@media (max-width: 640px) {
|
|
531
610
|
flex-direction: column;
|
|
532
611
|
align-items: stretch;
|
|
533
612
|
}
|
|
534
|
-
|
|
613
|
+
`;
|
|
614
|
+
export const PaginationInfo = styled.div `
|
|
535
615
|
font-size: 13px;
|
|
536
616
|
color: white;
|
|
537
|
-
|
|
617
|
+
`;
|
|
618
|
+
export const PaginationControls = styled.div `
|
|
538
619
|
display: flex;
|
|
539
620
|
align-items: center;
|
|
540
621
|
gap: 4px;
|
|
541
|
-
|
|
622
|
+
`;
|
|
623
|
+
export const PageButton = styled.button `
|
|
542
624
|
display: flex;
|
|
543
625
|
align-items: center;
|
|
544
626
|
justify-content: center;
|
|
@@ -546,17 +628,17 @@
|
|
|
546
628
|
height: 32px;
|
|
547
629
|
padding: 0 8px;
|
|
548
630
|
font-size: 13px;
|
|
549
|
-
font-weight: ${({$active
|
|
550
|
-
color: ${({$active
|
|
551
|
-
background: ${({$active
|
|
631
|
+
font-weight: ${({ $active }) => ($active ? 600 : 400)};
|
|
632
|
+
color: ${({ $active }) => ($active ? 'white' : 'white')};
|
|
633
|
+
background: ${({ $active }) => $active ? tokens.primary || '#3b82f6' : 'transparent'};
|
|
552
634
|
border: 1px solid
|
|
553
|
-
${({$active
|
|
635
|
+
${({ $active }) => ($active ? 'transparent' : 'rgba(255,255,255,0.3)')};
|
|
554
636
|
border-radius: 4px;
|
|
555
637
|
cursor: pointer;
|
|
556
638
|
transition: all 0.15s ease;
|
|
557
639
|
|
|
558
640
|
&:hover:not(:disabled) {
|
|
559
|
-
background: ${({$active
|
|
641
|
+
background: ${({ $active }) => $active ? tokens.primary || '#2563eb' : 'rgba(255,255,255,0.1)'};
|
|
560
642
|
}
|
|
561
643
|
|
|
562
644
|
&:disabled {
|
|
@@ -568,21 +650,23 @@
|
|
|
568
650
|
width: 16px;
|
|
569
651
|
height: 16px;
|
|
570
652
|
}
|
|
571
|
-
|
|
653
|
+
`;
|
|
654
|
+
export const PageSizeSelect = styled.select `
|
|
572
655
|
height: 32px;
|
|
573
656
|
padding: 0 24px 0 8px;
|
|
574
657
|
font-size: 13px;
|
|
575
658
|
color: #1f2937;
|
|
576
659
|
background: white;
|
|
577
|
-
border: 1px solid ${
|
|
660
|
+
border: 1px solid ${tokens.outline || '#d1d5db'};
|
|
578
661
|
border-radius: 4px;
|
|
579
662
|
cursor: pointer;
|
|
580
663
|
|
|
581
664
|
&:focus {
|
|
582
665
|
outline: none;
|
|
583
|
-
border-color: ${
|
|
666
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
584
667
|
}
|
|
585
|
-
|
|
668
|
+
`;
|
|
669
|
+
export const QuickJumper = styled.div `
|
|
586
670
|
display: flex;
|
|
587
671
|
align-items: center;
|
|
588
672
|
gap: 8px;
|
|
@@ -602,20 +686,21 @@
|
|
|
602
686
|
|
|
603
687
|
&:focus {
|
|
604
688
|
outline: none;
|
|
605
|
-
border-color: ${
|
|
689
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
606
690
|
}
|
|
607
691
|
|
|
608
692
|
&::placeholder {
|
|
609
693
|
color: rgba(255, 255, 255, 0.5);
|
|
610
694
|
}
|
|
611
695
|
}
|
|
612
|
-
|
|
696
|
+
`;
|
|
697
|
+
export const EmptyState = styled.div `
|
|
613
698
|
display: flex;
|
|
614
699
|
flex-direction: column;
|
|
615
700
|
align-items: center;
|
|
616
701
|
justify-content: center;
|
|
617
702
|
padding: 48px 24px;
|
|
618
|
-
color: ${
|
|
703
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}60` : '#6b7280'};
|
|
619
704
|
|
|
620
705
|
svg {
|
|
621
706
|
width: 48px;
|
|
@@ -627,7 +712,8 @@
|
|
|
627
712
|
span {
|
|
628
713
|
font-size: 14px;
|
|
629
714
|
}
|
|
630
|
-
|
|
715
|
+
`;
|
|
716
|
+
export const LoadingOverlay = styled.div `
|
|
631
717
|
position: absolute;
|
|
632
718
|
inset: 0;
|
|
633
719
|
display: flex;
|
|
@@ -635,18 +721,22 @@
|
|
|
635
721
|
justify-content: center;
|
|
636
722
|
background: rgba(255, 255, 255, 0.8);
|
|
637
723
|
z-index: 20;
|
|
638
|
-
|
|
724
|
+
`;
|
|
725
|
+
export const LoadingSpinner = styled.div `
|
|
639
726
|
width: 32px;
|
|
640
727
|
height: 32px;
|
|
641
|
-
border: 3px solid ${
|
|
642
|
-
border-top-color: ${
|
|
728
|
+
border: 3px solid ${tokens.outline || '#e5e7eb'};
|
|
729
|
+
border-top-color: ${tokens.primary || '#3b82f6'};
|
|
643
730
|
border-radius: 50%;
|
|
644
|
-
animation: ${
|
|
645
|
-
|
|
731
|
+
animation: ${spin} 0.8s linear infinite;
|
|
732
|
+
`;
|
|
733
|
+
export const EditableCell = styled.div `
|
|
646
734
|
position: relative;
|
|
647
735
|
min-height: 24px;
|
|
648
736
|
|
|
649
|
-
${({$editing
|
|
737
|
+
${({ $editing, $showEditIcon = false }) => !$editing &&
|
|
738
|
+
$showEditIcon &&
|
|
739
|
+
css `
|
|
650
740
|
&:hover::after {
|
|
651
741
|
content: '✏️';
|
|
652
742
|
position: absolute;
|
|
@@ -657,18 +747,20 @@
|
|
|
657
747
|
opacity: 0.5;
|
|
658
748
|
}
|
|
659
749
|
`}
|
|
660
|
-
|
|
750
|
+
`;
|
|
751
|
+
export const CellEditor = styled.input `
|
|
661
752
|
width: 100%;
|
|
662
753
|
padding: 4px 8px;
|
|
663
754
|
font-size: inherit;
|
|
664
|
-
border: 2px solid ${
|
|
755
|
+
border: 2px solid ${tokens.primary || '#3b82f6'};
|
|
665
756
|
border-radius: 4px;
|
|
666
757
|
background: white;
|
|
667
758
|
|
|
668
759
|
&:focus {
|
|
669
760
|
outline: none;
|
|
670
761
|
}
|
|
671
|
-
|
|
762
|
+
`;
|
|
763
|
+
export const ColumnTogglePanel = styled.div `
|
|
672
764
|
position: absolute;
|
|
673
765
|
top: 100%;
|
|
674
766
|
right: 0;
|
|
@@ -676,17 +768,18 @@
|
|
|
676
768
|
max-height: 400px;
|
|
677
769
|
overflow-y: auto;
|
|
678
770
|
background: white;
|
|
679
|
-
border: 1px solid ${
|
|
771
|
+
border: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
680
772
|
border-radius: 8px;
|
|
681
773
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
|
682
774
|
z-index: 100;
|
|
683
|
-
animation: ${
|
|
684
|
-
|
|
775
|
+
animation: ${fadeIn} 0.15s ease;
|
|
776
|
+
`;
|
|
777
|
+
export const ColumnToggleHeader = styled.div `
|
|
685
778
|
display: flex;
|
|
686
779
|
align-items: center;
|
|
687
780
|
justify-content: space-between;
|
|
688
781
|
padding: 12px 16px;
|
|
689
|
-
border-bottom: 1px solid ${
|
|
782
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
690
783
|
|
|
691
784
|
span {
|
|
692
785
|
font-weight: 600;
|
|
@@ -698,58 +791,63 @@
|
|
|
698
791
|
border: none;
|
|
699
792
|
background: none;
|
|
700
793
|
cursor: pointer;
|
|
701
|
-
color: ${
|
|
794
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}60` : '#6b7280'};
|
|
702
795
|
|
|
703
796
|
&:hover {
|
|
704
|
-
color: ${
|
|
797
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
705
798
|
}
|
|
706
799
|
}
|
|
707
|
-
|
|
800
|
+
`;
|
|
801
|
+
export const ColumnToggleSearch = styled.div `
|
|
708
802
|
padding: 8px 16px;
|
|
709
|
-
border-bottom: 1px solid ${
|
|
803
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
710
804
|
|
|
711
805
|
input {
|
|
712
806
|
width: 100%;
|
|
713
807
|
height: 32px;
|
|
714
808
|
padding: 0 12px;
|
|
715
809
|
font-size: 13px;
|
|
716
|
-
border: 1px solid ${
|
|
810
|
+
border: 1px solid ${tokens.outline || '#d1d5db'};
|
|
717
811
|
border-radius: 6px;
|
|
718
812
|
|
|
719
813
|
&:focus {
|
|
720
814
|
outline: none;
|
|
721
|
-
border-color: ${
|
|
815
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
722
816
|
}
|
|
723
817
|
}
|
|
724
|
-
|
|
818
|
+
`;
|
|
819
|
+
export const ColumnToggleList = styled.div `
|
|
725
820
|
padding: 8px 0;
|
|
726
821
|
max-height: 300px;
|
|
727
822
|
overflow-y: auto;
|
|
728
|
-
|
|
823
|
+
`;
|
|
824
|
+
export const ColumnToggleItem = styled.label `
|
|
729
825
|
display: flex;
|
|
730
826
|
align-items: center;
|
|
731
827
|
gap: 12px;
|
|
732
828
|
padding: 8px 16px;
|
|
733
|
-
cursor: ${({$reorderable
|
|
829
|
+
cursor: ${({ $reorderable }) => ($reorderable ? 'grab' : 'pointer')};
|
|
734
830
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
735
831
|
position: relative;
|
|
736
832
|
user-select: none;
|
|
737
833
|
|
|
738
834
|
&:hover {
|
|
739
|
-
background: ${
|
|
835
|
+
background: ${tokens.surface || '#f3f4f6'};
|
|
740
836
|
}
|
|
741
837
|
|
|
742
838
|
/* Dragging state */
|
|
743
|
-
${({$isDragging
|
|
839
|
+
${({ $isDragging }) => $isDragging &&
|
|
840
|
+
css `
|
|
744
841
|
opacity: 0.4;
|
|
745
842
|
transform: scale(0.98);
|
|
746
|
-
background: ${
|
|
843
|
+
background: ${tokens.primary || '#3b82f6'}10;
|
|
747
844
|
cursor: grabbing;
|
|
748
845
|
`}
|
|
749
846
|
|
|
750
847
|
/* Drag over state */
|
|
751
|
-
${({$isDragOver
|
|
752
|
-
|
|
848
|
+
${({ $isDragOver }) => $isDragOver &&
|
|
849
|
+
css `
|
|
850
|
+
background: ${tokens.primary || '#3b82f6'}15;
|
|
753
851
|
transform: translateY(2px);
|
|
754
852
|
|
|
755
853
|
&::before {
|
|
@@ -759,9 +857,9 @@
|
|
|
759
857
|
left: 8px;
|
|
760
858
|
right: 8px;
|
|
761
859
|
height: 2px;
|
|
762
|
-
background: ${
|
|
860
|
+
background: ${tokens.primary || '#3b82f6'};
|
|
763
861
|
border-radius: 1px;
|
|
764
|
-
animation: ${
|
|
862
|
+
animation: ${fadeIn} 0.15s ease;
|
|
765
863
|
}
|
|
766
864
|
`}
|
|
767
865
|
|
|
@@ -769,19 +867,21 @@
|
|
|
769
867
|
width: 16px;
|
|
770
868
|
height: 16px;
|
|
771
869
|
cursor: pointer;
|
|
772
|
-
accent-color: ${
|
|
870
|
+
accent-color: ${tokens.primary || '#3b82f6'};
|
|
773
871
|
flex-shrink: 0;
|
|
774
872
|
}
|
|
775
873
|
|
|
776
874
|
span {
|
|
777
875
|
font-size: 13px;
|
|
778
|
-
color: ${
|
|
876
|
+
color: ${tokens.onSurface || '#374151'};
|
|
779
877
|
flex: 1;
|
|
780
878
|
overflow: hidden;
|
|
781
879
|
text-overflow: ellipsis;
|
|
782
880
|
white-space: nowrap;
|
|
783
881
|
}
|
|
784
|
-
|
|
882
|
+
`;
|
|
883
|
+
// Drag handle icon for reorderable items
|
|
884
|
+
export const ColumnToggleDragHandle = styled.div `
|
|
785
885
|
display: flex;
|
|
786
886
|
align-items: center;
|
|
787
887
|
justify-content: center;
|
|
@@ -789,23 +889,24 @@
|
|
|
789
889
|
height: 20px;
|
|
790
890
|
margin-left: auto;
|
|
791
891
|
cursor: grab;
|
|
792
|
-
color: ${
|
|
892
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}40` : '#9ca3af'};
|
|
793
893
|
transition: all 0.2s ease;
|
|
794
894
|
flex-shrink: 0;
|
|
795
895
|
|
|
796
896
|
&:hover {
|
|
797
|
-
color: ${
|
|
897
|
+
color: ${tokens.primary || '#3b82f6'};
|
|
798
898
|
transform: scale(1.1);
|
|
799
899
|
}
|
|
800
900
|
|
|
801
901
|
&:active {
|
|
802
902
|
cursor: grabbing;
|
|
803
|
-
color: ${
|
|
903
|
+
color: ${tokens.primary || '#3b82f6'};
|
|
804
904
|
}
|
|
805
905
|
|
|
806
|
-
${({$isDragging
|
|
807
|
-
|
|
808
|
-
|
|
906
|
+
${({ $isDragging }) => $isDragging &&
|
|
907
|
+
css `
|
|
908
|
+
color: ${tokens.primary || '#3b82f6'};
|
|
909
|
+
animation: ${pulse} 0.6s ease-in-out infinite;
|
|
809
910
|
`}
|
|
810
911
|
|
|
811
912
|
/* Grip dots pattern */
|
|
@@ -814,7 +915,9 @@
|
|
|
814
915
|
font-size: 14px;
|
|
815
916
|
letter-spacing: -2px;
|
|
816
917
|
}
|
|
817
|
-
|
|
918
|
+
`;
|
|
919
|
+
// Animated list container
|
|
920
|
+
export const ColumnToggleListAnimated = styled.div `
|
|
818
921
|
padding: 8px 0;
|
|
819
922
|
max-height: 300px;
|
|
820
923
|
overflow-y: auto;
|
|
@@ -823,7 +926,8 @@
|
|
|
823
926
|
& > * {
|
|
824
927
|
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
825
928
|
}
|
|
826
|
-
|
|
929
|
+
`;
|
|
930
|
+
export const ResizeHandle = styled.div `
|
|
827
931
|
position: absolute;
|
|
828
932
|
right: 0;
|
|
829
933
|
top: 0;
|
|
@@ -833,6 +937,6 @@
|
|
|
833
937
|
background: transparent;
|
|
834
938
|
|
|
835
939
|
&:hover {
|
|
836
|
-
background: ${
|
|
940
|
+
background: ${tokens.primary || '#3b82f6'};
|
|
837
941
|
}
|
|
838
942
|
`;
|