@stokelp/ui 2.104.0 → 2.104.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs +1 -1
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.cjs.map +1 -1
- package/dist/components/app/mobile-card/MobileCardNotificationBadge.js +1 -1
- package/dist/components/app/mobile-navigation/MobileNavigation.d.ts +4 -5
- package/dist/components/app/navigation/AppNavigation.cjs +1 -1
- package/dist/components/app/navigation/AppNavigation.cjs.map +1 -1
- package/dist/components/app/navigation/AppNavigation.d.ts +11 -11
- package/dist/components/app/navigation/AppNavigation.js +1 -1
- package/dist/components/avatar/styled.d.ts +9 -5
- package/dist/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/button/Button.d.ts +8 -4
- package/dist/components/button-filter/ButtonFilter.d.ts +5 -4
- package/dist/components/chat/Chat.d.ts +9 -4
- package/dist/components/chat/ChatDocumentMessage.cjs +1 -1
- package/dist/components/chat/ChatDocumentMessage.cjs.map +1 -1
- package/dist/components/chat/ChatDocumentMessage.js +2 -2
- package/dist/components/chat/ChatMessage.d.ts +7 -4
- package/dist/components/checkbox-card/CheckboxCard.d.ts +2 -2
- package/dist/components/chip/Chip.d.ts +1 -1
- package/dist/components/drawer/Drawer.cjs +1 -1
- package/dist/components/drawer/Drawer.cjs.map +1 -1
- package/dist/components/drawer/Drawer.js +25 -18
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/flag/styled.d.ts +7 -5
- package/dist/components/form/FormControl.d.ts +1 -1
- package/dist/components/form/FormHelperText.d.ts +1 -1
- package/dist/components/form/FormLabel.d.ts +1 -1
- package/dist/components/input/HighlightedInput.d.ts +4 -4
- package/dist/components/input/Input.d.ts +1 -1
- package/dist/components/input/InputAddon.d.ts +5 -4
- package/dist/components/input/InputGroup.d.ts +1 -1
- package/dist/components/pagination/Pagination.d.ts +1 -1
- package/dist/components/radio-card-group/RadioCardGroup.d.ts +2 -2
- package/dist/components/switch-card/SwitchCard.d.ts +2 -2
- package/dist/components/table/Table.d.ts +9 -9
- package/dist/components/tabs/Tabs.d.ts +8 -4
- package/dist/components/textarea/Textarea.d.ts +5 -4
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +2 -0
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ArrowDownTrayIcon.cjs.map +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ArrowDownTrayIcon.js +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ArrowDownTrayIcon.js.map +1 -1
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +2 -0
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ArrowLeftCircleIcon.cjs.map +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ArrowLeftCircleIcon.js +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ArrowLeftCircleIcon.js.map +1 -1
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs +2 -0
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs.map +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ChatBubbleLeftRightIcon.js +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/ChatBubbleLeftRightIcon.js.map +1 -1
- package/dist/node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +2 -0
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/DocumentTextIcon.cjs.map +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/DocumentTextIcon.js +1 -1
- package/dist/node_modules/{@heroicons → .pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons}/react/24/outline/esm/DocumentTextIcon.js.map +1 -1
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.cjs +2 -0
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.cjs.map +1 -0
- package/dist/node_modules/{deepmerge → .pnpm/deepmerge@4.3.1/node_modules/deepmerge}/dist/cjs.js +2 -2
- package/dist/node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js.map +1 -0
- package/dist/preset.d.ts +1 -1
- package/dist/theme/globalCss.d.ts +1 -1
- package/dist/theme/keyframes.d.ts +1 -1
- package/dist/theme/recipes/accordion.d.ts +1 -1
- package/dist/theme/recipes/action-card.d.ts +1 -1
- package/dist/theme/recipes/alert.d.ts +1 -1
- package/dist/theme/recipes/app/mobile-navigation.d.ts +1 -1
- package/dist/theme/recipes/app/navigation-language-select.d.ts +1 -1
- package/dist/theme/recipes/app/navigation.d.ts +1 -1
- package/dist/theme/recipes/app/price-tag.d.ts +1 -1
- package/dist/theme/recipes/app/product-card-catalog.d.ts +1 -1
- package/dist/theme/recipes/avatar-group.d.ts +1 -1
- package/dist/theme/recipes/avatar.d.ts +1 -1
- package/dist/theme/recipes/breadcrumb.d.ts +1 -1
- package/dist/theme/recipes/button-filter.d.ts +1 -1
- package/dist/theme/recipes/button.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-document-message.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-input-text.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-message.d.ts +1 -1
- package/dist/theme/recipes/chat/chat-profile-avatar.d.ts +1 -1
- package/dist/theme/recipes/chat/chat.d.ts +1 -1
- package/dist/theme/recipes/checkbox-group.d.ts +1 -1
- package/dist/theme/recipes/checkbox.d.ts +1 -1
- package/dist/theme/recipes/chip.d.ts +1 -1
- package/dist/theme/recipes/collapsible.d.ts +1 -1
- package/dist/theme/recipes/combobox.d.ts +1 -1
- package/dist/theme/recipes/datepicker.d.ts +1 -1
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/flag.d.ts +1 -1
- package/dist/theme/recipes/form/control.d.ts +1 -1
- package/dist/theme/recipes/form/helper-text.d.ts +1 -1
- package/dist/theme/recipes/form/label.d.ts +1 -1
- package/dist/theme/recipes/heading.d.ts +1 -1
- package/dist/theme/recipes/highlightedInput.d.ts +1 -1
- package/dist/theme/recipes/icon-button.cjs +1 -1
- package/dist/theme/recipes/icon-button.cjs.map +1 -1
- package/dist/theme/recipes/icon-button.js +1 -1
- package/dist/theme/recipes/icon.d.ts +1 -1
- package/dist/theme/recipes/illustration.d.ts +1 -1
- package/dist/theme/recipes/index.d.ts +1 -1
- package/dist/theme/recipes/input-addon.d.ts +1 -1
- package/dist/theme/recipes/input-group.d.ts +1 -1
- package/dist/theme/recipes/input.d.ts +1 -1
- package/dist/theme/recipes/menu.d.ts +1 -1
- package/dist/theme/recipes/pagination.d.ts +1 -1
- package/dist/theme/recipes/phone-number-input.d.ts +1 -1
- package/dist/theme/recipes/popover.d.ts +1 -1
- package/dist/theme/recipes/radio-button-group.d.ts +1 -1
- package/dist/theme/recipes/radio-card-group.d.ts +1 -1
- package/dist/theme/recipes/radio-group.d.ts +1 -1
- package/dist/theme/recipes/select-language.d.ts +1 -1
- package/dist/theme/recipes/select.d.ts +1 -1
- package/dist/theme/recipes/status-tag-select.d.ts +1 -1
- package/dist/theme/recipes/switch.d.ts +1 -1
- package/dist/theme/recipes/table-container.d.ts +1 -1
- package/dist/theme/recipes/table-empty-row.d.ts +1 -1
- package/dist/theme/recipes/table-group-title.d.ts +1 -1
- package/dist/theme/recipes/table.d.ts +1 -1
- package/dist/theme/recipes/tabs-chip.d.ts +1 -1
- package/dist/theme/recipes/tabs.d.ts +1 -1
- package/dist/theme/recipes/tag.d.ts +1 -1
- package/dist/theme/recipes/text.d.ts +1 -1
- package/dist/theme/recipes/textarea.d.ts +1 -1
- package/dist/theme/recipes/tooltip.d.ts +1 -1
- package/dist/theme/text-styles.d.ts +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs +0 -2
- package/dist/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs +0 -2
- package/dist/node_modules/deepmerge/dist/cjs.cjs +0 -2
- package/dist/node_modules/deepmerge/dist/cjs.cjs.map +0 -1
- package/dist/node_modules/deepmerge/dist/cjs.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require("../../chip/Chip.cjs"),t=require("../../icon/Icon.cjs"),n=require("../../../node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs");let r=require("@stokelp/styled-system/jsx"),i=require("react/jsx-runtime");function a({count:a}){return!a||a<=0?null:(0,i.jsxs)(r.HStack,{gap:`space-4`,alignItems:`center`,flexShrink:0,children:[(0,i.jsx)(t.Icon,{size:`sm`,color:`grey.400`,children:(0,i.jsx)(n.default,{})}),(0,i.jsx)(e.Chip,{size:`sm`,display:`flex`,placeContent:`center`,bgColor:`error.500`,w:`size-20`,h:`size-20`,children:(0,i.jsx)(e.ChipLabel,{color:`white`,children:a})})]})}exports.MobileCardNotificationBadge=a;
|
|
1
|
+
"use client";const e=require("../../chip/Chip.cjs"),t=require("../../icon/Icon.cjs"),n=require("../../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.cjs");let r=require("@stokelp/styled-system/jsx"),i=require("react/jsx-runtime");function a({count:a}){return!a||a<=0?null:(0,i.jsxs)(r.HStack,{gap:`space-4`,alignItems:`center`,flexShrink:0,children:[(0,i.jsx)(t.Icon,{size:`sm`,color:`grey.400`,children:(0,i.jsx)(n.default,{})}),(0,i.jsx)(e.Chip,{size:`sm`,display:`flex`,placeContent:`center`,bgColor:`error.500`,w:`size-20`,h:`size-20`,children:(0,i.jsx)(e.ChipLabel,{color:`white`,children:a})})]})}exports.MobileCardNotificationBadge=a;
|
|
2
2
|
//# sourceMappingURL=MobileCardNotificationBadge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MobileCardNotificationBadge.cjs","names":[],"sources":["../../../../src/components/app/mobile-card/MobileCardNotificationBadge.tsx"],"sourcesContent":["import { HStack } from '@stokelp/styled-system/jsx'\nimport { Chip, ChipLabel } from '~/components/chip/Chip'\nimport { Icon } from '~/components/icon/Icon'\nimport { ChatBubbleLeftRightIcon } from '@heroicons/react/24/outline'\n\nexport interface MobileCardNotificationBadgeProps {\n count?: number\n}\n\nexport function MobileCardNotificationBadge({ count }: MobileCardNotificationBadgeProps) {\n if (!count || count <= 0) return null\n\n return (\n <HStack gap=\"space-4\" alignItems=\"center\" flexShrink={0}>\n <Icon size=\"sm\" color=\"grey.400\">\n <ChatBubbleLeftRightIcon />\n </Icon>\n <Chip size=\"sm\" display=\"flex\" placeContent=\"center\" bgColor=\"error.500\" w=\"size-20\" h=\"size-20\">\n <ChipLabel color=\"white\">{count}</ChipLabel>\n </Chip>\n </HStack>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"MobileCardNotificationBadge.cjs","names":[],"sources":["../../../../src/components/app/mobile-card/MobileCardNotificationBadge.tsx"],"sourcesContent":["import { HStack } from '@stokelp/styled-system/jsx'\nimport { Chip, ChipLabel } from '~/components/chip/Chip'\nimport { Icon } from '~/components/icon/Icon'\nimport { ChatBubbleLeftRightIcon } from '@heroicons/react/24/outline'\n\nexport interface MobileCardNotificationBadgeProps {\n count?: number\n}\n\nexport function MobileCardNotificationBadge({ count }: MobileCardNotificationBadgeProps) {\n if (!count || count <= 0) return null\n\n return (\n <HStack gap=\"space-4\" alignItems=\"center\" flexShrink={0}>\n <Icon size=\"sm\" color=\"grey.400\">\n <ChatBubbleLeftRightIcon />\n </Icon>\n <Chip size=\"sm\" display=\"flex\" placeContent=\"center\" bgColor=\"error.500\" w=\"size-20\" h=\"size-20\">\n <ChipLabel color=\"white\">{count}</ChipLabel>\n </Chip>\n </HStack>\n )\n}\n"],"mappings":"sTASA,SAAgB,EAA4B,CAAE,SAA2C,CAGvF,MAFI,CAAC,GAAS,GAAS,EAAU,MAG/B,EAAA,EAAA,MAAC,EAAA,OAAD,CAAQ,IAAI,UAAU,WAAW,SAAS,WAAY,WAAtD,EACE,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAK,KAAK,MAAM,qBACpB,EAAA,EAAA,KAAC,EAAA,QAAD,CAA0B,CAAA,CACtB,CAAA,GACN,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAK,KAAK,QAAQ,OAAO,aAAa,SAAS,QAAQ,YAAY,EAAE,UAAU,EAAE,oBACrF,EAAA,EAAA,KAAC,EAAA,UAAD,CAAW,MAAM,iBAAS,CAAiB,CAAA,CACvC,CAAA,CACA,GAEZ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Chip as e, ChipLabel as t } from "../../chip/Chip.js";
|
|
3
3
|
import { Icon as n } from "../../icon/Icon.js";
|
|
4
|
-
import r from "../../../node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js";
|
|
4
|
+
import r from "../../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ChatBubbleLeftRightIcon.js";
|
|
5
5
|
import { HStack as i } from "@stokelp/styled-system/jsx";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/app/mobile-card/MobileCardNotificationBadge.tsx
|
|
@@ -2,11 +2,10 @@ import { ComponentProps, FC } from 'react';
|
|
|
2
2
|
import { ComponentVariants } from '../../../utils/slots';
|
|
3
3
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
4
4
|
import { MobileNavigationRecipe } from '@stokelp/styled-system/recipes';
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const ItemLabel: StyledComponent<"span", {}>;
|
|
5
|
+
export declare const Root: ComponentVariants<StyledComponent<string, {}>, MobileNavigationRecipe>;
|
|
6
|
+
export declare const Item: StyledComponent<string, {}>;
|
|
7
|
+
export declare const ItemIcon: FC<any>;
|
|
8
|
+
export declare const ItemLabel: StyledComponent<string, {}>;
|
|
10
9
|
export interface MobileNavigationProps extends ComponentProps<typeof Root> {
|
|
11
10
|
}
|
|
12
11
|
export interface MobileNavigationItemProps extends ComponentProps<typeof Item> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utils/slots.cjs"),n=require("../../tag/Tag.cjs"),r=require("../../icon/Icon.cjs"),i=require("../../../node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs");let a=require("@stokelp/styled-system/jsx"),o=require("@stokelp/styled-system/recipes"),s=require("react/jsx-runtime");var c=e.__exportAll({Body:()=>p,Footer:()=>b,Header:()=>f,Item:()=>m,ItemAlpha:()=>y,ItemContent:()=>g,ItemIcon:()=>v,ItemLabel:()=>_,ItemSubItems:()=>h,MiniaturizeTrigger:()=>x,Root:()=>d}),{withProvider:l,withContext:u}=t.createStyleContext(o.appNavigation,{dataAttr:!0}),d=l((0,a.styled)(`nav`),`root`,{defaultProps:{}}),f=u((0,a.styled)(`header`),`header`),p=u((0,a.styled)(`main`),`body`),m=u((0,a.styled)(`div`),`item`),h=u((0,a.styled)(`div`),`itemSubItems`),g=u((0,a.styled)(`div`),`itemContent`),_=u((0,a.styled)(`p`),`itemLabel`),v=u(r.Icon,`itemIcon`,{defaultProps:{size:`sm`}}),y=u(n.Tag,`itemAlpha`,{defaultProps:{severity:`success`}}),b=u((0,a.styled)(`footer`),`footer`),x=u((0,a.styled)(`div`),`miniaturizeTrigger`,{defaultProps:{onClick:e=>{e.preventDefault();let t=localStorage.getItem(`isMiniaturizeNav`)===`closed`?`open`:`closed`;localStorage.setItem(`isMiniaturizeNav`,t),e.currentTarget.setAttribute(`data-state`,t),window.dispatchEvent(new Event(`storage`))},className:`app-navigation__miniaturizeTrigger`,"data-state":typeof localStorage<`u`&&localStorage.getItem(`isMiniaturizeNav`)||`open`,children:(0,s.jsx)(r.Icon,{children:(0,s.jsx)(i.default,{})})}});Object.defineProperty(exports,"AppNavigation_exports",{enumerable:!0,get:function(){return c}});
|
|
1
|
+
"use client";const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utils/slots.cjs"),n=require("../../tag/Tag.cjs"),r=require("../../icon/Icon.cjs"),i=require("../../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.cjs");let a=require("@stokelp/styled-system/jsx"),o=require("@stokelp/styled-system/recipes"),s=require("react/jsx-runtime");var c=e.__exportAll({Body:()=>p,Footer:()=>b,Header:()=>f,Item:()=>m,ItemAlpha:()=>y,ItemContent:()=>g,ItemIcon:()=>v,ItemLabel:()=>_,ItemSubItems:()=>h,MiniaturizeTrigger:()=>x,Root:()=>d}),{withProvider:l,withContext:u}=t.createStyleContext(o.appNavigation,{dataAttr:!0}),d=l((0,a.styled)(`nav`),`root`,{defaultProps:{}}),f=u((0,a.styled)(`header`),`header`),p=u((0,a.styled)(`main`),`body`),m=u((0,a.styled)(`div`),`item`),h=u((0,a.styled)(`div`),`itemSubItems`),g=u((0,a.styled)(`div`),`itemContent`),_=u((0,a.styled)(`p`),`itemLabel`),v=u(r.Icon,`itemIcon`,{defaultProps:{size:`sm`}}),y=u(n.Tag,`itemAlpha`,{defaultProps:{severity:`success`}}),b=u((0,a.styled)(`footer`),`footer`),x=u((0,a.styled)(`div`),`miniaturizeTrigger`,{defaultProps:{onClick:e=>{e.preventDefault();let t=localStorage.getItem(`isMiniaturizeNav`)===`closed`?`open`:`closed`;localStorage.setItem(`isMiniaturizeNav`,t),e.currentTarget.setAttribute(`data-state`,t),window.dispatchEvent(new Event(`storage`))},className:`app-navigation__miniaturizeTrigger`,"data-state":typeof localStorage<`u`&&localStorage.getItem(`isMiniaturizeNav`)||`open`,children:(0,s.jsx)(r.Icon,{children:(0,s.jsx)(i.default,{})})}});Object.defineProperty(exports,"AppNavigation_exports",{enumerable:!0,get:function(){return c}});
|
|
2
2
|
//# sourceMappingURL=AppNavigation.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppNavigation.cjs","names":[],"sources":["../../../../src/components/app/navigation/AppNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { appNavigation } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type MouseEvent } from 'react'\nimport { ArrowLeftCircleIcon } from '@heroicons/react/24/outline'\nimport { Tag } from '~/components'\n\nconst { withProvider, withContext } = createStyleContext(appNavigation, {\n dataAttr: true,\n})\n\nexport const Root = withProvider(styled('nav'), 'root', {\n defaultProps: {\n //'data-state': localStorage.getItem('isMiniaturizeNav') || 'open',\n },\n})\nexport const Header = withContext(styled('header'), 'header')\nexport const Body = withContext(styled('main'), 'body')\n\nexport const Item = withContext(styled('div'), 'item')\nexport const ItemSubItems = withContext(styled('div'), 'itemSubItems')\nexport const ItemContent = withContext(styled('div'), 'itemContent')\nexport const ItemLabel = withContext(styled('p'), 'itemLabel')\nexport const ItemIcon = withContext(Icon, 'itemIcon', {\n defaultProps: {\n size: 'sm',\n },\n})\nexport const ItemAlpha = withContext(Tag, 'itemAlpha', {\n defaultProps: {\n severity: 'success',\n },\n})\n\nexport const Footer = withContext(styled('footer'), 'footer')\n\nexport const MiniaturizeTrigger = withContext(styled('div'), 'miniaturizeTrigger', {\n defaultProps: {\n onClick: (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault()\n const currentState = localStorage.getItem('isMiniaturizeNav')\n const newState = currentState === 'closed' ? 'open' : 'closed'\n localStorage.setItem('isMiniaturizeNav', newState)\n e.currentTarget.setAttribute('data-state', newState)\n window.dispatchEvent(new Event('storage'))\n },\n className: 'app-navigation__miniaturizeTrigger',\n ...{\n 'data-state': typeof localStorage !== 'undefined' ? localStorage.getItem('isMiniaturizeNav') || 'open' : 'open',\n },\n children: (\n <Icon>\n <ArrowLeftCircleIcon />\n </Icon>\n ),\n },\n})\n\nexport interface AppNavigationProps extends ComponentProps<typeof Root> {}\nexport interface AppNavigationHeaderProps extends ComponentProps<typeof Header> {}\nexport interface AppNavigationBodyProps extends ComponentProps<typeof Body> {}\nexport interface AppNavigationItemProps extends ComponentProps<typeof Item> {}\nexport interface AppNavigationItemSubItemsProps extends ComponentProps<typeof ItemSubItems> {}\nexport interface AppNavigationItemContentProps extends ComponentProps<typeof ItemContent> {}\nexport type AppNavigationItemLabelProps = ComponentProps<typeof ItemLabel>\nexport interface AppNavigationItemIconProps extends ComponentProps<typeof ItemIcon> {}\nexport interface AppNavigationFooterProps extends ComponentProps<typeof Footer> {}\nexport interface AppNavigationMiniaturizeTriggerProps extends ComponentProps<typeof MiniaturizeTrigger> {}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AppNavigation.cjs","names":[],"sources":["../../../../src/components/app/navigation/AppNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { appNavigation } from '@stokelp/styled-system/recipes'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type MouseEvent } from 'react'\nimport { ArrowLeftCircleIcon } from '@heroicons/react/24/outline'\nimport { Tag } from '~/components'\n\nconst { withProvider, withContext } = createStyleContext(appNavigation, {\n dataAttr: true,\n})\n\nexport const Root = withProvider(styled('nav'), 'root', {\n defaultProps: {\n //'data-state': localStorage.getItem('isMiniaturizeNav') || 'open',\n },\n})\nexport const Header = withContext(styled('header'), 'header')\nexport const Body = withContext(styled('main'), 'body')\n\nexport const Item = withContext(styled('div'), 'item')\nexport const ItemSubItems = withContext(styled('div'), 'itemSubItems')\nexport const ItemContent = withContext(styled('div'), 'itemContent')\nexport const ItemLabel = withContext(styled('p'), 'itemLabel')\nexport const ItemIcon = withContext(Icon, 'itemIcon', {\n defaultProps: {\n size: 'sm',\n },\n})\nexport const ItemAlpha = withContext(Tag, 'itemAlpha', {\n defaultProps: {\n severity: 'success',\n },\n})\n\nexport const Footer = withContext(styled('footer'), 'footer')\n\nexport const MiniaturizeTrigger = withContext(styled('div'), 'miniaturizeTrigger', {\n defaultProps: {\n onClick: (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault()\n const currentState = localStorage.getItem('isMiniaturizeNav')\n const newState = currentState === 'closed' ? 'open' : 'closed'\n localStorage.setItem('isMiniaturizeNav', newState)\n e.currentTarget.setAttribute('data-state', newState)\n window.dispatchEvent(new Event('storage'))\n },\n className: 'app-navigation__miniaturizeTrigger',\n ...{\n 'data-state': typeof localStorage !== 'undefined' ? localStorage.getItem('isMiniaturizeNav') || 'open' : 'open',\n },\n children: (\n <Icon>\n <ArrowLeftCircleIcon />\n </Icon>\n ),\n },\n})\n\nexport interface AppNavigationProps extends ComponentProps<typeof Root> {}\nexport interface AppNavigationHeaderProps extends ComponentProps<typeof Header> {}\nexport interface AppNavigationBodyProps extends ComponentProps<typeof Body> {}\nexport interface AppNavigationItemProps extends ComponentProps<typeof Item> {}\nexport interface AppNavigationItemSubItemsProps extends ComponentProps<typeof ItemSubItems> {}\nexport interface AppNavigationItemContentProps extends ComponentProps<typeof ItemContent> {}\nexport type AppNavigationItemLabelProps = ComponentProps<typeof ItemLabel>\nexport interface AppNavigationItemIconProps extends ComponentProps<typeof ItemIcon> {}\nexport interface AppNavigationFooterProps extends ComponentProps<typeof Footer> {}\nexport interface AppNavigationMiniaturizeTriggerProps extends ComponentProps<typeof MiniaturizeTrigger> {}\n"],"mappings":"snBAQM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,cAAe,CACtE,SAAU,EACZ,CAAC,EAEY,EAAO,GAAA,EAAA,EAAA,QAAoB,KAAK,EAAG,OAAQ,CACtD,aAAc,CAEd,CACF,CAAC,EACY,EAAS,GAAA,EAAA,EAAA,QAAmB,QAAQ,EAAG,QAAQ,EAC/C,EAAO,GAAA,EAAA,EAAA,QAAmB,MAAM,EAAG,MAAM,EAEzC,EAAO,GAAA,EAAA,EAAA,QAAmB,KAAK,EAAG,MAAM,EACxC,EAAe,GAAA,EAAA,EAAA,QAAmB,KAAK,EAAG,cAAc,EACxD,EAAc,GAAA,EAAA,EAAA,QAAmB,KAAK,EAAG,aAAa,EACtD,EAAY,GAAA,EAAA,EAAA,QAAmB,GAAG,EAAG,WAAW,EAChD,EAAW,EAAY,EAAA,KAAM,WAAY,CACpD,aAAc,CACZ,KAAM,IACR,CACF,CAAC,EACY,EAAY,EAAY,EAAA,IAAK,YAAa,CACrD,aAAc,CACZ,SAAU,SACZ,CACF,CAAC,EAEY,EAAS,GAAA,EAAA,EAAA,QAAmB,QAAQ,EAAG,QAAQ,EAE/C,EAAqB,GAAA,EAAA,EAAA,QAAmB,KAAK,EAAG,qBAAsB,CACjF,aAAc,CACZ,QAAU,GAAkC,CAC1C,EAAE,eAAe,EAEjB,IAAM,EADe,aAAa,QAAQ,kBACzB,IAAiB,SAAW,OAAS,SACtD,aAAa,QAAQ,mBAAoB,CAAQ,EACjD,EAAE,cAAc,aAAa,aAAc,CAAQ,EACnD,OAAO,cAAc,IAAI,MAAM,SAAS,CAAC,CAC3C,EACA,UAAW,qCAET,aAAc,OAAO,aAAiB,KAAc,aAAa,QAAQ,kBAAkB,GAAc,OAE3G,UACE,EAAA,EAAA,KAAC,EAAA,KAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,QAAD,CAAsB,CAAA,CAClB,CAAA,CAEV,CACF,CAAC"}
|
|
@@ -2,18 +2,18 @@ import { ComponentProps, FC, ForwardRefExoticComponent, RefAttributes } from 're
|
|
|
2
2
|
import { ComponentVariants } from '../../../utils/slots';
|
|
3
3
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
4
4
|
import { AppNavigationRecipe } from '@stokelp/styled-system/recipes';
|
|
5
|
-
import {
|
|
6
|
-
export declare const Root: ComponentVariants<StyledComponent<
|
|
7
|
-
export declare const Header: StyledComponent<
|
|
8
|
-
export declare const Body: StyledComponent<
|
|
9
|
-
export declare const Item: StyledComponent<
|
|
10
|
-
export declare const ItemSubItems: StyledComponent<
|
|
11
|
-
export declare const ItemContent: StyledComponent<
|
|
12
|
-
export declare const ItemLabel: StyledComponent<
|
|
13
|
-
export declare const ItemIcon: FC<
|
|
5
|
+
import { TagProps } from '../..';
|
|
6
|
+
export declare const Root: ComponentVariants<StyledComponent<string, {}>, AppNavigationRecipe>;
|
|
7
|
+
export declare const Header: StyledComponent<string, {}>;
|
|
8
|
+
export declare const Body: StyledComponent<string, {}>;
|
|
9
|
+
export declare const Item: StyledComponent<string, {}>;
|
|
10
|
+
export declare const ItemSubItems: StyledComponent<string, {}>;
|
|
11
|
+
export declare const ItemContent: StyledComponent<string, {}>;
|
|
12
|
+
export declare const ItemLabel: StyledComponent<string, {}>;
|
|
13
|
+
export declare const ItemIcon: FC<any>;
|
|
14
14
|
export declare const ItemAlpha: ForwardRefExoticComponent< TagProps & RefAttributes<HTMLDivElement>>;
|
|
15
|
-
export declare const Footer: StyledComponent<
|
|
16
|
-
export declare const MiniaturizeTrigger: StyledComponent<
|
|
15
|
+
export declare const Footer: StyledComponent<string, {}>;
|
|
16
|
+
export declare const MiniaturizeTrigger: StyledComponent<string, {}>;
|
|
17
17
|
export interface AppNavigationProps extends ComponentProps<typeof Root> {
|
|
18
18
|
}
|
|
19
19
|
export interface AppNavigationHeaderProps extends ComponentProps<typeof Header> {
|
|
@@ -3,7 +3,7 @@ import { __exportAll as e } from "../../../_virtual/_rolldown/runtime.js";
|
|
|
3
3
|
import { createStyleContext as t } from "../../../utils/slots.js";
|
|
4
4
|
import { Tag as n } from "../../tag/Tag.js";
|
|
5
5
|
import { Icon as r } from "../../icon/Icon.js";
|
|
6
|
-
import i from "../../../node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js";
|
|
6
|
+
import i from "../../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowLeftCircleIcon.js";
|
|
7
7
|
import { styled as a } from "@stokelp/styled-system/jsx";
|
|
8
8
|
import { appNavigation as o } from "@stokelp/styled-system/recipes";
|
|
9
9
|
import { jsx as s } from "react/jsx-runtime";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import { Avatar
|
|
2
|
-
import { ComponentProps, ReactNode, ForwardRefExoticComponent,
|
|
1
|
+
import { Avatar } from '@ark-ui/react';
|
|
2
|
+
import { ComponentProps, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
3
3
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
4
|
-
import { AvatarGroupVariantProps, AvatarRecipe } from '@stokelp/styled-system/recipes';
|
|
5
4
|
import { ComponentVariants } from '../../utils/slots';
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { AvatarRecipe } from '@stokelp/styled-system/recipes';
|
|
6
|
+
declare const InnerGroup: StyledComponent<any, {
|
|
7
|
+
[x: string]: unknown;
|
|
8
|
+
[x: number]: unknown;
|
|
9
|
+
size?: unknown;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const Group: ForwardRefExoticComponent<any>;
|
|
8
12
|
export declare const Root: ComponentVariants<StyledComponent<ForwardRefExoticComponent<Avatar.RootProps & RefAttributes<HTMLDivElement>>, {}>, AvatarRecipe>;
|
|
9
13
|
export declare const Image: StyledComponent<ForwardRefExoticComponent<Avatar.ImageProps & RefAttributes<HTMLImageElement>>, {}>;
|
|
10
14
|
export declare const Fallback: StyledComponent<ForwardRefExoticComponent<Avatar.FallbackProps & RefAttributes<HTMLSpanElement>>, {}>;
|
|
@@ -3,8 +3,8 @@ import { ComponentVariants } from '../../utils/slots';
|
|
|
3
3
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
4
4
|
import { BreadcrumbRecipe } from '@stokelp/styled-system/recipes';
|
|
5
5
|
import { PolymorphicProps } from '@ark-ui/react';
|
|
6
|
-
declare const StyledBreadcrumb: ComponentVariants<StyledComponent<
|
|
7
|
-
export declare const BreadcrumbItem: StyledComponent<
|
|
6
|
+
declare const StyledBreadcrumb: ComponentVariants<StyledComponent<string, {}>, BreadcrumbRecipe>;
|
|
7
|
+
export declare const BreadcrumbItem: StyledComponent<string, {}>;
|
|
8
8
|
export declare const BreadcrumbLink: StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLAnchorElement> & AnchorHTMLAttributes<HTMLAnchorElement> & PolymorphicProps>, {}>;
|
|
9
9
|
export declare const Breadcrumb: FC<BreadcrumbProps>;
|
|
10
10
|
export type BreadcrumbLinkProps = ComponentProps<typeof BreadcrumbLink>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const Button: StyledComponent<any, {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
[x: number]: unknown;
|
|
6
|
+
size?: unknown;
|
|
7
|
+
variant?: unknown;
|
|
8
|
+
severity?: unknown;
|
|
9
|
+
}>;
|
|
6
10
|
export interface ButtonProps extends ComponentProps<typeof Button> {
|
|
7
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const ButtonFilter: StyledComponent<any, {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
[x: number]: unknown;
|
|
6
|
+
}>;
|
|
6
7
|
export interface ButtonFilterProps extends ComponentProps<typeof ButtonFilter> {
|
|
7
8
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC, ReactElement, ForwardRefExoticComponent, ClassAttributes, HTMLAttributes } from 'react';
|
|
2
|
-
import { chat, ChatRecipe
|
|
2
|
+
import { chat, ChatRecipe } from '@stokelp/styled-system/recipes';
|
|
3
3
|
import { ChatMessageProps } from './ChatMessage.tsx';
|
|
4
4
|
import { ChatDocumentMessageProps } from './ChatDocumentMessage.tsx';
|
|
5
5
|
import { HTMLStyledProps, RecipeVariantProps, StyledComponent } from '@stokelp/styled-system/types';
|
|
@@ -7,9 +7,14 @@ import { ChatProfileAvatarProps } from './ChatProfileAvatar.tsx';
|
|
|
7
7
|
import { ComponentVariants } from '../../utils/slots.tsx';
|
|
8
8
|
import { PolymorphicProps } from '@ark-ui/react';
|
|
9
9
|
export declare const MessageContainer: ComponentVariants<ForwardRefExoticComponent< ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & PolymorphicProps>, ChatRecipe>;
|
|
10
|
-
export declare const Message: ComponentVariants<StyledComponent<
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
export declare const Message: ComponentVariants<StyledComponent<any, {
|
|
11
|
+
[x: string]: unknown;
|
|
12
|
+
[x: number]: unknown;
|
|
13
|
+
side?: unknown;
|
|
14
|
+
variant?: unknown;
|
|
15
|
+
}>, ChatRecipe>;
|
|
16
|
+
export declare const DocumentMessage: ComponentVariants<FC<any>, ChatRecipe>;
|
|
17
|
+
export declare const ProfileAvatar: ComponentVariants<FC<any>, ChatRecipe>;
|
|
13
18
|
type ChatRootMessage = {
|
|
14
19
|
side?: 'left' | 'right' | 'center';
|
|
15
20
|
children: ReactElement;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require("../text/Text.cjs"),t=require("../icon/Icon.cjs"),n=require("../../node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs"),r=require("../../node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs");let i=require("@stokelp/styled-system/jsx"),a=require("@stokelp/styled-system/recipes"),o=require("react/jsx-runtime");var s=(0,i.styled)(i.HStack,a.chatDocumentMessage),c=({documentID:a,documentName:c,onCardClick:l,...u})=>(0,o.jsxs)(s,{onClick:e=>{l&&l(e,a)},...u,children:[(0,o.jsxs)(i.HStack,{gap:`space-8`,children:[(0,o.jsx)(t.Icon,{size:`xs`,color:`primary.900`,children:(0,o.jsx)(r.default,{})}),(0,o.jsx)(e.Text,{bold:!0,children:c})]}),(0,o.jsx)(t.Icon,{size:`xs`,color:`primary.500`,children:(0,o.jsx)(n.default,{})})]});exports.ChatDocumentMessage=c;
|
|
1
|
+
"use client";const e=require("../text/Text.cjs"),t=require("../icon/Icon.cjs"),n=require("../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.cjs"),r=require("../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.cjs");let i=require("@stokelp/styled-system/jsx"),a=require("@stokelp/styled-system/recipes"),o=require("react/jsx-runtime");var s=(0,i.styled)(i.HStack,a.chatDocumentMessage),c=({documentID:a,documentName:c,onCardClick:l,...u})=>(0,o.jsxs)(s,{onClick:e=>{l&&l(e,a)},...u,children:[(0,o.jsxs)(i.HStack,{gap:`space-8`,children:[(0,o.jsx)(t.Icon,{size:`xs`,color:`primary.900`,children:(0,o.jsx)(r.default,{})}),(0,o.jsx)(e.Text,{bold:!0,children:c})]}),(0,o.jsx)(t.Icon,{size:`xs`,color:`primary.500`,children:(0,o.jsx)(n.default,{})})]});exports.ChatDocumentMessage=c;
|
|
2
2
|
//# sourceMappingURL=ChatDocumentMessage.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDocumentMessage.cjs","names":[],"sources":["../../../src/components/chat/ChatDocumentMessage.tsx"],"sourcesContent":["import { FC } from 'react'\nimport { HTMLStyledProps, RecipeVariantProps } from '@stokelp/styled-system/types'\nimport { chatDocumentMessage } from '@stokelp/styled-system/recipes'\nimport { HStack, styled } from '@stokelp/styled-system/jsx'\nimport { Icon, Text } from '~/components'\nimport { DocumentTextIcon, ArrowDownTrayIcon } from '@heroicons/react/24/outline'\n\nexport type ChatDocumentMessageProps = {\n documentID: number | string\n documentName: string\n documentUrl?: string\n onCardClick?: (event: React.MouseEvent<HTMLDivElement>, documentID: number | string) => void\n} & HTMLStyledProps<'div'> &\n RecipeVariantProps<typeof chatDocumentMessage>\n\nconst StyledHStack = styled(HStack, chatDocumentMessage)\n\nexport const ChatDocumentMessage: FC<ChatDocumentMessageProps> = ({\n documentID,\n documentName,\n onCardClick,\n ...props\n}) => {\n return (\n <StyledHStack\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n if (onCardClick) {\n onCardClick(event, documentID)\n }\n }}\n {...props}\n >\n <HStack gap=\"space-8\">\n <Icon size=\"xs\" color=\"primary.900\">\n <DocumentTextIcon />\n </Icon>\n <Text bold>{documentName}</Text>\n </HStack>\n <Icon size=\"xs\" color=\"primary.500\">\n <ArrowDownTrayIcon />\n </Icon>\n </StyledHStack>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatDocumentMessage.cjs","names":[],"sources":["../../../src/components/chat/ChatDocumentMessage.tsx"],"sourcesContent":["import { FC } from 'react'\nimport { HTMLStyledProps, RecipeVariantProps } from '@stokelp/styled-system/types'\nimport { chatDocumentMessage } from '@stokelp/styled-system/recipes'\nimport { HStack, styled } from '@stokelp/styled-system/jsx'\nimport { Icon, Text } from '~/components'\nimport { DocumentTextIcon, ArrowDownTrayIcon } from '@heroicons/react/24/outline'\n\nexport type ChatDocumentMessageProps = {\n documentID: number | string\n documentName: string\n documentUrl?: string\n onCardClick?: (event: React.MouseEvent<HTMLDivElement>, documentID: number | string) => void\n} & HTMLStyledProps<'div'> &\n RecipeVariantProps<typeof chatDocumentMessage>\n\nconst StyledHStack = styled(HStack, chatDocumentMessage)\n\nexport const ChatDocumentMessage: FC<ChatDocumentMessageProps> = ({\n documentID,\n documentName,\n onCardClick,\n ...props\n}) => {\n return (\n <StyledHStack\n onClick={(event: React.MouseEvent<HTMLDivElement>) => {\n if (onCardClick) {\n onCardClick(event, documentID)\n }\n }}\n {...props}\n >\n <HStack gap=\"space-8\">\n <Icon size=\"xs\" color=\"primary.900\">\n <DocumentTextIcon />\n </Icon>\n <Text bold>{documentName}</Text>\n </HStack>\n <Icon size=\"xs\" color=\"primary.500\">\n <ArrowDownTrayIcon />\n </Icon>\n </StyledHStack>\n )\n}\n"],"mappings":"+dAeA,IAAM,GAAA,EAAA,EAAA,QAAsB,EAAA,OAAQ,EAAA,mBAAmB,EAE1C,GAAqD,CAChE,aACA,eACA,cACA,GAAG,MAGD,EAAA,EAAA,MAAC,EAAD,CACE,QAAU,GAA4C,CAChD,GACF,EAAY,EAAO,CAAU,CAEjC,EACA,GAAI,WANN,EAQE,EAAA,EAAA,MAAC,EAAA,OAAD,CAAQ,IAAI,mBAAZ,EACE,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAK,KAAK,MAAM,wBACpB,EAAA,EAAA,KAAC,EAAA,QAAD,CAAmB,CAAA,CACf,CAAA,GACN,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAA,YAAM,CAAmB,CAAA,CACzB,KACR,EAAA,EAAA,KAAC,EAAA,KAAD,CAAM,KAAK,KAAK,MAAM,wBACpB,EAAA,EAAA,KAAC,EAAA,QAAD,CAAoB,CAAA,CAChB,CAAA,CACM"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Text as e } from "../text/Text.js";
|
|
3
3
|
import { Icon as t } from "../icon/Icon.js";
|
|
4
|
-
import n from "../../node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js";
|
|
5
|
-
import r from "../../node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js";
|
|
4
|
+
import n from "../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/ArrowDownTrayIcon.js";
|
|
5
|
+
import r from "../../node_modules/.pnpm/@heroicons_react@2.2.0_react@19.2.6/node_modules/@heroicons/react/24/outline/esm/DocumentTextIcon.js";
|
|
6
6
|
import { HStack as i, styled as a } from "@stokelp/styled-system/jsx";
|
|
7
7
|
import { chatDocumentMessage as o } from "@stokelp/styled-system/recipes";
|
|
8
8
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const ChatMessage: StyledComponent<any, {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
[x: number]: unknown;
|
|
6
|
+
side?: unknown;
|
|
7
|
+
variant?: unknown;
|
|
8
|
+
}>;
|
|
6
9
|
export interface ChatMessageProps extends ComponentProps<typeof ChatMessage> {
|
|
7
10
|
}
|
|
@@ -8,8 +8,8 @@ export interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'
|
|
|
8
8
|
value?: string | number;
|
|
9
9
|
}
|
|
10
10
|
export declare const CheckboxCardTitle: StyledComponent<ForwardRefExoticComponent<ArkCheckbox.LabelProps & RefAttributes<HTMLSpanElement>>, {}>;
|
|
11
|
-
export declare const CheckboxCardContent: StyledComponent<
|
|
12
|
-
export declare const CheckboxCardDescription: StyledComponent<
|
|
11
|
+
export declare const CheckboxCardContent: StyledComponent<string, {}>;
|
|
12
|
+
export declare const CheckboxCardDescription: StyledComponent<string, {}>;
|
|
13
13
|
export declare const CheckboxCardImage: StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLImageElement> & ImgHTMLAttributes<HTMLImageElement> & PolymorphicProps>, {}>;
|
|
14
14
|
export type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>;
|
|
15
15
|
export type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>;
|
|
@@ -4,7 +4,7 @@ import { StyledComponent } from '@stokelp/styled-system/types';
|
|
|
4
4
|
import { PolymorphicProps } from '@ark-ui/react';
|
|
5
5
|
import { ChipRecipe } from '@stokelp/styled-system/recipes';
|
|
6
6
|
export declare const Chip: ComponentVariants<StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & PolymorphicProps>, {}>, ChipRecipe>;
|
|
7
|
-
export declare const ChipAvatar: StyledComponent<
|
|
7
|
+
export declare const ChipAvatar: StyledComponent<string, {}>;
|
|
8
8
|
export declare const ChipLabel: StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLSpanElement> & HTMLAttributes<HTMLSpanElement> & PolymorphicProps>, {}>;
|
|
9
9
|
export declare const ChipClearTrigger: StyledComponent<ForwardRefExoticComponent< ClassAttributes<HTMLButtonElement> & ButtonHTMLAttributes<HTMLButtonElement> & PolymorphicProps>, {}>;
|
|
10
10
|
export interface ChipProps extends ComponentProps<typeof Chip> {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";const e=require("../../utils/slots.cjs"),t=require("../icon-button/IconButton.cjs");let n=require("@ark-ui/react"),r=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),a=require("react"),o=require("react/jsx-runtime"),s=require("usehooks-ts"),c=require("@stokelp/styled-system/tokens");var{withProvider:l,withContext:u}=e.createStyleContext(i.drawer),d=l(n.Dialog.Root,void 0,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),f=u((0,r.styled)(n.ark.main),`body`),p=u((0,r.styled)(n.Dialog.CloseTrigger),`closeTrigger`),m=u((0,r.styled)(n.ark.footer),`footer`),h=(0,a.forwardRef)(({children:e,showCloseTrigger:r=!0,...i},a)=>(0,o.jsxs)(n.ark.header,{...i,ref:a,children:[e,r&&(0,o.jsx)(p,{asChild:!0,children:(0,o.jsx)(t.IconButton,{ml:`auto`,"aria-label":`close`,variant:`tertiary`,children:(0,o.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,o.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z`,fill:`currentColor`})})})})]}));h.displayName=`DrawerHeader`;var g=u(h,`header`),_=u((0,r.styled)(n.Dialog.Title),`title`),v=u((0,r.styled)(n.Dialog.Trigger),`trigger`),y=u((0,r.styled)(n.Dialog.Positioner),`positioner`),b=u((0,r.styled)(n.Dialog.Backdrop),`backdrop`),x=(0,a.forwardRef)(({children:e,...t},r)=>{let i=(0,s.useMediaQuery)(`(max-width: ${(0,c.token)(`breakpoints.md`)})`,{defaultValue:!1}),{open:l,getContentProps:u}=(0,n.useDialogContext)();return(0,a.useLayoutEffect)(()=>{if(!l)return;let{id:e}=u();if(!e)return;let t=document.getElementById(e);if(t){let e=t.querySelector(`footer`);e&&(i?t.style.setProperty(`--footer-height`,`${Math.ceil(e.clientHeight)}px`):t.style.setProperty(`--footer-height`,`70px`))}},[l,i]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{}),(0,o.jsx)(y,{children:(0,o.jsx)(n.Dialog.Content,{ref:r,...t,children:e})})]})});x.displayName=n.Dialog.Content.displayName;var S=u((0,r.styled)(x),`content`),C=n.Dialog.Context;exports.Drawer=d,exports.DrawerBody=f,exports.DrawerCloseTrigger=p,exports.DrawerContent=S,exports.DrawerContext=C,exports.DrawerFooter=m,exports.DrawerHeader=g,exports.DrawerTitle=_,exports.DrawerTrigger=v;
|
|
1
|
+
"use client";const e=require("../../utils/slots.cjs"),t=require("../icon-button/IconButton.cjs");let n=require("@ark-ui/react"),r=require("@stokelp/styled-system/jsx"),i=require("@stokelp/styled-system/recipes"),a=require("react"),o=require("react/jsx-runtime"),s=require("usehooks-ts"),c=require("@stokelp/styled-system/tokens");var{withProvider:l,withContext:u}=e.createStyleContext(i.drawer),d=l(n.Dialog.Root,void 0,{defaultProps:{unmountOnExit:!0,lazyMount:!0}}),f=u((0,r.styled)(n.ark.main),`body`),p=u((0,r.styled)(n.Dialog.CloseTrigger),`closeTrigger`),m=u((0,r.styled)(n.ark.footer),`footer`),h=(0,a.forwardRef)(({children:e,showCloseTrigger:r=!0,...i},a)=>(0,o.jsxs)(n.ark.header,{...i,ref:a,children:[e,r&&(0,o.jsx)(p,{asChild:!0,children:(0,o.jsx)(t.IconButton,{ml:`auto`,"aria-label":`close`,variant:`tertiary`,children:(0,o.jsx)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 16 16`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,o.jsx)(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z`,fill:`currentColor`})})})})]}));h.displayName=`DrawerHeader`;var g=u(h,`header`),_=u((0,r.styled)(n.Dialog.Title),`title`),v=u((0,r.styled)(n.Dialog.Trigger),`trigger`),y=u((0,r.styled)(n.Dialog.Positioner),`positioner`),b=u((0,r.styled)(n.Dialog.Backdrop),`backdrop`),x=(0,a.forwardRef)(({children:e,...t},r)=>{let i=(0,s.useMediaQuery)(`(max-width: ${(0,c.token)(`breakpoints.md`)})`,{defaultValue:!1}),{open:l,getContentProps:u}=(0,n.useDialogContext)();return(0,a.useLayoutEffect)(()=>{if(!l)return;let{id:e}=u();if(!e)return;let t=document.getElementById(e);if(t){let e=t.querySelector(`footer`);e&&(i?t.style.setProperty(`--footer-height`,`${Math.ceil(e.clientHeight)}px`):t.style.setProperty(`--footer-height`,`70px`))}},[l,i]),(0,a.useEffect)(()=>{if(process.env.NODE_ENV===`production`||l)return;let e=window.setTimeout(()=>{let e=document.body;document.querySelector(`[data-scope="dialog"][data-state="open"]`)||(e.style.pointerEvents===`none`&&(e.style.pointerEvents=``),e.hasAttribute(`data-inert`)&&e.removeAttribute(`data-inert`),e.getAttribute(`style`)===``&&e.removeAttribute(`style`))},350);return()=>window.clearTimeout(e)},[l]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{}),(0,o.jsx)(y,{children:(0,o.jsx)(n.Dialog.Content,{ref:r,...t,children:e})})]})});x.displayName=n.Dialog.Content.displayName;var S=u((0,r.styled)(x),`content`),C=n.Dialog.Context;exports.Drawer=d,exports.DrawerBody=f,exports.DrawerCloseTrigger=p,exports.DrawerContent=S,exports.DrawerContext=C,exports.DrawerFooter=m,exports.DrawerHeader=g,exports.DrawerTitle=_,exports.DrawerTrigger=v;
|
|
2
2
|
//# sourceMappingURL=Drawer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.cjs","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(drawer)\n\nexport const Drawer = withProvider(ArkDrawer.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n },\n})\nexport const DrawerBody = withContext(styled(ark.main), 'body')\nexport const DrawerCloseTrigger = withContext(styled(ArkDrawer.CloseTrigger), 'closeTrigger')\nexport const DrawerFooter = withContext(styled(ark.footer), 'footer')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\n\nconst Header = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nHeader.displayName = 'DrawerHeader'\n\nexport const DrawerHeader = withContext(Header, 'header')\nexport const DrawerTitle = withContext(styled(ArkDrawer.Title), 'title')\nexport const DrawerTrigger = withContext(styled(ArkDrawer.Trigger), 'trigger')\n\nconst DrawerPositioner = withContext(styled(ArkDrawer.Positioner), 'positioner')\nconst DrawerBackdrop = withContext(styled(ArkDrawer.Backdrop), 'backdrop')\n\nconst Content = forwardRef<ElementRef<typeof ArkDrawer.Content>, ComponentPropsWithoutRef<typeof ArkDrawer.Content>>(\n ({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n const $content = document.getElementById(id)\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, [open, isMobile])\n\n return (\n <>\n <DrawerBackdrop />\n <DrawerPositioner>\n <ArkDrawer.Content ref={ref} {...props}>\n {children}\n </ArkDrawer.Content>\n </DrawerPositioner>\n </>\n )\n },\n)\nContent.displayName = ArkDrawer.Content.displayName\n\nexport const DrawerContent = withContext(styled(Content), 'content')\nexport const DrawerContext = ArkDrawer.Context\n\nexport interface DrawerProps extends ComponentProps<typeof Drawer> {}\nexport interface DrawerBackdropProps extends ComponentProps<typeof DrawerBackdrop> {}\nexport interface DrawerBodyProps extends ComponentProps<typeof DrawerBody> {}\nexport interface DrawerCloseTriggerProps extends ComponentProps<typeof DrawerCloseTrigger> {}\nexport interface DrawerContentProps extends ComponentProps<typeof DrawerContent> {}\nexport interface DrawerFooterProps extends ComponentProps<typeof DrawerFooter> {}\nexport interface DrawerHeaderProps extends ComponentProps<typeof DrawerHeader> {}\nexport interface DrawerPositionerProps extends ComponentProps<typeof DrawerPositioner> {}\nexport interface DrawerTitleProps extends ComponentProps<typeof DrawerTitle> {}\nexport interface DrawerTriggerProps extends ComponentProps<typeof DrawerTrigger> {}\nexport interface DrawerContextProps extends ComponentProps<typeof DrawerContext> {}\n"],"mappings":"0UAUA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,MAAM,EAElD,EAAS,EAAa,EAAA,OAAU,KAAM,IAAA,GAAW,CAC5D,aAAc,CACZ,cAAe,GACf,UAAW,EACb,CACF,CAAC,EACY,EAAa,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,IAAI,EAAG,MAAM,EACjD,EAAqB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,YAAY,EAAG,cAAc,EAC/E,EAAe,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,MAAM,EAAG,QAAQ,EAM9D,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,mBAAmB,GAAM,GAAG,GAAS,KAChD,EAAA,EAAA,MAAC,EAAA,IAAI,OAAL,CAAY,GAAI,EAAY,eAA5B,CACG,EACA,IACC,EAAA,EAAA,KAAC,EAAD,CAAoB,QAAA,aAClB,EAAA,EAAA,KAAC,EAAA,WAAD,CAAY,GAAG,OAAO,aAAW,QAAQ,QAAQ,qBAC/C,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,uCAChE,EAAA,EAAA,KAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,4fACF,KAAK,cACN,CAAA,CACE,CAAA,CACK,CAAA,CACM,CAAA,CAEZ,GAEhB,EACA,EAAO,YAAc,eAErB,IAAa,EAAe,EAAY,EAAQ,QAAQ,EAC3C,EAAc,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,KAAK,EAAG,OAAO,EAC1D,EAAgB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,OAAO,EAAG,SAAS,EAEvE,EAAmB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,UAAU,EAAG,YAAY,EACzE,EAAiB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,QAAQ,EAAG,UAAU,EAEnE,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,GAAG,GAAS,IAAQ,CAC/B,IAAM,GAAA,EAAA,EAAA,eAAyB,gBAAA,EAAA,EAAA,OAAqB,gBAAgB,EAAE,GAAI,CACxE,aAAc,EAChB,CAAC,EACK,CAAE,OAAM,oBAAA,EAAA,EAAA,kBAAqC,
|
|
1
|
+
{"version":3,"file":"Drawer.cjs","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useEffect, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(drawer)\n\nexport const Drawer = withProvider(ArkDrawer.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n },\n})\nexport const DrawerBody = withContext(styled(ark.main), 'body')\nexport const DrawerCloseTrigger = withContext(styled(ArkDrawer.CloseTrigger), 'closeTrigger')\nexport const DrawerFooter = withContext(styled(ark.footer), 'footer')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\n\nconst Header = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nHeader.displayName = 'DrawerHeader'\n\nexport const DrawerHeader = withContext(Header, 'header')\nexport const DrawerTitle = withContext(styled(ArkDrawer.Title), 'title')\nexport const DrawerTrigger = withContext(styled(ArkDrawer.Trigger), 'trigger')\n\nconst DrawerPositioner = withContext(styled(ArkDrawer.Positioner), 'positioner')\nconst DrawerBackdrop = withContext(styled(ArkDrawer.Backdrop), 'backdrop')\n\nconst Content = forwardRef<ElementRef<typeof ArkDrawer.Content>, ComponentPropsWithoutRef<typeof ArkDrawer.Content>>(\n ({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n const $content = document.getElementById(id)\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, [open, isMobile])\n\n // Workaround: in React StrictMode (Next.js dev), @zag-js/dismissable's\n // disablePointerEventsOutside cleanup can leave `<body>` with\n // `pointer-events: none` / `data-inert`, freezing the page after close.\n // Gated inside the effect body so consumer bundlers DCE it in production.\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') return\n if (open) return\n const id = window.setTimeout(() => {\n const body = document.body\n const stillOpen = document.querySelector('[data-scope=\"dialog\"][data-state=\"open\"]')\n if (stillOpen) return\n if (body.style.pointerEvents === 'none') body.style.pointerEvents = ''\n if (body.hasAttribute('data-inert')) body.removeAttribute('data-inert')\n if (body.getAttribute('style') === '') body.removeAttribute('style')\n }, 350)\n return () => window.clearTimeout(id)\n }, [open])\n\n return (\n <>\n <DrawerBackdrop />\n <DrawerPositioner>\n <ArkDrawer.Content ref={ref} {...props}>\n {children}\n </ArkDrawer.Content>\n </DrawerPositioner>\n </>\n )\n },\n)\nContent.displayName = ArkDrawer.Content.displayName\n\nexport const DrawerContent = withContext(styled(Content), 'content')\nexport const DrawerContext = ArkDrawer.Context\n\nexport interface DrawerProps extends ComponentProps<typeof Drawer> {}\nexport interface DrawerBackdropProps extends ComponentProps<typeof DrawerBackdrop> {}\nexport interface DrawerBodyProps extends ComponentProps<typeof DrawerBody> {}\nexport interface DrawerCloseTriggerProps extends ComponentProps<typeof DrawerCloseTrigger> {}\nexport interface DrawerContentProps extends ComponentProps<typeof DrawerContent> {}\nexport interface DrawerFooterProps extends ComponentProps<typeof DrawerFooter> {}\nexport interface DrawerHeaderProps extends ComponentProps<typeof DrawerHeader> {}\nexport interface DrawerPositionerProps extends ComponentProps<typeof DrawerPositioner> {}\nexport interface DrawerTitleProps extends ComponentProps<typeof DrawerTitle> {}\nexport interface DrawerTriggerProps extends ComponentProps<typeof DrawerTrigger> {}\nexport interface DrawerContextProps extends ComponentProps<typeof DrawerContext> {}\n"],"mappings":"0UAUA,GAAM,CAAE,eAAc,eAAgB,EAAA,mBAAmB,EAAA,MAAM,EAElD,EAAS,EAAa,EAAA,OAAU,KAAM,IAAA,GAAW,CAC5D,aAAc,CACZ,cAAe,GACf,UAAW,EACb,CACF,CAAC,EACY,EAAa,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,IAAI,EAAG,MAAM,EACjD,EAAqB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,YAAY,EAAG,cAAc,EAC/E,EAAe,GAAA,EAAA,EAAA,QAAmB,EAAA,IAAI,MAAM,EAAG,QAAQ,EAM9D,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,mBAAmB,GAAM,GAAG,GAAS,KAChD,EAAA,EAAA,MAAC,EAAA,IAAI,OAAL,CAAY,GAAI,EAAY,eAA5B,CACG,EACA,IACC,EAAA,EAAA,KAAC,EAAD,CAAoB,QAAA,aAClB,EAAA,EAAA,KAAC,EAAA,WAAD,CAAY,GAAG,OAAO,aAAW,QAAQ,QAAQ,qBAC/C,EAAA,EAAA,KAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,uCAChE,EAAA,EAAA,KAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,4fACF,KAAK,cACN,CAAA,CACE,CAAA,CACK,CAAA,CACM,CAAA,CAEZ,GAEhB,EACA,EAAO,YAAc,eAErB,IAAa,EAAe,EAAY,EAAQ,QAAQ,EAC3C,EAAc,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,KAAK,EAAG,OAAO,EAC1D,EAAgB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,OAAO,EAAG,SAAS,EAEvE,EAAmB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,UAAU,EAAG,YAAY,EACzE,EAAiB,GAAA,EAAA,EAAA,QAAmB,EAAA,OAAU,QAAQ,EAAG,UAAU,EAEnE,GAAA,EAAA,EAAA,aACH,CAAE,WAAU,GAAG,GAAS,IAAQ,CAC/B,IAAM,GAAA,EAAA,EAAA,eAAyB,gBAAA,EAAA,EAAA,OAAqB,gBAAgB,EAAE,GAAI,CACxE,aAAc,EAChB,CAAC,EACK,CAAE,OAAM,oBAAA,EAAA,EAAA,kBAAqC,EAqCnD,OAnCA,EAAA,EAAA,qBAAsB,CACpB,GAAI,CAAC,EAAM,OACX,GAAM,CAAE,MAAO,EAAgB,EAC/B,GAAI,CAAC,EAAI,OACT,IAAM,EAAW,SAAS,eAAe,CAAE,EAC3C,GAAI,EAAU,CACZ,IAAM,EAAU,EAAS,cAAc,QAAQ,EAC3C,IACE,EACF,EAAS,MAAM,YAAY,kBAAmB,GAAG,KAAK,KAAK,EAAQ,YAAY,EAAE,GAAG,EAEpF,EAAS,MAAM,YAAY,kBAAmB,MAAM,EAG1D,CACF,EAAG,CAAC,EAAM,CAAQ,CAAC,GAMnB,EAAA,EAAA,eAAgB,CAEd,GADA,QAAA,IAAA,WAA6B,cACzB,EAAM,OACV,IAAM,EAAK,OAAO,eAAiB,CACjC,IAAM,EAAO,SAAS,KACJ,SAAS,cAAc,0CACrC,IACA,EAAK,MAAM,gBAAkB,SAAQ,EAAK,MAAM,cAAgB,IAChE,EAAK,aAAa,YAAY,GAAG,EAAK,gBAAgB,YAAY,EAClE,EAAK,aAAa,OAAO,IAAM,IAAI,EAAK,gBAAgB,OAAO,EACrE,EAAG,GAAG,EACN,UAAa,OAAO,aAAa,CAAE,CACrC,EAAG,CAAC,CAAI,CAAC,GAGP,EAAA,EAAA,MAAA,EAAA,SAAA,CAAA,SAAA,EACE,EAAA,EAAA,KAAC,EAAD,CAAiB,CAAA,GACjB,EAAA,EAAA,KAAC,EAAD,CAAA,UACE,EAAA,EAAA,KAAC,EAAA,OAAU,QAAX,CAAwB,MAAK,GAAI,EAC9B,UACgB,CAAA,CACH,CAAA,CAClB,CAAA,CAAA,CAEN,CACF,EACA,EAAQ,YAAc,EAAA,OAAU,QAAQ,YAExC,IAAa,EAAgB,GAAA,EAAA,EAAA,QAAmB,CAAO,EAAG,SAAS,EACtD,EAAgB,EAAA,OAAU"}
|
|
@@ -4,30 +4,30 @@ import { IconButton as t } from "../icon-button/IconButton.js";
|
|
|
4
4
|
import { Dialog as n, ark as r, useDialogContext as i } from "@ark-ui/react";
|
|
5
5
|
import { styled as a } from "@stokelp/styled-system/jsx";
|
|
6
6
|
import { drawer as o } from "@stokelp/styled-system/recipes";
|
|
7
|
-
import { forwardRef as s,
|
|
8
|
-
import { Fragment as
|
|
9
|
-
import { useMediaQuery as
|
|
10
|
-
import { token as
|
|
7
|
+
import { forwardRef as s, useEffect as c, useLayoutEffect as l } from "react";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
9
|
+
import { useMediaQuery as p } from "usehooks-ts";
|
|
10
|
+
import { token as m } from "@stokelp/styled-system/tokens";
|
|
11
11
|
//#region src/components/drawer/Drawer.tsx
|
|
12
|
-
var { withProvider:
|
|
12
|
+
var { withProvider: h, withContext: g } = e(o), _ = h(n.Root, void 0, { defaultProps: {
|
|
13
13
|
unmountOnExit: !0,
|
|
14
14
|
lazyMount: !0
|
|
15
|
-
} }),
|
|
15
|
+
} }), v = g(a(r.main), "body"), y = g(a(n.CloseTrigger), "closeTrigger"), b = g(a(r.footer), "footer"), x = s(({ children: e, showCloseTrigger: n = !0, ...i }, a) => /* @__PURE__ */ f(r.header, {
|
|
16
16
|
...i,
|
|
17
17
|
ref: a,
|
|
18
|
-
children: [e, n && /* @__PURE__ */
|
|
18
|
+
children: [e, n && /* @__PURE__ */ d(y, {
|
|
19
19
|
asChild: !0,
|
|
20
|
-
children: /* @__PURE__ */
|
|
20
|
+
children: /* @__PURE__ */ d(t, {
|
|
21
21
|
ml: "auto",
|
|
22
22
|
"aria-label": "close",
|
|
23
23
|
variant: "tertiary",
|
|
24
|
-
children: /* @__PURE__ */
|
|
24
|
+
children: /* @__PURE__ */ d("svg", {
|
|
25
25
|
width: "16",
|
|
26
26
|
height: "16",
|
|
27
27
|
viewBox: "0 0 16 16",
|
|
28
28
|
fill: "none",
|
|
29
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ d("path", {
|
|
31
31
|
fillRule: "evenodd",
|
|
32
32
|
clipRule: "evenodd",
|
|
33
33
|
d: "M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z",
|
|
@@ -37,10 +37,10 @@ var { withProvider: m, withContext: h } = e(o), g = m(n.Root, void 0, { defaultP
|
|
|
37
37
|
})
|
|
38
38
|
})]
|
|
39
39
|
}));
|
|
40
|
-
|
|
41
|
-
var
|
|
42
|
-
let a =
|
|
43
|
-
return
|
|
40
|
+
x.displayName = "DrawerHeader";
|
|
41
|
+
var S = g(x, "header"), C = g(a(n.Title), "title"), w = g(a(n.Trigger), "trigger"), T = g(a(n.Positioner), "positioner"), E = g(a(n.Backdrop), "backdrop"), D = s(({ children: e, ...t }, r) => {
|
|
42
|
+
let a = p(`(max-width: ${m("breakpoints.md")})`, { defaultValue: !1 }), { open: o, getContentProps: s } = i();
|
|
43
|
+
return l(() => {
|
|
44
44
|
if (!o) return;
|
|
45
45
|
let { id: e } = s();
|
|
46
46
|
if (!e) return;
|
|
@@ -49,15 +49,22 @@ var x = h(b, "header"), S = h(a(n.Title), "title"), C = h(a(n.Trigger), "trigger
|
|
|
49
49
|
let e = t.querySelector("footer");
|
|
50
50
|
e && (a ? t.style.setProperty("--footer-height", `${Math.ceil(e.clientHeight)}px`) : t.style.setProperty("--footer-height", "70px"));
|
|
51
51
|
}
|
|
52
|
-
}, [o, a]),
|
|
52
|
+
}, [o, a]), c(() => {
|
|
53
|
+
if (process.env.NODE_ENV === "production" || o) return;
|
|
54
|
+
let e = window.setTimeout(() => {
|
|
55
|
+
let e = document.body;
|
|
56
|
+
document.querySelector("[data-scope=\"dialog\"][data-state=\"open\"]") || (e.style.pointerEvents === "none" && (e.style.pointerEvents = ""), e.hasAttribute("data-inert") && e.removeAttribute("data-inert"), e.getAttribute("style") === "" && e.removeAttribute("style"));
|
|
57
|
+
}, 350);
|
|
58
|
+
return () => window.clearTimeout(e);
|
|
59
|
+
}, [o]), /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(E, {}), /* @__PURE__ */ d(T, { children: /* @__PURE__ */ d(n.Content, {
|
|
53
60
|
ref: r,
|
|
54
61
|
...t,
|
|
55
62
|
children: e
|
|
56
63
|
}) })] });
|
|
57
64
|
});
|
|
58
|
-
|
|
59
|
-
var
|
|
65
|
+
D.displayName = n.Content.displayName;
|
|
66
|
+
var O = g(a(D), "content"), k = n.Context;
|
|
60
67
|
//#endregion
|
|
61
|
-
export {
|
|
68
|
+
export { _ as Drawer, v as DrawerBody, y as DrawerCloseTrigger, O as DrawerContent, k as DrawerContext, b as DrawerFooter, S as DrawerHeader, C as DrawerTitle, w as DrawerTrigger };
|
|
62
69
|
|
|
63
70
|
//# sourceMappingURL=Drawer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(drawer)\n\nexport const Drawer = withProvider(ArkDrawer.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n },\n})\nexport const DrawerBody = withContext(styled(ark.main), 'body')\nexport const DrawerCloseTrigger = withContext(styled(ArkDrawer.CloseTrigger), 'closeTrigger')\nexport const DrawerFooter = withContext(styled(ark.footer), 'footer')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\n\nconst Header = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nHeader.displayName = 'DrawerHeader'\n\nexport const DrawerHeader = withContext(Header, 'header')\nexport const DrawerTitle = withContext(styled(ArkDrawer.Title), 'title')\nexport const DrawerTrigger = withContext(styled(ArkDrawer.Trigger), 'trigger')\n\nconst DrawerPositioner = withContext(styled(ArkDrawer.Positioner), 'positioner')\nconst DrawerBackdrop = withContext(styled(ArkDrawer.Backdrop), 'backdrop')\n\nconst Content = forwardRef<ElementRef<typeof ArkDrawer.Content>, ComponentPropsWithoutRef<typeof ArkDrawer.Content>>(\n ({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n const $content = document.getElementById(id)\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, [open, isMobile])\n\n return (\n <>\n <DrawerBackdrop />\n <DrawerPositioner>\n <ArkDrawer.Content ref={ref} {...props}>\n {children}\n </ArkDrawer.Content>\n </DrawerPositioner>\n </>\n )\n },\n)\nContent.displayName = ArkDrawer.Content.displayName\n\nexport const DrawerContent = withContext(styled(Content), 'content')\nexport const DrawerContext = ArkDrawer.Context\n\nexport interface DrawerProps extends ComponentProps<typeof Drawer> {}\nexport interface DrawerBackdropProps extends ComponentProps<typeof DrawerBackdrop> {}\nexport interface DrawerBodyProps extends ComponentProps<typeof DrawerBody> {}\nexport interface DrawerCloseTriggerProps extends ComponentProps<typeof DrawerCloseTrigger> {}\nexport interface DrawerContentProps extends ComponentProps<typeof DrawerContent> {}\nexport interface DrawerFooterProps extends ComponentProps<typeof DrawerFooter> {}\nexport interface DrawerHeaderProps extends ComponentProps<typeof DrawerHeader> {}\nexport interface DrawerPositionerProps extends ComponentProps<typeof DrawerPositioner> {}\nexport interface DrawerTitleProps extends ComponentProps<typeof DrawerTitle> {}\nexport interface DrawerTriggerProps extends ComponentProps<typeof DrawerTrigger> {}\nexport interface DrawerContextProps extends ComponentProps<typeof DrawerContext> {}\n"],"mappings":";;;;;;;;;;;AAUA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAM,GAElD,IAAS,EAAa,EAAU,MAAM,KAAA,GAAW,EAC5D,cAAc;CACZ,eAAe;CACf,WAAW;AACb,EACF,CAAC,GACY,IAAa,EAAY,EAAO,EAAI,IAAI,GAAG,MAAM,GACjD,IAAqB,EAAY,EAAO,EAAU,YAAY,GAAG,cAAc,GAC/E,IAAe,EAAY,EAAO,EAAI,MAAM,GAAG,QAAQ,GAM9D,IAAS,GACZ,EAAE,aAAU,sBAAmB,IAAM,GAAG,KAAS,MAChD,kBAAC,EAAI,QAAL;CAAY,GAAI;CAAY;WAA5B,CACG,GACA,KACC,kBAAC,GAAD;EAAoB,SAAA;YAClB,kBAAC,GAAD;GAAY,IAAG;GAAO,cAAW;GAAQ,SAAQ;aAC/C,kBAAC,OAAD;IAAK,OAAM;IAAK,QAAO;IAAK,SAAQ;IAAY,MAAK;IAAO,OAAM;cAChE,kBAAC,QAAD;KACE,UAAS;KACT,UAAS;KACT,GAAE;KACF,MAAK;IACN,CAAA;GACE,CAAA;EACK,CAAA;CACM,CAAA,CAEZ;EAEhB;AACA,EAAO,cAAc;AAErB,IAAa,IAAe,EAAY,GAAQ,QAAQ,GAC3C,IAAc,EAAY,EAAO,EAAU,KAAK,GAAG,OAAO,GAC1D,IAAgB,EAAY,EAAO,EAAU,OAAO,GAAG,SAAS,GAEvE,IAAmB,EAAY,EAAO,EAAU,UAAU,GAAG,YAAY,GACzE,IAAiB,EAAY,EAAO,EAAU,QAAQ,GAAG,UAAU,GAEnE,IAAU,GACb,EAAE,aAAU,GAAG,KAAS,MAAQ;CAC/B,IAAM,IAAW,EAAc,eAAe,EAAM,gBAAgB,EAAE,IAAI,EACxE,cAAc,GAChB,CAAC,GACK,EAAE,SAAM,uBAAoB,EAAiB;
|
|
1
|
+
{"version":3,"file":"Drawer.js","names":[],"sources":["../../../src/components/drawer/Drawer.tsx"],"sourcesContent":["import { ark, Dialog as ArkDrawer, useDialogContext } from '@ark-ui/react'\nimport { useMediaQuery } from 'usehooks-ts'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport { drawer } from '@stokelp/styled-system/recipes'\nimport { token } from '@stokelp/styled-system/tokens'\nimport { ComponentProps, ComponentPropsWithoutRef, ElementRef, forwardRef, useEffect, useLayoutEffect } from 'react'\n\nimport { createStyleContext } from '~/utils/slots'\nimport { IconButton } from '~/components/icon-button'\n\nconst { withProvider, withContext } = createStyleContext(drawer)\n\nexport const Drawer = withProvider(ArkDrawer.Root, undefined, {\n defaultProps: {\n unmountOnExit: true,\n lazyMount: true,\n },\n})\nexport const DrawerBody = withContext(styled(ark.main), 'body')\nexport const DrawerCloseTrigger = withContext(styled(ArkDrawer.CloseTrigger), 'closeTrigger')\nexport const DrawerFooter = withContext(styled(ark.footer), 'footer')\n\ntype HeaderProps = ComponentPropsWithoutRef<typeof ark.header> & {\n showCloseTrigger?: boolean\n}\n\nconst Header = forwardRef<ElementRef<typeof ark.header>, HeaderProps>(\n ({ children, showCloseTrigger = true, ...props }, ref) => (\n <ark.header {...props} ref={ref}>\n {children}\n {showCloseTrigger && (\n <DrawerCloseTrigger asChild>\n <IconButton ml=\"auto\" aria-label=\"close\" variant=\"tertiary\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M3.64645 3.64645C3.84171 3.45118 4.15829 3.45118 4.35355 3.64645L8 7.29289L11.6464 3.64645C11.8417 3.45118 12.1583 3.45118 12.3536 3.64645C12.5488 3.84171 12.5488 4.15829 12.3536 4.35355L8.70711 8L12.3536 11.6464C12.5488 11.8417 12.5488 12.1583 12.3536 12.3536C12.1583 12.5488 11.8417 12.5488 11.6464 12.3536L8 8.70711L4.35355 12.3536C4.15829 12.5488 3.84171 12.5488 3.64645 12.3536C3.45118 12.1583 3.45118 11.8417 3.64645 11.6464L7.29289 8L3.64645 4.35355C3.45118 4.15829 3.45118 3.84171 3.64645 3.64645Z\"\n fill=\"currentColor\"\n />\n </svg>\n </IconButton>\n </DrawerCloseTrigger>\n )}\n </ark.header>\n ),\n)\nHeader.displayName = 'DrawerHeader'\n\nexport const DrawerHeader = withContext(Header, 'header')\nexport const DrawerTitle = withContext(styled(ArkDrawer.Title), 'title')\nexport const DrawerTrigger = withContext(styled(ArkDrawer.Trigger), 'trigger')\n\nconst DrawerPositioner = withContext(styled(ArkDrawer.Positioner), 'positioner')\nconst DrawerBackdrop = withContext(styled(ArkDrawer.Backdrop), 'backdrop')\n\nconst Content = forwardRef<ElementRef<typeof ArkDrawer.Content>, ComponentPropsWithoutRef<typeof ArkDrawer.Content>>(\n ({ children, ...props }, ref) => {\n const isMobile = useMediaQuery(`(max-width: ${token('breakpoints.md')})`, {\n defaultValue: false,\n })\n const { open, getContentProps } = useDialogContext()\n\n useLayoutEffect(() => {\n if (!open) return\n const { id } = getContentProps()\n if (!id) return\n const $content = document.getElementById(id)\n if ($content) {\n const $footer = $content.querySelector('footer')\n if ($footer) {\n if (isMobile) {\n $content.style.setProperty('--footer-height', `${Math.ceil($footer.clientHeight)}px`)\n } else {\n $content.style.setProperty('--footer-height', `70px`)\n }\n }\n }\n }, [open, isMobile])\n\n // Workaround: in React StrictMode (Next.js dev), @zag-js/dismissable's\n // disablePointerEventsOutside cleanup can leave `<body>` with\n // `pointer-events: none` / `data-inert`, freezing the page after close.\n // Gated inside the effect body so consumer bundlers DCE it in production.\n useEffect(() => {\n if (process.env.NODE_ENV === 'production') return\n if (open) return\n const id = window.setTimeout(() => {\n const body = document.body\n const stillOpen = document.querySelector('[data-scope=\"dialog\"][data-state=\"open\"]')\n if (stillOpen) return\n if (body.style.pointerEvents === 'none') body.style.pointerEvents = ''\n if (body.hasAttribute('data-inert')) body.removeAttribute('data-inert')\n if (body.getAttribute('style') === '') body.removeAttribute('style')\n }, 350)\n return () => window.clearTimeout(id)\n }, [open])\n\n return (\n <>\n <DrawerBackdrop />\n <DrawerPositioner>\n <ArkDrawer.Content ref={ref} {...props}>\n {children}\n </ArkDrawer.Content>\n </DrawerPositioner>\n </>\n )\n },\n)\nContent.displayName = ArkDrawer.Content.displayName\n\nexport const DrawerContent = withContext(styled(Content), 'content')\nexport const DrawerContext = ArkDrawer.Context\n\nexport interface DrawerProps extends ComponentProps<typeof Drawer> {}\nexport interface DrawerBackdropProps extends ComponentProps<typeof DrawerBackdrop> {}\nexport interface DrawerBodyProps extends ComponentProps<typeof DrawerBody> {}\nexport interface DrawerCloseTriggerProps extends ComponentProps<typeof DrawerCloseTrigger> {}\nexport interface DrawerContentProps extends ComponentProps<typeof DrawerContent> {}\nexport interface DrawerFooterProps extends ComponentProps<typeof DrawerFooter> {}\nexport interface DrawerHeaderProps extends ComponentProps<typeof DrawerHeader> {}\nexport interface DrawerPositionerProps extends ComponentProps<typeof DrawerPositioner> {}\nexport interface DrawerTitleProps extends ComponentProps<typeof DrawerTitle> {}\nexport interface DrawerTriggerProps extends ComponentProps<typeof DrawerTrigger> {}\nexport interface DrawerContextProps extends ComponentProps<typeof DrawerContext> {}\n"],"mappings":";;;;;;;;;;;AAUA,IAAM,EAAE,iBAAc,mBAAgB,EAAmB,CAAM,GAElD,IAAS,EAAa,EAAU,MAAM,KAAA,GAAW,EAC5D,cAAc;CACZ,eAAe;CACf,WAAW;AACb,EACF,CAAC,GACY,IAAa,EAAY,EAAO,EAAI,IAAI,GAAG,MAAM,GACjD,IAAqB,EAAY,EAAO,EAAU,YAAY,GAAG,cAAc,GAC/E,IAAe,EAAY,EAAO,EAAI,MAAM,GAAG,QAAQ,GAM9D,IAAS,GACZ,EAAE,aAAU,sBAAmB,IAAM,GAAG,KAAS,MAChD,kBAAC,EAAI,QAAL;CAAY,GAAI;CAAY;WAA5B,CACG,GACA,KACC,kBAAC,GAAD;EAAoB,SAAA;YAClB,kBAAC,GAAD;GAAY,IAAG;GAAO,cAAW;GAAQ,SAAQ;aAC/C,kBAAC,OAAD;IAAK,OAAM;IAAK,QAAO;IAAK,SAAQ;IAAY,MAAK;IAAO,OAAM;cAChE,kBAAC,QAAD;KACE,UAAS;KACT,UAAS;KACT,GAAE;KACF,MAAK;IACN,CAAA;GACE,CAAA;EACK,CAAA;CACM,CAAA,CAEZ;EAEhB;AACA,EAAO,cAAc;AAErB,IAAa,IAAe,EAAY,GAAQ,QAAQ,GAC3C,IAAc,EAAY,EAAO,EAAU,KAAK,GAAG,OAAO,GAC1D,IAAgB,EAAY,EAAO,EAAU,OAAO,GAAG,SAAS,GAEvE,IAAmB,EAAY,EAAO,EAAU,UAAU,GAAG,YAAY,GACzE,IAAiB,EAAY,EAAO,EAAU,QAAQ,GAAG,UAAU,GAEnE,IAAU,GACb,EAAE,aAAU,GAAG,KAAS,MAAQ;CAC/B,IAAM,IAAW,EAAc,eAAe,EAAM,gBAAgB,EAAE,IAAI,EACxE,cAAc,GAChB,CAAC,GACK,EAAE,SAAM,uBAAoB,EAAiB;CAqCnD,OAnCA,QAAsB;EACpB,IAAI,CAAC,GAAM;EACX,IAAM,EAAE,UAAO,EAAgB;EAC/B,IAAI,CAAC,GAAI;EACT,IAAM,IAAW,SAAS,eAAe,CAAE;EAC3C,IAAI,GAAU;GACZ,IAAM,IAAU,EAAS,cAAc,QAAQ;GAC/C,AAAI,MACE,IACF,EAAS,MAAM,YAAY,mBAAmB,GAAG,KAAK,KAAK,EAAQ,YAAY,EAAE,GAAG,IAEpF,EAAS,MAAM,YAAY,mBAAmB,MAAM;EAG1D;CACF,GAAG,CAAC,GAAM,CAAQ,CAAC,GAMnB,QAAgB;EAEd,IADA,QAAA,IAAA,aAA6B,gBACzB,GAAM;EACV,IAAM,IAAK,OAAO,iBAAiB;GACjC,IAAM,IAAO,SAAS;GACJ,SAAS,cAAc,8CACrC,MACA,EAAK,MAAM,kBAAkB,WAAQ,EAAK,MAAM,gBAAgB,KAChE,EAAK,aAAa,YAAY,KAAG,EAAK,gBAAgB,YAAY,GAClE,EAAK,aAAa,OAAO,MAAM,MAAI,EAAK,gBAAgB,OAAO;EACrE,GAAG,GAAG;EACN,aAAa,OAAO,aAAa,CAAE;CACrC,GAAG,CAAC,CAAI,CAAC,GAGP,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD,CAAiB,CAAA,GACjB,kBAAC,GAAD,EAAA,UACE,kBAAC,EAAU,SAAX;EAAwB;EAAK,GAAI;EAC9B;CACgB,CAAA,EACH,CAAA,CAClB,EAAA,CAAA;AAEN,CACF;AACA,EAAQ,cAAc,EAAU,QAAQ;AAExC,IAAa,IAAgB,EAAY,EAAO,CAAO,GAAG,SAAS,GACtD,IAAgB,EAAU"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import { ComponentProps, ForwardRefExoticComponent
|
|
1
|
+
import { ComponentProps, ForwardRefExoticComponent } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
|
-
import { PolymorphicProps } from '@ark-ui/react';
|
|
4
|
-
import { FlagVariantProps } from '@stokelp/styled-system/recipes';
|
|
5
3
|
declare const flags: {
|
|
6
4
|
af: import("react/jsx-runtime").JSX.Element;
|
|
7
5
|
al: import("react/jsx-runtime").JSX.Element;
|
|
@@ -210,11 +208,15 @@ declare const flags: {
|
|
|
210
208
|
zw: import("react/jsx-runtime").JSX.Element;
|
|
211
209
|
};
|
|
212
210
|
export type FlagCountryCode = keyof typeof flags;
|
|
213
|
-
declare const StyledFlag: StyledComponent<
|
|
211
|
+
declare const StyledFlag: StyledComponent<any, {
|
|
212
|
+
[x: string]: unknown;
|
|
213
|
+
[x: number]: unknown;
|
|
214
|
+
shape?: unknown;
|
|
215
|
+
}>;
|
|
214
216
|
type StyledFlagProps = ComponentProps<typeof StyledFlag>;
|
|
215
217
|
export type FlagProps = StyledFlagProps & {
|
|
216
218
|
countryCode: FlagCountryCode;
|
|
217
219
|
};
|
|
218
220
|
export declare const FlagCountryCodes: FlagCountryCode[];
|
|
219
|
-
export declare const Flag: ForwardRefExoticComponent<
|
|
221
|
+
export declare const Flag: ForwardRefExoticComponent<any>;
|
|
220
222
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, FC } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
3
|
import { FormControlVariantProps } from '@stokelp/styled-system/recipes';
|
|
4
|
-
declare const StyledFormControl: StyledComponent<
|
|
4
|
+
declare const StyledFormControl: StyledComponent<string, FormControlVariantProps>;
|
|
5
5
|
export type FormControlProps = ComponentProps<typeof StyledFormControl> & {
|
|
6
6
|
isInvalid?: boolean;
|
|
7
7
|
isRequired?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
3
|
import { FormHelperTextVariantProps } from '@stokelp/styled-system/recipes';
|
|
4
|
-
export declare const FormHelperText: StyledComponent<
|
|
4
|
+
export declare const FormHelperText: StyledComponent<string, FormHelperTextVariantProps>;
|
|
5
5
|
export interface FormHelperTextProps extends ComponentProps<typeof FormHelperText> {
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentProps, FC, ReactNode } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
3
|
import { FormLabelVariantProps } from '@stokelp/styled-system/recipes';
|
|
4
|
-
declare const StyledFormLabel: StyledComponent<
|
|
4
|
+
declare const StyledFormLabel: StyledComponent<string, FormLabelVariantProps>;
|
|
5
5
|
export type FormLabelProps = ComponentProps<typeof StyledFormLabel> & {
|
|
6
6
|
addon?: ReactNode;
|
|
7
7
|
tooltipInformation?: ReactNode;
|
|
@@ -2,10 +2,10 @@ import { ComponentProps, FC } from 'react';
|
|
|
2
2
|
import { ComponentVariants } from '../../utils/slots';
|
|
3
3
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
4
4
|
import { HighlightedInputRecipe, InputVariantProps } from '@stokelp/styled-system/recipes';
|
|
5
|
-
export declare const Root: ComponentVariants<StyledComponent<
|
|
6
|
-
export declare const InputSlot: StyledComponent<
|
|
7
|
-
export declare const Renderer: StyledComponent<
|
|
8
|
-
export declare const Highlight: StyledComponent<
|
|
5
|
+
export declare const Root: ComponentVariants<StyledComponent<string, {}>, HighlightedInputRecipe>;
|
|
6
|
+
export declare const InputSlot: StyledComponent<string, InputVariantProps>;
|
|
7
|
+
export declare const Renderer: StyledComponent<string, {}>;
|
|
8
|
+
export declare const Highlight: StyledComponent<string, {}>;
|
|
9
9
|
export type HighlightedInputRootProps = ComponentProps<typeof Root>;
|
|
10
10
|
export type HighlightedInputInputProps = ComponentProps<typeof InputSlot>;
|
|
11
11
|
export type HighlightedInputRendererProps = ComponentProps<typeof Renderer>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
3
|
import { InputVariantProps } from '@stokelp/styled-system/recipes';
|
|
4
|
-
export declare const Input: StyledComponent<
|
|
4
|
+
export declare const Input: StyledComponent<string, InputVariantProps>;
|
|
5
5
|
export type InputProps = ComponentProps<typeof Input>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export declare const InputAddon: StyledComponent<any, {
|
|
4
|
+
[x: string]: unknown;
|
|
5
|
+
[x: number]: unknown;
|
|
6
|
+
}>;
|
|
6
7
|
export interface InputAddonProps extends ComponentProps<typeof InputAddon> {
|
|
7
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { StyledComponent } from '@stokelp/styled-system/types';
|
|
3
3
|
import { InputGroupVariantProps } from '@stokelp/styled-system/recipes';
|
|
4
|
-
export declare const InputGroup: StyledComponent<
|
|
4
|
+
export declare const InputGroup: StyledComponent<string, InputGroupVariantProps>;
|
|
5
5
|
export interface InputGroupProps extends ComponentProps<typeof InputGroup> {
|
|
6
6
|
}
|