@commercetools/nimbus 0.0.1 → 0.0.3-alpha.2
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/dist/index.d.ts +1412 -0
- package/dist/index.js +22451 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.cjs +27 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +74 -40
- package/.storybook/apca-check/index.ts +0 -150
- package/.storybook/main.ts +0 -64
- package/.storybook/preview.tsx +0 -92
- package/.storybook/vitest.setup.ts +0 -13
- package/docs/architecture-decisions/adr-0001-consumer-component-apis.md +0 -177
- package/docs/architecture-decisions/adr-0002-compound-component-extraction.md +0 -82
- package/src/components/accordion/accordion-context.tsx +0 -17
- package/src/components/accordion/accordion.mdx +0 -172
- package/src/components/accordion/accordion.recipe.tsx +0 -98
- package/src/components/accordion/accordion.slots.tsx +0 -39
- package/src/components/accordion/accordion.stories.tsx +0 -188
- package/src/components/accordion/accordion.tsx +0 -16
- package/src/components/accordion/accordion.types.tsx +0 -54
- package/src/components/accordion/components/accordion-content.tsx +0 -28
- package/src/components/accordion/components/accordion-group.tsx +0 -27
- package/src/components/accordion/components/accordion-header.tsx +0 -63
- package/src/components/accordion/components/accordion-item.tsx +0 -87
- package/src/components/accordion/index.ts +0 -2
- package/src/components/alert/alert.mdx +0 -92
- package/src/components/alert/alert.recipe.tsx +0 -65
- package/src/components/alert/alert.slots.tsx +0 -46
- package/src/components/alert/alert.stories.tsx +0 -308
- package/src/components/alert/alert.tsx +0 -18
- package/src/components/alert/alert.types.tsx +0 -70
- package/src/components/alert/components/alert.actions.tsx +0 -27
- package/src/components/alert/components/alert.description.tsx +0 -27
- package/src/components/alert/components/alert.dismiss-button.tsx +0 -41
- package/src/components/alert/components/alert.root.tsx +0 -92
- package/src/components/alert/components/alert.title.tsx +0 -29
- package/src/components/alert/index.ts +0 -2
- package/src/components/avatar/avatar.mdx +0 -80
- package/src/components/avatar/avatar.recipe.tsx +0 -36
- package/src/components/avatar/avatar.slots.tsx +0 -16
- package/src/components/avatar/avatar.stories.tsx +0 -136
- package/src/components/avatar/avatar.tsx +0 -34
- package/src/components/avatar/avatar.types.ts +0 -33
- package/src/components/avatar/index.ts +0 -2
- package/src/components/badge/badge.mdx +0 -91
- package/src/components/badge/badge.recipe.tsx +0 -72
- package/src/components/badge/badge.slots.tsx +0 -8
- package/src/components/badge/badge.stories.tsx +0 -124
- package/src/components/badge/badge.tsx +0 -35
- package/src/components/badge/badge.types.tsx +0 -40
- package/src/components/badge/index.ts +0 -2
- package/src/components/bleed/bleed.tsx +0 -1
- package/src/components/bleed/index.ts +0 -1
- package/src/components/box/box.mdx +0 -115
- package/src/components/box/box.stories.tsx +0 -71
- package/src/components/box/box.tsx +0 -11
- package/src/components/box/index.ts +0 -1
- package/src/components/button/button.mdx +0 -169
- package/src/components/button/button.recipe.ts +0 -185
- package/src/components/button/button.slots.tsx +0 -45
- package/src/components/button/button.stories.tsx +0 -369
- package/src/components/button/button.tsx +0 -37
- package/src/components/button/button.types.ts +0 -14
- package/src/components/button/index.ts +0 -2
- package/src/components/card/card.mdx +0 -92
- package/src/components/card/card.recipe.tsx +0 -71
- package/src/components/card/card.slots.tsx +0 -50
- package/src/components/card/card.stories.tsx +0 -175
- package/src/components/card/card.tsx +0 -9
- package/src/components/card/card.types.ts +0 -22
- package/src/components/card/components/card.content.tsx +0 -29
- package/src/components/card/components/card.header.tsx +0 -28
- package/src/components/card/components/card.root.tsx +0 -62
- package/src/components/card/index.ts +0 -2
- package/src/components/checkbox/checkbox.mdx +0 -78
- package/src/components/checkbox/checkbox.recipe.tsx +0 -116
- package/src/components/checkbox/checkbox.slots.tsx +0 -33
- package/src/components/checkbox/checkbox.stories.tsx +0 -200
- package/src/components/checkbox/checkbox.tsx +0 -77
- package/src/components/checkbox/checkbox.types.tsx +0 -22
- package/src/components/checkbox/index.ts +0 -2
- package/src/components/code/code.mdx +0 -17
- package/src/components/code/code.recipe.ts +0 -63
- package/src/components/code/code.tsx +0 -1
- package/src/components/code/index.ts +0 -1
- package/src/components/dialog/dialog.mdx +0 -20
- package/src/components/dialog/dialog.recipe.ts +0 -254
- package/src/components/dialog/dialog.tsx +0 -61
- package/src/components/dialog/index.ts +0 -1
- package/src/components/em/em.mdx +0 -17
- package/src/components/em/em.tsx +0 -1
- package/src/components/em/index.ts +0 -1
- package/src/components/flex/flex.mdx +0 -41
- package/src/components/flex/flex.tsx +0 -1
- package/src/components/flex/index.ts +0 -1
- package/src/components/grid/grid.mdx +0 -156
- package/src/components/grid/grid.stories.tsx +0 -151
- package/src/components/grid/grid.tsx +0 -29
- package/src/components/grid/index.ts +0 -1
- package/src/components/heading/heading.mdx +0 -23
- package/src/components/heading/heading.recipe.ts +0 -49
- package/src/components/heading/heading.tsx +0 -1
- package/src/components/heading/index.ts +0 -1
- package/src/components/highlight/highlight.mdx +0 -18
- package/src/components/highlight/highlight.tsx +0 -1
- package/src/components/highlight/index.ts +0 -1
- package/src/components/icon-button/icon-button.mdx +0 -98
- package/src/components/icon-button/icon-button.stories.tsx +0 -188
- package/src/components/icon-button/icon-button.tsx +0 -21
- package/src/components/icon-button/icon-button.types.tsx +0 -10
- package/src/components/icon-button/index.ts +0 -2
- package/src/components/index.ts +0 -33
- package/src/components/input/index.ts +0 -1
- package/src/components/input/input.mdx +0 -20
- package/src/components/input/input.recipe.ts +0 -95
- package/src/components/input/input.tsx +0 -1
- package/src/components/input-group/index.ts +0 -1
- package/src/components/input-group/input-group.mdx +0 -20
- package/src/components/input-group/input-group.tsx +0 -44
- package/src/components/kbd/index.ts +0 -1
- package/src/components/kbd/kbd.mdx +0 -18
- package/src/components/kbd/kbd.recipe.ts +0 -57
- package/src/components/kbd/kbd.tsx +0 -1
- package/src/components/link/index.ts +0 -2
- package/src/components/link/link.mdx +0 -77
- package/src/components/link/link.recipe.ts +0 -52
- package/src/components/link/link.slots.tsx +0 -29
- package/src/components/link/link.stories.tsx +0 -204
- package/src/components/link/link.tsx +0 -38
- package/src/components/link/link.types.tsx +0 -26
- package/src/components/list/index.ts +0 -1
- package/src/components/list/list.mdx +0 -18
- package/src/components/list/list.recipe.ts +0 -68
- package/src/components/list/list.tsx +0 -9
- package/src/components/loading-spinner/index.ts +0 -2
- package/src/components/loading-spinner/loading-spinner.mdx +0 -92
- package/src/components/loading-spinner/loading-spinner.recipe.tsx +0 -70
- package/src/components/loading-spinner/loading-spinner.slots.tsx +0 -38
- package/src/components/loading-spinner/loading-spinner.stories.tsx +0 -97
- package/src/components/loading-spinner/loading-spinner.tsx +0 -50
- package/src/components/loading-spinner/loading-spinner.types.tsx +0 -21
- package/src/components/nimbus-provider/color-mode.tsx +0 -32
- package/src/components/nimbus-provider/index.ts +0 -2
- package/src/components/nimbus-provider/nimbus-provider.mdx +0 -21
- package/src/components/nimbus-provider/nimbus-provider.tsx +0 -51
- package/src/components/select/components/select.clear-button.tsx +0 -31
- package/src/components/select/components/select.option-group.tsx +0 -48
- package/src/components/select/components/select.option.tsx +0 -21
- package/src/components/select/components/select.options.tsx +0 -23
- package/src/components/select/components/select.root.tsx +0 -81
- package/src/components/select/index.ts +0 -2
- package/src/components/select/select.mdx +0 -170
- package/src/components/select/select.recipe.tsx +0 -216
- package/src/components/select/select.slots.tsx +0 -58
- package/src/components/select/select.stories.tsx +0 -841
- package/src/components/select/select.tsx +0 -18
- package/src/components/select/select.types.tsx +0 -37
- package/src/components/simple-grid/index.ts +0 -1
- package/src/components/simple-grid/simple-grid.mdx +0 -133
- package/src/components/simple-grid/simple-grid.stories.tsx +0 -143
- package/src/components/simple-grid/simple-grid.tsx +0 -31
- package/src/components/stack/index.ts +0 -1
- package/src/components/stack/stack.mdx +0 -88
- package/src/components/stack/stack.stories.tsx +0 -82
- package/src/components/stack/stack.tsx +0 -15
- package/src/components/table/index.ts +0 -1
- package/src/components/table/table.mdx +0 -23
- package/src/components/table/table.recipe.ts +0 -170
- package/src/components/table/table.tsx +0 -43
- package/src/components/text/index.ts +0 -1
- package/src/components/text/text.mdx +0 -244
- package/src/components/text/text.tsx +0 -23
- package/src/components/text-input/index.ts +0 -2
- package/src/components/text-input/text-input.mdx +0 -118
- package/src/components/text-input/text-input.recipe.tsx +0 -68
- package/src/components/text-input/text-input.slots.tsx +0 -24
- package/src/components/text-input/text-input.stories.tsx +0 -282
- package/src/components/text-input/text-input.tsx +0 -39
- package/src/components/text-input/text-input.types.ts +0 -7
- package/src/components/toggle-button-group/components/toggle-button-group.button.tsx +0 -14
- package/src/components/toggle-button-group/components/toggle-button-group.root.tsx +0 -15
- package/src/components/toggle-button-group/index.ts +0 -2
- package/src/components/toggle-button-group/toggle-button-group.mdx +0 -94
- package/src/components/toggle-button-group/toggle-button-group.recipe.tsx +0 -64
- package/src/components/toggle-button-group/toggle-button-group.slots.tsx +0 -26
- package/src/components/toggle-button-group/toggle-button-group.stories.tsx +0 -311
- package/src/components/toggle-button-group/toggle-button-group.tsx +0 -12
- package/src/components/toggle-button-group/toggle-button-group.types.tsx +0 -62
- package/src/components/tooltip/index.ts +0 -4
- package/src/components/tooltip/make-element-focusable.stories.tsx +0 -56
- package/src/components/tooltip/make-element-focusable.tsx +0 -57
- package/src/components/tooltip/tooltip-trigger.stories.tsx +0 -157
- package/src/components/tooltip/tooltip-trigger.tsx +0 -15
- package/src/components/tooltip/tooltip.mdx +0 -48
- package/src/components/tooltip/tooltip.recipe.ts +0 -26
- package/src/components/tooltip/tooltip.slots.ts +0 -35
- package/src/components/tooltip/tooltip.stories.tsx +0 -139
- package/src/components/tooltip/tooltip.tsx +0 -31
- package/src/components/tooltip/tooltip.types.ts +0 -44
- package/src/components/visually-hidden/index.ts +0 -1
- package/src/components/visually-hidden/visually-hidden.mdx +0 -61
- package/src/components/visually-hidden/visually-hidden.stories.tsx +0 -124
- package/src/components/visually-hidden/visually-hidden.tsx +0 -18
- package/src/docs/accessibility.mdx +0 -21
- package/src/docs/background.mdx +0 -154
- package/src/docs/border.mdx +0 -226
- package/src/docs/changelog.mdx +0 -17
- package/src/docs/components-layout.mdx +0 -22
- package/src/docs/components.mdx +0 -17
- package/src/docs/data-display.mdx +0 -23
- package/src/docs/display.mdx +0 -55
- package/src/docs/effects.mdx +0 -73
- package/src/docs/feedback.mdx +0 -22
- package/src/docs/filters.mdx +0 -268
- package/src/docs/flex-and-grid.mdx +0 -445
- package/src/docs/forms.mdx +0 -22
- package/src/docs/generated/index.mdx +0 -16
- package/src/docs/getting-started.mdx +0 -17
- package/src/docs/home.mdx +0 -56
- package/src/docs/hooks.mdx +0 -16
- package/src/docs/inputs.mdx +0 -21
- package/src/docs/installation.mdx +0 -60
- package/src/docs/interactivity.mdx +0 -278
- package/src/docs/known-issues.mdx +0 -19
- package/src/docs/layout.mdx +0 -301
- package/src/docs/list.mdx +0 -82
- package/src/docs/markdown.mdx +0 -234
- package/src/docs/media.mdx +0 -22
- package/src/docs/naivgation.mdx +0 -22
- package/src/docs/playground.mdx +0 -16
- package/src/docs/rfcs-component-structure-rfcs.mdx +0 -17
- package/src/docs/rfcs-component-structure.mdx +0 -74
- package/src/docs/rfcs-hook-structure.mdx +0 -59
- package/src/docs/sizing.mdx +0 -210
- package/src/docs/spacing.mdx +0 -193
- package/src/docs/style-props-typography.mdx +0 -373
- package/src/docs/style-props.mdx +0 -15
- package/src/docs/svg.mdx +0 -58
- package/src/docs/tables.mdx +0 -95
- package/src/docs/toc.mdx +0 -39
- package/src/docs/tokens/animations.mdx +0 -68
- package/src/docs/tokens/aspect-ratios.mdx +0 -21
- package/src/docs/tokens/blurs.mdx +0 -20
- package/src/docs/tokens/borders.mdx +0 -25
- package/src/docs/tokens/breakpoints.mdx +0 -35
- package/src/docs/tokens/colors.mdx +0 -86
- package/src/docs/tokens/cursors.mdx +0 -21
- package/src/docs/tokens/radii.mdx +0 -23
- package/src/docs/tokens/shadows.mdx +0 -21
- package/src/docs/tokens/sizes.mdx +0 -54
- package/src/docs/tokens/spacing.mdx +0 -35
- package/src/docs/tokens/typography.mdx +0 -61
- package/src/docs/tokens/z-indices.mdx +0 -23
- package/src/docs/tokens-other.mdx +0 -17
- package/src/docs/tokens.mdx +0 -16
- package/src/docs/transforms.mdx +0 -150
- package/src/docs/transitions.mdx +0 -164
- package/src/docs/typography.mdx +0 -17
- package/src/docs/utilities.mdx +0 -17
- package/src/hooks/index.ts +0 -2
- package/src/hooks/use-copy-to-clipboard/use-copy-to-clipboard.mdx +0 -54
- package/src/hooks/use-copy-to-clipboard/use-copy-to-clipboard.ts +0 -1
- package/src/hooks/use-hotkeys/use-hotkeys.mdx +0 -48
- package/src/hooks/use-hotkeys/use-hotkeys.stories.tsx +0 -69
- package/src/hooks/use-hotkeys/use-hotkeys.ts +0 -1
- package/src/index.ts +0 -3
- package/src/test/utils.tsx +0 -20
- package/src/theme/animation-styles.ts +0 -52
- package/src/theme/breakpoints.ts +0 -32
- package/src/theme/global-css.ts +0 -53
- package/src/theme/index.ts +0 -35
- package/src/theme/keyframes.ts +0 -192
- package/src/theme/layer-styles.ts +0 -12
- package/src/theme/recipes/index.ts +0 -21
- package/src/theme/semantic-tokens/colors.ts +0 -55
- package/src/theme/semantic-tokens/index.ts +0 -9
- package/src/theme/semantic-tokens/radii.ts +0 -3
- package/src/theme/semantic-tokens/shadows.ts +0 -4
- package/src/theme/slot-recipes/index.ts +0 -15
- package/src/theme/text-styles.ts +0 -8
- package/src/theme/tokens/animations.ts +0 -4
- package/src/theme/tokens/aspect-ratios.ts +0 -5
- package/src/theme/tokens/blurs.ts +0 -5
- package/src/theme/tokens/borders.ts +0 -4
- package/src/theme/tokens/colors.ts +0 -8
- package/src/theme/tokens/cursor.ts +0 -4
- package/src/theme/tokens/durations.ts +0 -4
- package/src/theme/tokens/easings.ts +0 -4
- package/src/theme/tokens/font-sizes.ts +0 -4
- package/src/theme/tokens/font-weights.ts +0 -4
- package/src/theme/tokens/fonts.ts +0 -4
- package/src/theme/tokens/index.ts +0 -57
- package/src/theme/tokens/letter-spacings.ts +0 -24
- package/src/theme/tokens/line-heights.ts +0 -4
- package/src/theme/tokens/radii.ts +0 -4
- package/src/theme/tokens/sizes.ts +0 -120
- package/src/theme/tokens/spacing.ts +0 -4
- package/src/theme/tokens/z-index.ts +0 -4
- package/src/utils/extractStyleProps.ts +0 -26
- package/src/utils/fixedForwardRef.ts +0 -17
- package/tsconfig.json +0 -38
- package/vite.config.ts +0 -54
- package/vitest.config.ts +0 -50
package/src/theme/keyframes.ts
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
export const keyframes = {
|
|
2
|
-
spin: {
|
|
3
|
-
"0%": {
|
|
4
|
-
transform: "rotate(0deg)",
|
|
5
|
-
},
|
|
6
|
-
"100%": {
|
|
7
|
-
transform: "rotate(360deg)",
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
pulse: {
|
|
11
|
-
"50%": {
|
|
12
|
-
opacity: "0.5",
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
ping: {
|
|
16
|
-
"75%, 100%": {
|
|
17
|
-
transform: "scale(2)",
|
|
18
|
-
opacity: "0",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
bounce: {
|
|
22
|
-
"0%, 100%": {
|
|
23
|
-
transform: "translateY(-25%)",
|
|
24
|
-
animationTimingFunction: "cubic-bezier(0.8,0,1,1)",
|
|
25
|
-
},
|
|
26
|
-
"50%": {
|
|
27
|
-
transform: "none",
|
|
28
|
-
animationTimingFunction: "cubic-bezier(0,0,0.2,1)",
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
"fade-in": {
|
|
33
|
-
from: {
|
|
34
|
-
opacity: 0,
|
|
35
|
-
},
|
|
36
|
-
to: {
|
|
37
|
-
opacity: 1,
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
"fade-out": {
|
|
41
|
-
from: {
|
|
42
|
-
opacity: 1,
|
|
43
|
-
},
|
|
44
|
-
to: {
|
|
45
|
-
opacity: 0,
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
"slide-from-left-full": {
|
|
49
|
-
from: {
|
|
50
|
-
translate: "-100% 0",
|
|
51
|
-
},
|
|
52
|
-
to: {
|
|
53
|
-
translate: "0 0",
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
"slide-from-right-full": {
|
|
57
|
-
from: {
|
|
58
|
-
translate: "100% 0",
|
|
59
|
-
},
|
|
60
|
-
to: {
|
|
61
|
-
translate: "0 0",
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
"slide-from-top-full": {
|
|
65
|
-
from: {
|
|
66
|
-
translate: "0 -100%",
|
|
67
|
-
},
|
|
68
|
-
to: {
|
|
69
|
-
translate: "0 0",
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
"slide-from-bottom-full": {
|
|
73
|
-
from: {
|
|
74
|
-
translate: "0 100%",
|
|
75
|
-
},
|
|
76
|
-
to: {
|
|
77
|
-
translate: "0 0",
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
"slide-to-left-full": {
|
|
81
|
-
from: {
|
|
82
|
-
translate: "0 0",
|
|
83
|
-
},
|
|
84
|
-
to: {
|
|
85
|
-
translate: "-100% 0",
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
"slide-to-right-full": {
|
|
89
|
-
from: {
|
|
90
|
-
translate: "0 0",
|
|
91
|
-
},
|
|
92
|
-
to: {
|
|
93
|
-
translate: "100% 0",
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
"slide-to-top-full": {
|
|
97
|
-
from: {
|
|
98
|
-
translate: "0 0",
|
|
99
|
-
},
|
|
100
|
-
to: {
|
|
101
|
-
translate: "0 -100%",
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
"slide-to-bottom-full": {
|
|
105
|
-
from: {
|
|
106
|
-
translate: "0 0",
|
|
107
|
-
},
|
|
108
|
-
to: {
|
|
109
|
-
translate: "0 100%",
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
"slide-from-top": {
|
|
113
|
-
"0%": {
|
|
114
|
-
translate: "0 -0.5rem",
|
|
115
|
-
},
|
|
116
|
-
to: {
|
|
117
|
-
translate: "0",
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
"slide-from-bottom": {
|
|
121
|
-
"0%": {
|
|
122
|
-
translate: "0 0.5rem",
|
|
123
|
-
},
|
|
124
|
-
to: {
|
|
125
|
-
translate: "0",
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
"slide-from-left": {
|
|
129
|
-
"0%": {
|
|
130
|
-
translate: "-0.5rem 0",
|
|
131
|
-
},
|
|
132
|
-
to: {
|
|
133
|
-
translate: "0",
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
"slide-from-right": {
|
|
137
|
-
"0%": {
|
|
138
|
-
translate: "0.5rem 0",
|
|
139
|
-
},
|
|
140
|
-
to: {
|
|
141
|
-
translate: "0",
|
|
142
|
-
},
|
|
143
|
-
},
|
|
144
|
-
"slide-to-top": {
|
|
145
|
-
"0%": {
|
|
146
|
-
translate: "0",
|
|
147
|
-
},
|
|
148
|
-
to: {
|
|
149
|
-
translate: "0 -0.5rem",
|
|
150
|
-
},
|
|
151
|
-
},
|
|
152
|
-
"slide-to-bottom": {
|
|
153
|
-
"0%": {
|
|
154
|
-
translate: "0",
|
|
155
|
-
},
|
|
156
|
-
to: {
|
|
157
|
-
translate: "0 0.5rem",
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
"slide-to-left": {
|
|
161
|
-
"0%": {
|
|
162
|
-
translate: "0",
|
|
163
|
-
},
|
|
164
|
-
to: {
|
|
165
|
-
translate: "-0.5rem 0",
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
"slide-to-right": {
|
|
169
|
-
"0%": {
|
|
170
|
-
translate: "0",
|
|
171
|
-
},
|
|
172
|
-
to: {
|
|
173
|
-
translate: "0.5rem 0",
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
"scale-in": {
|
|
177
|
-
from: {
|
|
178
|
-
scale: "0.95",
|
|
179
|
-
},
|
|
180
|
-
to: {
|
|
181
|
-
scale: "1",
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
"scale-out": {
|
|
185
|
-
from: {
|
|
186
|
-
scale: "1",
|
|
187
|
-
},
|
|
188
|
-
to: {
|
|
189
|
-
scale: "0.95",
|
|
190
|
-
},
|
|
191
|
-
},
|
|
192
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { defineLayerStyles } from "@chakra-ui/react";
|
|
2
|
-
|
|
3
|
-
type LayerStylesType = ReturnType<typeof defineLayerStyles>;
|
|
4
|
-
|
|
5
|
-
export const layerStyles: LayerStylesType = defineLayerStyles({
|
|
6
|
-
disabled: {
|
|
7
|
-
value: {
|
|
8
|
-
opacity: "0.5",
|
|
9
|
-
cursor: "not-allowed",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
});
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { avatarRecipe } from "@/components/avatar/avatar.recipe";
|
|
2
|
-
import { buttonRecipe } from "@/components/button/button.recipe";
|
|
3
|
-
import { codeRecipe } from "@/components/code/code.recipe";
|
|
4
|
-
import { headingRecipe } from "@/components/heading/heading.recipe";
|
|
5
|
-
import { inputRecipe } from "@/components/input/input.recipe";
|
|
6
|
-
import { kbdRecipe } from "@/components/kbd/kbd.recipe";
|
|
7
|
-
import { linkRecipe } from "@/components/link/link.recipe";
|
|
8
|
-
import { tooltipRecipe } from "@/components/tooltip/tooltip.recipe";
|
|
9
|
-
import { textInputRecipe } from "@/components/text-input/text-input.recipe";
|
|
10
|
-
|
|
11
|
-
export const recipes = {
|
|
12
|
-
avatar: avatarRecipe,
|
|
13
|
-
button: buttonRecipe,
|
|
14
|
-
code: codeRecipe,
|
|
15
|
-
heading: headingRecipe,
|
|
16
|
-
input: inputRecipe,
|
|
17
|
-
kbd: kbdRecipe,
|
|
18
|
-
link: linkRecipe,
|
|
19
|
-
tooltip: tooltipRecipe,
|
|
20
|
-
textInput: textInputRecipe,
|
|
21
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { defineSemanticTokens } from "@chakra-ui/react";
|
|
2
|
-
import { themeTokens } from "@commercetools/nimbus-tokens";
|
|
3
|
-
|
|
4
|
-
export const colors = defineSemanticTokens.colors({
|
|
5
|
-
bg: {
|
|
6
|
-
DEFAULT: {
|
|
7
|
-
value: {
|
|
8
|
-
_light: "{colors.neutral.1}",
|
|
9
|
-
_dark: "{colors.neutral.1}",
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
fg: {
|
|
14
|
-
DEFAULT: {
|
|
15
|
-
value: {
|
|
16
|
-
_light: "{colors.neutral.12}",
|
|
17
|
-
_dark: "{colors.neutral.12}",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
border: {
|
|
22
|
-
DEFAULT: {
|
|
23
|
-
value: "{colors.neutral.6}",
|
|
24
|
-
},
|
|
25
|
-
muted: {
|
|
26
|
-
value: "{colors.neutral.7}",
|
|
27
|
-
},
|
|
28
|
-
subtle: {
|
|
29
|
-
value: "{colors.neutral.6}",
|
|
30
|
-
},
|
|
31
|
-
emphasized: {
|
|
32
|
-
value: "{colors.neutral.8}",
|
|
33
|
-
},
|
|
34
|
-
inverted: {
|
|
35
|
-
value: "{colors.neutral.9}",
|
|
36
|
-
},
|
|
37
|
-
error: {
|
|
38
|
-
value: "{colors.error.8}",
|
|
39
|
-
},
|
|
40
|
-
warning: {
|
|
41
|
-
value: "{colors.danger.8}",
|
|
42
|
-
},
|
|
43
|
-
success: {
|
|
44
|
-
value: "{colors.success.8}",
|
|
45
|
-
},
|
|
46
|
-
info: {
|
|
47
|
-
value: "{colors.ingo.8}",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
...themeTokens.color["system-palettes"],
|
|
51
|
-
...themeTokens.color["brand-palettes"],
|
|
52
|
-
...themeTokens.color["semantic-palettes"],
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
export const darkColors = colors;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { dialogSlotRecipe } from "@/components/dialog/dialog.recipe";
|
|
2
|
-
import { listSlotRecipe } from "@/components/list/list.recipe";
|
|
3
|
-
import { tableSlotRecipe } from "@/components/table/table.recipe";
|
|
4
|
-
import { checkboxSlotRecipe } from "@/components/checkbox/checkbox.recipe";
|
|
5
|
-
import { selectSlotRecipe } from "@/components/select/select.recipe";
|
|
6
|
-
import { accordionSlotRecipe } from "@/components/accordion/accordion.recipe";
|
|
7
|
-
|
|
8
|
-
export const slotRecipes = {
|
|
9
|
-
dialog: dialogSlotRecipe,
|
|
10
|
-
list: listSlotRecipe,
|
|
11
|
-
table: tableSlotRecipe,
|
|
12
|
-
checkbox: checkboxSlotRecipe,
|
|
13
|
-
select: selectSlotRecipe,
|
|
14
|
-
accordion: accordionSlotRecipe,
|
|
15
|
-
};
|
package/src/theme/text-styles.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { defineTextStyles } from "@chakra-ui/react";
|
|
2
|
-
import { themeTokens } from "@commercetools/nimbus-tokens";
|
|
3
|
-
|
|
4
|
-
type TextStylesType = ReturnType<typeof defineTextStyles>;
|
|
5
|
-
|
|
6
|
-
export const textStyles: TextStylesType = defineTextStyles(
|
|
7
|
-
themeTokens.textStyle
|
|
8
|
-
);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { aspectRatios } from "./aspect-ratios";
|
|
2
|
-
import { animations } from "./animations";
|
|
3
|
-
import { blurs } from "./blurs";
|
|
4
|
-
import { borders } from "./borders";
|
|
5
|
-
import { colors, darkColors } from "./colors";
|
|
6
|
-
import { durations } from "./durations";
|
|
7
|
-
import { easings } from "./easings";
|
|
8
|
-
import { fonts } from "./fonts";
|
|
9
|
-
import { fontSizes } from "./font-sizes";
|
|
10
|
-
import { fontWeights } from "./font-weights";
|
|
11
|
-
import { letterSpacings } from "./letter-spacings";
|
|
12
|
-
import { lineHeights } from "./line-heights";
|
|
13
|
-
import { radii } from "./radii";
|
|
14
|
-
import { spacing } from "./spacing";
|
|
15
|
-
import { sizes } from "./sizes";
|
|
16
|
-
import { zIndex } from "./z-index";
|
|
17
|
-
import { cursor } from "./cursor";
|
|
18
|
-
|
|
19
|
-
export const tokens = {
|
|
20
|
-
aspectRatios,
|
|
21
|
-
animations,
|
|
22
|
-
blurs,
|
|
23
|
-
borders,
|
|
24
|
-
colors,
|
|
25
|
-
durations,
|
|
26
|
-
easings,
|
|
27
|
-
fonts,
|
|
28
|
-
fontSizes,
|
|
29
|
-
fontWeights,
|
|
30
|
-
letterSpacings,
|
|
31
|
-
lineHeights,
|
|
32
|
-
radii,
|
|
33
|
-
spacing,
|
|
34
|
-
sizes,
|
|
35
|
-
zIndex,
|
|
36
|
-
cursor,
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export const darkTokens = {
|
|
40
|
-
aspectRatios,
|
|
41
|
-
animations,
|
|
42
|
-
blurs,
|
|
43
|
-
borders,
|
|
44
|
-
colors: darkColors,
|
|
45
|
-
durations,
|
|
46
|
-
easings,
|
|
47
|
-
fonts,
|
|
48
|
-
fontSizes,
|
|
49
|
-
fontWeights,
|
|
50
|
-
letterSpacings,
|
|
51
|
-
lineHeights,
|
|
52
|
-
radii,
|
|
53
|
-
spacing,
|
|
54
|
-
sizes,
|
|
55
|
-
zIndex,
|
|
56
|
-
cursor,
|
|
57
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { defineTokens } from "@chakra-ui/react";
|
|
2
|
-
import { themeTokens } from "@commercetools/nimbus-tokens";
|
|
3
|
-
|
|
4
|
-
// convert token percentage values (needed by figma) to em values (needded by code)
|
|
5
|
-
// todo: fix this in the token build process
|
|
6
|
-
const convertPercentToEm = (
|
|
7
|
-
obj: Record<string, { value: string }>
|
|
8
|
-
): Record<string, { value: string }> => {
|
|
9
|
-
return Object.keys(obj).reduce(
|
|
10
|
-
(acc, key) => {
|
|
11
|
-
// Remove '%' and divide by 100 to convert to em
|
|
12
|
-
const percentage = parseFloat(obj[key].value);
|
|
13
|
-
const emValue = percentage / 100; // 1% = 0.01em, 100% = 1em
|
|
14
|
-
// Update the object with the new em value
|
|
15
|
-
acc[key] = { value: `${emValue}em` };
|
|
16
|
-
return acc;
|
|
17
|
-
},
|
|
18
|
-
{} as Record<string, { value: string }>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export const letterSpacings = defineTokens.letterSpacings(
|
|
23
|
-
convertPercentToEm(themeTokens.letterSpacing)
|
|
24
|
-
);
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { defineTokens } from "@chakra-ui/react";
|
|
2
|
-
import { themeTokens } from "@commercetools/nimbus-tokens";
|
|
3
|
-
|
|
4
|
-
export const sizes = defineTokens.sizes({
|
|
5
|
-
...themeTokens.size,
|
|
6
|
-
"1/2": {
|
|
7
|
-
value: "50%",
|
|
8
|
-
},
|
|
9
|
-
"1/3": {
|
|
10
|
-
value: "33.333333%",
|
|
11
|
-
},
|
|
12
|
-
"2/3": {
|
|
13
|
-
value: "66.666667%",
|
|
14
|
-
},
|
|
15
|
-
"1/4": {
|
|
16
|
-
value: "25%",
|
|
17
|
-
},
|
|
18
|
-
"3/4": {
|
|
19
|
-
value: "75%",
|
|
20
|
-
},
|
|
21
|
-
"1/5": {
|
|
22
|
-
value: "20%",
|
|
23
|
-
},
|
|
24
|
-
"2/5": {
|
|
25
|
-
value: "40%",
|
|
26
|
-
},
|
|
27
|
-
"3/5": {
|
|
28
|
-
value: "60%",
|
|
29
|
-
},
|
|
30
|
-
"4/5": {
|
|
31
|
-
value: "80%",
|
|
32
|
-
},
|
|
33
|
-
"1/6": {
|
|
34
|
-
value: "16.666667%",
|
|
35
|
-
},
|
|
36
|
-
"2/6": {
|
|
37
|
-
value: "33.333333%",
|
|
38
|
-
},
|
|
39
|
-
"3/6": {
|
|
40
|
-
value: "50%",
|
|
41
|
-
},
|
|
42
|
-
"4/6": {
|
|
43
|
-
value: "66.666667%",
|
|
44
|
-
},
|
|
45
|
-
"5/6": {
|
|
46
|
-
value: "83.333333%",
|
|
47
|
-
},
|
|
48
|
-
"1/12": {
|
|
49
|
-
value: "8.333333%",
|
|
50
|
-
},
|
|
51
|
-
"2/12": {
|
|
52
|
-
value: "16.666667%",
|
|
53
|
-
},
|
|
54
|
-
"3/12": {
|
|
55
|
-
value: "25%",
|
|
56
|
-
},
|
|
57
|
-
"4/12": {
|
|
58
|
-
value: "33.333333%",
|
|
59
|
-
},
|
|
60
|
-
"5/12": {
|
|
61
|
-
value: "41.666667%",
|
|
62
|
-
},
|
|
63
|
-
"6/12": {
|
|
64
|
-
value: "50%",
|
|
65
|
-
},
|
|
66
|
-
"7/12": {
|
|
67
|
-
value: "58.333333%",
|
|
68
|
-
},
|
|
69
|
-
"8/12": {
|
|
70
|
-
value: "66.666667%",
|
|
71
|
-
},
|
|
72
|
-
"9/12": {
|
|
73
|
-
value: "75%",
|
|
74
|
-
},
|
|
75
|
-
"10/12": {
|
|
76
|
-
value: "83.333333%",
|
|
77
|
-
},
|
|
78
|
-
"11/12": {
|
|
79
|
-
value: "91.666667%",
|
|
80
|
-
},
|
|
81
|
-
max: {
|
|
82
|
-
value: "max-content",
|
|
83
|
-
},
|
|
84
|
-
min: {
|
|
85
|
-
value: "min-content",
|
|
86
|
-
},
|
|
87
|
-
fit: {
|
|
88
|
-
value: "fit-content",
|
|
89
|
-
},
|
|
90
|
-
prose: {
|
|
91
|
-
value: "60ch",
|
|
92
|
-
},
|
|
93
|
-
full: {
|
|
94
|
-
value: "100%",
|
|
95
|
-
},
|
|
96
|
-
dvh: {
|
|
97
|
-
value: "100dvh",
|
|
98
|
-
},
|
|
99
|
-
svh: {
|
|
100
|
-
value: "100svh",
|
|
101
|
-
},
|
|
102
|
-
lvh: {
|
|
103
|
-
value: "100lvh",
|
|
104
|
-
},
|
|
105
|
-
dvw: {
|
|
106
|
-
value: "100dvw",
|
|
107
|
-
},
|
|
108
|
-
svw: {
|
|
109
|
-
value: "100svw",
|
|
110
|
-
},
|
|
111
|
-
lvw: {
|
|
112
|
-
value: "100lvw",
|
|
113
|
-
},
|
|
114
|
-
vw: {
|
|
115
|
-
value: "100vw",
|
|
116
|
-
},
|
|
117
|
-
vh: {
|
|
118
|
-
value: "100vh",
|
|
119
|
-
},
|
|
120
|
-
});
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { defaultSystem } from "@chakra-ui/react";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Extracts chakra-ui style-props from an object, separating them from other props
|
|
5
|
-
* @param props The props object to separate
|
|
6
|
-
* @returns A tuple containing [styleProps, otherProps]
|
|
7
|
-
*/
|
|
8
|
-
export function extractStyleProps<T extends object>(
|
|
9
|
-
props: T
|
|
10
|
-
): [Record<string, unknown>, Omit<T, string>] {
|
|
11
|
-
const styleProps: Record<string, unknown> = {};
|
|
12
|
-
const otherProps = { ...props } as Record<string, unknown>;
|
|
13
|
-
|
|
14
|
-
// Process only own properties
|
|
15
|
-
Object.keys(props).forEach((key) => {
|
|
16
|
-
if (
|
|
17
|
-
Object.prototype.hasOwnProperty.call(props, key) &&
|
|
18
|
-
defaultSystem.isValidProperty(key)
|
|
19
|
-
) {
|
|
20
|
-
styleProps[key] = props[key as keyof T];
|
|
21
|
-
delete otherProps[key];
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return [styleProps, otherProps as Omit<T, string>];
|
|
26
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { forwardRef } from "react";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* This is a workaround to fix the type of `forwardRef`.
|
|
5
|
-
* The issue is that the type of `forwardRef` is not correct when using generics.
|
|
6
|
-
*
|
|
7
|
-
* While not ideal from a type-safety perspective, it's necessary because
|
|
8
|
-
* TypeScript cannot properly express the transformation that happens when
|
|
9
|
-
* combining generics with `forwardRef`.
|
|
10
|
-
*/
|
|
11
|
-
export const fixedForwardRef = <T, P extends object>(
|
|
12
|
-
render: (props: P, ref: React.Ref<T>) => JSX.Element
|
|
13
|
-
): ((props: P & React.RefAttributes<T>) => JSX.Element) => {
|
|
14
|
-
// @ts-expect-error - This tells TypeScript to "trust us" about the resulting type.
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any
|
|
16
|
-
return forwardRef(render) as any;
|
|
17
|
-
};
|