@gridui/preferences 0.0.0 → 1.0.2
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/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/preferences-controls/style.d.ts +0 -1
- package/dist/styles.css +0 -14
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -85,7 +85,6 @@ var preferencesOptionsStyles = cva(cn(
|
|
|
85
85
|
"*:aria-[current=page]:text-foreground *:aria-[current=page]:bg-brand-tint",
|
|
86
86
|
"*:aria-pressed:text-foreground *:aria-pressed:bg-brand-tint"
|
|
87
87
|
));
|
|
88
|
-
var preferenceIndicatorStyles = cva("gridui-dropdown-indicator w-4 shrink-0 text-foreground");
|
|
89
88
|
|
|
90
89
|
// src/preferences-controls/dropdown.tsx
|
|
91
90
|
import { DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem } from "@gridui/dropdown-menu";
|
|
@@ -269,6 +268,7 @@ var InlinePreferences = (props) => {
|
|
|
269
268
|
};
|
|
270
269
|
|
|
271
270
|
// src/preferences-controls/preferences-controls.tsx
|
|
271
|
+
import { dropdownIndicatorStyles } from "@gridui/dropdown-menu";
|
|
272
272
|
import { Check } from "lucide-react";
|
|
273
273
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
274
274
|
var PreferencesControls = (props) => {
|
|
@@ -286,7 +286,7 @@ var PreferencesControls = (props) => {
|
|
|
286
286
|
/* @__PURE__ */ jsx4(
|
|
287
287
|
"span",
|
|
288
288
|
{
|
|
289
|
-
className:
|
|
289
|
+
className: dropdownIndicatorStyles(),
|
|
290
290
|
"aria-hidden": "true",
|
|
291
291
|
children: language.current ? /* @__PURE__ */ jsx4(
|
|
292
292
|
Check,
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/preferences-controls/menu.tsx", "../src/preferences-controls/style.ts", "../src/preferences-controls/dropdown.tsx", "../src/preferences-controls/inline.tsx", "../src/preferences-controls/preferences-controls.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Menu\n */\n\nimport { Button } from \"@gridui/button\";\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from \"@gridui/dropdown-menu\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"@gridui/tooltip\";\nimport { type FC, type ReactNode, useState } from \"react\";\n\nexport type PreferenceMenuProps = {\n readonly label: string;\n readonly icon: ReactNode;\n readonly children: ReactNode;\n};\n\nexport const PreferenceMenu: FC<PreferenceMenuProps> = (props: PreferenceMenuProps) => {\n const { label, icon, children } = props;\n const [\n menuOpen,\n setMenuOpen,\n ] = useState(false);\n const [\n hintOpen,\n setHintOpen,\n ] = useState(false);\n return (<DropdownMenu\n open={menuOpen}\n onOpenChange={(open) => {\n setMenuOpen(open);\n if (open) {\n setHintOpen(false);\n }\n }}\n >\n <Tooltip\n open={hintOpen && !menuOpen}\n onOpenChange={setHintOpen}\n >\n <TooltipTrigger>\n <DropdownMenuTrigger\n asChild\n >\n <Button\n variant=\"quiet\"\n size=\"small\"\n layout=\"icon\"\n aria-label={label}\n >\n {icon}\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent\n align=\"end\"\n >\n {label}\n </TooltipContent>\n </Tooltip>\n <DropdownMenuContent>\n {children}\n </DropdownMenuContent>\n </DropdownMenu>);\n};\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const preferencesStyles = cva(cn(\n \"gridui-preferences\",\n \"flex flex-wrap gap-gridui-8\",\n));\n\nexport const preferencesInlineStyles = cva(cn(\n \"gridui-preferences-inline\",\n \"grid gap-gridui-24\",\n));\n\nexport const preferencesLabelStyles = cva(cn(\n \"gridui-preferences-label\",\n \"m-0 text-muted type-caption\",\n));\n\nexport const preferencesOptionsStyles = cva(cn(\n \"gridui-preferences-options\",\n \"flex flex-wrap gap-gridui-4 p-gridui-4 border border-solid border-border rounded-control\",\n \"[&_>_a]:inline-flex [&_>_a]:min-h-9 [&_>_a]:items-center [&_>_a]:gap-gridui-4 [&_>_a]:py-gridui-4 [&_>_a]:px-gridui-8 [&_>_a]:rounded-control [&_>_a]:text-foreground [&_>_a]:no-underline [&_>_a]:type-ui\",\n \"*:aria-[current=page]:text-foreground *:aria-[current=page]:bg-brand-tint\",\n \"*:aria-pressed:text-foreground *:aria-pressed:bg-brand-tint\",\n));\n\nexport const preferenceIndicatorStyles = cva(\"gridui-dropdown-indicator w-4 shrink-0 text-foreground\");\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Dropdown\n */\n\nimport { PreferenceMenu } from \"./menu\";\nimport { preferencesStyles } from \"./style\";\nimport type { PreferencesOptions } from \"./types\";\nimport { DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem } from \"@gridui/dropdown-menu\";\nimport { cn } from \"@gridui/style-utils\";\nimport { isTheme } from \"@gridui/theme/preference\";\nimport { THEME } from \"@gridui/theme/theme\";\nimport { TooltipProvider } from \"@gridui/tooltip\";\nimport { Globe, Laptop, Moon, Sun } from \"lucide-react\";\nimport type { FC, ReactElement } from \"react\";\n\nexport type DropdownPreferencesProps = PreferencesOptions & {\n readonly languageLinks: readonly ReactElement[];\n};\n\nexport const DropdownPreferences: FC<DropdownPreferencesProps> = (props: DropdownPreferencesProps) => {\n const { labels, theme, onThemeChange, languageLinks } = props;\n const themeIcons = {\n system: Laptop,\n dark: Moon,\n light: Sun,\n };\n const ThemeIcon = themeIcons[theme];\n return (<TooltipProvider>\n <div\n className={cn(preferencesStyles())}\n >\n <PreferenceMenu\n label={labels.language}\n icon={(<Globe\n aria-hidden=\"true\"\n />)}\n >\n <DropdownMenuLabel>\n {labels.language}\n </DropdownMenuLabel>\n {languageLinks.map((link) => {\n return (<DropdownMenuItem\n key={link.key}\n asChild\n >\n {link}\n </DropdownMenuItem>);\n })}\n </PreferenceMenu>\n <PreferenceMenu\n label={labels.appearance}\n icon={(<ThemeIcon\n aria-hidden=\"true\"\n />)}\n >\n <DropdownMenuLabel>\n {labels.appearance}\n </DropdownMenuLabel>\n <DropdownMenuRadioGroup\n value={theme}\n onValueChange={(value) => {\n if (isTheme(value)) {\n onThemeChange(value);\n }\n }}\n >\n <DropdownMenuRadioItem\n value={THEME.SYSTEM}\n >\n {labels.system}\n </DropdownMenuRadioItem>\n <DropdownMenuRadioItem\n value={THEME.LIGHT}\n >\n {labels.light}\n </DropdownMenuRadioItem>\n <DropdownMenuRadioItem\n value={THEME.DARK}\n >\n {labels.dark}\n </DropdownMenuRadioItem>\n </DropdownMenuRadioGroup>\n </PreferenceMenu>\n </div>\n </TooltipProvider>);\n};\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Inline\n */\n\nimport { preferencesInlineStyles, preferencesLabelStyles, preferencesOptionsStyles } from \"./style\";\nimport type { PreferencesOptions } from \"./types\";\nimport { Button } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport { THEME } from \"@gridui/theme/theme\";\nimport type { FC, ReactElement } from \"react\";\n\nexport type InlinePreferencesProps = PreferencesOptions & {\n readonly languageLinks: readonly ReactElement[];\n};\n\nexport const InlinePreferences: FC<InlinePreferencesProps> = (props: InlinePreferencesProps) => {\n const { labels, theme, onThemeChange, languageLinks } = props;\n return (<div\n className={cn(preferencesInlineStyles())}\n >\n <div\n role=\"group\"\n aria-label={labels.language}\n >\n <p\n className={cn(preferencesLabelStyles())}\n >\n {labels.language}\n </p>\n <div\n className={cn(preferencesOptionsStyles())}\n >\n {languageLinks}\n </div>\n </div>\n <div\n role=\"group\"\n aria-label={labels.appearance}\n >\n <p\n className={cn(preferencesLabelStyles())}\n >\n {labels.appearance}\n </p>\n <div\n className={cn(preferencesOptionsStyles())}\n >\n {([\n THEME.SYSTEM,\n THEME.LIGHT,\n THEME.DARK,\n ] as const).map((value) => {\n return (<Button\n key={value}\n size=\"small\"\n variant=\"quiet\"\n aria-pressed={theme === value}\n onClick={() => {\n return void onThemeChange(value);\n }}\n >\n {labels[value]}\n </Button>);\n })}\n </div>\n </div>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Preferences Controls\n */\n\nimport { DropdownPreferences } from \"./dropdown\";\nimport { InlinePreferences } from \"./inline\";\nimport type { PreferenceLanguage } from \"./language\";\nimport { preferenceIndicatorStyles } from \"./style\";\nimport type { PreferencesOptions } from \"./types\";\nimport { Check } from \"lucide-react\";\nimport type { FC } from \"react\";\n\nexport type PreferencesControlsProps = PreferencesOptions & {\n readonly presentation?: \"dropdown\" | \"inline\";\n readonly languages: readonly PreferenceLanguage[];\n};\n\nexport const PreferencesControls: FC<PreferencesControlsProps> = (props: PreferencesControlsProps) => {\n const { presentation = \"dropdown\", languages, ...options } = props;\n const languageLinks = languages.map((language) => {\n return (<a\n key={language.locale}\n href={language.href}\n hrefLang={language.locale}\n lang={language.locale}\n aria-current={language.current ? \"page\" : undefined}\n onClick={language.onSelect}\n >\n <span\n className={preferenceIndicatorStyles()}\n aria-hidden=\"true\"\n >\n {language.current ? (<Check\n size={16}\n />) : null}\n </span>\n {language.label}\n </a>);\n });\n\n if (presentation === \"inline\") {\n return (<InlinePreferences\n {...options}\n languageLinks={languageLinks}\n />);\n }\n return (<DropdownPreferences\n {...options}\n languageLinks={languageLinks}\n />);\n};\n"],
|
|
5
|
-
"mappings": ";AAOA,SAAS,cAAc;AACvB,SAAS,cAAc,qBAAqB,2BAA2B;AACvE,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAkC,gBAAgB;AA2B1C,SAQY,KARZ;AAnBD,IAAM,iBAA0C,CAAC,UAA+B;AACnF,QAAM,EAAE,OAAO,MAAM,SAAS,IAAI;AAClC,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,KAAK;AAClB,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,KAAK;AAClB,SAAQ;AAAA,IAAC;AAAA;AAAA,MACL,MAAM;AAAA,MACN,cAAc,CAAC,SAAS;AACpB,oBAAY,IAAI;AAChB,YAAI,MAAM;AACN,sBAAY,KAAK;AAAA,QACrB;AAAA,MACJ;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,MAAM,YAAY,CAAC;AAAA,YACnB,cAAc;AAAA,YAEd;AAAA,kCAAC,kBACG;AAAA,gBAAC;AAAA;AAAA,kBACG,SAAO;AAAA,kBAEP;AAAA,oBAAC;AAAA;AAAA,sBACG,SAAQ;AAAA,sBACR,MAAK;AAAA,sBACL,QAAO;AAAA,sBACP,cAAY;AAAA,sBAEX;AAAA;AAAA,kBACL;AAAA;AAAA,cACJ,GACJ;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACG,OAAM;AAAA,kBAEL;AAAA;AAAA,cACL;AAAA;AAAA;AAAA,QACJ;AAAA,QACA,oBAAC,uBACI,UACL;AAAA;AAAA;AAAA,EACJ;AACJ;;;AC1DA,SAAS,UAAU;AACnB,SAAS,WAAW;AAEb,IAAM,oBAAoB,IAAI;AAAA,EACjC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,0BAA0B,IAAI;AAAA,EACvC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,yBAAyB,IAAI;AAAA,EACtC;AAAA,EACA;AACJ,CAAC;AAEM,IAAM,2BAA2B,IAAI;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACJ,CAAC
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Menu\n */\n\nimport { Button } from \"@gridui/button\";\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from \"@gridui/dropdown-menu\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"@gridui/tooltip\";\nimport { type FC, type ReactNode, useState } from \"react\";\n\nexport type PreferenceMenuProps = {\n readonly label: string;\n readonly icon: ReactNode;\n readonly children: ReactNode;\n};\n\nexport const PreferenceMenu: FC<PreferenceMenuProps> = (props: PreferenceMenuProps) => {\n const { label, icon, children } = props;\n const [\n menuOpen,\n setMenuOpen,\n ] = useState(false);\n const [\n hintOpen,\n setHintOpen,\n ] = useState(false);\n return (<DropdownMenu\n open={menuOpen}\n onOpenChange={(open) => {\n setMenuOpen(open);\n if (open) {\n setHintOpen(false);\n }\n }}\n >\n <Tooltip\n open={hintOpen && !menuOpen}\n onOpenChange={setHintOpen}\n >\n <TooltipTrigger>\n <DropdownMenuTrigger\n asChild\n >\n <Button\n variant=\"quiet\"\n size=\"small\"\n layout=\"icon\"\n aria-label={label}\n >\n {icon}\n </Button>\n </DropdownMenuTrigger>\n </TooltipTrigger>\n <TooltipContent\n align=\"end\"\n >\n {label}\n </TooltipContent>\n </Tooltip>\n <DropdownMenuContent>\n {children}\n </DropdownMenuContent>\n </DropdownMenu>);\n};\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Style\n */\n\nimport { cn } from \"@gridui/style-utils\";\nimport { cva } from \"class-variance-authority\";\n\nexport const preferencesStyles = cva(cn(\n \"gridui-preferences\",\n \"flex flex-wrap gap-gridui-8\",\n));\n\nexport const preferencesInlineStyles = cva(cn(\n \"gridui-preferences-inline\",\n \"grid gap-gridui-24\",\n));\n\nexport const preferencesLabelStyles = cva(cn(\n \"gridui-preferences-label\",\n \"m-0 text-muted type-caption\",\n));\n\nexport const preferencesOptionsStyles = cva(cn(\n \"gridui-preferences-options\",\n \"flex flex-wrap gap-gridui-4 p-gridui-4 border border-solid border-border rounded-control\",\n \"[&_>_a]:inline-flex [&_>_a]:min-h-9 [&_>_a]:items-center [&_>_a]:gap-gridui-4 [&_>_a]:py-gridui-4 [&_>_a]:px-gridui-8 [&_>_a]:rounded-control [&_>_a]:text-foreground [&_>_a]:no-underline [&_>_a]:type-ui\",\n \"*:aria-[current=page]:text-foreground *:aria-[current=page]:bg-brand-tint\",\n \"*:aria-pressed:text-foreground *:aria-pressed:bg-brand-tint\",\n));\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Dropdown\n */\n\nimport { PreferenceMenu } from \"./menu\";\nimport { preferencesStyles } from \"./style\";\nimport type { PreferencesOptions } from \"./types\";\nimport { DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem } from \"@gridui/dropdown-menu\";\nimport { cn } from \"@gridui/style-utils\";\nimport { isTheme } from \"@gridui/theme/preference\";\nimport { THEME } from \"@gridui/theme/theme\";\nimport { TooltipProvider } from \"@gridui/tooltip\";\nimport { Globe, Laptop, Moon, Sun } from \"lucide-react\";\nimport type { FC, ReactElement } from \"react\";\n\nexport type DropdownPreferencesProps = PreferencesOptions & {\n readonly languageLinks: readonly ReactElement[];\n};\n\nexport const DropdownPreferences: FC<DropdownPreferencesProps> = (props: DropdownPreferencesProps) => {\n const { labels, theme, onThemeChange, languageLinks } = props;\n const themeIcons = {\n system: Laptop,\n dark: Moon,\n light: Sun,\n };\n const ThemeIcon = themeIcons[theme];\n return (<TooltipProvider>\n <div\n className={cn(preferencesStyles())}\n >\n <PreferenceMenu\n label={labels.language}\n icon={(<Globe\n aria-hidden=\"true\"\n />)}\n >\n <DropdownMenuLabel>\n {labels.language}\n </DropdownMenuLabel>\n {languageLinks.map((link) => {\n return (<DropdownMenuItem\n key={link.key}\n asChild\n >\n {link}\n </DropdownMenuItem>);\n })}\n </PreferenceMenu>\n <PreferenceMenu\n label={labels.appearance}\n icon={(<ThemeIcon\n aria-hidden=\"true\"\n />)}\n >\n <DropdownMenuLabel>\n {labels.appearance}\n </DropdownMenuLabel>\n <DropdownMenuRadioGroup\n value={theme}\n onValueChange={(value) => {\n if (isTheme(value)) {\n onThemeChange(value);\n }\n }}\n >\n <DropdownMenuRadioItem\n value={THEME.SYSTEM}\n >\n {labels.system}\n </DropdownMenuRadioItem>\n <DropdownMenuRadioItem\n value={THEME.LIGHT}\n >\n {labels.light}\n </DropdownMenuRadioItem>\n <DropdownMenuRadioItem\n value={THEME.DARK}\n >\n {labels.dark}\n </DropdownMenuRadioItem>\n </DropdownMenuRadioGroup>\n </PreferenceMenu>\n </div>\n </TooltipProvider>);\n};\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Inline\n */\n\nimport { preferencesInlineStyles, preferencesLabelStyles, preferencesOptionsStyles } from \"./style\";\nimport type { PreferencesOptions } from \"./types\";\nimport { Button } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport { THEME } from \"@gridui/theme/theme\";\nimport type { FC, ReactElement } from \"react\";\n\nexport type InlinePreferencesProps = PreferencesOptions & {\n readonly languageLinks: readonly ReactElement[];\n};\n\nexport const InlinePreferences: FC<InlinePreferencesProps> = (props: InlinePreferencesProps) => {\n const { labels, theme, onThemeChange, languageLinks } = props;\n return (<div\n className={cn(preferencesInlineStyles())}\n >\n <div\n role=\"group\"\n aria-label={labels.language}\n >\n <p\n className={cn(preferencesLabelStyles())}\n >\n {labels.language}\n </p>\n <div\n className={cn(preferencesOptionsStyles())}\n >\n {languageLinks}\n </div>\n </div>\n <div\n role=\"group\"\n aria-label={labels.appearance}\n >\n <p\n className={cn(preferencesLabelStyles())}\n >\n {labels.appearance}\n </p>\n <div\n className={cn(preferencesOptionsStyles())}\n >\n {([\n THEME.SYSTEM,\n THEME.LIGHT,\n THEME.DARK,\n ] as const).map((value) => {\n return (<Button\n key={value}\n size=\"small\"\n variant=\"quiet\"\n aria-pressed={theme === value}\n onClick={() => {\n return void onThemeChange(value);\n }}\n >\n {labels[value]}\n </Button>);\n })}\n </div>\n </div>\n </div>);\n};\n", "/**\n * @author WMXPY\n * @package Preferences\n * @namespace PreferencesControls\n * @description Preferences Controls\n */\n\nimport { DropdownPreferences } from \"./dropdown\";\nimport { InlinePreferences } from \"./inline\";\nimport type { PreferenceLanguage } from \"./language\";\nimport type { PreferencesOptions } from \"./types\";\nimport { dropdownIndicatorStyles } from \"@gridui/dropdown-menu\";\nimport { Check } from \"lucide-react\";\nimport type { FC } from \"react\";\n\nexport type PreferencesControlsProps = PreferencesOptions & {\n readonly presentation?: \"dropdown\" | \"inline\";\n readonly languages: readonly PreferenceLanguage[];\n};\n\nexport const PreferencesControls: FC<PreferencesControlsProps> = (props: PreferencesControlsProps) => {\n const { presentation = \"dropdown\", languages, ...options } = props;\n const languageLinks = languages.map((language) => {\n return (<a\n key={language.locale}\n href={language.href}\n hrefLang={language.locale}\n lang={language.locale}\n aria-current={language.current ? \"page\" : undefined}\n onClick={language.onSelect}\n >\n <span\n className={dropdownIndicatorStyles()}\n aria-hidden=\"true\"\n >\n {language.current ? (<Check\n size={16}\n />) : null}\n </span>\n {language.label}\n </a>);\n });\n\n if (presentation === \"inline\") {\n return (<InlinePreferences\n {...options}\n languageLinks={languageLinks}\n />);\n }\n return (<DropdownPreferences\n {...options}\n languageLinks={languageLinks}\n />);\n};\n"],
|
|
5
|
+
"mappings": ";AAOA,SAAS,cAAc;AACvB,SAAS,cAAc,qBAAqB,2BAA2B;AACvE,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,SAAkC,gBAAgB;AA2B1C,SAQY,KARZ;AAnBD,IAAM,iBAA0C,CAAC,UAA+B;AACnF,QAAM,EAAE,OAAO,MAAM,SAAS,IAAI;AAClC,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,KAAK;AAClB,QAAM;AAAA,IACF;AAAA,IACA;AAAA,EACJ,IAAI,SAAS,KAAK;AAClB,SAAQ;AAAA,IAAC;AAAA;AAAA,MACL,MAAM;AAAA,MACN,cAAc,CAAC,SAAS;AACpB,oBAAY,IAAI;AAChB,YAAI,MAAM;AACN,sBAAY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AAA;AAAA,sBARR;AAAA,oBAST;AAAA,kBACJ,CAAC;AAAA;AAAA,cACL;AAAA;AAAA;AAAA,QACJ;AAAA;AAAA;AAAA,EACJ;AACJ;;;AC3DA,SAAS,+BAA+B;AACxC,SAAS,aAAa;AAWN,SAYqB,OAAAK,MAZrB,QAAAC,aAAA;AAHT,IAAM,sBAAoD,CAAC,UAAoC;AAClG,QAAM,EAAE,eAAe,YAAY,WAAW,GAAG,QAAQ,IAAI;AAC7D,QAAM,gBAAgB,UAAU,IAAI,CAAC,aAAa;AAC9C,WAAQ,gBAAAA;AAAA,MAAC;AAAA;AAAA,QAEL,MAAM,SAAS;AAAA,QACf,UAAU,SAAS;AAAA,QACnB,MAAM,SAAS;AAAA,QACf,gBAAc,SAAS,UAAU,SAAS;AAAA,QAC1C,SAAS,SAAS;AAAA,QAElB;AAAA,0BAAAD;AAAA,YAAC;AAAA;AAAA,cACG,WAAW,wBAAwB;AAAA,cACnC,eAAY;AAAA,cAEX,mBAAS,UAAW,gBAAAA;AAAA,gBAAC;AAAA;AAAA,kBAClB,MAAM;AAAA;AAAA,cACV,IAAM;AAAA;AAAA,UACV;AAAA,UACC,SAAS;AAAA;AAAA;AAAA,MAfL,SAAS;AAAA,IAgBlB;AAAA,EACJ,CAAC;AAED,MAAI,iBAAiB,UAAU;AAC3B,WAAQ,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACJ,GAAG;AAAA,QACJ;AAAA;AAAA,IACJ;AAAA,EACJ;AACA,SAAQ,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACJ,GAAG;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": ["cn", "jsx", "jsxs", "Button", "cn", "THEME", "jsx", "jsxs", "jsx", "jsxs"]
|
|
7
7
|
}
|
|
@@ -8,4 +8,3 @@ export declare const preferencesStyles: (props?: import("class-variance-authorit
|
|
|
8
8
|
export declare const preferencesInlineStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
9
|
export declare const preferencesLabelStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
10
10
|
export declare const preferencesOptionsStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
11
|
-
export declare const preferenceIndicatorStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
package/dist/styles.css
CHANGED
|
@@ -19,12 +19,6 @@
|
|
|
19
19
|
.inline {
|
|
20
20
|
display: inline;
|
|
21
21
|
}
|
|
22
|
-
.w-4 {
|
|
23
|
-
width: calc(var(--spacing) * 4);
|
|
24
|
-
}
|
|
25
|
-
.shrink-0 {
|
|
26
|
-
flex-shrink: 0;
|
|
27
|
-
}
|
|
28
22
|
.flex-wrap {
|
|
29
23
|
flex-wrap: wrap;
|
|
30
24
|
}
|
|
@@ -58,9 +52,6 @@
|
|
|
58
52
|
font: var(--gridui-type-caption);
|
|
59
53
|
letter-spacing: normal;
|
|
60
54
|
}
|
|
61
|
-
.text-foreground {
|
|
62
|
-
color: var(--gridui-foreground);
|
|
63
|
-
}
|
|
64
55
|
.text-muted {
|
|
65
56
|
color: var(--gridui-muted);
|
|
66
57
|
}
|
|
@@ -108,11 +99,6 @@
|
|
|
108
99
|
text-decoration-line: none;
|
|
109
100
|
}
|
|
110
101
|
}
|
|
111
|
-
@layer components {
|
|
112
|
-
.gridui-preference-hint {
|
|
113
|
-
transition: opacity var(--gridui-motion-duration-quick) var(--gridui-motion-ease-out), visibility 0s;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
102
|
@property --tw-border-style {
|
|
117
103
|
syntax: "*";
|
|
118
104
|
inherits: false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/preferences",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "GridUI React preferences",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"react-dom": "^19.2.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@gridui/button": "^2.1.
|
|
30
|
-
"@gridui/dropdown-menu": "^
|
|
31
|
-
"@gridui/style-utils": "^2.1.
|
|
32
|
-
"@gridui/theme": "^2.1
|
|
33
|
-
"@gridui/tooltip": "^
|
|
29
|
+
"@gridui/button": "^2.1.2",
|
|
30
|
+
"@gridui/dropdown-menu": "^1.1.1",
|
|
31
|
+
"@gridui/style-utils": "^2.1.3",
|
|
32
|
+
"@gridui/theme": "^2.2.1",
|
|
33
|
+
"@gridui/tooltip": "^1.0.2",
|
|
34
34
|
"class-variance-authority": "0.7.1",
|
|
35
|
-
"lucide-react": "1.
|
|
35
|
+
"lucide-react": "1.63.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@gridui-internal/configuration": "0.0.0",
|
|
38
|
+
"@gridui-internal/configuration": "0.0.0-internal",
|
|
39
39
|
"@jest/globals": "30.5.2",
|
|
40
40
|
"@types/jest": "30.0.0",
|
|
41
|
-
"@types/node": "26.6.
|
|
41
|
+
"@types/node": "26.6.6",
|
|
42
42
|
"@types/react": "19.3.0",
|
|
43
43
|
"@types/react-dom": "19.3.0",
|
|
44
44
|
"jest": "30.5.2",
|