@commercetools/nimbus 0.0.2 → 0.0.3
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 +11183 -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 +63 -39
- 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/docs/forms.mdx
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Forms
|
|
3
|
-
title: Forms
|
|
4
|
-
description: components useful for assembling forms
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 4
|
|
7
|
-
menu:
|
|
8
|
-
- Components
|
|
9
|
-
- Inputs
|
|
10
|
-
tags:
|
|
11
|
-
- forms
|
|
12
|
-
icon: Input
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Inputs
|
|
16
|
-
|
|
17
|
-
Components for user input and interaction.
|
|
18
|
-
|
|
19
|
-
- **Text Inputs**: e.g., InputField, TextArea.
|
|
20
|
-
- **Selection Controls**: e.g., Dropdown, Checkbox, RadioButton.
|
|
21
|
-
- **Buttons**: e.g., Button, IconButton, ToggleButton.
|
|
22
|
-
- **Sliders & Pickers**: e.g., RangeSlider, DatePicker, TimePicker.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: AI1733919690376
|
|
3
|
-
title: Unsorted Generated Content
|
|
4
|
-
description: Index page for generated content.
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 999
|
|
7
|
-
menu:
|
|
8
|
-
- Unsorted
|
|
9
|
-
tags:
|
|
10
|
-
- unsorted
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Unsorted
|
|
14
|
-
|
|
15
|
-
Documents here are generated and not sorted yet. Please sort them into the
|
|
16
|
-
correct category.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Home-Getting Started
|
|
3
|
-
title: Getting Started
|
|
4
|
-
description: Quick start guide to set up and use the package.
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 2
|
|
7
|
-
menu:
|
|
8
|
-
- Home
|
|
9
|
-
- Getting started
|
|
10
|
-
tags:
|
|
11
|
-
- document
|
|
12
|
-
icon: Rocket
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Getting Started
|
|
16
|
-
|
|
17
|
-
Quick start guide to set up and use the package.
|
package/src/docs/home.mdx
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Home
|
|
3
|
-
title: Home
|
|
4
|
-
description: Start here if you're new.
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 1
|
|
7
|
-
menu:
|
|
8
|
-
- Home
|
|
9
|
-
tags:
|
|
10
|
-
- forms
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# Hello!
|
|
14
|
-
|
|
15
|
-
This repository aims to solve 2 problems:
|
|
16
|
-
|
|
17
|
-
1. Provide everything necessary to create beautiful, accessible and resilient
|
|
18
|
-
user-interfaces.
|
|
19
|
-
2. Document all the bits and pieces that make that happen.
|
|
20
|
-
|
|
21
|
-
The repository is currently structured into 3 workspaces, 1 app-workspace and 2
|
|
22
|
-
package-workspaces.
|
|
23
|
-
|
|
24
|
-
## Apps
|
|
25
|
-
|
|
26
|
-
### docs
|
|
27
|
-
|
|
28
|
-
The doc-app is a developer tool for creating and managing content-driven web
|
|
29
|
-
applications by leveraging MDX files, structured metadata, and reusable UI
|
|
30
|
-
components.
|
|
31
|
-
|
|
32
|
-
- **Web Frontend**: The app generates a web-based frontend for browsing and
|
|
33
|
-
interacting with the content.
|
|
34
|
-
- **Development Environment**: A development server allows users to edit
|
|
35
|
-
documents and add images directly through their browser.
|
|
36
|
-
- **Content Indexing**: The app scans designated folders for MDX documents,
|
|
37
|
-
automatically generating and linking pages.
|
|
38
|
-
- **Content Organization**: Frontmatter in MDX files provides metadata for
|
|
39
|
-
structuring menus and annotating content, enabling flexible organization.
|
|
40
|
-
- **UI Component Integration**: The app utilizes components from
|
|
41
|
-
`@commercetools/nimbus`, demonstrating how to create polished frontends with
|
|
42
|
-
this UI library.
|
|
43
|
-
|
|
44
|
-
## Packages
|
|
45
|
-
|
|
46
|
-
Currently this two packages contain the mentioned bits and pieces, reusable
|
|
47
|
-
across several frontends:
|
|
48
|
-
|
|
49
|
-
### @commercetools/nimbus
|
|
50
|
-
|
|
51
|
-
This package contains react components & hooks, as well as a ct-tailored
|
|
52
|
-
default-theme.
|
|
53
|
-
|
|
54
|
-
### @commercetools/nimbus-icons
|
|
55
|
-
|
|
56
|
-
This package contains icons for many different scenarios.
|
package/src/docs/hooks.mdx
DELETED
package/src/docs/inputs.mdx
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Components-Forms
|
|
3
|
-
title: Forms
|
|
4
|
-
description: Components specifically tailored for form creation and management.
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 9
|
|
7
|
-
menu:
|
|
8
|
-
- Components
|
|
9
|
-
- Forms
|
|
10
|
-
tags:
|
|
11
|
-
- document
|
|
12
|
-
icon: DynamicForm
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
# Forms
|
|
16
|
-
|
|
17
|
-
Components specifically tailored for form creation and management.
|
|
18
|
-
|
|
19
|
-
- **Fieldsets**: e.g., FormGroup, FieldSet.
|
|
20
|
-
- **Validation Components**: e.g., ValidationMessage, FormError.
|
|
21
|
-
- **Action Controls**: e.g., SubmitButton, ResetButton.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Home-Installation
|
|
3
|
-
title: Installation
|
|
4
|
-
description: Learn how to install @commercetools/nimbus and its dependencies.
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 1
|
|
7
|
-
menu:
|
|
8
|
-
- Home
|
|
9
|
-
- Installation
|
|
10
|
-
tags:
|
|
11
|
-
- document
|
|
12
|
-
icon: Download
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Development Setup
|
|
16
|
-
|
|
17
|
-
### Installation
|
|
18
|
-
|
|
19
|
-
Make sure you fulfill the requirements below and install dependencies with the
|
|
20
|
-
provided command.
|
|
21
|
-
|
|
22
|
-
#### Requirements
|
|
23
|
-
|
|
24
|
-
The following software needs to be installed on your system before you can
|
|
25
|
-
proceed:
|
|
26
|
-
|
|
27
|
-
- Node v20+
|
|
28
|
-
- pnpm v9+
|
|
29
|
-
|
|
30
|
-
#### Install dependencies
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
$ pnpm install
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Development
|
|
37
|
-
|
|
38
|
-
1. If you just set up the repository, do an initial [build](#build).
|
|
39
|
-
2. Start the development environment with the following command
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
$ pnpm run dev
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
1. Open the documentation app in the
|
|
46
|
-
browser: [http://localhost:5173/](http://localhost:5173/)
|
|
47
|
-
|
|
48
|
-
### Build
|
|
49
|
-
|
|
50
|
-
To build packages & the documentation app:
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
$ pnpm run build
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
To only build packages:
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
$ pnpm run build-packages
|
|
60
|
-
```
|
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Style Props-Interactivity
|
|
3
|
-
title: Interactivity
|
|
4
|
-
description: JSX style props to enhance interactivity on an element
|
|
5
|
-
documentState: InitialDraft
|
|
6
|
-
order: 999
|
|
7
|
-
menu:
|
|
8
|
-
- Style Props
|
|
9
|
-
- Interactivity
|
|
10
|
-
tags:
|
|
11
|
-
- document
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
# Interactivity
|
|
15
|
-
|
|
16
|
-
JSX style props to enhance interactivity on an element
|
|
17
|
-
|
|
18
|
-
## Accent Color
|
|
19
|
-
|
|
20
|
-
Use the `accentColor` prop to set the accent color for browser generated
|
|
21
|
-
user-interface controls.
|
|
22
|
-
|
|
23
|
-
```jsx
|
|
24
|
-
// hardcoded
|
|
25
|
-
<label>
|
|
26
|
-
<chakra.input type="checkbox" accentColor="#3b82f6" />
|
|
27
|
-
</label>
|
|
28
|
-
|
|
29
|
-
// token value
|
|
30
|
-
<label>
|
|
31
|
-
<chakra.input type="checkbox" accentColor="blue.500" />
|
|
32
|
-
</label>
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
| Prop | CSS Property | Token Category |
|
|
36
|
-
| ------------- | -------------- | -------------- |
|
|
37
|
-
| `accentColor` | `accent-color` | `colors` |
|
|
38
|
-
|
|
39
|
-
## Appearance
|
|
40
|
-
|
|
41
|
-
Use the `appearance` prop to set the appearance of an element.
|
|
42
|
-
|
|
43
|
-
```jsx
|
|
44
|
-
<chakra.select appearance="none">
|
|
45
|
-
<option value="1">Option 1</option>
|
|
46
|
-
<option value="2">Option 2</option>
|
|
47
|
-
<option value="3">Option 3</option>
|
|
48
|
-
</chakra.select>
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
| Prop | CSS Property | Token Category |
|
|
52
|
-
| ------------ | ------------ | -------------- |
|
|
53
|
-
| `appearance` | `appearance` | - |
|
|
54
|
-
|
|
55
|
-
## Caret Color
|
|
56
|
-
|
|
57
|
-
Use the `caretColor` prop to set the color of the text cursor (caret) in an
|
|
58
|
-
input or textarea
|
|
59
|
-
|
|
60
|
-
```jsx
|
|
61
|
-
// hardcoded
|
|
62
|
-
<chakra.input caretColor="#3b82f6" />
|
|
63
|
-
|
|
64
|
-
// token value
|
|
65
|
-
<chakra.input caretColor="blue.500" />
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
| Prop | CSS Property | Token Category |
|
|
69
|
-
| ------------ | ------------- | -------------- |
|
|
70
|
-
| `caretColor` | `caret-color` | `colors` |
|
|
71
|
-
|
|
72
|
-
## Cursor
|
|
73
|
-
|
|
74
|
-
Use the `cursor` prop to set the mouse cursor image to show when the mouse
|
|
75
|
-
pointer is over an element.
|
|
76
|
-
|
|
77
|
-
```jsx
|
|
78
|
-
<Box cursor="pointer" />
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
| Prop | CSS Property | Token Category |
|
|
82
|
-
| -------- | ------------ | -------------- |
|
|
83
|
-
| `cursor` | `cursor` | - |
|
|
84
|
-
|
|
85
|
-
## Pointer Events
|
|
86
|
-
|
|
87
|
-
Use the `pointerEvents` prop to control how pointer events are handled on an
|
|
88
|
-
element.
|
|
89
|
-
|
|
90
|
-
```jsx
|
|
91
|
-
<Box pointerEvents="none">Can't click me</Box>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
| Prop | CSS Property | Token Category |
|
|
95
|
-
| --------------- | ---------------- | -------------- |
|
|
96
|
-
| `pointerEvents` | `pointer-events` | - |
|
|
97
|
-
|
|
98
|
-
## Resize
|
|
99
|
-
|
|
100
|
-
Use the `resize` prop to control whether an element is resizable, and if so, in
|
|
101
|
-
which directions.
|
|
102
|
-
|
|
103
|
-
```jsx
|
|
104
|
-
<chakra.textarea resize="both" />
|
|
105
|
-
<chakra.textarea resize="horizontal" />
|
|
106
|
-
<chakra.textarea resize="vertical" />
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
| Prop | CSS Property | Token Category |
|
|
110
|
-
| -------- | ------------ | -------------- |
|
|
111
|
-
| `resize` | `resize` | - |
|
|
112
|
-
|
|
113
|
-
## Scrollbar
|
|
114
|
-
|
|
115
|
-
Use the `scrollbar` prop to customize the appearance of scrollbars.
|
|
116
|
-
|
|
117
|
-
```jsx
|
|
118
|
-
<Box scrollbar="hidden" maxH="100px" overflowY="auto">
|
|
119
|
-
Scrollbar hidden
|
|
120
|
-
</Box>
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Scroll Behavior
|
|
124
|
-
|
|
125
|
-
Use the `scrollBehavior` prop to set the behavior for a scrolling box when
|
|
126
|
-
scrolling is triggered by the navigation or JavaScript code.
|
|
127
|
-
|
|
128
|
-
```jsx
|
|
129
|
-
<Box maxH="100px" overflowY="auto" scrollBehavior="smooth">
|
|
130
|
-
<div>Scroll me</div>
|
|
131
|
-
</Box>
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
| Prop | CSS Property | Token Category |
|
|
135
|
-
| ---------------- | ----------------- | -------------- |
|
|
136
|
-
| `scrollBehavior` | `scroll-behavior` | - |
|
|
137
|
-
|
|
138
|
-
## Scroll Margin
|
|
139
|
-
|
|
140
|
-
Use the `scrollMargin*` prop to set margins around scroll containers.
|
|
141
|
-
|
|
142
|
-
```jsx
|
|
143
|
-
<Box maxH="100px" overflowY="auto" scrollMarginY="2">
|
|
144
|
-
Scrollbar Container with block padding
|
|
145
|
-
</Box>
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
| Prop | CSS Property | Token Category |
|
|
149
|
-
| ------------------------------------- | ---------------------------- | -------------- |
|
|
150
|
-
| `scrollMarginX` ,`scrollMarginInline` | `scroll-margin-inline` | `spacing` |
|
|
151
|
-
| `scrollMarginInlineStart` | `scroll-margin-inline-start` | `spacing` |
|
|
152
|
-
| `scrollMarginInlineEnd` | `scroll-margin-inline-end` | `spacing` |
|
|
153
|
-
| `scrollMarginY` , `scrollMarginBlock` | `scroll-margin-block` | `spacing` |
|
|
154
|
-
| `scrollMarginBlockStart` | `scroll-margin-block-start` | `spacing` |
|
|
155
|
-
| `scrollMarginBlockEnd` | `scroll-margin-block-end` | `spacing` |
|
|
156
|
-
| `scrollMarginLeft` | `scroll-margin-left` | `spacing` |
|
|
157
|
-
| `scrollMarginRight` | `scroll-margin-right` | `spacing` |
|
|
158
|
-
| `scrollMarginTop` | `scroll-margin-top` | `spacing` |
|
|
159
|
-
| `scrollMarginBottom` | `scroll-margin-bottom` | `spacing` |
|
|
160
|
-
|
|
161
|
-
## Scroll Padding
|
|
162
|
-
|
|
163
|
-
Use the `scrollPadding*` prop to set padding inside scroll containers.
|
|
164
|
-
|
|
165
|
-
```jsx
|
|
166
|
-
<Box maxH="100px" overflowY="auto" scrollPaddingY="2">
|
|
167
|
-
Scrollbar Container with block padding
|
|
168
|
-
</Box>
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
| Prop | CSS Property | Token Category |
|
|
172
|
-
| ---------------------------------------- | ----------------------------- | -------------- |
|
|
173
|
-
| `scrollPaddingX` , `scrollPaddingInline` | `scroll-padding-inline` | `spacing` |
|
|
174
|
-
| `scrollPaddingInlineStart` | `scroll-padding-inline-start` | `spacing` |
|
|
175
|
-
| `scrollPaddingInlineEnd` | `scroll-padding-inline-end` | `spacing` |
|
|
176
|
-
| `scrollPaddingY` , `scrollPaddingBlock` | `scroll-padding-block` | `spacing` |
|
|
177
|
-
| `scrollPaddingBlockStart` | `scroll-padding-block-start` | `spacing` |
|
|
178
|
-
| `scrollPaddingBlockEnd` | `scroll-padding-block-end` | `spacing` |
|
|
179
|
-
| `scrollPaddingLeft` | `scroll-padding-left` | `spacing` |
|
|
180
|
-
| `scrollPaddingRight` | `scroll-padding-right` | `spacing` |
|
|
181
|
-
| `scrollPaddingTop` | `scroll-padding-top` | `spacing` |
|
|
182
|
-
| `scrollPaddingBottom` | `scroll-padding-bottom` | `spacing` |
|
|
183
|
-
|
|
184
|
-
## Scroll Snap Margin
|
|
185
|
-
|
|
186
|
-
Use the `scrollSnapMargin*` prop to set margins around scroll containers.
|
|
187
|
-
|
|
188
|
-
```jsx
|
|
189
|
-
<Box maxH="100px" overflowY="auto" scrollSnapMarginY="2">
|
|
190
|
-
Scrollbar Container with block padding
|
|
191
|
-
</Box>
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
| Prop | CSS Property | Token Category |
|
|
195
|
-
| ------------------------ | ---------------------- | -------------- |
|
|
196
|
-
| `scrollSnapMargin` | `scroll-margin` | `spacing` |
|
|
197
|
-
| `scrollSnapMarginTop` | `scroll-margin-top` | `spacing` |
|
|
198
|
-
| `scrollSnapMarginBottom` | `scroll-margin-bottom` | `spacing` |
|
|
199
|
-
| `scrollSnapMarginLeft` | `scroll-margin-left` | `spacing` |
|
|
200
|
-
| `scrollSnapMarginRight` | `scroll-margin-right` | `spacing` |
|
|
201
|
-
|
|
202
|
-
## Scroll Snap Type
|
|
203
|
-
|
|
204
|
-
Use the `scrollSnapType` prop to control how strictly snap points are enforced
|
|
205
|
-
in a scroll container.
|
|
206
|
-
|
|
207
|
-
```jsx
|
|
208
|
-
<Box maxH="100px" overflowY="auto" scrollSnapType="x">
|
|
209
|
-
Scroll container with x snap type
|
|
210
|
-
</Box>
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
| Value | |
|
|
214
|
-
| ------ | ------------------------------------ |
|
|
215
|
-
| `none` | `none` |
|
|
216
|
-
| `x` | `x var(--scroll-snap-strictness)` |
|
|
217
|
-
| `y` | `y var(--scroll-snap-strictness)` |
|
|
218
|
-
| `both` | `both var(--scroll-snap-strictness)` |
|
|
219
|
-
|
|
220
|
-
## Scroll Snap Strictness
|
|
221
|
-
|
|
222
|
-
Use the `scrollSnapStrictness` prop to set the scroll snap strictness of an
|
|
223
|
-
element. This requires `scrollSnapType` to be set to `x`,`y` or `both`.
|
|
224
|
-
|
|
225
|
-
It's values can be `mandatory` or `proximity` values, and maps to
|
|
226
|
-
`var(--scroll-snap-strictness)`.
|
|
227
|
-
|
|
228
|
-
```jsx
|
|
229
|
-
<Box maxH="100px" overflowY="auto" scrollSnapStrictness="proximity">
|
|
230
|
-
<Box>Item 1</Box>
|
|
231
|
-
<Box>Item 2</Box>
|
|
232
|
-
</Box>
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
| Prop | CSS Property | Token Category |
|
|
236
|
-
| ---------------------- | -------------------------- | -------------- |
|
|
237
|
-
| `scrollSnapStrictness` | `--scroll-snap-strictness` | - |
|
|
238
|
-
|
|
239
|
-
## Touch Action
|
|
240
|
-
|
|
241
|
-
Use the `touchAction` prop to control how an element's region can be manipulated
|
|
242
|
-
by a touchscreen user
|
|
243
|
-
|
|
244
|
-
```jsx
|
|
245
|
-
<Box touchAction="none" />
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
| Prop | CSS Property | Token Category |
|
|
249
|
-
| ------------- | -------------- | -------------- |
|
|
250
|
-
| `touchAction` | `touch-action` | - |
|
|
251
|
-
|
|
252
|
-
## User Select
|
|
253
|
-
|
|
254
|
-
Use the `userSelect` prop to control whether the user can select text within an
|
|
255
|
-
element.
|
|
256
|
-
|
|
257
|
-
```jsx
|
|
258
|
-
<Box userSelect="none">
|
|
259
|
-
<p>Can't Select me</p>
|
|
260
|
-
</Box>
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
| Prop | CSS Property | Token Category |
|
|
264
|
-
| ------------ | ------------- | -------------- |
|
|
265
|
-
| `userSelect` | `user-select` | - |
|
|
266
|
-
|
|
267
|
-
## Will Change
|
|
268
|
-
|
|
269
|
-
Use the `willChange` prop to hint browsers how an element's property is expected
|
|
270
|
-
to change.
|
|
271
|
-
|
|
272
|
-
```jsx
|
|
273
|
-
<Box willChange="transform" />
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
| Prop | CSS Property | Token Category |
|
|
277
|
-
| ------------ | ------------- | -------------- |
|
|
278
|
-
| `willChange` | `will-change` | - |
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id: Home-Known issues
|
|
3
|
-
title: Known issues
|
|
4
|
-
description:
|
|
5
|
-
Current bugs, limitations, and compatibility issues with possible workarounds.
|
|
6
|
-
documentState: InitialDraft
|
|
7
|
-
documentAudiences: []
|
|
8
|
-
order: 4
|
|
9
|
-
menu:
|
|
10
|
-
- Home
|
|
11
|
-
- Bugs & Issues
|
|
12
|
-
tags:
|
|
13
|
-
- document
|
|
14
|
-
icon: PestControl
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# Known issues
|
|
18
|
-
|
|
19
|
-
Current bugs, limitations, and compatibility issues with possible workarounds.
|