@chakra-ui/panda-preset 3.24.2 → 3.25.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.
@@ -35,6 +35,7 @@ var qrCode = require('./qr-code.cjs');
35
35
  var radioCard = require('./radio-card.cjs');
36
36
  var radioGroup = require('./radio-group.cjs');
37
37
  var ratingGroup = require('./rating-group.cjs');
38
+ var scrollArea = require('./scroll-area.cjs');
38
39
  var segmentGroup = require('./segment-group.cjs');
39
40
  var select = require('./select.cjs');
40
41
  var slider = require('./slider.cjs');
@@ -82,6 +83,7 @@ const slotRecipes = {
82
83
  radioCard: radioCard.radioCardSlotRecipe,
83
84
  radioGroup: radioGroup.radioGroupSlotRecipe,
84
85
  ratingGroup: ratingGroup.ratingGroupSlotRecipe,
86
+ scrollArea: scrollArea.scrollAreaSlotRecipe,
85
87
  segmentGroup: segmentGroup.segmentGroupSlotRecipe,
86
88
  select: select.selectSlotRecipe,
87
89
  combobox: combobox.comboboxSlotRecipe,
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var def = require('../def.cjs');
5
+
6
+ const scrollAreaSlotRecipe = def.defineSlotRecipe({
7
+ className: "scroll-area",
8
+ slots: ["root", "viewport", "content", "scrollbar", "thumb", "corner"],
9
+ base: {
10
+ root: {
11
+ display: "flex",
12
+ flexDirection: "column",
13
+ width: "100%",
14
+ height: "100%",
15
+ position: "relative",
16
+ overflow: "hidden",
17
+ "--scrollbar-margin": "2px",
18
+ "--scrollbar-click-area": "calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))"
19
+ },
20
+ viewport: {
21
+ display: "flex",
22
+ flexDirection: "column",
23
+ height: "100%",
24
+ width: "100%",
25
+ borderRadius: "inherit",
26
+ WebkitOverflowScrolling: "touch",
27
+ scrollbarWidth: "none",
28
+ "&::-webkit-scrollbar": {
29
+ display: "none"
30
+ }
31
+ },
32
+ content: {
33
+ minWidth: "100%"
34
+ },
35
+ scrollbar: {
36
+ display: "flex",
37
+ userSelect: "none",
38
+ touchAction: "none",
39
+ borderRadius: "full",
40
+ colorPalette: "gray",
41
+ transition: "opacity 150ms 300ms",
42
+ position: "relative",
43
+ margin: "var(--scrollbar-margin)",
44
+ "&:not([data-overflow-x], [data-overflow-y])": {
45
+ display: "none"
46
+ },
47
+ bg: "{colors.colorPalette.solid/10}",
48
+ "--thumb-bg": "{colors.colorPalette.solid/25}",
49
+ "&:is(:hover, :active)": {
50
+ "--thumb-bg": "{colors.colorPalette.solid/50}"
51
+ },
52
+ _before: {
53
+ content: '""',
54
+ position: "absolute"
55
+ },
56
+ _vertical: {
57
+ width: "var(--scrollbar-size)",
58
+ flexDirection: "column",
59
+ "&::before": {
60
+ width: "var(--scrollbar-click-area)",
61
+ height: "100%",
62
+ insetInlineStart: "calc(var(--scrollbar-margin) * -1)"
63
+ }
64
+ },
65
+ _horizontal: {
66
+ height: "var(--scrollbar-size)",
67
+ flexDirection: "row",
68
+ "&::before": {
69
+ height: "var(--scrollbar-click-area)",
70
+ width: "100%",
71
+ top: "calc(var(--scrollbar-margin) * -1)"
72
+ }
73
+ }
74
+ },
75
+ thumb: {
76
+ borderRadius: "inherit",
77
+ bg: "var(--thumb-bg)",
78
+ transition: "backgrounds",
79
+ _vertical: {
80
+ width: "full"
81
+ },
82
+ _horizontal: {
83
+ height: "full"
84
+ }
85
+ },
86
+ corner: {
87
+ bg: "bg.muted",
88
+ margin: "var(--scrollbar-margin)",
89
+ opacity: 0,
90
+ transition: "opacity 150ms 300ms",
91
+ "&[data-hover]": {
92
+ transitionDelay: "0ms",
93
+ opacity: 1
94
+ }
95
+ }
96
+ },
97
+ variants: {
98
+ variant: {
99
+ hover: {
100
+ scrollbar: {
101
+ opacity: "0",
102
+ "&[data-hover], &[data-scrolling]": {
103
+ opacity: "1",
104
+ transitionDuration: "faster",
105
+ transitionDelay: "0ms"
106
+ }
107
+ }
108
+ },
109
+ always: {
110
+ scrollbar: {
111
+ opacity: "1"
112
+ }
113
+ }
114
+ },
115
+ size: {
116
+ xs: {
117
+ root: {
118
+ "--scrollbar-size": "sizes.1"
119
+ }
120
+ },
121
+ sm: {
122
+ root: {
123
+ "--scrollbar-size": "sizes.1.5"
124
+ }
125
+ },
126
+ md: {
127
+ root: {
128
+ "--scrollbar-size": "sizes.2"
129
+ }
130
+ },
131
+ lg: {
132
+ root: {
133
+ "--scrollbar-size": "sizes.3"
134
+ }
135
+ }
136
+ }
137
+ },
138
+ defaultVariants: {
139
+ size: "md",
140
+ variant: "hover"
141
+ }
142
+ });
143
+
144
+ exports.scrollAreaSlotRecipe = scrollAreaSlotRecipe;
@@ -33,6 +33,7 @@ import { qrCodeSlotRecipe } from './qr-code.js';
33
33
  import { radioCardSlotRecipe } from './radio-card.js';
34
34
  import { radioGroupSlotRecipe } from './radio-group.js';
35
35
  import { ratingGroupSlotRecipe } from './rating-group.js';
36
+ import { scrollAreaSlotRecipe } from './scroll-area.js';
36
37
  import { segmentGroupSlotRecipe } from './segment-group.js';
37
38
  import { selectSlotRecipe } from './select.js';
38
39
  import { sliderSlotRecipe } from './slider.js';
@@ -80,6 +81,7 @@ const slotRecipes = {
80
81
  radioCard: radioCardSlotRecipe,
81
82
  radioGroup: radioGroupSlotRecipe,
82
83
  ratingGroup: ratingGroupSlotRecipe,
84
+ scrollArea: scrollAreaSlotRecipe,
83
85
  segmentGroup: segmentGroupSlotRecipe,
84
86
  select: selectSlotRecipe,
85
87
  combobox: comboboxSlotRecipe,
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ import { defineSlotRecipe } from '../def.js';
3
+
4
+ const scrollAreaSlotRecipe = defineSlotRecipe({
5
+ className: "scroll-area",
6
+ slots: ["root", "viewport", "content", "scrollbar", "thumb", "corner"],
7
+ base: {
8
+ root: {
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ width: "100%",
12
+ height: "100%",
13
+ position: "relative",
14
+ overflow: "hidden",
15
+ "--scrollbar-margin": "2px",
16
+ "--scrollbar-click-area": "calc(var(--scrollbar-size) + calc(var(--scrollbar-margin) * 2))"
17
+ },
18
+ viewport: {
19
+ display: "flex",
20
+ flexDirection: "column",
21
+ height: "100%",
22
+ width: "100%",
23
+ borderRadius: "inherit",
24
+ WebkitOverflowScrolling: "touch",
25
+ scrollbarWidth: "none",
26
+ "&::-webkit-scrollbar": {
27
+ display: "none"
28
+ }
29
+ },
30
+ content: {
31
+ minWidth: "100%"
32
+ },
33
+ scrollbar: {
34
+ display: "flex",
35
+ userSelect: "none",
36
+ touchAction: "none",
37
+ borderRadius: "full",
38
+ colorPalette: "gray",
39
+ transition: "opacity 150ms 300ms",
40
+ position: "relative",
41
+ margin: "var(--scrollbar-margin)",
42
+ "&:not([data-overflow-x], [data-overflow-y])": {
43
+ display: "none"
44
+ },
45
+ bg: "{colors.colorPalette.solid/10}",
46
+ "--thumb-bg": "{colors.colorPalette.solid/25}",
47
+ "&:is(:hover, :active)": {
48
+ "--thumb-bg": "{colors.colorPalette.solid/50}"
49
+ },
50
+ _before: {
51
+ content: '""',
52
+ position: "absolute"
53
+ },
54
+ _vertical: {
55
+ width: "var(--scrollbar-size)",
56
+ flexDirection: "column",
57
+ "&::before": {
58
+ width: "var(--scrollbar-click-area)",
59
+ height: "100%",
60
+ insetInlineStart: "calc(var(--scrollbar-margin) * -1)"
61
+ }
62
+ },
63
+ _horizontal: {
64
+ height: "var(--scrollbar-size)",
65
+ flexDirection: "row",
66
+ "&::before": {
67
+ height: "var(--scrollbar-click-area)",
68
+ width: "100%",
69
+ top: "calc(var(--scrollbar-margin) * -1)"
70
+ }
71
+ }
72
+ },
73
+ thumb: {
74
+ borderRadius: "inherit",
75
+ bg: "var(--thumb-bg)",
76
+ transition: "backgrounds",
77
+ _vertical: {
78
+ width: "full"
79
+ },
80
+ _horizontal: {
81
+ height: "full"
82
+ }
83
+ },
84
+ corner: {
85
+ bg: "bg.muted",
86
+ margin: "var(--scrollbar-margin)",
87
+ opacity: 0,
88
+ transition: "opacity 150ms 300ms",
89
+ "&[data-hover]": {
90
+ transitionDelay: "0ms",
91
+ opacity: 1
92
+ }
93
+ }
94
+ },
95
+ variants: {
96
+ variant: {
97
+ hover: {
98
+ scrollbar: {
99
+ opacity: "0",
100
+ "&[data-hover], &[data-scrolling]": {
101
+ opacity: "1",
102
+ transitionDuration: "faster",
103
+ transitionDelay: "0ms"
104
+ }
105
+ }
106
+ },
107
+ always: {
108
+ scrollbar: {
109
+ opacity: "1"
110
+ }
111
+ }
112
+ },
113
+ size: {
114
+ xs: {
115
+ root: {
116
+ "--scrollbar-size": "sizes.1"
117
+ }
118
+ },
119
+ sm: {
120
+ root: {
121
+ "--scrollbar-size": "sizes.1.5"
122
+ }
123
+ },
124
+ md: {
125
+ root: {
126
+ "--scrollbar-size": "sizes.2"
127
+ }
128
+ },
129
+ lg: {
130
+ root: {
131
+ "--scrollbar-size": "sizes.3"
132
+ }
133
+ }
134
+ }
135
+ },
136
+ defaultVariants: {
137
+ size: "md",
138
+ variant: "hover"
139
+ }
140
+ });
141
+
142
+ export { scrollAreaSlotRecipe };
@@ -30,6 +30,7 @@ export declare const slotRecipes: {
30
30
  radioCard: import("@pandacss/types").SlotRecipeConfig;
31
31
  radioGroup: import("@pandacss/types").SlotRecipeConfig;
32
32
  ratingGroup: import("@pandacss/types").SlotRecipeConfig;
33
+ scrollArea: import("@pandacss/types").SlotRecipeConfig;
33
34
  segmentGroup: import("@pandacss/types").SlotRecipeConfig;
34
35
  select: import("@pandacss/types").SlotRecipeConfig;
35
36
  combobox: import("@pandacss/types").SlotRecipeConfig;
@@ -0,0 +1 @@
1
+ export declare const scrollAreaSlotRecipe: import("@pandacss/types").SlotRecipeConfig;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chakra-ui/panda-preset",
3
- "version": "3.24.2",
3
+ "version": "3.25.0",
4
4
  "description": "Panda preset for Chakra UI",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.cjs",
@@ -49,7 +49,7 @@
49
49
  },
50
50
  "devDependencies": {
51
51
  "globby": "14.1.0",
52
- "@chakra-ui/cli": "3.24.2"
52
+ "@chakra-ui/cli": "3.25.0"
53
53
  },
54
54
  "scripts": {
55
55
  "theme:eject": "chakra eject --outdir=src",