bubble-toolbar 0.0.0-stage → 1.0.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.
@@ -0,0 +1,195 @@
1
+ /**
2
+ * Bubble Toolbar - Frosted Glass & Responsive Layout
3
+ */
4
+
5
+ :root {
6
+ --bubble-size-sm: 40px;
7
+ --bubble-size-md: 48px;
8
+ --bubble-size-lg: 56px;
9
+ --bubble-blur: 16px;
10
+ --bubble-glass-bg: rgba(255, 255, 255, 0.65);
11
+ --bubble-glass-border: rgba(255, 255, 255, 0.35);
12
+ --bubble-glass-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
13
+ --bubble-dark-bg: rgba(24, 24, 27, 0.72);
14
+ --bubble-dark-border: rgba(255, 255, 255, 0.12);
15
+ }
16
+
17
+ /* Toolbar container */
18
+ .bubble-toolbar {
19
+ display: inline-flex;
20
+ align-items: center;
21
+ box-sizing: border-box;
22
+ user-select: none;
23
+ -webkit-user-select: none;
24
+ touch-action: pan-x;
25
+ }
26
+
27
+ /* Hide scrollbar for Chrome, Safari and Opera */
28
+ .bubble-toolbar::-webkit-scrollbar {
29
+ display: none;
30
+ width: 0;
31
+ height: 0;
32
+ }
33
+
34
+ /* Positions */
35
+ .bubble-toolbar--bottom {
36
+ position: fixed;
37
+ bottom: 24px;
38
+ left: 50%;
39
+ transform: translateX(-50%);
40
+ z-index: 1000;
41
+ }
42
+
43
+ .bubble-toolbar--top {
44
+ position: fixed;
45
+ top: 24px;
46
+ left: 50%;
47
+ transform: translateX(-50%);
48
+ z-index: 1000;
49
+ }
50
+
51
+ .bubble-toolbar--static {
52
+ position: relative;
53
+ }
54
+
55
+ /* Bubble Groups */
56
+ .bubble-group {
57
+ box-sizing: border-box;
58
+ display: inline-flex;
59
+ align-items: center;
60
+ transition:
61
+ transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
62
+ box-shadow 0.2s ease;
63
+ }
64
+
65
+ .bubble-group:hover {
66
+ transform: translateY(-2px);
67
+ }
68
+
69
+ /* Circle shape: 1 node */
70
+ .bubble-group--circle {
71
+ aspect-ratio: 1 / 1;
72
+ border-radius: 9999px;
73
+ justify-content: center;
74
+ padding: 0;
75
+ }
76
+
77
+ /* Pill shape: > 1 nodes */
78
+ .bubble-group--pill {
79
+ border-radius: 9999px;
80
+ flex-direction: row;
81
+ }
82
+
83
+ /* Icon Button */
84
+ .bubble-icon-button {
85
+ display: inline-flex;
86
+ align-items: center;
87
+ justify-content: center;
88
+ border: none;
89
+ background: transparent;
90
+ cursor: pointer;
91
+ border-radius: 50%;
92
+ transition:
93
+ background-color 0.15s ease,
94
+ transform 0.15s ease,
95
+ color 0.15s ease;
96
+ }
97
+
98
+ .bubble-icon-button:hover {
99
+ background-color: rgba(0, 0, 0, 0.06);
100
+ }
101
+
102
+ .bubble-icon-button:active {
103
+ transform: scale(0.94);
104
+ }
105
+
106
+ .bubble-icon-button:focus-visible {
107
+ outline: 2px solid #3b82f6;
108
+ outline-offset: 2px;
109
+ }
110
+
111
+ /* Area */
112
+ .bubble-area {
113
+ display: inline-flex;
114
+ align-items: center;
115
+ flex: 1 1 auto;
116
+ }
117
+
118
+ /* Media Query: Auto Dark Theme */
119
+ @media (prefers-color-scheme: dark) {
120
+ .bubble-toolbar--auto .bubble-group {
121
+ --bubble-bg: var(--bubble-dark-bg);
122
+ --bubble-border: var(--bubble-dark-border);
123
+ --bubble-fg: #f4f4f5;
124
+ }
125
+
126
+ .bubble-toolbar--auto .bubble-icon-button:hover {
127
+ background-color: rgba(255, 255, 255, 0.1);
128
+ }
129
+ }
130
+
131
+ /* Activity rotates the gradient angle, never the bubble or its content. */
132
+ @property --bubble-activity-angle {
133
+ syntax: "<angle>";
134
+ inherits: false;
135
+ initial-value: 0deg;
136
+ }
137
+
138
+ .bubble-group--busy {
139
+ position: relative;
140
+ }
141
+
142
+ .bubble-group--busy::before,
143
+ .bubble-group--busy::after {
144
+ content: "";
145
+ position: absolute;
146
+ inset: 0;
147
+ border-radius: inherit;
148
+ pointer-events: none;
149
+ z-index: 1;
150
+ /* A visible static border remains when CSS masking is unsupported. */
151
+ border: 2px solid var(--bubble-activity-color-1, #22d3ee);
152
+ }
153
+
154
+ .bubble-group--busy::after {
155
+ inset: 1px;
156
+ filter: blur(1.5px);
157
+ opacity: 0.65;
158
+ }
159
+
160
+ @supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
161
+ .bubble-group--busy::before,
162
+ .bubble-group--busy::after {
163
+ border: 0;
164
+ padding: 2px;
165
+ background: conic-gradient(
166
+ from var(--bubble-activity-angle),
167
+ var(--bubble-activity-color-1, #22d3ee),
168
+ var(--bubble-activity-color-2, #8b5cf6),
169
+ var(--bubble-activity-color-3, #ec4899),
170
+ var(--bubble-activity-color-1, #22d3ee)
171
+ );
172
+ -webkit-mask:
173
+ linear-gradient(#fff 0 0) content-box,
174
+ linear-gradient(#fff 0 0);
175
+ -webkit-mask-composite: xor;
176
+ mask:
177
+ linear-gradient(#fff 0 0) content-box,
178
+ linear-gradient(#fff 0 0);
179
+ mask-composite: exclude;
180
+ animation: bubble-activity-orbit var(--bubble-activity-duration, 2.4s) linear infinite;
181
+ }
182
+ }
183
+
184
+ @keyframes bubble-activity-orbit {
185
+ to {
186
+ --bubble-activity-angle: 360deg;
187
+ }
188
+ }
189
+
190
+ @media (prefers-reduced-motion: reduce) {
191
+ .bubble-group--busy::before,
192
+ .bubble-group--busy::after {
193
+ animation: none;
194
+ }
195
+ }
package/package.json CHANGED
@@ -1,6 +1,90 @@
1
1
  {
2
- "name": "bubble-toolbar",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "bubble-toolbar",
3
+ "version": "1.0.0",
4
+ "description": "Floating, responsive, blurred glass toolbar component for React 18 and 19 with group-based circular and pill layouts.",
5
+ "author": "ElJijuna",
6
+ "license": "MIT",
7
+ "main": "./dist/index.js",
8
+ "module": "./dist/index.mjs",
9
+ "types": "./dist/index.d.ts",
10
+ "exports": {
11
+ ".": {
12
+ "types": "./dist/index.d.ts",
13
+ "import": "./dist/index.mjs",
14
+ "require": "./dist/index.js"
15
+ },
16
+ "./styles.css": "./dist/styles.css"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "CHANGELOG.md"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsup",
24
+ "test": "jest",
25
+ "test:watch": "jest --watch",
26
+ "test:coverage": "jest --coverage",
27
+ "typecheck": "tsc --noEmit",
28
+ "storybook": "storybook dev -p 6006 --disable-telemetry",
29
+ "build-storybook": "storybook build --disable-telemetry",
30
+ "lint": "eslint . --max-warnings=0",
31
+ "lint:fix": "eslint . --fix --max-warnings=0",
32
+ "format": "biome check --write .",
33
+ "format:check": "biome check .",
34
+ "check": "npm run lint && npm run format:check && npm run typecheck && npm test -- --runInBand",
35
+ "prepack": "npm run build",
36
+ "release": "node scripts/release.mjs",
37
+ "release:dry-run": "semantic-release --dry-run --no-ci",
38
+ "commitlint": "commitlint"
39
+ },
40
+ "peerDependencies": {
41
+ "react": "^18.0.0 || ^19.0.0",
42
+ "react-dom": "^18.0.0 || ^19.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@biomejs/biome": "^2.5.15",
46
+ "@commitlint/cli": "^21.2.4",
47
+ "@commitlint/config-conventional": "^21.2.4",
48
+ "@semantic-release/changelog": "^7.0.0",
49
+ "@semantic-release/commit-analyzer": "^13.0.1",
50
+ "@semantic-release/git": "^11.0.1",
51
+ "@semantic-release/github": "^12.0.10",
52
+ "@semantic-release/npm": "^13.2.0",
53
+ "@semantic-release/release-notes-generator": "^14.1.1",
54
+ "@storybook/addon-docs": "^10.6.2",
55
+ "@storybook/react": "^10.6.2",
56
+ "@storybook/react-vite": "^10.6.2",
57
+ "@testing-library/dom": "^10.4.2",
58
+ "@testing-library/jest-dom": "^6.6.3",
59
+ "@testing-library/react": "^16.2.0",
60
+ "@types/jest": "^29.5.14",
61
+ "@types/node": "^22.13.1",
62
+ "@types/react": "^19.0.8",
63
+ "@types/react-dom": "^19.0.3",
64
+ "@vitejs/plugin-react": "^6.1.2",
65
+ "conventional-changelog-conventionalcommits": "^9.3.1",
66
+ "eslint": "^10.13.0",
67
+ "jest": "^29.7.0",
68
+ "jest-environment-jsdom": "^29.7.0",
69
+ "react": "^19.0.0",
70
+ "react-dom": "^19.0.0",
71
+ "semantic-release": "^25.0.9",
72
+ "storybook": "^10.6.2",
73
+ "super-configs": "^1.26.1",
74
+ "ts-jest": "^29.2.5",
75
+ "tsup": "^8.3.6",
76
+ "typescript": "^5.7.3",
77
+ "vite": "8.3.4"
78
+ },
79
+ "repository": {
80
+ "type": "git",
81
+ "url": "git+https://github.com/ElJijuna/bubble-toolbar.git"
82
+ },
83
+ "homepage": "https://eljijuna.github.io/bubble-toolbar/",
84
+ "bugs": {
85
+ "url": "https://github.com/ElJijuna/bubble-toolbar/issues"
86
+ },
87
+ "publishConfig": {
88
+ "access": "public"
89
+ }
90
+ }