@djangocfg/layouts 2.1.166 → 2.1.167
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.167",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"check": "tsc --noEmit"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@djangocfg/api": "^2.1.
|
|
78
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
79
|
-
"@djangocfg/i18n": "^2.1.
|
|
80
|
-
"@djangocfg/ui-core": "^2.1.
|
|
81
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
82
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
77
|
+
"@djangocfg/api": "^2.1.167",
|
|
78
|
+
"@djangocfg/centrifugo": "^2.1.167",
|
|
79
|
+
"@djangocfg/i18n": "^2.1.167",
|
|
80
|
+
"@djangocfg/ui-core": "^2.1.167",
|
|
81
|
+
"@djangocfg/ui-nextjs": "^2.1.167",
|
|
82
|
+
"@djangocfg/ui-tools": "^2.1.167",
|
|
83
83
|
"@hookform/resolvers": "^5.2.2",
|
|
84
84
|
"consola": "^3.4.2",
|
|
85
85
|
"lucide-react": "^0.545.0",
|
|
@@ -102,13 +102,13 @@
|
|
|
102
102
|
"uuid": "^11.1.0"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
|
-
"@djangocfg/api": "^2.1.
|
|
106
|
-
"@djangocfg/i18n": "^2.1.
|
|
107
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
108
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
109
|
-
"@djangocfg/ui-core": "^2.1.
|
|
110
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
111
|
-
"@djangocfg/ui-tools": "^2.1.
|
|
105
|
+
"@djangocfg/api": "^2.1.167",
|
|
106
|
+
"@djangocfg/i18n": "^2.1.167",
|
|
107
|
+
"@djangocfg/centrifugo": "^2.1.167",
|
|
108
|
+
"@djangocfg/typescript-config": "^2.1.167",
|
|
109
|
+
"@djangocfg/ui-core": "^2.1.167",
|
|
110
|
+
"@djangocfg/ui-nextjs": "^2.1.167",
|
|
111
|
+
"@djangocfg/ui-tools": "^2.1.167",
|
|
112
112
|
"@types/node": "^24.7.2",
|
|
113
113
|
"@types/react": "^19.1.0",
|
|
114
114
|
"@types/react-dom": "^19.1.0",
|
|
@@ -118,6 +118,8 @@ export interface LocaleSwitcherProps {
|
|
|
118
118
|
showIcon?: boolean;
|
|
119
119
|
/** Show flag emoji (default: true) */
|
|
120
120
|
showFlag?: boolean;
|
|
121
|
+
/** Show label text in trigger button (default: true) */
|
|
122
|
+
showTriggerLabel?: boolean;
|
|
121
123
|
/** Custom className */
|
|
122
124
|
className?: string;
|
|
123
125
|
}
|
|
@@ -132,6 +134,7 @@ export function LocaleSwitcher({
|
|
|
132
134
|
size = 'sm',
|
|
133
135
|
showIcon = true,
|
|
134
136
|
showFlag = true,
|
|
137
|
+
showTriggerLabel = true,
|
|
135
138
|
className,
|
|
136
139
|
}: LocaleSwitcherProps) {
|
|
137
140
|
const allLabels = { ...DEFAULT_LABELS, ...labels };
|
|
@@ -157,9 +160,9 @@ export function LocaleSwitcher({
|
|
|
157
160
|
<DropdownMenu>
|
|
158
161
|
<DropdownMenuTrigger asChild>
|
|
159
162
|
<Button variant={variant} size={size} className={className}>
|
|
160
|
-
{showIcon && !currentFlag && <Globe className="h-4 w-4 mr-1" />}
|
|
161
|
-
{currentFlag && <span className="mr-1">{currentFlag}</span>}
|
|
162
|
-
<span>{currentLabel}</span>
|
|
163
|
+
{showIcon && !currentFlag && <Globe className={showTriggerLabel ? "h-4 w-4 mr-1" : "h-4 w-4"} />}
|
|
164
|
+
{currentFlag && <span className={showTriggerLabel ? "mr-1" : ""}>{currentFlag}</span>}
|
|
165
|
+
{showTriggerLabel && <span>{currentLabel}</span>}
|
|
163
166
|
</Button>
|
|
164
167
|
</DropdownMenuTrigger>
|
|
165
168
|
<DropdownMenuContent align="end">
|