@korioinc/next-core 2.0.6 → 2.0.8

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.
@@ -65,5 +65,5 @@ export default function LocaleSwitcher({ languages } = {}) {
65
65
  if (!currentLanguage) {
66
66
  return null;
67
67
  }
68
- return (_jsxs(Menu, { as: 'div', className: 'relative', children: [_jsx(MenuButton, { className: 'border-glass bg-glass hover:bg-glass-backdrop relative inline-flex h-9 w-9 items-center justify-center rounded-md border transition-colors', children: currentLanguage.flag }), _jsx(Transition, { as: Fragment, enter: 'transition ease-out duration-100', enterFrom: 'transform opacity-0 scale-95', enterTo: 'transform opacity-100 scale-100', leave: 'transition ease-in duration-75', leaveFrom: 'transform opacity-100 scale-100', leaveTo: 'transform opacity-0 scale-95', children: _jsx(MenuItems, { anchor: 'bottom end', className: 'glass-backdrop border-glass z-50 w-36 rounded-md border ring-1 ring-black/5 [--anchor-gap:4px] focus:outline-none', children: _jsx("div", { className: 'py-1', children: availableLanguages.map((language) => (_jsx(MenuItem, { children: _jsxs("button", { onClick: () => changeLanguage(language.code), className: 'data-[focus]:bg-glass-backdrop text-foreground group flex w-full items-center gap-2 px-3 py-2 text-sm transition-colors', children: [language.flag, _jsx("span", { children: language.name }), currentLocale === language.code && (_jsx("svg", { className: 'ml-auto h-4 w-4', fill: 'none', stroke: 'currentColor', viewBox: '0 0 24 24', children: _jsx("path", { strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: 2, d: 'M5 13l4 4L19 7' }) }))] }) }, language.code))) }) }) })] }));
68
+ return (_jsxs(Menu, { as: 'div', className: 'relative', children: [_jsx(MenuButton, { className: 'border-glass bg-glass hover:bg-glass-tinted relative inline-flex h-9 w-9 items-center justify-center rounded-md border transition-colors', children: currentLanguage.flag }), _jsx(Transition, { as: Fragment, enter: 'transition ease-out duration-100', enterFrom: 'transform opacity-0 scale-95', enterTo: 'transform opacity-100 scale-100', leave: 'transition ease-in duration-75', leaveFrom: 'transform opacity-100 scale-100', leaveTo: 'transform opacity-0 scale-95', children: _jsx(MenuItems, { anchor: 'bottom end', className: 'glass-tinted glass-backdrop border-glass z-50 w-36 rounded-md border ring-1 ring-black/5 [--anchor-gap:4px] focus:outline-none', children: _jsx("div", { className: 'py-1', children: availableLanguages.map((language) => (_jsx(MenuItem, { children: _jsxs("button", { onClick: () => changeLanguage(language.code), className: 'data-[focus]:bg-glass-tinted text-foreground group flex w-full items-center gap-2 px-3 py-2 text-sm transition-colors', children: [language.flag, _jsx("span", { children: language.name }), currentLocale === language.code && (_jsx("svg", { className: 'ml-auto h-4 w-4', fill: 'none', stroke: 'currentColor', viewBox: '0 0 24 24', children: _jsx("path", { strokeLinecap: 'round', strokeLinejoin: 'round', strokeWidth: 2, d: 'M5 13l4 4L19 7' }) }))] }) }, language.code))) }) }) })] }));
69
69
  }
