@bace51/cocktailjs-react 1.0.13 → 1.0.15
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/README.md +77 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,22 +29,83 @@ export default function Example() {
|
|
|
29
29
|
}
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
##
|
|
33
|
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
-
|
|
32
|
+
## Available Glasses
|
|
33
|
+
|
|
34
|
+
- AbsintheGlass
|
|
35
|
+
- BrandySnifterGlass
|
|
36
|
+
- CollinsGlass
|
|
37
|
+
- CopperMug
|
|
38
|
+
- CordialGlass
|
|
39
|
+
- CoupeGlass
|
|
40
|
+
- DemitasseGlass
|
|
41
|
+
- DoubleShotGlass
|
|
42
|
+
- FizzGlass
|
|
43
|
+
- FluteGlass
|
|
44
|
+
- GobletGlass
|
|
45
|
+
- HighballGlass
|
|
46
|
+
- HurricaneGlass
|
|
47
|
+
- IrishCoffeeGlass
|
|
48
|
+
- JulepCup
|
|
49
|
+
- MargaritaGlass
|
|
50
|
+
- MartiniGlass
|
|
51
|
+
- NickAndNoraGlass
|
|
52
|
+
- ParfaitGlass
|
|
53
|
+
- PilsnerGlass
|
|
54
|
+
- PintGlass
|
|
55
|
+
- PousseCafeGlass
|
|
56
|
+
- PunchGlass
|
|
57
|
+
- RocksGlass
|
|
58
|
+
- SingleShotGlass
|
|
59
|
+
- SlingGlass
|
|
60
|
+
- SnifterGlass
|
|
61
|
+
- SourGlass
|
|
62
|
+
- TankardGlass
|
|
63
|
+
- TikiGlass
|
|
64
|
+
- ToddyGlass
|
|
65
|
+
- WhiskeyShotGlass
|
|
66
|
+
- WineGlass
|
|
67
|
+
|
|
68
|
+
## Props Accepted
|
|
69
|
+
|
|
70
|
+
Glass component props (all glasses):
|
|
71
|
+
|
|
72
|
+
- `size` (number): rendered width/height. Default is usually `80` (some shot variants default to `64`).
|
|
73
|
+
- `liquidFill` (string | string[]): liquid color or gradient stops.
|
|
74
|
+
- `strokeWidth` (number): outline stroke width.
|
|
75
|
+
|
|
76
|
+
Glass component props (supported by specific glasses):
|
|
77
|
+
|
|
78
|
+
- `idBase` (string): base id used for internal liquid gradient ids.
|
|
79
|
+
- `garnish` (any): accepted by some glass components (for example `MartiniGlass`, `HurricaneGlass`, `NickAndNoraGlass`, `PintGlass`).
|
|
80
|
+
- `fill` (string): accepted by non-liquid metal/body components (for example `CopperMug`, `JulepCup`).
|
|
81
|
+
|
|
82
|
+
Glass component passthrough:
|
|
83
|
+
|
|
84
|
+
- `WhiskeyShotGlass` forwards additional props to `Liquid` via rest props (`...liquidProps`).
|
|
85
|
+
|
|
86
|
+
Liquid component props (`Liquid` export):
|
|
87
|
+
|
|
88
|
+
- `d` (string): SVG path data for liquid shape.
|
|
89
|
+
- `transform` (string): optional SVG transform applied to the liquid path.
|
|
90
|
+
- `liquidFill` (string | string[] | null): fallback liquid color input.
|
|
91
|
+
- `liquidStyle` (object | null): explicit style object for the liquid path.
|
|
92
|
+
- `gradientAttr` (string | string[] | null): external gradient id (`#id`) or gradient stop colors.
|
|
93
|
+
- `opacity` (number): liquid opacity. Default `0.7`.
|
|
94
|
+
- `idBase` (string): gradient id base. Default `"liquidGrad"`.
|
|
95
|
+
- `highlight` (`"liquid" | "ice" | "all" | null`): highlight mode.
|
|
96
|
+
- `highlightColor` (string): highlight stop color. Default `"#fff7c0"`.
|
|
97
|
+
- `level` (number `0..1`): vertical fill level. Default `1`.
|
|
98
|
+
- `stopPositions` (number[] | null): explicit normalized stop offsets (`0..1`).
|
|
99
|
+
- `mixed` (boolean): blend gradient toward dominant color.
|
|
100
|
+
- `mixedBlend` (number `0..1`): original-color retention when mixed. Default `0.25`.
|
|
101
|
+
- `mixedOpacity` (number `0..1`): opacity for synthesized mixed gradient stops. Default `0.85`.
|
|
102
|
+
|
|
103
|
+
## Methods / Exports
|
|
104
|
+
|
|
105
|
+
- No class-style methods are exposed; this package exports React components and data.
|
|
106
|
+
- Named exports: `Liquid`, all glass components listed above, and `glasses`.
|
|
107
|
+
- `glasses` export: array of `{ name, about }` metadata entries.
|
|
108
|
+
- Default export: object containing `Liquid`, all glass components, and `glasses`.
|
|
48
109
|
|
|
49
110
|
## Notes
|
|
50
111
|
|