@nayhoo/ui 0.12.1 → 0.13.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.
- package/dist/{chunk-5VVYRZDU.mjs → chunk-24DFRL5Q.mjs} +12 -9
- package/dist/chunk-24DFRL5Q.mjs.map +1 -0
- package/dist/{chunk-OCXG5SMA.mjs → chunk-2WZQZIYN.mjs} +8 -5
- package/dist/chunk-2WZQZIYN.mjs.map +1 -0
- package/dist/chunk-BALC5CGU.mjs +23 -0
- package/dist/chunk-BALC5CGU.mjs.map +1 -0
- package/dist/chunk-DQ4T4WV3.mjs +16 -0
- package/dist/chunk-DQ4T4WV3.mjs.map +1 -0
- package/dist/{chunk-C53FYO65.mjs → chunk-ELXCOK2T.mjs} +8 -5
- package/dist/chunk-ELXCOK2T.mjs.map +1 -0
- package/dist/chunk-GED6IT3S.mjs +1 -0
- package/dist/{chunk-OKNO3BFR.mjs → chunk-L2MODHAE.mjs} +12 -9
- package/dist/chunk-L2MODHAE.mjs.map +1 -0
- package/dist/{chunk-WPNBONR3.mjs → chunk-LSB5JVS2.mjs} +1 -1
- package/dist/chunk-LSB5JVS2.mjs.map +1 -0
- package/dist/{chunk-HNOMBFLC.mjs → chunk-MIRMF5N3.mjs} +8 -5
- package/dist/chunk-MIRMF5N3.mjs.map +1 -0
- package/dist/{chunk-YJWLCDJE.mjs → chunk-XWF2DDXB.mjs} +8 -5
- package/dist/chunk-XWF2DDXB.mjs.map +1 -0
- package/dist/components/avatar.d.mts +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +34 -9
- package/dist/components/avatar.js.map +1 -1
- package/dist/components/avatar.mjs +18 -11
- package/dist/components/avatar.mjs.map +1 -1
- package/dist/components/badge.d.mts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +24 -5
- package/dist/components/badge.js.map +1 -1
- package/dist/components/badge.mjs +8 -4
- package/dist/components/badge.mjs.map +1 -1
- package/dist/components/box.d.mts +1 -1
- package/dist/components/box.d.ts +1 -1
- package/dist/components/box.js.map +1 -1
- package/dist/components/box.mjs +1 -1
- package/dist/components/button.js +32 -10
- package/dist/components/button.js.map +1 -1
- package/dist/components/button.mjs +4 -3
- package/dist/components/card.d.mts +1 -1
- package/dist/components/card.d.ts +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/card.mjs.map +1 -1
- package/dist/components/checkbox.d.mts +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +26 -6
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/checkbox.mjs +10 -5
- package/dist/components/checkbox.mjs.map +1 -1
- package/dist/components/container.d.mts +1 -1
- package/dist/components/container.d.ts +1 -1
- package/dist/components/container.js +24 -5
- package/dist/components/container.js.map +1 -1
- package/dist/components/container.mjs +8 -4
- package/dist/components/container.mjs.map +1 -1
- package/dist/components/dropdown-menu.d.mts +5 -1
- package/dist/components/dropdown-menu.d.ts +5 -1
- package/dist/components/dropdown-menu.js +21 -2
- package/dist/components/dropdown-menu.js.map +1 -1
- package/dist/components/dropdown-menu.mjs +4 -3
- package/dist/components/dropdown-menu.mjs.map +1 -1
- package/dist/components/flex.d.mts +1 -1
- package/dist/components/flex.d.ts +1 -1
- package/dist/components/flex.js +24 -5
- package/dist/components/flex.js.map +1 -1
- package/dist/components/flex.mjs +3 -2
- package/dist/components/form.d.mts +4 -1
- package/dist/components/form.d.ts +4 -1
- package/dist/components/form.js +26 -7
- package/dist/components/form.js.map +1 -1
- package/dist/components/form.mjs +10 -6
- package/dist/components/form.mjs.map +1 -1
- package/dist/components/grid.d.mts +1 -1
- package/dist/components/grid.d.ts +1 -1
- package/dist/components/grid.js +24 -5
- package/dist/components/grid.js.map +1 -1
- package/dist/components/grid.mjs +8 -4
- package/dist/components/grid.mjs.map +1 -1
- package/dist/components/icon-button.d.mts +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +32 -10
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/icon-button.mjs +4 -3
- package/dist/components/label.d.mts +1 -1
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js.map +1 -1
- package/dist/components/label.mjs.map +1 -1
- package/dist/components/link.d.mts +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +24 -5
- package/dist/components/link.js.map +1 -1
- package/dist/components/link.mjs +8 -4
- package/dist/components/link.mjs.map +1 -1
- package/dist/components/menu.d.mts +3 -1
- package/dist/components/menu.d.ts +3 -1
- package/dist/components/menu.js +21 -2
- package/dist/components/menu.js.map +1 -1
- package/dist/components/menu.mjs +4 -3
- package/dist/components/menu.mjs.map +1 -1
- package/dist/components/panel.d.mts +1 -1
- package/dist/components/panel.d.ts +1 -1
- package/dist/components/panel.js.map +1 -1
- package/dist/components/panel.mjs.map +1 -1
- package/dist/components/paragraph.d.mts +1 -1
- package/dist/components/paragraph.d.ts +1 -1
- package/dist/components/paragraph.js.map +1 -1
- package/dist/components/paragraph.mjs.map +1 -1
- package/dist/components/popover.d.mts +4 -1
- package/dist/components/popover.d.ts +4 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/popover.mjs +2 -2
- package/dist/components/popover.mjs.map +1 -1
- package/dist/components/select.d.mts +3 -1
- package/dist/components/select.d.ts +3 -1
- package/dist/components/select.js +29 -7
- package/dist/components/select.js.map +1 -1
- package/dist/components/select.mjs +4 -3
- package/dist/components/select.mjs.map +1 -1
- package/dist/components/separator.d.mts +1 -1
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js.map +1 -1
- package/dist/components/separator.mjs.map +1 -1
- package/dist/components/skeleton.d.mts +1 -1
- package/dist/components/skeleton.d.ts +1 -1
- package/dist/components/skeleton.js +24 -5
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/skeleton.mjs +8 -4
- package/dist/components/skeleton.mjs.map +1 -1
- package/dist/components/spinner.d.mts +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +24 -5
- package/dist/components/spinner.js.map +1 -1
- package/dist/components/spinner.mjs +3 -2
- package/dist/components/status.d.mts +1 -1
- package/dist/components/status.d.ts +1 -1
- package/dist/components/status.js +24 -5
- package/dist/components/status.js.map +1 -1
- package/dist/components/status.mjs +3 -2
- package/dist/components/switch.d.mts +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +31 -9
- package/dist/components/switch.js.map +1 -1
- package/dist/components/switch.mjs +15 -8
- package/dist/components/switch.mjs.map +1 -1
- package/dist/components/text-field.d.mts +1 -1
- package/dist/components/text-field.d.ts +1 -1
- package/dist/components/text-field.js +24 -5
- package/dist/components/text-field.js.map +1 -1
- package/dist/components/text-field.mjs +8 -4
- package/dist/components/text-field.mjs.map +1 -1
- package/dist/components/text.d.mts +1 -1
- package/dist/components/text.d.ts +1 -1
- package/dist/components/text.js +24 -5
- package/dist/components/text.js.map +1 -1
- package/dist/components/text.mjs +3 -2
- package/dist/components/tooltip.d.mts +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +28 -6
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/tooltip.mjs +12 -8
- package/dist/components/tooltip.mjs.map +1 -1
- package/dist/providers/index.js +45 -17
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/index.mjs +6 -5
- package/dist/providers/index.mjs.map +1 -1
- package/dist/utils/index.d.mts +3 -1
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +4 -2
- package/package.json +1 -1
- package/dist/chunk-4N6P3Y54.mjs +0 -13
- package/dist/chunk-4N6P3Y54.mjs.map +0 -1
- package/dist/chunk-5VVYRZDU.mjs.map +0 -1
- package/dist/chunk-C53FYO65.mjs.map +0 -1
- package/dist/chunk-CYDWEPFL.mjs +0 -1
- package/dist/chunk-HNOMBFLC.mjs.map +0 -1
- package/dist/chunk-OCXG5SMA.mjs.map +0 -1
- package/dist/chunk-OKNO3BFR.mjs.map +0 -1
- package/dist/chunk-WPNBONR3.mjs.map +0 -1
- package/dist/chunk-YJWLCDJE.mjs.map +0 -1
- /package/dist/{chunk-CYDWEPFL.mjs.map → chunk-GED6IT3S.mjs.map} +0 -0
package/dist/components/menu.mjs
CHANGED
|
@@ -9,17 +9,18 @@ import {
|
|
|
9
9
|
} from "../chunk-WUVNL3DI.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Flex
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-XWF2DDXB.mjs";
|
|
13
13
|
import "../chunk-S6KKPOPH.mjs";
|
|
14
14
|
import {
|
|
15
15
|
theme
|
|
16
16
|
} from "../chunk-N535ABFC.mjs";
|
|
17
17
|
import {
|
|
18
18
|
Box
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-LSB5JVS2.mjs";
|
|
20
20
|
import "../chunk-OI24WXH6.mjs";
|
|
21
21
|
import "../chunk-IFN22XIN.mjs";
|
|
22
|
-
import "../chunk-
|
|
22
|
+
import "../chunk-DQ4T4WV3.mjs";
|
|
23
|
+
import "../chunk-BALC5CGU.mjs";
|
|
23
24
|
import {
|
|
24
25
|
mergeClasses
|
|
25
26
|
} from "../chunk-7EGQM3ZL.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/menu.tsx"],"sourcesContent":["import { Box } from \"@/components/box\";\nimport { Flex } from \"@/components/flex\";\nimport {\n menu,\n menuItem,\n menuLabel,\n menuSeparator,\n} from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { theme } from \"@/theme/theme-contracts/theme-contract.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/menu.tsx"],"sourcesContent":["import { Box } from \"@/components/box\";\nimport { Flex } from \"@/components/flex\";\nimport {\n menu,\n menuItem,\n menuLabel,\n menuSeparator,\n} from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { theme } from \"@/theme/theme-contracts/theme-contract.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { CheckIcon } from \"@radix-ui/react-icons\";\nimport * as MenuPrimitive from \"@radix-ui/react-menu\";\n\nexport type MenuProps = MenuPrimitive.MenuProps & {\n className?: string;\n};\n\nexport const Menu = ({ ...props }: MenuProps) => {\n return (\n <MenuPrimitive.Root {...props}>\n <div className={mergeClasses(menu, props.className)}>\n {props.children}\n </div>\n </MenuPrimitive.Root>\n );\n};\n\nexport type MenuContentProps = MenuPrimitive.MenuContentProps;\n\nexport const MenuContent = ({ ...props }: MenuContentProps) => {\n return (\n <MenuPrimitive.Content\n {...props}\n className={mergeClasses(panel, props.className)}\n >\n {props.children}\n </MenuPrimitive.Content>\n );\n};\n\nexport type MenuSeparatorProps = MenuPrimitive.MenuSeparatorProps;\n\nexport const MenuSeparator = ({ ...props }: MenuSeparatorProps) => {\n return (\n <MenuPrimitive.Separator\n {...props}\n className={mergeClasses(menuSeparator, props.className)}\n >\n {props.children}\n </MenuPrimitive.Separator>\n );\n};\n\nexport type MenuItemProps = MenuPrimitive.MenuItemProps;\n\nexport const MenuItem = ({ ...props }: MenuItemProps) => {\n return (\n <MenuPrimitive.MenuItem\n {...props}\n className={mergeClasses(menuItem, props.className)}\n >\n {props.children}\n </MenuPrimitive.MenuItem>\n );\n};\n\nexport type MenuRadioItemProps = MenuPrimitive.MenuRadioItemProps;\n\nexport const MenuRadioItem = ({ ...props }: MenuRadioItemProps) => {\n return (\n <MenuPrimitive.RadioItem\n {...props}\n className={mergeClasses(menuItem, props.className)}\n >\n <Box asChild style={{ position: \"absolute\", left: theme.space[1] }}>\n <span>\n <MenuPrimitive.ItemIndicator>\n <Flex\n style={{\n width: theme.sizes[3],\n height: theme.sizes[3],\n alignItems: \"center\",\n justifyContent: \"center\",\n }}\n >\n <Box\n style={{\n width: theme.sizes[1],\n height: theme.sizes[1],\n backgroundColor: \"currentColor\",\n borderRadius: theme.radii.round,\n }}\n ></Box>\n </Flex>\n </MenuPrimitive.ItemIndicator>\n </span>\n </Box>\n {props.children}\n </MenuPrimitive.RadioItem>\n );\n};\n\nexport type MenuCheckboxItemProps = MenuPrimitive.MenuCheckboxItemProps;\n\nexport const MenuCheckboxItem = ({ ...props }: MenuCheckboxItemProps) => {\n return (\n <MenuPrimitive.MenuCheckboxItem\n {...props}\n className={mergeClasses(menuItem, props.className)}\n >\n <Box asChild style={{ position: \"absolute\", left: theme.space[1] }}>\n <span>\n <MenuPrimitive.ItemIndicator>\n <CheckIcon />\n </MenuPrimitive.ItemIndicator>\n </span>\n </Box>\n {props.children}\n </MenuPrimitive.MenuCheckboxItem>\n );\n};\n\nexport type MenuLabelProps = MenuPrimitive.MenuLabelProps;\n\nexport const MenuLabel = ({ ...props }: MenuLabelProps) => {\n return (\n <MenuPrimitive.MenuLabel\n {...props}\n className={mergeClasses(menuLabel, props.className)}\n >\n {props.children}\n </MenuPrimitive.MenuLabel>\n );\n};\n\nexport type MenuRadioGroupProps = MenuPrimitive.MenuRadioGroupProps;\n\nexport const MenuRadioGroup = MenuPrimitive.RadioGroup;\n\nexport type MenuGroupProps = MenuPrimitive.MenuGroupProps;\n\nexport const MenuGroup = MenuPrimitive.Group;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,iBAAiB;AAC1B,YAAY,mBAAmB;AASzB,cAkDF,YAlDE;AAHC,IAAM,OAAO,CAAC,EAAE,GAAG,MAAM,MAAiB;AAC/C,SACE,oBAAe,oBAAd,EAAoB,GAAG,OACtB,8BAAC,SAAI,WAAW,aAAa,MAAM,MAAM,SAAS,GAC/C,gBAAM,UACT,GACF;AAEJ;AAIO,IAAM,cAAc,CAAC,EAAE,GAAG,MAAM,MAAwB;AAC7D,SACE;AAAA,IAAe;AAAA,IAAd;AAAA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AE,GAAG,MAAM,MAA6B;AACvE,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,UAAU,MAAM,SAAS;AAAA,MAEjD;AAAA,4BAAC,OAAI,SAAO,MAAC,OAAO,EAAE,UAAU,YAAY,MAAM,MAAM,MAAM,CAAC,EAAE,GAC/D,8BAAC,UACC,8BAAe,6BAAd,EACC,8BAAC,aAAU,GACb,GACF,GACF;AAAA,QACC,MAAM;AAAA;AAAA;AAAA,EACT;AAEJ;AAIO,IAAMC,aAAY,CAAC,EAAE,GAAG,MAAM,MAAsB;AACzD,SACE;AAAA,IAAe;AAAA,IAAd;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,WAAW,MAAM,SAAS;AAAA,MAEjD,gBAAM;AAAA;AAAA,EACT;AAEJ;AAIO,IAAM,iBAA+B;AAIrC,IAAM,YAA0B;","names":["MenuItem","MenuCheckboxItem","MenuLabel"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/panel.tsx","../../src/theme/styles/panel.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { panel } from \"@/theme/styles/panel.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/panel.tsx","../../src/theme/styles/panel.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { panel } from \"@/theme/styles/panel.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\nexport type PanelProps = ComponentProps<typeof defaultElement>;\n\nexport const Panel = ({ asChild, ...props }: PanelProps) => {\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...props} className={mergeClasses(panel, props.className)}>\n {props.children}\n </Comp>\n );\n};\n","import 'src/theme/styles/panel.css.ts.vanilla.css?source=LnBhbmVsX3BhbmVsX19naDlzdXowIHsKICBjb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZVRleHRDb250cmFzdF9fMTluYmU4ZDJmOSk7CiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZV9fMTluYmU4ZDJmOCk7CiAgYm9yZGVyLXJhZGl1czogdmFyKC0tcmFkaWktM19fMTluYmU4ZDJnaik7CiAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXNlbWFudGljQ29sb3JzLWxpbmVfXzE5bmJlOGQyZmUpOwp9';\nexport var panel = 'panel_panel__gh9suz0';","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAI,QAAQ;;;ACDZ,SAAS,gBAAgB,SAAyC;AACvE,SAAO,QAAQ,OAAO,CAAC,QAAuB,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG;AACtE;;;AFCA,wBAAqB;AAUjB;AARJ,IAAM,iBAAiB;AAIhB,IAAM,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,MAAkB;AAC1D,QAAM,OAAO,UAAU,yBAAO;AAE9B,SACE,4CAAC,QAAM,GAAG,OAAO,WAAW,aAAa,OAAO,MAAM,SAAS,GAC5D,gBAAM,UACT;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/panel.tsx"],"sourcesContent":["import { panel } from \"@/theme/styles/panel.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/panel.tsx"],"sourcesContent":["import { panel } from \"@/theme/styles/panel.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\nexport type PanelProps = ComponentProps<typeof defaultElement>;\n\nexport const Panel = ({ asChild, ...props }: PanelProps) => {\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...props} className={mergeClasses(panel, props.className)}>\n {props.children}\n </Comp>\n );\n};\n"],"mappings":";;;;;;;;;AAGA,SAAS,YAAY;AAUjB;AARJ,IAAM,iBAAiB;AAIhB,IAAM,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,MAAkB;AAC1D,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE,oBAAC,QAAM,GAAG,OAAO,WAAW,aAAa,OAAO,MAAM,SAAS,GAC5D,gBAAM,UACT;AAEJ;","names":[]}
|
|
@@ -10,4 +10,4 @@ type ParagraphProps = ComponentProps<typeof defaultElement, Omit<TextVariants, "
|
|
|
10
10
|
};
|
|
11
11
|
declare const Paragraph: ({ asChild, color, size, weight, ...props }: ParagraphProps) => react_jsx_runtime.JSX.Element;
|
|
12
12
|
|
|
13
|
-
export { Paragraph };
|
|
13
|
+
export { Paragraph, type ParagraphProps };
|
|
@@ -10,4 +10,4 @@ type ParagraphProps = ComponentProps<typeof defaultElement, Omit<TextVariants, "
|
|
|
10
10
|
};
|
|
11
11
|
declare const Paragraph: ({ asChild, color, size, weight, ...props }: ParagraphProps) => react_jsx_runtime.JSX.Element;
|
|
12
12
|
|
|
13
|
-
export { Paragraph };
|
|
13
|
+
export { Paragraph, type ParagraphProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/paragraph.tsx","../../src/theme/recipes/text.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { TextVariants, textRecipe } from \"@/theme/recipes/text.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"p\";\n\ntype ParagraphSizeVariants = \"1\" | \"2\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/paragraph.tsx","../../src/theme/recipes/text.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { TextVariants, textRecipe } from \"@/theme/recipes/text.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"p\";\n\ntype ParagraphSizeVariants = \"1\" | \"2\";\n\nexport type ParagraphProps = ComponentProps<\n typeof defaultElement,\n Omit<TextVariants, \"size\">\n> & {\n size?: ParagraphSizeVariants;\n};\n\nconst textSize: Record<ParagraphSizeVariants, TextVariants[\"size\"]> = {\n 1: \"3\",\n 2: \"4\",\n};\n\nexport const Paragraph = ({\n asChild,\n color,\n size = \"1\",\n weight,\n ...props\n}: ParagraphProps) => {\n const text = textRecipe({ color, size: textSize[size], weight });\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...props} className={mergeClasses(text, props.className)}>\n {props.children}\n </Comp>\n );\n};\n","import 'src/theme/recipes/text.css.ts.vanilla.css?source=#H4sIAAAAAAAAA5XUzXKCMBAH8DtPkWM9xBHED/TYN6iHHpkQFsw0BJugFTt9905QFqajib2AJNnff5Zgpg2cm9Re3oCLA6Rp2K5MfDrPyHdAiBQK6B5EuW82JNwGhFRMl0JtyMw+FLVq6Ndt+sT0C6V26L0bMVRDeZRMp2mYqAzWeVSoCZadmBZMNVQdK9CCb0jDMrvaDhi7KhfmIFm7IZms+QfWFawSsh3HGdo1MaSIyTb4CaZ/W+O1rHV60KJiusVGw67Rbq5HDVRMNYK/2kFDbxX9PRmS+KcryQCvVT7OirxZWDP8GuXl4MoDrWuNWXNvVrf+eh1lQOTs6Zg1cvhKYm+IFXZ9Ub9B/H6EERdIQ8QXHd5tup0Zb/lOXMDQEMnEAUYILn1ghCBzgHMEVz5wjmDmAGME1z4wRtD1DhcIJj5wgWDuAJcIMh+4RPDBx9qBKwQzH7hCsHCAawS5D1wjWDrABMHcBw7/nv198HpEpsN5eIVhgP97iD4OqSAXxwozimcysKaPqJ0RWS1zDCifCbhV9PzB8r9d18CZewYAAA==';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var textRecipe = _7a468({defaultClassName:'text_textRecipe__1y7s4vx0',variantClassNames:{color:{primary:'text_textRecipe_color_primary__1y7s4vx1',secondary:'text_textRecipe_color_secondary__1y7s4vx2',error:'text_textRecipe_color_error__1y7s4vx3',subtle:'text_textRecipe_color_subtle__1y7s4vx4'},size:{'1':'text_textRecipe_size_1__1y7s4vx5','2':'text_textRecipe_size_2__1y7s4vx6','3':'text_textRecipe_size_3__1y7s4vx7','4':'text_textRecipe_size_4__1y7s4vx8','5':'text_textRecipe_size_5__1y7s4vx9','6':'text_textRecipe_size_6__1y7s4vxa','7':'text_textRecipe_size_7__1y7s4vxb','8':'text_textRecipe_size_8__1y7s4vxc','9':'text_textRecipe_size_9__1y7s4vxd'},weight:{regular:'text_textRecipe_weight_regular__1y7s4vxe',medium:'text_textRecipe_weight_medium__1y7s4vxf',bold:'text_textRecipe_weight_bold__1y7s4vxg'}},defaultVariants:{size:'3'},compoundVariants:[]});","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,6BAA0C;AACnC,IAAI,iBAAa,uBAAAA,iBAAO,EAAC,kBAAiB,6BAA4B,mBAAkB,EAAC,OAAM,EAAC,SAAQ,2CAA0C,WAAU,6CAA4C,OAAM,yCAAwC,QAAO,yCAAwC,GAAE,MAAK,EAAC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,oCAAmC,KAAI,mCAAkC,GAAE,QAAO,EAAC,SAAQ,4CAA2C,QAAO,2CAA0C,MAAK,wCAAuC,EAAC,GAAE,iBAAgB,EAAC,MAAK,IAAG,GAAE,kBAAiB,CAAC,EAAC,CAAC;;;ACFv1B,SAAS,gBAAgB,SAAyC;AACvE,SAAO,QAAQ,OAAO,CAAC,QAAuB,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG;AACtE;;;AFCA,wBAAqB;AA6BjB;AA3BJ,IAAM,iBAAiB;AAWvB,IAAM,WAAgE;AAAA,EACpE,GAAG;AAAA,EACH,GAAG;AACL;AAEO,IAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAsB;AACpB,QAAM,OAAO,WAAW,EAAE,OAAO,MAAM,SAAS,IAAI,GAAG,OAAO,CAAC;AAC/D,QAAM,OAAO,UAAU,yBAAO;AAE9B,SACE,4CAAC,QAAM,GAAG,OAAO,WAAW,aAAa,MAAM,MAAM,SAAS,GAC3D,gBAAM,UACT;AAEJ;","names":["_7a468"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/paragraph.tsx"],"sourcesContent":["import { TextVariants, textRecipe } from \"@/theme/recipes/text.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"p\";\n\ntype ParagraphSizeVariants = \"1\" | \"2\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/paragraph.tsx"],"sourcesContent":["import { TextVariants, textRecipe } from \"@/theme/recipes/text.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"p\";\n\ntype ParagraphSizeVariants = \"1\" | \"2\";\n\nexport type ParagraphProps = ComponentProps<\n typeof defaultElement,\n Omit<TextVariants, \"size\">\n> & {\n size?: ParagraphSizeVariants;\n};\n\nconst textSize: Record<ParagraphSizeVariants, TextVariants[\"size\"]> = {\n 1: \"3\",\n 2: \"4\",\n};\n\nexport const Paragraph = ({\n asChild,\n color,\n size = \"1\",\n weight,\n ...props\n}: ParagraphProps) => {\n const text = textRecipe({ color, size: textSize[size], weight });\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...props} className={mergeClasses(text, props.className)}>\n {props.children}\n </Comp>\n );\n};\n"],"mappings":";;;;;;;;AAGA,SAAS,YAAY;AA6BjB;AA3BJ,IAAM,iBAAiB;AAWvB,IAAM,WAAgE;AAAA,EACpE,GAAG;AAAA,EACH,GAAG;AACL;AAEO,IAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,MAAsB;AACpB,QAAM,OAAO,WAAW,EAAE,OAAO,MAAM,SAAS,IAAI,GAAG,OAAO,CAAC;AAC/D,QAAM,OAAO,UAAU,OAAO;AAE9B,SACE,oBAAC,QAAM,GAAG,OAAO,WAAW,aAAa,MAAM,MAAM,SAAS,GAC3D,gBAAM,UACT;AAEJ;","names":[]}
|
|
@@ -2,10 +2,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
import react__default from 'react';
|
|
4
4
|
|
|
5
|
+
type PopoverProps = PopoverPrimitive.PopoverProps;
|
|
5
6
|
declare const Popover: react__default.FC<PopoverPrimitive.PopoverProps>;
|
|
7
|
+
type PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;
|
|
6
8
|
declare const PopoverTrigger: react__default.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & react__default.RefAttributes<HTMLButtonElement>>;
|
|
7
9
|
type PopoverContentPrimitiveProps = react__default.ComponentProps<typeof PopoverPrimitive.Content>;
|
|
8
10
|
declare const PopoverContent: ({ children, ...props }: PopoverContentPrimitiveProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
type PopoverCloseProps = PopoverPrimitive.PopoverCloseProps;
|
|
9
12
|
declare const PopoverClose: react__default.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & react__default.RefAttributes<HTMLButtonElement>>;
|
|
10
13
|
|
|
11
|
-
export { Popover, PopoverClose, PopoverContent, PopoverTrigger };
|
|
14
|
+
export { Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentPrimitiveProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
|
|
@@ -2,10 +2,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
3
|
import react__default from 'react';
|
|
4
4
|
|
|
5
|
+
type PopoverProps = PopoverPrimitive.PopoverProps;
|
|
5
6
|
declare const Popover: react__default.FC<PopoverPrimitive.PopoverProps>;
|
|
7
|
+
type PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;
|
|
6
8
|
declare const PopoverTrigger: react__default.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & react__default.RefAttributes<HTMLButtonElement>>;
|
|
7
9
|
type PopoverContentPrimitiveProps = react__default.ComponentProps<typeof PopoverPrimitive.Content>;
|
|
8
10
|
declare const PopoverContent: ({ children, ...props }: PopoverContentPrimitiveProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
type PopoverCloseProps = PopoverPrimitive.PopoverCloseProps;
|
|
9
12
|
declare const PopoverClose: react__default.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & react__default.RefAttributes<HTMLButtonElement>>;
|
|
10
13
|
|
|
11
|
-
export { Popover, PopoverClose, PopoverContent, PopoverTrigger };
|
|
14
|
+
export { Popover, PopoverClose, type PopoverCloseProps, PopoverContent, type PopoverContentPrimitiveProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/popover.tsx","../../src/theme/styles/menu.css.ts","../../src/theme/styles/panel.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { menu } from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\n\nexport const Popover = PopoverPrimitive.Root;\n\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/popover.tsx","../../src/theme/styles/menu.css.ts","../../src/theme/styles/panel.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { menu } from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\n\nexport type PopoverProps = PopoverPrimitive.PopoverProps;\n\nexport const Popover = PopoverPrimitive.Root;\n\nexport type PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;\n\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\n\nexport type PopoverContentPrimitiveProps = React.ComponentProps<\n typeof PopoverPrimitive.Content\n>;\n\nexport const PopoverContent = ({\n children,\n ...props\n}: PopoverContentPrimitiveProps) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n sideOffset={0}\n {...props}\n className={mergeClasses(menu, panel, props.className)}\n >\n {children}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n);\n\nexport type PopoverCloseProps = PopoverPrimitive.PopoverCloseProps;\n\nexport const PopoverClose = PopoverPrimitive.Close;\n","import 'src/theme/styles/menu.css.ts.vanilla.css?source=#H4sIAAAAAAAAA5VUwW7bMAy95yt0XA4qmqwbWvc07LIC26nHYQhoibbZyZQh0YmTYf8+SKkTpy287WLAD0/U4+OjrlrkflNCxG/I/YNgu9kMw0eu99fq10IpS7FzsC9U5XC4XygFjmrWJNjGQhlkwZDgpz4KVXttPAuyFCp2YFCXKDtETozKs+hIByzUFsI7rRPwSAeMerXZrO64xFt7tzxRtxAIWDT3LQYyhRIoewchATGxHDHqBqlupFCrhJg+RB8KZbGC3kmC+ohBR3RopFDsGRO4a0hQZ4UJ3AXoEjzWOsqLWdqHk7R1bbK4DqwlrrXD6szNzZ65NxfMcFH2TWrpg8WgA1jq40hNfzQxZ103y/vF78VVnln7Yl6rPK/ORxLyXKiADoS2ueESzM86+J6tNt4liyQAxw4CssyULBq/xZALvy7x3A+2wELmcwKjntT9ks6exVfVnPjvFgR0Q3Xjkltof+RbfS9pzOfR/b+MTya5MNFR/12HpQilG0VcXGSOF0QHKULpe3uqvdp3yzmRr8+uJ2efltMMsxcNzvkd2pwlT2nVNG6RJY5+TNv4CiW6sY/1TBhmfcNBHvtS3NQw88Kw8ZL3x2D4Ie0KcV2MMS59fipaYr0jK02hVuvrbpjsxOU2nCN+nT04aGKLw0g6PLAlg1G3MEyW4fBC1iN2EEB8GPXdZH2nF+IooIVQE2vx3byGZ17pRXw7T/3HTKYgT1zFJP8PkvE4QH8FAAA=';\nexport var menu = 'menu_menu__xx6ngy3';\nexport var menuItem = 'menu_menuItem__xx6ngy1 menu_baseMenuItem__xx6ngy0';\nexport var menuLabel = 'menu_menuLabel__xx6ngy2 menu_baseMenuItem__xx6ngy0';\nexport var menuSeparator = 'menu_menuSeparator__xx6ngy4';","import 'src/theme/styles/panel.css.ts.vanilla.css?source=LnBhbmVsX3BhbmVsX19naDlzdXowIHsKICBjb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZVRleHRDb250cmFzdF9fMTluYmU4ZDJmOSk7CiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZV9fMTluYmU4ZDJmOCk7CiAgYm9yZGVyLXJhZGl1czogdmFyKC0tcmFkaWktM19fMTluYmU4ZDJnaik7CiAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXNlbWFudGljQ29sb3JzLWxpbmVfXzE5bmJlOGQyZmUpOwp9';\nexport var panel = 'panel_panel__gh9suz0';","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAI,OAAO;;;ACAX,IAAI,QAAQ;;;ACDZ,SAAS,gBAAgB,SAAyC;AACvE,SAAO,QAAQ,OAAO,CAAC,QAAuB,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG;AACtE;;;AHCA,uBAAkC;AAoB9B;AAfG,IAAM,UAA2B;AAIjC,IAAM,iBAAkC;AAMxC,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,4CAAkB,yBAAjB,EACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC,YAAY;AAAA,IACX,GAAG;AAAA,IACJ,WAAW,aAAa,MAAM,OAAO,MAAM,SAAS;AAAA,IAEnD;AAAA;AACH,GACF;AAKK,IAAM,eAAgC;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-GED6IT3S.mjs";
|
|
2
2
|
import {
|
|
3
3
|
menu
|
|
4
4
|
} from "../chunk-5WJ4KGIE.mjs";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
panel
|
|
7
7
|
} from "../chunk-WUVNL3DI.mjs";
|
|
8
8
|
import "../chunk-IFN22XIN.mjs";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-BALC5CGU.mjs";
|
|
10
10
|
import {
|
|
11
11
|
mergeClasses
|
|
12
12
|
} from "../chunk-7EGQM3ZL.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/popover.tsx"],"sourcesContent":["import { menu } from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\n\nexport const Popover = PopoverPrimitive.Root;\n\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/popover.tsx"],"sourcesContent":["import { menu } from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils\";\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport React from \"react\";\n\nexport type PopoverProps = PopoverPrimitive.PopoverProps;\n\nexport const Popover = PopoverPrimitive.Root;\n\nexport type PopoverTriggerProps = PopoverPrimitive.PopoverTriggerProps;\n\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\n\nexport type PopoverContentPrimitiveProps = React.ComponentProps<\n typeof PopoverPrimitive.Content\n>;\n\nexport const PopoverContent = ({\n children,\n ...props\n}: PopoverContentPrimitiveProps) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n sideOffset={0}\n {...props}\n className={mergeClasses(menu, panel, props.className)}\n >\n {children}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n);\n\nexport type PopoverCloseProps = PopoverPrimitive.PopoverCloseProps;\n\nexport const PopoverClose = PopoverPrimitive.Close;\n"],"mappings":";;;;;;;;;;;;;;AAGA,YAAY,sBAAsB;AAoB9B;AAfG,IAAM,UAA2B;AAIjC,IAAM,iBAAkC;AAMxC,IAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,GAAG;AACL,MACE,oBAAkB,yBAAjB,EACC;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC,YAAY;AAAA,IACX,GAAG;AAAA,IACJ,WAAW,aAAa,MAAM,OAAO,MAAM,SAAS;AAAA,IAEnD;AAAA;AACH,GACF;AAKK,IAAM,eAAgC;","names":[]}
|
|
@@ -4,6 +4,7 @@ import { B as ButtonVariants } from '../button.css-CxDH431y.mjs';
|
|
|
4
4
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
5
|
import 'homemade-recipes';
|
|
6
6
|
|
|
7
|
+
type SelectProps = SelectPrimitive.SelectProps;
|
|
7
8
|
declare const Select: react.FC<SelectPrimitive.SelectProps>;
|
|
8
9
|
type SelectTriggerProps = SelectPrimitive.SelectTriggerProps & ButtonVariants & {
|
|
9
10
|
placeholder?: React.ReactNode;
|
|
@@ -13,10 +14,11 @@ type SelectContentProps = SelectPrimitive.SelectContentProps;
|
|
|
13
14
|
declare const SelectContent: ({ children, ...props }: SelectContentProps) => react_jsx_runtime.JSX.Element;
|
|
14
15
|
type SelectItemProps = SelectPrimitive.SelectItemProps;
|
|
15
16
|
declare const SelectItem: ({ ...props }: SelectItemProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
type SelectGroupProps = SelectPrimitive.SelectGroupProps;
|
|
16
18
|
declare const SelectGroup: react.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
17
19
|
type SelectLabelProps = SelectPrimitive.SelectLabelProps;
|
|
18
20
|
declare const SelectLabel: ({ ...props }: SelectLabelProps) => react_jsx_runtime.JSX.Element;
|
|
19
21
|
type SelectSeparatorProps = SelectPrimitive.SelectSeparatorProps;
|
|
20
22
|
declare const SelectSeparator: ({ ...props }: SelectSeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
21
23
|
|
|
22
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger };
|
|
24
|
+
export { Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps };
|
|
@@ -4,6 +4,7 @@ import { B as ButtonVariants } from '../button.css-CxDH431y.js';
|
|
|
4
4
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
5
|
import 'homemade-recipes';
|
|
6
6
|
|
|
7
|
+
type SelectProps = SelectPrimitive.SelectProps;
|
|
7
8
|
declare const Select: react.FC<SelectPrimitive.SelectProps>;
|
|
8
9
|
type SelectTriggerProps = SelectPrimitive.SelectTriggerProps & ButtonVariants & {
|
|
9
10
|
placeholder?: React.ReactNode;
|
|
@@ -13,10 +14,11 @@ type SelectContentProps = SelectPrimitive.SelectContentProps;
|
|
|
13
14
|
declare const SelectContent: ({ children, ...props }: SelectContentProps) => react_jsx_runtime.JSX.Element;
|
|
14
15
|
type SelectItemProps = SelectPrimitive.SelectItemProps;
|
|
15
16
|
declare const SelectItem: ({ ...props }: SelectItemProps) => react_jsx_runtime.JSX.Element;
|
|
17
|
+
type SelectGroupProps = SelectPrimitive.SelectGroupProps;
|
|
16
18
|
declare const SelectGroup: react.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>>;
|
|
17
19
|
type SelectLabelProps = SelectPrimitive.SelectLabelProps;
|
|
18
20
|
declare const SelectLabel: ({ ...props }: SelectLabelProps) => react_jsx_runtime.JSX.Element;
|
|
19
21
|
type SelectSeparatorProps = SelectPrimitive.SelectSeparatorProps;
|
|
20
22
|
declare const SelectSeparator: ({ ...props }: SelectSeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
21
23
|
|
|
22
|
-
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger };
|
|
24
|
+
export { Select, SelectContent, type SelectContentProps, SelectGroup, type SelectGroupProps, SelectItem, type SelectItemProps, SelectLabel, type SelectLabelProps, type SelectProps, SelectSeparator, type SelectSeparatorProps, SelectTrigger, type SelectTriggerProps };
|
|
@@ -62,6 +62,15 @@ var SelectPrimitive = __toESM(require("@radix-ui/react-select"));
|
|
|
62
62
|
var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
63
63
|
var spinnerRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "spinner_spinnerRecipe__15xzcy90", variantClassNames: { size: { "1": "spinner_spinnerRecipe_size_1__15xzcy91", "2": "spinner_spinnerRecipe_size_2__15xzcy92", "3": "spinner_spinnerRecipe_size_3__15xzcy93", "4": "spinner_spinnerRecipe_size_4__15xzcy94", "5": "spinner_spinnerRecipe_size_5__15xzcy95", "6": "spinner_spinnerRecipe_size_6__15xzcy96", "7": "spinner_spinnerRecipe_size_7__15xzcy97", "8": "spinner_spinnerRecipe_size_8__15xzcy98", "9": "spinner_spinnerRecipe_size_9__15xzcy99" } }, defaultVariants: { size: "3" }, compoundVariants: [] });
|
|
64
64
|
|
|
65
|
+
// src/utils/omit.ts
|
|
66
|
+
function omit(obj, ...keys) {
|
|
67
|
+
const ret = { ...obj };
|
|
68
|
+
keys.forEach((key) => {
|
|
69
|
+
delete ret[key];
|
|
70
|
+
});
|
|
71
|
+
return ret;
|
|
72
|
+
}
|
|
73
|
+
|
|
65
74
|
// src/utils/pick.ts
|
|
66
75
|
function pick(obj, ...keys) {
|
|
67
76
|
const ret = {};
|
|
@@ -71,15 +80,25 @@ function pick(obj, ...keys) {
|
|
|
71
80
|
return ret;
|
|
72
81
|
}
|
|
73
82
|
|
|
83
|
+
// src/utils/get-variants.ts
|
|
84
|
+
function extractVariantsFromProps(obj, ...keys) {
|
|
85
|
+
const variants = pick(obj, ...keys);
|
|
86
|
+
const rest = omit(obj, ...keys);
|
|
87
|
+
return [variants, rest];
|
|
88
|
+
}
|
|
89
|
+
|
|
74
90
|
// src/components/spinner.tsx
|
|
75
91
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
76
92
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
77
93
|
var defaultElement = "div";
|
|
78
94
|
var Spinner = ({ asChild, ...props }) => {
|
|
79
|
-
const variants =
|
|
95
|
+
const [variants, rest] = extractVariantsFromProps(
|
|
96
|
+
props,
|
|
97
|
+
...spinnerRecipe.variants()
|
|
98
|
+
);
|
|
80
99
|
const spinner = spinnerRecipe(variants);
|
|
81
100
|
const Comp = asChild ? import_react_slot.Slot : defaultElement;
|
|
82
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...
|
|
101
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...rest, className: mergeClasses(spinner, rest.className), children: rest.children });
|
|
83
102
|
};
|
|
84
103
|
|
|
85
104
|
// src/theme/recipes/button.css.ts
|
|
@@ -95,17 +114,20 @@ var import_react_slot2 = require("@radix-ui/react-slot");
|
|
|
95
114
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
96
115
|
var defaultElement2 = "button";
|
|
97
116
|
var Button = ({ asChild, ...props }) => {
|
|
98
|
-
const variants =
|
|
117
|
+
const [variants, rest] = extractVariantsFromProps(
|
|
118
|
+
props,
|
|
119
|
+
...buttonRecipe.variants()
|
|
120
|
+
);
|
|
99
121
|
const button = buttonRecipe(variants);
|
|
100
122
|
const Comp = asChild ? import_react_slot2.Slot : defaultElement2;
|
|
101
123
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
102
124
|
Comp,
|
|
103
125
|
{
|
|
104
|
-
...
|
|
105
|
-
className: mergeClasses(button,
|
|
106
|
-
disabled:
|
|
126
|
+
...rest,
|
|
127
|
+
className: mergeClasses(button, rest.className),
|
|
128
|
+
disabled: rest.disabled || Boolean(variants.loading),
|
|
107
129
|
children: [
|
|
108
|
-
|
|
130
|
+
rest.children,
|
|
109
131
|
variants.loading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spinner, { style: { position: "absolute" } })
|
|
110
132
|
]
|
|
111
133
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/select.tsx","../../src/theme/styles/menu.css.ts","../../src/theme/styles/panel.css.ts","../../src/utils/merge-classes.ts","../../src/theme/recipes/spinner.css.ts","../../src/utils/pick.ts","../../src/components/spinner.tsx","../../src/theme/recipes/button.css.ts","../../src/components/button.tsx"],"sourcesContent":["import { ButtonVariants } from \"@/theme/recipes/button.css\";\nimport {\n menu,\n menuItem,\n menuLabel,\n menuSeparator,\n} from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Button } from \"./button\";\n\nexport const Select = SelectPrimitive.Root;\n\ntype SelectTriggerProps = SelectPrimitive.SelectTriggerProps &\n ButtonVariants & {\n placeholder?: React.ReactNode;\n };\n\nexport const SelectTrigger = ({\n placeholder,\n variant = \"outline\",\n ...props\n}: SelectTriggerProps) => {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n <Button variant={variant}>\n <SelectPrimitive.Value placeholder={placeholder} />\n\n <SelectPrimitive.Icon style={{ marginLeft: 5 }}>\n <ChevronDownIcon />\n </SelectPrimitive.Icon>\n </Button>\n </SelectPrimitive.Trigger>\n );\n};\n\ntype SelectContentProps = SelectPrimitive.SelectContentProps;\n\nexport const SelectContent = ({ children, ...props }: SelectContentProps) => {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n {...props}\n className={mergeClasses(menu, panel, props.className)}\n >\n <SelectPrimitive.Viewport>{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n};\n\ntype SelectItemProps = SelectPrimitive.SelectItemProps;\n\nexport const SelectItem = ({ ...props }: SelectItemProps) => {\n return (\n <SelectPrimitive.Item\n {...props}\n className={mergeClasses(menuItem, props.className)}\n >\n <SelectPrimitive.ItemText>{props.children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n};\n\nexport const SelectGroup = SelectPrimitive.Group;\n\ntype SelectLabelProps = SelectPrimitive.SelectLabelProps;\n\nexport const SelectLabel = ({ ...props }: SelectLabelProps) => {\n return (\n <SelectPrimitive.Label\n {...props}\n className={mergeClasses(menuLabel, props.className)}\n >\n {props.children}\n </SelectPrimitive.Label>\n );\n};\n\ntype SelectSeparatorProps = SelectPrimitive.SelectSeparatorProps;\n\nexport const SelectSeparator = ({ ...props }: SelectSeparatorProps) => {\n return (\n <SelectPrimitive.Separator\n {...props}\n className={mergeClasses(menuSeparator, props.className)}\n >\n {props.children}\n </SelectPrimitive.Separator>\n );\n};\n","import 'src/theme/styles/menu.css.ts.vanilla.css?source=#H4sIAAAAAAAAA5VUwW7bMAy95yt0XA4qmqwbWvc07LIC26nHYQhoibbZyZQh0YmTYf8+SKkTpy287WLAD0/U4+OjrlrkflNCxG/I/YNgu9kMw0eu99fq10IpS7FzsC9U5XC4XygFjmrWJNjGQhlkwZDgpz4KVXttPAuyFCp2YFCXKDtETozKs+hIByzUFsI7rRPwSAeMerXZrO64xFt7tzxRtxAIWDT3LQYyhRIoewchATGxHDHqBqlupFCrhJg+RB8KZbGC3kmC+ohBR3RopFDsGRO4a0hQZ4UJ3AXoEjzWOsqLWdqHk7R1bbK4DqwlrrXD6szNzZ65NxfMcFH2TWrpg8WgA1jq40hNfzQxZ103y/vF78VVnln7Yl6rPK/ORxLyXKiADoS2ueESzM86+J6tNt4liyQAxw4CssyULBq/xZALvy7x3A+2wELmcwKjntT9ks6exVfVnPjvFgR0Q3Xjkltof+RbfS9pzOfR/b+MTya5MNFR/12HpQilG0VcXGSOF0QHKULpe3uqvdp3yzmRr8+uJ2efltMMsxcNzvkd2pwlT2nVNG6RJY5+TNv4CiW6sY/1TBhmfcNBHvtS3NQw88Kw8ZL3x2D4Ie0KcV2MMS59fipaYr0jK02hVuvrbpjsxOU2nCN+nT04aGKLw0g6PLAlg1G3MEyW4fBC1iN2EEB8GPXdZH2nF+IooIVQE2vx3byGZ17pRXw7T/3HTKYgT1zFJP8PkvE4QH8FAAA=';\nexport var menu = 'menu_menu__xx6ngy3';\nexport var menuItem = 'menu_menuItem__xx6ngy1 menu_baseMenuItem__xx6ngy0';\nexport var menuLabel = 'menu_menuLabel__xx6ngy2 menu_baseMenuItem__xx6ngy0';\nexport var menuSeparator = 'menu_menuSeparator__xx6ngy4';","import 'src/theme/styles/panel.css.ts.vanilla.css?source=LnBhbmVsX3BhbmVsX19naDlzdXowIHsKICBjb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZVRleHRDb250cmFzdF9fMTluYmU4ZDJmOSk7CiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZV9fMTluYmU4ZDJmOCk7CiAgYm9yZGVyLXJhZGl1czogdmFyKC0tcmFkaWktM19fMTluYmU4ZDJnaik7CiAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXNlbWFudGljQ29sb3JzLWxpbmVfXzE5bmJlOGQyZmUpOwp9';\nexport var panel = 'panel_panel__gh9suz0';","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n","import 'src/theme/animations/spin.css.ts.vanilla.css?source=QGtleWZyYW1lcyBzcGluX3NwaW5fXzkxZzI5NTAgewogIHRvIHsKICAgIHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7CiAgfQp9';\nimport 'src/theme/recipes/spinner.css.ts.vanilla.css?source=#H4sIAAAAAAAAA33P327CIBTH8fs+BZfbRY30jxa93BvsBQgtWE9SoQHc1MV3X+ocI2SHGxuT7/l9wsrNoLWy/Pl9VwPMinPaXm7Dla3JV0GI0HASHozekSV7tJwzOlasXZNV58gEWglLQB9Ag1f7gpDeWKnsjtD5QpyZQJIPYV/KcjCTsa50k/Dq57fhnDLdq07S6/T6d1taIeHsds/D5R+U1py1DAfVqOMDb+YYHM7WKu3fFnFf3IvV/491cFOchjfTx5uPCsaj/7WXxJU0cruH+wnSH/NRnq0CW6FsFS0yjE2jPFsHtkbZOloUGJtGebYJbIOyTbTYY2wa5dk2sC3KttHigLFplGc3gd2g7CZalBibRnl2G9gtym6jRYWxaZRnu8B2KNtFiweMTaM8ywLLUJZFiyPGptH9G0PpMC4bBQAA';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var spinnerRecipe = _7a468({defaultClassName:'spinner_spinnerRecipe__15xzcy90',variantClassNames:{size:{'1':'spinner_spinnerRecipe_size_1__15xzcy91','2':'spinner_spinnerRecipe_size_2__15xzcy92','3':'spinner_spinnerRecipe_size_3__15xzcy93','4':'spinner_spinnerRecipe_size_4__15xzcy94','5':'spinner_spinnerRecipe_size_5__15xzcy95','6':'spinner_spinnerRecipe_size_6__15xzcy96','7':'spinner_spinnerRecipe_size_7__15xzcy97','8':'spinner_spinnerRecipe_size_8__15xzcy98','9':'spinner_spinnerRecipe_size_9__15xzcy99'}},defaultVariants:{size:'3'},compoundVariants:[]});","/**\n * https://stackoverflow.com/a/47232883\n */\nexport function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const ret: any = {};\n keys.forEach((key) => {\n ret[key] = obj[key];\n });\n\n return ret;\n}\n","import { SpinnerVariants, spinnerRecipe } from \"@/theme/recipes/spinner.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { pick } from \"@/utils/pick\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\ntype SpinnerProps = ComponentProps<typeof defaultElement, SpinnerVariants>;\n\nexport const Spinner = ({ asChild, ...props }: SpinnerProps) => {\n const variants = pick(props, ...spinnerRecipe.variants());\n const spinner = spinnerRecipe(variants);\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...props} className={mergeClasses(spinner, props.className)}>\n {props.children}\n </Comp>\n );\n};\n","import 'src/theme/recipes/button.css.ts.vanilla.css?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I9L+DeoUF/ESw0e0YcXcD8BbDQ7LnwNj6RKkJAyhYv8hpEdW57tRSA+RN1kNxTYfxEHba6YGb3MS0tYPxEPYNcMK37mJYi0D9RTame8SBzb4Da4FjvTNzU+1c7XhxIIgBYgFkc3BSUocbwPD48lYdbU/jcJsmih187xoFXCoJ3K7f1S4NMaDJnTFO/lnn9lUXnnZKmipd7cvVPPg7Ky0N5uSgPHzVO1slOpfNknRsGV0vlY6q8bJWXsfK2VuOUnRxWdj3Kzl2Wj8/yclpeXsvDbfXJOk3AYmgraMvalWzXx4yXc9fWaXEtB+aObR0b17JiF8HPPMaLH66TJ/u4K/Pof4l0DvbMp4MlAjr4tIstDPzK60XkgWG7jmVzbmuJMjOOxB17iSZz5uQies8W5a5yOBX7TBIHyJ9KYc/YFH6gk0ZvudVz7HWJQhOezxV1iToT5u/yvOu7HOY55uZc4Md8oHPXi06JaUPojr3ofJh2hn3w2h0ObBaff4EdsYi68Pv/bTN6ukAeAAA=';\nimport { createRuntimeFn as _dc746 } from 'homemade-recipes/createRuntimeFn';\nexport var buttonRecipe = _dc746((function(){var x={defaultClassName:'button__hi3ya00',variantClassNames:{fullWidth:{true:'button_fullWidth_true__hi3ya01'},loading:{true:'button_loading_true__hi3ya02'},size:{'1':'button_size_1__hi3ya03','2':'button_size_2__hi3ya04','3':'button_size_3__hi3ya05'},variant:{primary:'button_variant_primary__hi3ya06',secondary:'button_variant_secondary__hi3ya07',outline:'button_variant_outline__hi3ya08',ghost:'button_variant_ghost__hi3ya09',error:'button_variant_error__hi3ya0a',success:'button_variant_success__hi3ya0b'},round:{true:'button_round_true__hi3ya0c'}},defaultVariants:{size:'2',variant:'primary'},compoundVariants:[],responsiveVariantClassNames:{initial:undefined,sm:{fullWidth:{true:'button_fullWidth_sm_true__hi3ya0d'},loading:{true:'button_loading_sm_true__hi3ya0e'},size:{'1':'button_size_sm_1__hi3ya0f','2':'button_size_sm_2__hi3ya0g','3':'button_size_sm_3__hi3ya0h'},variant:{primary:'button_variant_sm_primary__hi3ya0i',secondary:'button_variant_sm_secondary__hi3ya0j',outline:'button_variant_sm_outline__hi3ya0k',ghost:'button_variant_sm_ghost__hi3ya0l',error:'button_variant_sm_error__hi3ya0m',success:'button_variant_sm_success__hi3ya0n'},round:{true:'button_round_sm_true__hi3ya0o'}}},conditionNames:['sm'],conditions:{xs:'520px',sm:'768px',md:'1024px',lg:'1280px',xl:'1640px'},identifier:'homemade-recipe__lb053z0',cssCache:[]};x.responsiveVariantClassNames.initial=x.variantClassNames;return x;}()));","import { Spinner } from \"@/components/spinner\";\nimport { ButtonVariants, buttonRecipe } from \"@/theme/recipes/button.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { pick } from \"@/utils/pick\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"button\";\n\nexport type ButtonProps = ComponentProps<typeof defaultElement, ButtonVariants>;\n\nexport const Button = ({ asChild, ...props }: ButtonProps) => {\n const variants = pick(props, ...buttonRecipe.variants());\n const button = buttonRecipe(variants);\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp\n {...props}\n className={mergeClasses(button, props.className)}\n disabled={props.disabled || Boolean(variants.loading)}\n >\n {props.children}\n {variants.loading && <Spinner style={{ position: \"absolute\" }} />}\n </Comp>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAI,OAAO;AACX,IAAI,WAAW;AACf,IAAI,YAAY;AAChB,IAAI,gBAAgB;;;ACHpB,IAAI,QAAQ;;;ACDZ,SAAS,gBAAgB,SAAyC;AACvE,SAAO,QAAQ,OAAO,CAAC,QAAuB,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG;AACtE;;;AHOA,yBAAgC;AAChC,sBAAiC;;;AIRjC,6BAA0C;AACnC,IAAI,oBAAgB,uBAAAA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hB,EAAsB,aAA0B;AAAA,IAEjD,6CAAiB,sBAAhB,EAAqB,OAAO,EAAE,YAAY,EAAE,GAC3C,uDAAC,sCAAgB,GACnB;AAAA,KACF,GACF;AAEJ;AAIO,IAAM,gBAAgB,CAAC,EAAE,UAAU,GAAG,MAAM,MAA0B;AAC3E,SACE,6CAAiB,wBAAhB,EACC;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,MAAM,OAAO,MAAM,SAAS;AAAA,MAEpD,uDAAiB,0BAAhB,EAA0B,UAAS;AAAA;AAAA,EACtC,GACF;AAEJ;AAIO,IAAM,aAAa,CAAC,EAAE,GAAG,MAAM,MAAuB;AAC3D,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,UAAU,MAAM,SAAS;AAAA,MAEjD,uDAAiB,0BAAhB,EAA0B,gBAAM,UAAS;AAAA;AAAA,EAC5C;AAEJ;AAEO,IAAM,cAA8B;AAIpC,IAAM,cAAc,CAAC,EAAE,GAAG,MAAM,MAAwB;AAC7D,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,WAAW,MAAM,SAAS;AAAA,MAEjD,gBAAM;AAAA;AAAA,EACT;AAEJ;AAIO,IAAM,kBAAkB,CAAC,EAAE,GAAG,MAAM,MAA4B;AACrE,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,eAAe,MAAM,SAAS;AAAA,MAErD,gBAAM;AAAA;AAAA,EACT;AAEJ;","names":["_7a468","import_createRuntimeFn","_dc746","import_react_slot","import_jsx_runtime","defaultElement","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/select.tsx","../../src/theme/styles/menu.css.ts","../../src/theme/styles/panel.css.ts","../../src/utils/merge-classes.ts","../../src/theme/recipes/spinner.css.ts","../../src/utils/omit.ts","../../src/utils/pick.ts","../../src/utils/get-variants.ts","../../src/components/spinner.tsx","../../src/theme/recipes/button.css.ts","../../src/components/button.tsx"],"sourcesContent":["import { ButtonVariants } from \"@/theme/recipes/button.css\";\nimport {\n menu,\n menuItem,\n menuLabel,\n menuSeparator,\n} from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Button } from \"./button\";\n\nexport type SelectProps = SelectPrimitive.SelectProps;\n\nexport const Select = SelectPrimitive.Root;\n\nexport type SelectTriggerProps = SelectPrimitive.SelectTriggerProps &\n ButtonVariants & {\n placeholder?: React.ReactNode;\n };\n\nexport const SelectTrigger = ({\n placeholder,\n variant = \"outline\",\n ...props\n}: SelectTriggerProps) => {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n <Button variant={variant}>\n <SelectPrimitive.Value placeholder={placeholder} />\n\n <SelectPrimitive.Icon style={{ marginLeft: 5 }}>\n <ChevronDownIcon />\n </SelectPrimitive.Icon>\n </Button>\n </SelectPrimitive.Trigger>\n );\n};\n\nexport type SelectContentProps = SelectPrimitive.SelectContentProps;\n\nexport const SelectContent = ({ children, ...props }: SelectContentProps) => {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n {...props}\n className={mergeClasses(menu, panel, props.className)}\n >\n <SelectPrimitive.Viewport>{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n};\n\nexport type SelectItemProps = SelectPrimitive.SelectItemProps;\n\nexport const SelectItem = ({ ...props }: SelectItemProps) => {\n return (\n <SelectPrimitive.Item\n {...props}\n className={mergeClasses(menuItem, props.className)}\n >\n <SelectPrimitive.ItemText>{props.children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n};\n\nexport type SelectGroupProps = SelectPrimitive.SelectGroupProps;\n\nexport const SelectGroup = SelectPrimitive.Group;\n\nexport type SelectLabelProps = SelectPrimitive.SelectLabelProps;\n\nexport const SelectLabel = ({ ...props }: SelectLabelProps) => {\n return (\n <SelectPrimitive.Label\n {...props}\n className={mergeClasses(menuLabel, props.className)}\n >\n {props.children}\n </SelectPrimitive.Label>\n );\n};\n\nexport type SelectSeparatorProps = SelectPrimitive.SelectSeparatorProps;\n\nexport const SelectSeparator = ({ ...props }: SelectSeparatorProps) => {\n return (\n <SelectPrimitive.Separator\n {...props}\n className={mergeClasses(menuSeparator, props.className)}\n >\n {props.children}\n </SelectPrimitive.Separator>\n );\n};\n","import 'src/theme/styles/menu.css.ts.vanilla.css?source=#H4sIAAAAAAAAA5VUwW7bMAy95yt0XA4qmqwbWvc07LIC26nHYQhoibbZyZQh0YmTYf8+SKkTpy287WLAD0/U4+OjrlrkflNCxG/I/YNgu9kMw0eu99fq10IpS7FzsC9U5XC4XygFjmrWJNjGQhlkwZDgpz4KVXttPAuyFCp2YFCXKDtETozKs+hIByzUFsI7rRPwSAeMerXZrO64xFt7tzxRtxAIWDT3LQYyhRIoewchATGxHDHqBqlupFCrhJg+RB8KZbGC3kmC+ohBR3RopFDsGRO4a0hQZ4UJ3AXoEjzWOsqLWdqHk7R1bbK4DqwlrrXD6szNzZ65NxfMcFH2TWrpg8WgA1jq40hNfzQxZ103y/vF78VVnln7Yl6rPK/ORxLyXKiADoS2ueESzM86+J6tNt4liyQAxw4CssyULBq/xZALvy7x3A+2wELmcwKjntT9ks6exVfVnPjvFgR0Q3Xjkltof+RbfS9pzOfR/b+MTya5MNFR/12HpQilG0VcXGSOF0QHKULpe3uqvdp3yzmRr8+uJ2efltMMsxcNzvkd2pwlT2nVNG6RJY5+TNv4CiW6sY/1TBhmfcNBHvtS3NQw88Kw8ZL3x2D4Ie0KcV2MMS59fipaYr0jK02hVuvrbpjsxOU2nCN+nT04aGKLw0g6PLAlg1G3MEyW4fBC1iN2EEB8GPXdZH2nF+IooIVQE2vx3byGZ17pRXw7T/3HTKYgT1zFJP8PkvE4QH8FAAA=';\nexport var menu = 'menu_menu__xx6ngy3';\nexport var menuItem = 'menu_menuItem__xx6ngy1 menu_baseMenuItem__xx6ngy0';\nexport var menuLabel = 'menu_menuLabel__xx6ngy2 menu_baseMenuItem__xx6ngy0';\nexport var menuSeparator = 'menu_menuSeparator__xx6ngy4';","import 'src/theme/styles/panel.css.ts.vanilla.css?source=LnBhbmVsX3BhbmVsX19naDlzdXowIHsKICBjb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZVRleHRDb250cmFzdF9fMTluYmU4ZDJmOSk7CiAgYmFja2dyb3VuZC1jb2xvcjogdmFyKC0tc2VtYW50aWNDb2xvcnMtc3VyZmFjZV9fMTluYmU4ZDJmOCk7CiAgYm9yZGVyLXJhZGl1czogdmFyKC0tcmFkaWktM19fMTluYmU4ZDJnaik7CiAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLXNlbWFudGljQ29sb3JzLWxpbmVfXzE5bmJlOGQyZmUpOwp9';\nexport var panel = 'panel_panel__gh9suz0';","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n","import 'src/theme/animations/spin.css.ts.vanilla.css?source=QGtleWZyYW1lcyBzcGluX3NwaW5fXzkxZzI5NTAgewogIHRvIHsKICAgIHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7CiAgfQp9';\nimport 'src/theme/recipes/spinner.css.ts.vanilla.css?source=#H4sIAAAAAAAAA33P327CIBTH8fs+BZfbRY30jxa93BvsBQgtWE9SoQHc1MV3X+ocI2SHGxuT7/l9wsrNoLWy/Pl9VwPMinPaXm7Dla3JV0GI0HASHozekSV7tJwzOlasXZNV58gEWglLQB9Ag1f7gpDeWKnsjtD5QpyZQJIPYV/KcjCTsa50k/Dq57fhnDLdq07S6/T6d1taIeHsds/D5R+U1py1DAfVqOMDb+YYHM7WKu3fFnFf3IvV/491cFOchjfTx5uPCsaj/7WXxJU0cruH+wnSH/NRnq0CW6FsFS0yjE2jPFsHtkbZOloUGJtGebYJbIOyTbTYY2wa5dk2sC3KttHigLFplGc3gd2g7CZalBibRnl2G9gtym6jRYWxaZRnu8B2KNtFiweMTaM8ywLLUJZFiyPGptH9G0PpMC4bBQAA';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var spinnerRecipe = _7a468({defaultClassName:'spinner_spinnerRecipe__15xzcy90',variantClassNames:{size:{'1':'spinner_spinnerRecipe_size_1__15xzcy91','2':'spinner_spinnerRecipe_size_2__15xzcy92','3':'spinner_spinnerRecipe_size_3__15xzcy93','4':'spinner_spinnerRecipe_size_4__15xzcy94','5':'spinner_spinnerRecipe_size_5__15xzcy95','6':'spinner_spinnerRecipe_size_6__15xzcy96','7':'spinner_spinnerRecipe_size_7__15xzcy97','8':'spinner_spinnerRecipe_size_8__15xzcy98','9':'spinner_spinnerRecipe_size_9__15xzcy99'}},defaultVariants:{size:'3'},compoundVariants:[]});","export function omit<T, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K> {\n const ret = { ...obj };\n keys.forEach((key) => {\n delete ret[key];\n });\n\n return ret;\n}\n","/**\n * https://stackoverflow.com/a/47232883\n */\nexport function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const ret: any = {};\n keys.forEach((key) => {\n ret[key] = obj[key];\n });\n\n return ret;\n}\n","import { omit } from \"./omit\";\nimport { pick } from \"./pick\";\n\n/**\n * TODO\n * @param obj\n * @param keys\n * @returns [variants, props]\n */\nexport function extractVariantsFromProps<T, K extends keyof T>(\n obj: T,\n ...keys: K[]\n): [Pick<T, K>, Omit<T, K>] {\n const variants = pick(obj, ...keys);\n const rest = omit(obj, ...keys);\n\n return [variants, rest];\n}\n","import { SpinnerVariants, spinnerRecipe } from \"@/theme/recipes/spinner.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { extractVariantsFromProps } from \"@/utils/get-variants\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\nexport type SpinnerProps = ComponentProps<\n typeof defaultElement,\n SpinnerVariants\n>;\n\nexport const Spinner = ({ asChild, ...props }: SpinnerProps) => {\n const [variants, rest] = extractVariantsFromProps(\n props,\n ...spinnerRecipe.variants(),\n );\n const spinner = spinnerRecipe(variants);\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...rest} className={mergeClasses(spinner, rest.className)}>\n {rest.children}\n </Comp>\n );\n};\n","import 'src/theme/recipes/button.css.ts.vanilla.css?source=#H4sIAAAAAAAAA71XTW+kOBC9z69gDyMl0nrU3cnkg73saC5zn8McW8YU4ARsZJv+yCr/fWUDjaFpsEkraqlJO1X1ivdMmfctqpTibLvN6N0Rr1bBf1+CAOd5GFRMgvrH/KIpQ1RBIcOAAFMg9HLED0jSN8rSMIi4iEGgiB/0fyoJAknIgagwYJyBXoypLHN8DAPKcsoAJTmYYH1FMhOUvYbBSq+8VFLR5IgIZwqYsjHRHqJXqpDCJcpomuU0zRQiPOciDEQa4ZvV3+Zza0pzplCCC5ofw2CHxQ1CekkiBQe13a6fWQRP8SahXfQedEU7+o9ZkaiAmFaFlcW7rB0WFDOFWFWAoCQMFI6qHAu9IHWUEphJqihnoSY3WK9W+h/vX74N6A/DCBIuwMhwieGxNJwoEL5ZGd81SaQSUnNYclpzPRIdU4mjHOIaBZPXVPCKxS39NWXmh0Qyxwrq782Js/Xx5fa0czIc873eDRJUsDKfdXkYqfKjuTx2dd5qfWeAnyzgsk5o7pJxhXCe8z3Eerm5aQQ7YEq2W7ZjIKny/A+NVbZVooKWkLXhYa/XQy3oVzsl5zimLO0lbGqm66bNjiixAKaCv2hRcqEwU3YJSd9gu26T7xptjZ4Cx7SS7Z3rXxStu62ZZuZus95e1uUk+m5FERNV4lh3inJIutgSE0CWcL1I0Ss7GmqeCo1oP0m/TQddn88m1AwDl1YHzGxaZu7nmNlYhehFZh6sqHiGmbsudo6ZYegEM11odIkZvfSrGUhWw8nunJ+7lp/v1+Hn0YqCGX7uT7F3c/wMQyf46ULJ9M4Zttox0wzqbSlogcWxpehhcqRJKDBTlPysJ0yT2167rjYkPx9L08lr66kl0qlVa2gva9h6rkjhBomJojv4AKa1VwkbxZRAOIst1EcfuFN295elSzNpPAvY2sSpY9P+6owgWwrF2BXYX6MRZEsnM4TOkXml9HPX4j5dALSON7cTf9BbjXGab+NP8bAXf/KtNn/pXAsycYP0p93C/GGSLdDxbZZmXKoW8tmF8bkan8DUAPAzeAIhuGghsQ+Wyay/7blxmJ0bVqI9L+DeoUF/ESw0e0YcXcD8BbDQ7LnwNj6RKkJAyhYv8hpEdW57tRSA+RN1kNxTYfxEHba6YGb3MS0tYPxEPYNcMK37mJYi0D9RTame8SBzb4Da4FjvTNzU+1c7XhxIIgBYgFkc3BSUocbwPD48lYdbU/jcJsmih187xoFXCoJ3K7f1S4NMaDJnTFO/lnn9lUXnnZKmipd7cvVPPg7Ky0N5uSgPHzVO1slOpfNknRsGV0vlY6q8bJWXsfK2VuOUnRxWdj3Kzl2Wj8/yclpeXsvDbfXJOk3AYmgraMvalWzXx4yXc9fWaXEtB+aObR0b17JiF8HPPMaLH66TJ/u4K/Pof4l0DvbMp4MlAjr4tIstDPzK60XkgWG7jmVzbmuJMjOOxB17iSZz5uQies8W5a5yOBX7TBIHyJ9KYc/YFH6gk0ZvudVz7HWJQhOezxV1iToT5u/yvOu7HOY55uZc4Md8oHPXi06JaUPojr3ofJh2hn3w2h0ObBaff4EdsYi68Pv/bTN6ukAeAAA=';\nimport { createRuntimeFn as _dc746 } from 'homemade-recipes/createRuntimeFn';\nexport var buttonRecipe = _dc746((function(){var x={defaultClassName:'button__hi3ya00',variantClassNames:{fullWidth:{true:'button_fullWidth_true__hi3ya01'},loading:{true:'button_loading_true__hi3ya02'},size:{'1':'button_size_1__hi3ya03','2':'button_size_2__hi3ya04','3':'button_size_3__hi3ya05'},variant:{primary:'button_variant_primary__hi3ya06',secondary:'button_variant_secondary__hi3ya07',outline:'button_variant_outline__hi3ya08',ghost:'button_variant_ghost__hi3ya09',error:'button_variant_error__hi3ya0a',success:'button_variant_success__hi3ya0b'},round:{true:'button_round_true__hi3ya0c'}},defaultVariants:{size:'2',variant:'primary'},compoundVariants:[],responsiveVariantClassNames:{initial:undefined,sm:{fullWidth:{true:'button_fullWidth_sm_true__hi3ya0d'},loading:{true:'button_loading_sm_true__hi3ya0e'},size:{'1':'button_size_sm_1__hi3ya0f','2':'button_size_sm_2__hi3ya0g','3':'button_size_sm_3__hi3ya0h'},variant:{primary:'button_variant_sm_primary__hi3ya0i',secondary:'button_variant_sm_secondary__hi3ya0j',outline:'button_variant_sm_outline__hi3ya0k',ghost:'button_variant_sm_ghost__hi3ya0l',error:'button_variant_sm_error__hi3ya0m',success:'button_variant_sm_success__hi3ya0n'},round:{true:'button_round_sm_true__hi3ya0o'}}},conditionNames:['sm'],conditions:{xs:'520px',sm:'768px',md:'1024px',lg:'1280px',xl:'1640px'},identifier:'homemade-recipe__lb053z0',cssCache:[]};x.responsiveVariantClassNames.initial=x.variantClassNames;return x;}()));","import { Spinner } from \"@/components/spinner\";\nimport { ButtonVariants, buttonRecipe } from \"@/theme/recipes/button.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { extractVariantsFromProps } from \"@/utils/get-variants\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"button\";\n\nexport type ButtonProps = ComponentProps<typeof defaultElement, ButtonVariants>;\n\nexport const Button = ({ asChild, ...props }: ButtonProps) => {\n const [variants, rest] = extractVariantsFromProps(\n props,\n ...buttonRecipe.variants(),\n );\n const button = buttonRecipe(variants);\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp\n {...rest}\n className={mergeClasses(button, rest.className)}\n disabled={rest.dis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;AAAA,EACtC,GACF;AAEJ;AAIO,IAAM,aAAa,CAAC,EAAE,GAAG,MAAM,MAAuB;AAC3D,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,UAAU,MAAM,SAAS;AAAA,MAEjD,uDAAiB,0BAAhB,EAA0B,gBAAM,UAAS;AAAA;AAAA,EAC5C;AAEJ;AAIO,IAAM,cAA8B;AAIpC,IAAM,cAAc,CAAC,EAAE,GAAG,MAAM,MAAwB;AAC7D,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,WAAW,MAAM,SAAS;AAAA,MAEjD,gBAAM;AAAA;AAAA,EACT;AAEJ;AAIO,IAAM,kBAAkB,CAAC,EAAE,GAAG,MAAM,MAA4B;AACrE,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,eAAe,MAAM,SAAS;AAAA,MAErD,gBAAM;AAAA;AAAA,EACT;AAEJ;","names":["_7a468","import_createRuntimeFn","_dc746","import_react_slot","import_jsx_runtime","defaultElement","import_jsx_runtime"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-24DFRL5Q.mjs";
|
|
4
4
|
import "../chunk-66WXCRN4.mjs";
|
|
5
|
-
import "../chunk-
|
|
5
|
+
import "../chunk-MIRMF5N3.mjs";
|
|
6
6
|
import "../chunk-47YGQSLM.mjs";
|
|
7
7
|
import {
|
|
8
8
|
menu,
|
|
@@ -14,7 +14,8 @@ import {
|
|
|
14
14
|
panel
|
|
15
15
|
} from "../chunk-WUVNL3DI.mjs";
|
|
16
16
|
import "../chunk-IFN22XIN.mjs";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-DQ4T4WV3.mjs";
|
|
18
|
+
import "../chunk-BALC5CGU.mjs";
|
|
18
19
|
import {
|
|
19
20
|
mergeClasses
|
|
20
21
|
} from "../chunk-7EGQM3ZL.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/select.tsx"],"sourcesContent":["import { ButtonVariants } from \"@/theme/recipes/button.css\";\nimport {\n menu,\n menuItem,\n menuLabel,\n menuSeparator,\n} from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Button } from \"./button\";\n\nexport const Select = SelectPrimitive.Root;\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/select.tsx"],"sourcesContent":["import { ButtonVariants } from \"@/theme/recipes/button.css\";\nimport {\n menu,\n menuItem,\n menuLabel,\n menuSeparator,\n} from \"@/theme/styles/menu.css\";\nimport { panel } from \"@/theme/styles/panel.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Button } from \"./button\";\n\nexport type SelectProps = SelectPrimitive.SelectProps;\n\nexport const Select = SelectPrimitive.Root;\n\nexport type SelectTriggerProps = SelectPrimitive.SelectTriggerProps &\n ButtonVariants & {\n placeholder?: React.ReactNode;\n };\n\nexport const SelectTrigger = ({\n placeholder,\n variant = \"outline\",\n ...props\n}: SelectTriggerProps) => {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n <Button variant={variant}>\n <SelectPrimitive.Value placeholder={placeholder} />\n\n <SelectPrimitive.Icon style={{ marginLeft: 5 }}>\n <ChevronDownIcon />\n </SelectPrimitive.Icon>\n </Button>\n </SelectPrimitive.Trigger>\n );\n};\n\nexport type SelectContentProps = SelectPrimitive.SelectContentProps;\n\nexport const SelectContent = ({ children, ...props }: SelectContentProps) => {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n {...props}\n className={mergeClasses(menu, panel, props.className)}\n >\n <SelectPrimitive.Viewport>{children}</SelectPrimitive.Viewport>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n};\n\nexport type SelectItemProps = SelectPrimitive.SelectItemProps;\n\nexport const SelectItem = ({ ...props }: SelectItemProps) => {\n return (\n <SelectPrimitive.Item\n {...props}\n className={mergeClasses(menuItem, props.className)}\n >\n <SelectPrimitive.ItemText>{props.children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n};\n\nexport type SelectGroupProps = SelectPrimitive.SelectGroupProps;\n\nexport const SelectGroup = SelectPrimitive.Group;\n\nexport type SelectLabelProps = SelectPrimitive.SelectLabelProps;\n\nexport const SelectLabel = ({ ...props }: SelectLabelProps) => {\n return (\n <SelectPrimitive.Label\n {...props}\n className={mergeClasses(menuLabel, props.className)}\n >\n {props.children}\n </SelectPrimitive.Label>\n );\n};\n\nexport type SelectSeparatorProps = SelectPrimitive.SelectSeparatorProps;\n\nexport const SelectSeparator = ({ ...props }: SelectSeparatorProps) => {\n return (\n <SelectPrimitive.Separator\n {...props}\n className={mergeClasses(menuSeparator, props.className)}\n >\n {props.children}\n </SelectPrimitive.Separator>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AASA,SAAS,uBAAuB;AAChC,YAAY,qBAAqB;AAmB3B,SACE,KADF;AAdC,IAAM,SAAyB;AAO/B,IAAM,gBAAgB,CAAC;AAAA,EAC5B;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,MAA0B;AACxB,SACE,oBAAiB,yBAAhB,EAAyB,GAAG,OAAO,SAAO,MACzC,+BAAC,UAAO,SACN;AAAA,wBAAiB,uBAAhB,EAAsB,aAA0B;AAAA,IAEjD,oBAAiB,sBAAhB,EAAqB,OAAO,EAAE,YAAY,EAAE,GAC3C,8BAAC,mBAAgB,GACnB;AAAA,KACF,GACF;AAEJ;AAIO,IAAM,gBAAgB,CAAC,EAAE,UAAU,GAAG,MAAM,MAA0B;AAC3E,SACE,oBAAiB,wBAAhB,EACC;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,MAAM,OAAO,MAAM,SAAS;AAAA,MAEpD,8BAAiB,0BAAhB,EAA0B,UAAS;AAAA;AAAA,EACtC,GACF;AAEJ;AAIO,IAAM,aAAa,CAAC,EAAE,GAAG,MAAM,MAAuB;AAC3D,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,UAAU,MAAM,SAAS;AAAA,MAEjD,8BAAiB,0BAAhB,EAA0B,gBAAM,UAAS;AAAA;AAAA,EAC5C;AAEJ;AAIO,IAAM,cAA8B;AAIpC,IAAM,cAAc,CAAC,EAAE,GAAG,MAAM,MAAwB;AAC7D,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,WAAW,MAAM,SAAS;AAAA,MAEjD,gBAAM;AAAA;AAAA,EACT;AAEJ;AAIO,IAAM,kBAAkB,CAAC,EAAE,GAAG,MAAM,MAA4B;AACrE,SACE;AAAA,IAAiB;AAAA,IAAhB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,eAAe,MAAM,SAAS;AAAA,MAErD,gBAAM;AAAA;AAAA,EACT;AAEJ;","names":[]}
|
|
@@ -4,4 +4,4 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
|
4
4
|
type SeparatorProps = SeparatorPrimitive.SeparatorProps;
|
|
5
5
|
declare const Separator: ({ ...props }: SeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
|
7
|
-
export { Separator };
|
|
7
|
+
export { Separator, type SeparatorProps };
|
|
@@ -4,4 +4,4 @@ import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
|
4
4
|
type SeparatorProps = SeparatorPrimitive.SeparatorProps;
|
|
5
5
|
declare const Separator: ({ ...props }: SeparatorProps) => react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
|
7
|
-
export { Separator };
|
|
7
|
+
export { Separator, type SeparatorProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/separator.tsx","../../src/theme/styles/separator.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { separator } from \"@/theme/styles/separator.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/separator.tsx","../../src/theme/styles/separator.css.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { separator } from \"@/theme/styles/separator.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nexport type SeparatorProps = SeparatorPrimitive.SeparatorProps;\n\nexport const Separator = ({ ...props }: SeparatorProps) => {\n return (\n <SeparatorPrimitive.Root\n {...props}\n className={mergeClasses(separator, props.className)}\n >\n {props.children}\n </SeparatorPrimitive.Root>\n );\n};\n","import 'src/theme/styles/separator.css.ts.vanilla.css?source=LnNlcGFyYXRvcl9zZXBhcmF0b3JfX2wzNmcyMzAgewogIGJhY2tncm91bmQtY29sb3I6IHZhcigtLXNlbWFudGljQ29sb3JzLWxpbmVfXzE5bmJlOGQyZmUpOwp9Ci5zZXBhcmF0b3Jfc2VwYXJhdG9yX19sMzZnMjMwW2RhdGEtb3JpZW50YXRpb249aG9yaXpvbnRhbF0gewogIGhlaWdodDogMXB4OwogIHdpZHRoOiAxMDAlOwp9Ci5zZXBhcmF0b3Jfc2VwYXJhdG9yX19sMzZnMjMwW2RhdGEtb3JpZW50YXRpb249dmVydGljYWxdIHsKICBoZWlnaHQ6IDEwMCU7CiAgd2lkdGg6IDFweDsKfQ==';\nexport var separator = 'separator_separator__l36g230';","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCO,IAAI,YAAY;;;ACDhB,SAAS,gBAAgB,SAAyC;AACvE,SAAO,QAAQ,OAAO,CAAC,QAAuB,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG;AACtE;;;AFAA,yBAAoC;AAMhC;AAFG,IAAM,YAAY,CAAC,EAAE,GAAG,MAAM,MAAsB;AACzD,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,WAAW,MAAM,SAAS;AAAA,MAEjD,gBAAM;AAAA;AAAA,EACT;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/separator.tsx"],"sourcesContent":["import { separator } from \"@/theme/styles/separator.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\
|
|
1
|
+
{"version":3,"sources":["../../src/components/separator.tsx"],"sourcesContent":["import { separator } from \"@/theme/styles/separator.css\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport * as SeparatorPrimitive from \"@radix-ui/react-separator\";\n\nexport type SeparatorProps = SeparatorPrimitive.SeparatorProps;\n\nexport const Separator = ({ ...props }: SeparatorProps) => {\n return (\n <SeparatorPrimitive.Root\n {...props}\n className={mergeClasses(separator, props.className)}\n >\n {props.children}\n </SeparatorPrimitive.Root>\n );\n};\n"],"mappings":";;;;;;;;AAEA,YAAY,wBAAwB;AAMhC;AAFG,IAAM,YAAY,CAAC,EAAE,GAAG,MAAM,MAAsB;AACzD,SACE;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACE,GAAG;AAAA,MACJ,WAAW,aAAa,WAAW,MAAM,SAAS;AAAA,MAEjD,gBAAM;AAAA;AAAA,EACT;AAEJ;","names":[]}
|
|
@@ -7,4 +7,4 @@ declare const defaultElement = "div";
|
|
|
7
7
|
type SkeletonProps = ComponentProps<typeof defaultElement, SkeletonVariants>;
|
|
8
8
|
declare const Skeleton: ({ asChild, ...props }: SkeletonProps) => react_jsx_runtime.JSX.Element;
|
|
9
9
|
|
|
10
|
-
export { Skeleton };
|
|
10
|
+
export { Skeleton, type SkeletonProps };
|
|
@@ -7,4 +7,4 @@ declare const defaultElement = "div";
|
|
|
7
7
|
type SkeletonProps = ComponentProps<typeof defaultElement, SkeletonVariants>;
|
|
8
8
|
declare const Skeleton: ({ asChild, ...props }: SkeletonProps) => react_jsx_runtime.JSX.Element;
|
|
9
9
|
|
|
10
|
-
export { Skeleton };
|
|
10
|
+
export { Skeleton, type SkeletonProps };
|
|
@@ -28,9 +28,13 @@ module.exports = __toCommonJS(skeleton_exports);
|
|
|
28
28
|
var import_createRuntimeFn = require("@vanilla-extract/recipes/createRuntimeFn");
|
|
29
29
|
var skeletonRecipe = (0, import_createRuntimeFn.createRuntimeFn)({ defaultClassName: "skeleton_skeletonRecipe__w6jrqu0", variantClassNames: { variant: { avatar1: "skeleton_skeletonRecipe_variant_avatar1__w6jrqu1", avatar2: "skeleton_skeletonRecipe_variant_avatar2__w6jrqu2", avatar3: "skeleton_skeletonRecipe_variant_avatar3__w6jrqu3", avatar4: "skeleton_skeletonRecipe_variant_avatar4__w6jrqu4", avatar5: "skeleton_skeletonRecipe_variant_avatar5__w6jrqu5", avatar6: "skeleton_skeletonRecipe_variant_avatar6__w6jrqu6", text: "skeleton_skeletonRecipe_variant_text__w6jrqu7", title: "skeleton_skeletonRecipe_variant_title__w6jrqu8", heading: "skeleton_skeletonRecipe_variant_heading__w6jrqu9", button: "skeleton_skeletonRecipe_variant_button__w6jrqua" } }, defaultVariants: { variant: "text" }, compoundVariants: [] });
|
|
30
30
|
|
|
31
|
-
// src/utils/
|
|
32
|
-
function
|
|
33
|
-
|
|
31
|
+
// src/utils/omit.ts
|
|
32
|
+
function omit(obj, ...keys) {
|
|
33
|
+
const ret = { ...obj };
|
|
34
|
+
keys.forEach((key) => {
|
|
35
|
+
delete ret[key];
|
|
36
|
+
});
|
|
37
|
+
return ret;
|
|
34
38
|
}
|
|
35
39
|
|
|
36
40
|
// src/utils/pick.ts
|
|
@@ -42,15 +46,30 @@ function pick(obj, ...keys) {
|
|
|
42
46
|
return ret;
|
|
43
47
|
}
|
|
44
48
|
|
|
49
|
+
// src/utils/get-variants.ts
|
|
50
|
+
function extractVariantsFromProps(obj, ...keys) {
|
|
51
|
+
const variants = pick(obj, ...keys);
|
|
52
|
+
const rest = omit(obj, ...keys);
|
|
53
|
+
return [variants, rest];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// src/utils/merge-classes.ts
|
|
57
|
+
function mergeClasses(...classes) {
|
|
58
|
+
return classes.filter((cls) => Boolean(cls)).join(" ");
|
|
59
|
+
}
|
|
60
|
+
|
|
45
61
|
// src/components/skeleton.tsx
|
|
46
62
|
var import_react_slot = require("@radix-ui/react-slot");
|
|
47
63
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
48
64
|
var defaultElement = "div";
|
|
49
65
|
var Skeleton = ({ asChild, ...props }) => {
|
|
50
|
-
const variants =
|
|
66
|
+
const [variants, rest] = extractVariantsFromProps(
|
|
67
|
+
props,
|
|
68
|
+
...skeletonRecipe.variants()
|
|
69
|
+
);
|
|
51
70
|
const skeleton = skeletonRecipe(variants);
|
|
52
71
|
const Comp = asChild ? import_react_slot.Slot : defaultElement;
|
|
53
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...
|
|
72
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Comp, { ...rest, className: mergeClasses(skeleton, rest.className), children: rest.children });
|
|
54
73
|
};
|
|
55
74
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
75
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/skeleton.tsx","../../src/theme/recipes/skeleton.css.ts","../../src/utils/
|
|
1
|
+
{"version":3,"sources":["../../src/components/skeleton.tsx","../../src/theme/recipes/skeleton.css.ts","../../src/utils/omit.ts","../../src/utils/pick.ts","../../src/utils/get-variants.ts","../../src/utils/merge-classes.ts"],"sourcesContent":["import { SkeletonVariants, skeletonRecipe } from \"@/theme/recipes/skeleton.css\";\nimport { ComponentProps } from \"@/types/component-props\";\nimport { extractVariantsFromProps } from \"@/utils/get-variants\";\nimport { mergeClasses } from \"@/utils/merge-classes\";\nimport { Slot } from \"@radix-ui/react-slot\";\n\nconst defaultElement = \"div\";\n\nexport type SkeletonProps = ComponentProps<\n typeof defaultElement,\n SkeletonVariants\n>;\n\nexport const Skeleton = ({ asChild, ...props }: SkeletonProps) => {\n const [variants, rest] = extractVariantsFromProps(\n props,\n ...skeletonRecipe.variants(),\n );\n const skeleton = skeletonRecipe(variants);\n const Comp = asChild ? Slot : defaultElement;\n\n return (\n <Comp {...rest} className={mergeClasses(skeleton, rest.className)}>\n {rest.children}\n </Comp>\n );\n};\n","import 'src/theme/animations/pulse.css.ts.vanilla.css?source=QGtleWZyYW1lcyBwdWxzZV9wdWxzZV9femozcGx0MCB7CiAgMCUgewogICAgb3BhY2l0eTogMDsKICB9CiAgMTAwJSB7CiAgICBvcGFjaXR5OiAxMDAlOwogIH0KfQ==';\nimport 'src/theme/recipes/skeleton.css.ts.vanilla.css?source=#H4sIAAAAAAAAA62V3XKbMBBG7/0Umly1F8oY/xAbv0VegFlggU1kiUoLTtPpu3dAJsW0JDTlhhHo8OmsJMS9e0aFbHTcNx4xpQrj+BI+2W/1WvxYCZFA+lxYU+tMpkYZG4kG7Bfpb5x0Chj9dRfHwVEneMiC7+rraSVEZRwxGR0JiwqYGmyfmgZtrswlEiVlGerT6ufq/iOXKIKc0XZKqdGMmiNxd9fmgaYztMNIDWeMRFUrh7G/xq9P20rx+pbLagvea79en92okyymvhcUo9XAeEsQo39fpqZuPUjnpGmMMZ1JFzKv9TUOwaEkLU3Np3+a2XAws7qb2cTYDK20kFHtWoESLflUw2zOkehKVpjztfl7LSBxRtXe1lJR9gSbqmu9sxoNWALNMTTAYIN+dQK/U26dfDHtHcmuyrciNoUvokQ/uicdvaKT2wEFHXWhjMv3odnGm954s5zxfkClU8ZjaLbxtjfeLmccDqhsyngMzTbe9ca75YwfBhROGY+h2cb73ni/nPFhQOVTxmNotnHYG4fLGR8HVDFlPIZmGDO+cK/70On+bfRgEHyYGUys3n4Qh8nkT3x6JUJGuuizj5PZnziIkprb3ms0fLR+w3kp/+8M+mO3/QJlZkSkAQgAAA==';\nimport { createRuntimeFn as _7a468 } from '@vanilla-extract/recipes/createRuntimeFn';\nexport var skeletonRecipe = _7a468({defaultClassName:'skeleton_skeletonRecipe__w6jrqu0',variantClassNames:{variant:{avatar1:'skeleton_skeletonRecipe_variant_avatar1__w6jrqu1',avatar2:'skeleton_skeletonRecipe_variant_avatar2__w6jrqu2',avatar3:'skeleton_skeletonRecipe_variant_avatar3__w6jrqu3',avatar4:'skeleton_skeletonRecipe_variant_avatar4__w6jrqu4',avatar5:'skeleton_skeletonRecipe_variant_avatar5__w6jrqu5',avatar6:'skeleton_skeletonRecipe_variant_avatar6__w6jrqu6',text:'skeleton_skeletonRecipe_variant_text__w6jrqu7',title:'skeleton_skeletonRecipe_variant_title__w6jrqu8',heading:'skeleton_skeletonRecipe_variant_heading__w6jrqu9',button:'skeleton_skeletonRecipe_variant_button__w6jrqua'}},defaultVariants:{variant:'text'},compoundVariants:[]});","export function omit<T, K extends keyof T>(obj: T, ...keys: K[]): Omit<T, K> {\n const ret = { ...obj };\n keys.forEach((key) => {\n delete ret[key];\n });\n\n return ret;\n}\n","/**\n * https://stackoverflow.com/a/47232883\n */\nexport function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const ret: any = {};\n keys.forEach((key) => {\n ret[key] = obj[key];\n });\n\n return ret;\n}\n","import { omit } from \"./omit\";\nimport { pick } from \"./pick\";\n\n/**\n * TODO\n * @param obj\n * @param keys\n * @returns [variants, props]\n */\nexport function extractVariantsFromProps<T, K extends keyof T>(\n obj: T,\n ...keys: K[]\n): [Pick<T, K>, Omit<T, K>] {\n const variants = pick(obj, ...keys);\n const rest = omit(obj, ...keys);\n\n return [variants, rest];\n}\n","export function mergeClasses(...classes: (string | undefined)[]): string {\n return classes.filter((cls): cls is string => Boolean(cls)).join(\" \");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACEA,6BAA0C;AACnC,IAAI,qBAAiB,uBAAAA,iBAAO,EAAC,kBAAiB,oCAAmC,mBAAkB,EAAC,SAAQ,EAAC,SAAQ,oDAAmD,SAAQ,oDAAmD,SAAQ,oDAAmD,SAAQ,oDAAmD,SAAQ,oDAAmD,SAAQ,oDAAmD,MAAK,iDAAgD,OAAM,kDAAiD,SAAQ,oDAAmD,QAAO,kDAAiD,EAAC,GAAE,iBAAgB,EAAC,SAAQ,OAAM,GAAE,kBAAiB,CAAC,EAAC,CAAC;;;ACHtuB,SAAS,KAA2B,QAAW,MAAuB;AAC3E,QAAM,MAAM,EAAE,GAAG,IAAI;AACrB,OAAK,QAAQ,CAAC,QAAQ;AACpB,WAAO,IAAI,GAAG;AAAA,EAChB,CAAC;AAED,SAAO;AACT;;;ACJO,SAAS,KAA2B,QAAW,MAAuB;AAE3E,QAAM,MAAW,CAAC;AAClB,OAAK,QAAQ,CAAC,QAAQ;AACpB,QAAI,GAAG,IAAI,IAAI,GAAG;AAAA,EACpB,CAAC;AAED,SAAO;AACT;;;ACFO,SAAS,yBACd,QACG,MACuB;AAC1B,QAAM,WAAW,KAAK,KAAK,GAAG,IAAI;AAClC,QAAM,OAAO,KAAK,KAAK,GAAG,IAAI;AAE9B,SAAO,CAAC,UAAU,IAAI;AACxB;;;ACjBO,SAAS,gBAAgB,SAAyC;AACvE,SAAO,QAAQ,OAAO,CAAC,QAAuB,QAAQ,GAAG,CAAC,EAAE,KAAK,GAAG;AACtE;;;ALEA,wBAAqB;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