@@ -15,6 +15,6 @@ const ThemeSwitcher = () => {
15
15
  if (!mounted) {
16
16
  return (_jsx("button", { className: 'border-input bg-card relative inline-flex h-9 w-9 items-center justify-center rounded-md border opacity-0', "aria-hidden": 'true', children: _jsx("div", { className: 'h-5 w-5' }) }));
17
17
  }
18
- return (_jsxs("button", { onClick: toggleTheme, className: 'border-glass bg-glass hover:bg-glass-backdrop relative inline-flex h-9 w-9 items-center justify-center rounded-md border transition-colors', "aria-label": `Switch theme (current: ${theme})`, title: `Theme: ${theme === 'light' ? 'Light' : 'Dark'} (click to change)`, children: [_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: `absolute h-5 w-5 transition-all ${theme !== 'dark' ? 'scale-100 rotate-0 opacity-100' : 'scale-0 rotate-90 opacity-0'}`, children: [_jsx("circle", { cx: '12', cy: '12', r: '5' }), _jsx("line", { x1: '12', y1: '1', x2: '12', y2: '3' }), _jsx("line", { x1: '12', y1: '21', x2: '12', y2: '23' }), _jsx("line", { x1: '4.22', y1: '4.22', x2: '5.64', y2: '5.64' }), _jsx("line", { x1: '18.36', y1: '18.36', x2: '19.78', y2: '19.78' }), _jsx("line", { x1: '1', y1: '12', x2: '3', y2: '12' }), _jsx("line", { x1: '21', y1: '12', x2: '23', y2: '12' }), _jsx("line", { x1: '4.22', y1: '19.78', x2: '5.64', y2: '18.36' }), _jsx("line", { x1: '18.36', y1: '5.64', x2: '19.78', y2: '4.22' })] }), _jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: `absolute h-5 w-5 transition-all ${theme === 'dark' ? 'scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'}`, children: _jsx("path", { d: 'M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z' }) })] }));
18
+ return (_jsxs("button", { onClick: toggleTheme, className: 'border-glass bg-glass hover:bg-glass-tinted relative inline-flex h-9 w-9 items-center justify-center rounded-md border transition-colors', "aria-label": `Switch theme (current: ${theme})`, title: `Theme: ${theme === 'light' ? 'Light' : 'Dark'} (click to change)`, children: [_jsxs("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: `absolute h-5 w-5 transition-all ${theme !== 'dark' ? 'scale-100 rotate-0 opacity-100' : 'scale-0 rotate-90 opacity-0'}`, children: [_jsx("circle", { cx: '12', cy: '12', r: '5' }), _jsx("line", { x1: '12', y1: '1', x2: '12', y2: '3' }), _jsx("line", { x1: '12', y1: '21', x2: '12', y2: '23' }), _jsx("line", { x1: '4.22', y1: '4.22', x2: '5.64', y2: '5.64' }), _jsx("line", { x1: '18.36', y1: '18.36', x2: '19.78', y2: '19.78' }), _jsx("line", { x1: '1', y1: '12', x2: '3', y2: '12' }), _jsx("line", { x1: '21', y1: '12', x2: '23', y2: '12' }), _jsx("line", { x1: '4.22', y1: '19.78', x2: '5.64', y2: '18.36' }), _jsx("line", { x1: '18.36', y1: '5.64', x2: '19.78', y2: '4.22' })] }), _jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round', className: `absolute h-5 w-5 transition-all ${theme === 'dark' ? 'scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0'}`, children: _jsx("path", { d: 'M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z' }) })] }));
19
19
  };
20
20
  export default ThemeSwitcher;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
2
  interface TooltipProps {
3
3
  children: ReactNode;
4
- content: string;
4
+ content: ReactNode;
5
5
  }
6
6
  export default function Tooltip({ children, content }: TooltipProps): import("react/jsx-runtime").JSX.Element;
7
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAIpD,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,2CAyDlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAoB,MAAM,OAAO,CAAC;AAcpD,UAAU,YAAY;IACpB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,YAAY,2CA2DlE"}
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useRef, useState } from 'react';
4
- import { arrow, autoUpdate, flip, offset, shift, useFloating, useHover, useInteractions } from '@floating-ui/react';
4
+ import { FloatingPortal, arrow, autoUpdate, flip, offset, shift, useFloating, useHover, useInteractions, } from '@floating-ui/react';
5
5
  export default function Tooltip({ children, content }) {
6
6
  const [isOpen, setIsOpen] = useState(false);
7
7
  const arrowRef = useRef(null);
@@ -30,11 +30,11 @@ export default function Tooltip({ children, content }) {
30
30
  bottom: 'top',
31
31
  left: 'right',
32
32
  }[placement.split('-')[0]];
33
- return (_jsxs("div", { ref: refs.setReference, ...getReferenceProps(), className: 'inline-block', children: [children, isOpen && (_jsxs("div", { ref: refs.setFloating, style: floatingStyles, className: 'z-50 rounded bg-black px-2 py-1 text-sm text-white shadow-md dark:bg-white dark:text-black', ...getFloatingProps(), children: [content, _jsx("div", { ref: arrowRef, className: 'absolute h-2 w-2 rotate-45 bg-black dark:bg-white', style: {
34
- left: middlewareData.arrow?.x != null ? `${middlewareData.arrow.x}px` : '',
35
- top: middlewareData.arrow?.y != null ? `${middlewareData.arrow.y}px` : '',
36
- right: '',
37
- bottom: '',
38
- [staticSide]: '-4px',
39
- } })] }))] }));
33
+ return (_jsxs("div", { ref: refs.setReference, ...getReferenceProps(), className: 'inline-block', children: [children, isOpen && (_jsx(FloatingPortal, { children: _jsxs("div", { ref: refs.setFloating, style: floatingStyles, className: 'z-100 rounded bg-black px-2 py-1 text-sm text-white shadow-md dark:bg-white dark:text-black', ...getFloatingProps(), children: [content, _jsx("div", { ref: arrowRef, className: 'absolute h-2 w-2 rotate-45 bg-black dark:bg-white', style: {
34
+ left: middlewareData.arrow?.x != null ? `${middlewareData.arrow.x}px` : '',
35
+ top: middlewareData.arrow?.y != null ? `${middlewareData.arrow.y}px` : '',
36
+ right: '',
37
+ bottom: '',
38
+ [staticSide]: '-4px',
39
+ } })] }) }))] }));
40
40
  }
@@ -72,7 +72,8 @@
72
72
  --color-selection: var(--selection);
73
73
  --color-selection-foreground: var(--selection-foreground);
74
74
  --color-glass: var(--glass);
75
- --color-glass-backdrop: var(--glass-backdrop);
75
+ --color-glass-tinted: var(--glass-tinted);
76
+ --color-glass-glow: var(--glass-glow);
76
77
  }
77
78
 
78
79
  :root {
@@ -121,18 +122,18 @@
121
122
  /* liquid glass (light) */
122
123
  /************************************************************/
123
124
  --glass: oklch(0.8985 0.0271 250 / 0.22);
124
- --glass-backdrop: oklch(0.8764 0.0271 255 / 0.32);
125
+ --glass-tinted: oklch(0.8764 0.0271 255 / 0.32);
126
+ --glass-glow: oklch(0.65 0.18 250 / 0.32);
125
127
  --glass-surface: oklch(0.962 0.014 250 / 0.42);
126
- --glass-surface-backdrop: oklch(0.975 0.018 255 / 0.52);
128
+ --glass-surface-tinted: oklch(0.975 0.018 255 / 0.52);
129
+ --glass-surface-glow: var(--glass-surface);
127
130
  --glass-border: oklch(0.92 0.02 250 / 0.78);
128
131
  --glass-border-subtle: oklch(0.88 0.015 250 / 0.5);
129
132
  --glass-shine: oklch(1 0 0 / 1);
130
133
  --glass-shine-subtle: oklch(1 0 0 / 0.88);
131
134
  --glass-shadow-color: oklch(0.25 0.02 250 / 0.08);
132
135
  --glass-shadow-ambient: oklch(0.35 0.015 250 / 0.055);
133
- --glass-glow: oklch(0.65 0.18 250 / 0.32);
134
- --glass-blur: 14px;
135
- --glass-blur-backdrop: 8px;
136
+ --glass-blur: 8px;
136
137
 
137
138
  --mesh-1: oklch(0.6008 0.1493 249.6 / 0.251);
138
139
  --mesh-2: oklch(0.6498 0.1201 300.4 / 0.2);
@@ -191,18 +192,18 @@
191
192
  /* liquid glass (dark) */
192
193
  /************************************************************/
193
194
  --glass: oklch(0.32 0.0198 252.2 / 0.52);
194
- --glass-backdrop: oklch(0.36 0.0206 254.9 / 0.62);
195
+ --glass-tinted: oklch(0.36 0.0206 254.9 / 0.62);
196
+ --glass-glow: oklch(0.6991 0.1648 249.1 / 0.302);
195
197
  --glass-surface: oklch(0.1792 0.0198 252.2 / 0.42);
196
- --glass-surface-backdrop: oklch(0.2195 0.0206 254.9 / 0.52);
198
+ --glass-surface-tinted: oklch(0.2195 0.0206 254.9 / 0.52);
199
+ --glass-surface-glow: var(--glass-surface);
197
200
  --glass-border: oklch(1 0 0 / 0.122);
198
201
  --glass-border-subtle: oklch(1 0 0 / 0.078);
199
202
  --glass-shine: oklch(1 0 0 / 0.149);
200
203
  --glass-shine-subtle: oklch(1 0 0 / 0.078);
201
204
  --glass-shadow-color: oklch(0 0 0 / 0.21);
202
205
  --glass-shadow-ambient: oklch(0 0 0 / 0.11);
203
- --glass-glow: oklch(0.6991 0.1648 249.1 / 0.302);
204
- --glass-blur: 12px;
205
- --glass-blur-backdrop: 8px;
206
+ --glass-blur: 8px;
206
207
 
207
208
  --mesh-1: oklch(0.4035 0.121 252.1 / 0.349);
208
209
  --mesh-2: oklch(0.4504 0.1802 299.9 / 0.302);
@@ -276,7 +277,10 @@
276
277
  @apply after:border-border relative after:absolute after:inset-0 after:border after:mix-blend-darken dark:after:mix-blend-lighten;
277
278
  }
278
279
 
279
- @utility glass {
280
+ /************************************************************/
281
+ /* liquid glass */
282
+ /************************************************************/
283
+ @utility glass-base {
280
284
  background:
281
285
  linear-gradient(
282
286
  135deg,
@@ -285,29 +289,30 @@
285
289
  color-mix(in oklab, var(--glass-shine) 4%, transparent) 70%,
286
290
  color-mix(in oklab, var(--glass-shine) 6%, transparent) 100%
287
291
  ),
288
- var(--glass-surface);
289
- /*backdrop-filter: blur(var(--glass-blur)) saturate(1.2);*/
292
+ var(--glass-surface-slot, var(--glass-surface));
290
293
  box-shadow:
291
294
  0 1px 2px var(--glass-shadow-ambient),
292
295
  0 5px 10px var(--glass-shadow-color),
293
296
  inset 0 1px 0 var(--glass-shine-subtle);
294
297
  }
295
298
 
299
+ @utility glass {
300
+ --glass-surface-slot: var(--glass-surface);
301
+ @apply glass-base;
302
+ }
303
+
304
+ @utility glass-tinted {
305
+ --glass-surface-slot: var(--glass-surface-tinted);
306
+ @apply glass-base;
307
+ }
308
+
309
+ @utility glass-glow {
310
+ --glass-surface-slot: var(--glass-surface-glow);
311
+ @apply glass-base;
312
+ }
313
+
296
314
  @utility glass-backdrop {
297
- background:
298
- linear-gradient(
299
- 135deg,
300
- color-mix(in oklab, var(--glass-shine) 12%, transparent) 0%,
301
- color-mix(in oklab, var(--glass-shine) 8%, transparent) 30%,
302
- color-mix(in oklab, var(--glass-shine) 4%, transparent) 70%,
303
- color-mix(in oklab, var(--glass-shine) 6%, transparent) 100%
304
- ),
305
- var(--glass-surface-backdrop);
306
- backdrop-filter: blur(var(--glass-blur-backdrop)) saturate(1.2);
307
- box-shadow:
308
- 0 1px 2px var(--glass-shadow-ambient),
309
- 0 5px 10px var(--glass-shadow-color),
310
- inset 0 1px 0 var(--glass-shine-subtle);
315
+ backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
311
316
  }
312
317
 
313
318
  @utility border-glass {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@korioinc/next-core",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./ads": {
@@ -79,11 +79,11 @@
79
79
  "tsc-alias": "^1.8.16",
80
80
  "tw-animate-css": "^1.4.0",
81
81
  "typescript": "^5.9.3",
82
- "@korioinc/next-configs": "2.0.6"
82
+ "@korioinc/next-configs": "2.0.8"
83
83
  },
84
84
  "dependencies": {
85
85
  "@floating-ui/react": "^0.27.16",
86
- "@formatjs/intl-localematcher": "^0.6.2",
86
+ "@formatjs/intl-localematcher": "^0.7.5",
87
87
  "clsx": "^2.1.1",
88
88
  "cookies-next": "^6.1.1",
89
89
  "cosmiconfig": "^9.0.0",
@@ -94,7 +94,7 @@
94
94
  "schema-dts": "^1.1.5",
95
95
  "tailwind-merge": "^3.4.0",
96
96
  "valtio": "^2.2.0",
97
- "@korioinc/next-conf": "2.0.6"
97
+ "@korioinc/next-conf": "2.0.8"
98
98
  },
99
99
  "publishConfig": {
100
100
  "access": "public",