@open-pioneer/chakra-snippets 4.0.0 → 4.1.0-dev.20250818125237
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/CHANGELOG.md +15 -0
- package/alert.js.map +1 -1
- package/avatar.js.map +1 -1
- package/blockquote.js.map +1 -1
- package/breadcrumb.js.map +1 -1
- package/checkbox-card.js.map +1 -1
- package/checkbox.d.ts +1 -1
- package/checkbox.js.map +1 -1
- package/clipboard.js.map +1 -1
- package/close-button.js.map +1 -1
- package/data-list.js.map +1 -1
- package/empty-state.js.map +1 -1
- package/field.js.map +1 -1
- package/input-group.js.map +1 -1
- package/link-button.js.map +1 -1
- package/native-select.d.ts +2 -2
- package/native-select.js.map +1 -1
- package/number-input.js.map +1 -1
- package/package.json +5 -5
- package/password-input.d.ts +12 -0
- package/password-input.js +1 -1
- package/password-input.js.map +1 -1
- package/pin-input.d.ts +1 -1
- package/pin-input.js.map +1 -1
- package/prose.js +59 -49
- package/prose.js.map +1 -1
- package/qr-code.js.map +1 -1
- package/radio-card.js.map +1 -1
- package/radio.d.ts +1 -1
- package/radio.js.map +1 -1
- package/rating.js.map +1 -1
- package/slider.js.map +1 -1
- package/status.js.map +1 -1
- package/stepper-input.js.map +1 -1
- package/switch.d.ts +1 -1
- package/switch.js.map +1 -1
- package/tag.js.map +1 -1
- package/toggle-tip.d.ts +5 -2
- package/toggle-tip.js +16 -13
- package/toggle-tip.js.map +1 -1
- package/toggle.js.map +1 -1
- package/tooltip.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @open-pioneer/chakra-snippets
|
|
2
2
|
|
|
3
|
+
## 4.1.0-dev.20250818125237
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b7a854d: Update dependencies
|
|
8
|
+
- 3881d08: - Update Chakra UI from 3.22.0 to 3.24.2
|
|
9
|
+
- Update to latest Chakra snippets
|
|
10
|
+
- adf277b: Update dependencies
|
|
11
|
+
- Updated dependencies [b7a854d]
|
|
12
|
+
- Updated dependencies [3881d08]
|
|
13
|
+
- Updated dependencies [2da02e7]
|
|
14
|
+
- Updated dependencies [adf277b]
|
|
15
|
+
- @open-pioneer/core@4.1.0-dev.20250818125237
|
|
16
|
+
- @open-pioneer/runtime@4.1.0-dev.20250818125237
|
|
17
|
+
|
|
3
18
|
## 4.0.0
|
|
4
19
|
|
|
5
20
|
### Major Changes
|
package/alert.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","sources":["alert.tsx"],"sourcesContent":["import { Alert as ChakraAlert } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface AlertProps extends Omit<ChakraAlert.RootProps, \"title\"> {\n startElement?: React.ReactNode\n endElement?: React.ReactNode\n title?: React.ReactNode\n icon?: React.ReactElement\n}\n\nexport const Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n function Alert(props, ref) {\n const { title, children, icon, startElement, endElement, ...rest } = props\n return (\n <ChakraAlert.Root ref={ref} {...rest}>\n {startElement || <ChakraAlert.Indicator>{icon}</ChakraAlert.Indicator>}\n {children ? (\n <ChakraAlert.Content>\n <ChakraAlert.Title>{title}</ChakraAlert.Title>\n <ChakraAlert.Description>{children}</ChakraAlert.Description>\n </ChakraAlert.Content>\n ) : (\n <ChakraAlert.Title flex=\"1\">{title}</ChakraAlert.Title>\n )}\n {endElement}\n </ChakraAlert.Root>\n )\n },\n)\n"],"names":["Alert","ChakraAlert"],"mappings":";;;;AAUO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"alert.js","sources":["alert.tsx"],"sourcesContent":["import { Alert as ChakraAlert } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface AlertProps extends Omit<ChakraAlert.RootProps, \"title\"> {\n startElement?: React.ReactNode\n endElement?: React.ReactNode\n title?: React.ReactNode\n icon?: React.ReactElement\n}\n\nexport const Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n function Alert(props, ref) {\n const { title, children, icon, startElement, endElement, ...rest } = props\n return (\n <ChakraAlert.Root ref={ref} {...rest}>\n {startElement || <ChakraAlert.Indicator>{icon}</ChakraAlert.Indicator>}\n {children ? (\n <ChakraAlert.Content>\n <ChakraAlert.Title>{title}</ChakraAlert.Title>\n <ChakraAlert.Description>{children}</ChakraAlert.Description>\n </ChakraAlert.Content>\n ) : (\n <ChakraAlert.Title flex=\"1\">{title}</ChakraAlert.Title>\n )}\n {endElement}\n </ChakraAlert.Root>\n )\n },\n)\n"],"names":["Alert","ChakraAlert"],"mappings":";;;;AAUO,MAAM,QAAQ,KAAA,CAAM,UAAA;AAAA,EACzB,SAASA,MAAAA,CAAM,KAAA,EAAO,GAAA,EAAK;AACzB,IAAA,MAAM,EAAE,OAAO,QAAA,EAAU,IAAA,EAAM,cAAc,UAAA,EAAY,GAAG,MAAK,GAAI,KAAA;AACrE,IAAA,4BACGC,OAAA,CAAY,IAAA,EAAZ,EAAiB,GAAA,EAAW,GAAG,IAAA,EAC7B,QAAA,EAAA;AAAA,MAAA,YAAA,oBAAgB,GAAA,CAACA,OAAA,CAAY,SAAA,EAAZ,EAAuB,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,MAC7C,QAAA,mBACC,IAAA,CAACA,OAAA,CAAY,OAAA,EAAZ,EACC,QAAA,EAAA;AAAA,wBAAA,GAAA,CAACA,OAAA,CAAY,KAAA,EAAZ,EAAmB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,wBAC1B,GAAA,CAACA,OAAA,CAAY,WAAA,EAAZ,EAAyB,QAAA,EAAS;AAAA,OAAA,EACrC,oBAEA,GAAA,CAACA,OAAA,CAAY,OAAZ,EAAkB,IAAA,EAAK,KAAK,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAEpC;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","sources":["avatar.tsx"],"sourcesContent":["import {\n Avatar as ChakraAvatar,\n AvatarGroup as ChakraAvatarGroup,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ntype ImageProps = React.ImgHTMLAttributes<HTMLImageElement>\n\nexport interface AvatarProps extends ChakraAvatar.RootProps {\n name?: string\n src?: string\n srcSet?: string\n loading?: ImageProps[\"loading\"]\n icon?: React.ReactElement\n fallback?: React.ReactNode\n}\n\nexport const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(\n function Avatar(props, ref) {\n const { name, src, srcSet, loading, icon, fallback, children, ...rest } =\n props\n return (\n <ChakraAvatar.Root ref={ref} {...rest}>\n <ChakraAvatar.Fallback name={name}>\n {icon || fallback}\n </ChakraAvatar.Fallback>\n <ChakraAvatar.Image src={src} srcSet={srcSet} loading={loading} />\n {children}\n </ChakraAvatar.Root>\n )\n },\n)\n\nexport const AvatarGroup = ChakraAvatarGroup\n"],"names":["Avatar","ChakraAvatar","ChakraAvatarGroup"],"mappings":";;;;AAiBO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"avatar.js","sources":["avatar.tsx"],"sourcesContent":["import {\n Avatar as ChakraAvatar,\n AvatarGroup as ChakraAvatarGroup,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ntype ImageProps = React.ImgHTMLAttributes<HTMLImageElement>\n\nexport interface AvatarProps extends ChakraAvatar.RootProps {\n name?: string\n src?: string\n srcSet?: string\n loading?: ImageProps[\"loading\"]\n icon?: React.ReactElement\n fallback?: React.ReactNode\n}\n\nexport const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(\n function Avatar(props, ref) {\n const { name, src, srcSet, loading, icon, fallback, children, ...rest } =\n props\n return (\n <ChakraAvatar.Root ref={ref} {...rest}>\n <ChakraAvatar.Fallback name={name}>\n {icon || fallback}\n </ChakraAvatar.Fallback>\n <ChakraAvatar.Image src={src} srcSet={srcSet} loading={loading} />\n {children}\n </ChakraAvatar.Root>\n )\n },\n)\n\nexport const AvatarGroup = ChakraAvatarGroup\n"],"names":["Avatar","ChakraAvatar","ChakraAvatarGroup"],"mappings":";;;;AAiBO,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EAC1B,SAASA,OAAAA,CAAO,KAAA,EAAO,GAAA,EAAK;AAC1B,IAAA,MAAM,EAAE,IAAA,EAAM,GAAA,EAAK,MAAA,EAAQ,OAAA,EAAS,MAAM,QAAA,EAAU,QAAA,EAAU,GAAG,IAAA,EAAK,GACpE,KAAA;AACF,IAAA,4BACGC,QAAA,CAAa,IAAA,EAAb,EAAkB,GAAA,EAAW,GAAG,IAAA,EAC/B,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,QAAA,CAAa,QAAA,EAAb,EAAsB,IAAA,EACpB,kBAAQ,QAAA,EACX,CAAA;AAAA,0BACCA,QAAA,CAAa,KAAA,EAAb,EAAmB,GAAA,EAAU,QAAgB,OAAA,EAAkB,CAAA;AAAA,MAC/D;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;AAEO,MAAM,WAAA,GAAcC;;;;"}
|
package/blockquote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.js","sources":["blockquote.tsx"],"sourcesContent":["import { Blockquote as ChakraBlockquote } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface BlockquoteProps extends ChakraBlockquote.RootProps {\n cite?: React.ReactNode\n citeUrl?: string\n icon?: React.ReactNode\n showDash?: boolean\n}\n\nexport const Blockquote = React.forwardRef<HTMLDivElement, BlockquoteProps>(\n function Blockquote(props, ref) {\n const { children, cite, citeUrl, showDash, icon, ...rest } = props\n\n return (\n <ChakraBlockquote.Root ref={ref} {...rest}>\n {icon}\n <ChakraBlockquote.Content cite={citeUrl}>\n {children}\n </ChakraBlockquote.Content>\n {cite && (\n <ChakraBlockquote.Caption>\n {showDash ? <>—</> : null} <cite>{cite}</cite>\n </ChakraBlockquote.Caption>\n )}\n </ChakraBlockquote.Root>\n )\n },\n)\n\nexport const BlockquoteIcon = ChakraBlockquote.Icon\n"],"names":["Blockquote","ChakraBlockquote"],"mappings":";;;;AAUO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"blockquote.js","sources":["blockquote.tsx"],"sourcesContent":["import { Blockquote as ChakraBlockquote } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface BlockquoteProps extends ChakraBlockquote.RootProps {\n cite?: React.ReactNode\n citeUrl?: string\n icon?: React.ReactNode\n showDash?: boolean\n}\n\nexport const Blockquote = React.forwardRef<HTMLDivElement, BlockquoteProps>(\n function Blockquote(props, ref) {\n const { children, cite, citeUrl, showDash, icon, ...rest } = props\n\n return (\n <ChakraBlockquote.Root ref={ref} {...rest}>\n {icon}\n <ChakraBlockquote.Content cite={citeUrl}>\n {children}\n </ChakraBlockquote.Content>\n {cite && (\n <ChakraBlockquote.Caption>\n {showDash ? <>—</> : null} <cite>{cite}</cite>\n </ChakraBlockquote.Caption>\n )}\n </ChakraBlockquote.Root>\n )\n },\n)\n\nexport const BlockquoteIcon = ChakraBlockquote.Icon\n"],"names":["Blockquote","ChakraBlockquote"],"mappings":";;;;AAUO,MAAM,aAAa,KAAA,CAAM,UAAA;AAAA,EAC9B,SAASA,WAAAA,CAAW,KAAA,EAAO,GAAA,EAAK;AAC9B,IAAA,MAAM,EAAE,UAAU,IAAA,EAAM,OAAA,EAAS,UAAU,IAAA,EAAM,GAAG,MAAK,GAAI,KAAA;AAE7D,IAAA,4BACGC,YAAA,CAAiB,IAAA,EAAjB,EAAsB,GAAA,EAAW,GAAG,IAAA,EAClC,QAAA,EAAA;AAAA,MAAA,IAAA;AAAA,0BACAA,YAAA,CAAiB,OAAA,EAAjB,EAAyB,IAAA,EAAM,SAC7B,QAAA,EACH,CAAA;AAAA,MACC,IAAA,oBACC,IAAA,CAACA,YAAA,CAAiB,OAAA,EAAjB,EACE,QAAA,EAAA;AAAA,QAAA,QAAA,mBAAW,GAAA,CAAA,QAAA,EAAA,EAAE,oBAAO,CAAA,GAAM,IAAA;AAAA,QAAK,GAAA;AAAA,wBAAC,GAAA,CAAC,UAAM,QAAA,EAAA,IAAA,EAAK;AAAA,OAAA,EAC/C;AAAA,KAAA,EAEJ,CAAA;AAAA,EAEJ;AACF;AAEO,MAAM,iBAAiBA,YAAA,CAAiB;;;;"}
|
package/breadcrumb.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumb.js","sources":["breadcrumb.tsx"],"sourcesContent":["import { Breadcrumb, type SystemStyleObject } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface BreadcrumbRootProps extends Breadcrumb.RootProps {\n separator?: React.ReactNode\n separatorGap?: SystemStyleObject[\"gap\"]\n}\n\nexport const BreadcrumbRoot = React.forwardRef<\n HTMLDivElement,\n BreadcrumbRootProps\n>(function BreadcrumbRoot(props, ref) {\n const { separator, separatorGap, children, ...rest } = props\n\n const validChildren = React.Children.toArray(children).filter(\n React.isValidElement,\n )\n\n return (\n <Breadcrumb.Root ref={ref} {...rest}>\n <Breadcrumb.List gap={separatorGap}>\n {validChildren.map((child, index) => {\n const last = index === validChildren.length - 1\n return (\n <React.Fragment key={index}>\n <Breadcrumb.Item>{child}</Breadcrumb.Item>\n {!last && (\n <Breadcrumb.Separator>{separator}</Breadcrumb.Separator>\n )}\n </React.Fragment>\n )\n })}\n </Breadcrumb.List>\n </Breadcrumb.Root>\n )\n})\n\nexport const BreadcrumbLink = Breadcrumb.Link\nexport const BreadcrumbCurrentLink = Breadcrumb.CurrentLink\nexport const BreadcrumbEllipsis = Breadcrumb.Ellipsis\n"],"names":["BreadcrumbRoot"],"mappings":";;;;AAQO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"breadcrumb.js","sources":["breadcrumb.tsx"],"sourcesContent":["import { Breadcrumb, type SystemStyleObject } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface BreadcrumbRootProps extends Breadcrumb.RootProps {\n separator?: React.ReactNode\n separatorGap?: SystemStyleObject[\"gap\"]\n}\n\nexport const BreadcrumbRoot = React.forwardRef<\n HTMLDivElement,\n BreadcrumbRootProps\n>(function BreadcrumbRoot(props, ref) {\n const { separator, separatorGap, children, ...rest } = props\n\n const validChildren = React.Children.toArray(children).filter(\n React.isValidElement,\n )\n\n return (\n <Breadcrumb.Root ref={ref} {...rest}>\n <Breadcrumb.List gap={separatorGap}>\n {validChildren.map((child, index) => {\n const last = index === validChildren.length - 1\n return (\n <React.Fragment key={index}>\n <Breadcrumb.Item>{child}</Breadcrumb.Item>\n {!last && (\n <Breadcrumb.Separator>{separator}</Breadcrumb.Separator>\n )}\n </React.Fragment>\n )\n })}\n </Breadcrumb.List>\n </Breadcrumb.Root>\n )\n})\n\nexport const BreadcrumbLink = Breadcrumb.Link\nexport const BreadcrumbCurrentLink = Breadcrumb.CurrentLink\nexport const BreadcrumbEllipsis = Breadcrumb.Ellipsis\n"],"names":["BreadcrumbRoot"],"mappings":";;;;AAQO,MAAM,iBAAiB,KAAA,CAAM,UAAA,CAGlC,SAASA,eAAAA,CAAe,OAAO,GAAA,EAAK;AACpC,EAAA,MAAM,EAAE,SAAA,EAAW,YAAA,EAAc,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AAEvD,EAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA,CAAE,MAAA;AAAA,IACrD,KAAA,CAAM;AAAA,GACR;AAEA,EAAA,2BACG,UAAA,CAAW,IAAA,EAAX,EAAgB,GAAA,EAAW,GAAG,IAAA,EAC7B,QAAA,kBAAA,GAAA,CAAC,UAAA,CAAW,IAAA,EAAX,EAAgB,GAAA,EAAK,YAAA,EACnB,wBAAc,GAAA,CAAI,CAAC,OAAO,KAAA,KAAU;AACnC,IAAA,MAAM,IAAA,GAAO,KAAA,KAAU,aAAA,CAAc,MAAA,GAAS,CAAA;AAC9C,IAAA,uBACE,IAAA,CAAC,KAAA,CAAM,QAAA,EAAN,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,UAAA,CAAW,IAAA,EAAX,EAAiB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MACvB,CAAC,IAAA,oBACA,GAAA,CAAC,UAAA,CAAW,SAAA,EAAX,EAAsB,QAAA,EAAA,SAAA,EAAU;AAAA,KAAA,EAAA,EAHhB,KAKrB,CAAA;AAAA,EAEJ,CAAC,GACH,CAAA,EACF,CAAA;AAEJ,CAAC;AAEM,MAAM,iBAAiB,UAAA,CAAW;AAClC,MAAM,wBAAwB,UAAA,CAAW;AACzC,MAAM,qBAAqB,UAAA,CAAW;;;;"}
|
package/checkbox-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-card.js","sources":["checkbox-card.tsx"],"sourcesContent":["import { CheckboxCard as ChakraCheckboxCard } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface CheckboxCardProps extends ChakraCheckboxCard.RootProps {\n icon?: React.ReactElement\n label?: React.ReactNode\n description?: React.ReactNode\n addon?: React.ReactNode\n indicator?: React.ReactNode | null\n indicatorPlacement?: \"start\" | \"end\" | \"inside\"\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n}\n\nexport const CheckboxCard = React.forwardRef<\n HTMLInputElement,\n CheckboxCardProps\n>(function CheckboxCard(props, ref) {\n const {\n inputProps,\n label,\n description,\n icon,\n addon,\n indicator = <ChakraCheckboxCard.Indicator />,\n indicatorPlacement = \"end\",\n ...rest\n } = props\n\n const hasContent = label || description || icon\n const ContentWrapper = indicator ? ChakraCheckboxCard.Content : React.Fragment\n\n return (\n <ChakraCheckboxCard.Root {...rest}>\n <ChakraCheckboxCard.HiddenInput ref={ref} {...inputProps} />\n <ChakraCheckboxCard.Control>\n {indicatorPlacement === \"start\" && indicator}\n {hasContent && (\n <ContentWrapper>\n {icon}\n {label && (\n <ChakraCheckboxCard.Label>{label}</ChakraCheckboxCard.Label>\n )}\n {description && (\n <ChakraCheckboxCard.Description>\n {description}\n </ChakraCheckboxCard.Description>\n )}\n {indicatorPlacement === \"inside\" && indicator}\n </ContentWrapper>\n )}\n {indicatorPlacement === \"end\" && indicator}\n </ChakraCheckboxCard.Control>\n {addon && <ChakraCheckboxCard.Addon>{addon}</ChakraCheckboxCard.Addon>}\n </ChakraCheckboxCard.Root>\n )\n})\n\nexport const CheckboxCardIndicator = ChakraCheckboxCard.Indicator\n"],"names":["CheckboxCard","ChakraCheckboxCard"],"mappings":";;;;AAaO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"checkbox-card.js","sources":["checkbox-card.tsx"],"sourcesContent":["import { CheckboxCard as ChakraCheckboxCard } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface CheckboxCardProps extends ChakraCheckboxCard.RootProps {\n icon?: React.ReactElement\n label?: React.ReactNode\n description?: React.ReactNode\n addon?: React.ReactNode\n indicator?: React.ReactNode | null\n indicatorPlacement?: \"start\" | \"end\" | \"inside\"\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n}\n\nexport const CheckboxCard = React.forwardRef<\n HTMLInputElement,\n CheckboxCardProps\n>(function CheckboxCard(props, ref) {\n const {\n inputProps,\n label,\n description,\n icon,\n addon,\n indicator = <ChakraCheckboxCard.Indicator />,\n indicatorPlacement = \"end\",\n ...rest\n } = props\n\n const hasContent = label || description || icon\n const ContentWrapper = indicator ? ChakraCheckboxCard.Content : React.Fragment\n\n return (\n <ChakraCheckboxCard.Root {...rest}>\n <ChakraCheckboxCard.HiddenInput ref={ref} {...inputProps} />\n <ChakraCheckboxCard.Control>\n {indicatorPlacement === \"start\" && indicator}\n {hasContent && (\n <ContentWrapper>\n {icon}\n {label && (\n <ChakraCheckboxCard.Label>{label}</ChakraCheckboxCard.Label>\n )}\n {description && (\n <ChakraCheckboxCard.Description>\n {description}\n </ChakraCheckboxCard.Description>\n )}\n {indicatorPlacement === \"inside\" && indicator}\n </ContentWrapper>\n )}\n {indicatorPlacement === \"end\" && indicator}\n </ChakraCheckboxCard.Control>\n {addon && <ChakraCheckboxCard.Addon>{addon}</ChakraCheckboxCard.Addon>}\n </ChakraCheckboxCard.Root>\n )\n})\n\nexport const CheckboxCardIndicator = ChakraCheckboxCard.Indicator\n"],"names":["CheckboxCard","ChakraCheckboxCard"],"mappings":";;;;AAaO,MAAM,eAAe,KAAA,CAAM,UAAA,CAGhC,SAASA,aAAAA,CAAa,OAAO,GAAA,EAAK;AAClC,EAAA,MAAM;AAAA,IACJ,UAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAA,mBAAY,GAAA,CAACC,cAAA,CAAmB,SAAA,EAAnB,EAA6B,CAAA;AAAA,IAC1C,kBAAA,GAAqB,KAAA;AAAA,IACrB,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,UAAA,GAAa,SAAS,WAAA,IAAe,IAAA;AAC3C,EAAA,MAAM,cAAA,GAAiB,SAAA,GAAYA,cAAA,CAAmB,OAAA,GAAU,KAAA,CAAM,QAAA;AAEtE,EAAA,uBACE,IAAA,CAACA,cAAA,CAAmB,IAAA,EAAnB,EAAyB,GAAG,IAAA,EAC3B,QAAA,EAAA;AAAA,oBAAA,GAAA,CAACA,cAAA,CAAmB,WAAA,EAAnB,EAA+B,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,oBAC1D,IAAA,CAACA,cAAA,CAAmB,OAAA,EAAnB,EACE,QAAA,EAAA;AAAA,MAAA,kBAAA,KAAuB,OAAA,IAAW,SAAA;AAAA,MAClC,UAAA,yBACE,cAAA,EAAA,EACE,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,QACA,KAAA,oBACC,GAAA,CAACA,cAAA,CAAmB,KAAA,EAAnB,EAA0B,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,QAElC,WAAA,oBACC,GAAA,CAACA,cAAA,CAAmB,WAAA,EAAnB,EACE,QAAA,EAAA,WAAA,EACH,CAAA;AAAA,QAED,uBAAuB,QAAA,IAAY;AAAA,OAAA,EACtC,CAAA;AAAA,MAED,uBAAuB,KAAA,IAAS;AAAA,KAAA,EACnC,CAAA;AAAA,IACC,KAAA,oBAAS,GAAA,CAACA,cAAA,CAAmB,KAAA,EAAnB,EAA0B,QAAA,EAAA,KAAA,EAAM;AAAA,GAAA,EAC7C,CAAA;AAEJ,CAAC;AAEM,MAAM,wBAAwBA,cAAA,CAAmB;;;;"}
|
package/checkbox.d.ts
CHANGED
|
@@ -3,6 +3,6 @@ import * as React from "react";
|
|
|
3
3
|
export interface CheckboxProps extends ChakraCheckbox.RootProps {
|
|
4
4
|
icon?: React.ReactNode;
|
|
5
5
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
|
-
rootRef?: React.
|
|
6
|
+
rootRef?: React.RefObject<HTMLLabelElement | null>;
|
|
7
7
|
}
|
|
8
8
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
package/checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["checkbox.tsx"],"sourcesContent":["import { Checkbox as ChakraCheckbox } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface CheckboxProps extends ChakraCheckbox.RootProps {\n icon?: React.ReactNode\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n rootRef?: React.
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["checkbox.tsx"],"sourcesContent":["import { Checkbox as ChakraCheckbox } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface CheckboxProps extends ChakraCheckbox.RootProps {\n icon?: React.ReactNode\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n rootRef?: React.RefObject<HTMLLabelElement | null>\n}\n\nexport const Checkbox = React.forwardRef<HTMLInputElement, CheckboxProps>(\n function Checkbox(props, ref) {\n const { icon, children, inputProps, rootRef, ...rest } = props\n return (\n <ChakraCheckbox.Root ref={rootRef} {...rest}>\n <ChakraCheckbox.HiddenInput ref={ref} {...inputProps} />\n <ChakraCheckbox.Control>\n {icon || <ChakraCheckbox.Indicator />}\n </ChakraCheckbox.Control>\n {children != null && (\n <ChakraCheckbox.Label>{children}</ChakraCheckbox.Label>\n )}\n </ChakraCheckbox.Root>\n )\n },\n)\n"],"names":["Checkbox","ChakraCheckbox"],"mappings":";;;;AASO,MAAM,WAAW,KAAA,CAAM,UAAA;AAAA,EAC5B,SAASA,SAAAA,CAAS,KAAA,EAAO,GAAA,EAAK;AAC5B,IAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAU,YAAY,OAAA,EAAS,GAAG,MAAK,GAAI,KAAA;AACzD,IAAA,4BACGC,UAAA,CAAe,IAAA,EAAf,EAAoB,GAAA,EAAK,OAAA,EAAU,GAAG,IAAA,EACrC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,UAAA,CAAe,WAAA,EAAf,EAA2B,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,sBACtD,GAAA,CAACA,WAAe,OAAA,EAAf,EACE,kCAAQ,GAAA,CAACA,UAAA,CAAe,SAAA,EAAf,EAAyB,CAAA,EACrC,CAAA;AAAA,MACC,YAAY,IAAA,oBACX,GAAA,CAACA,UAAA,CAAe,KAAA,EAAf,EAAsB,QAAA,EAAS;AAAA,KAAA,EAEpC,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/clipboard.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sources":["clipboard.tsx"],"sourcesContent":["import type { ButtonProps, InputProps } from \"@chakra-ui/react\"\nimport {\n Button,\n Clipboard as ChakraClipboard,\n IconButton,\n Input,\n} from \"@chakra-ui/react\"\nimport { useIntl } from \"open-pioneer:react-hooks\"\nimport * as React from \"react\"\nimport { LuCheck, LuClipboard, LuLink } from \"react-icons/lu\"\n\nconst ClipboardIcon = React.forwardRef<\n HTMLDivElement,\n ChakraClipboard.IndicatorProps\n>(function ClipboardIcon(props, ref) {\n return (\n <ChakraClipboard.Indicator copied={<LuCheck />} {...props} ref={ref}>\n <LuClipboard />\n </ChakraClipboard.Indicator>\n )\n})\n\nconst ClipboardCopyText = React.forwardRef<\n HTMLDivElement,\n ChakraClipboard.IndicatorProps\n>(function ClipboardCopyText(props, ref) {\n const intl = useIntl();\n\n //PATCH START add i18n\n return (\n <ChakraClipboard.Indicator copied={intl.formatMessage({id: \"clipboard.copied\"})} {...props} ref={ref}>\n {intl.formatMessage({id: \"clipboard.copy\"})}\n </ChakraClipboard.Indicator>\n )\n //PATCH END\n})\n\nexport const ClipboardLabel = React.forwardRef<\n HTMLLabelElement,\n ChakraClipboard.LabelProps\n>(function ClipboardLabel(props, ref) {\n return (\n <ChakraClipboard.Label\n textStyle=\"sm\"\n fontWeight=\"medium\"\n display=\"inline-block\"\n mb=\"1\"\n {...props}\n ref={ref}\n />\n )\n})\n\nexport const ClipboardButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function ClipboardButton(props, ref) {\n return (\n <ChakraClipboard.Trigger asChild>\n <Button ref={ref} size=\"sm\" variant=\"surface\" {...props}>\n <ClipboardIcon />\n <ClipboardCopyText />\n </Button>\n </ChakraClipboard.Trigger>\n )\n },\n)\n\nexport const ClipboardLink = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function ClipboardLink(props, ref) {\n return (\n <ChakraClipboard.Trigger asChild>\n <Button\n unstyled\n variant=\"plain\"\n size=\"xs\"\n display=\"inline-flex\"\n alignItems=\"center\"\n gap=\"2\"\n ref={ref}\n {...props}\n >\n <LuLink />\n <ClipboardCopyText />\n </Button>\n </ChakraClipboard.Trigger>\n )\n },\n)\n\nexport const ClipboardIconButton = React.forwardRef<\n HTMLButtonElement,\n ButtonProps\n>(function ClipboardIconButton(props, ref) {\n return (\n <ChakraClipboard.Trigger asChild>\n <IconButton ref={ref} size=\"xs\" variant=\"subtle\" {...props}>\n <ClipboardIcon />\n <ClipboardCopyText srOnly />\n </IconButton>\n </ChakraClipboard.Trigger>\n )\n})\n\nexport const ClipboardInput = React.forwardRef<HTMLInputElement, InputProps>(\n function ClipboardInputElement(props, ref) {\n return (\n <ChakraClipboard.Input asChild>\n <Input ref={ref} {...props} />\n </ChakraClipboard.Input>\n )\n },\n)\n\nexport const ClipboardRoot = ChakraClipboard.Root\n"],"names":["ClipboardIcon","ChakraClipboard","ClipboardCopyText","ClipboardLabel","ClipboardButton","ClipboardLink","ClipboardIconButton"],"mappings":";;;;;;AAWA,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"clipboard.js","sources":["clipboard.tsx"],"sourcesContent":["import type { ButtonProps, InputProps } from \"@chakra-ui/react\"\nimport {\n Button,\n Clipboard as ChakraClipboard,\n IconButton,\n Input,\n} from \"@chakra-ui/react\"\nimport { useIntl } from \"open-pioneer:react-hooks\"\nimport * as React from \"react\"\nimport { LuCheck, LuClipboard, LuLink } from \"react-icons/lu\"\n\nconst ClipboardIcon = React.forwardRef<\n HTMLDivElement,\n ChakraClipboard.IndicatorProps\n>(function ClipboardIcon(props, ref) {\n return (\n <ChakraClipboard.Indicator copied={<LuCheck />} {...props} ref={ref}>\n <LuClipboard />\n </ChakraClipboard.Indicator>\n )\n})\n\nconst ClipboardCopyText = React.forwardRef<\n HTMLDivElement,\n ChakraClipboard.IndicatorProps\n>(function ClipboardCopyText(props, ref) {\n const intl = useIntl();\n\n //PATCH START add i18n\n return (\n <ChakraClipboard.Indicator copied={intl.formatMessage({id: \"clipboard.copied\"})} {...props} ref={ref}>\n {intl.formatMessage({id: \"clipboard.copy\"})}\n </ChakraClipboard.Indicator>\n )\n //PATCH END\n})\n\nexport const ClipboardLabel = React.forwardRef<\n HTMLLabelElement,\n ChakraClipboard.LabelProps\n>(function ClipboardLabel(props, ref) {\n return (\n <ChakraClipboard.Label\n textStyle=\"sm\"\n fontWeight=\"medium\"\n display=\"inline-block\"\n mb=\"1\"\n {...props}\n ref={ref}\n />\n )\n})\n\nexport const ClipboardButton = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function ClipboardButton(props, ref) {\n return (\n <ChakraClipboard.Trigger asChild>\n <Button ref={ref} size=\"sm\" variant=\"surface\" {...props}>\n <ClipboardIcon />\n <ClipboardCopyText />\n </Button>\n </ChakraClipboard.Trigger>\n )\n },\n)\n\nexport const ClipboardLink = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function ClipboardLink(props, ref) {\n return (\n <ChakraClipboard.Trigger asChild>\n <Button\n unstyled\n variant=\"plain\"\n size=\"xs\"\n display=\"inline-flex\"\n alignItems=\"center\"\n gap=\"2\"\n ref={ref}\n {...props}\n >\n <LuLink />\n <ClipboardCopyText />\n </Button>\n </ChakraClipboard.Trigger>\n )\n },\n)\n\nexport const ClipboardIconButton = React.forwardRef<\n HTMLButtonElement,\n ButtonProps\n>(function ClipboardIconButton(props, ref) {\n return (\n <ChakraClipboard.Trigger asChild>\n <IconButton ref={ref} size=\"xs\" variant=\"subtle\" {...props}>\n <ClipboardIcon />\n <ClipboardCopyText srOnly />\n </IconButton>\n </ChakraClipboard.Trigger>\n )\n})\n\nexport const ClipboardInput = React.forwardRef<HTMLInputElement, InputProps>(\n function ClipboardInputElement(props, ref) {\n return (\n <ChakraClipboard.Input asChild>\n <Input ref={ref} {...props} />\n </ChakraClipboard.Input>\n )\n },\n)\n\nexport const ClipboardRoot = ChakraClipboard.Root\n"],"names":["ClipboardIcon","ChakraClipboard","ClipboardCopyText","ClipboardLabel","ClipboardButton","ClipboardLink","ClipboardIconButton"],"mappings":";;;;;;AAWA,MAAM,gBAAgB,KAAA,CAAM,UAAA,CAG1B,SAASA,cAAAA,CAAc,OAAO,GAAA,EAAK;AACnC,EAAA,uBACE,GAAA,CAACC,SAAA,CAAgB,SAAA,EAAhB,EAA0B,MAAA,kBAAQ,GAAA,CAAC,OAAA,EAAA,EAAQ,CAAA,EAAK,GAAG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AAgB,KAAA,EAAhB,EAAsB,OAAA,EAAO,IAAA,EAC5B,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,GAAA,EAAW,GAAG,KAAA,EAAO,CAAA,EAC9B,CAAA;AAAA,EAEJ;AACF;AAEO,MAAM,gBAAgBA,SAAA,CAAgB;;;;"}
|
package/close-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"close-button.js","sources":["close-button.tsx"],"sourcesContent":["import type { ButtonProps } from \"@chakra-ui/react\"\nimport { IconButton as ChakraIconButton, Icon } from \"@chakra-ui/react\"\nimport { useIntl } from \"open-pioneer:react-hooks\"\nimport * as React from \"react\"\nimport { LuX } from \"react-icons/lu\"\n\nexport type CloseButtonProps = ButtonProps\n\nexport const CloseButton = React.forwardRef<\n HTMLButtonElement,\n CloseButtonProps\n>(function CloseButton(props, ref) {\n const intl = useIntl()\n\n //PATCH START add i18n\n return (\n <ChakraIconButton variant=\"ghost\" aria-label={intl.formatMessage({id: \"close-button.ariaLabel\"})} ref={ref} {...props}>\n {\n /* patch: surround with <Icon /> for aria-hidden attribute */\n props.children ?? <Icon><LuX /></Icon>\n } \n </ChakraIconButton>\n )\n //PATCH END\n})\n"],"names":["CloseButton","ChakraIconButton"],"mappings":";;;;;;AAQO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"close-button.js","sources":["close-button.tsx"],"sourcesContent":["import type { ButtonProps } from \"@chakra-ui/react\"\nimport { IconButton as ChakraIconButton, Icon } from \"@chakra-ui/react\"\nimport { useIntl } from \"open-pioneer:react-hooks\"\nimport * as React from \"react\"\nimport { LuX } from \"react-icons/lu\"\n\nexport type CloseButtonProps = ButtonProps\n\nexport const CloseButton = React.forwardRef<\n HTMLButtonElement,\n CloseButtonProps\n>(function CloseButton(props, ref) {\n const intl = useIntl()\n\n //PATCH START add i18n\n return (\n <ChakraIconButton variant=\"ghost\" aria-label={intl.formatMessage({id: \"close-button.ariaLabel\"})} ref={ref} {...props}>\n {\n /* patch: surround with <Icon /> for aria-hidden attribute */\n props.children ?? <Icon><LuX /></Icon>\n } \n </ChakraIconButton>\n )\n //PATCH END\n})\n"],"names":["CloseButton","ChakraIconButton"],"mappings":";;;;;;AAQO,MAAM,cAAc,KAAA,CAAM,UAAA,CAG/B,SAASA,YAAAA,CAAY,OAAO,GAAA,EAAK;AAChC,EAAA,MAAM,OAAO,OAAA,EAAQ;AAGtB,EAAA,uBACE,GAAA,CAACC,UAAA,EAAA;AAAA,IAAiB,OAAA,EAAQ,OAAA;AAAA,IAAQ,cAAY,IAAA,CAAK,aAAA,CAAc,EAAC,EAAA,EAAI,0BAAyB,CAAA;AAAA,IAAG,GAAA;AAAA,IAAW,GAAG,KAAA;AAAA;AAAA,IAG3G,gBAAM,QAAA,oBAAY,GAAA,CAAC,IAAA,EAAA,EAAK,QAAA,kBAAA,GAAA,CAAC,OAAI,CAAA,EAAE;AAAA,GAEpC,CAAA;AAGJ,CAAC;;;;"}
|
package/data-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-list.js","sources":["data-list.tsx"],"sourcesContent":["import { DataList as ChakraDataList } from \"@chakra-ui/react\"\nimport { InfoTip } from \"./toggle-tip\"\nimport * as React from \"react\"\n\nexport const DataListRoot = ChakraDataList.Root\n\ninterface ItemProps extends ChakraDataList.ItemProps {\n label: React.ReactNode\n value: React.ReactNode\n info?: React.ReactNode\n grow?: boolean\n}\n\nexport const DataListItem = React.forwardRef<HTMLDivElement, ItemProps>(\n function DataListItem(props, ref) {\n const { label, info, value, children, grow, ...rest } = props\n return (\n <ChakraDataList.Item ref={ref} {...rest}>\n <ChakraDataList.ItemLabel flex={grow ? \"1\" : undefined}>\n {label}\n {info && <InfoTip>{info}</InfoTip>}\n </ChakraDataList.ItemLabel>\n <ChakraDataList.ItemValue flex={grow ? \"1\" : undefined}>\n {value}\n </ChakraDataList.ItemValue>\n {children}\n </ChakraDataList.Item>\n )\n },\n)\n"],"names":["ChakraDataList","DataListItem"],"mappings":";;;;;AAIO,MAAM,eAAeA,
|
|
1
|
+
{"version":3,"file":"data-list.js","sources":["data-list.tsx"],"sourcesContent":["import { DataList as ChakraDataList } from \"@chakra-ui/react\"\nimport { InfoTip } from \"./toggle-tip\"\nimport * as React from \"react\"\n\nexport const DataListRoot = ChakraDataList.Root\n\ninterface ItemProps extends ChakraDataList.ItemProps {\n label: React.ReactNode\n value: React.ReactNode\n info?: React.ReactNode\n grow?: boolean\n}\n\nexport const DataListItem = React.forwardRef<HTMLDivElement, ItemProps>(\n function DataListItem(props, ref) {\n const { label, info, value, children, grow, ...rest } = props\n return (\n <ChakraDataList.Item ref={ref} {...rest}>\n <ChakraDataList.ItemLabel flex={grow ? \"1\" : undefined}>\n {label}\n {info && <InfoTip>{info}</InfoTip>}\n </ChakraDataList.ItemLabel>\n <ChakraDataList.ItemValue flex={grow ? \"1\" : undefined}>\n {value}\n </ChakraDataList.ItemValue>\n {children}\n </ChakraDataList.Item>\n )\n },\n)\n"],"names":["ChakraDataList","DataListItem"],"mappings":";;;;;AAIO,MAAM,eAAeA,QAAA,CAAe;AASpC,MAAM,eAAe,KAAA,CAAM,UAAA;AAAA,EAChC,SAASC,aAAAA,CAAa,KAAA,EAAO,GAAA,EAAK;AAChC,IAAA,MAAM,EAAE,OAAO,IAAA,EAAM,KAAA,EAAO,UAAU,IAAA,EAAM,GAAG,MAAK,GAAI,KAAA;AACxD,IAAA,4BACGD,QAAA,CAAe,IAAA,EAAf,EAAoB,GAAA,EAAW,GAAG,IAAA,EACjC,QAAA,EAAA;AAAA,sBAAA,IAAA,CAACA,SAAe,SAAA,EAAf,EAAyB,IAAA,EAAM,IAAA,GAAO,MAAM,MAAA,EAC1C,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,QACA,IAAA,oBAAQ,GAAA,CAAC,OAAA,EAAA,EAAS,QAAA,EAAA,IAAA,EAAK;AAAA,OAAA,EAC1B,CAAA;AAAA,sBACA,GAAA,CAACA,SAAe,SAAA,EAAf,EAAyB,MAAM,IAAA,GAAO,GAAA,GAAM,QAC1C,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,MACC;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/empty-state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty-state.js","sources":["empty-state.tsx"],"sourcesContent":["import { EmptyState as ChakraEmptyState, VStack } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface EmptyStateProps extends ChakraEmptyState.RootProps {\n title: string\n description?: string\n icon?: React.ReactNode\n}\n\nexport const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(\n function EmptyState(props, ref) {\n const { title, description, icon, children, ...rest } = props\n return (\n <ChakraEmptyState.Root ref={ref} {...rest}>\n <ChakraEmptyState.Content>\n {icon && (\n <ChakraEmptyState.Indicator>{icon}</ChakraEmptyState.Indicator>\n )}\n {description ? (\n <VStack textAlign=\"center\">\n <ChakraEmptyState.Title>{title}</ChakraEmptyState.Title>\n <ChakraEmptyState.Description>\n {description}\n </ChakraEmptyState.Description>\n </VStack>\n ) : (\n <ChakraEmptyState.Title>{title}</ChakraEmptyState.Title>\n )}\n {children}\n </ChakraEmptyState.Content>\n </ChakraEmptyState.Root>\n )\n },\n)\n"],"names":["EmptyState","ChakraEmptyState"],"mappings":";;;;AASO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"empty-state.js","sources":["empty-state.tsx"],"sourcesContent":["import { EmptyState as ChakraEmptyState, VStack } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface EmptyStateProps extends ChakraEmptyState.RootProps {\n title: string\n description?: string\n icon?: React.ReactNode\n}\n\nexport const EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(\n function EmptyState(props, ref) {\n const { title, description, icon, children, ...rest } = props\n return (\n <ChakraEmptyState.Root ref={ref} {...rest}>\n <ChakraEmptyState.Content>\n {icon && (\n <ChakraEmptyState.Indicator>{icon}</ChakraEmptyState.Indicator>\n )}\n {description ? (\n <VStack textAlign=\"center\">\n <ChakraEmptyState.Title>{title}</ChakraEmptyState.Title>\n <ChakraEmptyState.Description>\n {description}\n </ChakraEmptyState.Description>\n </VStack>\n ) : (\n <ChakraEmptyState.Title>{title}</ChakraEmptyState.Title>\n )}\n {children}\n </ChakraEmptyState.Content>\n </ChakraEmptyState.Root>\n )\n },\n)\n"],"names":["EmptyState","ChakraEmptyState"],"mappings":";;;;AASO,MAAM,aAAa,KAAA,CAAM,UAAA;AAAA,EAC9B,SAASA,WAAAA,CAAW,KAAA,EAAO,GAAA,EAAK;AAC9B,IAAA,MAAM,EAAE,KAAA,EAAO,WAAA,EAAa,MAAM,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AACxD,IAAA,uBACE,GAAA,CAACC,YAAA,CAAiB,IAAA,EAAjB,EAAsB,GAAA,EAAW,GAAG,IAAA,EACnC,QAAA,kBAAA,IAAA,CAACA,YAAA,CAAiB,OAAA,EAAjB,EACE,QAAA,EAAA;AAAA,MAAA,IAAA,oBACC,GAAA,CAACA,YAAA,CAAiB,SAAA,EAAjB,EAA4B,QAAA,EAAA,IAAA,EAAK,CAAA;AAAA,MAEnC,WAAA,mBACC,IAAA,CAAC,MAAA,EAAA,EAAO,SAAA,EAAU,QAAA,EAChB,QAAA,EAAA;AAAA,wBAAA,GAAA,CAACA,YAAA,CAAiB,KAAA,EAAjB,EAAwB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,wBAC/B,GAAA,CAACA,YAAA,CAAiB,WAAA,EAAjB,EACE,QAAA,EAAA,WAAA,EACH;AAAA,OAAA,EACF,CAAA,mBAEA,GAAA,CAACA,YAAA,CAAiB,KAAA,EAAjB,EAAwB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,MAEhC;AAAA,KAAA,EACH,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["field.tsx"],"sourcesContent":["import { Field as ChakraField } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface FieldProps extends Omit<ChakraField.RootProps, \"label\"> {\n label?: React.ReactNode\n helperText?: React.ReactNode\n errorText?: React.ReactNode\n optionalText?: React.ReactNode\n}\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n function Field(props, ref) {\n const { label, children, helperText, errorText, optionalText, ...rest } =\n props\n return (\n <ChakraField.Root ref={ref} {...rest}>\n {label && (\n <ChakraField.Label>\n {label}\n <ChakraField.RequiredIndicator fallback={optionalText} />\n </ChakraField.Label>\n )}\n {children}\n {helperText && (\n <ChakraField.HelperText>{helperText}</ChakraField.HelperText>\n )}\n {errorText && (\n <ChakraField.ErrorText>{errorText}</ChakraField.ErrorText>\n )}\n </ChakraField.Root>\n )\n },\n)\n"],"names":["Field","ChakraField"],"mappings":";;;;AAUO,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"field.js","sources":["field.tsx"],"sourcesContent":["import { Field as ChakraField } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface FieldProps extends Omit<ChakraField.RootProps, \"label\"> {\n label?: React.ReactNode\n helperText?: React.ReactNode\n errorText?: React.ReactNode\n optionalText?: React.ReactNode\n}\n\nexport const Field = React.forwardRef<HTMLDivElement, FieldProps>(\n function Field(props, ref) {\n const { label, children, helperText, errorText, optionalText, ...rest } =\n props\n return (\n <ChakraField.Root ref={ref} {...rest}>\n {label && (\n <ChakraField.Label>\n {label}\n <ChakraField.RequiredIndicator fallback={optionalText} />\n </ChakraField.Label>\n )}\n {children}\n {helperText && (\n <ChakraField.HelperText>{helperText}</ChakraField.HelperText>\n )}\n {errorText && (\n <ChakraField.ErrorText>{errorText}</ChakraField.ErrorText>\n )}\n </ChakraField.Root>\n )\n },\n)\n"],"names":["Field","ChakraField"],"mappings":";;;;AAUO,MAAM,QAAQ,KAAA,CAAM,UAAA;AAAA,EACzB,SAASA,MAAAA,CAAM,KAAA,EAAO,GAAA,EAAK;AACzB,IAAA,MAAM,EAAE,OAAO,QAAA,EAAU,UAAA,EAAY,WAAW,YAAA,EAAc,GAAG,MAAK,GACpE,KAAA;AACF,IAAA,4BACGC,OAAA,CAAY,IAAA,EAAZ,EAAiB,GAAA,EAAW,GAAG,IAAA,EAC7B,QAAA,EAAA;AAAA,MAAA,KAAA,oBACC,IAAA,CAACA,OAAA,CAAY,KAAA,EAAZ,EACE,QAAA,EAAA;AAAA,QAAA,KAAA;AAAA,wBACD,GAAA,CAACA,OAAA,CAAY,iBAAA,EAAZ,EAA8B,UAAU,YAAA,EAAc;AAAA,OAAA,EACzD,CAAA;AAAA,MAED,QAAA;AAAA,MACA,UAAA,oBACC,GAAA,CAACA,OAAA,CAAY,UAAA,EAAZ,EAAwB,QAAA,EAAA,UAAA,EAAW,CAAA;AAAA,MAErC,SAAA,oBACC,GAAA,CAACA,OAAA,CAAY,SAAA,EAAZ,EAAuB,QAAA,EAAA,SAAA,EAAU;AAAA,KAAA,EAEtC,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/input-group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-group.js","sources":["input-group.tsx"],"sourcesContent":["import type { BoxProps, InputElementProps } from \"@chakra-ui/react\"\nimport { Group, InputElement } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface InputGroupProps extends BoxProps {\n startElementProps?: InputElementProps\n endElementProps?: InputElementProps\n startElement?: React.ReactNode\n endElement?: React.ReactNode\n children: React.ReactElement<InputElementProps>\n startOffset?: InputElementProps[\"paddingStart\"]\n endOffset?: InputElementProps[\"paddingEnd\"]\n}\n\nexport const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(\n function InputGroup(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n children,\n startOffset = \"6px\",\n endOffset = \"6px\",\n ...rest\n } = props\n\n const child =\n React.Children.only<React.ReactElement<InputElementProps>>(children)\n\n return (\n <Group ref={ref} {...rest}>\n {startElement && (\n <InputElement pointerEvents=\"none\" {...startElementProps}>\n {startElement}\n </InputElement>\n )}\n {React.cloneElement(child, {\n ...(startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`,\n }),\n ...(endElement && { pe: `calc(var(--input-height) - ${endOffset})` }),\n ...children.props,\n })}\n {endElement && (\n <InputElement placement=\"end\" {...endElementProps}>\n {endElement}\n </InputElement>\n )}\n </Group>\n )\n },\n)\n"],"names":["InputGroup"],"mappings":";;;;AAcO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"input-group.js","sources":["input-group.tsx"],"sourcesContent":["import type { BoxProps, InputElementProps } from \"@chakra-ui/react\"\nimport { Group, InputElement } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface InputGroupProps extends BoxProps {\n startElementProps?: InputElementProps\n endElementProps?: InputElementProps\n startElement?: React.ReactNode\n endElement?: React.ReactNode\n children: React.ReactElement<InputElementProps>\n startOffset?: InputElementProps[\"paddingStart\"]\n endOffset?: InputElementProps[\"paddingEnd\"]\n}\n\nexport const InputGroup = React.forwardRef<HTMLDivElement, InputGroupProps>(\n function InputGroup(props, ref) {\n const {\n startElement,\n startElementProps,\n endElement,\n endElementProps,\n children,\n startOffset = \"6px\",\n endOffset = \"6px\",\n ...rest\n } = props\n\n const child =\n React.Children.only<React.ReactElement<InputElementProps>>(children)\n\n return (\n <Group ref={ref} {...rest}>\n {startElement && (\n <InputElement pointerEvents=\"none\" {...startElementProps}>\n {startElement}\n </InputElement>\n )}\n {React.cloneElement(child, {\n ...(startElement && {\n ps: `calc(var(--input-height) - ${startOffset})`,\n }),\n ...(endElement && { pe: `calc(var(--input-height) - ${endOffset})` }),\n ...children.props,\n })}\n {endElement && (\n <InputElement placement=\"end\" {...endElementProps}>\n {endElement}\n </InputElement>\n )}\n </Group>\n )\n },\n)\n"],"names":["InputGroup"],"mappings":";;;;AAcO,MAAM,aAAa,KAAA,CAAM,UAAA;AAAA,EAC9B,SAASA,WAAAA,CAAW,KAAA,EAAO,GAAA,EAAK;AAC9B,IAAA,MAAM;AAAA,MACJ,YAAA;AAAA,MACA,iBAAA;AAAA,MACA,UAAA;AAAA,MACA,eAAA;AAAA,MACA,QAAA;AAAA,MACA,WAAA,GAAc,KAAA;AAAA,MACd,SAAA,GAAY,KAAA;AAAA,MACZ,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,KAAA,GACJ,KAAA,CAAM,QAAA,CAAS,IAAA,CAA4C,QAAQ,CAAA;AAErE,IAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAM,GAAA,EAAW,GAAG,IAAA,EAClB,QAAA,EAAA;AAAA,MAAA,YAAA,wBACE,YAAA,EAAA,EAAa,aAAA,EAAc,MAAA,EAAQ,GAAG,mBACpC,QAAA,EAAA,YAAA,EACH,CAAA;AAAA,MAED,KAAA,CAAM,aAAa,KAAA,EAAO;AAAA,QACzB,GAAI,YAAA,IAAgB;AAAA,UAClB,EAAA,EAAI,8BAA8B,WAAW,CAAA,CAAA;AAAA,SAC/C;AAAA,QACA,GAAI,UAAA,IAAc,EAAE,EAAA,EAAI,CAAA,2BAAA,EAA8B,SAAS,CAAA,CAAA,CAAA,EAAI;AAAA,QACnE,GAAG,QAAA,CAAS;AAAA,OACb,CAAA;AAAA,MACA,8BACC,GAAA,CAAC,YAAA,EAAA,EAAa,WAAU,KAAA,EAAO,GAAG,iBAC/B,QAAA,EAAA,UAAA,EACH;AAAA,KAAA,EAEJ,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/link-button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-button.js","sources":["link-button.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLChakraProps, RecipeProps } from \"@chakra-ui/react\"\nimport { createRecipeContext } from \"@chakra-ui/react\"\n\nexport interface LinkButtonProps\n extends HTMLChakraProps<\"a\", RecipeProps<\"button\">> {}\n\nconst { withContext } = createRecipeContext({ key: \"button\" })\n\n// Replace \"a\" with your framework's link component\nexport const LinkButton = withContext<HTMLAnchorElement, LinkButtonProps>(\"a\")\n"],"names":[],"mappings":";;AAQA,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"link-button.js","sources":["link-button.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLChakraProps, RecipeProps } from \"@chakra-ui/react\"\nimport { createRecipeContext } from \"@chakra-ui/react\"\n\nexport interface LinkButtonProps\n extends HTMLChakraProps<\"a\", RecipeProps<\"button\">> {}\n\nconst { withContext } = createRecipeContext({ key: \"button\" })\n\n// Replace \"a\" with your framework's link component\nexport const LinkButton = withContext<HTMLAnchorElement, LinkButtonProps>(\"a\")\n"],"names":[],"mappings":";;AAQA,MAAM,EAAE,WAAA,EAAY,GAAI,oBAAoB,EAAE,GAAA,EAAK,UAAU,CAAA;AAGtD,MAAM,UAAA,GAAa,YAAgD,GAAG;;;;"}
|
package/native-select.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ interface NativeSelectItem {
|
|
|
9
9
|
label: string;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
}
|
|
12
|
-
interface
|
|
12
|
+
interface NativeSelectFieldProps extends Select.FieldProps {
|
|
13
13
|
items?: Array<string | NativeSelectItem>;
|
|
14
14
|
}
|
|
15
|
-
export declare const NativeSelectField: React.ForwardRefExoticComponent<
|
|
15
|
+
export declare const NativeSelectField: React.ForwardRefExoticComponent<NativeSelectFieldProps & React.RefAttributes<HTMLSelectElement>>;
|
|
16
16
|
export {};
|
package/native-select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-select.js","sources":["native-select.tsx"],"sourcesContent":["\"use client\"\n\nimport { NativeSelect as Select } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ninterface NativeSelectRootProps extends Select.RootProps {\n icon?: React.ReactNode\n}\n\nexport const NativeSelectRoot = React.forwardRef<\n HTMLDivElement,\n NativeSelectRootProps\n>(function NativeSelect(props, ref) {\n const { icon, children, ...rest } = props\n return (\n <Select.Root ref={ref} {...rest}>\n {children}\n <Select.Indicator>{icon}</Select.Indicator>\n </Select.Root>\n )\n})\n\ninterface NativeSelectItem {\n value: string\n label: string\n disabled?: boolean\n}\n\ninterface
|
|
1
|
+
{"version":3,"file":"native-select.js","sources":["native-select.tsx"],"sourcesContent":["\"use client\"\n\nimport { NativeSelect as Select } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ninterface NativeSelectRootProps extends Select.RootProps {\n icon?: React.ReactNode\n}\n\nexport const NativeSelectRoot = React.forwardRef<\n HTMLDivElement,\n NativeSelectRootProps\n>(function NativeSelect(props, ref) {\n const { icon, children, ...rest } = props\n return (\n <Select.Root ref={ref} {...rest}>\n {children}\n <Select.Indicator>{icon}</Select.Indicator>\n </Select.Root>\n )\n})\n\ninterface NativeSelectItem {\n value: string\n label: string\n disabled?: boolean\n}\n\ninterface NativeSelectFieldProps extends Select.FieldProps {\n items?: Array<string | NativeSelectItem>\n}\n\nexport const NativeSelectField = React.forwardRef<\n HTMLSelectElement,\n NativeSelectFieldProps\n>(function NativeSelectField(props, ref) {\n const { items: itemsProp, children, ...rest } = props\n\n const items = React.useMemo(\n () =>\n itemsProp?.map((item) =>\n typeof item === \"string\" ? { label: item, value: item } : item,\n ),\n [itemsProp],\n )\n\n return (\n <Select.Field ref={ref} {...rest}>\n {children}\n {items?.map((item) => (\n <option key={item.value} value={item.value} disabled={item.disabled}>\n {item.label}\n </option>\n ))}\n </Select.Field>\n )\n})\n"],"names":["NativeSelect","Select","NativeSelectField"],"mappings":";;;;AASO,MAAM,mBAAmB,KAAA,CAAM,UAAA,CAGpC,SAASA,cAAA,CAAa,OAAO,GAAA,EAAK;AAClC,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AACpC,EAAA,4BACGC,YAAA,CAAO,IAAA,EAAP,EAAY,GAAA,EAAW,GAAG,IAAA,EACxB,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,GAAA,CAACA,YAAA,CAAO,SAAA,EAAP,EAAkB,QAAA,EAAA,IAAA,EAAK;AAAA,GAAA,EAC1B,CAAA;AAEJ,CAAC;AAYM,MAAM,oBAAoB,KAAA,CAAM,UAAA,CAGrC,SAASC,kBAAAA,CAAkB,OAAO,GAAA,EAAK;AACvC,EAAA,MAAM,EAAE,KAAA,EAAO,SAAA,EAAW,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AAEhD,EAAA,MAAM,QAAQ,KAAA,CAAM,OAAA;AAAA,IAClB,MACE,SAAA,EAAW,GAAA;AAAA,MAAI,CAAC,IAAA,KACd,OAAO,IAAA,KAAS,QAAA,GAAW,EAAE,KAAA,EAAO,IAAA,EAAM,KAAA,EAAO,IAAA,EAAK,GAAI;AAAA,KAC5D;AAAA,IACF,CAAC,SAAS;AAAA,GACZ;AAEA,EAAA,4BACGD,YAAA,CAAO,KAAA,EAAP,EAAa,GAAA,EAAW,GAAG,IAAA,EACzB,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,OAAO,GAAA,CAAI,CAAC,IAAA,qBACX,GAAA,CAAC,YAAwB,KAAA,EAAO,IAAA,CAAK,KAAA,EAAO,QAAA,EAAU,KAAK,QAAA,EACxD,QAAA,EAAA,IAAA,CAAK,KAAA,EAAA,EADK,IAAA,CAAK,KAElB,CACD;AAAA,GAAA,EACH,CAAA;AAEJ,CAAC;;;;"}
|
package/number-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-input.js","sources":["number-input.tsx"],"sourcesContent":["import { NumberInput as ChakraNumberInput } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface NumberInputProps extends ChakraNumberInput.RootProps {}\n\nexport const NumberInputRoot = React.forwardRef<\n HTMLDivElement,\n NumberInputProps\n>(function NumberInput(props, ref) {\n const { children, ...rest } = props\n return (\n <ChakraNumberInput.Root ref={ref} variant=\"outline\" {...rest}>\n {children}\n <ChakraNumberInput.Control>\n <ChakraNumberInput.IncrementTrigger />\n <ChakraNumberInput.DecrementTrigger />\n </ChakraNumberInput.Control>\n </ChakraNumberInput.Root>\n )\n})\n\nexport const NumberInputField = ChakraNumberInput.Input\nexport const NumberInputScrubber = ChakraNumberInput.Scrubber\nexport const NumberInputLabel = ChakraNumberInput.Label\n"],"names":["NumberInput","ChakraNumberInput"],"mappings":";;;;AAKO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"number-input.js","sources":["number-input.tsx"],"sourcesContent":["import { NumberInput as ChakraNumberInput } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface NumberInputProps extends ChakraNumberInput.RootProps {}\n\nexport const NumberInputRoot = React.forwardRef<\n HTMLDivElement,\n NumberInputProps\n>(function NumberInput(props, ref) {\n const { children, ...rest } = props\n return (\n <ChakraNumberInput.Root ref={ref} variant=\"outline\" {...rest}>\n {children}\n <ChakraNumberInput.Control>\n <ChakraNumberInput.IncrementTrigger />\n <ChakraNumberInput.DecrementTrigger />\n </ChakraNumberInput.Control>\n </ChakraNumberInput.Root>\n )\n})\n\nexport const NumberInputField = ChakraNumberInput.Input\nexport const NumberInputScrubber = ChakraNumberInput.Scrubber\nexport const NumberInputLabel = ChakraNumberInput.Label\n"],"names":["NumberInput","ChakraNumberInput"],"mappings":";;;;AAKO,MAAM,kBAAkB,KAAA,CAAM,UAAA,CAGnC,SAASA,aAAA,CAAY,OAAO,GAAA,EAAK;AACjC,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,IAAA,EAAK,GAAI,KAAA;AAC9B,EAAA,uBACE,IAAA,CAACC,YAAkB,IAAA,EAAlB,EAAuB,KAAU,OAAA,EAAQ,SAAA,EAAW,GAAG,IAAA,EACrD,QAAA,EAAA;AAAA,IAAA,QAAA;AAAA,oBACD,IAAA,CAACA,WAAA,CAAkB,OAAA,EAAlB,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,WAAA,CAAkB,kBAAlB,EAAmC,CAAA;AAAA,sBACpC,GAAA,CAACA,WAAA,CAAkB,gBAAA,EAAlB,EAAmC;AAAA,KAAA,EACtC;AAAA,GAAA,EACF,CAAA;AAEJ,CAAC;AAEM,MAAM,mBAAmBA,WAAA,CAAkB;AAC3C,MAAM,sBAAsBA,WAAA,CAAkB;AAC9C,MAAM,mBAAmBA,WAAA,CAAkB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@open-pioneer/chakra-snippets",
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.1.0-dev.20250818125237",
|
|
5
5
|
"description": "Contains snippets for Chakra UI.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"open-pioneer-trails"
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"directory": "src/packages/chakra-snippets"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@chakra-ui/react": "^3.
|
|
18
|
-
"react": "^19.1.
|
|
17
|
+
"@chakra-ui/react": "^3.24.2",
|
|
18
|
+
"react": "^19.1.1",
|
|
19
19
|
"react-icons": "^5.5.0",
|
|
20
|
-
"@open-pioneer/core": "
|
|
21
|
-
"@open-pioneer/runtime": "
|
|
20
|
+
"@open-pioneer/core": "4.1.0-dev.20250818125237",
|
|
21
|
+
"@open-pioneer/runtime": "4.1.0-dev.20250818125237"
|
|
22
22
|
},
|
|
23
23
|
"exports": {
|
|
24
24
|
"./package.json": "./package.json",
|
package/password-input.d.ts
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import type { GroupProps, InputProps, StackProps } from "@chakra-ui/react";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface PasswordVisibilityProps {
|
|
4
|
+
/**
|
|
5
|
+
* The default visibility state of the password input.
|
|
6
|
+
*/
|
|
4
7
|
defaultVisible?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* The controlled visibility state of the password input.
|
|
10
|
+
*/
|
|
5
11
|
visible?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Callback invoked when the visibility state changes.
|
|
14
|
+
*/
|
|
6
15
|
onVisibleChange?: (visible: boolean) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Custom icons for the visibility toggle button.
|
|
18
|
+
*/
|
|
7
19
|
visibilityIcon?: {
|
|
8
20
|
on: React.ReactNode;
|
|
9
21
|
off: React.ReactNode;
|
package/password-input.js
CHANGED
|
@@ -69,7 +69,7 @@ const PasswordStrengthMeter = React.forwardRef(function PasswordStrengthMeter2(p
|
|
|
69
69
|
const percent = value / max * 100;
|
|
70
70
|
const { label, colorPalette } = getColorPalette(percent);
|
|
71
71
|
return /* @__PURE__ */ jsxs(Stack, { align: "flex-end", gap: "1", ref, ...rest, children: [
|
|
72
|
-
/* @__PURE__ */ jsx(HStack, { width: "full",
|
|
72
|
+
/* @__PURE__ */ jsx(HStack, { width: "full", ...rest, children: Array.from({ length: max }).map((_, index) => /* @__PURE__ */ jsx(
|
|
73
73
|
Box,
|
|
74
74
|
{
|
|
75
75
|
height: "1",
|
package/password-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.js","sources":["password-input.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n ButtonProps,\n GroupProps,\n InputProps,\n StackProps,\n} from \"@chakra-ui/react\"\nimport {\n Box,\n HStack,\n IconButton,\n Input,\n InputGroup,\n Stack,\n mergeRefs,\n useControllableState,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\nimport { LuEye, LuEyeOff } from \"react-icons/lu\"\n\nexport interface PasswordVisibilityProps {\n defaultVisible?: boolean\n visible?: boolean\n onVisibleChange?: (visible: boolean) => void\n visibilityIcon?: { on: React.ReactNode; off: React.ReactNode }\n}\n\nexport interface PasswordInputProps\n extends InputProps,\n PasswordVisibilityProps {\n rootProps?: GroupProps\n}\n\nexport const PasswordInput = React.forwardRef<\n HTMLInputElement,\n PasswordInputProps\n>(function PasswordInput(props, ref) {\n const {\n rootProps,\n defaultVisible,\n visible: visibleProp,\n onVisibleChange,\n visibilityIcon = { on: <LuEye />, off: <LuEyeOff /> },\n ...rest\n } = props\n\n const [visible, setVisible] = useControllableState({\n value: visibleProp,\n defaultValue: defaultVisible || false,\n onChange: onVisibleChange,\n })\n\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n return (\n <InputGroup\n endElement={\n <VisibilityTrigger\n disabled={rest.disabled}\n onPointerDown={(e) => {\n if (rest.disabled) return\n if (e.button !== 0) return\n e.preventDefault()\n setVisible(!visible)\n }}\n >\n {visible ? visibilityIcon.off : visibilityIcon.on}\n </VisibilityTrigger>\n }\n {...rootProps}\n >\n <Input\n {...rest}\n ref={mergeRefs(ref, inputRef)}\n type={visible ? \"text\" : \"password\"}\n />\n </InputGroup>\n )\n})\n\nconst VisibilityTrigger = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function VisibilityTrigger(props, ref) {\n return (\n <IconButton\n tabIndex={-1}\n ref={ref}\n me=\"-2\"\n aspectRatio=\"square\"\n size=\"sm\"\n variant=\"ghost\"\n height=\"calc(100% - {spacing.2})\"\n aria-label=\"Toggle password visibility\"\n {...props}\n />\n )\n },\n)\n\ninterface PasswordStrengthMeterProps extends StackProps {\n max?: number\n value: number\n}\n\nexport const PasswordStrengthMeter = React.forwardRef<\n HTMLDivElement,\n PasswordStrengthMeterProps\n>(function PasswordStrengthMeter(props, ref) {\n const { max = 4, value, ...rest } = props\n\n const percent = (value / max) * 100\n const { label, colorPalette } = getColorPalette(percent)\n\n return (\n <Stack align=\"flex-end\" gap=\"1\" ref={ref} {...rest}>\n <HStack width=\"full\"
|
|
1
|
+
{"version":3,"file":"password-input.js","sources":["password-input.tsx"],"sourcesContent":["\"use client\"\n\nimport type {\n ButtonProps,\n GroupProps,\n InputProps,\n StackProps,\n} from \"@chakra-ui/react\"\nimport {\n Box,\n HStack,\n IconButton,\n Input,\n InputGroup,\n Stack,\n mergeRefs,\n useControllableState,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\nimport { LuEye, LuEyeOff } from \"react-icons/lu\"\n\nexport interface PasswordVisibilityProps {\n /**\n * The default visibility state of the password input.\n */\n defaultVisible?: boolean\n /**\n * The controlled visibility state of the password input.\n */\n visible?: boolean\n /**\n * Callback invoked when the visibility state changes.\n */\n onVisibleChange?: (visible: boolean) => void\n /**\n * Custom icons for the visibility toggle button.\n */\n visibilityIcon?: { on: React.ReactNode; off: React.ReactNode }\n}\n\nexport interface PasswordInputProps\n extends InputProps,\n PasswordVisibilityProps {\n rootProps?: GroupProps\n}\n\nexport const PasswordInput = React.forwardRef<\n HTMLInputElement,\n PasswordInputProps\n>(function PasswordInput(props, ref) {\n const {\n rootProps,\n defaultVisible,\n visible: visibleProp,\n onVisibleChange,\n visibilityIcon = { on: <LuEye />, off: <LuEyeOff /> },\n ...rest\n } = props\n\n const [visible, setVisible] = useControllableState({\n value: visibleProp,\n defaultValue: defaultVisible || false,\n onChange: onVisibleChange,\n })\n\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n return (\n <InputGroup\n endElement={\n <VisibilityTrigger\n disabled={rest.disabled}\n onPointerDown={(e) => {\n if (rest.disabled) return\n if (e.button !== 0) return\n e.preventDefault()\n setVisible(!visible)\n }}\n >\n {visible ? visibilityIcon.off : visibilityIcon.on}\n </VisibilityTrigger>\n }\n {...rootProps}\n >\n <Input\n {...rest}\n ref={mergeRefs(ref, inputRef)}\n type={visible ? \"text\" : \"password\"}\n />\n </InputGroup>\n )\n})\n\nconst VisibilityTrigger = React.forwardRef<HTMLButtonElement, ButtonProps>(\n function VisibilityTrigger(props, ref) {\n return (\n <IconButton\n tabIndex={-1}\n ref={ref}\n me=\"-2\"\n aspectRatio=\"square\"\n size=\"sm\"\n variant=\"ghost\"\n height=\"calc(100% - {spacing.2})\"\n aria-label=\"Toggle password visibility\"\n {...props}\n />\n )\n },\n)\n\ninterface PasswordStrengthMeterProps extends StackProps {\n max?: number\n value: number\n}\n\nexport const PasswordStrengthMeter = React.forwardRef<\n HTMLDivElement,\n PasswordStrengthMeterProps\n>(function PasswordStrengthMeter(props, ref) {\n const { max = 4, value, ...rest } = props\n\n const percent = (value / max) * 100\n const { label, colorPalette } = getColorPalette(percent)\n\n return (\n <Stack align=\"flex-end\" gap=\"1\" ref={ref} {...rest}>\n <HStack width=\"full\" {...rest}>\n {Array.from({ length: max }).map((_, index) => (\n <Box\n key={index}\n height=\"1\"\n flex=\"1\"\n rounded=\"sm\"\n data-selected={index < value ? \"\" : undefined}\n layerStyle=\"fill.subtle\"\n colorPalette=\"gray\"\n _selected={{\n colorPalette,\n layerStyle: \"fill.solid\",\n }}\n />\n ))}\n </HStack>\n {label && <HStack textStyle=\"xs\">{label}</HStack>}\n </Stack>\n )\n})\n\nfunction getColorPalette(percent: number) {\n switch (true) {\n case percent < 33:\n return { label: \"Low\", colorPalette: \"red\" }\n case percent < 66:\n return { label: \"Medium\", colorPalette: \"orange\" }\n default:\n return { label: \"High\", colorPalette: \"green\" }\n }\n}\n"],"names":["PasswordInput","VisibilityTrigger","PasswordStrengthMeter"],"mappings":";;;;;AA8CO,MAAM,gBAAgB,KAAA,CAAM,UAAA,CAGjC,SAASA,cAAAA,CAAc,OAAO,GAAA,EAAK;AACnC,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,cAAA;AAAA,IACA,OAAA,EAAS,WAAA;AAAA,IACT,eAAA;AAAA,IACA,cAAA,GAAiB,EAAE,EAAA,kBAAI,GAAA,CAAC,SAAM,CAAA,EAAI,GAAA,kBAAK,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,EAAG;AAAA,IACpD,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,oBAAA,CAAqB;AAAA,IACjD,KAAA,EAAO,WAAA;AAAA,IACP,cAAc,cAAA,IAAkB,KA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,GAAU,EAAA;AACb,MAAA,OAAO,EAAE,KAAA,EAAO,KAAA,EAAO,YAAA,EAAc,KAAA,EAAM;AAAA,IAC7C,KAAK,OAAA,GAAU,EAAA;AACb,MAAA,OAAO,EAAE,KAAA,EAAO,QAAA,EAAU,YAAA,EAAc,QAAA,EAAS;AAAA,IACnD;AACE,MAAA,OAAO,EAAE,KAAA,EAAO,MAAA,EAAQ,YAAA,EAAc,OAAA,EAAQ;AAAA;AAEpD;;;;"}
|
package/pin-input.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PinInput as ChakraPinInput } from "@chakra-ui/react";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface PinInputProps extends ChakraPinInput.RootProps {
|
|
4
|
-
rootRef?: React.
|
|
4
|
+
rootRef?: React.RefObject<HTMLDivElement | null>;
|
|
5
5
|
count?: number;
|
|
6
6
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
7
7
|
attached?: boolean;
|
package/pin-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pin-input.js","sources":["pin-input.tsx"],"sourcesContent":["import { PinInput as ChakraPinInput, Group } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface PinInputProps extends ChakraPinInput.RootProps {\n rootRef?: React.
|
|
1
|
+
{"version":3,"file":"pin-input.js","sources":["pin-input.tsx"],"sourcesContent":["import { PinInput as ChakraPinInput, Group } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface PinInputProps extends ChakraPinInput.RootProps {\n rootRef?: React.RefObject<HTMLDivElement | null>\n count?: number\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n attached?: boolean\n}\n\nexport const PinInput = React.forwardRef<HTMLInputElement, PinInputProps>(\n function PinInput(props, ref) {\n const { count = 4, inputProps, rootRef, attached, ...rest } = props\n return (\n <ChakraPinInput.Root ref={rootRef} {...rest}>\n <ChakraPinInput.HiddenInput ref={ref} {...inputProps} />\n <ChakraPinInput.Control>\n <Group attached={attached}>\n {Array.from({ length: count }).map((_, index) => (\n <ChakraPinInput.Input key={index} index={index} />\n ))}\n </Group>\n </ChakraPinInput.Control>\n </ChakraPinInput.Root>\n )\n },\n)\n"],"names":["PinInput","ChakraPinInput"],"mappings":";;;;AAUO,MAAM,WAAW,KAAA,CAAM,UAAA;AAAA,EAC5B,SAASA,SAAAA,CAAS,KAAA,EAAO,GAAA,EAAK;AAC5B,IAAA,MAAM,EAAE,QAAQ,CAAA,EAAG,UAAA,EAAY,SAAS,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AAC9D,IAAA,4BACGC,UAAA,CAAe,IAAA,EAAf,EAAoB,GAAA,EAAK,OAAA,EAAU,GAAG,IAAA,EACrC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,UAAA,CAAe,WAAA,EAAf,EAA2B,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,sBACtD,GAAA,CAACA,UAAA,CAAe,OAAA,EAAf,EACC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,QAAA,EACJ,QAAA,EAAA,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,KAAA,EAAO,EAAE,GAAA,CAAI,CAAC,CAAA,EAAG,KAAA,qBACrC,GAAA,CAACA,UAAA,CAAe,KAAA,EAAf,EAAiC,KAAA,EAAA,EAAP,KAAqB,CACjD,CAAA,EACH,CAAA,EACF;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/prose.js
CHANGED
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
import { chakra } from '@chakra-ui/react';
|
|
2
2
|
|
|
3
|
+
const TRAILING_PSEUDO_REGEX = /(::?[\w-]+(?:\([^)]*\))?)+$/;
|
|
4
|
+
const EXCLUDE_CLASSNAME = ".not-prose";
|
|
5
|
+
function inWhere(selector) {
|
|
6
|
+
const rebuiltSelector = selector.startsWith("& ") ? selector.slice(2) : selector;
|
|
7
|
+
const match = selector.match(TRAILING_PSEUDO_REGEX);
|
|
8
|
+
const pseudo = match ? match[0] : "";
|
|
9
|
+
const base = match ? selector.slice(0, -match[0].length) : rebuiltSelector;
|
|
10
|
+
return `& :where(${base}):not(${EXCLUDE_CLASSNAME}, ${EXCLUDE_CLASSNAME} *)${pseudo}`;
|
|
11
|
+
}
|
|
3
12
|
const Prose = chakra("div", {
|
|
4
13
|
base: {
|
|
5
14
|
color: "fg.muted",
|
|
6
15
|
maxWidth: "65ch",
|
|
7
16
|
fontSize: "sm",
|
|
8
17
|
lineHeight: "1.7em",
|
|
9
|
-
"& p": {
|
|
18
|
+
[inWhere("& p")]: {
|
|
10
19
|
marginTop: "1em",
|
|
11
20
|
marginBottom: "1em"
|
|
12
21
|
},
|
|
13
|
-
"& blockquote": {
|
|
22
|
+
[inWhere("& blockquote")]: {
|
|
14
23
|
marginTop: "1.285em",
|
|
15
24
|
marginBottom: "1.285em",
|
|
16
25
|
paddingInline: "1.285em",
|
|
17
|
-
borderInlineStartWidth: "0.25em"
|
|
26
|
+
borderInlineStartWidth: "0.25em",
|
|
27
|
+
color: "fg"
|
|
18
28
|
},
|
|
19
|
-
"& a": {
|
|
29
|
+
[inWhere("& a")]: {
|
|
20
30
|
color: "fg",
|
|
21
31
|
textDecoration: "underline",
|
|
22
32
|
textUnderlineOffset: "3px",
|
|
@@ -24,58 +34,58 @@ const Prose = chakra("div", {
|
|
|
24
34
|
textDecorationColor: "border.muted",
|
|
25
35
|
fontWeight: "500"
|
|
26
36
|
},
|
|
27
|
-
"& strong": {
|
|
37
|
+
[inWhere("& strong")]: {
|
|
28
38
|
fontWeight: "600"
|
|
29
39
|
},
|
|
30
|
-
"& a strong": {
|
|
40
|
+
[inWhere("& a strong")]: {
|
|
31
41
|
color: "inherit"
|
|
32
42
|
},
|
|
33
|
-
"& h1": {
|
|
43
|
+
[inWhere("& h1")]: {
|
|
34
44
|
fontSize: "2.15em",
|
|
35
45
|
letterSpacing: "-0.02em",
|
|
36
46
|
marginTop: "0",
|
|
37
47
|
marginBottom: "0.8em",
|
|
38
48
|
lineHeight: "1.2em"
|
|
39
49
|
},
|
|
40
|
-
"& h2": {
|
|
50
|
+
[inWhere("& h2")]: {
|
|
41
51
|
fontSize: "1.4em",
|
|
42
52
|
letterSpacing: "-0.02em",
|
|
43
53
|
marginTop: "1.6em",
|
|
44
54
|
marginBottom: "0.8em",
|
|
45
55
|
lineHeight: "1.4em"
|
|
46
56
|
},
|
|
47
|
-
"& h3": {
|
|
57
|
+
[inWhere("& h3")]: {
|
|
48
58
|
fontSize: "1.285em",
|
|
49
59
|
letterSpacing: "-0.01em",
|
|
50
60
|
marginTop: "1.5em",
|
|
51
61
|
marginBottom: "0.4em",
|
|
52
62
|
lineHeight: "1.5em"
|
|
53
63
|
},
|
|
54
|
-
"& h4": {
|
|
64
|
+
[inWhere("& h4")]: {
|
|
55
65
|
marginTop: "1.4em",
|
|
56
66
|
marginBottom: "0.5em",
|
|
57
67
|
letterSpacing: "-0.01em",
|
|
58
68
|
lineHeight: "1.5em"
|
|
59
69
|
},
|
|
60
|
-
"& img": {
|
|
70
|
+
[inWhere("& img")]: {
|
|
61
71
|
marginTop: "1.7em",
|
|
62
72
|
marginBottom: "1.7em",
|
|
63
73
|
borderRadius: "lg",
|
|
64
74
|
boxShadow: "inset"
|
|
65
75
|
},
|
|
66
|
-
"& picture": {
|
|
76
|
+
[inWhere("& picture")]: {
|
|
67
77
|
marginTop: "1.7em",
|
|
68
78
|
marginBottom: "1.7em"
|
|
69
79
|
},
|
|
70
|
-
"& picture > img": {
|
|
80
|
+
[inWhere("& picture > img")]: {
|
|
71
81
|
marginTop: "0",
|
|
72
82
|
marginBottom: "0"
|
|
73
83
|
},
|
|
74
|
-
"& video": {
|
|
84
|
+
[inWhere("& video")]: {
|
|
75
85
|
marginTop: "1.7em",
|
|
76
86
|
marginBottom: "1.7em"
|
|
77
87
|
},
|
|
78
|
-
"& kbd": {
|
|
88
|
+
[inWhere("& kbd")]: {
|
|
79
89
|
fontSize: "0.85em",
|
|
80
90
|
borderRadius: "xs",
|
|
81
91
|
paddingTop: "0.15em",
|
|
@@ -87,26 +97,26 @@ const Prose = chakra("div", {
|
|
|
87
97
|
"--shadow": "colors.border",
|
|
88
98
|
boxShadow: "0 0 0 1px var(--shadow),0 1px 0 1px var(--shadow)"
|
|
89
99
|
},
|
|
90
|
-
"& code": {
|
|
100
|
+
[inWhere("& code")]: {
|
|
91
101
|
fontSize: "0.925em",
|
|
92
102
|
letterSpacing: "-0.01em",
|
|
93
103
|
borderRadius: "md",
|
|
94
104
|
borderWidth: "1px",
|
|
95
105
|
padding: "0.25em"
|
|
96
106
|
},
|
|
97
|
-
"& pre code": {
|
|
107
|
+
[inWhere("& pre code")]: {
|
|
98
108
|
fontSize: "inherit",
|
|
99
109
|
letterSpacing: "inherit",
|
|
100
110
|
borderWidth: "inherit",
|
|
101
111
|
padding: "0"
|
|
102
112
|
},
|
|
103
|
-
"& h2 code": {
|
|
113
|
+
[inWhere("& h2 code")]: {
|
|
104
114
|
fontSize: "0.9em"
|
|
105
115
|
},
|
|
106
|
-
"& h3 code": {
|
|
116
|
+
[inWhere("& h3 code")]: {
|
|
107
117
|
fontSize: "0.8em"
|
|
108
118
|
},
|
|
109
|
-
"& pre": {
|
|
119
|
+
[inWhere("& pre")]: {
|
|
110
120
|
backgroundColor: "bg.subtle",
|
|
111
121
|
marginTop: "1.6em",
|
|
112
122
|
marginBottom: "1.6em",
|
|
@@ -119,74 +129,74 @@ const Prose = chakra("div", {
|
|
|
119
129
|
overflowX: "auto",
|
|
120
130
|
fontWeight: "400"
|
|
121
131
|
},
|
|
122
|
-
"& ol": {
|
|
132
|
+
[inWhere("& ol")]: {
|
|
123
133
|
marginTop: "1em",
|
|
124
134
|
marginBottom: "1em",
|
|
125
135
|
paddingInlineStart: "1.5em"
|
|
126
136
|
},
|
|
127
|
-
"& ul": {
|
|
137
|
+
[inWhere("& ul")]: {
|
|
128
138
|
marginTop: "1em",
|
|
129
139
|
marginBottom: "1em",
|
|
130
140
|
paddingInlineStart: "1.5em"
|
|
131
141
|
},
|
|
132
|
-
"& li": {
|
|
142
|
+
[inWhere("& li")]: {
|
|
133
143
|
marginTop: "0.285em",
|
|
134
144
|
marginBottom: "0.285em"
|
|
135
145
|
},
|
|
136
|
-
"& ol > li": {
|
|
146
|
+
[inWhere("& ol > li")]: {
|
|
137
147
|
paddingInlineStart: "0.4em",
|
|
138
148
|
listStyleType: "decimal",
|
|
139
149
|
"&::marker": {
|
|
140
150
|
color: "fg.muted"
|
|
141
151
|
}
|
|
142
152
|
},
|
|
143
|
-
"& ul > li": {
|
|
153
|
+
[inWhere("& ul > li")]: {
|
|
144
154
|
paddingInlineStart: "0.4em",
|
|
145
155
|
listStyleType: "disc",
|
|
146
156
|
"&::marker": {
|
|
147
157
|
color: "fg.muted"
|
|
148
158
|
}
|
|
149
159
|
},
|
|
150
|
-
"& > ul > li p": {
|
|
160
|
+
[inWhere("& > ul > li p")]: {
|
|
151
161
|
marginTop: "0.5em",
|
|
152
162
|
marginBottom: "0.5em"
|
|
153
163
|
},
|
|
154
|
-
"& > ul > li > p:first-of-type": {
|
|
164
|
+
[inWhere("& > ul > li > p:first-of-type")]: {
|
|
155
165
|
marginTop: "1em"
|
|
156
166
|
},
|
|
157
|
-
"& > ul > li > p:last-of-type": {
|
|
167
|
+
[inWhere("& > ul > li > p:last-of-type")]: {
|
|
158
168
|
marginBottom: "1em"
|
|
159
169
|
},
|
|
160
|
-
"& > ol > li > p:first-of-type": {
|
|
170
|
+
[inWhere("& > ol > li > p:first-of-type")]: {
|
|
161
171
|
marginTop: "1em"
|
|
162
172
|
},
|
|
163
|
-
"& > ol > li > p:last-of-type": {
|
|
173
|
+
[inWhere("& > ol > li > p:last-of-type")]: {
|
|
164
174
|
marginBottom: "1em"
|
|
165
175
|
},
|
|
166
|
-
"& ul ul, ul ol, ol ul, ol ol": {
|
|
176
|
+
[inWhere("& ul ul, ul ol, ol ul, ol ol")]: {
|
|
167
177
|
marginTop: "0.5em",
|
|
168
178
|
marginBottom: "0.5em"
|
|
169
179
|
},
|
|
170
|
-
"& dl": {
|
|
180
|
+
[inWhere("& dl")]: {
|
|
171
181
|
marginTop: "1em",
|
|
172
182
|
marginBottom: "1em"
|
|
173
183
|
},
|
|
174
|
-
"& dt": {
|
|
184
|
+
[inWhere("& dt")]: {
|
|
175
185
|
fontWeight: "600",
|
|
176
186
|
marginTop: "1em"
|
|
177
187
|
},
|
|
178
|
-
"& dd": {
|
|
188
|
+
[inWhere("& dd")]: {
|
|
179
189
|
marginTop: "0.285em",
|
|
180
190
|
paddingInlineStart: "1.5em"
|
|
181
191
|
},
|
|
182
|
-
"& hr": {
|
|
192
|
+
[inWhere("& hr")]: {
|
|
183
193
|
marginTop: "2.25em",
|
|
184
194
|
marginBottom: "2.25em"
|
|
185
195
|
},
|
|
186
|
-
"& :is(h1,h2,h3,h4,h5,hr) + *": {
|
|
196
|
+
[inWhere("& :is(h1,h2,h3,h4,h5,hr) + *")]: {
|
|
187
197
|
marginTop: "0"
|
|
188
198
|
},
|
|
189
|
-
"& table": {
|
|
199
|
+
[inWhere("& table")]: {
|
|
190
200
|
width: "100%",
|
|
191
201
|
tableLayout: "auto",
|
|
192
202
|
textAlign: "start",
|
|
@@ -194,54 +204,54 @@ const Prose = chakra("div", {
|
|
|
194
204
|
marginTop: "2em",
|
|
195
205
|
marginBottom: "2em"
|
|
196
206
|
},
|
|
197
|
-
"& thead": {
|
|
207
|
+
[inWhere("& thead")]: {
|
|
198
208
|
borderBottomWidth: "1px",
|
|
199
209
|
color: "fg"
|
|
200
210
|
},
|
|
201
|
-
"& tbody tr": {
|
|
211
|
+
[inWhere("& tbody tr")]: {
|
|
202
212
|
borderBottomWidth: "1px",
|
|
203
213
|
borderBottomColor: "border"
|
|
204
214
|
},
|
|
205
|
-
"& thead th": {
|
|
215
|
+
[inWhere("& thead th")]: {
|
|
206
216
|
paddingInlineEnd: "1em",
|
|
207
217
|
paddingBottom: "0.65em",
|
|
208
218
|
paddingInlineStart: "1em",
|
|
209
219
|
fontWeight: "medium",
|
|
210
220
|
textAlign: "start"
|
|
211
221
|
},
|
|
212
|
-
"& thead th:first-of-type": {
|
|
222
|
+
[inWhere("& thead th:first-of-type")]: {
|
|
213
223
|
paddingInlineStart: "0"
|
|
214
224
|
},
|
|
215
|
-
"& thead th:last-of-type": {
|
|
225
|
+
[inWhere("& thead th:last-of-type")]: {
|
|
216
226
|
paddingInlineEnd: "0"
|
|
217
227
|
},
|
|
218
|
-
"& tbody td, tfoot td": {
|
|
228
|
+
[inWhere("& tbody td, tfoot td")]: {
|
|
219
229
|
paddingTop: "0.65em",
|
|
220
230
|
paddingInlineEnd: "1em",
|
|
221
231
|
paddingBottom: "0.65em",
|
|
222
232
|
paddingInlineStart: "1em"
|
|
223
233
|
},
|
|
224
|
-
"& tbody td:first-of-type, tfoot td:first-of-type": {
|
|
234
|
+
[inWhere("& tbody td:first-of-type, tfoot td:first-of-type")]: {
|
|
225
235
|
paddingInlineStart: "0"
|
|
226
236
|
},
|
|
227
|
-
"& tbody td:last-of-type, tfoot td:last-of-type": {
|
|
237
|
+
[inWhere("& tbody td:last-of-type, tfoot td:last-of-type")]: {
|
|
228
238
|
paddingInlineEnd: "0"
|
|
229
239
|
},
|
|
230
|
-
"& figure": {
|
|
240
|
+
[inWhere("& figure")]: {
|
|
231
241
|
marginTop: "1.625em",
|
|
232
242
|
marginBottom: "1.625em"
|
|
233
243
|
},
|
|
234
|
-
"& figure > *": {
|
|
244
|
+
[inWhere("& figure > *")]: {
|
|
235
245
|
marginTop: "0",
|
|
236
246
|
marginBottom: "0"
|
|
237
247
|
},
|
|
238
|
-
"& figcaption": {
|
|
248
|
+
[inWhere("& figcaption")]: {
|
|
239
249
|
fontSize: "0.85em",
|
|
240
250
|
lineHeight: "1.25em",
|
|
241
251
|
marginTop: "0.85em",
|
|
242
252
|
color: "fg.muted"
|
|
243
253
|
},
|
|
244
|
-
"& h1, h2, h3, h4": {
|
|
254
|
+
[inWhere("& h1, h2, h3, h4")]: {
|
|
245
255
|
color: "fg",
|
|
246
256
|
fontWeight: "600"
|
|
247
257
|
}
|
package/prose.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prose.js","sources":["prose.tsx"],"sourcesContent":["\"use client\"\n\nimport { chakra } from \"@chakra-ui/react\"\n\nexport const Prose = chakra(\"div\", {\n base: {\n color: \"fg.muted\",\n maxWidth: \"65ch\",\n fontSize: \"sm\",\n lineHeight: \"1.7em\",\n \"& p\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n },\n \"& blockquote\": {\n marginTop: \"1.285em\",\n marginBottom: \"1.285em\",\n paddingInline: \"1.285em\",\n borderInlineStartWidth: \"0.25em\",\n },\n \"& a\": {\n color: \"fg\",\n textDecoration: \"underline\",\n textUnderlineOffset: \"3px\",\n textDecorationThickness: \"2px\",\n textDecorationColor: \"border.muted\",\n fontWeight: \"500\",\n },\n \"& strong\": {\n fontWeight: \"600\",\n },\n \"& a strong\": {\n color: \"inherit\",\n },\n \"& h1\": {\n fontSize: \"2.15em\",\n letterSpacing: \"-0.02em\",\n marginTop: \"0\",\n marginBottom: \"0.8em\",\n lineHeight: \"1.2em\",\n },\n \"& h2\": {\n fontSize: \"1.4em\",\n letterSpacing: \"-0.02em\",\n marginTop: \"1.6em\",\n marginBottom: \"0.8em\",\n lineHeight: \"1.4em\",\n },\n \"& h3\": {\n fontSize: \"1.285em\",\n letterSpacing: \"-0.01em\",\n marginTop: \"1.5em\",\n marginBottom: \"0.4em\",\n lineHeight: \"1.5em\",\n },\n \"& h4\": {\n marginTop: \"1.4em\",\n marginBottom: \"0.5em\",\n letterSpacing: \"-0.01em\",\n lineHeight: \"1.5em\",\n },\n \"& img\": {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n borderRadius: \"lg\",\n boxShadow: \"inset\",\n },\n \"& picture\": {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n },\n \"& picture > img\": {\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n \"& video\": {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n },\n \"& kbd\": {\n fontSize: \"0.85em\",\n borderRadius: \"xs\",\n paddingTop: \"0.15em\",\n paddingBottom: \"0.15em\",\n paddingInlineEnd: \"0.35em\",\n paddingInlineStart: \"0.35em\",\n fontFamily: \"inherit\",\n color: \"fg.muted\",\n \"--shadow\": \"colors.border\",\n boxShadow: \"0 0 0 1px var(--shadow),0 1px 0 1px var(--shadow)\",\n },\n \"& code\": {\n fontSize: \"0.925em\",\n letterSpacing: \"-0.01em\",\n borderRadius: \"md\",\n borderWidth: \"1px\",\n padding: \"0.25em\",\n },\n \"& pre code\": {\n fontSize: \"inherit\",\n letterSpacing: \"inherit\",\n borderWidth: \"inherit\",\n padding: \"0\",\n },\n \"& h2 code\": {\n fontSize: \"0.9em\",\n },\n \"& h3 code\": {\n fontSize: \"0.8em\",\n },\n \"& pre\": {\n backgroundColor: \"bg.subtle\",\n marginTop: \"1.6em\",\n marginBottom: \"1.6em\",\n borderRadius: \"md\",\n fontSize: \"0.9em\",\n paddingTop: \"0.65em\",\n paddingBottom: \"0.65em\",\n paddingInlineEnd: \"1em\",\n paddingInlineStart: \"1em\",\n overflowX: \"auto\",\n fontWeight: \"400\",\n },\n \"& ol\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n paddingInlineStart: \"1.5em\",\n },\n \"& ul\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n paddingInlineStart: \"1.5em\",\n },\n \"& li\": {\n marginTop: \"0.285em\",\n marginBottom: \"0.285em\",\n },\n \"& ol > li\": {\n paddingInlineStart: \"0.4em\",\n listStyleType: \"decimal\",\n \"&::marker\": {\n color: \"fg.muted\",\n },\n },\n \"& ul > li\": {\n paddingInlineStart: \"0.4em\",\n listStyleType: \"disc\",\n \"&::marker\": {\n color: \"fg.muted\",\n },\n },\n \"& > ul > li p\": {\n marginTop: \"0.5em\",\n marginBottom: \"0.5em\",\n },\n \"& > ul > li > p:first-of-type\": {\n marginTop: \"1em\",\n },\n \"& > ul > li > p:last-of-type\": {\n marginBottom: \"1em\",\n },\n \"& > ol > li > p:first-of-type\": {\n marginTop: \"1em\",\n },\n \"& > ol > li > p:last-of-type\": {\n marginBottom: \"1em\",\n },\n \"& ul ul, ul ol, ol ul, ol ol\": {\n marginTop: \"0.5em\",\n marginBottom: \"0.5em\",\n },\n \"& dl\": {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n },\n \"& dt\": {\n fontWeight: \"600\",\n marginTop: \"1em\",\n },\n \"& dd\": {\n marginTop: \"0.285em\",\n paddingInlineStart: \"1.5em\",\n },\n \"& hr\": {\n marginTop: \"2.25em\",\n marginBottom: \"2.25em\",\n },\n \"& :is(h1,h2,h3,h4,h5,hr) + *\": {\n marginTop: \"0\",\n },\n \"& table\": {\n width: \"100%\",\n tableLayout: \"auto\",\n textAlign: \"start\",\n lineHeight: \"1.5em\",\n marginTop: \"2em\",\n marginBottom: \"2em\",\n },\n \"& thead\": {\n borderBottomWidth: \"1px\",\n color: \"fg\",\n },\n \"& tbody tr\": {\n borderBottomWidth: \"1px\",\n borderBottomColor: \"border\",\n },\n \"& thead th\": {\n paddingInlineEnd: \"1em\",\n paddingBottom: \"0.65em\",\n paddingInlineStart: \"1em\",\n fontWeight: \"medium\",\n textAlign: \"start\",\n },\n \"& thead th:first-of-type\": {\n paddingInlineStart: \"0\",\n },\n \"& thead th:last-of-type\": {\n paddingInlineEnd: \"0\",\n },\n \"& tbody td, tfoot td\": {\n paddingTop: \"0.65em\",\n paddingInlineEnd: \"1em\",\n paddingBottom: \"0.65em\",\n paddingInlineStart: \"1em\",\n },\n \"& tbody td:first-of-type, tfoot td:first-of-type\": {\n paddingInlineStart: \"0\",\n },\n \"& tbody td:last-of-type, tfoot td:last-of-type\": {\n paddingInlineEnd: \"0\",\n },\n \"& figure\": {\n marginTop: \"1.625em\",\n marginBottom: \"1.625em\",\n },\n \"& figure > *\": {\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n \"& figcaption\": {\n fontSize: \"0.85em\",\n lineHeight: \"1.25em\",\n marginTop: \"0.85em\",\n color: \"fg.muted\",\n },\n \"& h1, h2, h3, h4\": {\n color: \"fg\",\n fontWeight: \"600\",\n },\n },\n variants: {\n size: {\n md: {\n fontSize: \"sm\",\n },\n lg: {\n fontSize: \"md\",\n },\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n"],"names":[],"mappings":";;AAIa,MAAA,KAAA,GAAQ,OAAO,KAAO,EAAA;AAAA,EACjC,IAAM,EAAA;AAAA,IACJ,KAAO,EAAA,UAAA;AAAA,IACP,QAAU,EAAA,MAAA;AAAA,IACV,QAAU,EAAA,IAAA;AAAA,IACV,UAAY,EAAA,OAAA;AAAA,IACZ,KAAO,EAAA;AAAA,MACL,SAAW,EAAA,KAAA;AAAA,MACX,YAAc,EAAA;AAAA,KAChB;AAAA,IACA,cAAgB,EAAA;AAAA,MACd,SAAW,EAAA,SAAA;AAAA,MACX,YAAc,EAAA,SAAA;AAAA,MACd,aAAe,EAAA,SAAA;AAAA,MACf,sBAAwB,EAAA;AAAA,KAC1B;AAAA,IACA,KAAO,EAAA;AAAA,MACL,KAAO,EAAA,IAAA;AAAA,MACP,cAAgB,EAAA,WAAA;AAAA,MAChB,mBAAqB,EAAA,KAAA;AAAA,MACrB,uBAAyB,EAAA,KAAA;AAAA,MACzB,mBAAqB,EAAA,cAAA;AAAA,MACrB,UAAY,EAAA;AAAA,KACd;AAAA,IACA,UAAY,EAAA;AAAA,MACV,UAAY,EAAA;AAAA,KACd;AAAA,IACA,YAAc,EAAA;AAAA,MACZ,KAAO,EAAA;AAAA,KACT;AAAA,IACA,MAAQ,EAAA;AAAA,MACN,QAAU,EAAA,QAAA;AAAA,MACV,aAAe,EAAA,SAAA;AAAA,MACf,SAAW,EAAA,GAAA;AAAA,MACX,YAAc,EAAA,OAAA;AAAA,MACd,UAAY,EA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AA,MACJ,EAAI,EAAA;AAAA,QACF,QAAU,EAAA;AAAA,OACZ;AAAA,MACA,EAAI,EAAA;AAAA,QACF,QAAU,EAAA;AAAA;AACZ;AACF,GACF;AAAA,EACA,eAAiB,EAAA;AAAA,IACf,IAAM,EAAA;AAAA;AAEV,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"prose.js","sources":["prose.tsx"],"sourcesContent":["\"use client\"\n\nimport { chakra } from \"@chakra-ui/react\"\n\nconst TRAILING_PSEUDO_REGEX = /(::?[\\w-]+(?:\\([^)]*\\))?)+$/\nconst EXCLUDE_CLASSNAME = \".not-prose\"\nfunction inWhere<T extends string>(selector: T): T {\n const rebuiltSelector = selector.startsWith(\"& \")\n ? selector.slice(2)\n : selector\n const match = selector.match(TRAILING_PSEUDO_REGEX)\n const pseudo = match ? match[0] : \"\"\n const base = match ? selector.slice(0, -match[0].length) : rebuiltSelector\n return `& :where(${base}):not(${EXCLUDE_CLASSNAME}, ${EXCLUDE_CLASSNAME} *)${pseudo}` as T\n}\n\nexport const Prose = chakra(\"div\", {\n base: {\n color: \"fg.muted\",\n maxWidth: \"65ch\",\n fontSize: \"sm\",\n lineHeight: \"1.7em\",\n [inWhere(\"& p\")]: {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n },\n [inWhere(\"& blockquote\")]: {\n marginTop: \"1.285em\",\n marginBottom: \"1.285em\",\n paddingInline: \"1.285em\",\n borderInlineStartWidth: \"0.25em\",\n color: \"fg\",\n },\n [inWhere(\"& a\")]: {\n color: \"fg\",\n textDecoration: \"underline\",\n textUnderlineOffset: \"3px\",\n textDecorationThickness: \"2px\",\n textDecorationColor: \"border.muted\",\n fontWeight: \"500\",\n },\n [inWhere(\"& strong\")]: {\n fontWeight: \"600\",\n },\n [inWhere(\"& a strong\")]: {\n color: \"inherit\",\n },\n [inWhere(\"& h1\")]: {\n fontSize: \"2.15em\",\n letterSpacing: \"-0.02em\",\n marginTop: \"0\",\n marginBottom: \"0.8em\",\n lineHeight: \"1.2em\",\n },\n [inWhere(\"& h2\")]: {\n fontSize: \"1.4em\",\n letterSpacing: \"-0.02em\",\n marginTop: \"1.6em\",\n marginBottom: \"0.8em\",\n lineHeight: \"1.4em\",\n },\n [inWhere(\"& h3\")]: {\n fontSize: \"1.285em\",\n letterSpacing: \"-0.01em\",\n marginTop: \"1.5em\",\n marginBottom: \"0.4em\",\n lineHeight: \"1.5em\",\n },\n [inWhere(\"& h4\")]: {\n marginTop: \"1.4em\",\n marginBottom: \"0.5em\",\n letterSpacing: \"-0.01em\",\n lineHeight: \"1.5em\",\n },\n [inWhere(\"& img\")]: {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n borderRadius: \"lg\",\n boxShadow: \"inset\",\n },\n [inWhere(\"& picture\")]: {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n },\n [inWhere(\"& picture > img\")]: {\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n [inWhere(\"& video\")]: {\n marginTop: \"1.7em\",\n marginBottom: \"1.7em\",\n },\n [inWhere(\"& kbd\")]: {\n fontSize: \"0.85em\",\n borderRadius: \"xs\",\n paddingTop: \"0.15em\",\n paddingBottom: \"0.15em\",\n paddingInlineEnd: \"0.35em\",\n paddingInlineStart: \"0.35em\",\n fontFamily: \"inherit\",\n color: \"fg.muted\",\n \"--shadow\": \"colors.border\",\n boxShadow: \"0 0 0 1px var(--shadow),0 1px 0 1px var(--shadow)\",\n },\n [inWhere(\"& code\")]: {\n fontSize: \"0.925em\",\n letterSpacing: \"-0.01em\",\n borderRadius: \"md\",\n borderWidth: \"1px\",\n padding: \"0.25em\",\n },\n [inWhere(\"& pre code\")]: {\n fontSize: \"inherit\",\n letterSpacing: \"inherit\",\n borderWidth: \"inherit\",\n padding: \"0\",\n },\n [inWhere(\"& h2 code\")]: {\n fontSize: \"0.9em\",\n },\n [inWhere(\"& h3 code\")]: {\n fontSize: \"0.8em\",\n },\n [inWhere(\"& pre\")]: {\n backgroundColor: \"bg.subtle\",\n marginTop: \"1.6em\",\n marginBottom: \"1.6em\",\n borderRadius: \"md\",\n fontSize: \"0.9em\",\n paddingTop: \"0.65em\",\n paddingBottom: \"0.65em\",\n paddingInlineEnd: \"1em\",\n paddingInlineStart: \"1em\",\n overflowX: \"auto\",\n fontWeight: \"400\",\n },\n [inWhere(\"& ol\")]: {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n paddingInlineStart: \"1.5em\",\n },\n [inWhere(\"& ul\")]: {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n paddingInlineStart: \"1.5em\",\n },\n [inWhere(\"& li\")]: {\n marginTop: \"0.285em\",\n marginBottom: \"0.285em\",\n },\n [inWhere(\"& ol > li\")]: {\n paddingInlineStart: \"0.4em\",\n listStyleType: \"decimal\",\n \"&::marker\": {\n color: \"fg.muted\",\n },\n },\n [inWhere(\"& ul > li\")]: {\n paddingInlineStart: \"0.4em\",\n listStyleType: \"disc\",\n \"&::marker\": {\n color: \"fg.muted\",\n },\n },\n [inWhere(\"& > ul > li p\")]: {\n marginTop: \"0.5em\",\n marginBottom: \"0.5em\",\n },\n [inWhere(\"& > ul > li > p:first-of-type\")]: {\n marginTop: \"1em\",\n },\n [inWhere(\"& > ul > li > p:last-of-type\")]: {\n marginBottom: \"1em\",\n },\n [inWhere(\"& > ol > li > p:first-of-type\")]: {\n marginTop: \"1em\",\n },\n [inWhere(\"& > ol > li > p:last-of-type\")]: {\n marginBottom: \"1em\",\n },\n [inWhere(\"& ul ul, ul ol, ol ul, ol ol\")]: {\n marginTop: \"0.5em\",\n marginBottom: \"0.5em\",\n },\n [inWhere(\"& dl\")]: {\n marginTop: \"1em\",\n marginBottom: \"1em\",\n },\n [inWhere(\"& dt\")]: {\n fontWeight: \"600\",\n marginTop: \"1em\",\n },\n [inWhere(\"& dd\")]: {\n marginTop: \"0.285em\",\n paddingInlineStart: \"1.5em\",\n },\n [inWhere(\"& hr\")]: {\n marginTop: \"2.25em\",\n marginBottom: \"2.25em\",\n },\n [inWhere(\"& :is(h1,h2,h3,h4,h5,hr) + *\")]: {\n marginTop: \"0\",\n },\n [inWhere(\"& table\")]: {\n width: \"100%\",\n tableLayout: \"auto\",\n textAlign: \"start\",\n lineHeight: \"1.5em\",\n marginTop: \"2em\",\n marginBottom: \"2em\",\n },\n [inWhere(\"& thead\")]: {\n borderBottomWidth: \"1px\",\n color: \"fg\",\n },\n [inWhere(\"& tbody tr\")]: {\n borderBottomWidth: \"1px\",\n borderBottomColor: \"border\",\n },\n [inWhere(\"& thead th\")]: {\n paddingInlineEnd: \"1em\",\n paddingBottom: \"0.65em\",\n paddingInlineStart: \"1em\",\n fontWeight: \"medium\",\n textAlign: \"start\",\n },\n [inWhere(\"& thead th:first-of-type\")]: {\n paddingInlineStart: \"0\",\n },\n [inWhere(\"& thead th:last-of-type\")]: {\n paddingInlineEnd: \"0\",\n },\n [inWhere(\"& tbody td, tfoot td\")]: {\n paddingTop: \"0.65em\",\n paddingInlineEnd: \"1em\",\n paddingBottom: \"0.65em\",\n paddingInlineStart: \"1em\",\n },\n [inWhere(\"& tbody td:first-of-type, tfoot td:first-of-type\")]: {\n paddingInlineStart: \"0\",\n },\n [inWhere(\"& tbody td:last-of-type, tfoot td:last-of-type\")]: {\n paddingInlineEnd: \"0\",\n },\n [inWhere(\"& figure\")]: {\n marginTop: \"1.625em\",\n marginBottom: \"1.625em\",\n },\n [inWhere(\"& figure > *\")]: {\n marginTop: \"0\",\n marginBottom: \"0\",\n },\n [inWhere(\"& figcaption\")]: {\n fontSize: \"0.85em\",\n lineHeight: \"1.25em\",\n marginTop: \"0.85em\",\n color: \"fg.muted\",\n },\n [inWhere(\"& h1, h2, h3, h4\")]: {\n color: \"fg\",\n fontWeight: \"600\",\n },\n },\n variants: {\n size: {\n md: {\n fontSize: \"sm\",\n },\n lg: {\n fontSize: \"md\",\n },\n },\n },\n defaultVariants: {\n size: \"md\",\n },\n})\n"],"names":[],"mappings":";;AAIA,MAAM,qBAAA,GAAwB,6BAAA;AAC9B,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QAAA,EAAU,QAAA;AAAA,MACV,UAAA,EAAY,QAAA;AAAA,MACZ,SAAA,EAAW,QAAA;AAAA,MACX,KAAA,EAAO;AAAA,KACT;AAAA,IACA,CAAC,OAAA,CAAQ,kBAAkB,CAAC,GAAG;AAAA,MAC7B,KAAA,EAAO,IAAA;AAAA,MACP,UAAA,EAAY;AAAA;AACd,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM;AAAA,MACJ,EAAA,EAAI;AAAA,QACF,QAAA,EAAU;AAAA,OACZ;AAAA,MACA,EAAA,EAAI;AAAA,QACF,QAAA,EAAU;AAAA;AACZ;AACF,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,IAAA,EAAM;AAAA;AAEV,CAAC;;;;"}
|
package/qr-code.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"qr-code.js","sources":["qr-code.tsx"],"sourcesContent":["import { QrCode as ChakraQrCode } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface QrCodeProps\n extends Omit<ChakraQrCode.RootProps, \"fill\" | \"overlay\"> {\n fill?: string\n overlay?: React.ReactNode\n}\n\nexport const QrCode = React.forwardRef<HTMLDivElement, QrCodeProps>(\n function QrCode(props, ref) {\n const { children, fill, overlay, ...rest } = props\n return (\n <ChakraQrCode.Root ref={ref} {...rest}>\n <ChakraQrCode.Frame style={{ fill }}>\n <ChakraQrCode.Pattern />\n </ChakraQrCode.Frame>\n {overlay}\n {children && <ChakraQrCode.Overlay>{children}</ChakraQrCode.Overlay>}\n </ChakraQrCode.Root>\n )\n },\n)\n"],"names":["QrCode","ChakraQrCode"],"mappings":";;;;AASO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"qr-code.js","sources":["qr-code.tsx"],"sourcesContent":["import { QrCode as ChakraQrCode } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface QrCodeProps\n extends Omit<ChakraQrCode.RootProps, \"fill\" | \"overlay\"> {\n fill?: string\n overlay?: React.ReactNode\n}\n\nexport const QrCode = React.forwardRef<HTMLDivElement, QrCodeProps>(\n function QrCode(props, ref) {\n const { children, fill, overlay, ...rest } = props\n return (\n <ChakraQrCode.Root ref={ref} {...rest}>\n <ChakraQrCode.Frame style={{ fill }}>\n <ChakraQrCode.Pattern />\n </ChakraQrCode.Frame>\n {overlay}\n {children && <ChakraQrCode.Overlay>{children}</ChakraQrCode.Overlay>}\n </ChakraQrCode.Root>\n )\n },\n)\n"],"names":["QrCode","ChakraQrCode"],"mappings":";;;;AASO,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EAC1B,SAASA,OAAAA,CAAO,KAAA,EAAO,GAAA,EAAK;AAC1B,IAAA,MAAM,EAAE,QAAA,EAAU,IAAA,EAAM,OAAA,EAAS,GAAG,MAAK,GAAI,KAAA;AAC7C,IAAA,4BACGC,QAAA,CAAa,IAAA,EAAb,EAAkB,GAAA,EAAW,GAAG,IAAA,EAC/B,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,QAAA,CAAa,KAAA,EAAb,EAAmB,KAAA,EAAO,EAAE,IAAA,EAAK,EAChC,QAAA,kBAAA,GAAA,CAACA,QAAA,CAAa,OAAA,EAAb,EAAqB,CAAA,EACxB,CAAA;AAAA,MACC,OAAA;AAAA,MACA,QAAA,oBAAY,GAAA,CAACA,QAAA,CAAa,OAAA,EAAb,EAAsB,QAAA,EAAS;AAAA,KAAA,EAC/C,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/radio-card.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-card.js","sources":["radio-card.tsx"],"sourcesContent":["import { RadioCard } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ninterface RadioCardItemProps extends RadioCard.ItemProps {\n icon?: React.ReactElement\n label?: React.ReactNode\n description?: React.ReactNode\n addon?: React.ReactNode\n indicator?: React.ReactNode | null\n indicatorPlacement?: \"start\" | \"end\" | \"inside\"\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n}\n\nexport const RadioCardItem = React.forwardRef<\n HTMLInputElement,\n RadioCardItemProps\n>(function RadioCardItem(props, ref) {\n const {\n inputProps,\n label,\n description,\n addon,\n icon,\n indicator = <RadioCard.ItemIndicator />,\n indicatorPlacement = \"end\",\n ...rest\n } = props\n\n const hasContent = label || description || icon\n const ContentWrapper = indicator ? RadioCard.ItemContent : React.Fragment\n\n return (\n <RadioCard.Item {...rest}>\n <RadioCard.ItemHiddenInput ref={ref} {...inputProps} />\n <RadioCard.ItemControl>\n {indicatorPlacement === \"start\" && indicator}\n {hasContent && (\n <ContentWrapper>\n {icon}\n {label && <RadioCard.ItemText>{label}</RadioCard.ItemText>}\n {description && (\n <RadioCard.ItemDescription>\n {description}\n </RadioCard.ItemDescription>\n )}\n {indicatorPlacement === \"inside\" && indicator}\n </ContentWrapper>\n )}\n {indicatorPlacement === \"end\" && indicator}\n </RadioCard.ItemControl>\n {addon && <RadioCard.ItemAddon>{addon}</RadioCard.ItemAddon>}\n </RadioCard.Item>\n )\n})\n\nexport const RadioCardRoot = RadioCard.Root\nexport const RadioCardLabel = RadioCard.Label\nexport const RadioCardItemIndicator = RadioCard.ItemIndicator\n"],"names":["RadioCardItem"],"mappings":";;;;AAaO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"radio-card.js","sources":["radio-card.tsx"],"sourcesContent":["import { RadioCard } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ninterface RadioCardItemProps extends RadioCard.ItemProps {\n icon?: React.ReactElement\n label?: React.ReactNode\n description?: React.ReactNode\n addon?: React.ReactNode\n indicator?: React.ReactNode | null\n indicatorPlacement?: \"start\" | \"end\" | \"inside\"\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n}\n\nexport const RadioCardItem = React.forwardRef<\n HTMLInputElement,\n RadioCardItemProps\n>(function RadioCardItem(props, ref) {\n const {\n inputProps,\n label,\n description,\n addon,\n icon,\n indicator = <RadioCard.ItemIndicator />,\n indicatorPlacement = \"end\",\n ...rest\n } = props\n\n const hasContent = label || description || icon\n const ContentWrapper = indicator ? RadioCard.ItemContent : React.Fragment\n\n return (\n <RadioCard.Item {...rest}>\n <RadioCard.ItemHiddenInput ref={ref} {...inputProps} />\n <RadioCard.ItemControl>\n {indicatorPlacement === \"start\" && indicator}\n {hasContent && (\n <ContentWrapper>\n {icon}\n {label && <RadioCard.ItemText>{label}</RadioCard.ItemText>}\n {description && (\n <RadioCard.ItemDescription>\n {description}\n </RadioCard.ItemDescription>\n )}\n {indicatorPlacement === \"inside\" && indicator}\n </ContentWrapper>\n )}\n {indicatorPlacement === \"end\" && indicator}\n </RadioCard.ItemControl>\n {addon && <RadioCard.ItemAddon>{addon}</RadioCard.ItemAddon>}\n </RadioCard.Item>\n )\n})\n\nexport const RadioCardRoot = RadioCard.Root\nexport const RadioCardLabel = RadioCard.Label\nexport const RadioCardItemIndicator = RadioCard.ItemIndicator\n"],"names":["RadioCardItem"],"mappings":";;;;AAaO,MAAM,gBAAgB,KAAA,CAAM,UAAA,CAGjC,SAASA,cAAAA,CAAc,OAAO,GAAA,EAAK;AACnC,EAAA,MAAM;AAAA,IACJ,UAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,SAAA,mBAAY,GAAA,CAAC,SAAA,CAAU,aAAA,EAAV,EAAwB,CAAA;AAAA,IACrC,kBAAA,GAAqB,KAAA;AAAA,IACrB,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,UAAA,GAAa,SAAS,WAAA,IAAe,IAAA;AAC3C,EAAA,MAAM,cAAA,GAAiB,SAAA,GAAY,SAAA,CAAU,WAAA,GAAc,KAAA,CAAM,QAAA;AAEjE,EAAA,uBACE,IAAA,CAAC,SAAA,CAAU,IAAA,EAAV,EAAgB,GAAG,IAAA,EAClB,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,SAAA,CAAU,eAAA,EAAV,EAA0B,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,oBACrD,IAAA,CAAC,SAAA,CAAU,WAAA,EAAV,EACE,QAAA,EAAA;AAAA,MAAA,kBAAA,KAAuB,OAAA,IAAW,SAAA;AAAA,MAClC,UAAA,yBACE,cAAA,EAAA,EACE,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,QACA,KAAA,oBAAS,GAAA,CAAC,SAAA,CAAU,QAAA,EAAV,EAAoB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,QACpC,WAAA,oBACC,GAAA,CAAC,SAAA,CAAU,eAAA,EAAV,EACE,QAAA,EAAA,WAAA,EACH,CAAA;AAAA,QAED,uBAAuB,QAAA,IAAY;AAAA,OAAA,EACtC,CAAA;AAAA,MAED,uBAAuB,KAAA,IAAS;AAAA,KAAA,EACnC,CAAA;AAAA,IACC,KAAA,oBAAS,GAAA,CAAC,SAAA,CAAU,SAAA,EAAV,EAAqB,QAAA,EAAA,KAAA,EAAM;AAAA,GAAA,EACxC,CAAA;AAEJ,CAAC;AAEM,MAAM,gBAAgB,SAAA,CAAU;AAChC,MAAM,iBAAiB,SAAA,CAAU;AACjC,MAAM,yBAAyB,SAAA,CAAU;;;;"}
|
package/radio.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RadioGroup as ChakraRadioGroup } from "@chakra-ui/react";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface RadioProps extends ChakraRadioGroup.ItemProps {
|
|
4
|
-
rootRef?: React.
|
|
4
|
+
rootRef?: React.RefObject<HTMLDivElement | null>;
|
|
5
5
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
6
6
|
}
|
|
7
7
|
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
package/radio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["radio.tsx"],"sourcesContent":["import { RadioGroup as ChakraRadioGroup } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface RadioProps extends ChakraRadioGroup.ItemProps {\n rootRef?: React.
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["radio.tsx"],"sourcesContent":["import { RadioGroup as ChakraRadioGroup } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface RadioProps extends ChakraRadioGroup.ItemProps {\n rootRef?: React.RefObject<HTMLDivElement | null>\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n}\n\nexport const Radio = React.forwardRef<HTMLInputElement, RadioProps>(\n function Radio(props, ref) {\n const { children, inputProps, rootRef, ...rest } = props\n return (\n <ChakraRadioGroup.Item ref={rootRef} {...rest}>\n <ChakraRadioGroup.ItemHiddenInput ref={ref} {...inputProps} />\n <ChakraRadioGroup.ItemIndicator />\n {children && (\n <ChakraRadioGroup.ItemText>{children}</ChakraRadioGroup.ItemText>\n )}\n </ChakraRadioGroup.Item>\n )\n },\n)\n\nexport const RadioGroup = ChakraRadioGroup.Root\n"],"names":["Radio","ChakraRadioGroup"],"mappings":";;;;AAQO,MAAM,QAAQ,KAAA,CAAM,UAAA;AAAA,EACzB,SAASA,MAAAA,CAAM,KAAA,EAAO,GAAA,EAAK;AACzB,IAAA,MAAM,EAAE,QAAA,EAAU,UAAA,EAAY,OAAA,EAAS,GAAG,MAAK,GAAI,KAAA;AACnD,IAAA,4BACGC,YAAA,CAAiB,IAAA,EAAjB,EAAsB,GAAA,EAAK,OAAA,EAAU,GAAG,IAAA,EACvC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,YAAA,CAAiB,eAAA,EAAjB,EAAiC,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,sBAC5D,GAAA,CAACA,YAAA,CAAiB,aAAA,EAAjB,EAA+B,CAAA;AAAA,MAC/B,QAAA,oBACC,GAAA,CAACA,YAAA,CAAiB,QAAA,EAAjB,EAA2B,QAAA,EAAS;AAAA,KAAA,EAEzC,CAAA;AAAA,EAEJ;AACF;AAEO,MAAM,aAAaA,YAAA,CAAiB;;;;"}
|
package/rating.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rating.js","sources":["rating.tsx"],"sourcesContent":["import { RatingGroup } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface RatingProps extends RatingGroup.RootProps {\n icon?: React.ReactElement\n count?: number\n label?: React.ReactNode\n}\n\nexport const Rating = React.forwardRef<HTMLDivElement, RatingProps>(\n function Rating(props, ref) {\n const { icon, count = 5, label, ...rest } = props\n return (\n <RatingGroup.Root ref={ref} count={count} {...rest}>\n {label && <RatingGroup.Label>{label}</RatingGroup.Label>}\n <RatingGroup.HiddenInput />\n <RatingGroup.Control>\n {Array.from({ length: count }).map((_, index) => (\n <RatingGroup.Item key={index} index={index + 1}>\n <RatingGroup.ItemIndicator icon={icon} />\n </RatingGroup.Item>\n ))}\n </RatingGroup.Control>\n </RatingGroup.Root>\n )\n },\n)\n"],"names":["Rating"],"mappings":";;;;AASO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"rating.js","sources":["rating.tsx"],"sourcesContent":["import { RatingGroup } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface RatingProps extends RatingGroup.RootProps {\n icon?: React.ReactElement\n count?: number\n label?: React.ReactNode\n}\n\nexport const Rating = React.forwardRef<HTMLDivElement, RatingProps>(\n function Rating(props, ref) {\n const { icon, count = 5, label, ...rest } = props\n return (\n <RatingGroup.Root ref={ref} count={count} {...rest}>\n {label && <RatingGroup.Label>{label}</RatingGroup.Label>}\n <RatingGroup.HiddenInput />\n <RatingGroup.Control>\n {Array.from({ length: count }).map((_, index) => (\n <RatingGroup.Item key={index} index={index + 1}>\n <RatingGroup.ItemIndicator icon={icon} />\n </RatingGroup.Item>\n ))}\n </RatingGroup.Control>\n </RatingGroup.Root>\n )\n },\n)\n"],"names":["Rating"],"mappings":";;;;AASO,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EAC1B,SAASA,OAAAA,CAAO,KAAA,EAAO,GAAA,EAAK;AAC1B,IAAA,MAAM,EAAE,IAAA,EAAM,KAAA,GAAQ,GAAG,KAAA,EAAO,GAAG,MAAK,GAAI,KAAA;AAC5C,IAAA,4BACG,WAAA,CAAY,IAAA,EAAZ,EAAiB,GAAA,EAAU,KAAA,EAAe,GAAG,IAAA,EAC3C,QAAA,EAAA;AAAA,MAAA,KAAA,oBAAS,GAAA,CAAC,WAAA,CAAY,KAAA,EAAZ,EAAmB,QAAA,EAAA,KAAA,EAAM,CAAA;AAAA,sBACpC,GAAA,CAAC,WAAA,CAAY,WAAA,EAAZ,EAAwB,CAAA;AAAA,sBACzB,GAAA,CAAC,WAAA,CAAY,OAAA,EAAZ,EACE,QAAA,EAAA,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,KAAA,EAAO,CAAA,CAAE,GAAA,CAAI,CAAC,CAAA,EAAG,KAAA,qBACrC,GAAA,CAAC,WAAA,CAAY,IAAA,EAAZ,EAA6B,KAAA,EAAO,KAAA,GAAQ,CAAA,EAC3C,QAAA,kBAAA,GAAA,CAAC,WAAA,CAAY,aAAA,EAAZ,EAA0B,IAAA,EAAY,CAAA,EAAA,EADlB,KAEvB,CACD,CAAA,EACH;AAAA,KAAA,EACF,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slider.js","sources":["slider.tsx"],"sourcesContent":["import { Slider as ChakraSlider, For, HStack } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface SliderProps extends ChakraSlider.RootProps {\n marks?: Array<number | { value: number; label: React.ReactNode }>\n label?: React.ReactNode\n showValue?: boolean\n}\n\nexport const Slider = React.forwardRef<HTMLDivElement, SliderProps>(\n function Slider(props, ref) {\n const { marks: marksProp, label, showValue, ...rest } = props\n const value = props.defaultValue ?? props.value\n\n const marks = marksProp?.map((mark) => {\n if (typeof mark === \"number\") return { value: mark, label: undefined }\n return mark\n })\n\n const hasMarkLabel = !!marks?.some((mark) => mark.label)\n\n return (\n <ChakraSlider.Root ref={ref} thumbAlignment=\"center\" {...rest}>\n {label && !showValue && (\n <ChakraSlider.Label>{label}</ChakraSlider.Label>\n )}\n {label && showValue && (\n <HStack justify=\"space-between\">\n <ChakraSlider.Label>{label}</ChakraSlider.Label>\n <ChakraSlider.ValueText />\n </HStack>\n )}\n <ChakraSlider.Control data-has-mark-label={hasMarkLabel || undefined}>\n <ChakraSlider.Track>\n <ChakraSlider.Range />\n </ChakraSlider.Track>\n <SliderThumbs value={value} />\n <SliderMarks marks={marks} />\n </ChakraSlider.Control>\n </ChakraSlider.Root>\n )\n },\n)\n\nfunction SliderThumbs(props: { value?: number[] }) {\n const { value } = props\n return (\n <For each={value}>\n {(_, index) => (\n <ChakraSlider.Thumb key={index} index={index}>\n <ChakraSlider.HiddenInput />\n </ChakraSlider.Thumb>\n )}\n </For>\n )\n}\n\ninterface SliderMarksProps {\n marks?: Array<number | { value: number; label: React.ReactNode }>\n}\n\nconst SliderMarks = React.forwardRef<HTMLDivElement, SliderMarksProps>(\n function SliderMarks(props, ref) {\n const { marks } = props\n if (!marks?.length) return null\n\n return (\n <ChakraSlider.MarkerGroup ref={ref}>\n {marks.map((mark, index) => {\n const value = typeof mark === \"number\" ? mark : mark.value\n const label = typeof mark === \"number\" ? undefined : mark.label\n return (\n <ChakraSlider.Marker key={index} value={value}>\n <ChakraSlider.MarkerIndicator />\n {label}\n </ChakraSlider.Marker>\n )\n })}\n </ChakraSlider.MarkerGroup>\n )\n },\n)\n"],"names":["Slider","ChakraSlider","SliderMarks"],"mappings":";;;;AASO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"slider.js","sources":["slider.tsx"],"sourcesContent":["import { Slider as ChakraSlider, For, HStack } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface SliderProps extends ChakraSlider.RootProps {\n marks?: Array<number | { value: number; label: React.ReactNode }>\n label?: React.ReactNode\n showValue?: boolean\n}\n\nexport const Slider = React.forwardRef<HTMLDivElement, SliderProps>(\n function Slider(props, ref) {\n const { marks: marksProp, label, showValue, ...rest } = props\n const value = props.defaultValue ?? props.value\n\n const marks = marksProp?.map((mark) => {\n if (typeof mark === \"number\") return { value: mark, label: undefined }\n return mark\n })\n\n const hasMarkLabel = !!marks?.some((mark) => mark.label)\n\n return (\n <ChakraSlider.Root ref={ref} thumbAlignment=\"center\" {...rest}>\n {label && !showValue && (\n <ChakraSlider.Label>{label}</ChakraSlider.Label>\n )}\n {label && showValue && (\n <HStack justify=\"space-between\">\n <ChakraSlider.Label>{label}</ChakraSlider.Label>\n <ChakraSlider.ValueText />\n </HStack>\n )}\n <ChakraSlider.Control data-has-mark-label={hasMarkLabel || undefined}>\n <ChakraSlider.Track>\n <ChakraSlider.Range />\n </ChakraSlider.Track>\n <SliderThumbs value={value} />\n <SliderMarks marks={marks} />\n </ChakraSlider.Control>\n </ChakraSlider.Root>\n )\n },\n)\n\nfunction SliderThumbs(props: { value?: number[] }) {\n const { value } = props\n return (\n <For each={value}>\n {(_, index) => (\n <ChakraSlider.Thumb key={index} index={index}>\n <ChakraSlider.HiddenInput />\n </ChakraSlider.Thumb>\n )}\n </For>\n )\n}\n\ninterface SliderMarksProps {\n marks?: Array<number | { value: number; label: React.ReactNode }>\n}\n\nconst SliderMarks = React.forwardRef<HTMLDivElement, SliderMarksProps>(\n function SliderMarks(props, ref) {\n const { marks } = props\n if (!marks?.length) return null\n\n return (\n <ChakraSlider.MarkerGroup ref={ref}>\n {marks.map((mark, index) => {\n const value = typeof mark === \"number\" ? mark : mark.value\n const label = typeof mark === \"number\" ? undefined : mark.label\n return (\n <ChakraSlider.Marker key={index} value={value}>\n <ChakraSlider.MarkerIndicator />\n {label}\n </ChakraSlider.Marker>\n )\n })}\n </ChakraSlider.MarkerGroup>\n )\n },\n)\n"],"names":["Slider","ChakraSlider","SliderMarks"],"mappings":";;;;AASO,MA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EAEJ;AACF,CAAA;;;;"}
|
package/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sources":["status.tsx"],"sourcesContent":["import type { ColorPalette } from \"@chakra-ui/react\"\nimport { Status as ChakraStatus } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ntype StatusValue = \"success\" | \"error\" | \"warning\" | \"info\"\n\nexport interface StatusProps extends ChakraStatus.RootProps {\n value?: StatusValue\n}\n\nconst statusMap: Record<StatusValue, ColorPalette> = {\n success: \"green\",\n error: \"red\",\n warning: \"orange\",\n info: \"blue\",\n}\n\nexport const Status = React.forwardRef<HTMLDivElement, StatusProps>(\n function Status(props, ref) {\n const { children, value = \"info\", ...rest } = props\n const colorPalette = rest.colorPalette ?? statusMap[value]\n return (\n <ChakraStatus.Root ref={ref} {...rest} colorPalette={colorPalette}>\n <ChakraStatus.Indicator />\n {children}\n </ChakraStatus.Root>\n )\n },\n)\n"],"names":["Status","ChakraStatus"],"mappings":";;;;AAUA,MAAM,
|
|
1
|
+
{"version":3,"file":"status.js","sources":["status.tsx"],"sourcesContent":["import type { ColorPalette } from \"@chakra-ui/react\"\nimport { Status as ChakraStatus } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ntype StatusValue = \"success\" | \"error\" | \"warning\" | \"info\"\n\nexport interface StatusProps extends ChakraStatus.RootProps {\n value?: StatusValue\n}\n\nconst statusMap: Record<StatusValue, ColorPalette> = {\n success: \"green\",\n error: \"red\",\n warning: \"orange\",\n info: \"blue\",\n}\n\nexport const Status = React.forwardRef<HTMLDivElement, StatusProps>(\n function Status(props, ref) {\n const { children, value = \"info\", ...rest } = props\n const colorPalette = rest.colorPalette ?? statusMap[value]\n return (\n <ChakraStatus.Root ref={ref} {...rest} colorPalette={colorPalette}>\n <ChakraStatus.Indicator />\n {children}\n </ChakraStatus.Root>\n )\n },\n)\n"],"names":["Status","ChakraStatus"],"mappings":";;;;AAUA,MAAM,SAAA,GAA+C;AAAA,EACnD,OAAA,EAAS,OAAA;AAAA,EACT,KAAA,EAAO,KAAA;AAAA,EACP,OAAA,EAAS,QAAA;AAAA,EACT,IAAA,EAAM;AACR,CAAA;AAEO,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EAC1B,SAASA,OAAAA,CAAO,KAAA,EAAO,GAAA,EAAK;AAC1B,IAAA,MAAM,EAAE,QAAA,EAAU,KAAA,GAAQ,MAAA,EAAQ,GAAG,MAAK,GAAI,KAAA;AAC9C,IAAA,MAAM,YAAA,GAAe,IAAA,CAAK,YAAA,IAAgB,SAAA,CAAU,KAAK,CAAA;AACzD,IAAA,4BACGC,QAAA,CAAa,IAAA,EAAb,EAAkB,GAAA,EAAW,GAAG,MAAM,YAAA,EACrC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,QAAA,CAAa,WAAb,EAAuB,CAAA;AAAA,MACvB;AAAA,KAAA,EACH,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/stepper-input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stepper-input.js","sources":["stepper-input.tsx"],"sourcesContent":["import { HStack, IconButton, NumberInput } from \"@chakra-ui/react\"\nimport * as React from \"react\"\nimport { LuMinus, LuPlus } from \"react-icons/lu\"\n\nexport interface StepperInputProps extends NumberInput.RootProps {\n label?: React.ReactNode\n}\n\nexport const StepperInput = React.forwardRef<HTMLDivElement, StepperInputProps>(\n function StepperInput(props, ref) {\n const { label, ...rest } = props\n return (\n <NumberInput.Root {...rest} unstyled ref={ref}>\n {label && <NumberInput.Label>{label}</NumberInput.Label>}\n <HStack gap=\"2\">\n <DecrementTrigger />\n <NumberInput.ValueText textAlign=\"center\" fontSize=\"lg\" minW=\"3ch\" />\n <IncrementTrigger />\n </HStack>\n </NumberInput.Root>\n )\n },\n)\n\nconst DecrementTrigger = React.forwardRef<\n HTMLButtonElement,\n NumberInput.DecrementTriggerProps\n>(function DecrementTrigger(props, ref) {\n return (\n <NumberInput.DecrementTrigger {...props} asChild ref={ref}>\n <IconButton variant=\"outline\" size=\"sm\">\n <LuMinus />\n </IconButton>\n </NumberInput.DecrementTrigger>\n )\n})\n\nconst IncrementTrigger = React.forwardRef<\n HTMLButtonElement,\n NumberInput.IncrementTriggerProps\n>(function IncrementTrigger(props, ref) {\n return (\n <NumberInput.IncrementTrigger {...props} asChild ref={ref}>\n <IconButton variant=\"outline\" size=\"sm\">\n <LuPlus />\n </IconButton>\n </NumberInput.IncrementTrigger>\n )\n})\n"],"names":["StepperInput","DecrementTrigger","IncrementTrigger"],"mappings":";;;;;AAQO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"stepper-input.js","sources":["stepper-input.tsx"],"sourcesContent":["import { HStack, IconButton, NumberInput } from \"@chakra-ui/react\"\nimport * as React from \"react\"\nimport { LuMinus, LuPlus } from \"react-icons/lu\"\n\nexport interface StepperInputProps extends NumberInput.RootProps {\n label?: React.ReactNode\n}\n\nexport const StepperInput = React.forwardRef<HTMLDivElement, StepperInputProps>(\n function StepperInput(props, ref) {\n const { label, ...rest } = props\n return (\n <NumberInput.Root {...rest} unstyled ref={ref}>\n {label && <NumberInput.Label>{label}</NumberInput.Label>}\n <HStack gap=\"2\">\n <DecrementTrigger />\n <NumberInput.ValueText textAlign=\"center\" fontSize=\"lg\" minW=\"3ch\" />\n <IncrementTrigger />\n </HStack>\n </NumberInput.Root>\n )\n },\n)\n\nconst DecrementTrigger = React.forwardRef<\n HTMLButtonElement,\n NumberInput.DecrementTriggerProps\n>(function DecrementTrigger(props, ref) {\n return (\n <NumberInput.DecrementTrigger {...props} asChild ref={ref}>\n <IconButton variant=\"outline\" size=\"sm\">\n <LuMinus />\n </IconButton>\n </NumberInput.DecrementTrigger>\n )\n})\n\nconst IncrementTrigger = React.forwardRef<\n HTMLButtonElement,\n NumberInput.IncrementTriggerProps\n>(function IncrementTrigger(props, ref) {\n return (\n <NumberInput.IncrementTrigger {...props} asChild ref={ref}>\n <IconButton variant=\"outline\" size=\"sm\">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AA,CAAiB,OAAO,GAAA,EAAK;AACtC,EAAA,2BACG,WAAA,CAAY,gBAAA,EAAZ,EAA8B,GAAG,KAAA,EAAO,SAAO,IAAA,EAAC,GAAA,EAC/C,QAAA,kBAAA,GAAA,CAAC,UAAA,EAAA,EAAW,SAAQ,SAAA,EAAU,IAAA,EAAK,MACjC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,GACV,CAAA,EACF,CAAA;AAEJ,CAAC,CAAA;;;;"}
|
package/switch.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Switch as ChakraSwitch } from "@chakra-ui/react";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface SwitchProps extends ChakraSwitch.RootProps {
|
|
4
4
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
5
|
-
rootRef?: React.
|
|
5
|
+
rootRef?: React.RefObject<HTMLLabelElement | null>;
|
|
6
6
|
trackLabel?: {
|
|
7
7
|
on: React.ReactNode;
|
|
8
8
|
off: React.ReactNode;
|
package/switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.js","sources":["switch.tsx"],"sourcesContent":["import { Switch as ChakraSwitch } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface SwitchProps extends ChakraSwitch.RootProps {\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n rootRef?: React.
|
|
1
|
+
{"version":3,"file":"switch.js","sources":["switch.tsx"],"sourcesContent":["import { Switch as ChakraSwitch } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface SwitchProps extends ChakraSwitch.RootProps {\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>\n rootRef?: React.RefObject<HTMLLabelElement | null>\n trackLabel?: { on: React.ReactNode; off: React.ReactNode }\n thumbLabel?: { on: React.ReactNode; off: React.ReactNode }\n}\n\nexport const Switch = React.forwardRef<HTMLInputElement, SwitchProps>(\n function Switch(props, ref) {\n const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } =\n props\n\n return (\n <ChakraSwitch.Root ref={rootRef} {...rest}>\n <ChakraSwitch.HiddenInput ref={ref} {...inputProps} />\n <ChakraSwitch.Control>\n <ChakraSwitch.Thumb>\n {thumbLabel && (\n <ChakraSwitch.ThumbIndicator fallback={thumbLabel?.off}>\n {thumbLabel?.on}\n </ChakraSwitch.ThumbIndicator>\n )}\n </ChakraSwitch.Thumb>\n {trackLabel && (\n <ChakraSwitch.Indicator fallback={trackLabel.off}>\n {trackLabel.on}\n </ChakraSwitch.Indicator>\n )}\n </ChakraSwitch.Control>\n {children != null && (\n <ChakraSwitch.Label>{children}</ChakraSwitch.Label>\n )}\n </ChakraSwitch.Root>\n )\n },\n)\n"],"names":["Switch","ChakraSwitch"],"mappings":";;;;AAUO,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EAC1B,SAASA,OAAAA,CAAO,KAAA,EAAO,GAAA,EAAK;AAC1B,IAAA,MAAM,EAAE,YAAY,QAAA,EAAU,OAAA,EAAS,YAAY,UAAA,EAAY,GAAG,MAAK,GACrE,KAAA;AAEF,IAAA,4BACGC,QAAA,CAAa,IAAA,EAAb,EAAkB,GAAA,EAAK,OAAA,EAAU,GAAG,IAAA,EACnC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAACA,QAAA,CAAa,WAAA,EAAb,EAAyB,GAAA,EAAW,GAAG,UAAA,EAAY,CAAA;AAAA,sBACpD,IAAA,CAACA,QAAA,CAAa,OAAA,EAAb,EACC,QAAA,EAAA;AAAA,wBAAA,GAAA,CAACA,QAAA,CAAa,KAAA,EAAb,EACE,QAAA,EAAA,UAAA,oBACC,GAAA,CAACA,QAAA,CAAa,cAAA,EAAb,EAA4B,QAAA,EAAU,UAAA,EAAY,GAAA,EAChD,QAAA,EAAA,UAAA,EAAY,IACf,CAAA,EAEJ,CAAA;AAAA,QACC,UAAA,wBACEA,QAAA,CAAa,SAAA,EAAb,EAAuB,QAAA,EAAU,UAAA,CAAW,GAAA,EAC1C,QAAA,EAAA,UAAA,CAAW,EAAA,EACd;AAAA,OAAA,EAEJ,CAAA;AAAA,MACC,YAAY,IAAA,oBACX,GAAA,CAACA,QAAA,CAAa,KAAA,EAAb,EAAoB,QAAA,EAAS;AAAA,KAAA,EAElC,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.js","sources":["tag.tsx"],"sourcesContent":["import { Tag as ChakraTag } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface TagProps extends ChakraTag.RootProps {\n startElement?: React.ReactNode\n endElement?: React.ReactNode\n onClose?: VoidFunction\n closable?: boolean\n}\n\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(\n function Tag(props, ref) {\n const {\n startElement,\n endElement,\n onClose,\n closable = !!onClose,\n children,\n ...rest\n } = props\n\n return (\n <ChakraTag.Root ref={ref} {...rest}>\n {startElement && (\n <ChakraTag.StartElement>{startElement}</ChakraTag.StartElement>\n )}\n <ChakraTag.Label>{children}</ChakraTag.Label>\n {endElement && (\n <ChakraTag.EndElement>{endElement}</ChakraTag.EndElement>\n )}\n {closable && (\n <ChakraTag.EndElement>\n <ChakraTag.CloseTrigger onClick={onClose} />\n </ChakraTag.EndElement>\n )}\n </ChakraTag.Root>\n )\n },\n)\n"],"names":["Tag","ChakraTag"],"mappings":";;;;AAUO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tag.js","sources":["tag.tsx"],"sourcesContent":["import { Tag as ChakraTag } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface TagProps extends ChakraTag.RootProps {\n startElement?: React.ReactNode\n endElement?: React.ReactNode\n onClose?: VoidFunction\n closable?: boolean\n}\n\nexport const Tag = React.forwardRef<HTMLSpanElement, TagProps>(\n function Tag(props, ref) {\n const {\n startElement,\n endElement,\n onClose,\n closable = !!onClose,\n children,\n ...rest\n } = props\n\n return (\n <ChakraTag.Root ref={ref} {...rest}>\n {startElement && (\n <ChakraTag.StartElement>{startElement}</ChakraTag.StartElement>\n )}\n <ChakraTag.Label>{children}</ChakraTag.Label>\n {endElement && (\n <ChakraTag.EndElement>{endElement}</ChakraTag.EndElement>\n )}\n {closable && (\n <ChakraTag.EndElement>\n <ChakraTag.CloseTrigger onClick={onClose} />\n </ChakraTag.EndElement>\n )}\n </ChakraTag.Root>\n )\n },\n)\n"],"names":["Tag","ChakraTag"],"mappings":";;;;AAUO,MAAM,MAAM,KAAA,CAAM,UAAA;AAAA,EACvB,SAASA,IAAAA,CAAI,KAAA,EAAO,GAAA,EAAK;AACvB,IAAA,MAAM;AAAA,MACJ,YAAA;AAAA,MACA,UAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA,GAAW,CAAC,CAAC,OAAA;AAAA,MACb,QAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,4BACGC,KAAA,CAAU,IAAA,EAAV,EAAe,GAAA,EAAW,GAAG,IAAA,EAC3B,QAAA,EAAA;AAAA,MAAA,YAAA,oBACC,GAAA,CAACA,KAAA,CAAU,YAAA,EAAV,EAAwB,QAAA,EAAA,YAAA,EAAa,CAAA;AAAA,sBAExC,GAAA,CAACA,KAAA,CAAU,KAAA,EAAV,EAAiB,QAAA,EAAS,CAAA;AAAA,MAC1B,UAAA,oBACC,GAAA,CAACA,KAAA,CAAU,UAAA,EAAV,EAAsB,QAAA,EAAA,UAAA,EAAW,CAAA;AAAA,MAEnC,QAAA,oBACC,GAAA,CAACA,KAAA,CAAU,UAAA,EAAV,EACC,QAAA,kBAAA,GAAA,CAACA,KAAA,CAAU,YAAA,EAAV,EAAuB,OAAA,EAAS,OAAA,EAAS,CAAA,EAC5C;AAAA,KAAA,EAEJ,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/toggle-tip.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Popover as ChakraPopover } from "@chakra-ui/react";
|
|
1
|
+
import { Popover as ChakraPopover, type IconButtonProps } from "@chakra-ui/react";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface ToggleTipProps extends ChakraPopover.RootProps {
|
|
4
4
|
showArrow?: boolean;
|
|
@@ -7,4 +7,7 @@ export interface ToggleTipProps extends ChakraPopover.RootProps {
|
|
|
7
7
|
content?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export declare const ToggleTip: React.ForwardRefExoticComponent<ToggleTipProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
-
export
|
|
10
|
+
export interface InfoTipProps extends Partial<ToggleTipProps> {
|
|
11
|
+
buttonProps?: IconButtonProps | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare const InfoTip: React.ForwardRefExoticComponent<InfoTipProps & React.RefAttributes<HTMLDivElement>>;
|
package/toggle-tip.js
CHANGED
|
@@ -40,19 +40,22 @@ const ToggleTip = React.forwardRef(
|
|
|
40
40
|
);
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
const InfoTip = React.forwardRef(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
43
|
+
const InfoTip = React.forwardRef(
|
|
44
|
+
function InfoTip2(props, ref) {
|
|
45
|
+
const { children, buttonProps, ...rest } = props;
|
|
46
|
+
return /* @__PURE__ */ jsx(ToggleTip, { content: children, ...rest, ref, children: /* @__PURE__ */ jsx(
|
|
47
|
+
IconButton,
|
|
48
|
+
{
|
|
49
|
+
variant: "ghost",
|
|
50
|
+
"aria-label": "info",
|
|
51
|
+
size: "2xs",
|
|
52
|
+
colorPalette: "gray",
|
|
53
|
+
...buttonProps,
|
|
54
|
+
children: /* @__PURE__ */ jsx(HiOutlineInformationCircle, {})
|
|
55
|
+
}
|
|
56
|
+
) });
|
|
57
|
+
}
|
|
58
|
+
);
|
|
56
59
|
|
|
57
60
|
export { InfoTip, ToggleTip };
|
|
58
61
|
//# sourceMappingURL=toggle-tip.js.map
|
package/toggle-tip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-tip.js","sources":["toggle-tip.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"toggle-tip.js","sources":["toggle-tip.tsx"],"sourcesContent":["import {\n Popover as ChakraPopover,\n IconButton,\n type IconButtonProps,\n Portal,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\nimport { HiOutlineInformationCircle } from \"react-icons/hi\"\n\nexport interface ToggleTipProps extends ChakraPopover.RootProps {\n showArrow?: boolean\n portalled?: boolean\n portalRef?: React.RefObject<HTMLElement>\n content?: React.ReactNode\n}\n\nexport const ToggleTip = React.forwardRef<HTMLDivElement, ToggleTipProps>(\n function ToggleTip(props, ref) {\n const {\n showArrow,\n children,\n portalled = true,\n content,\n portalRef,\n ...rest\n } = props\n\n return (\n <ChakraPopover.Root\n {...rest}\n positioning={{ ...rest.positioning, gutter: 4 }}\n >\n <ChakraPopover.Trigger asChild>{children}</ChakraPopover.Trigger>\n <Portal disabled={!portalled} container={portalRef}>\n <ChakraPopover.Positioner>\n <ChakraPopover.Content\n width=\"auto\"\n px=\"2\"\n py=\"1\"\n textStyle=\"xs\"\n rounded=\"sm\"\n ref={ref}\n >\n {showArrow && (\n <ChakraPopover.Arrow>\n <ChakraPopover.ArrowTip />\n </ChakraPopover.Arrow>\n )}\n {content}\n </ChakraPopover.Content>\n </ChakraPopover.Positioner>\n </Portal>\n </ChakraPopover.Root>\n )\n },\n)\n\nexport interface InfoTipProps extends Partial<ToggleTipProps> {\n buttonProps?: IconButtonProps | undefined\n}\n\nexport const InfoTip = React.forwardRef<HTMLDivElement, InfoTipProps>(\n function InfoTip(props, ref) {\n const { children, buttonProps, ...rest } = props\n return (\n <ToggleTip content={children} {...rest} ref={ref}>\n <IconButton\n variant=\"ghost\"\n aria-label=\"info\"\n size=\"2xs\"\n colorPalette=\"gray\"\n {...buttonProps}\n >\n <HiOutlineInformationCircle />\n </IconButton>\n </ToggleTip>\n )\n },\n)\n"],"names":["ToggleTip","ChakraPopover","InfoTip"],"mappings":";;;;;AAgBO,MAAM,YAAY,KAAA,CAAM,UAAA;AAAA,EAC7B,SAASA,UAAAA,CAAU,KAAA,EAAO,GAAA,EAAK;AAC7B,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA,GAAY,IAAA;AAAA,MACZ,OAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,uBACE,IAAA;AAAA,MAACC,OAAA,CAAc,IAAA;AAAA,MAAd;AAAA,QACE,GAAG,IAAA;AAAA,QACJ,aAAa,EAAE,GAAG,IAAA,CAAK,WAAA,EAAa,QAAQ,CAAA,EAAE;AAAA,QAE9C,QAAA,EAAA;AAAA,0BAAA,GAAA,CAACA,OAAA,CAAc,OAAA,EAAd,EAAsB,OAAA,EAAO,MAAE,QAAA,EAAS,CAAA;AAAA,0BACzC,GAAA,CAAC,MAAA,EAAA,EAAO,QAAA,EAAU,CAAC,SAAA,EAAW,WAAW,SAAA,EACvC,QAAA,kBAAA,GAAA,CAACA,OAAA,CAAc,UAAA,EAAd,EACC,QAAA,kBAAA,IAAA;AAAA,YAACA,OAAA,CAAc,OAAA;AAAA,YAAd;AAAA,cACC,KAAA,EAAM,MAAA;AAAA,cACN,EAAA,EAAG,GAAA;AAAA,cACH,EAAA,EAAG,GAAA;AAAA,cACH,SAAA,EAAU,IAAA;AAAA,cACV,OAAA,EAAQ,IAAA;AAAA,cACR,GAAA;AAAA,cAEC,QAAA,EAAA;AAAA,gBAAA,SAAA,oBACC,GAAA,CAACA,QAAc,KAAA,EAAd,EACC,8BAACA,OAAA,CAAc,QAAA,EAAd,EAAuB,CAAA,EAC1B,CAAA;AAAA,gBAED;AAAA;AAAA;AAAA,aAEL,CAAA,EACF;AAAA;AAAA;AAAA,KACF;AAAA,EAEJ;AACF;AAMO,MAAM,UAAU,KAAA,CAAM,UAAA;AAAA,EAC3B,SAASC,QAAAA,CAAQ,KAAA,EAAO,GAAA,EAAK;AAC3B,IAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAa,GAAG,MAAK,GAAI,KAAA;AAC3C,IAAA,2BACG,SAAA,EAAA,EAAU,OAAA,EAAS,QAAA,EAAW,GAAG,MAAM,GAAA,EACtC,QAAA,kBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,OAAA,EAAQ,OAAA;AAAA,QACR,YAAA,EAAW,MAAA;AAAA,QACX,IAAA,EAAK,KAAA;AAAA,QACL,YAAA,EAAa,MAAA;AAAA,QACZ,GAAG,WAAA;AAAA,QAEJ,8BAAC,0BAAA,EAAA,EAA2B;AAAA;AAAA,KAC9B,EACF,CAAA;AAAA,EAEJ;AACF;;;;"}
|
package/toggle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle.js","sources":["toggle.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ButtonProps } from \"@chakra-ui/react\"\nimport {\n Button,\n Toggle as ChakraToggle,\n useToggleContext,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ninterface ToggleProps extends ChakraToggle.RootProps {\n variant?: keyof typeof variantMap\n size?: ButtonProps[\"size\"]\n}\n\nconst variantMap = {\n solid: { on: \"solid\", off: \"outline\" },\n surface: { on: \"surface\", off: \"outline\" },\n subtle: { on: \"subtle\", off: \"ghost\" },\n ghost: { on: \"subtle\", off: \"ghost\" },\n} as const\n\nexport const Toggle = React.forwardRef<HTMLButtonElement, ToggleProps>(\n function Toggle(props, ref) {\n const { variant = \"subtle\", size, children, ...rest } = props\n const variantConfig = variantMap[variant]\n\n return (\n <ChakraToggle.Root asChild {...rest}>\n <ToggleBaseButton size={size} variant={variantConfig} ref={ref}>\n {children}\n </ToggleBaseButton>\n </ChakraToggle.Root>\n )\n },\n)\n\ninterface ToggleBaseButtonProps extends Omit<ButtonProps, \"variant\"> {\n variant: Record<\"on\" | \"off\", ButtonProps[\"variant\"]>\n}\n\nconst ToggleBaseButton = React.forwardRef<\n HTMLButtonElement,\n ToggleBaseButtonProps\n>(function ToggleBaseButton(props, ref) {\n const toggle = useToggleContext()\n const { variant, ...rest } = props\n return (\n <Button\n variant={toggle.pressed ? variant.on : variant.off}\n ref={ref}\n {...rest}\n />\n )\n})\n\nexport const ToggleIndicator = ChakraToggle.Indicator\n"],"names":["Toggle","ChakraToggle","ToggleBaseButton"],"mappings":";;;;AAeA,MAAM,
|
|
1
|
+
{"version":3,"file":"toggle.js","sources":["toggle.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ButtonProps } from \"@chakra-ui/react\"\nimport {\n Button,\n Toggle as ChakraToggle,\n useToggleContext,\n} from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\ninterface ToggleProps extends ChakraToggle.RootProps {\n variant?: keyof typeof variantMap\n size?: ButtonProps[\"size\"]\n}\n\nconst variantMap = {\n solid: { on: \"solid\", off: \"outline\" },\n surface: { on: \"surface\", off: \"outline\" },\n subtle: { on: \"subtle\", off: \"ghost\" },\n ghost: { on: \"subtle\", off: \"ghost\" },\n} as const\n\nexport const Toggle = React.forwardRef<HTMLButtonElement, ToggleProps>(\n function Toggle(props, ref) {\n const { variant = \"subtle\", size, children, ...rest } = props\n const variantConfig = variantMap[variant]\n\n return (\n <ChakraToggle.Root asChild {...rest}>\n <ToggleBaseButton size={size} variant={variantConfig} ref={ref}>\n {children}\n </ToggleBaseButton>\n </ChakraToggle.Root>\n )\n },\n)\n\ninterface ToggleBaseButtonProps extends Omit<ButtonProps, \"variant\"> {\n variant: Record<\"on\" | \"off\", ButtonProps[\"variant\"]>\n}\n\nconst ToggleBaseButton = React.forwardRef<\n HTMLButtonElement,\n ToggleBaseButtonProps\n>(function ToggleBaseButton(props, ref) {\n const toggle = useToggleContext()\n const { variant, ...rest } = props\n return (\n <Button\n variant={toggle.pressed ? variant.on : variant.off}\n ref={ref}\n {...rest}\n />\n )\n})\n\nexport const ToggleIndicator = ChakraToggle.Indicator\n"],"names":["Toggle","ChakraToggle","ToggleBaseButton"],"mappings":";;;;AAeA,MAAM,UAAA,GAAa;AAAA,EACjB,KAAA,EAAO,EAAE,EAAA,EAAI,OAAA,EAAS,KAAK,SAAA,EAAU;AAAA,EACrC,OAAA,EAAS,EAAE,EAAA,EAAI,SAAA,EAAW,KAAK,SAAA,EAAU;AAAA,EACzC,MAAA,EAAQ,EAAE,EAAA,EAAI,QAAA,EAAU,KAAK,OAAA,EAAQ;AAAA,EACrC,KAAA,EAAO,EAAE,EAAA,EAAI,QAAA,EAAU,KAAK,OAAA;AAC9B,CAAA;AAEO,MAAM,SAAS,KAAA,CAAM,UAAA;AAAA,EAC1B,SAASA,OAAAA,CAAO,KAAA,EAAO,GAAA,EAAK;AAC1B,IAAA,MAAM,EAAE,OAAA,GAAU,QAAA,EAAU,MAAM,QAAA,EAAU,GAAG,MAAK,GAAI,KAAA;AACxD,IAAA,MAAM,aAAA,GAAgB,WAAW,OAAO,CAAA;AAExC,IAAA,uBACE,GAAA,CAACC,QAAA,CAAa,IAAA,EAAb,EAAkB,SAAO,IAAA,EAAE,GAAG,IAAA,EAC7B,QAAA,kBAAA,GAAA,CAAC,oBAAiB,IAAA,EAAY,OAAA,EAAS,aAAA,EAAe,GAAA,EACnD,UACH,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;AAMA,MAAM,mBAAmB,KAAA,CAAM,UAAA,CAG7B,SAASC,iBAAAA,CAAiB,OAAO,GAAA,EAAK;AACtC,EAAA,MAAM,SAAS,gBAAA,EAAiB;AAChC,EAAA,MAAM,EAAE,OAAA,EAAS,GAAG,IAAA,EAAK,GAAI,KAAA;AAC7B,EAAA,uBACE,GAAA;AAAA,IAAC,MAAA;AAAA,IAAA;AAAA,MACC,OAAA,EAAS,MAAA,CAAO,OAAA,GAAU,OAAA,CAAQ,KAAK,OAAA,CAAQ,GAAA;AAAA,MAC/C,GAAA;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ,CAAC,CAAA;AAEM,MAAM,kBAAkBD,QAAA,CAAa;;;;"}
|
package/tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sources":["tooltip.tsx"],"sourcesContent":["import { Tooltip as ChakraTooltip, Portal } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface TooltipProps extends ChakraTooltip.RootProps {\n showArrow?: boolean\n portalled?: boolean\n portalRef?: React.RefObject<HTMLElement>\n content: React.ReactNode\n contentProps?: ChakraTooltip.ContentProps\n disabled?: boolean\n}\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(\n function Tooltip(props, ref) {\n const {\n showArrow,\n children,\n disabled,\n portalled = true,\n content,\n contentProps,\n portalRef,\n //PATCH shorter default delay\n openDelay = 500,\n ...rest\n } = props\n\n if (disabled) return children\n\n return (\n //PATCH apply open delay\n <ChakraTooltip.Root openDelay={openDelay} {...rest}>\n <ChakraTooltip.Trigger asChild>{children}</ChakraTooltip.Trigger>\n <Portal disabled={!portalled} container={portalRef}>\n <ChakraTooltip.Positioner>\n <ChakraTooltip.Content ref={ref} {...contentProps}>\n {showArrow && (\n <ChakraTooltip.Arrow>\n <ChakraTooltip.ArrowTip />\n </ChakraTooltip.Arrow>\n )}\n {content}\n </ChakraTooltip.Content>\n </ChakraTooltip.Positioner>\n </Portal>\n </ChakraTooltip.Root>\n )\n },\n)\n"],"names":["Tooltip","ChakraTooltip"],"mappings":";;;;AAYO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"tooltip.js","sources":["tooltip.tsx"],"sourcesContent":["import { Tooltip as ChakraTooltip, Portal } from \"@chakra-ui/react\"\nimport * as React from \"react\"\n\nexport interface TooltipProps extends ChakraTooltip.RootProps {\n showArrow?: boolean\n portalled?: boolean\n portalRef?: React.RefObject<HTMLElement>\n content: React.ReactNode\n contentProps?: ChakraTooltip.ContentProps\n disabled?: boolean\n}\n\nexport const Tooltip = React.forwardRef<HTMLDivElement, TooltipProps>(\n function Tooltip(props, ref) {\n const {\n showArrow,\n children,\n disabled,\n portalled = true,\n content,\n contentProps,\n portalRef,\n //PATCH shorter default delay\n openDelay = 500,\n ...rest\n } = props\n\n if (disabled) return children\n\n return (\n //PATCH apply open delay\n <ChakraTooltip.Root openDelay={openDelay} {...rest}>\n <ChakraTooltip.Trigger asChild>{children}</ChakraTooltip.Trigger>\n <Portal disabled={!portalled} container={portalRef}>\n <ChakraTooltip.Positioner>\n <ChakraTooltip.Content ref={ref} {...contentProps}>\n {showArrow && (\n <ChakraTooltip.Arrow>\n <ChakraTooltip.ArrowTip />\n </ChakraTooltip.Arrow>\n )}\n {content}\n </ChakraTooltip.Content>\n </ChakraTooltip.Positioner>\n </Portal>\n </ChakraTooltip.Root>\n )\n },\n)\n"],"names":["Tooltip","ChakraTooltip"],"mappings":";;;;AAYO,MAAM,UAAU,KAAA,CAAM,UAAA;AAAA,EAC3B,SAASA,QAAAA,CAAQ,KAAA,EAAO,GAAA,EAAK;AAC3B,IAAA,MAAM;AAAA,MACJ,SAAA;AAAA,MACA,QAAA;AAAA,MACA,QAAA;AAAA,MACA,SAAA,GAAY,IAAA;AAAA,MACZ,OAAA;AAAA,MACA,YAAA;AAAA,MACA,SAAA;AAAA;AAAA,MAEA,SAAA,GAAY,GAAA;AAAA,MACZ,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,IAAI,UAAU,OAAO,QAAA;AAErB,IAAA;AAAA;AAAA,2BAEGC,SAAA,CAAc,IAAA,EAAd,EAAmB,SAAA,EAAuB,GAAG,IAAA,EAC5C,QAAA,EAAA;AAAA,wBAAA,GAAA,CAACA,SAAA,CAAc,OAAA,EAAd,EAAsB,OAAA,EAAO,MAAE,QAAA,EAAS,CAAA;AAAA,4BACxC,MAAA,EAAA,EAAO,QAAA,EAAU,CAAC,SAAA,EAAW,WAAW,SAAA,EACvC,QAAA,kBAAA,GAAA,CAACA,SAAA,CAAc,UAAA,EAAd,EACC,QAAA,kBAAA,IAAA,CAACA,SAAA,CAAc,SAAd,EAAsB,GAAA,EAAW,GAAG,YAAA,EAClC,QAAA,EAAA;AAAA,UAAA,SAAA,oBACC,GAAA,CAACA,UAAc,KAAA,EAAd,EACC,8BAACA,SAAA,CAAc,QAAA,EAAd,EAAuB,CAAA,EAC1B,CAAA;AAAA,UAED;AAAA,SAAA,EACH,GACF,CAAA,EACF;AAAA,OAAA,EACF;AAAA;AAAA,EAEJ;AACF;;;;"}
|