@fuf-stack/pixels 1.10.2 → 1.11.1
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/Accordion/Accordion.d.cts +512 -74
- package/dist/Accordion/Accordion.d.cts.map +1 -1
- package/dist/Accordion/Accordion.d.ts +512 -74
- package/dist/Accordion/Accordion.d.ts.map +1 -1
- package/dist/Alert/Alert.cjs +18 -6
- package/dist/Alert/Alert.cjs.map +1 -1
- package/dist/Alert/Alert.d.cts +396 -98
- package/dist/Alert/Alert.d.cts.map +1 -1
- package/dist/Alert/Alert.d.ts +396 -98
- package/dist/Alert/Alert.d.ts.map +1 -1
- package/dist/Alert/Alert.js +18 -6
- package/dist/Alert/Alert.js.map +1 -1
- package/dist/Avatar/Avatar.d.cts +734 -45
- package/dist/Avatar/Avatar.d.cts.map +1 -1
- package/dist/Avatar/Avatar.d.ts +734 -45
- package/dist/Avatar/Avatar.d.ts.map +1 -1
- package/dist/Badge/Badge.d.cts +377 -27
- package/dist/Badge/Badge.d.cts.map +1 -1
- package/dist/Badge/Badge.d.ts +377 -27
- package/dist/Badge/Badge.d.ts.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.cts +853 -51
- package/dist/Breadcrumb/Breadcrumb.d.cts.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +853 -51
- package/dist/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.d.cts +3 -215
- package/dist/Button/Button.d.cts.map +1 -1
- package/dist/Button/Button.d.ts +3 -215
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js.map +1 -1
- package/dist/Card/Card.d.cts +734 -45
- package/dist/Card/Card.d.cts.map +1 -1
- package/dist/Card/Card.d.ts +734 -45
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Drawer/Drawer.d.cts +972 -57
- package/dist/Drawer/Drawer.d.cts.map +1 -1
- package/dist/Drawer/Drawer.d.ts +972 -57
- package/dist/Drawer/Drawer.d.ts.map +1 -1
- package/dist/Label/Label.d.cts +418 -173
- package/dist/Label/Label.d.cts.map +1 -1
- package/dist/Label/Label.d.ts +418 -173
- package/dist/Label/Label.d.ts.map +1 -1
- package/dist/Menu/Menu.d.cts +377 -27
- package/dist/Menu/Menu.d.cts.map +1 -1
- package/dist/Menu/Menu.d.ts +377 -27
- package/dist/Menu/Menu.d.ts.map +1 -1
- package/dist/Modal/Modal.cjs +1 -1
- package/dist/Modal/Modal.cjs.map +1 -1
- package/dist/Modal/Modal.d.cts +347 -71
- package/dist/Modal/Modal.d.cts.map +1 -1
- package/dist/Modal/Modal.d.ts +347 -71
- package/dist/Modal/Modal.d.ts.map +1 -1
- package/dist/Modal/Modal.js +2 -2
- package/dist/Modal/Modal.js.map +1 -1
- package/dist/Modal/ModalHost.cjs +40 -0
- package/dist/Modal/ModalHost.cjs.map +1 -0
- package/dist/Modal/ModalHost.d.cts +16 -0
- package/dist/Modal/ModalHost.d.cts.map +1 -0
- package/dist/Modal/ModalHost.d.ts +16 -0
- package/dist/Modal/ModalHost.d.ts.map +1 -0
- package/dist/Modal/ModalHost.js +39 -0
- package/dist/Modal/ModalHost.js.map +1 -0
- package/dist/Modal/index.cjs +4 -0
- package/dist/Modal/index.cjs.map +1 -1
- package/dist/Modal/index.d.cts +3 -1
- package/dist/Modal/index.d.ts +3 -1
- package/dist/Modal/index.js +3 -1
- package/dist/Modal/index.js.map +1 -1
- package/dist/Modal/modalStore.cjs +80 -0
- package/dist/Modal/modalStore.cjs.map +1 -0
- package/dist/Modal/modalStore.d.cts +31 -0
- package/dist/Modal/modalStore.d.cts.map +1 -0
- package/dist/Modal/modalStore.d.ts +31 -0
- package/dist/Modal/modalStore.d.ts.map +1 -0
- package/dist/Modal/modalStore.js +78 -0
- package/dist/Modal/modalStore.js.map +1 -0
- package/dist/Popover/Popover.d.cts +1091 -63
- package/dist/Popover/Popover.d.cts.map +1 -1
- package/dist/Popover/Popover.d.ts +1091 -63
- package/dist/Popover/Popover.d.ts.map +1 -1
- package/dist/Progress/Progress.d.cts +321 -85
- package/dist/Progress/Progress.d.cts.map +1 -1
- package/dist/Progress/Progress.d.ts +321 -85
- package/dist/Progress/Progress.d.ts.map +1 -1
- package/dist/ProgressCircular/ProgressCircular.d.cts +507 -186
- package/dist/ProgressCircular/ProgressCircular.d.cts.map +1 -1
- package/dist/ProgressCircular/ProgressCircular.d.ts +507 -186
- package/dist/ProgressCircular/ProgressCircular.d.ts.map +1 -1
- package/dist/SearchInput/SearchInput.d.cts +615 -39
- package/dist/SearchInput/SearchInput.d.cts.map +1 -1
- package/dist/SearchInput/SearchInput.d.ts +615 -39
- package/dist/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/Table/Table.d.cts +514 -96
- package/dist/Table/Table.d.cts.map +1 -1
- package/dist/Table/Table.d.ts +514 -96
- package/dist/Table/Table.d.ts.map +1 -1
- package/dist/Tabs/Tabs.d.cts +972 -57
- package/dist/Tabs/Tabs.d.cts.map +1 -1
- package/dist/Tabs/Tabs.d.ts +972 -57
- package/dist/Tabs/Tabs.d.ts.map +1 -1
- package/dist/Toast/Toaster.cjs +10 -2
- package/dist/Toast/Toaster.cjs.map +1 -1
- package/dist/Toast/Toaster.d.cts +5 -2
- package/dist/Toast/Toaster.d.cts.map +1 -1
- package/dist/Toast/Toaster.d.ts +5 -2
- package/dist/Toast/Toaster.d.ts.map +1 -1
- package/dist/Toast/Toaster.js +10 -2
- package/dist/Toast/Toaster.js.map +1 -1
- package/dist/Toast/index.cjs +3 -3
- package/dist/Toast/index.cjs.map +1 -1
- package/dist/Toast/index.d.cts +1 -1
- package/dist/Toast/index.d.ts +1 -1
- package/dist/Toast/index.js +1 -1
- package/dist/Toast/index.js.map +1 -1
- package/dist/Toast/{Toast.cjs → toast.cjs} +2 -2
- package/dist/Toast/{Toast.cjs.map → toast.cjs.map} +1 -1
- package/dist/Toast/{Toast.d.cts → toast.d.cts} +2 -2
- package/dist/Toast/{Toast.d.cts.map → toast.d.cts.map} +1 -1
- package/dist/Toast/{Toast.d.ts → toast.d.ts} +2 -2
- package/dist/Toast/{Toast.d.ts.map → toast.d.ts.map} +1 -1
- package/dist/Toast/{Toast.js → toast.js} +2 -2
- package/dist/Toast/{Toast.js.map → toast.js.map} +1 -1
- package/dist/Tooltip/Tooltip.d.cts +452 -143
- package/dist/Tooltip/Tooltip.d.cts.map +1 -1
- package/dist/Tooltip/Tooltip.d.ts +452 -143
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/index.cjs +6 -2
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.d.ts","names":[],"sources":["../../src/Breadcrumb/Breadcrumb.tsx"],"mappings":";;;;cAYa,kBAAA,
|
|
1
|
+
{"version":3,"file":"Breadcrumb.d.ts","names":[],"sources":["../../src/Breadcrumb/Breadcrumb.tsx"],"mappings":";;;;cAYa,kBAAA,IAAkB,KAAA;EAAA;;;gbAe7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gbAf6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sbAmBnB;EAAA;kbAMG;;;;sbANH;EAAA;;;;;kbAMY;;;;sbAGG;EAAA;IAAA;;;kbACC;;;;sbAEK;EAAA;IAAA;;;kbAAQ;;;;sbAEvC;EAAA;IAAA;;;kbAYA;;;;sbAQA;EAAA;IAAA;;;kbAQA;;;;sbA2DD;EAAA;kbArDmB;;;;sbAAA;EAAA;AAAA;;kbAAA;;;;sbAajB;EAAA;;obAbiB;;;;wbAAA;IAAA;;obAAA;;;;wbAAA;IAAA;;obAAA;;;;wbAAA;IAAA;;obAAA;;;;wbAaF;IAAA;;obAwCjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAvGgB,mBAAA;;EAEf,QAAA,EAAU,SAAA;;EAEV,QAAA;;EAEA,YAAA,GAAe,SAAA;;EAEf,UAAA,GAAa,SAAA;AAAA;AAAA,KAGV,YAAA,GAAe,OAAO,QAAQ,kBAAA;AAAA,KAC9B,SAAA,GAAY,WAAW,QAAQ,kBAAA;AAAA,UAEnB,eAAA,SAAwB,YAAA;;EAEvC,eAAA,EAAiB,mBAAA;;EAEjB,SAAA,GAAY,SAAA;;EAEZ,KAAA;;EAQA,gBAAA;;EAEA,aAAA;;EAEA,QAAA;;EAEA,QAAA;;EAEA,MAAA;;EAEA,SAAA,GAAY,SAAA;;EAEZ,IAAA;;EAEA,SAAA;;EAEA,OAAA;AAAA;;;;cAMI,UAAA;EAAc,eAAA;EAAA,SAAA,EAAA,UAAA;EAAA,KAAA;EAAA,gBAAA;EAAA,QAAA;EAAA,aAAA;EAAA,QAAA;EAAA,MAAA;EAAA,SAAA;EAAA,IAAA;EAAA,SAAA;EAAA;AAAA,GAajB,eAAA,iCAAe,GAAA,CAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","names":["heroButtonVariants","HeroButton","LoadingSpinner"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n extend: heroButtonVariants,\n variants: {\n color: {\n ...heroButtonVariants.variants.color,\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'success',\n variant: 'shadow',\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'warning',\n variant: 'shadow',\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'shadow-info/40 bg-info text-info-foreground shadow-lg',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\n/* eslint-disable react/require-default-props -- not working with forwardRef */\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: VariantProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** blur event handler */\n onBlur?: HeroButtonProps['onBlur'];\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** focus event handler */\n onFocus?: HeroButtonProps['onFocus'];\n /** border radius size */\n radius?: VariantProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: VariantProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: VariantProps['variant'];\n}\n/* eslint-enable react/require-default-props */\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n ariaLabel = undefined,\n children = undefined,\n className: _className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onBlur = undefined,\n onClick = undefined,\n onFocus = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n },\n ref,\n ) => {\n const className = buttonVariants({\n className: _className,\n disableAnimation,\n isDisabled: disabled,\n color,\n size,\n variant,\n isIconOnly: !!(icon && !children),\n radius,\n });\n\n return (\n <HeroButton\n ref={ref}\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isLoading={loading}\n onBlur={onBlur}\n onFocus={onFocus}\n onPress={onClick}\n spinner={<LoadingSpinner />}\n type={type}\n >\n {icon}\n {children}\n </HeroButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.cjs","names":["heroButtonVariants","HeroButton","LoadingSpinner"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\n// TODO: `tv(...)` inference here triggers TS2742/TS2883 during declaration emit\n// (non-portable `tailwind-variants` type path). Keep this explicit annotation\n// until we have a portable `tv` return type strategy.\nexport const buttonVariants: ReturnType<typeof tv> = tv({\n extend: heroButtonVariants,\n variants: {\n color: {\n ...heroButtonVariants.variants.color,\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'success',\n variant: 'shadow',\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'warning',\n variant: 'shadow',\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'shadow-info/40 bg-info text-info-foreground shadow-lg',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\n/* eslint-disable react/require-default-props -- not working with forwardRef */\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: VariantProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** blur event handler */\n onBlur?: HeroButtonProps['onBlur'];\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** focus event handler */\n onFocus?: HeroButtonProps['onFocus'];\n /** border radius size */\n radius?: VariantProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: VariantProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: VariantProps['variant'];\n}\n/* eslint-enable react/require-default-props */\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n ariaLabel = undefined,\n children = undefined,\n className: _className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onBlur = undefined,\n onClick = undefined,\n onFocus = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n },\n ref,\n ) => {\n const className = buttonVariants({\n className: _className,\n disableAnimation,\n isDisabled: disabled,\n color,\n size,\n variant,\n isIconOnly: !!(icon && !children),\n radius,\n });\n\n return (\n <HeroButton\n ref={ref}\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isLoading={loading}\n onBlur={onBlur}\n onFocus={onFocus}\n onPress={onClick}\n spinner={<LoadingSpinner />}\n type={type}\n >\n {icon}\n {children}\n </HeroButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"mappings":";;;;;;;;AAgBA,MAAa,kBAAA,GAAA,uBAAA,IAA2C;CACtD,QAAQA,cAAAA;CACR,UAAU;EACR,OAAO;GACL,GAAGA,cAAAA,OAAmB,SAAS;GAE/B,MAAM;EACR;EACA,SAASA,cAAAA,OAAmB,SAAS;EACrC,MAAMA,cAAAA,OAAmB,SAAS;CACpC;CACA,kBAAkB;EAEhB;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EAEA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OACE;EACJ;CACF;AACF,CAAC;;;;AA8CD,MAAM,UAAA,GAAA,MAAA,aAEF,EACE,YAAY,KAAA,GACZ,WAAW,KAAA,GACX,WAAW,aAAa,KAAA,GACxB,QAAQ,WACR,mBAAmB,OACnB,WAAW,OACX,OAAO,KAAA,GACP,UAAU,OACV,SAAS,KAAA,GACT,UAAU,KAAA,GACV,UAAU,KAAA,GACV,SAAS,KAAA,GACT,SAAS,OACT,OAAO,KAAA,GACP,SAAS,KAAA,GACT,OAAO,KAAA,GACP,UAAU,WAEZ,QACG;CAYH,OACE,iBAAA,GAAA,kBAAA,MAACC,eAAAA,QAAD;EACO;EACL,cAAY;EACZ,WAfc,eAAe;GAC/B,WAAW;GACX;GACA,YAAY;GACZ;GACA;GACA;GACA,YAAY,CAAC,EAAE,QAAQ,CAAC;GACxB;EACF,CAMuB;EACnB,eAAa;EACb,eAAe,oBAAoB,CAAC;EACpC,YAAY;EACZ,WAAW;EACH;EACC;EACT,SAAS;EACT,SAAS,iBAAA,GAAA,kBAAA,KAACC,uBAAAA,SAAD,CAAiB,CAAA;EACpB;YAZR,CAcG,MACA,QACS;;AAEhB,CACF;AAEA,OAAO,cAAc"}
|
package/dist/Button/Button.d.cts
CHANGED
|
@@ -1,221 +1,9 @@
|
|
|
1
|
-
import { TVProps } from "@fuf-stack/pixel-utils";
|
|
1
|
+
import { TVProps, tv } from "@fuf-stack/pixel-utils";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ButtonProps } from "@heroui/button";
|
|
4
4
|
|
|
5
5
|
//#region src/Button/Button.d.ts
|
|
6
|
-
declare const buttonVariants:
|
|
7
|
-
color: {
|
|
8
|
-
info: string;
|
|
9
|
-
default: string;
|
|
10
|
-
primary: string;
|
|
11
|
-
secondary: string;
|
|
12
|
-
success: string;
|
|
13
|
-
warning: string;
|
|
14
|
-
danger: string;
|
|
15
|
-
};
|
|
16
|
-
variant: {
|
|
17
|
-
solid: string;
|
|
18
|
-
bordered: string;
|
|
19
|
-
light: string;
|
|
20
|
-
flat: string;
|
|
21
|
-
faded: string;
|
|
22
|
-
shadow: string;
|
|
23
|
-
ghost: string;
|
|
24
|
-
};
|
|
25
|
-
size: {
|
|
26
|
-
sm: string;
|
|
27
|
-
md: string;
|
|
28
|
-
lg: string;
|
|
29
|
-
};
|
|
30
|
-
}, undefined, undefined, {
|
|
31
|
-
variant: {
|
|
32
|
-
solid: string;
|
|
33
|
-
bordered: string;
|
|
34
|
-
light: string;
|
|
35
|
-
flat: string;
|
|
36
|
-
faded: string;
|
|
37
|
-
shadow: string;
|
|
38
|
-
ghost: string;
|
|
39
|
-
};
|
|
40
|
-
size: {
|
|
41
|
-
sm: string;
|
|
42
|
-
md: string;
|
|
43
|
-
lg: string;
|
|
44
|
-
};
|
|
45
|
-
color: {
|
|
46
|
-
default: string;
|
|
47
|
-
primary: string;
|
|
48
|
-
secondary: string;
|
|
49
|
-
success: string;
|
|
50
|
-
warning: string;
|
|
51
|
-
danger: string;
|
|
52
|
-
};
|
|
53
|
-
radius: {
|
|
54
|
-
none: string;
|
|
55
|
-
sm: string;
|
|
56
|
-
md: string;
|
|
57
|
-
lg: string;
|
|
58
|
-
full: string;
|
|
59
|
-
};
|
|
60
|
-
fullWidth: {
|
|
61
|
-
true: string;
|
|
62
|
-
};
|
|
63
|
-
isDisabled: {
|
|
64
|
-
true: string;
|
|
65
|
-
};
|
|
66
|
-
isInGroup: {
|
|
67
|
-
true: string;
|
|
68
|
-
};
|
|
69
|
-
isIconOnly: {
|
|
70
|
-
true: string;
|
|
71
|
-
false: string;
|
|
72
|
-
};
|
|
73
|
-
disableAnimation: {
|
|
74
|
-
true: string;
|
|
75
|
-
false: string;
|
|
76
|
-
};
|
|
77
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
78
|
-
variant: {
|
|
79
|
-
solid: string;
|
|
80
|
-
bordered: string;
|
|
81
|
-
light: string;
|
|
82
|
-
flat: string;
|
|
83
|
-
faded: string;
|
|
84
|
-
shadow: string;
|
|
85
|
-
ghost: string;
|
|
86
|
-
};
|
|
87
|
-
size: {
|
|
88
|
-
sm: string;
|
|
89
|
-
md: string;
|
|
90
|
-
lg: string;
|
|
91
|
-
};
|
|
92
|
-
color: {
|
|
93
|
-
default: string;
|
|
94
|
-
primary: string;
|
|
95
|
-
secondary: string;
|
|
96
|
-
success: string;
|
|
97
|
-
warning: string;
|
|
98
|
-
danger: string;
|
|
99
|
-
};
|
|
100
|
-
radius: {
|
|
101
|
-
none: string;
|
|
102
|
-
sm: string;
|
|
103
|
-
md: string;
|
|
104
|
-
lg: string;
|
|
105
|
-
full: string;
|
|
106
|
-
};
|
|
107
|
-
fullWidth: {
|
|
108
|
-
true: string;
|
|
109
|
-
};
|
|
110
|
-
isDisabled: {
|
|
111
|
-
true: string;
|
|
112
|
-
};
|
|
113
|
-
isInGroup: {
|
|
114
|
-
true: string;
|
|
115
|
-
};
|
|
116
|
-
isIconOnly: {
|
|
117
|
-
true: string;
|
|
118
|
-
false: string;
|
|
119
|
-
};
|
|
120
|
-
disableAnimation: {
|
|
121
|
-
true: string;
|
|
122
|
-
false: string;
|
|
123
|
-
};
|
|
124
|
-
}, undefined, string[], {
|
|
125
|
-
variant: {
|
|
126
|
-
solid: string;
|
|
127
|
-
bordered: string;
|
|
128
|
-
light: string;
|
|
129
|
-
flat: string;
|
|
130
|
-
faded: string;
|
|
131
|
-
shadow: string;
|
|
132
|
-
ghost: string;
|
|
133
|
-
};
|
|
134
|
-
size: {
|
|
135
|
-
sm: string;
|
|
136
|
-
md: string;
|
|
137
|
-
lg: string;
|
|
138
|
-
};
|
|
139
|
-
color: {
|
|
140
|
-
default: string;
|
|
141
|
-
primary: string;
|
|
142
|
-
secondary: string;
|
|
143
|
-
success: string;
|
|
144
|
-
warning: string;
|
|
145
|
-
danger: string;
|
|
146
|
-
};
|
|
147
|
-
radius: {
|
|
148
|
-
none: string;
|
|
149
|
-
sm: string;
|
|
150
|
-
md: string;
|
|
151
|
-
lg: string;
|
|
152
|
-
full: string;
|
|
153
|
-
};
|
|
154
|
-
fullWidth: {
|
|
155
|
-
true: string;
|
|
156
|
-
};
|
|
157
|
-
isDisabled: {
|
|
158
|
-
true: string;
|
|
159
|
-
};
|
|
160
|
-
isInGroup: {
|
|
161
|
-
true: string;
|
|
162
|
-
};
|
|
163
|
-
isIconOnly: {
|
|
164
|
-
true: string;
|
|
165
|
-
false: string;
|
|
166
|
-
};
|
|
167
|
-
disableAnimation: {
|
|
168
|
-
true: string;
|
|
169
|
-
false: string;
|
|
170
|
-
};
|
|
171
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
172
|
-
variant: {
|
|
173
|
-
solid: string;
|
|
174
|
-
bordered: string;
|
|
175
|
-
light: string;
|
|
176
|
-
flat: string;
|
|
177
|
-
faded: string;
|
|
178
|
-
shadow: string;
|
|
179
|
-
ghost: string;
|
|
180
|
-
};
|
|
181
|
-
size: {
|
|
182
|
-
sm: string;
|
|
183
|
-
md: string;
|
|
184
|
-
lg: string;
|
|
185
|
-
};
|
|
186
|
-
color: {
|
|
187
|
-
default: string;
|
|
188
|
-
primary: string;
|
|
189
|
-
secondary: string;
|
|
190
|
-
success: string;
|
|
191
|
-
warning: string;
|
|
192
|
-
danger: string;
|
|
193
|
-
};
|
|
194
|
-
radius: {
|
|
195
|
-
none: string;
|
|
196
|
-
sm: string;
|
|
197
|
-
md: string;
|
|
198
|
-
lg: string;
|
|
199
|
-
full: string;
|
|
200
|
-
};
|
|
201
|
-
fullWidth: {
|
|
202
|
-
true: string;
|
|
203
|
-
};
|
|
204
|
-
isDisabled: {
|
|
205
|
-
true: string;
|
|
206
|
-
};
|
|
207
|
-
isInGroup: {
|
|
208
|
-
true: string;
|
|
209
|
-
};
|
|
210
|
-
isIconOnly: {
|
|
211
|
-
true: string;
|
|
212
|
-
false: string;
|
|
213
|
-
};
|
|
214
|
-
disableAnimation: {
|
|
215
|
-
true: string;
|
|
216
|
-
false: string;
|
|
217
|
-
};
|
|
218
|
-
}, undefined, string[], unknown, unknown, undefined>>>;
|
|
6
|
+
declare const buttonVariants: ReturnType<typeof tv>;
|
|
219
7
|
type VariantProps = TVProps<typeof buttonVariants>;
|
|
220
8
|
interface ButtonProps$1 extends VariantProps {
|
|
221
9
|
/** sets HTML aria-label attribute */
|
|
@@ -256,7 +44,7 @@ interface ButtonProps$1 extends VariantProps {
|
|
|
256
44
|
/**
|
|
257
45
|
* Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)
|
|
258
46
|
*/
|
|
259
|
-
declare const Button: import("react").ForwardRefExoticComponent<ButtonProps$1 & import("react").RefAttributes<HTMLButtonElement>>;
|
|
47
|
+
declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps$1, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
260
48
|
//#endregion
|
|
261
49
|
export { Button, ButtonProps$1 as ButtonProps, buttonVariants };
|
|
262
50
|
//# sourceMappingURL=Button.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.cts","names":[],"sources":["../../src/Button/Button.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Button.d.cts","names":[],"sources":["../../src/Button/Button.tsx"],"mappings":";;;;;cAgBa,cAAA,EAAgB,UAAU,QAAQ,EAAA;AAAA,KAyE1C,YAAA,GAAe,OAAO,QAAQ,cAAA;AAAA,UAGlB,aAAA,SAAoB,YAAA;;EAEnC,SAAA;EA9E+C;EAgF/C,QAAA,GAAW,SAAA;EAPI;EASf,SAAA;EATkB;EAWlB,KAAA,GAAQ,YAAA;EARO;EAUf,QAAA;;EAEA,gBAAA;EAJQ;EAMR,OAAA;EAIS;EAFT,IAAA,GAAO,SAAA;EAMG;EAJV,MAAA,GAAS,WAAA;EAUF;EARP,OAAA,GAAU,WAAA;EApByB;EAsBnC,OAAA,GAAU,WAAA;EAtBqC;EAwB/C,MAAA,GAAS,YAAA;EAtBT;EAwBA,MAAA;EAtBW;EAwBX,IAAA,GAAO,YAAA;EApBP;EAsBA,MAAA;EApBA;EAsBA,IAAA;EAlBA;EAoBA,OAAA,GAAU,YAAA;AAAA;;;;cAON,MAAA,kBAAM,yBAAA,CAAA,IAAA,CAAA,aAAA,2BAAA,aAAA,CAAA,iBAAA"}
|
package/dist/Button/Button.d.ts
CHANGED
|
@@ -1,221 +1,9 @@
|
|
|
1
|
-
import { TVProps } from "@fuf-stack/pixel-utils";
|
|
1
|
+
import { TVProps, tv } from "@fuf-stack/pixel-utils";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { ButtonProps } from "@heroui/button";
|
|
4
4
|
|
|
5
5
|
//#region src/Button/Button.d.ts
|
|
6
|
-
declare const buttonVariants:
|
|
7
|
-
color: {
|
|
8
|
-
info: string;
|
|
9
|
-
default: string;
|
|
10
|
-
primary: string;
|
|
11
|
-
secondary: string;
|
|
12
|
-
success: string;
|
|
13
|
-
warning: string;
|
|
14
|
-
danger: string;
|
|
15
|
-
};
|
|
16
|
-
variant: {
|
|
17
|
-
solid: string;
|
|
18
|
-
bordered: string;
|
|
19
|
-
light: string;
|
|
20
|
-
flat: string;
|
|
21
|
-
faded: string;
|
|
22
|
-
shadow: string;
|
|
23
|
-
ghost: string;
|
|
24
|
-
};
|
|
25
|
-
size: {
|
|
26
|
-
sm: string;
|
|
27
|
-
md: string;
|
|
28
|
-
lg: string;
|
|
29
|
-
};
|
|
30
|
-
}, undefined, undefined, {
|
|
31
|
-
variant: {
|
|
32
|
-
solid: string;
|
|
33
|
-
bordered: string;
|
|
34
|
-
light: string;
|
|
35
|
-
flat: string;
|
|
36
|
-
faded: string;
|
|
37
|
-
shadow: string;
|
|
38
|
-
ghost: string;
|
|
39
|
-
};
|
|
40
|
-
size: {
|
|
41
|
-
sm: string;
|
|
42
|
-
md: string;
|
|
43
|
-
lg: string;
|
|
44
|
-
};
|
|
45
|
-
color: {
|
|
46
|
-
default: string;
|
|
47
|
-
primary: string;
|
|
48
|
-
secondary: string;
|
|
49
|
-
success: string;
|
|
50
|
-
warning: string;
|
|
51
|
-
danger: string;
|
|
52
|
-
};
|
|
53
|
-
radius: {
|
|
54
|
-
none: string;
|
|
55
|
-
sm: string;
|
|
56
|
-
md: string;
|
|
57
|
-
lg: string;
|
|
58
|
-
full: string;
|
|
59
|
-
};
|
|
60
|
-
fullWidth: {
|
|
61
|
-
true: string;
|
|
62
|
-
};
|
|
63
|
-
isDisabled: {
|
|
64
|
-
true: string;
|
|
65
|
-
};
|
|
66
|
-
isInGroup: {
|
|
67
|
-
true: string;
|
|
68
|
-
};
|
|
69
|
-
isIconOnly: {
|
|
70
|
-
true: string;
|
|
71
|
-
false: string;
|
|
72
|
-
};
|
|
73
|
-
disableAnimation: {
|
|
74
|
-
true: string;
|
|
75
|
-
false: string;
|
|
76
|
-
};
|
|
77
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
78
|
-
variant: {
|
|
79
|
-
solid: string;
|
|
80
|
-
bordered: string;
|
|
81
|
-
light: string;
|
|
82
|
-
flat: string;
|
|
83
|
-
faded: string;
|
|
84
|
-
shadow: string;
|
|
85
|
-
ghost: string;
|
|
86
|
-
};
|
|
87
|
-
size: {
|
|
88
|
-
sm: string;
|
|
89
|
-
md: string;
|
|
90
|
-
lg: string;
|
|
91
|
-
};
|
|
92
|
-
color: {
|
|
93
|
-
default: string;
|
|
94
|
-
primary: string;
|
|
95
|
-
secondary: string;
|
|
96
|
-
success: string;
|
|
97
|
-
warning: string;
|
|
98
|
-
danger: string;
|
|
99
|
-
};
|
|
100
|
-
radius: {
|
|
101
|
-
none: string;
|
|
102
|
-
sm: string;
|
|
103
|
-
md: string;
|
|
104
|
-
lg: string;
|
|
105
|
-
full: string;
|
|
106
|
-
};
|
|
107
|
-
fullWidth: {
|
|
108
|
-
true: string;
|
|
109
|
-
};
|
|
110
|
-
isDisabled: {
|
|
111
|
-
true: string;
|
|
112
|
-
};
|
|
113
|
-
isInGroup: {
|
|
114
|
-
true: string;
|
|
115
|
-
};
|
|
116
|
-
isIconOnly: {
|
|
117
|
-
true: string;
|
|
118
|
-
false: string;
|
|
119
|
-
};
|
|
120
|
-
disableAnimation: {
|
|
121
|
-
true: string;
|
|
122
|
-
false: string;
|
|
123
|
-
};
|
|
124
|
-
}, undefined, string[], {
|
|
125
|
-
variant: {
|
|
126
|
-
solid: string;
|
|
127
|
-
bordered: string;
|
|
128
|
-
light: string;
|
|
129
|
-
flat: string;
|
|
130
|
-
faded: string;
|
|
131
|
-
shadow: string;
|
|
132
|
-
ghost: string;
|
|
133
|
-
};
|
|
134
|
-
size: {
|
|
135
|
-
sm: string;
|
|
136
|
-
md: string;
|
|
137
|
-
lg: string;
|
|
138
|
-
};
|
|
139
|
-
color: {
|
|
140
|
-
default: string;
|
|
141
|
-
primary: string;
|
|
142
|
-
secondary: string;
|
|
143
|
-
success: string;
|
|
144
|
-
warning: string;
|
|
145
|
-
danger: string;
|
|
146
|
-
};
|
|
147
|
-
radius: {
|
|
148
|
-
none: string;
|
|
149
|
-
sm: string;
|
|
150
|
-
md: string;
|
|
151
|
-
lg: string;
|
|
152
|
-
full: string;
|
|
153
|
-
};
|
|
154
|
-
fullWidth: {
|
|
155
|
-
true: string;
|
|
156
|
-
};
|
|
157
|
-
isDisabled: {
|
|
158
|
-
true: string;
|
|
159
|
-
};
|
|
160
|
-
isInGroup: {
|
|
161
|
-
true: string;
|
|
162
|
-
};
|
|
163
|
-
isIconOnly: {
|
|
164
|
-
true: string;
|
|
165
|
-
false: string;
|
|
166
|
-
};
|
|
167
|
-
disableAnimation: {
|
|
168
|
-
true: string;
|
|
169
|
-
false: string;
|
|
170
|
-
};
|
|
171
|
-
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
172
|
-
variant: {
|
|
173
|
-
solid: string;
|
|
174
|
-
bordered: string;
|
|
175
|
-
light: string;
|
|
176
|
-
flat: string;
|
|
177
|
-
faded: string;
|
|
178
|
-
shadow: string;
|
|
179
|
-
ghost: string;
|
|
180
|
-
};
|
|
181
|
-
size: {
|
|
182
|
-
sm: string;
|
|
183
|
-
md: string;
|
|
184
|
-
lg: string;
|
|
185
|
-
};
|
|
186
|
-
color: {
|
|
187
|
-
default: string;
|
|
188
|
-
primary: string;
|
|
189
|
-
secondary: string;
|
|
190
|
-
success: string;
|
|
191
|
-
warning: string;
|
|
192
|
-
danger: string;
|
|
193
|
-
};
|
|
194
|
-
radius: {
|
|
195
|
-
none: string;
|
|
196
|
-
sm: string;
|
|
197
|
-
md: string;
|
|
198
|
-
lg: string;
|
|
199
|
-
full: string;
|
|
200
|
-
};
|
|
201
|
-
fullWidth: {
|
|
202
|
-
true: string;
|
|
203
|
-
};
|
|
204
|
-
isDisabled: {
|
|
205
|
-
true: string;
|
|
206
|
-
};
|
|
207
|
-
isInGroup: {
|
|
208
|
-
true: string;
|
|
209
|
-
};
|
|
210
|
-
isIconOnly: {
|
|
211
|
-
true: string;
|
|
212
|
-
false: string;
|
|
213
|
-
};
|
|
214
|
-
disableAnimation: {
|
|
215
|
-
true: string;
|
|
216
|
-
false: string;
|
|
217
|
-
};
|
|
218
|
-
}, undefined, string[], unknown, unknown, undefined>>>;
|
|
6
|
+
declare const buttonVariants: ReturnType<typeof tv>;
|
|
219
7
|
type VariantProps = TVProps<typeof buttonVariants>;
|
|
220
8
|
interface ButtonProps$1 extends VariantProps {
|
|
221
9
|
/** sets HTML aria-label attribute */
|
|
@@ -256,7 +44,7 @@ interface ButtonProps$1 extends VariantProps {
|
|
|
256
44
|
/**
|
|
257
45
|
* Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)
|
|
258
46
|
*/
|
|
259
|
-
declare const Button$1: import("react").ForwardRefExoticComponent<ButtonProps$1 & import("react").RefAttributes<HTMLButtonElement>>;
|
|
47
|
+
declare const Button$1: import("react").ForwardRefExoticComponent<Omit<ButtonProps$1, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
260
48
|
//#endregion
|
|
261
49
|
export { Button$1 as Button, ButtonProps$1 as ButtonProps, buttonVariants };
|
|
262
50
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../src/Button/Button.tsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","names":[],"sources":["../../src/Button/Button.tsx"],"mappings":";;;;;cAgBa,cAAA,EAAgB,UAAU,QAAQ,EAAA;AAAA,KAyE1C,YAAA,GAAe,OAAO,QAAQ,cAAA;AAAA,UAGlB,aAAA,SAAoB,YAAA;;EAEnC,SAAA;EA9E+C;EAgF/C,QAAA,GAAW,SAAA;EAPI;EASf,SAAA;EATkB;EAWlB,KAAA,GAAQ,YAAA;EARO;EAUf,QAAA;;EAEA,gBAAA;EAJQ;EAMR,OAAA;EAIS;EAFT,IAAA,GAAO,SAAA;EAMG;EAJV,MAAA,GAAS,WAAA;EAUF;EARP,OAAA,GAAU,WAAA;EApByB;EAsBnC,OAAA,GAAU,WAAA;EAtBqC;EAwB/C,MAAA,GAAS,YAAA;EAtBT;EAwBA,MAAA;EAtBW;EAwBX,IAAA,GAAO,YAAA;EApBP;EAsBA,MAAA;EApBA;EAsBA,IAAA;EAlBA;EAoBA,OAAA,GAAU,YAAA;AAAA;;;;cAON,QAAA,kBAAM,yBAAA,CAAA,IAAA,CAAA,aAAA,2BAAA,aAAA,CAAA,iBAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["heroButtonVariants","Button","HeroButton"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n extend: heroButtonVariants,\n variants: {\n color: {\n ...heroButtonVariants.variants.color,\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'success',\n variant: 'shadow',\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'warning',\n variant: 'shadow',\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'shadow-info/40 bg-info text-info-foreground shadow-lg',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\n/* eslint-disable react/require-default-props -- not working with forwardRef */\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: VariantProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** blur event handler */\n onBlur?: HeroButtonProps['onBlur'];\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** focus event handler */\n onFocus?: HeroButtonProps['onFocus'];\n /** border radius size */\n radius?: VariantProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: VariantProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: VariantProps['variant'];\n}\n/* eslint-enable react/require-default-props */\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n ariaLabel = undefined,\n children = undefined,\n className: _className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onBlur = undefined,\n onClick = undefined,\n onFocus = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n },\n ref,\n ) => {\n const className = buttonVariants({\n className: _className,\n disableAnimation,\n isDisabled: disabled,\n color,\n size,\n variant,\n isIconOnly: !!(icon && !children),\n radius,\n });\n\n return (\n <HeroButton\n ref={ref}\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isLoading={loading}\n onBlur={onBlur}\n onFocus={onFocus}\n onPress={onClick}\n spinner={<LoadingSpinner />}\n type={type}\n >\n {icon}\n {children}\n </HeroButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"Button.js","names":["heroButtonVariants","Button","HeroButton"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\n// TODO: `tv(...)` inference here triggers TS2742/TS2883 during declaration emit\n// (non-portable `tailwind-variants` type path). Keep this explicit annotation\n// until we have a portable `tv` return type strategy.\nexport const buttonVariants: ReturnType<typeof tv> = tv({\n extend: heroButtonVariants,\n variants: {\n color: {\n ...heroButtonVariants.variants.color,\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'success',\n variant: 'shadow',\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'warning',\n variant: 'shadow',\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'shadow-info/40 bg-info text-info-foreground shadow-lg',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\n/* eslint-disable react/require-default-props -- not working with forwardRef */\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: VariantProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** blur event handler */\n onBlur?: HeroButtonProps['onBlur'];\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** focus event handler */\n onFocus?: HeroButtonProps['onFocus'];\n /** border radius size */\n radius?: VariantProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: VariantProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: VariantProps['variant'];\n}\n/* eslint-enable react/require-default-props */\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n ariaLabel = undefined,\n children = undefined,\n className: _className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onBlur = undefined,\n onClick = undefined,\n onFocus = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n },\n ref,\n ) => {\n const className = buttonVariants({\n className: _className,\n disableAnimation,\n isDisabled: disabled,\n color,\n size,\n variant,\n isIconOnly: !!(icon && !children),\n radius,\n });\n\n return (\n <HeroButton\n ref={ref}\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isLoading={loading}\n onBlur={onBlur}\n onFocus={onFocus}\n onPress={onClick}\n spinner={<LoadingSpinner />}\n type={type}\n >\n {icon}\n {children}\n </HeroButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"mappings":";;;;;;;AAgBA,MAAa,iBAAwC,GAAG;CACtD,QAAQA;CACR,UAAU;EACR,OAAO;GACL,GAAGA,OAAmB,SAAS;GAE/B,MAAM;EACR;EACA,SAASA,OAAmB,SAAS;EACrC,MAAMA,OAAmB,SAAS;CACpC;CACA,kBAAkB;EAEhB;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EAEA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OAAO;EACT;EACA;GACE,OAAO;GACP,SAAS;GACT,OACE;EACJ;CACF;AACF,CAAC;;;;AA8CD,MAAMC,WAAS,YAEX,EACE,YAAY,KAAA,GACZ,WAAW,KAAA,GACX,WAAW,aAAa,KAAA,GACxB,QAAQ,WACR,mBAAmB,OACnB,WAAW,OACX,OAAO,KAAA,GACP,UAAU,OACV,SAAS,KAAA,GACT,UAAU,KAAA,GACV,UAAU,KAAA,GACV,SAAS,KAAA,GACT,SAAS,OACT,OAAO,KAAA,GACP,SAAS,KAAA,GACT,OAAO,KAAA,GACP,UAAU,WAEZ,QACG;CAYH,OACE,qBAACC,QAAD;EACO;EACL,cAAY;EACZ,WAfc,eAAe;GAC/B,WAAW;GACX;GACA,YAAY;GACZ;GACA;GACA;GACA,YAAY,CAAC,EAAE,QAAQ,CAAC;GACxB;EACF,CAMuB;EACnB,eAAa;EACb,eAAe,oBAAoB,CAAC;EACpC,YAAY;EACZ,WAAW;EACH;EACC;EACT,SAAS;EACT,SAAS,oBAAC,gBAAD,CAAiB,CAAA;EACpB;YAZR,CAcG,MACA,QACS;;AAEhB,CACF;AAEA,SAAO,cAAc"}
|