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.
- 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.js +334 -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 +79 -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 +1357 -1
- package/lib/src/core-components/src/components/Table/columnReorder.d.ts +128 -0
- package/lib/src/core-components/src/components/Table/columnReorder.js +530 -0
- package/lib/src/core-components/src/components/Table/columnResize.d.ts +99 -0
- package/lib/src/core-components/src/components/Table/columnResize.js +399 -0
- package/lib/src/core-components/src/components/Table/elements.d.ts +9 -1
- package/lib/src/core-components/src/components/Table/elements.js +324 -155
- 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.d.ts +4 -0
- package/lib/src/core-components/src/components/Table/index.js +6 -1
- package/lib/src/core-components/src/components/Table/types.d.ts +58 -0
- 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.d.ts +11 -0
- package/lib/src/core-components/src/components/ag-grid/AgGrid.js +733 -0
- package/lib/src/core-components/src/components/ag-grid/elements.d.ts +246 -0
- package/lib/src/core-components/src/components/ag-grid/elements.js +1156 -0
- package/lib/src/core-components/src/components/ag-grid/hooks.d.ts +196 -0
- package/lib/src/core-components/src/components/ag-grid/hooks.js +943 -0
- package/lib/src/core-components/src/components/ag-grid/index.d.ts +9 -0
- package/lib/src/core-components/src/components/ag-grid/index.js +13 -0
- package/lib/src/core-components/src/components/ag-grid/types.d.ts +1367 -0
- package/lib/src/core-components/src/components/ag-grid/types.js +6 -0
- package/lib/src/core-components/src/components/index.d.ts +1 -0
- 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 +16 -3
- package/lib/src/core-components/src/tc.module.css +2 -2
- 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 +125 -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,120 +317,143 @@
|
|
|
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
|
|
|
360
416
|
&:hover {
|
|
361
|
-
background: ${
|
|
417
|
+
background: ${tokens.surface || '#e5e7eb'} !important;
|
|
362
418
|
}
|
|
363
419
|
`}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
420
|
+
`;
|
|
421
|
+
export const TableCell = styled.td `
|
|
422
|
+
padding: ${({ $padding, $compact }) => $padding || ($compact ? '2px' : '2px')};
|
|
423
|
+
text-align: ${({ $align }) => $align};
|
|
367
424
|
border-bottom: 1px solid #d1d5db;
|
|
368
425
|
border-right: 1px solid #9ca3af;
|
|
369
426
|
vertical-align: middle;
|
|
370
427
|
font-size: 12px;
|
|
371
428
|
|
|
372
|
-
${({$hasCustomClass
|
|
373
|
-
|
|
429
|
+
${({ $hasCustomClass }) => !$hasCustomClass &&
|
|
430
|
+
css `
|
|
431
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
374
432
|
background: transparent;
|
|
375
433
|
`}
|
|
376
434
|
|
|
377
|
-
${({$pinned
|
|
435
|
+
${({ $pinned, $hasCustomClass }) => $pinned &&
|
|
436
|
+
!$hasCustomClass &&
|
|
437
|
+
css `
|
|
378
438
|
position: sticky;
|
|
379
|
-
${
|
|
439
|
+
${$pinned}: 0;
|
|
380
440
|
background: white;
|
|
381
441
|
z-index: 1;
|
|
382
442
|
`}
|
|
383
443
|
|
|
384
444
|
/* Add left border separator when custom class is used (e.g., sticky action column) */
|
|
385
|
-
${({$hasCustomClass
|
|
445
|
+
${({ $hasCustomClass }) => $hasCustomClass &&
|
|
446
|
+
css `
|
|
386
447
|
border-left: 2px solid #d1d5db;
|
|
387
448
|
`}
|
|
388
|
-
|
|
449
|
+
`;
|
|
450
|
+
export const Checkbox = styled.input.attrs({ type: 'checkbox' }) `
|
|
389
451
|
width: 16px;
|
|
390
452
|
height: 16px;
|
|
391
453
|
cursor: pointer;
|
|
392
|
-
accent-color: ${
|
|
393
|
-
|
|
454
|
+
accent-color: ${tokens.primary || '#3b82f6'};
|
|
455
|
+
`;
|
|
456
|
+
export const ExpandButton = styled.button `
|
|
394
457
|
display: flex;
|
|
395
458
|
align-items: center;
|
|
396
459
|
justify-content: center;
|
|
@@ -404,30 +467,36 @@
|
|
|
404
467
|
transition: all 0.15s ease;
|
|
405
468
|
|
|
406
469
|
&:hover {
|
|
407
|
-
background: ${
|
|
470
|
+
background: ${tokens.surface || '#f3f4f6'};
|
|
408
471
|
}
|
|
409
472
|
|
|
410
473
|
svg {
|
|
411
474
|
width: 16px;
|
|
412
475
|
height: 16px;
|
|
413
|
-
color: ${
|
|
476
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}70` : '#6b7280'};
|
|
414
477
|
transition: transform 0.2s ease;
|
|
415
|
-
transform: ${({$expanded
|
|
478
|
+
transform: ${({ $expanded }) => ($expanded ? 'rotate(90deg)' : 'rotate(0)')};
|
|
416
479
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
480
|
+
`;
|
|
481
|
+
export const ExpandedRow = styled.tr `
|
|
482
|
+
animation: ${fadeIn} 0.2s ease;
|
|
483
|
+
`;
|
|
484
|
+
export const ExpandedCell = styled.td `
|
|
420
485
|
padding: 16px;
|
|
421
|
-
background: ${
|
|
422
|
-
border-bottom: 1px solid ${
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
486
|
+
background: ${tokens.surface || '#f9fafb'};
|
|
487
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
488
|
+
`;
|
|
489
|
+
export const TableFooter = styled.tfoot `
|
|
490
|
+
background: ${tokens.surface || '#f3f4f6'};
|
|
491
|
+
`;
|
|
492
|
+
export const FooterRow = styled.tr ``;
|
|
493
|
+
export const FooterCell = styled.td `
|
|
494
|
+
padding: ${({ $compact }) => ($compact ? '8px 12px' : '12px 16px')};
|
|
495
|
+
text-align: ${({ $align }) => $align};
|
|
428
496
|
font-weight: 600;
|
|
429
|
-
border-top: 2px solid ${
|
|
430
|
-
|
|
497
|
+
border-top: 2px solid ${tokens.outline || '#e5e7eb'};
|
|
498
|
+
`;
|
|
499
|
+
export const PaginationWrapper = styled.div `
|
|
431
500
|
display: flex;
|
|
432
501
|
flex-wrap: wrap;
|
|
433
502
|
align-items: center;
|
|
@@ -435,21 +504,24 @@
|
|
|
435
504
|
gap: 12px;
|
|
436
505
|
padding: 12px 16px;
|
|
437
506
|
background: #6b7280;
|
|
438
|
-
border-top: 1px solid ${
|
|
507
|
+
border-top: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
439
508
|
color: white;
|
|
440
509
|
|
|
441
510
|
@media (max-width: 640px) {
|
|
442
511
|
flex-direction: column;
|
|
443
512
|
align-items: stretch;
|
|
444
513
|
}
|
|
445
|
-
|
|
514
|
+
`;
|
|
515
|
+
export const PaginationInfo = styled.div `
|
|
446
516
|
font-size: 13px;
|
|
447
517
|
color: white;
|
|
448
|
-
|
|
518
|
+
`;
|
|
519
|
+
export const PaginationControls = styled.div `
|
|
449
520
|
display: flex;
|
|
450
521
|
align-items: center;
|
|
451
522
|
gap: 4px;
|
|
452
|
-
|
|
523
|
+
`;
|
|
524
|
+
export const PageButton = styled.button `
|
|
453
525
|
display: flex;
|
|
454
526
|
align-items: center;
|
|
455
527
|
justify-content: center;
|
|
@@ -457,17 +529,17 @@
|
|
|
457
529
|
height: 32px;
|
|
458
530
|
padding: 0 8px;
|
|
459
531
|
font-size: 13px;
|
|
460
|
-
font-weight: ${({$active
|
|
461
|
-
color: ${({$active
|
|
462
|
-
background: ${({$active
|
|
532
|
+
font-weight: ${({ $active }) => ($active ? 600 : 400)};
|
|
533
|
+
color: ${({ $active }) => ($active ? 'white' : 'white')};
|
|
534
|
+
background: ${({ $active }) => $active ? tokens.primary || '#3b82f6' : 'transparent'};
|
|
463
535
|
border: 1px solid
|
|
464
|
-
${({$active
|
|
536
|
+
${({ $active }) => ($active ? 'transparent' : 'rgba(255,255,255,0.3)')};
|
|
465
537
|
border-radius: 4px;
|
|
466
538
|
cursor: pointer;
|
|
467
539
|
transition: all 0.15s ease;
|
|
468
540
|
|
|
469
541
|
&:hover:not(:disabled) {
|
|
470
|
-
background: ${({$active
|
|
542
|
+
background: ${({ $active }) => $active ? tokens.primary || '#2563eb' : 'rgba(255,255,255,0.1)'};
|
|
471
543
|
}
|
|
472
544
|
|
|
473
545
|
&:disabled {
|
|
@@ -479,21 +551,23 @@
|
|
|
479
551
|
width: 16px;
|
|
480
552
|
height: 16px;
|
|
481
553
|
}
|
|
482
|
-
|
|
554
|
+
`;
|
|
555
|
+
export const PageSizeSelect = styled.select `
|
|
483
556
|
height: 32px;
|
|
484
557
|
padding: 0 24px 0 8px;
|
|
485
558
|
font-size: 13px;
|
|
486
559
|
color: #1f2937;
|
|
487
560
|
background: white;
|
|
488
|
-
border: 1px solid ${
|
|
561
|
+
border: 1px solid ${tokens.outline || '#d1d5db'};
|
|
489
562
|
border-radius: 4px;
|
|
490
563
|
cursor: pointer;
|
|
491
564
|
|
|
492
565
|
&:focus {
|
|
493
566
|
outline: none;
|
|
494
|
-
border-color: ${
|
|
567
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
495
568
|
}
|
|
496
|
-
|
|
569
|
+
`;
|
|
570
|
+
export const QuickJumper = styled.div `
|
|
497
571
|
display: flex;
|
|
498
572
|
align-items: center;
|
|
499
573
|
gap: 8px;
|
|
@@ -513,20 +587,21 @@
|
|
|
513
587
|
|
|
514
588
|
&:focus {
|
|
515
589
|
outline: none;
|
|
516
|
-
border-color: ${
|
|
590
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
517
591
|
}
|
|
518
592
|
|
|
519
593
|
&::placeholder {
|
|
520
594
|
color: rgba(255, 255, 255, 0.5);
|
|
521
595
|
}
|
|
522
596
|
}
|
|
523
|
-
|
|
597
|
+
`;
|
|
598
|
+
export const EmptyState = styled.div `
|
|
524
599
|
display: flex;
|
|
525
600
|
flex-direction: column;
|
|
526
601
|
align-items: center;
|
|
527
602
|
justify-content: center;
|
|
528
603
|
padding: 48px 24px;
|
|
529
|
-
color: ${
|
|
604
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}60` : '#6b7280'};
|
|
530
605
|
|
|
531
606
|
svg {
|
|
532
607
|
width: 48px;
|
|
@@ -538,7 +613,8 @@
|
|
|
538
613
|
span {
|
|
539
614
|
font-size: 14px;
|
|
540
615
|
}
|
|
541
|
-
|
|
616
|
+
`;
|
|
617
|
+
export const LoadingOverlay = styled.div `
|
|
542
618
|
position: absolute;
|
|
543
619
|
inset: 0;
|
|
544
620
|
display: flex;
|
|
@@ -546,18 +622,22 @@
|
|
|
546
622
|
justify-content: center;
|
|
547
623
|
background: rgba(255, 255, 255, 0.8);
|
|
548
624
|
z-index: 20;
|
|
549
|
-
|
|
625
|
+
`;
|
|
626
|
+
export const LoadingSpinner = styled.div `
|
|
550
627
|
width: 32px;
|
|
551
628
|
height: 32px;
|
|
552
|
-
border: 3px solid ${
|
|
553
|
-
border-top-color: ${
|
|
629
|
+
border: 3px solid ${tokens.outline || '#e5e7eb'};
|
|
630
|
+
border-top-color: ${tokens.primary || '#3b82f6'};
|
|
554
631
|
border-radius: 50%;
|
|
555
|
-
animation: ${
|
|
556
|
-
|
|
632
|
+
animation: ${spin} 0.8s linear infinite;
|
|
633
|
+
`;
|
|
634
|
+
export const EditableCell = styled.div `
|
|
557
635
|
position: relative;
|
|
558
636
|
min-height: 24px;
|
|
559
637
|
|
|
560
|
-
${({$editing
|
|
638
|
+
${({ $editing, $showEditIcon = false }) => !$editing &&
|
|
639
|
+
$showEditIcon &&
|
|
640
|
+
css `
|
|
561
641
|
&:hover::after {
|
|
562
642
|
content: '✏️';
|
|
563
643
|
position: absolute;
|
|
@@ -568,18 +648,20 @@
|
|
|
568
648
|
opacity: 0.5;
|
|
569
649
|
}
|
|
570
650
|
`}
|
|
571
|
-
|
|
651
|
+
`;
|
|
652
|
+
export const CellEditor = styled.input `
|
|
572
653
|
width: 100%;
|
|
573
654
|
padding: 4px 8px;
|
|
574
655
|
font-size: inherit;
|
|
575
|
-
border: 2px solid ${
|
|
656
|
+
border: 2px solid ${tokens.primary || '#3b82f6'};
|
|
576
657
|
border-radius: 4px;
|
|
577
658
|
background: white;
|
|
578
659
|
|
|
579
660
|
&:focus {
|
|
580
661
|
outline: none;
|
|
581
662
|
}
|
|
582
|
-
|
|
663
|
+
`;
|
|
664
|
+
export const ColumnTogglePanel = styled.div `
|
|
583
665
|
position: absolute;
|
|
584
666
|
top: 100%;
|
|
585
667
|
right: 0;
|
|
@@ -587,17 +669,18 @@
|
|
|
587
669
|
max-height: 400px;
|
|
588
670
|
overflow-y: auto;
|
|
589
671
|
background: white;
|
|
590
|
-
border: 1px solid ${
|
|
672
|
+
border: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
591
673
|
border-radius: 8px;
|
|
592
674
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
|
|
593
675
|
z-index: 100;
|
|
594
|
-
animation: ${
|
|
595
|
-
|
|
676
|
+
animation: ${fadeIn} 0.15s ease;
|
|
677
|
+
`;
|
|
678
|
+
export const ColumnToggleHeader = styled.div `
|
|
596
679
|
display: flex;
|
|
597
680
|
align-items: center;
|
|
598
681
|
justify-content: space-between;
|
|
599
682
|
padding: 12px 16px;
|
|
600
|
-
border-bottom: 1px solid ${
|
|
683
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
601
684
|
|
|
602
685
|
span {
|
|
603
686
|
font-weight: 600;
|
|
@@ -609,57 +692,143 @@
|
|
|
609
692
|
border: none;
|
|
610
693
|
background: none;
|
|
611
694
|
cursor: pointer;
|
|
612
|
-
color: ${
|
|
695
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}60` : '#6b7280'};
|
|
613
696
|
|
|
614
697
|
&:hover {
|
|
615
|
-
color: ${
|
|
698
|
+
color: ${tokens.onSurface || '#1f2937'};
|
|
616
699
|
}
|
|
617
700
|
}
|
|
618
|
-
|
|
701
|
+
`;
|
|
702
|
+
export const ColumnToggleSearch = styled.div `
|
|
619
703
|
padding: 8px 16px;
|
|
620
|
-
border-bottom: 1px solid ${
|
|
704
|
+
border-bottom: 1px solid ${tokens.outline || '#e5e7eb'};
|
|
621
705
|
|
|
622
706
|
input {
|
|
623
707
|
width: 100%;
|
|
624
708
|
height: 32px;
|
|
625
709
|
padding: 0 12px;
|
|
626
710
|
font-size: 13px;
|
|
627
|
-
border: 1px solid ${
|
|
711
|
+
border: 1px solid ${tokens.outline || '#d1d5db'};
|
|
628
712
|
border-radius: 6px;
|
|
629
713
|
|
|
630
714
|
&:focus {
|
|
631
715
|
outline: none;
|
|
632
|
-
border-color: ${
|
|
716
|
+
border-color: ${tokens.primary || '#3b82f6'};
|
|
633
717
|
}
|
|
634
718
|
}
|
|
635
|
-
|
|
719
|
+
`;
|
|
720
|
+
export const ColumnToggleList = styled.div `
|
|
636
721
|
padding: 8px 0;
|
|
637
722
|
max-height: 300px;
|
|
638
723
|
overflow-y: auto;
|
|
639
|
-
|
|
724
|
+
`;
|
|
725
|
+
export const ColumnToggleItem = styled.label `
|
|
640
726
|
display: flex;
|
|
641
727
|
align-items: center;
|
|
642
728
|
gap: 12px;
|
|
643
729
|
padding: 8px 16px;
|
|
644
|
-
cursor: pointer;
|
|
645
|
-
transition:
|
|
730
|
+
cursor: ${({ $reorderable }) => ($reorderable ? 'grab' : 'pointer')};
|
|
731
|
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
732
|
+
position: relative;
|
|
733
|
+
user-select: none;
|
|
646
734
|
|
|
647
735
|
&:hover {
|
|
648
|
-
background: ${
|
|
736
|
+
background: ${tokens.surface || '#f3f4f6'};
|
|
649
737
|
}
|
|
650
738
|
|
|
739
|
+
/* Dragging state */
|
|
740
|
+
${({ $isDragging }) => $isDragging &&
|
|
741
|
+
css `
|
|
742
|
+
opacity: 0.4;
|
|
743
|
+
transform: scale(0.98);
|
|
744
|
+
background: ${tokens.primary || '#3b82f6'}10;
|
|
745
|
+
cursor: grabbing;
|
|
746
|
+
`}
|
|
747
|
+
|
|
748
|
+
/* Drag over state */
|
|
749
|
+
${({ $isDragOver }) => $isDragOver &&
|
|
750
|
+
css `
|
|
751
|
+
background: ${tokens.primary || '#3b82f6'}15;
|
|
752
|
+
transform: translateY(2px);
|
|
753
|
+
|
|
754
|
+
&::before {
|
|
755
|
+
content: '';
|
|
756
|
+
position: absolute;
|
|
757
|
+
top: 0;
|
|
758
|
+
left: 8px;
|
|
759
|
+
right: 8px;
|
|
760
|
+
height: 2px;
|
|
761
|
+
background: ${tokens.primary || '#3b82f6'};
|
|
762
|
+
border-radius: 1px;
|
|
763
|
+
animation: ${fadeIn} 0.15s ease;
|
|
764
|
+
}
|
|
765
|
+
`}
|
|
766
|
+
|
|
651
767
|
input {
|
|
652
768
|
width: 16px;
|
|
653
769
|
height: 16px;
|
|
654
770
|
cursor: pointer;
|
|
655
|
-
accent-color: ${
|
|
771
|
+
accent-color: ${tokens.primary || '#3b82f6'};
|
|
772
|
+
flex-shrink: 0;
|
|
656
773
|
}
|
|
657
774
|
|
|
658
775
|
span {
|
|
659
776
|
font-size: 13px;
|
|
660
|
-
color: ${
|
|
777
|
+
color: ${tokens.onSurface || '#374151'};
|
|
778
|
+
flex: 1;
|
|
779
|
+
overflow: hidden;
|
|
780
|
+
text-overflow: ellipsis;
|
|
781
|
+
white-space: nowrap;
|
|
661
782
|
}
|
|
662
|
-
|
|
783
|
+
`;
|
|
784
|
+
// Drag handle icon for reorderable items
|
|
785
|
+
export const ColumnToggleDragHandle = styled.div `
|
|
786
|
+
display: flex;
|
|
787
|
+
align-items: center;
|
|
788
|
+
justify-content: center;
|
|
789
|
+
width: 20px;
|
|
790
|
+
height: 20px;
|
|
791
|
+
margin-left: auto;
|
|
792
|
+
cursor: grab;
|
|
793
|
+
color: ${tokens.onSurface ? `${tokens.onSurface}40` : '#9ca3af'};
|
|
794
|
+
transition: all 0.2s ease;
|
|
795
|
+
flex-shrink: 0;
|
|
796
|
+
|
|
797
|
+
&:hover {
|
|
798
|
+
color: ${tokens.primary || '#3b82f6'};
|
|
799
|
+
transform: scale(1.1);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
&:active {
|
|
803
|
+
cursor: grabbing;
|
|
804
|
+
color: ${tokens.primary || '#3b82f6'};
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
${({ $isDragging }) => $isDragging &&
|
|
808
|
+
css `
|
|
809
|
+
color: ${tokens.primary || '#3b82f6'};
|
|
810
|
+
animation: ${pulse} 0.6s ease-in-out infinite;
|
|
811
|
+
`}
|
|
812
|
+
|
|
813
|
+
/* Grip dots pattern */
|
|
814
|
+
&::before {
|
|
815
|
+
content: '⠿';
|
|
816
|
+
font-size: 14px;
|
|
817
|
+
letter-spacing: -2px;
|
|
818
|
+
}
|
|
819
|
+
`;
|
|
820
|
+
// Animated list container
|
|
821
|
+
export const ColumnToggleListAnimated = styled.div `
|
|
822
|
+
padding: 8px 0;
|
|
823
|
+
max-height: 300px;
|
|
824
|
+
overflow-y: auto;
|
|
825
|
+
|
|
826
|
+
/* Smooth reorder animation */
|
|
827
|
+
& > * {
|
|
828
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
829
|
+
}
|
|
830
|
+
`;
|
|
831
|
+
export const ResizeHandle = styled.div `
|
|
663
832
|
position: absolute;
|
|
664
833
|
right: 0;
|
|
665
834
|
top: 0;
|
|
@@ -669,6 +838,6 @@
|
|
|
669
838
|
background: transparent;
|
|
670
839
|
|
|
671
840
|
&:hover {
|
|
672
|
-
background: ${
|
|
841
|
+
background: ${tokens.primary || '#3b82f6'};
|
|
673
842
|
}
|
|
674
843
|
`;
|