@stonedogcode/style 0.9.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.
Files changed (75) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +18 -0
  3. package/README.md +699 -0
  4. package/package.json +95 -0
  5. package/src/components/DictationControls.tsx +141 -0
  6. package/src/components/DictationPrompt.tsx +78 -0
  7. package/src/components/StyledBox.tsx +174 -0
  8. package/src/components/StyledButton.tsx +144 -0
  9. package/src/components/StyledCollapsible.tsx +127 -0
  10. package/src/components/StyledDefinitionList.tsx +134 -0
  11. package/src/components/StyledFieldset.tsx +157 -0
  12. package/src/components/StyledFlex.tsx +13 -0
  13. package/src/components/StyledFooter.tsx +399 -0
  14. package/src/components/StyledFormLabel.tsx +141 -0
  15. package/src/components/StyledGrid.tsx +109 -0
  16. package/src/components/StyledGridItem.tsx +19 -0
  17. package/src/components/StyledHStack.tsx +145 -0
  18. package/src/components/StyledHeading.tsx +79 -0
  19. package/src/components/StyledHrRule.tsx +33 -0
  20. package/src/components/StyledIcon.tsx +172 -0
  21. package/src/components/StyledIconButton.tsx +135 -0
  22. package/src/components/StyledInputBool.tsx +81 -0
  23. package/src/components/StyledInputRadio.tsx +141 -0
  24. package/src/components/StyledInputSelect.tsx +115 -0
  25. package/src/components/StyledInputSlider.tsx +83 -0
  26. package/src/components/StyledInputText.tsx +146 -0
  27. package/src/components/StyledInputTextArea.tsx +119 -0
  28. package/src/components/StyledInputToggle.tsx +224 -0
  29. package/src/components/StyledList.tsx +188 -0
  30. package/src/components/StyledScrollbar.tsx +53 -0
  31. package/src/components/StyledSearch.tsx +78 -0
  32. package/src/components/StyledSeparator.tsx +38 -0
  33. package/src/components/StyledSidebar.tsx +555 -0
  34. package/src/components/StyledSimpleGrid.tsx +99 -0
  35. package/src/components/StyledSparkLine.tsx +119 -0
  36. package/src/components/StyledSpinner.tsx +91 -0
  37. package/src/components/StyledStack.tsx +62 -0
  38. package/src/components/StyledText.tsx +99 -0
  39. package/src/components/StyledTooltip.tsx +398 -0
  40. package/src/components/StyledVStack.tsx +143 -0
  41. package/src/components/TitleLogo.tsx +223 -0
  42. package/src/components/create-icon.tsx +66 -0
  43. package/src/components/create-intent-button.tsx +134 -0
  44. package/src/components/dictation.ts +71 -0
  45. package/src/components/intent-buttons.ts +154 -0
  46. package/src/config/can-hover.ts +75 -0
  47. package/src/config/density.ts +138 -0
  48. package/src/config/font-size.ts +113 -0
  49. package/src/config/intent-icons.tsx +116 -0
  50. package/src/config/logger.ts +60 -0
  51. package/src/config/style-config.tsx +263 -0
  52. package/src/config/types.ts +137 -0
  53. package/src/index.ts +259 -0
  54. package/src/preset/index.ts +243 -0
  55. package/src/preset/recipes/arrows.ts +29 -0
  56. package/src/preset/recipes/box.ts +122 -0
  57. package/src/preset/recipes/button.ts +161 -0
  58. package/src/preset/recipes/dl-list.ts +109 -0
  59. package/src/preset/recipes/drawer.ts +125 -0
  60. package/src/preset/recipes/form.ts +95 -0
  61. package/src/preset/recipes/icon-button.ts +161 -0
  62. package/src/preset/recipes/icon.ts +34 -0
  63. package/src/preset/recipes/input-bool.ts +184 -0
  64. package/src/preset/recipes/input-dropdown.ts +93 -0
  65. package/src/preset/recipes/input-radio.ts +158 -0
  66. package/src/preset/recipes/input-surface.ts +152 -0
  67. package/src/preset/recipes/input-text.ts +17 -0
  68. package/src/preset/recipes/list.ts +196 -0
  69. package/src/preset/recipes/menu.ts +28 -0
  70. package/src/preset/recipes/separator.ts +89 -0
  71. package/src/preset/recipes/stack.ts +89 -0
  72. package/src/preset/recipes/striped.ts +34 -0
  73. package/src/preset/recipes/text.ts +41 -0
  74. package/src/preset/recipes/tooltip.ts +77 -0
  75. package/src/preset/semantic-variables.ts +283 -0
