@vygruppen/spor-react 11.3.10 → 12.0.0
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/.turbo/turbo-build.log +32 -11
- package/.turbo/turbo-typegen.log +23 -0
- package/CHANGELOG.md +239 -0
- package/dist/index.d.mts +2552 -8319
- package/dist/index.d.ts +2552 -8319
- package/dist/index.js +9609 -8608
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9487 -8455
- package/dist/index.mjs.map +1 -1
- package/package.json +21 -13
- package/src/accordion/Accordion.tsx +96 -45
- package/src/accordion/Expandable.tsx +54 -127
- package/src/accordion/helpers.ts +31 -0
- package/src/accordion/types.ts +60 -0
- package/src/alert/Alert.tsx +101 -0
- package/src/alert/AlertIcon.tsx +63 -45
- package/src/alert/ExpandableAlert.tsx +96 -64
- package/src/alert/ServiceAlert.tsx +127 -125
- package/src/alert/{index.tsx → index.ts} +1 -2
- package/src/breadcrumb/Breadcrumb.tsx +39 -24
- package/src/button/Button.tsx +86 -105
- package/src/button/ButtonGroup.tsx +45 -20
- package/src/button/Clipboard.tsx +82 -0
- package/src/button/CloseButton.tsx +4 -3
- package/src/button/FloatingActionButton.tsx +35 -41
- package/src/button/IconButton.tsx +34 -30
- package/src/button/index.tsx +1 -0
- package/src/color-mode/color-mode.tsx +75 -0
- package/src/color-mode/index.ts +1 -0
- package/src/datepicker/Calendar.tsx +17 -8
- package/src/datepicker/CalendarCell.tsx +20 -13
- package/src/datepicker/CalendarGrid.tsx +18 -10
- package/src/datepicker/CalendarHeader.tsx +2 -0
- package/src/datepicker/CalendarNavigationButton.tsx +1 -0
- package/src/datepicker/CalendarTriggerButton.tsx +43 -45
- package/src/datepicker/DateField.tsx +21 -12
- package/src/datepicker/DatePicker.tsx +61 -58
- package/src/datepicker/DateRangePicker.tsx +52 -58
- package/src/datepicker/DateTimeSegment.tsx +13 -5
- package/src/datepicker/RangeCalendar.tsx +13 -7
- package/src/datepicker/StyledField.tsx +25 -17
- package/src/datepicker/TimeField.tsx +10 -8
- package/src/datepicker/TimePicker.tsx +48 -45
- package/src/datepicker/types.ts +5 -0
- package/src/dialog/Dialog.tsx +56 -0
- package/src/dialog/Drawer.tsx +187 -0
- package/src/dialog/index.ts +2 -0
- package/src/dialog/types.ts +26 -0
- package/src/image/index.tsx +2 -2
- package/src/index.tsx +5 -3
- package/src/input/AttachedInputs.tsx +17 -42
- package/src/input/CardSelect.tsx +75 -162
- package/src/input/Checkbox.tsx +30 -6
- package/src/input/CheckboxGroup.tsx +25 -16
- package/src/input/ChoiceChip.tsx +58 -77
- package/src/input/Combobox.tsx +172 -172
- package/src/input/CountryCodeSelect.tsx +42 -28
- package/src/input/Dialog.tsx +1 -0
- package/src/input/Field.tsx +71 -0
- package/src/input/Fieldset.tsx +7 -0
- package/src/input/Input.tsx +68 -73
- package/src/input/InputGroup.tsx +66 -0
- package/src/input/ListBox.tsx +83 -70
- package/src/input/NativeSelect.tsx +68 -33
- package/src/input/NumericStepper.tsx +173 -171
- package/src/input/PasswordInput.tsx +99 -52
- package/src/input/PhoneNumberInput.tsx +69 -72
- package/src/input/Popover.tsx +1 -0
- package/src/input/Radio.tsx +37 -17
- package/src/input/SearchInput.tsx +24 -86
- package/src/input/Select.tsx +237 -0
- package/src/input/Switch.tsx +60 -18
- package/src/input/Textarea.tsx +53 -101
- package/src/input/{index.tsx → index.ts} +2 -8
- package/src/layout/PressableCard.tsx +12 -21
- package/src/layout/RadioCard.tsx +68 -101
- package/src/layout/Separator.tsx +32 -0
- package/src/layout/StaticCard.tsx +13 -33
- package/src/layout/index.tsx +3 -7
- package/src/linjetag/InfoTag.tsx +16 -9
- package/src/linjetag/LineIcon.tsx +74 -28
- package/src/linjetag/TravelTag.tsx +38 -27
- package/src/link/TextLink.tsx +25 -16
- package/src/list/index.tsx +24 -2
- package/src/loader/ClientOnly.tsx +8 -7
- package/src/loader/ColorInlineLoader.tsx +4 -3
- package/src/loader/ColorSpinner.tsx +5 -4
- package/src/loader/ContentLoader.tsx +6 -4
- package/src/loader/DarkFullScreenLoader.tsx +11 -3
- package/src/loader/DarkInlineLoader.tsx +5 -3
- package/src/loader/DarkSpinner.tsx +7 -3
- package/src/loader/LightFullScreenLoader.tsx +11 -3
- package/src/loader/LightInlineLoader.tsx +11 -3
- package/src/loader/LightSpinner.tsx +5 -3
- package/src/loader/Lottie.tsx +3 -3
- package/src/loader/ProgressBar.tsx +83 -84
- package/src/loader/ProgressLoader.tsx +120 -75
- package/src/loader/Skeleton.tsx +94 -19
- package/src/loader/index.tsx +0 -2
- package/src/loader/useHydrated.tsx +1 -0
- package/src/loader/useRotatingLabel.tsx +2 -1
- package/src/logo/CargonetLogo.tsx +89 -89
- package/src/logo/VyLogo.tsx +61 -42
- package/src/logo/VyLogoPride.tsx +137 -139
- package/src/media-controller/JumpButton.tsx +48 -38
- package/src/media-controller/PlayPauseButton.tsx +31 -29
- package/src/media-controller/SkipButton.tsx +38 -37
- package/src/nudge/Nudge.tsx +195 -123
- package/src/nudge/index.tsx +0 -1
- package/src/pagination/Pagination.tsx +221 -118
- package/src/pagination/types.ts +23 -0
- package/src/popover/index.tsx +67 -0
- package/src/progress-indicator/ProgressDot.tsx +11 -10
- package/src/progress-indicator/ProgressIndicator.tsx +28 -15
- package/src/provider/SporProvider.tsx +17 -14
- package/src/stepper/Stepper.tsx +88 -85
- package/src/stepper/StepperContext.tsx +2 -1
- package/src/stepper/StepperStep.tsx +28 -21
- package/src/tab/Tabs.tsx +62 -12
- package/src/tab/index.tsx +1 -9
- package/src/table/Table.tsx +35 -30
- package/src/table/index.tsx +11 -7
- package/src/theme/brand.ts +7 -0
- package/src/theme/index.ts +45 -37
- package/src/theme/recipes/attached-inputs.ts +43 -0
- package/src/theme/recipes/badge.ts +104 -0
- package/src/theme/recipes/button.ts +124 -0
- package/src/theme/recipes/choice-chip.ts +144 -0
- package/src/theme/recipes/close-button.ts +41 -0
- package/src/theme/recipes/code.ts +14 -0
- package/src/theme/recipes/group.ts +19 -0
- package/src/theme/recipes/index.ts +29 -0
- package/src/theme/recipes/input.ts +89 -0
- package/src/theme/recipes/link.ts +64 -0
- package/src/theme/recipes/nudge.ts +12 -0
- package/src/theme/recipes/pressable-card.ts +83 -0
- package/src/theme/recipes/progress-loader.ts +14 -0
- package/src/theme/recipes/separator.ts +85 -0
- package/src/theme/recipes/skeleton.ts +57 -0
- package/src/theme/recipes/static-card.ts +39 -0
- package/src/theme/recipes/textarea.ts +27 -0
- package/src/theme/semantic-tokens/colors.ts +22 -0
- package/src/theme/semantic-tokens/index.ts +24 -0
- package/src/theme/semantic-tokens/radii.ts +14 -0
- package/src/theme/semantic-tokens/shadows.ts +17 -0
- package/src/theme/slot-recipes/accordion.ts +131 -0
- package/src/theme/slot-recipes/alert-expandable.ts +133 -0
- package/src/theme/slot-recipes/alert-service.ts +66 -0
- package/src/theme/slot-recipes/alert.ts +72 -0
- package/src/theme/slot-recipes/anatomy.ts +269 -0
- package/src/theme/slot-recipes/breadcrumb.ts +61 -0
- package/src/theme/slot-recipes/checkbox.ts +89 -0
- package/src/theme/slot-recipes/datepicker.ts +214 -0
- package/src/theme/slot-recipes/dialog.ts +221 -0
- package/src/theme/slot-recipes/drawer.ts +205 -0
- package/src/theme/slot-recipes/field.ts +79 -0
- package/src/theme/slot-recipes/floating-action-button.ts +131 -0
- package/src/theme/slot-recipes/index.ts +65 -0
- package/src/theme/slot-recipes/info-tag.ts +62 -0
- package/src/theme/slot-recipes/line-icon.ts +140 -0
- package/src/theme/slot-recipes/list.ts +45 -0
- package/src/theme/slot-recipes/listbox.ts +72 -0
- package/src/theme/slot-recipes/media-controller-button.ts +131 -0
- package/src/theme/slot-recipes/native-select.ts +54 -0
- package/src/theme/slot-recipes/numeric-stepper.ts +65 -0
- package/src/theme/slot-recipes/pagination.ts +41 -0
- package/src/theme/slot-recipes/popover.ts +78 -0
- package/src/theme/slot-recipes/progress-bar.ts +39 -0
- package/src/theme/slot-recipes/progress-indicator.ts +22 -0
- package/src/theme/slot-recipes/radio-card.ts +112 -0
- package/src/theme/slot-recipes/radio.ts +80 -0
- package/src/theme/slot-recipes/select.ts +243 -0
- package/src/theme/slot-recipes/stepper.ts +92 -0
- package/src/theme/slot-recipes/switch.ts +147 -0
- package/src/theme/slot-recipes/table.ts +200 -0
- package/src/theme/slot-recipes/tabs.ts +169 -0
- package/src/theme/slot-recipes/toast.ts +56 -0
- package/src/theme/slot-recipes/travel-tag.ts +192 -0
- package/src/theme/tokens/animation-styles.ts +50 -0
- package/src/theme/tokens/animations.ts +22 -0
- package/src/theme/tokens/aspect-ratios.ts +22 -0
- package/src/theme/tokens/blurs.ts +28 -0
- package/src/theme/tokens/borders.ts +26 -0
- package/src/theme/{foundations → tokens}/breakpoints.ts +0 -1
- package/src/theme/tokens/colors.ts +10 -0
- package/src/theme/tokens/config.ts +10 -0
- package/src/theme/tokens/cursor.ts +28 -0
- package/src/theme/tokens/durations.ts +25 -0
- package/src/theme/tokens/easings.ts +16 -0
- package/src/theme/tokens/font-sizes.ts +30 -0
- package/src/theme/tokens/font-weights.ts +31 -0
- package/src/theme/tokens/fonts.ts +8 -0
- package/src/theme/tokens/global-css.ts +18 -0
- package/src/theme/tokens/index.ts +37 -0
- package/src/theme/tokens/keyframes.ts +255 -0
- package/src/theme/tokens/letter-spacings.ts +19 -0
- package/src/theme/tokens/line-heights.ts +19 -0
- package/src/theme/tokens/radii.ts +13 -0
- package/src/theme/tokens/sizes.ts +51 -0
- package/src/theme/tokens/spacing.ts +20 -0
- package/src/theme/tokens/text-styles.ts +89 -0
- package/src/theme/tokens/z-index.ts +17 -0
- package/src/theme/utils/accent-utils.ts +8 -21
- package/src/theme/utils/bg-utils.ts +4 -6
- package/src/theme/utils/brand-utils.ts +6 -19
- package/src/theme/utils/core-utils.ts +91 -0
- package/src/theme/utils/floating-utils.ts +20 -39
- package/src/theme/utils/ghost-utils.ts +7 -21
- package/src/theme/utils/input-utils.ts +32 -37
- package/src/theme/utils/outline-utils.ts +4 -11
- package/src/theme/utils/surface-utils.ts +5 -19
- package/src/theme/utils/types.ts +1 -0
- package/src/toast/index.tsx +1 -1
- package/src/toast/toast.tsx +105 -0
- package/src/transition/index.ts +2 -8
- package/src/typography/Badge.tsx +15 -61
- package/src/typography/Code.tsx +16 -28
- package/src/typography/Heading.tsx +34 -19
- package/src/typography/Text.tsx +9 -6
- package/src/typography/{index.tsx → index.ts} +1 -0
- package/src/util/externals.tsx +13 -27
- package/tsconfig.json +5 -1
- package/src/accordion/Accordion.test.tsx +0 -20
- package/src/alert/BaseAlert.test.tsx +0 -37
- package/src/alert/BaseAlert.tsx +0 -34
- package/src/alert/ClosableAlert.test.tsx +0 -37
- package/src/alert/ClosableAlert.tsx +0 -85
- package/src/alert/ExpandableAlert.test.tsx +0 -84
- package/src/alert/StaticAlert.tsx +0 -33
- package/src/button/Button.test.tsx +0 -23
- package/src/datepicker/TimePicker.test.tsx +0 -74
- package/src/input/FormControl.tsx +0 -2
- package/src/input/FormErrorMessage.tsx +0 -95
- package/src/input/FormLabel.tsx +0 -11
- package/src/input/InfoSelect.tsx +0 -274
- package/src/input/InputElement.tsx +0 -44
- package/src/input/RadioGroup.tsx +0 -47
- package/src/layout/Divider.tsx +0 -27
- package/src/layout/RadioCardGroup.tsx +0 -79
- package/src/layout/Stack.tsx +0 -42
- package/src/loader/SkeletonCircle.tsx +0 -13
- package/src/loader/SkeletonText.tsx +0 -14
- package/src/media-controller/index.test.tsx +0 -59
- package/src/modal/Drawer.tsx +0 -120
- package/src/modal/FullScreenDrawer.tsx +0 -239
- package/src/modal/Modal.tsx +0 -15
- package/src/modal/ModalHeader.tsx +0 -31
- package/src/modal/SimpleDrawer.tsx +0 -51
- package/src/modal/index.tsx +0 -5
- package/src/nudge/WizardNudge.tsx +0 -107
- package/src/theme/components/accordion.ts +0 -102
- package/src/theme/components/alert-expandable.ts +0 -125
- package/src/theme/components/alert-service.ts +0 -98
- package/src/theme/components/alert.ts +0 -71
- package/src/theme/components/badge.ts +0 -109
- package/src/theme/components/breadcrumb.ts +0 -60
- package/src/theme/components/button.ts +0 -125
- package/src/theme/components/card-select.ts +0 -117
- package/src/theme/components/checkbox.ts +0 -88
- package/src/theme/components/choice-chip.ts +0 -161
- package/src/theme/components/close-button.ts +0 -48
- package/src/theme/components/code.ts +0 -17
- package/src/theme/components/datepicker.ts +0 -198
- package/src/theme/components/divider.ts +0 -50
- package/src/theme/components/drawer.ts +0 -95
- package/src/theme/components/fab.ts +0 -109
- package/src/theme/components/form-label.ts +0 -17
- package/src/theme/components/form.ts +0 -27
- package/src/theme/components/index.ts +0 -45
- package/src/theme/components/info-select.ts +0 -85
- package/src/theme/components/info-tag.ts +0 -63
- package/src/theme/components/input.ts +0 -28
- package/src/theme/components/line-icon.ts +0 -129
- package/src/theme/components/link.ts +0 -78
- package/src/theme/components/list.ts +0 -23
- package/src/theme/components/listbox.ts +0 -77
- package/src/theme/components/media-controller-button.ts +0 -97
- package/src/theme/components/modal.ts +0 -96
- package/src/theme/components/numeric-stepper.ts +0 -65
- package/src/theme/components/pagination.ts +0 -74
- package/src/theme/components/popover.ts +0 -68
- package/src/theme/components/pressable-card.ts +0 -72
- package/src/theme/components/progress-bar.ts +0 -47
- package/src/theme/components/progress-indicator.ts +0 -44
- package/src/theme/components/radio-card.ts +0 -134
- package/src/theme/components/radio.ts +0 -68
- package/src/theme/components/select.ts +0 -74
- package/src/theme/components/skeleton.ts +0 -40
- package/src/theme/components/static-card.ts +0 -82
- package/src/theme/components/stepper.ts +0 -100
- package/src/theme/components/switch.ts +0 -112
- package/src/theme/components/table.ts +0 -161
- package/src/theme/components/tabs.ts +0 -135
- package/src/theme/components/textarea.ts +0 -33
- package/src/theme/components/toast.ts +0 -28
- package/src/theme/components/travel-tag.ts +0 -256
- package/src/theme/foundations/borders.ts +0 -11
- package/src/theme/foundations/colors.ts +0 -12
- package/src/theme/foundations/config.ts +0 -5
- package/src/theme/foundations/fontSizes.ts +0 -29
- package/src/theme/foundations/fontWeights.ts +0 -5
- package/src/theme/foundations/fonts.ts +0 -7
- package/src/theme/foundations/index.ts +0 -15
- package/src/theme/foundations/lineHeights.ts +0 -6
- package/src/theme/foundations/radii.ts +0 -12
- package/src/theme/foundations/shadows.ts +0 -8
- package/src/theme/foundations/sizes.ts +0 -36
- package/src/theme/foundations/spacing.ts +0 -31
- package/src/theme/foundations/styles.ts +0 -12
- package/src/theme/foundations/textStyles.ts +0 -74
- package/src/theme/foundations/zIndices.ts +0 -17
- package/src/theme/utils/base-utils.ts +0 -104
- package/src/theme/utils/focus-utils.ts +0 -10
- package/src/toast/ActionToast.test.tsx +0 -22
- package/src/toast/ActionToast.tsx +0 -28
- package/src/toast/BaseToast.test.tsx +0 -27
- package/src/toast/BaseToast.tsx +0 -75
- package/src/toast/ClosableToast.test.tsx +0 -17
- package/src/toast/ClosableToast.tsx +0 -40
- package/src/toast/useToast.tsx +0 -121
- package/src/tooltip/Tooltip.tsx +0 -70
- package/src/tooltip/index.tsx +0 -1
@@ -1,23 +0,0 @@
|
|
1
|
-
import { listAnatomy as parts } from "@chakra-ui/anatomy";
|
2
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
|
3
|
-
|
4
|
-
const { defineMultiStyleConfig, definePartsStyle } =
|
5
|
-
createMultiStyleConfigHelpers(parts.keys);
|
6
|
-
|
7
|
-
const baseStyle = definePartsStyle({
|
8
|
-
container: {
|
9
|
-
fontSize: ["mobile.sm", "desktop.sm"],
|
10
|
-
},
|
11
|
-
item: {
|
12
|
-
fontFamily: "body",
|
13
|
-
},
|
14
|
-
icon: {
|
15
|
-
marginEnd: "2",
|
16
|
-
display: "inline",
|
17
|
-
verticalAlign: "text-bottom",
|
18
|
-
},
|
19
|
-
});
|
20
|
-
|
21
|
-
export default defineMultiStyleConfig({
|
22
|
-
baseStyle,
|
23
|
-
});
|
@@ -1,77 +0,0 @@
|
|
1
|
-
import { anatomy } from "@chakra-ui/anatomy";
|
2
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
|
-
import { baseBorder } from "../utils/base-utils";
|
4
|
-
import { ghostBackground, ghostText } from "../utils/ghost-utils";
|
5
|
-
import { surface } from "../utils/surface-utils";
|
6
|
-
import { outlineBorder } from "../utils/outline-utils";
|
7
|
-
import { floatingBorder } from "../utils/floating-utils";
|
8
|
-
|
9
|
-
const parts = anatomy("ListBox").parts(
|
10
|
-
"container",
|
11
|
-
"item",
|
12
|
-
"label",
|
13
|
-
"description",
|
14
|
-
);
|
15
|
-
|
16
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
17
|
-
|
18
|
-
const config = helpers.defineMultiStyleConfig({
|
19
|
-
baseStyle: (props) => ({
|
20
|
-
container: {
|
21
|
-
...surface("default", props),
|
22
|
-
boxShadow: "sm",
|
23
|
-
overflowY: "auto",
|
24
|
-
maxHeight: "50vh",
|
25
|
-
width: "100%",
|
26
|
-
listStyle: "none",
|
27
|
-
borderBottomRadius: "sm",
|
28
|
-
},
|
29
|
-
item: {
|
30
|
-
paddingX: 2,
|
31
|
-
paddingY: 1,
|
32
|
-
marginY: 1,
|
33
|
-
marginX: 1,
|
34
|
-
borderRadius: "sm",
|
35
|
-
...ghostText("default", props),
|
36
|
-
cursor: "pointer",
|
37
|
-
outline: "none",
|
38
|
-
_active: {
|
39
|
-
...ghostBackground("active", props),
|
40
|
-
},
|
41
|
-
_focusVisible: {
|
42
|
-
...outlineBorder("focus", props),
|
43
|
-
},
|
44
|
-
_hover: {
|
45
|
-
...ghostBackground("hover", props),
|
46
|
-
},
|
47
|
-
_selected: {
|
48
|
-
...ghostBackground("active", props),
|
49
|
-
},
|
50
|
-
},
|
51
|
-
label: {},
|
52
|
-
description: {
|
53
|
-
fontSize: ["mobile.xs", "desktop.xs"],
|
54
|
-
...ghostText("default", props),
|
55
|
-
"[aria-selected='true'] &": {
|
56
|
-
...ghostText("selected", props),
|
57
|
-
},
|
58
|
-
},
|
59
|
-
}),
|
60
|
-
variants: {
|
61
|
-
base: (props) => ({
|
62
|
-
container: {
|
63
|
-
...baseBorder("default", props),
|
64
|
-
},
|
65
|
-
}),
|
66
|
-
floating: (props) => ({
|
67
|
-
container: {
|
68
|
-
...floatingBorder("default", props),
|
69
|
-
},
|
70
|
-
}),
|
71
|
-
},
|
72
|
-
defaultProps: {
|
73
|
-
variant: "base",
|
74
|
-
},
|
75
|
-
});
|
76
|
-
|
77
|
-
export default config;
|
@@ -1,97 +0,0 @@
|
|
1
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
2
|
-
import { anatomy, mode } from "@chakra-ui/theme-tools";
|
3
|
-
import { baseText } from "../utils/base-utils";
|
4
|
-
import { brandBackground, brandText } from "../utils/brand-utils";
|
5
|
-
import { focusVisibleStyles } from "../utils/focus-utils";
|
6
|
-
import { ghostBackground } from "../utils/ghost-utils";
|
7
|
-
import { surface } from "../utils/surface-utils";
|
8
|
-
|
9
|
-
const parts = anatomy("media-controller-button").parts("container", "icon");
|
10
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
11
|
-
|
12
|
-
const config = helpers.defineMultiStyleConfig({
|
13
|
-
baseStyle: (props) => ({
|
14
|
-
container: {
|
15
|
-
fontSize: 30,
|
16
|
-
transitionProperty: "common",
|
17
|
-
transitionDuration: "fast",
|
18
|
-
borderRadius: "round",
|
19
|
-
appearance: "none",
|
20
|
-
background: "transparent",
|
21
|
-
border: "none",
|
22
|
-
cursor: "pointer",
|
23
|
-
display: "flex",
|
24
|
-
padding: 1,
|
25
|
-
alignSelf: "center",
|
26
|
-
// The SVG icon color is set to the brand background color, due to how SVGs work
|
27
|
-
color: brandBackground("default", props).backgroundColor,
|
28
|
-
...focusVisibleStyles(props),
|
29
|
-
},
|
30
|
-
icon: {
|
31
|
-
flex: "0 0 auto",
|
32
|
-
display: "block",
|
33
|
-
width: "1em",
|
34
|
-
height: "1em",
|
35
|
-
},
|
36
|
-
}),
|
37
|
-
variants: {
|
38
|
-
play: (props) => ({
|
39
|
-
container: {
|
40
|
-
padding: 0,
|
41
|
-
...brandText("default", props),
|
42
|
-
...brandBackground("default", props),
|
43
|
-
_hover: {
|
44
|
-
...brandText("default", props),
|
45
|
-
...brandBackground("hover", props),
|
46
|
-
},
|
47
|
-
_active: {
|
48
|
-
...brandText("default", props),
|
49
|
-
...brandBackground("active", props),
|
50
|
-
},
|
51
|
-
|
52
|
-
_disabled: {
|
53
|
-
pointerEvents: "none",
|
54
|
-
color: mode("icon.disabled.light", "icon.disabled.dark")(props),
|
55
|
-
...surface("disabled", props),
|
56
|
-
},
|
57
|
-
},
|
58
|
-
}),
|
59
|
-
jumpSkip: (props) => ({
|
60
|
-
container: {
|
61
|
-
_hover: {
|
62
|
-
...ghostBackground("hover", props),
|
63
|
-
},
|
64
|
-
_active: {
|
65
|
-
...ghostBackground("active", props),
|
66
|
-
},
|
67
|
-
_disabled: {
|
68
|
-
pointerEvents: "none",
|
69
|
-
...surface("disabled", props),
|
70
|
-
...baseText("disabled", props),
|
71
|
-
},
|
72
|
-
},
|
73
|
-
icon: {
|
74
|
-
width: "0.71em",
|
75
|
-
height: "0.71em",
|
76
|
-
},
|
77
|
-
}),
|
78
|
-
},
|
79
|
-
sizes: {
|
80
|
-
sm: (props) => ({
|
81
|
-
container: {
|
82
|
-
fontSize: props.variant === "play" ? 24 : 42,
|
83
|
-
width: props.variant === "play" ? "2.625rem" : undefined,
|
84
|
-
height: props.variant === "play" ? "2.625rem" : undefined,
|
85
|
-
},
|
86
|
-
}),
|
87
|
-
lg: (props) => ({
|
88
|
-
container: {
|
89
|
-
fontSize: props.variant === "play" ? 38 : 60,
|
90
|
-
width: props.variant === "play" ? "3.75rem" : undefined,
|
91
|
-
height: props.variant === "play" ? "3.75rem" : undefined,
|
92
|
-
},
|
93
|
-
}),
|
94
|
-
},
|
95
|
-
});
|
96
|
-
|
97
|
-
export default config;
|
@@ -1,96 +0,0 @@
|
|
1
|
-
import { modalAnatomy as parts } from "@chakra-ui/anatomy";
|
2
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
|
-
import { type PartsStyleObject } from "@chakra-ui/theme-tools";
|
4
|
-
import { baseText } from "../utils/base-utils";
|
5
|
-
import { bg } from "../utils/bg-utils";
|
6
|
-
|
7
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
8
|
-
|
9
|
-
const config = helpers.defineMultiStyleConfig({
|
10
|
-
baseStyle: (props) => ({
|
11
|
-
overlay: {
|
12
|
-
backgroundColor: "blackAlpha.600",
|
13
|
-
zIndex: "modal",
|
14
|
-
},
|
15
|
-
dialogContainer: {
|
16
|
-
display: "flex",
|
17
|
-
zIndex: "modal",
|
18
|
-
justifyContent: "center",
|
19
|
-
alignItems: props.isCentered ? "center" : "flex-start",
|
20
|
-
overflow: props.scrollBehavior === "inside" ? "hidden" : "auto",
|
21
|
-
},
|
22
|
-
dialog: {
|
23
|
-
borderRadius: "md",
|
24
|
-
...bg("default", props),
|
25
|
-
...baseText("default", props),
|
26
|
-
marginY: "3.75rem",
|
27
|
-
zIndex: "modal",
|
28
|
-
maxHeight:
|
29
|
-
props.scrollBehavior === "inside" ? "calc(100% - 7.5rem)" : undefined,
|
30
|
-
boxShadow: "md",
|
31
|
-
},
|
32
|
-
header: {
|
33
|
-
paddingX: 5,
|
34
|
-
paddingTop: 6,
|
35
|
-
paddingBottom: 2,
|
36
|
-
fontWeight: "bold",
|
37
|
-
fontFamily: "body",
|
38
|
-
},
|
39
|
-
closeButton: {
|
40
|
-
position: "absolute",
|
41
|
-
color: "inherit",
|
42
|
-
top: 3,
|
43
|
-
insetEnd: 3,
|
44
|
-
},
|
45
|
-
body: {
|
46
|
-
paddingX: 5,
|
47
|
-
paddingBottom: 6,
|
48
|
-
flex: 1,
|
49
|
-
overflow: props.scrollBehavior === "inside" ? "auto" : undefined,
|
50
|
-
},
|
51
|
-
footer: {
|
52
|
-
paddingX: 3,
|
53
|
-
paddingBottom: 3,
|
54
|
-
},
|
55
|
-
}),
|
56
|
-
sizes: {
|
57
|
-
xs: getSize("xs"),
|
58
|
-
sm: getSize("sm"),
|
59
|
-
md: getSize("md"),
|
60
|
-
lg: getSize("lg"),
|
61
|
-
xl: getSize("xl"),
|
62
|
-
"2xl": getSize("2xl"),
|
63
|
-
"3xl": getSize("3xl"),
|
64
|
-
"4xl": getSize("4xl"),
|
65
|
-
"5xl": getSize("5xl"),
|
66
|
-
"6xl": getSize("6xl"),
|
67
|
-
full: getSize("full"),
|
68
|
-
},
|
69
|
-
defaultProps: {
|
70
|
-
size: "md",
|
71
|
-
},
|
72
|
-
});
|
73
|
-
|
74
|
-
export default config;
|
75
|
-
|
76
|
-
/**
|
77
|
-
* Since the `maxWidth` prop references theme.sizes internally,
|
78
|
-
* we can leverage that to size our modals.
|
79
|
-
*/
|
80
|
-
function getSize(value: string): PartsStyleObject<typeof parts> {
|
81
|
-
if (value === "full") {
|
82
|
-
return {
|
83
|
-
dialog: {
|
84
|
-
maxWidth: "100vw",
|
85
|
-
minHeight: "100vh",
|
86
|
-
"@supports(min-height: -webkit-fill-available)": {
|
87
|
-
minHeight: "-webkit-fill-available",
|
88
|
-
},
|
89
|
-
marginY: 0,
|
90
|
-
},
|
91
|
-
};
|
92
|
-
}
|
93
|
-
return {
|
94
|
-
dialog: { maxWidth: value },
|
95
|
-
};
|
96
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { anatomy } from "@chakra-ui/anatomy";
|
2
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
|
-
import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
|
4
|
-
import { focusVisibleStyles } from "../utils/focus-utils";
|
5
|
-
|
6
|
-
const parts = anatomy("NumericStepper").parts(
|
7
|
-
"container",
|
8
|
-
"button",
|
9
|
-
"text",
|
10
|
-
"input",
|
11
|
-
);
|
12
|
-
|
13
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
14
|
-
|
15
|
-
const config = helpers.defineMultiStyleConfig({
|
16
|
-
baseStyle: (props) => ({
|
17
|
-
container: {
|
18
|
-
display: "flex",
|
19
|
-
flexDirection: "row",
|
20
|
-
alignItems: "center",
|
21
|
-
},
|
22
|
-
input: {
|
23
|
-
fontSize: "sm",
|
24
|
-
fontWeight: "bold",
|
25
|
-
marginX: 1,
|
26
|
-
paddingX: 1,
|
27
|
-
borderRadius: "xs",
|
28
|
-
textAlign: "center",
|
29
|
-
transitionProperty: "common",
|
30
|
-
transitionDuration: "fast",
|
31
|
-
...baseText("default", props),
|
32
|
-
...baseBackground("default", props),
|
33
|
-
|
34
|
-
_disabled: {
|
35
|
-
pointerEvents: "none",
|
36
|
-
opacity: 0.5,
|
37
|
-
},
|
38
|
-
|
39
|
-
_hover: {
|
40
|
-
...baseBorder("default", props),
|
41
|
-
},
|
42
|
-
|
43
|
-
_active: {
|
44
|
-
...baseBackground("active", props),
|
45
|
-
},
|
46
|
-
|
47
|
-
...focusVisibleStyles(props),
|
48
|
-
},
|
49
|
-
text: {
|
50
|
-
fontSize: "sm",
|
51
|
-
fontWeight: "bold",
|
52
|
-
marginX: 1,
|
53
|
-
paddingX: 1,
|
54
|
-
textAlign: "center",
|
55
|
-
width: "4ch",
|
56
|
-
...baseText("default", props),
|
57
|
-
},
|
58
|
-
button: {
|
59
|
-
minWidth: "24px",
|
60
|
-
minHeight: "24px",
|
61
|
-
},
|
62
|
-
}),
|
63
|
-
});
|
64
|
-
|
65
|
-
export default config;
|
@@ -1,74 +0,0 @@
|
|
1
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
2
|
-
import { anatomy } from "@chakra-ui/theme-tools";
|
3
|
-
import { ghostBackground } from "../utils/ghost-utils";
|
4
|
-
import { baseText } from "../utils/base-utils";
|
5
|
-
|
6
|
-
const parts = anatomy("Pagination").parts(
|
7
|
-
"listItem",
|
8
|
-
"link",
|
9
|
-
"activeButton",
|
10
|
-
"disabled",
|
11
|
-
"icon",
|
12
|
-
);
|
13
|
-
|
14
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
15
|
-
|
16
|
-
const config = helpers.defineMultiStyleConfig({
|
17
|
-
baseStyle: (props: any) => ({
|
18
|
-
activeButton: {
|
19
|
-
fontWeight: "bold",
|
20
|
-
...commonStyles,
|
21
|
-
...ghostBackground("active", props),
|
22
|
-
_hover: {
|
23
|
-
...ghostBackground("hover", props),
|
24
|
-
borderRadius: 50,
|
25
|
-
},
|
26
|
-
_active: {
|
27
|
-
borderRadius: 50,
|
28
|
-
...ghostBackground("active", props),
|
29
|
-
},
|
30
|
-
},
|
31
|
-
disabled: {
|
32
|
-
...commonStyles,
|
33
|
-
cursor: "not-allowed",
|
34
|
-
pointerEvents: "none",
|
35
|
-
boxShadow: "none",
|
36
|
-
...baseText("disabled", props),
|
37
|
-
},
|
38
|
-
listItem: {
|
39
|
-
display: "flex",
|
40
|
-
},
|
41
|
-
link: {
|
42
|
-
...commonStyles,
|
43
|
-
...ghostBackground("default", props),
|
44
|
-
...baseText("default", props),
|
45
|
-
_hover: {
|
46
|
-
...ghostBackground("hover", props),
|
47
|
-
borderRadius: 50,
|
48
|
-
_disabled: {
|
49
|
-
...baseText("disabled", props),
|
50
|
-
},
|
51
|
-
},
|
52
|
-
_active: {
|
53
|
-
borderRadius: 50,
|
54
|
-
...ghostBackground("active", props),
|
55
|
-
},
|
56
|
-
},
|
57
|
-
icon: {
|
58
|
-
bottom: "-0.03em !important",
|
59
|
-
},
|
60
|
-
}),
|
61
|
-
});
|
62
|
-
|
63
|
-
const commonStyles = {
|
64
|
-
display: "flex",
|
65
|
-
alignItems: "center",
|
66
|
-
justifyContent: "center",
|
67
|
-
width: 5,
|
68
|
-
height: 5,
|
69
|
-
backgroundImage: "none",
|
70
|
-
borderRadius: 50,
|
71
|
-
fontSize: "xs",
|
72
|
-
};
|
73
|
-
|
74
|
-
export default config;
|
@@ -1,68 +0,0 @@
|
|
1
|
-
import { popoverAnatomy as parts } from "@chakra-ui/anatomy";
|
2
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
3
|
-
import { cssVar, mode } from "@chakra-ui/theme-tools";
|
4
|
-
import { focusVisibleStyles } from "../utils/focus-utils";
|
5
|
-
|
6
|
-
const $popperBg = cssVar("popper-bg");
|
7
|
-
const $arrowBg = cssVar("popper-arrow-bg");
|
8
|
-
const $arrowShadowColor = cssVar("popper-arrow-shadow-color");
|
9
|
-
|
10
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
11
|
-
|
12
|
-
const config = helpers.defineMultiStyleConfig({
|
13
|
-
baseStyle: (props) => ({
|
14
|
-
popper: {
|
15
|
-
zIndex: "popover",
|
16
|
-
},
|
17
|
-
content: {
|
18
|
-
[$popperBg.variable]: mode(
|
19
|
-
"colors.surface.tertiary.light",
|
20
|
-
"colors.surface.tertiary.dark",
|
21
|
-
)(props),
|
22
|
-
backgroundColor: $popperBg.reference,
|
23
|
-
[$arrowBg.variable]: $popperBg.reference,
|
24
|
-
[$arrowShadowColor.variable]: "colors.blackAlpha.300",
|
25
|
-
color: "white", // TODO: Should this be a semantic token? Where does it fit in?
|
26
|
-
borderRadius: "sm",
|
27
|
-
padding: 1.5,
|
28
|
-
zIndex: "inherit",
|
29
|
-
maxWidth: "20em",
|
30
|
-
},
|
31
|
-
arrow: {
|
32
|
-
backgroundColor: "transparent",
|
33
|
-
boxShadow: "none",
|
34
|
-
clipPath:
|
35
|
-
"path('M 0 0 Q 2.4 6 0 12 Q 6 9.6 12 12 Q 9.6 6 12 0 Q 6 2.4 0 0 z')",
|
36
|
-
},
|
37
|
-
closeButton: {
|
38
|
-
position: "absolute",
|
39
|
-
color: "white",
|
40
|
-
...focusVisibleStyles(props),
|
41
|
-
_hover: {
|
42
|
-
backgroundColor: "whiteAlpha.100",
|
43
|
-
},
|
44
|
-
_active: {
|
45
|
-
backgroundColor: "whiteAlpha.200",
|
46
|
-
},
|
47
|
-
borderRadius: "sm",
|
48
|
-
top: 2,
|
49
|
-
right: 1,
|
50
|
-
},
|
51
|
-
}),
|
52
|
-
sizes: {
|
53
|
-
sm: {
|
54
|
-
content: {
|
55
|
-
paddingX: 1.5,
|
56
|
-
paddingY: 1,
|
57
|
-
},
|
58
|
-
},
|
59
|
-
lg: {
|
60
|
-
content: {
|
61
|
-
paddingX: 3,
|
62
|
-
paddingY: 2,
|
63
|
-
},
|
64
|
-
},
|
65
|
-
},
|
66
|
-
});
|
67
|
-
|
68
|
-
export default config;
|
@@ -1,72 +0,0 @@
|
|
1
|
-
import { defineStyleConfig } from "@chakra-ui/react";
|
2
|
-
import { baseBackground, baseBorder, baseText } from "../utils/base-utils";
|
3
|
-
import { floatingBackground, floatingBorder } from "../utils/floating-utils";
|
4
|
-
import { focusVisibleStyles } from "../utils/focus-utils";
|
5
|
-
import { accentBackground, accentText } from "../utils/accent-utils";
|
6
|
-
|
7
|
-
const config = defineStyleConfig({
|
8
|
-
baseStyle: (props) => ({
|
9
|
-
appearance: "none",
|
10
|
-
border: "none",
|
11
|
-
overflow: "hidden",
|
12
|
-
fontSize: "inherit",
|
13
|
-
display: "block",
|
14
|
-
borderRadius: "md",
|
15
|
-
cursor: "pointer",
|
16
|
-
transitionProperty: "common",
|
17
|
-
transitionDuration: "fast",
|
18
|
-
"button&, a&, label&, &.is-clickable": {
|
19
|
-
...focusVisibleStyles(props),
|
20
|
-
},
|
21
|
-
_disabled: {
|
22
|
-
...baseBackground("disabled", props),
|
23
|
-
...baseBorder("disabled", props),
|
24
|
-
...baseText("disabled", props),
|
25
|
-
outline: "none",
|
26
|
-
pointerEvents: "none",
|
27
|
-
},
|
28
|
-
}),
|
29
|
-
variants: {
|
30
|
-
base: (props) => ({
|
31
|
-
cursor: "pointer",
|
32
|
-
...baseBorder("default", props),
|
33
|
-
_hover: {
|
34
|
-
...baseBorder("hover", props),
|
35
|
-
},
|
36
|
-
_active: {
|
37
|
-
...baseBackground("active", props),
|
38
|
-
...baseBorder("active", props),
|
39
|
-
},
|
40
|
-
}),
|
41
|
-
accent: (props) => ({
|
42
|
-
...accentText("default", props),
|
43
|
-
...accentBackground("default", props),
|
44
|
-
boxShadow: "sm",
|
45
|
-
_hover: {
|
46
|
-
...accentBackground("hover", props),
|
47
|
-
boxShadow: "md",
|
48
|
-
},
|
49
|
-
_active: {
|
50
|
-
...accentBackground("active", props),
|
51
|
-
boxShadow: "none",
|
52
|
-
},
|
53
|
-
}),
|
54
|
-
floating: (props) => ({
|
55
|
-
...floatingBackground("default", props),
|
56
|
-
...floatingBorder("default", props),
|
57
|
-
boxShadow: "sm",
|
58
|
-
_hover: {
|
59
|
-
...floatingBackground("hover", props),
|
60
|
-
...floatingBorder("hover", props),
|
61
|
-
boxShadow: "md",
|
62
|
-
},
|
63
|
-
_active: {
|
64
|
-
...floatingBorder("default", props),
|
65
|
-
...floatingBackground("active", props),
|
66
|
-
boxShadow: "none",
|
67
|
-
},
|
68
|
-
}),
|
69
|
-
},
|
70
|
-
});
|
71
|
-
|
72
|
-
export default config;
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { anatomy } from "@chakra-ui/anatomy";
|
2
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/styled-system";
|
3
|
-
import { mode } from "@chakra-ui/theme-tools";
|
4
|
-
|
5
|
-
const parts = anatomy("progressBar").parts(
|
6
|
-
"container",
|
7
|
-
"background",
|
8
|
-
"progress",
|
9
|
-
"description",
|
10
|
-
);
|
11
|
-
|
12
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
13
|
-
const config = helpers.defineMultiStyleConfig({
|
14
|
-
baseStyle: (props) => ({
|
15
|
-
container: {
|
16
|
-
minWidth: "100px",
|
17
|
-
},
|
18
|
-
background: {
|
19
|
-
display: "flex",
|
20
|
-
backgroundColor: props.isActive
|
21
|
-
? mode(
|
22
|
-
"brand.surface.default.dark",
|
23
|
-
"brand.surface.default.light",
|
24
|
-
)(props)
|
25
|
-
: undefined,
|
26
|
-
borderRadius: "sm",
|
27
|
-
justifyContent: "flex-start",
|
28
|
-
marginX: "auto",
|
29
|
-
},
|
30
|
-
progress: {
|
31
|
-
backgroundColor: props.isActive
|
32
|
-
? mode("brand.surface.active.light", "brand.surface.active.dark")(props)
|
33
|
-
: mode("icon.disabled.light", "icon.disabled.dark")(props),
|
34
|
-
borderRadius: "sm",
|
35
|
-
maxWidth: "100%",
|
36
|
-
transition: "width .2s ease-out",
|
37
|
-
},
|
38
|
-
description: {
|
39
|
-
textAlign: "center",
|
40
|
-
marginTop: 2,
|
41
|
-
marginX: "auto",
|
42
|
-
fontWeight: "bold",
|
43
|
-
},
|
44
|
-
}),
|
45
|
-
});
|
46
|
-
|
47
|
-
export default config;
|
@@ -1,44 +0,0 @@
|
|
1
|
-
import { createMultiStyleConfigHelpers } from "@chakra-ui/react";
|
2
|
-
import { anatomy, mode } from "@chakra-ui/theme-tools";
|
3
|
-
|
4
|
-
const parts = anatomy("progress-indicator").parts(
|
5
|
-
"root",
|
6
|
-
"container",
|
7
|
-
"progressDot",
|
8
|
-
);
|
9
|
-
|
10
|
-
const helpers = createMultiStyleConfigHelpers(parts.keys);
|
11
|
-
|
12
|
-
const config = helpers.defineMultiStyleConfig({
|
13
|
-
baseStyle: (props) => ({
|
14
|
-
root: {
|
15
|
-
width: "100%",
|
16
|
-
},
|
17
|
-
container: {
|
18
|
-
display: "flex",
|
19
|
-
alignItems: "center",
|
20
|
-
gap: 1,
|
21
|
-
justifyContent: ["space-between", "center"],
|
22
|
-
},
|
23
|
-
progressDot: {
|
24
|
-
height: 1,
|
25
|
-
width: 1,
|
26
|
-
"&[aria-current='step']": {
|
27
|
-
circle: {
|
28
|
-
fill: mode(
|
29
|
-
"brand.surface.default.light",
|
30
|
-
"brand.surface.default.dark",
|
31
|
-
)(props),
|
32
|
-
},
|
33
|
-
},
|
34
|
-
circle: {
|
35
|
-
fill: mode("icon.disabled.light", "icon.disabled.dark")(props),
|
36
|
-
},
|
37
|
-
},
|
38
|
-
}),
|
39
|
-
defaultProps: {
|
40
|
-
variant: "base",
|
41
|
-
},
|
42
|
-
});
|
43
|
-
|
44
|
-
export default config;
|