@refraktor/core 0.0.4 → 0.0.5
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/build/components/progress-circle/progress-circle.d.ts.map +1 -1
- package/build/components/progress-circle/progress-circle.js +6 -6
- package/build/components/progress-circle/progress-circle.styles.d.ts +2 -7
- package/build/components/progress-circle/progress-circle.styles.d.ts.map +1 -1
- package/build/components/progress-circle/progress-circle.styles.js +2 -23
- package/build/components/progress-circle/progress-circle.types.d.ts +4 -3
- package/build/components/progress-circle/progress-circle.types.d.ts.map +1 -1
- package/build/components/slider/slider.d.ts.map +1 -1
- package/build/components/slider/slider.js +69 -20
- package/build/components/tooltip/tooltip.js +1 -1
- package/build/style.css +2 -2
- package/package.json +30 -3
- package/.turbo/turbo-build.log +0 -4
- package/refraktor-core-0.0.1-alpha.0.tgz +0 -0
- package/src/components/accordion/accordion-control/accordion-control.tsx +0 -156
- package/src/components/accordion/accordion-control/index.ts +0 -1
- package/src/components/accordion/accordion-item/accordion-item.tsx +0 -40
- package/src/components/accordion/accordion-item/index.ts +0 -1
- package/src/components/accordion/accordion-panel/accordion-panel.tsx +0 -58
- package/src/components/accordion/accordion-panel/index.ts +0 -1
- package/src/components/accordion/accordion.context.ts +0 -93
- package/src/components/accordion/accordion.styles.ts +0 -60
- package/src/components/accordion/accordion.test.tsx +0 -174
- package/src/components/accordion/accordion.tsx +0 -203
- package/src/components/accordion/accordion.types.ts +0 -126
- package/src/components/accordion/index.ts +0 -17
- package/src/components/avatar/avatar-group/avatar-group.tsx +0 -73
- package/src/components/avatar/avatar-group/index.ts +0 -1
- package/src/components/avatar/avatar.styles.ts +0 -11
- package/src/components/avatar/avatar.tsx +0 -142
- package/src/components/avatar/avatar.types.ts +0 -86
- package/src/components/avatar/index.ts +0 -8
- package/src/components/badge/badge.styles.ts +0 -21
- package/src/components/badge/badge.tsx +0 -62
- package/src/components/badge/badge.types.ts +0 -40
- package/src/components/badge/index.ts +0 -2
- package/src/components/breadcrumbs/breadcrumbs.styles.ts +0 -55
- package/src/components/breadcrumbs/breadcrumbs.test.tsx +0 -136
- package/src/components/breadcrumbs/breadcrumbs.tsx +0 -199
- package/src/components/breadcrumbs/breadcrumbs.types.ts +0 -78
- package/src/components/breadcrumbs/breadcrumbs.utils.ts +0 -70
- package/src/components/breadcrumbs/index.ts +0 -6
- package/src/components/button/button.styles.ts +0 -28
- package/src/components/button/button.test.tsx +0 -57
- package/src/components/button/button.tsx +0 -110
- package/src/components/button/button.types.ts +0 -69
- package/src/components/button/index.ts +0 -2
- package/src/components/checkbox/checkbox-group/checkbox-group.tsx +0 -93
- package/src/components/checkbox/checkbox-group/index.ts +0 -1
- package/src/components/checkbox/checkbox.context.ts +0 -14
- package/src/components/checkbox/checkbox.styles.ts +0 -49
- package/src/components/checkbox/checkbox.test.tsx +0 -80
- package/src/components/checkbox/checkbox.tsx +0 -192
- package/src/components/checkbox/checkbox.types.ts +0 -125
- package/src/components/checkbox/index.ts +0 -10
- package/src/components/chip/chip-group/chip-group.tsx +0 -107
- package/src/components/chip/chip-group/index.ts +0 -1
- package/src/components/chip/chip.context.ts +0 -15
- package/src/components/chip/chip.styles.ts +0 -36
- package/src/components/chip/chip.test.tsx +0 -197
- package/src/components/chip/chip.tsx +0 -208
- package/src/components/chip/chip.types.ts +0 -134
- package/src/components/chip/index.ts +0 -10
- package/src/components/color-swatch/color-swatch.styles.ts +0 -11
- package/src/components/color-swatch/color-swatch.test.tsx +0 -80
- package/src/components/color-swatch/color-swatch.tsx +0 -84
- package/src/components/color-swatch/color-swatch.types.ts +0 -46
- package/src/components/color-swatch/index.ts +0 -2
- package/src/components/drawer/drawer-body/drawer-body.tsx +0 -29
- package/src/components/drawer/drawer-body/index.ts +0 -1
- package/src/components/drawer/drawer-close/drawer-close.tsx +0 -43
- package/src/components/drawer/drawer-close/index.ts +0 -1
- package/src/components/drawer/drawer-content/drawer-content.tsx +0 -135
- package/src/components/drawer/drawer-content/index.ts +0 -1
- package/src/components/drawer/drawer-header/drawer-header.tsx +0 -40
- package/src/components/drawer/drawer-header/index.ts +0 -1
- package/src/components/drawer/drawer-overlay/drawer-overlay.tsx +0 -87
- package/src/components/drawer/drawer-overlay/index.ts +0 -1
- package/src/components/drawer/drawer-root/drawer-root.tsx +0 -93
- package/src/components/drawer/drawer-root/index.ts +0 -1
- package/src/components/drawer/drawer.context.ts +0 -26
- package/src/components/drawer/drawer.styles.ts +0 -32
- package/src/components/drawer/drawer.test.tsx +0 -274
- package/src/components/drawer/drawer.tsx +0 -58
- package/src/components/drawer/drawer.types.ts +0 -192
- package/src/components/drawer/index.ts +0 -18
- package/src/components/drawer/use-drawer.ts +0 -94
- package/src/components/file-input/file-input.test.tsx +0 -134
- package/src/components/file-input/file-input.tsx +0 -224
- package/src/components/file-input/file-input.types.ts +0 -78
- package/src/components/file-input/file-input.utils.test.ts +0 -36
- package/src/components/file-input/file-input.utils.ts +0 -130
- package/src/components/file-input/index.ts +0 -2
- package/src/components/for/for.test.tsx +0 -66
- package/src/components/for/for.tsx +0 -53
- package/src/components/for/for.types.ts +0 -40
- package/src/components/for/index.ts +0 -2
- package/src/components/index.ts +0 -35
- package/src/components/input/index.ts +0 -2
- package/src/components/input/input-description/index.ts +0 -2
- package/src/components/input/input-description/input-description.tsx +0 -36
- package/src/components/input/input-error/index.ts +0 -2
- package/src/components/input/input-error/input-error.tsx +0 -36
- package/src/components/input/input-field/index.ts +0 -1
- package/src/components/input/input-field/input-field.styles.ts +0 -23
- package/src/components/input/input-field/input-field.tsx +0 -94
- package/src/components/input/input-label/index.ts +0 -2
- package/src/components/input/input-label/input-label.tsx +0 -47
- package/src/components/input/input-wrapper/index.ts +0 -2
- package/src/components/input/input-wrapper/input-wrapper.tsx +0 -43
- package/src/components/input/input.tsx +0 -71
- package/src/components/input/input.types.ts +0 -111
- package/src/components/loader/index.ts +0 -2
- package/src/components/loader/loader.tsx +0 -89
- package/src/components/loader/loader.types.ts +0 -33
- package/src/components/menu/index.ts +0 -24
- package/src/components/menu/menu-dropdown/index.ts +0 -1
- package/src/components/menu/menu-dropdown/menu-dropdown.tsx +0 -220
- package/src/components/menu/menu-item/index.ts +0 -1
- package/src/components/menu/menu-item/menu-item.tsx +0 -126
- package/src/components/menu/menu-label/index.ts +0 -1
- package/src/components/menu/menu-label/menu-label.tsx +0 -30
- package/src/components/menu/menu-separator/index.ts +0 -1
- package/src/components/menu/menu-separator/menu-separator.tsx +0 -28
- package/src/components/menu/menu-sub/index.ts +0 -1
- package/src/components/menu/menu-sub/menu-sub.tsx +0 -117
- package/src/components/menu/menu-sub-dropdown/index.ts +0 -1
- package/src/components/menu/menu-sub-dropdown/menu-sub-dropdown.tsx +0 -221
- package/src/components/menu/menu-sub-trigger/index.ts +0 -1
- package/src/components/menu/menu-sub-trigger/menu-sub-trigger.tsx +0 -164
- package/src/components/menu/menu-trigger/index.ts +0 -1
- package/src/components/menu/menu-trigger/menu-trigger.tsx +0 -98
- package/src/components/menu/menu.context.ts +0 -162
- package/src/components/menu/menu.test.tsx +0 -136
- package/src/components/menu/menu.tsx +0 -133
- package/src/components/menu/menu.types.ts +0 -291
- package/src/components/menu/use-menu.ts +0 -204
- package/src/components/modal/index.ts +0 -18
- package/src/components/modal/modal-body/index.ts +0 -1
- package/src/components/modal/modal-body/modal-body.tsx +0 -29
- package/src/components/modal/modal-close/index.ts +0 -1
- package/src/components/modal/modal-close/modal-close.tsx +0 -43
- package/src/components/modal/modal-content/index.ts +0 -1
- package/src/components/modal/modal-content/modal-content.tsx +0 -119
- package/src/components/modal/modal-header/index.ts +0 -1
- package/src/components/modal/modal-header/modal-header.tsx +0 -40
- package/src/components/modal/modal-overlay/index.ts +0 -1
- package/src/components/modal/modal-overlay/modal-overlay.tsx +0 -87
- package/src/components/modal/modal-root/index.ts +0 -1
- package/src/components/modal/modal-root/modal-root.tsx +0 -93
- package/src/components/modal/modal.context.ts +0 -26
- package/src/components/modal/modal.test.tsx +0 -316
- package/src/components/modal/modal.tsx +0 -58
- package/src/components/modal/modal.types.ts +0 -189
- package/src/components/modal/use-modal.ts +0 -94
- package/src/components/number-input/index.ts +0 -2
- package/src/components/number-input/number-input.styles.ts +0 -37
- package/src/components/number-input/number-input.test.tsx +0 -22
- package/src/components/number-input/number-input.tsx +0 -381
- package/src/components/number-input/number-input.types.ts +0 -58
- package/src/components/pagination/index.ts +0 -7
- package/src/components/pagination/pagination.styles.ts +0 -84
- package/src/components/pagination/pagination.test.tsx +0 -117
- package/src/components/pagination/pagination.tsx +0 -371
- package/src/components/pagination/pagination.types.ts +0 -95
- package/src/components/pagination/pagination.utils.ts +0 -88
- package/src/components/password-input/index.ts +0 -2
- package/src/components/password-input/password-input.test.tsx +0 -72
- package/src/components/password-input/password-input.tsx +0 -85
- package/src/components/password-input/password-input.types.ts +0 -30
- package/src/components/pin-input/index.ts +0 -2
- package/src/components/pin-input/pin-input.test.tsx +0 -149
- package/src/components/pin-input/pin-input.tsx +0 -473
- package/src/components/pin-input/pin-input.types.ts +0 -78
- package/src/components/popover/index.ts +0 -12
- package/src/components/popover/popover-dropdown/index.ts +0 -1
- package/src/components/popover/popover-dropdown/popover-dropdown.tsx +0 -94
- package/src/components/popover/popover-trigger/index.ts +0 -1
- package/src/components/popover/popover-trigger/popover-trigger.tsx +0 -49
- package/src/components/popover/popover.context.ts +0 -20
- package/src/components/popover/popover.tsx +0 -113
- package/src/components/popover/popover.types.ts +0 -137
- package/src/components/popover/use-popover.ts +0 -219
- package/src/components/portal/index.ts +0 -2
- package/src/components/portal/portal.test.tsx +0 -39
- package/src/components/portal/portal.tsx +0 -104
- package/src/components/portal/portal.types.ts +0 -31
- package/src/components/progress/index.ts +0 -2
- package/src/components/progress/progress.styles.ts +0 -25
- package/src/components/progress/progress.test.tsx +0 -107
- package/src/components/progress/progress.tsx +0 -93
- package/src/components/progress/progress.types.ts +0 -52
- package/src/components/progress-circle/index.ts +0 -5
- package/src/components/progress-circle/progress-circle.styles.ts +0 -31
- package/src/components/progress-circle/progress-circle.test.tsx +0 -140
- package/src/components/progress-circle/progress-circle.tsx +0 -124
- package/src/components/progress-circle/progress-circle.types.ts +0 -52
- package/src/components/radio/index.ts +0 -10
- package/src/components/radio/radio-group/index.ts +0 -1
- package/src/components/radio/radio-group/radio-group.tsx +0 -89
- package/src/components/radio/radio.context.ts +0 -14
- package/src/components/radio/radio.styles.ts +0 -49
- package/src/components/radio/radio.test.tsx +0 -75
- package/src/components/radio/radio.tsx +0 -173
- package/src/components/radio/radio.types.ts +0 -126
- package/src/components/scroll-area/index.ts +0 -6
- package/src/components/scroll-area/scroll-area.test.tsx +0 -72
- package/src/components/scroll-area/scroll-area.tsx +0 -70
- package/src/components/scroll-area/scroll-area.types.ts +0 -37
- package/src/components/segmented-control/index.ts +0 -6
- package/src/components/segmented-control/segmented-control.styles.ts +0 -37
- package/src/components/segmented-control/segmented-control.test.tsx +0 -170
- package/src/components/segmented-control/segmented-control.tsx +0 -255
- package/src/components/segmented-control/segmented-control.types.ts +0 -78
- package/src/components/select/index.ts +0 -20
- package/src/components/select/select-dropdown/index.ts +0 -1
- package/src/components/select/select-dropdown/select-dropdown.tsx +0 -299
- package/src/components/select/select-group/index.ts +0 -1
- package/src/components/select/select-group/select-group.tsx +0 -47
- package/src/components/select/select-item/index.ts +0 -1
- package/src/components/select/select-item/select-item.tsx +0 -157
- package/src/components/select/select-root/index.ts +0 -1
- package/src/components/select/select-root/select-root.tsx +0 -333
- package/src/components/select/select-trigger/index.ts +0 -1
- package/src/components/select/select-trigger/select-trigger.tsx +0 -123
- package/src/components/select/select.context.ts +0 -140
- package/src/components/select/select.test.tsx +0 -190
- package/src/components/select/select.tsx +0 -82
- package/src/components/select/select.types.ts +0 -272
- package/src/components/select/use-select.ts +0 -170
- package/src/components/slider/index.ts +0 -7
- package/src/components/slider/slider.styles.ts +0 -37
- package/src/components/slider/slider.tsx +0 -275
- package/src/components/slider/slider.types.ts +0 -82
- package/src/components/switch/index.ts +0 -2
- package/src/components/switch/switch.styles.ts +0 -31
- package/src/components/switch/switch.tsx +0 -132
- package/src/components/switch/switch.types.ts +0 -62
- package/src/components/table/index.ts +0 -24
- package/src/components/table/table-body/index.ts +0 -1
- package/src/components/table/table-body/table-body.tsx +0 -37
- package/src/components/table/table-caption/index.ts +0 -1
- package/src/components/table/table-caption/table-caption.tsx +0 -32
- package/src/components/table/table-cell/index.ts +0 -1
- package/src/components/table/table-cell/table-cell.tsx +0 -33
- package/src/components/table/table-head/index.ts +0 -1
- package/src/components/table/table-head/table-head.tsx +0 -29
- package/src/components/table/table-header-cell/index.ts +0 -1
- package/src/components/table/table-header-cell/table-header-cell.tsx +0 -33
- package/src/components/table/table-row/index.ts +0 -1
- package/src/components/table/table-row/table-row.tsx +0 -30
- package/src/components/table/table.context.ts +0 -18
- package/src/components/table/table.styles.ts +0 -62
- package/src/components/table/table.test.tsx +0 -145
- package/src/components/table/table.tsx +0 -91
- package/src/components/table/table.types.ts +0 -145
- package/src/components/tabs/index.ts +0 -18
- package/src/components/tabs/tabs-list/index.ts +0 -1
- package/src/components/tabs/tabs-list/tabs-list.tsx +0 -42
- package/src/components/tabs/tabs-panel/index.ts +0 -1
- package/src/components/tabs/tabs-panel/tabs-panel.tsx +0 -58
- package/src/components/tabs/tabs-tab/index.ts +0 -1
- package/src/components/tabs/tabs-tab/tabs-tab.tsx +0 -210
- package/src/components/tabs/tabs.context.ts +0 -88
- package/src/components/tabs/tabs.styles.ts +0 -92
- package/src/components/tabs/tabs.test.tsx +0 -167
- package/src/components/tabs/tabs.tsx +0 -137
- package/src/components/tabs/tabs.types.ts +0 -128
- package/src/components/textarea/index.ts +0 -2
- package/src/components/textarea/textarea-field/index.ts +0 -1
- package/src/components/textarea/textarea-field/textarea-field.styles.ts +0 -34
- package/src/components/textarea/textarea-field/textarea-field.tsx +0 -96
- package/src/components/textarea/textarea.tsx +0 -64
- package/src/components/textarea/textarea.types.ts +0 -80
- package/src/components/timeline/index.ts +0 -11
- package/src/components/timeline/timeline-item/index.ts +0 -1
- package/src/components/timeline/timeline-item/timeline-item.tsx +0 -158
- package/src/components/timeline/timeline.context.ts +0 -21
- package/src/components/timeline/timeline.styles.ts +0 -135
- package/src/components/timeline/timeline.test.tsx +0 -150
- package/src/components/timeline/timeline.tsx +0 -124
- package/src/components/timeline/timeline.types.ts +0 -91
- package/src/components/tooltip/index.ts +0 -8
- package/src/components/tooltip/tooltip.tsx +0 -164
- package/src/components/tooltip/tooltip.types.ts +0 -104
- package/src/components/tooltip/use-tooltip.ts +0 -200
- package/src/components/transition/index.ts +0 -11
- package/src/components/transition/transition.test.tsx +0 -126
- package/src/components/transition/transition.tsx +0 -441
- package/src/components/transition/transition.types.ts +0 -97
- package/src/components/transition/transitions.ts +0 -140
- package/src/icons/check.tsx +0 -25
- package/src/icons/chevron.tsx +0 -46
- package/src/icons/eye-off.tsx +0 -30
- package/src/icons/eye.tsx +0 -24
- package/src/icons/index.ts +0 -7
- package/src/icons/minus.tsx +0 -24
- package/src/icons/types.ts +0 -9
- package/src/icons/user.tsx +0 -18
- package/src/icons/x.tsx +0 -35
- package/src/index.ts +0 -5
- package/src/style.css +0 -334
- package/src/theme/ThemeProvider/ThemeProvider.tsx +0 -111
- package/src/theme/ThemeProvider/context.ts +0 -7
- package/src/theme/ThemeProvider/generateVariables.test.ts +0 -49
- package/src/theme/ThemeProvider/generateVariables.ts +0 -124
- package/src/theme/ThemeProvider/index.ts +0 -3
- package/src/theme/ThemeProvider/types.ts +0 -37
- package/src/theme/createTheme/createTheme.ts +0 -41
- package/src/theme/createTheme/index.ts +0 -7
- package/src/theme/createTheme/types.ts +0 -62
- package/src/theme/defaults/colors.ts +0 -203
- package/src/theme/defaults/settings.ts +0 -8
- package/src/theme/index.ts +0 -4
- package/src/theme/types.ts +0 -31
- package/src/theme/utils/get-radius.ts +0 -23
- package/src/theme/utils/get-shade.ts +0 -16
- package/src/theme/utils/index.ts +0 -3
- package/src/theme/utils/use-theme.ts +0 -27
- package/src/utils/configs/create-config.ts +0 -15
- package/src/utils/configs/index.ts +0 -3
- package/src/utils/configs/use-class-names.ts +0 -41
- package/src/utils/configs/use-props.ts +0 -55
- package/src/utils/cx/index.ts +0 -6
- package/src/utils/factory/factory.ts +0 -23
- package/src/utils/factory/index.ts +0 -14
- package/src/utils/factory/types.ts +0 -92
- package/src/utils/index.ts +0 -3
- package/src/vitest/index.ts +0 -1
- package/src/vitest/setup.tsx +0 -20
- package/src/vitest/utils.tsx +0 -59
- package/tsconfig.json +0 -13
- package/tsconfig.tsbuildinfo +0 -1
- package/vitest.config.js +0 -19
package/src/icons/chevron.tsx
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { IconProps } from "./types";
|
|
2
|
-
|
|
3
|
-
type ChevronIconProps = IconProps & {
|
|
4
|
-
direction?: "up" | "down" | "left" | "right";
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const ChevronIcon = ({
|
|
8
|
-
size = 20,
|
|
9
|
-
direction = "up",
|
|
10
|
-
className,
|
|
11
|
-
...props
|
|
12
|
-
}: ChevronIconProps) => {
|
|
13
|
-
const rotation = {
|
|
14
|
-
up: "rotate(0)",
|
|
15
|
-
right: "rotate(90deg)",
|
|
16
|
-
down: "rotate(180deg)",
|
|
17
|
-
left: "rotate(-90deg)"
|
|
18
|
-
}[direction];
|
|
19
|
-
|
|
20
|
-
return (
|
|
21
|
-
<svg
|
|
22
|
-
viewBox="0 0 24 24"
|
|
23
|
-
width={size}
|
|
24
|
-
height={size}
|
|
25
|
-
fill="none"
|
|
26
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
27
|
-
className={className}
|
|
28
|
-
style={{ transform: rotation }}
|
|
29
|
-
{...props}
|
|
30
|
-
>
|
|
31
|
-
<g strokeWidth="0" />
|
|
32
|
-
<g strokeLinecap="round" strokeLinejoin="round" />
|
|
33
|
-
<g>
|
|
34
|
-
<path
|
|
35
|
-
d="M6 15L12 9L18 15"
|
|
36
|
-
stroke="currentColor"
|
|
37
|
-
strokeWidth="2"
|
|
38
|
-
strokeLinecap="round"
|
|
39
|
-
strokeLinejoin="round"
|
|
40
|
-
/>
|
|
41
|
-
</g>
|
|
42
|
-
</svg>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default ChevronIcon;
|
package/src/icons/eye-off.tsx
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { IconProps } from "./types";
|
|
2
|
-
|
|
3
|
-
const EyeOffIcon = ({ size = 20, className, ...props }: IconProps) => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
viewBox="0 0 32 32"
|
|
8
|
-
version="1.1"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
width={size}
|
|
11
|
-
height={size}
|
|
12
|
-
className={className}
|
|
13
|
-
{...props}
|
|
14
|
-
>
|
|
15
|
-
<g>
|
|
16
|
-
<path d="M16.108 10.044c-3.313 0-6 2.687-6 6s2.687 6 6 6 6-2.686 6-6-2.686-6-6-6zM16.108 20.044c-2.206 0-4.046-1.838-4.046-4.044s1.794-4 4-4c2.206 0 4 1.794 4 4s-1.748 4.044-3.954 4.044zM31.99 15.768c-0.012-0.050-0.006-0.104-0.021-0.153-0.006-0.021-0.020-0.033-0.027-0.051-0.011-0.028-0.008-0.062-0.023-0.089-2.909-6.66-9.177-10.492-15.857-10.492s-13.074 3.826-15.984 10.486c-0.012 0.028-0.010 0.057-0.021 0.089-0.007 0.020-0.021 0.030-0.028 0.049-0.015 0.050-0.009 0.103-0.019 0.154-0.018 0.090-0.035 0.178-0.035 0.269s0.017 0.177 0.035 0.268c0.010 0.050 0.003 0.105 0.019 0.152 0.006 0.023 0.021 0.032 0.028 0.052 0.010 0.027 0.008 0.061 0.021 0.089 2.91 6.658 9.242 10.428 15.922 10.428s13.011-3.762 15.92-10.422c0.015-0.029 0.012-0.058 0.023-0.090 0.007-0.017 0.020-0.030 0.026-0.050 0.015-0.049 0.011-0.102 0.021-0.154 0.018-0.090 0.034-0.177 0.034-0.27 0-0.088-0.017-0.175-0.035-0.266zM16 25.019c-5.665 0-11.242-2.986-13.982-8.99 2.714-5.983 8.365-9.047 14.044-9.047 5.678 0 11.203 3.067 13.918 9.053-2.713 5.982-8.301 8.984-13.981 8.984z" />
|
|
17
|
-
|
|
18
|
-
<path
|
|
19
|
-
d="M4 4 L28 28"
|
|
20
|
-
stroke="currentColor"
|
|
21
|
-
strokeWidth="2.5"
|
|
22
|
-
strokeLinecap="round"
|
|
23
|
-
fill="none"
|
|
24
|
-
/>
|
|
25
|
-
</g>
|
|
26
|
-
</svg>
|
|
27
|
-
);
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default EyeOffIcon;
|
package/src/icons/eye.tsx
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IconProps } from "./types";
|
|
2
|
-
|
|
3
|
-
const EyeIcon = ({ size = 20, className, ...props }: IconProps) => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
fill="currentColor"
|
|
7
|
-
viewBox="0 0 32 32"
|
|
8
|
-
version="1.1"
|
|
9
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
10
|
-
width={size}
|
|
11
|
-
height={size}
|
|
12
|
-
className={className}
|
|
13
|
-
{...props}
|
|
14
|
-
>
|
|
15
|
-
<g strokeWidth="0"></g>
|
|
16
|
-
<g strokeLinecap="round" strokeLinejoin="round"></g>
|
|
17
|
-
<g>
|
|
18
|
-
<path d="M16.108 10.044c-3.313 0-6 2.687-6 6s2.687 6 6 6 6-2.686 6-6-2.686-6-6-6zM16.108 20.044c-2.206 0-4.046-1.838-4.046-4.044s1.794-4 4-4c2.206 0 4 1.794 4 4s-1.748 4.044-3.954 4.044zM31.99 15.768c-0.012-0.050-0.006-0.104-0.021-0.153-0.006-0.021-0.020-0.033-0.027-0.051-0.011-0.028-0.008-0.062-0.023-0.089-2.909-6.66-9.177-10.492-15.857-10.492s-13.074 3.826-15.984 10.486c-0.012 0.028-0.010 0.057-0.021 0.089-0.007 0.020-0.021 0.030-0.028 0.049-0.015 0.050-0.009 0.103-0.019 0.154-0.018 0.090-0.035 0.178-0.035 0.269s0.017 0.177 0.035 0.268c0.010 0.050 0.003 0.105 0.019 0.152 0.006 0.023 0.021 0.032 0.028 0.052 0.010 0.027 0.008 0.061 0.021 0.089 2.91 6.658 9.242 10.428 15.922 10.428s13.011-3.762 15.92-10.422c0.015-0.029 0.012-0.058 0.023-0.090 0.007-0.017 0.020-0.030 0.026-0.050 0.015-0.049 0.011-0.102 0.021-0.154 0.018-0.090 0.034-0.177 0.034-0.27 0-0.088-0.017-0.175-0.035-0.266zM16 25.019c-5.665 0-11.242-2.986-13.982-8.99 2.714-5.983 8.365-9.047 14.044-9.047 5.678 0 11.203 3.067 13.918 9.053-2.713 5.982-8.301 8.984-13.981 8.984z"></path>{" "}
|
|
19
|
-
</g>
|
|
20
|
-
</svg>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default EyeIcon;
|
package/src/icons/index.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export { default as ChevronIcon } from "./chevron";
|
|
2
|
-
export { default as CheckIcon } from "./check";
|
|
3
|
-
export { default as EyeIcon } from "./eye";
|
|
4
|
-
export { default as EyeOffIcon } from "./eye-off";
|
|
5
|
-
export { default as MinusIcon } from "./minus";
|
|
6
|
-
export { default as UserIcon } from "./user";
|
|
7
|
-
export { default as XIcon } from "./x";
|
package/src/icons/minus.tsx
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { IconProps } from "./types";
|
|
2
|
-
|
|
3
|
-
const MinusIcon = ({ size = 20, className, ...props }: IconProps) => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
viewBox="0 0 24 24"
|
|
7
|
-
fill="none"
|
|
8
|
-
width={size}
|
|
9
|
-
height={size}
|
|
10
|
-
className={className}
|
|
11
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
-
{...props}
|
|
13
|
-
>
|
|
14
|
-
<path
|
|
15
|
-
d="M6 12H18"
|
|
16
|
-
stroke="currentColor"
|
|
17
|
-
strokeWidth="3"
|
|
18
|
-
strokeLinecap="round"
|
|
19
|
-
/>
|
|
20
|
-
</svg>
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export default MinusIcon;
|
package/src/icons/types.ts
DELETED
package/src/icons/user.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IconProps } from "./types";
|
|
2
|
-
|
|
3
|
-
const UserIcon = ({ size = 20, className, ...props }: IconProps) => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
viewBox="0 0 24 24"
|
|
7
|
-
fill="currentColor"
|
|
8
|
-
width={size}
|
|
9
|
-
height={size}
|
|
10
|
-
className={className}
|
|
11
|
-
{...props}
|
|
12
|
-
>
|
|
13
|
-
<path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" />
|
|
14
|
-
</svg>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default UserIcon;
|
package/src/icons/x.tsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { IconProps } from "./types";
|
|
2
|
-
|
|
3
|
-
const XIcon = ({ size = 20, className, ...props }: IconProps) => {
|
|
4
|
-
return (
|
|
5
|
-
<svg
|
|
6
|
-
viewBox="0 0 24 24"
|
|
7
|
-
fill="currentColor"
|
|
8
|
-
width={size}
|
|
9
|
-
height={size}
|
|
10
|
-
className={className}
|
|
11
|
-
{...props}
|
|
12
|
-
>
|
|
13
|
-
<g strokeWidth="0" />
|
|
14
|
-
<g strokeLinecap="round" strokeLinejoin="round" />
|
|
15
|
-
<g>
|
|
16
|
-
<path
|
|
17
|
-
d="M18 6L6 18"
|
|
18
|
-
stroke="currentColor"
|
|
19
|
-
strokeWidth="2"
|
|
20
|
-
strokeLinecap="round"
|
|
21
|
-
strokeLinejoin="round"
|
|
22
|
-
/>
|
|
23
|
-
<path
|
|
24
|
-
d="M6 6L18 18"
|
|
25
|
-
stroke="currentColor"
|
|
26
|
-
strokeWidth="2"
|
|
27
|
-
strokeLinecap="round"
|
|
28
|
-
strokeLinejoin="round"
|
|
29
|
-
/>
|
|
30
|
-
</g>
|
|
31
|
-
</svg>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default XIcon;
|
package/src/index.ts
DELETED
package/src/style.css
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
:root {
|
|
4
|
-
--refraktor-radius-none: 0;
|
|
5
|
-
--refraktor-radius-xs: 0.125rem;
|
|
6
|
-
--refraktor-radius-sm: 0.25rem;
|
|
7
|
-
--refraktor-radius-md: 0.375rem;
|
|
8
|
-
--refraktor-radius-lg: 0.5rem;
|
|
9
|
-
--refraktor-radius-xl: 0.75rem;
|
|
10
|
-
--refraktor-radius-2xl: 1rem;
|
|
11
|
-
--refraktor-radius-3xl: 1.5rem;
|
|
12
|
-
--refraktor-radius-4xl: 2rem;
|
|
13
|
-
--refraktor-radius-full: 9999px;
|
|
14
|
-
|
|
15
|
-
--refraktor-colors-white: #ffffff;
|
|
16
|
-
--refraktor-colors-black: #000000;
|
|
17
|
-
|
|
18
|
-
--refraktor-colors-dark-0: #c9c9c9;
|
|
19
|
-
--refraktor-colors-dark-1: #b8b8b8;
|
|
20
|
-
--refraktor-colors-dark-2: #828282;
|
|
21
|
-
--refraktor-colors-dark-3: #696969;
|
|
22
|
-
--refraktor-colors-dark-4: #424242;
|
|
23
|
-
--refraktor-colors-dark-5: #3b3b3b;
|
|
24
|
-
--refraktor-colors-dark-6: #2e2e2e;
|
|
25
|
-
--refraktor-colors-dark-7: #242424;
|
|
26
|
-
--refraktor-colors-dark-8: #1f1f1f;
|
|
27
|
-
--refraktor-colors-dark-9: #141414;
|
|
28
|
-
|
|
29
|
-
--refraktor-colors-light-0: #ffffff;
|
|
30
|
-
--refraktor-colors-light-1: #f9f9f9;
|
|
31
|
-
--refraktor-colors-light-2: #f2f2f2;
|
|
32
|
-
--refraktor-colors-light-3: #e5e5e5;
|
|
33
|
-
--refraktor-colors-light-4: #d1d1d1;
|
|
34
|
-
--refraktor-colors-light-5: #b2b2b2;
|
|
35
|
-
--refraktor-colors-light-6: #8c8c8c;
|
|
36
|
-
--refraktor-colors-light-7: #666666;
|
|
37
|
-
--refraktor-colors-light-8: #3f3f3f;
|
|
38
|
-
--refraktor-colors-light-9: #262626;
|
|
39
|
-
|
|
40
|
-
--refraktor-colors-gray-0: #fafafa;
|
|
41
|
-
--refraktor-colors-gray-1: #f4f4f5;
|
|
42
|
-
--refraktor-colors-gray-2: #e4e4e7;
|
|
43
|
-
--refraktor-colors-gray-3: #d4d4d8;
|
|
44
|
-
--refraktor-colors-gray-4: #a1a1aa;
|
|
45
|
-
--refraktor-colors-gray-5: #71717a;
|
|
46
|
-
--refraktor-colors-gray-6: #52525b;
|
|
47
|
-
--refraktor-colors-gray-7: #3f3f46;
|
|
48
|
-
--refraktor-colors-gray-8: #27272a;
|
|
49
|
-
--refraktor-colors-gray-9: #18181b;
|
|
50
|
-
|
|
51
|
-
--refraktor-colors-cloud-0: #ffffff;
|
|
52
|
-
--refraktor-colors-cloud-1: #fcfcfd;
|
|
53
|
-
--refraktor-colors-cloud-2: #f8fafc;
|
|
54
|
-
--refraktor-colors-cloud-3: #eef2f6;
|
|
55
|
-
--refraktor-colors-cloud-4: #e2e8f0;
|
|
56
|
-
--refraktor-colors-cloud-5: #dbe2ea;
|
|
57
|
-
--refraktor-colors-cloud-6: #c2ccd6;
|
|
58
|
-
--refraktor-colors-cloud-7: #94a3b8;
|
|
59
|
-
--refraktor-colors-cloud-8: #64748b;
|
|
60
|
-
--refraktor-colors-cloud-9: #1f2937;
|
|
61
|
-
|
|
62
|
-
--refraktor-colors-green-0: #ebfbee;
|
|
63
|
-
--refraktor-colors-green-1: #d3f9d8;
|
|
64
|
-
--refraktor-colors-green-2: #b2f2bb;
|
|
65
|
-
--refraktor-colors-green-3: #8ce99a;
|
|
66
|
-
--refraktor-colors-green-4: #69db7c;
|
|
67
|
-
--refraktor-colors-green-5: #51cf66;
|
|
68
|
-
--refraktor-colors-green-6: #40c057;
|
|
69
|
-
--refraktor-colors-green-7: #37b24d;
|
|
70
|
-
--refraktor-colors-green-8: #2f9e44;
|
|
71
|
-
--refraktor-colors-green-9: #2b8a3e;
|
|
72
|
-
|
|
73
|
-
--refraktor-colors-mint-0: #ecfdf5;
|
|
74
|
-
--refraktor-colors-mint-1: #d1fae5;
|
|
75
|
-
--refraktor-colors-mint-2: #a7f3d0;
|
|
76
|
-
--refraktor-colors-mint-3: #6ee7b7;
|
|
77
|
-
--refraktor-colors-mint-4: #34d399;
|
|
78
|
-
--refraktor-colors-mint-5: #10b981;
|
|
79
|
-
--refraktor-colors-mint-6: #059669;
|
|
80
|
-
--refraktor-colors-mint-7: #047857;
|
|
81
|
-
--refraktor-colors-mint-8: #065f46;
|
|
82
|
-
--refraktor-colors-mint-9: #064e3b;
|
|
83
|
-
|
|
84
|
-
--refraktor-colors-red-0: #ffeaea;
|
|
85
|
-
--refraktor-colors-red-1: #ffc5c5;
|
|
86
|
-
--refraktor-colors-red-2: #ffa0a0;
|
|
87
|
-
--refraktor-colors-red-3: #ff7a7a;
|
|
88
|
-
--refraktor-colors-red-4: #ff5555;
|
|
89
|
-
--refraktor-colors-red-5: #e64545;
|
|
90
|
-
--refraktor-colors-red-6: #c13838;
|
|
91
|
-
--refraktor-colors-red-7: #9d2c2c;
|
|
92
|
-
--refraktor-colors-red-8: #781f1f;
|
|
93
|
-
--refraktor-colors-red-9: #541414;
|
|
94
|
-
|
|
95
|
-
--refraktor-colors-blue-0: #e7f2ff;
|
|
96
|
-
--refraktor-colors-blue-1: #b8dcff;
|
|
97
|
-
--refraktor-colors-blue-2: #89c6ff;
|
|
98
|
-
--refraktor-colors-blue-3: #5ab0ff;
|
|
99
|
-
--refraktor-colors-blue-4: #2b9aff;
|
|
100
|
-
--refraktor-colors-blue-5: #1485e6;
|
|
101
|
-
--refraktor-colors-blue-6: #106ec1;
|
|
102
|
-
--refraktor-colors-blue-7: #0d589d;
|
|
103
|
-
--refraktor-colors-blue-8: #094179;
|
|
104
|
-
--refraktor-colors-blue-9: #062b54;
|
|
105
|
-
|
|
106
|
-
--refraktor-colors-cyan-0: #eefbfc;
|
|
107
|
-
--refraktor-colors-cyan-1: #d6f4f6;
|
|
108
|
-
--refraktor-colors-cyan-2: #bcecee;
|
|
109
|
-
--refraktor-colors-cyan-3: #9ee3e6;
|
|
110
|
-
--refraktor-colors-cyan-4: #7ed9de;
|
|
111
|
-
--refraktor-colors-cyan-5: #5fcfd6;
|
|
112
|
-
--refraktor-colors-cyan-6: #46b8bf;
|
|
113
|
-
--refraktor-colors-cyan-7: #329fa6;
|
|
114
|
-
--refraktor-colors-cyan-8: #1f7f85;
|
|
115
|
-
--refraktor-colors-cyan-9: #145f64;
|
|
116
|
-
|
|
117
|
-
--refraktor-colors-teal-0: #ecf8f6;
|
|
118
|
-
--refraktor-colors-teal-1: #d0efe9;
|
|
119
|
-
--refraktor-colors-teal-2: #b2e5dc;
|
|
120
|
-
--refraktor-colors-teal-3: #8fdbc9;
|
|
121
|
-
--refraktor-colors-teal-4: #6fd1b6;
|
|
122
|
-
--refraktor-colors-teal-5: #52c7a4;
|
|
123
|
-
--refraktor-colors-teal-6: #3dad8c;
|
|
124
|
-
--refraktor-colors-teal-7: #2f8f74;
|
|
125
|
-
--refraktor-colors-teal-8: #226f5b;
|
|
126
|
-
--refraktor-colors-teal-9: #184f41;
|
|
127
|
-
|
|
128
|
-
--refraktor-colors-yellow-0: #fffce5;
|
|
129
|
-
--refraktor-colors-yellow-1: #fff4b8;
|
|
130
|
-
--refraktor-colors-yellow-2: #ffeb8a;
|
|
131
|
-
--refraktor-colors-yellow-3: #ffe25c;
|
|
132
|
-
--refraktor-colors-yellow-4: #ffd92e;
|
|
133
|
-
--refraktor-colors-yellow-5: #e6c020;
|
|
134
|
-
--refraktor-colors-yellow-6: #c1a319;
|
|
135
|
-
--refraktor-colors-yellow-7: #9d8613;
|
|
136
|
-
--refraktor-colors-yellow-8: #79690c;
|
|
137
|
-
--refraktor-colors-yellow-9: #544c06;
|
|
138
|
-
|
|
139
|
-
--refraktor-colors-orange-0: #fff7e0;
|
|
140
|
-
--refraktor-colors-orange-1: #ffd29d;
|
|
141
|
-
--refraktor-colors-orange-2: #ffbb75;
|
|
142
|
-
--refraktor-colors-orange-3: #ff9e4d;
|
|
143
|
-
--refraktor-colors-orange-4: #ff8025;
|
|
144
|
-
--refraktor-colors-orange-5: #e66a00;
|
|
145
|
-
--refraktor-colors-orange-6: #c95300;
|
|
146
|
-
--refraktor-colors-orange-7: #a43c00;
|
|
147
|
-
--refraktor-colors-orange-8: #7f2b00;
|
|
148
|
-
--refraktor-colors-orange-9: #5a1c00;
|
|
149
|
-
|
|
150
|
-
--refraktor-colors-purple-0: #f4f0ff;
|
|
151
|
-
--refraktor-colors-purple-1: #dbceff;
|
|
152
|
-
--refraktor-colors-purple-2: #c2acff;
|
|
153
|
-
--refraktor-colors-purple-3: #a98aff;
|
|
154
|
-
--refraktor-colors-purple-4: #9068ff;
|
|
155
|
-
--refraktor-colors-purple-5: #774fe6;
|
|
156
|
-
--refraktor-colors-purple-6: #613fc1;
|
|
157
|
-
--refraktor-colors-purple-7: #4c319d;
|
|
158
|
-
--refraktor-colors-purple-8: #372479;
|
|
159
|
-
--refraktor-colors-purple-9: #221654;
|
|
160
|
-
|
|
161
|
-
--refraktor-colors-magenta-0: #f7ecf6;
|
|
162
|
-
--refraktor-colors-magenta-1: #ebd1ea;
|
|
163
|
-
--refraktor-colors-magenta-2: #deb5de;
|
|
164
|
-
--refraktor-colors-magenta-3: #d19ad2;
|
|
165
|
-
--refraktor-colors-magenta-4: #c37fc6;
|
|
166
|
-
--refraktor-colors-magenta-5: #b065ba;
|
|
167
|
-
--refraktor-colors-magenta-6: #9652a0;
|
|
168
|
-
--refraktor-colors-magenta-7: #7b3f85;
|
|
169
|
-
--refraktor-colors-magenta-8: #602c6a;
|
|
170
|
-
--refraktor-colors-magenta-9: #45194f;
|
|
171
|
-
|
|
172
|
-
--refraktor-colors-pink-0: #fcebf2;
|
|
173
|
-
--refraktor-colors-pink-1: #f6d2e1;
|
|
174
|
-
--refraktor-colors-pink-2: #efb8cf;
|
|
175
|
-
--refraktor-colors-pink-3: #e79ebb;
|
|
176
|
-
--refraktor-colors-pink-4: #de84a6;
|
|
177
|
-
--refraktor-colors-pink-5: #d36a90;
|
|
178
|
-
--refraktor-colors-pink-6: #b85778;
|
|
179
|
-
--refraktor-colors-pink-7: #9c4662;
|
|
180
|
-
--refraktor-colors-pink-8: #7d344b;
|
|
181
|
-
--refraktor-colors-pink-9: #5c2436;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
@keyframes loader-spin {
|
|
185
|
-
from {
|
|
186
|
-
transform: rotate(0deg);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
to {
|
|
190
|
-
transform: rotate(360deg);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.loader-spin {
|
|
195
|
-
animation: loader-spin var(--refraktor-loader-speed, 1s) linear infinite;
|
|
196
|
-
transform-origin: center center;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
@keyframes refraktor-progress-indeterminate {
|
|
200
|
-
0% {
|
|
201
|
-
transform: translateX(-120%);
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
100% {
|
|
205
|
-
transform: translateX(280%);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
.refraktor-progress-indeterminate {
|
|
210
|
-
width: 40%;
|
|
211
|
-
will-change: transform;
|
|
212
|
-
animation: refraktor-progress-indeterminate 1.2s ease-in-out infinite;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.refraktor-transparency-grid {
|
|
216
|
-
--refraktor-transparency-grid-size: 10px;
|
|
217
|
-
--refraktor-transparency-grid-light: var(--refraktor-colors-light-0);
|
|
218
|
-
--refraktor-transparency-grid-dark: var(--refraktor-colors-light-4);
|
|
219
|
-
|
|
220
|
-
background-color: var(--refraktor-transparency-grid-light);
|
|
221
|
-
background-image:
|
|
222
|
-
linear-gradient(
|
|
223
|
-
45deg,
|
|
224
|
-
var(--refraktor-transparency-grid-dark) 25%,
|
|
225
|
-
transparent 25%
|
|
226
|
-
),
|
|
227
|
-
linear-gradient(
|
|
228
|
-
-45deg,
|
|
229
|
-
var(--refraktor-transparency-grid-dark) 25%,
|
|
230
|
-
transparent 25%
|
|
231
|
-
),
|
|
232
|
-
linear-gradient(
|
|
233
|
-
45deg,
|
|
234
|
-
transparent 75%,
|
|
235
|
-
var(--refraktor-transparency-grid-dark) 75%
|
|
236
|
-
),
|
|
237
|
-
linear-gradient(
|
|
238
|
-
-45deg,
|
|
239
|
-
transparent 75%,
|
|
240
|
-
var(--refraktor-transparency-grid-dark) 75%
|
|
241
|
-
);
|
|
242
|
-
background-size: var(--refraktor-transparency-grid-size)
|
|
243
|
-
var(--refraktor-transparency-grid-size);
|
|
244
|
-
background-position:
|
|
245
|
-
0 0,
|
|
246
|
-
0 calc(var(--refraktor-transparency-grid-size) / 2),
|
|
247
|
-
calc(var(--refraktor-transparency-grid-size) / 2)
|
|
248
|
-
calc(var(--refraktor-transparency-grid-size) / -2),
|
|
249
|
-
calc(var(--refraktor-transparency-grid-size) / -2) 0;
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
/** Scrollbar */
|
|
253
|
-
.refraktor-scrollbar {
|
|
254
|
-
--refraktor-scrollbar-size: 6px;
|
|
255
|
-
--refraktor-scrollbar-radius: 99px;
|
|
256
|
-
--refraktor-scrollbar-track: var(--refraktor-scroll-track);
|
|
257
|
-
--refraktor-scrollbar-thumb: var(--refraktor-scroll-thumb);
|
|
258
|
-
--refraktor-scrollbar-thumb-hover: var(--refraktor-scroll-thumb-hover);
|
|
259
|
-
scrollbar-width: thin;
|
|
260
|
-
scrollbar-color: var(--refraktor-scrollbar-thumb)
|
|
261
|
-
var(--refraktor-scrollbar-track);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.refraktor-scrollbar::-webkit-scrollbar {
|
|
265
|
-
width: var(--refraktor-scrollbar-size);
|
|
266
|
-
height: var(--refraktor-scrollbar-size);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.refraktor-scrollbar::-webkit-scrollbar-track {
|
|
270
|
-
background: var(--refraktor-scrollbar-track);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.refraktor-scrollbar::-webkit-scrollbar-thumb {
|
|
274
|
-
background: var(--refraktor-scrollbar-thumb);
|
|
275
|
-
border-radius: var(--refraktor-scrollbar-radius);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
.refraktor-scrollbar::-webkit-scrollbar-thumb:hover {
|
|
279
|
-
background: var(--refraktor-scrollbar-thumb-hover);
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
:where(.refraktor-scrollbar)::-webkit-scrollbar-thumb {
|
|
283
|
-
background: var(--refraktor-scrollbar-thumb);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
/** Input */
|
|
287
|
-
input,
|
|
288
|
-
input::-webkit-inner-spin-button,
|
|
289
|
-
input::-webkit-outer-spin-button,
|
|
290
|
-
input::-webkit-calendar-picker-indicator {
|
|
291
|
-
appearance: none;
|
|
292
|
-
-webkit-appearance: none;
|
|
293
|
-
-moz-appearance: none;
|
|
294
|
-
margin: 0;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
/* ========== NUMBER ========== */
|
|
298
|
-
input[type="number"] {
|
|
299
|
-
appearance: textfield;
|
|
300
|
-
-moz-appearance: textfield; /* Firefox */
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
input[type="number"]::-webkit-inner-spin-button,
|
|
304
|
-
input[type="number"]::-webkit-outer-spin-button {
|
|
305
|
-
-webkit-appearance: none; /* Chrome, Safari, Edge */
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/* ============ TIME =========== */
|
|
309
|
-
input[type="time"]::-webkit-calendar-picker-indicator {
|
|
310
|
-
display: none; /* Chromium / Safari */
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
/* Remove inner padding & odd Safari quirks */
|
|
314
|
-
input[type="time"] {
|
|
315
|
-
appearance: textfield;
|
|
316
|
-
-webkit-appearance: none;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
/* ============ DATE =========== */
|
|
320
|
-
input[type="date"]::-webkit-calendar-picker-indicator {
|
|
321
|
-
display: none;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/* Hide native clear button (Edge / Chrome) */
|
|
325
|
-
input::-ms-clear {
|
|
326
|
-
display: none;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/* Mobile Safari fix: block spinner gestures */
|
|
330
|
-
input[type="number"],
|
|
331
|
-
input[type="time"],
|
|
332
|
-
input[type="date"] {
|
|
333
|
-
touch-action: manipulation;
|
|
334
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { storage, useIsomorphicLayoutEffect } from "@refraktor/utils";
|
|
2
|
-
import { Theme } from "../types";
|
|
3
|
-
import { ThemeProviderProps } from "./types";
|
|
4
|
-
import {
|
|
5
|
-
useCallback,
|
|
6
|
-
useEffect,
|
|
7
|
-
useMemo,
|
|
8
|
-
useRef,
|
|
9
|
-
useState
|
|
10
|
-
} from "react";
|
|
11
|
-
import { ThemeContextProvider } from "./context";
|
|
12
|
-
import { defaultTheme, RefraktorTheme } from "../createTheme";
|
|
13
|
-
import { generateVariables } from "./generateVariables";
|
|
14
|
-
|
|
15
|
-
const STORAGE_KEY = "refraktor-theme";
|
|
16
|
-
|
|
17
|
-
const getInitialTheme = (
|
|
18
|
-
defaultTheme: Theme,
|
|
19
|
-
persistenceEnabled: boolean,
|
|
20
|
-
storageKey: string
|
|
21
|
-
) => {
|
|
22
|
-
if (!persistenceEnabled) return defaultTheme;
|
|
23
|
-
|
|
24
|
-
const storageTheme = storage.get(storageKey, defaultTheme);
|
|
25
|
-
if (storageTheme === "light" || storageTheme === "dark")
|
|
26
|
-
return storageTheme;
|
|
27
|
-
|
|
28
|
-
return defaultTheme;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
export const ThemeProvider = ({
|
|
32
|
-
children,
|
|
33
|
-
theme = "dark",
|
|
34
|
-
themeConfig,
|
|
35
|
-
components,
|
|
36
|
-
persistence = { enabled: false }
|
|
37
|
-
}: ThemeProviderProps) => {
|
|
38
|
-
const rootRef = useRef<HTMLElement>(null);
|
|
39
|
-
|
|
40
|
-
const persistenceEnabled = persistence.enabled ?? false;
|
|
41
|
-
const storageKey = persistence.storageKey ?? STORAGE_KEY;
|
|
42
|
-
|
|
43
|
-
const [currentTheme, setCurrentTheme] = useState(() =>
|
|
44
|
-
getInitialTheme(theme, persistenceEnabled, storageKey)
|
|
45
|
-
);
|
|
46
|
-
const [currentThemeConfig, setCurrentThemeConfig] =
|
|
47
|
-
useState<RefraktorTheme>(() => themeConfig ?? defaultTheme);
|
|
48
|
-
|
|
49
|
-
const themeVariables = useMemo(
|
|
50
|
-
() => generateVariables(currentTheme, currentThemeConfig),
|
|
51
|
-
[currentTheme, currentThemeConfig]
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
if (persistenceEnabled) storage.set(storageKey, currentTheme);
|
|
56
|
-
}, [currentTheme, persistenceEnabled, storageKey]);
|
|
57
|
-
|
|
58
|
-
const toggleTheme = useCallback(() => {
|
|
59
|
-
setCurrentTheme((prev: Theme) => (prev === "light" ? "dark" : "light"));
|
|
60
|
-
}, []);
|
|
61
|
-
|
|
62
|
-
const setTheme = useCallback((newTheme: Theme) => {
|
|
63
|
-
setCurrentTheme(newTheme);
|
|
64
|
-
}, []);
|
|
65
|
-
|
|
66
|
-
useIsomorphicLayoutEffect(() => {
|
|
67
|
-
if (typeof document !== "undefined") {
|
|
68
|
-
rootRef.current = document.documentElement;
|
|
69
|
-
}
|
|
70
|
-
}, []);
|
|
71
|
-
|
|
72
|
-
useIsomorphicLayoutEffect(() => {
|
|
73
|
-
const root = rootRef.current;
|
|
74
|
-
if (!root) return;
|
|
75
|
-
|
|
76
|
-
root.setAttribute("data-refraktor-theme", currentTheme);
|
|
77
|
-
|
|
78
|
-
Object.entries(themeVariables).forEach(([key, value]) => {
|
|
79
|
-
root.style.setProperty(key, value);
|
|
80
|
-
});
|
|
81
|
-
}, [themeVariables]);
|
|
82
|
-
|
|
83
|
-
const contextValue = useMemo(
|
|
84
|
-
() => ({
|
|
85
|
-
theme: currentTheme,
|
|
86
|
-
setTheme,
|
|
87
|
-
toggleTheme,
|
|
88
|
-
persistenceEnabled,
|
|
89
|
-
themeConfig: currentThemeConfig,
|
|
90
|
-
components: components ?? {}
|
|
91
|
-
}),
|
|
92
|
-
[
|
|
93
|
-
currentTheme,
|
|
94
|
-
setTheme,
|
|
95
|
-
toggleTheme,
|
|
96
|
-
persistenceEnabled,
|
|
97
|
-
currentThemeConfig,
|
|
98
|
-
components
|
|
99
|
-
]
|
|
100
|
-
);
|
|
101
|
-
|
|
102
|
-
return (
|
|
103
|
-
<ThemeContextProvider value={contextValue}>
|
|
104
|
-
{children}
|
|
105
|
-
</ThemeContextProvider>
|
|
106
|
-
);
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
ThemeProvider.displayName = "@refraktor/core/ThemeProvider";
|
|
110
|
-
|
|
111
|
-
export default ThemeProvider;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createSafeContext } from "@refraktor/utils";
|
|
2
|
-
import { ThemeProviderContextValue } from "./types";
|
|
3
|
-
|
|
4
|
-
export const [ThemeContextProvider, useThemeContext] =
|
|
5
|
-
createSafeContext<ThemeProviderContextValue>(
|
|
6
|
-
"[@refraktor/core] ThemeProvider was not found in the tree"
|
|
7
|
-
);
|