@@ -0,0 +1,158 @@
1
+ import { defineSlotRecipe } from "@pandacss/dev";
2
+
3
+ export const inputRadioRootRecipe = defineSlotRecipe({
4
+ className: "input-radio",
5
+ slots: ["root", "item", "input", "control", "indicator"],
6
+ base: {
7
+ root: {
8
+ display: "flex",
9
+ },
10
+ item: {
11
+ display: "inline-flex",
12
+ alignItems: "center",
13
+ cursor: "pointer",
14
+ padding: "var(--panda-density-padding, 8px)",
15
+ margin: "var(--panda-density-margin, 8px)",
16
+ minHeight: "48px",
17
+ borderRadius: "md",
18
+ borderWidth: "1px",
19
+ borderColor: "transparent",
20
+ "&[data-checked]": {
21
+ borderColor: "boxBgSecondary",
22
+ bg: "rgba(0, 123, 255, 0.2)",
23
+ },
24
+ },
25
+ // Visually hidden, NOT `display: none` — which is what this was.
26
+ //
27
+ // `display: none` takes the input out of the accessibility tree and out of
28
+ // the tab order, so the group could not be reached or operated by keyboard
29
+ // at all, and a screen reader never saw the radios. Clicking the label with
30
+ // a pointer was the only way to choose anything: a WCAG 2.1.1 (Keyboard)
31
+ // failure at Level A, on a control whose whole job is making a choice.
32
+ //
33
+ // Transparent and laid over the control instead, so it keeps its semantics,
34
+ // its focus, and its hit area. The focus ring is drawn on `control` below,
35
+ // since an invisible element cannot show one.
36
+ input: {
37
+ position: "absolute",
38
+ width: "1.25rem",
39
+ height: "1.25rem",
40
+ margin: "0",
41
+ opacity: 0,
42
+ cursor: "pointer",
43
+ },
44
+ control: {
45
+ width: "1.25rem",
46
+ height: "1.25rem",
47
+ borderRadius: "50%",
48
+ border: "2px solid",
49
+ borderColor: "gray.400",
50
+ // The focus ring for the transparent input above. Keyboard reachability
51
+ // is worth nothing if the user cannot see where they are.
52
+ ".input-radio__input:focus-visible + &": {
53
+ outline: "2px solid",
54
+ outlineColor: "borderBgAccent",
55
+ outlineOffset: "2px",
56
+ },
57
+ display: "flex",
58
+ alignItems: "center",
59
+ justifyContent: "center",
60
+ marginRight: "0.5rem",
61
+ transition: "border-color 0.2s",
62
+ [`.input-radio__item[data-checked] > &,
63
+ &[data-checked]`]: {
64
+ borderColor: "boxBgSecondary",
65
+ },
66
+ },
67
+ indicator: {
68
+ width: "0.75rem",
69
+ height: "0.75rem",
70
+ borderRadius: "50%",
71
+ backgroundColor: "textPop",
72
+ transform: "scale(0)",
73
+ transition: "transform 0.2s",
74
+ [`.input-radio__item[data-checked] &,
75
+ &[data-checked]`]: {
76
+ transform: "scale(1)",
77
+ },
78
+ },
79
+ },
80
+ variants: {
81
+ variant: {
82
+ solid: {
83
+ item: {
84
+ bg: "boxBgAccent",
85
+ color: "textPrimary",
86
+ borderColor: "borderBgPrimary",
87
+ },
88
+ },
89
+ outline: {
90
+ item: {
91
+ borderColor: "borderBgSecondary",
92
+ color: "textPrimary",
93
+ borderRadius: "0",
94
+ },
95
+ },
96
+ aurora: {
97
+ item: {
98
+ // Bare token names do not substitute inside an arbitrary value, so
99
+ // this gradient was invalid and never painted (NEH-301). `{colors.X}`
100
+ // is the syntax that does.
101
+ backgroundImage:
102
+ "linear-gradient(to right, {colors.boxBgAccent}, {colors.boxBgSecondary})",
103
+ color: "textPrimary",
104
+ borderColor: "transparent",
105
+ },
106
+ },
107
+ glass: {
108
+ item: {
109
+ backdropFilter: "blur(10px)",
110
+ backgroundColor: "rgba(255, 255, 255, 0.1)",
111
+ border: "1px solid",
112
+ borderColor: "borderBgPrimary",
113
+ color: "textPrimary",
114
+ },
115
+ },
116
+ matte: {
117
+ item: {
118
+ bg: "buttonBgSecondary",
119
+ color: "textAccent",
120
+ },
121
+ },
122
+ ghost: {
123
+ item: {
124
+ color: "textSecondary",
125
+ bg: "buttonBgSecondary",
126
+ border: "none",
127
+ },
128
+ },
129
+ none: {
130
+ item: {
131
+ border: "none",
132
+ backgroundColor: "white",
133
+ },
134
+ },
135
+ },
136
+ size: {
137
+ sm: {
138
+ control: { width: "4", height: "4" },
139
+ indicator: { width: "2", height: "2" },
140
+ item: { fontSize: "sm", marginLeft: "2" },
141
+ },
142
+ md: {
143
+ control: { width: "5", height: "5" },
144
+ indicator: { width: "2.5", height: "2.5" },
145
+ item: { fontSize: "md", marginLeft: "2.5" },
146
+ },
147
+ lg: {
148
+ control: { width: "6", height: "6" },
149
+ indicator: { width: "3", height: "3" },
150
+ item: { fontSize: "lg", marginLeft: "3" },
151
+ },
152
+ },
153
+ },
154
+ defaultVariants: {
155
+ variant: "solid",
156
+ size: "md",
157
+ },
158
+ });
@@ -0,0 +1,152 @@
1
+ /**
2
+ * The one definition of what a form control looks like.
3
+ *
4
+ * A text input and a dropdown that sit next to each other in a form are the
5
+ * same object to the person filling it in, so they must be pixel-identical
6
+ * apart from the dropdown's indicator. They stopped being identical because
7
+ * `input-text.ts` and `input-dropdown.ts` were copy-pasted and then edited
8
+ * separately: the dropdown grew a per-variant `borderColor` and the text input
9
+ * did not, so their borders diverged at `outline`, `aurora`, and `glass` — and
10
+ * `glass` is the app-wide default (`lib/slices/configSlice.ts`). Everything
11
+ * else — padding, the 44px minimum target, the focus ring, the disabled
12
+ * treatment — was duplicated verbatim and would have drifted next (NEH-84).
13
+ *
14
+ * Both recipes now spread these. A control that needs to differ should say so
15
+ * in its own recipe, deliberately, rather than by having been forked.
16
+ */
17
+
18
+ /**
19
+ * Everything true of a control regardless of variant.
20
+ *
21
+ * `minHeight: 44px` is the WCAG 2.5.5 (AAA) target size and is not negotiable
22
+ * downward — see the UX & accessibility floor in CLAUDE.md. Padding keys off
23
+ * `--panda-density-padding` so the control tracks Settings → Density.
24
+ */
25
+ export const inputSurfaceBase = {
26
+ width: "100%",
27
+ minWidth: 0,
28
+ display: "block",
29
+ boxSizing: "border-box",
30
+ outline: "none",
31
+ border: "1px solid",
32
+ borderColor: "borderBgPrimary",
33
+ borderRadius: "var(--radii-md, 0.375rem)",
34
+ padding:
35
+ "calc(var(--panda-density-padding, 8px) + 4px) calc(var(--panda-density-padding, 8px) + 8px)",
36
+ margin: 0,
37
+ minHeight: "48px",
38
+ // Stated, not inherited (NEH-289): a native form control uses the UA's own
39
+ // font unless told otherwise, so without this a themed typeface reaches the
40
+ // page and stops at the edge of every input on it.
41
+ fontFamily: "body",
42
+ fontSize: "var(--font-sizes-xl, 1.25rem)",
43
+ transition: "box-shadow 0.2s, border-color 0.2s",
44
+ // A token, not `black`: the base has to be legible on whatever the variant
45
+ // paints, and in dark mode. The one variant that hard-codes a white
46
+ // background states its own colour.
47
+ color: "textPrimary",
48
+ _hover: {
49
+ cursor: "pointer",
50
+ },
51
+ "&:focus": {
52
+ borderColor: "borderBgSecondary",
53
+ boxShadow: "0 0 0 1px boxBgSecondary",
54
+ },
55
+ "&:disabled": {
56
+ opacity: 0.4,
57
+ cursor: "not-allowed",
58
+ },
59
+ "&::placeholder": {
60
+ color: "textPrimary",
61
+ opacity: 1,
62
+ },
63
+ } as const;
64
+
65
+ /**
66
+ * The variant map. Every variant states its own `bg`, `color`, and
67
+ * `borderColor` rather than inheriting some and not others — that asymmetry is
68
+ * what let the two recipes disagree without either looking wrong on its own.
69
+ */
70
+ export const inputSurfaceVariants = {
71
+ solid: {
72
+ bg: "boxBgAccent",
73
+ color: "textPrimary",
74
+ borderColor: "borderBgPrimary",
75
+ },
76
+ outline: {
77
+ // Stated, not omitted. An outline control is meant to show whatever is
78
+ // behind it, and saying so is what stops the next editor from "fixing" the
79
+ // missing background with a colour.
80
+ bg: "transparent",
81
+ color: "textPrimary",
82
+ borderColor: "borderBgSecondary",
83
+ borderRadius: "0",
84
+ },
85
+ aurora: {
86
+ // Bare token names do not substitute inside an arbitrary value, so this
87
+ // gradient was invalid and never painted (NEH-301).
88
+ backgroundImage:
89
+ "linear-gradient(to right, {colors.boxBgAccent}, {colors.boxBgSecondary})",
90
+ color: "textPrimary",
91
+ borderColor: "borderBgAccent",
92
+ },
93
+ glass: {
94
+ position: "relative",
95
+ overflow: "hidden",
96
+ borderWidth: "2px",
97
+ borderStyle: "solid",
98
+ borderRadius: "xl",
99
+ bg: "boxBgAccent",
100
+ color: "textPrimary",
101
+ borderColor: "borderBgSecondary",
102
+ backdropFilter: "blur(12px)",
103
+ fontWeight: "normal",
104
+ _placeholder: {
105
+ color: "textPrimary",
106
+ opacity: 0.8,
107
+ },
108
+ _focusVisible: {
109
+ borderColor: "borderBgPrimary",
110
+ boxShadow: "borderBgPrimary",
111
+ zIndex: 1,
112
+ },
113
+ _disabled: {
114
+ opacity: 0.5,
115
+ cursor: "not-allowed",
116
+ boxShadow: "none",
117
+ },
118
+ _before: {
119
+ content: '""',
120
+ position: "absolute",
121
+ top: 0,
122
+ left: 0,
123
+ right: 0,
124
+ bottom: 0,
125
+ borderRadius: "inherit",
126
+ bgGradient:
127
+ "linear(to-br, rgba(255,255,255,0.08), rgba(255,255,255,0.02))",
128
+ zIndex: -1,
129
+ },
130
+ },
131
+ matte: {
132
+ bg: "buttonBgSecondary",
133
+ color: "textSecondary",
134
+ borderColor: "borderBgPrimary",
135
+ },
136
+ ghost: {
137
+ color: "textSecondary",
138
+ bg: "buttonBgSecondary",
139
+ borderColor: "borderBgPrimary",
140
+ "&::placeholder": {
141
+ color: "textSecondary/60",
142
+ },
143
+ },
144
+ none: {
145
+ border: "none",
146
+ backgroundColor: "white",
147
+ // Explicit because the background is a literal white that no theme can
148
+ // change; inheriting the base token would put light text on it in dark
149
+ // mode. The hard-coded white itself is NEH-86's to remove.
150
+ color: "black",
151
+ },
152
+ } as const;
@@ -0,0 +1,17 @@
1
+ import { defineRecipe } from "@pandacss/dev";
2
+ import { inputSurfaceBase, inputSurfaceVariants } from "./input-surface";
3
+
4
+ /**
5
+ * Text-like controls: `input`, `textarea`, the date input, the phone input.
6
+ *
7
+ * The surface is shared with `inputDropdownRecipe` — see `input-surface.ts`
8
+ * for why (NEH-84). Anything specific to a text control belongs here; anything
9
+ * that should also be true of a dropdown belongs in the shared surface.
10
+ */
11
+ export const inputTextRecipe = defineRecipe({
12
+ className: "input-text",
13
+ base: inputSurfaceBase,
14
+ variants: {
15
+ variant: inputSurfaceVariants,
16
+ },
17
+ });
@@ -0,0 +1,196 @@
1
+ import { defineSlotRecipe } from "@pandacss/dev";
2
+
3
+ export const listRecipe = defineSlotRecipe({
4
+ className: "list",
5
+ slots: ["root", "item"],
6
+ description: "A recipe for lists with various styles",
7
+ base: {
8
+ root: {
9
+ display: "flex",
10
+ flexDirection: "column",
11
+ },
12
+ item: {
13
+ width: "full",
14
+ padding: "4", // Default padding for list items
15
+ },
16
+ },
17
+ variants: {
18
+ variant: {
19
+ solid: {
20
+ root: {
21
+ bg: "boxBgPrimary",
22
+ // Paired with the surface, per TEXT_BACKGROUND_PAIRS. Without it the
23
+ // rows inherit whatever colour the page has — and on a dark
24
+ // `boxBgPrimary` that is dark-on-dark, unreadable. This recipe was
25
+ // the only one setting a background without its partner; `dlRecipe`
26
+ // beside it has always paired them. Found by screenshotting the
27
+ // component rather than by any test (NEH-167, cycle 9), which is the
28
+ // same way NEH-278 was found.
29
+ color: "textPrimary",
30
+ borderWidth: "1px",
31
+ // Same omission as the item slot below: no `border-style`, so the
32
+ // outer border of a solid or outline list computed to 0px and never
33
+ // painted either.
34
+ borderStyle: "solid",
35
+ borderColor: "borderBgPrimary",
36
+ borderRadius: "lg",
37
+ },
38
+ item: {
39
+ borderBottomWidth: "1px",
40
+ // `border-style` defaults to `none`, and a border with no style
41
+ // computes to a width of ZERO however many pixels you ask for — so
42
+ // these row separators had never rendered (NEH-167, cycle 9). The
43
+ // aurora/glass/matte variants below use the `borderBottom`
44
+ // shorthand, which carries the style, which is why only these three
45
+ // were dead.
46
+ borderBottomStyle: "solid",
47
+ borderColor: "borderBgSecondary",
48
+ _last: {
49
+ borderBottom: "none",
50
+ },
51
+ },
52
+ },
53
+ outline: {
54
+ root: {
55
+ borderWidth: "1px",
56
+ // Same omission as the item slot below: no `border-style`, so the
57
+ // outer border of a solid or outline list computed to 0px and never
58
+ // painted either.
59
+ borderStyle: "solid",
60
+ borderColor: "borderBgPrimary",
61
+ borderRadius: "lg",
62
+ },
63
+ item: {
64
+ borderBottomWidth: "1px",
65
+ // `border-style` defaults to `none`, and a border with no style
66
+ // computes to a width of ZERO however many pixels you ask for — so
67
+ // these row separators had never rendered (NEH-167, cycle 9). The
68
+ // aurora/glass/matte variants below use the `borderBottom`
69
+ // shorthand, which carries the style, which is why only these three
70
+ // were dead.
71
+ borderBottomStyle: "solid",
72
+ borderColor: "borderBgSecondary",
73
+ _last: {
74
+ borderBottom: "none",
75
+ },
76
+ },
77
+ },
78
+ lines: {
79
+ item: {
80
+ borderBottomWidth: "1px",
81
+ // `border-style` defaults to `none`, and a border with no style
82
+ // computes to a width of ZERO however many pixels you ask for — so
83
+ // these row separators had never rendered (NEH-167, cycle 9). The
84
+ // aurora/glass/matte variants below use the `borderBottom`
85
+ // shorthand, which carries the style, which is why only these three
86
+ // were dead.
87
+ borderBottomStyle: "solid",
88
+ borderColor: "borderBgSecondary",
89
+ _last: {
90
+ borderBottom: "none",
91
+ },
92
+ },
93
+ },
94
+ aurora: {
95
+ root: {
96
+ position: "relative",
97
+ overflow: "hidden",
98
+ px: { base: 6, md: 8 },
99
+ py: { base: 2, md: 4 },
100
+ border: "1px solid",
101
+ backgroundImage: "linear-gradient(to right, #ff7e5f, #feb47b)",
102
+ color: "textPrimary",
103
+ borderColor: "borderBgSecondary",
104
+ _before: {
105
+ content: '""',
106
+ position: "absolute",
107
+ top: "50%",
108
+ left: "50%",
109
+ transform: "translate(-50%, -50%)",
110
+ width: "250%",
111
+ height: "250%",
112
+ zIndex: -1,
113
+ background:
114
+ "conic-gradient(from 180deg at 50% 50%, #ff006e, #8338ec, #3a86ff, #ff006e)",
115
+ filter: "blur(80px)",
116
+ animation: "rotateGradient 8s linear infinite",
117
+ },
118
+ },
119
+ item: {
120
+ borderBottom: "1px solid",
121
+ // `whiteAlpha.300` was Chakra vocabulary this package never defined,
122
+ // so these row separators never painted (NEH-301). Half-strength so
123
+ // the divider still reads as subordinate to the outer border, which
124
+ // is what the alpha was buying.
125
+ borderColor: "borderBgPrimary/30",
126
+ _last: {
127
+ borderBottom: "none",
128
+ },
129
+ },
130
+ },
131
+ glass: {
132
+ root: {
133
+ backdropFilter: "blur(10px)",
134
+ bg: "rgba(255, 255, 255, 0.05)",
135
+ border: "1px solid rgba(255, 255, 255, 0.2)",
136
+ borderRadius: "lg",
137
+ },
138
+ item: {
139
+ borderBottom: "1px solid rgba(255, 255, 255, 0.2)",
140
+ _last: {
141
+ borderBottom: "none",
142
+ },
143
+ },
144
+ },
145
+ matte: {
146
+ root: {
147
+ bgGradient: "linear(to-b, gray.800, gray.900)",
148
+ // A deliberate literal, matching `box.ts` and `input-bool.ts`: this
149
+ // variant's surface is a FIXED dark gradient rather than a token, so
150
+ // themed text renders dark-on-dark in a light theme. The literal is
151
+ // correct until the surface and the text move onto tokens together.
152
+ color: "white",
153
+ borderColor: "gray.700",
154
+ borderWidth: "1px",
155
+ borderRadius: "lg",
156
+ },
157
+ item: {
158
+ borderBottom: "1px solid",
159
+ borderColor: "gray.700",
160
+ _last: {
161
+ borderBottom: "none",
162
+ },
163
+ },
164
+ },
165
+ ghost: {
166
+ item: {
167
+ color: "textSecondary",
168
+ bg: "buttonBgSecondary",
169
+ borderRadius: "md",
170
+ cursor: "pointer",
171
+ _hover: {
172
+ bg: "boxBgAccent",
173
+ },
174
+ },
175
+ },
176
+ none: {
177
+ // Keeps base padding but removes borders and backgrounds
178
+ item: {
179
+ border: "none",
180
+ },
181
+ },
182
+ unstyled: {
183
+ root: {
184
+ p: "0",
185
+ m: "0",
186
+ listStyle: "none",
187
+ },
188
+ item: {
189
+ p: "0",
190
+ m: "0",
191
+ border: "none",
192
+ },
193
+ },
194
+ },
195
+ },
196
+ });
@@ -0,0 +1,28 @@
1
+ import { defineSlotRecipe } from "@pandacss/dev";
2
+
3
+ export const menuRecipe = defineSlotRecipe({
4
+ className: "menu",
5
+ description: "Styles for the Menu component",
6
+ slots: ["item"],
7
+ base: {
8
+ item: {
9
+ w: "100%",
10
+ display: "flex",
11
+ alignItems: "center",
12
+ justifyContent: "flex-start",
13
+ gap: 3,
14
+ px: 4,
15
+ py: 2,
16
+ borderRadius: "md",
17
+ cursor: "pointer",
18
+ _hover: {
19
+ backgroundColor: "boxBgAccent",
20
+ },
21
+ _dark: {
22
+ _hover: {
23
+ backgroundColor: "gray.800",
24
+ },
25
+ },
26
+ },
27
+ },
28
+ });
@@ -0,0 +1,89 @@
1
+ import { defineRecipe } from "@pandacss/dev";
2
+
3
+ export const separatorVerticalRecipe = defineRecipe({
4
+ className: "separator-v",
5
+ description: "The vertical styles for the StyledSeparator component",
6
+ base: {
7
+ width: "1px",
8
+ height: "full",
9
+ },
10
+ variants: {
11
+ variant: {
12
+ solid: {
13
+ backgroundColor: "gray.800",
14
+ _dark: { backgroundColor: "gray.200" },
15
+ },
16
+ glass: {
17
+ // `whiteAlpha.500` / `blackAlpha.500` were Chakra vocabulary this
18
+ // package never defined, so the glass separator was invisible in both
19
+ // colour modes (NEH-301). Panda's `/50` modifier keeps the
20
+ // translucency the alpha scale was there for — it emits a
21
+ // `color-mix(…, transparent)` over the token, and falls back to the
22
+ // solid token where `color-mix` is unsupported, so the separator is
23
+ // never invisible again.
24
+ backgroundColor: "borderBgPrimary/50",
25
+ _dark: { backgroundColor: "borderBgSecondary/50" },
26
+ },
27
+ outline: {
28
+ backgroundColor: "transparent",
29
+ borderLeft: "1px dashed",
30
+ borderColor: "gray.400",
31
+ },
32
+ aurora: {
33
+ bgGradient: "linear(to-b, purple.400, cyan.400)",
34
+ },
35
+ matte: {
36
+ backgroundColor: "gray.700",
37
+ _dark: { backgroundColor: "gray.300" },
38
+ },
39
+ ghost: {
40
+ backgroundColor: "gray.800/20",
41
+ _dark: { backgroundColor: "gray.200/20" },
42
+ },
43
+ none: {
44
+ backgroundColor: "transparent",
45
+ },
46
+ },
47
+ },
48
+ });
49
+
50
+ export const separatorHorizontalRecipe = defineRecipe({
51
+ className: "separator-h",
52
+ description: "The horizontal styles for the StyledSeparator component",
53
+ base: {
54
+ height: "1px",
55
+ width: "full",
56
+ },
57
+ variants: {
58
+ variant: {
59
+ solid: {
60
+ backgroundColor: "gray.800",
61
+ _dark: { backgroundColor: "gray.200" },
62
+ },
63
+ glass: {
64
+ // See the vertical recipe above — same defect, same fix (NEH-301).
65
+ backgroundColor: "borderBgPrimary/50",
66
+ _dark: { backgroundColor: "borderBgSecondary/50" },
67
+ },
68
+ outline: {
69
+ backgroundColor: "transparent",
70
+ borderTop: "1px dashed",
71
+ borderColor: "gray.400",
72
+ },
73
+ aurora: {
74
+ bgGradient: "linear(to-r, purple.400, cyan.400)",
75
+ },
76
+ matte: {
77
+ backgroundColor: "gray.700",
78
+ _dark: { backgroundColor: "gray.300" },
79
+ },
80
+ ghost: {
81
+ backgroundColor: "gray.800/20",
82
+ _dark: { backgroundColor: "gray.200/20" },
83
+ },
84
+ none: {
85
+ backgroundColor: "transparent",
86
+ },
87
+ },
88
+ },
89
+ });