@stokelp/ui 4.1.2 → 4.1.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MobileNavigation.cjs","names":["createStyleContext","mobileNavigation","styled","Icon","require_runtime","require_slots","require_Icon","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","MobileNavigation_exports","Item","ItemIcon","ItemLabel","Root","styledTag","tag","withProvider","withContext"],"sources":["../../../../src/components/app/mobile-navigation/MobileNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { mobileNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(mobileNavigation, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nexport const Root = withProvider(styledTag('nav'), 'root')\nexport const Item = withContext(styledTag('a'), 'item')\nexport const ItemIcon = withContext(Icon, 'itemIcon', {\n defaultProps: {\n size: 'sm',\n },\n})\nexport const ItemLabel = withContext(styledTag('span'), 'itemLabel')\n\nexport interface MobileNavigationProps extends ComponentProps<typeof Root> {}\nexport interface MobileNavigationItemProps extends ComponentProps<typeof Item> {}\nexport interface MobileNavigationItemIconProps extends ComponentProps<typeof ItemIcon> {}\nexport interface MobileNavigationItemLabelProps extends ComponentProps<typeof ItemLabel> {}\n"],"mappings":"A,mTAOM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,iBAAkB,CACzE,SAAU,EACZ,CAAC,EAGKa,EAAoD,IAAA,EACxDZ,EAAAA,OAAAA,CAAOa,CAAG,EAECF,EAAOG,EAAaF,EAAU,KAAK,EAAG,MAAM,EAC5CJ,EAAOO,EAAYH,EAAU,GAAG,EAAG,MAAM,EACzCH,EAAWM,EAAYd,EAAAA,KAAM,WAAY,CACpD,aAAc,CACZ,KAAM,IACR,CACF,CAAC,EACYS,EAAYK,EAAYH,EAAU,MAAM,EAAG,WAAW,E"}
1
+ {"version":3,"file":"MobileNavigation.cjs","names":["createStyleContext","mobileNavigation","styled","Icon","require_runtime","require_slots","require_Icon","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","MobileNavigation_exports","Item","ItemIcon","ItemLabel","Root","styledTag","tag","withProvider","withContext"],"sources":["../../../../src/components/app/mobile-navigation/MobileNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { mobileNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(mobileNavigation, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nexport const Root = withProvider(styledTag('nav'), 'root')\nexport const Item = withContext(styledTag('a'), 'item')\nexport const ItemIcon = withContext(Icon, 'itemIcon', {\n defaultProps: {\n size: 'sm',\n },\n})\nexport const ItemLabel = withContext(styledTag('span'), 'itemLabel')\n\nexport interface MobileNavigationProps extends ComponentProps<typeof Root> {}\nexport interface MobileNavigationItemProps extends ComponentProps<typeof Item> {}\nexport interface MobileNavigationItemIconProps extends ComponentProps<typeof ItemIcon> {}\nexport interface MobileNavigationItemLabelProps extends ComponentProps<typeof ItemLabel> {}\n"],"mappings":"A,mTAOM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,iBAAkB,CACzE,SAAU,EACZ,CAAC,EAGKa,EAAoD,IAAA,EACxDZ,EAAAA,OAAAA,CAAOa,CAAG,EAECF,EAAOG,EAAaF,EAAU,KAAK,EAAG,MAAM,EAC5CJ,EAAOO,EAAYH,EAAU,GAAG,EAAG,MAAM,EACzCH,EAAWM,EAAYd,EAAAA,KAAM,WAAY,CACpD,aAAc,CACZ,KAAM,IACR,CACF,CAAC,EACYS,EAAYK,EAAYH,EAAU,MAAM,EAAG,WAAW,E"}
@@ -1 +1 @@
1
- {"version":3,"file":"MobileNavigation.js","names":["MobileNavigation_exports","Item","ItemIcon","ItemLabel","Root","createStyleContext","mobileNavigation","styledTag","styled","tag","withProvider","withContext","Icon"],"sources":["../../../../src/components/app/mobile-navigation/MobileNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { mobileNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(mobileNavigation, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nexport const Root = withProvider(styledTag('nav'), 'root')\nexport const Item = withContext(styledTag('a'), 'item')\nexport const ItemIcon = withContext(Icon, 'itemIcon', {\n defaultProps: {\n size: 'sm',\n },\n})\nexport const ItemLabel = withContext(styledTag('span'), 'itemLabel')\n\nexport interface MobileNavigationProps extends ComponentProps<typeof Root> {}\nexport interface MobileNavigationItemProps extends ComponentProps<typeof Item> {}\nexport interface MobileNavigationItemIconProps extends ComponentProps<typeof ItemIcon> {}\nexport interface MobileNavigationItemLabelProps extends ComponentProps<typeof ItemLabel> {}\n"],"mappings":";;;;;;;;;;;;A,IAOM,EAAE,iBAAc,mBAAgBK,EAAmBC,GAAkB,EACzE,UAAU,GACZ,CAAC,GAGKC,KAAoD,MACxDC,EAAOC,CAAG,GAECL,IAAOM,EAAaH,EAAU,KAAK,GAAG,MAAM,GAC5CN,IAAOU,EAAYJ,EAAU,GAAG,GAAG,MAAM,GACzCL,IAAWS,EAAYC,GAAM,YAAY,EACpD,cAAc,EACZ,MAAM,KACR,EACF,CAAC,GACYT,IAAYQ,EAAYJ,EAAU,MAAM,GAAG,WAAW"}
1
+ {"version":3,"file":"MobileNavigation.js","names":["MobileNavigation_exports","Item","ItemIcon","ItemLabel","Root","createStyleContext","mobileNavigation","styledTag","styled","tag","withProvider","withContext","Icon"],"sources":["../../../../src/components/app/mobile-navigation/MobileNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { mobileNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(mobileNavigation, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nexport const Root = withProvider(styledTag('nav'), 'root')\nexport const Item = withContext(styledTag('a'), 'item')\nexport const ItemIcon = withContext(Icon, 'itemIcon', {\n defaultProps: {\n size: 'sm',\n },\n})\nexport const ItemLabel = withContext(styledTag('span'), 'itemLabel')\n\nexport interface MobileNavigationProps extends ComponentProps<typeof Root> {}\nexport interface MobileNavigationItemProps extends ComponentProps<typeof Item> {}\nexport interface MobileNavigationItemIconProps extends ComponentProps<typeof ItemIcon> {}\nexport interface MobileNavigationItemLabelProps extends ComponentProps<typeof ItemLabel> {}\n"],"mappings":";;;;;;;;;;;;A,IAOM,EAAE,iBAAc,mBAAgBK,EAAmBC,GAAkB,EACzE,UAAU,GACZ,CAAC,GAGKC,KAAoD,MACxDC,EAAOC,CAAG,GAECL,IAAOM,EAAaH,EAAU,KAAK,GAAG,MAAM,GAC5CN,IAAOU,EAAYJ,EAAU,GAAG,GAAG,MAAM,GACzCL,IAAWS,EAAYC,GAAM,YAAY,EACpD,cAAc,EACZ,MAAM,KACR,EACF,CAAC,GACYT,IAAYQ,EAAYJ,EAAU,MAAM,GAAG,WAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppNavigation.cjs","names":["createStyleContext","appNavigation","styled","Icon","Tag","ArrowLeftCircleIcon","require_runtime","require_slots","require_Tag","require_Icon","require_ArrowLeftCircleIcon","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react_jsx_runtime","AppNavigation_exports","Body","Footer","Header","Item","ItemAlpha","ItemContent","ItemIcon","ItemLabel","ItemSubItems","MiniaturizeTrigger","Root","MINIATURIZE_STORAGE_KEY","readMiniaturizeState","writeMiniaturizeState","state","styledTag","tag","withProvider","withContext","newState"],"sources":["../../../../src/components/app/navigation/AppNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { appNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX, type MouseEvent } from 'react'\nimport { ArrowLeftCircleIcon } from '@heroicons/react/24/outline'\nimport { Tag } from '~/components/tag/Tag'\n\nconst { withProvider, withContext } = createStyleContext(appNavigation, {\n dataAttr: true,\n})\n\nconst MINIATURIZE_STORAGE_KEY = 'isMiniaturizeNav'\n\ntype MiniaturizeState = 'open' | 'closed'\n\n// Whether the nav is collapsed lives in localStorage: no backend field and no teammate\n// sync, and the recipe reads it off `data-state` on the trigger (see the `:has()` rule in\n// theme/recipes/app/navigation.ts).\n//\n// Both helpers swallow their own errors on purpose. A browser that blocks site data\n// (Android Chrome with cookies off, an embedded webview, Safari in lockdown) throws\n// SecurityError on the mere property access, and `typeof localStorage` does not guard\n// against that: it evaluates the same getter. It only guards against the server, where\n// the property is absent.\nconst readMiniaturizeState = (): MiniaturizeState => {\n try {\n return localStorage.getItem(MINIATURIZE_STORAGE_KEY) === 'closed' ? 'closed' : 'open'\n } catch {\n return 'open'\n }\n}\n\nconst writeMiniaturizeState = (state: MiniaturizeState): void => {\n try {\n localStorage.setItem(MINIATURIZE_STORAGE_KEY, state)\n } catch {\n // Storage blocked: the attribute set below still collapses the nav for this page\n // view, the choice just does not survive a reload.\n }\n}\n\n// See Table.tsx for why we wrap `styled(tag)` to pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nexport const Root = withProvider(styledTag('nav'), 'root', {\n defaultProps: {},\n})\nexport const Header = withContext(styledTag('header'), 'header')\nexport const Body = withContext(styledTag('main'), 'body')\n\nexport const Item = withContext(styledTag('div'), 'item')\nexport const ItemSubItems = withContext(styledTag('div'), 'itemSubItems')\nexport const ItemContent = withContext(styledTag('div'), 'itemContent')\nexport const ItemLabel = withContext(styledTag('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(styledTag('footer'), 'footer')\n\nexport const MiniaturizeTrigger = withContext(styledTag('div'), 'miniaturizeTrigger', {\n defaultProps: {\n onClick: (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault()\n const newState = readMiniaturizeState() === 'closed' ? 'open' : 'closed'\n writeMiniaturizeState(newState)\n e.currentTarget.setAttribute('data-state', newState)\n window.dispatchEvent(new Event('storage'))\n },\n className: 'app-navigation__miniaturizeTrigger',\n ...{\n // A getter, so the value is read when this object is SPREAD (on every render of the\n // trigger, in createStyleContext) and never when the module is evaluated. As a plain\n // value it read storage at import time, which threw SecurityError on the browsers\n // above and killed the whole chunk: the kit's barrel imports this module, so every\n // page that imports anything from @stokelp/ui went down with it, public marketing\n // pages that show no navigation included.\n get 'data-state'() {\n return readMiniaturizeState()\n },\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":"A,+jBASM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,cAAe,CACtE,SAAU,EACZ,CAAC,EAEKyB,EAA0B,mBAa1BC,MAA+C,CACnD,GAAI,CACF,OAAO,aAAa,QAAQD,CAAuB,IAAM,SAAW,SAAW,MACjF,MAAQ,CACN,MAAO,MACT,CACF,EAEME,EAAyB,GAAkC,CAC/D,GAAI,CACF,aAAa,QAAQF,EAAyBG,CAAK,CACrD,MAAQ,CAGR,CACF,EAGMC,EAAoD,IAAA,EACxD5B,EAAAA,OAAAA,CAAO6B,CAAG,EAECN,EAAOO,EAAaF,EAAU,KAAK,EAAG,OAAQ,CACzD,aAAc,CAAC,CACjB,CAAC,EACYb,EAASgB,EAAYH,EAAU,QAAQ,EAAG,QAAQ,EAClDf,EAAOkB,EAAYH,EAAU,MAAM,EAAG,MAAM,EAE5CZ,EAAOe,EAAYH,EAAU,KAAK,EAAG,MAAM,EAC3CP,EAAeU,EAAYH,EAAU,KAAK,EAAG,cAAc,EAC3DV,EAAca,EAAYH,EAAU,KAAK,EAAG,aAAa,EACzDR,EAAYW,EAAYH,EAAU,GAAG,EAAG,WAAW,EACnDT,EAAWY,EAAY9B,EAAAA,KAAM,WAAY,CACpD,aAAc,CACZ,KAAM,IACR,CACF,CAAC,EACYgB,EAAYc,EAAY7B,EAAAA,IAAK,YAAa,CACrD,aAAc,CACZ,SAAU,SACZ,CACF,CAAC,EAEYY,EAASiB,EAAYH,EAAU,QAAQ,EAAG,QAAQ,EAElDN,EAAqBS,EAAYH,EAAU,KAAK,EAAG,qBAAsB,CACpF,aAAc,CACZ,QAAU,GAAkC,CAC1C,EAAE,eAAe,EACjB,IAAMI,EAAWP,EAAqB,IAAM,SAAW,OAAS,SAChEC,EAAsBM,CAAQ,EAC9B,EAAE,cAAc,aAAa,aAAcA,CAAQ,EACnD,OAAO,cAAc,IAAI,MAAM,SAAS,CAAC,CAC3C,EACA,UAAW,qCACX,GAAG,CAOD,GAAI,cAAe,CACjB,OAAOP,EAAqB,CAC9B,CACF,EACA,UACE,EAAAd,EAAA,IAAA,CAACV,EAAAA,KAAD,CAAA,UACE,EAAAU,EAAA,IAAA,CAACR,EAAAA,QAAD,CAAsB,CAAA,CAClB,CAAA,CAEV,CACF,CAAC,E"}
1
+ {"version":3,"file":"AppNavigation.cjs","names":["createStyleContext","appNavigation","styled","Icon","Tag","ArrowLeftCircleIcon","require_runtime","require_slots","require_Tag","require_Icon","require_ArrowLeftCircleIcon","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react_jsx_runtime","AppNavigation_exports","Body","Footer","Header","Item","ItemAlpha","ItemContent","ItemIcon","ItemLabel","ItemSubItems","MiniaturizeTrigger","Root","MINIATURIZE_STORAGE_KEY","readMiniaturizeState","writeMiniaturizeState","state","styledTag","tag","withProvider","withContext","newState"],"sources":["../../../../src/components/app/navigation/AppNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { appNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX, type MouseEvent } from 'react'\nimport { ArrowLeftCircleIcon } from '@heroicons/react/24/outline'\nimport { Tag } from '~/components/tag/Tag'\n\nconst { withProvider, withContext } = createStyleContext(appNavigation, {\n dataAttr: true,\n})\n\nconst MINIATURIZE_STORAGE_KEY = 'isMiniaturizeNav'\n\ntype MiniaturizeState = 'open' | 'closed'\n\n// Whether the nav is collapsed lives in localStorage: no backend field and no teammate\n// sync, and the recipe reads it off `data-state` on the trigger (see the `:has()` rule in\n// theme/recipes/app/navigation.ts).\n//\n// Both helpers swallow their own errors on purpose. A browser that blocks site data\n// (Android Chrome with cookies off, an embedded webview, Safari in lockdown) throws\n// SecurityError on the mere property access, and `typeof localStorage` does not guard\n// against that: it evaluates the same getter. It only guards against the server, where\n// the property is absent.\nconst readMiniaturizeState = (): MiniaturizeState => {\n try {\n return localStorage.getItem(MINIATURIZE_STORAGE_KEY) === 'closed' ? 'closed' : 'open'\n } catch {\n return 'open'\n }\n}\n\nconst writeMiniaturizeState = (state: MiniaturizeState): void => {\n try {\n localStorage.setItem(MINIATURIZE_STORAGE_KEY, state)\n } catch {\n // Storage blocked: the attribute set below still collapses the nav for this page\n // view, the choice just does not survive a reload.\n }\n}\n\n// See Table.tsx for why we wrap `styled(tag)` to pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nexport const Root = withProvider(styledTag('nav'), 'root', {\n defaultProps: {},\n})\nexport const Header = withContext(styledTag('header'), 'header')\nexport const Body = withContext(styledTag('main'), 'body')\n\nexport const Item = withContext(styledTag('div'), 'item')\nexport const ItemSubItems = withContext(styledTag('div'), 'itemSubItems')\nexport const ItemContent = withContext(styledTag('div'), 'itemContent')\nexport const ItemLabel = withContext(styledTag('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(styledTag('footer'), 'footer')\n\nexport const MiniaturizeTrigger = withContext(styledTag('div'), 'miniaturizeTrigger', {\n defaultProps: {\n onClick: (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault()\n const newState = readMiniaturizeState() === 'closed' ? 'open' : 'closed'\n writeMiniaturizeState(newState)\n e.currentTarget.setAttribute('data-state', newState)\n window.dispatchEvent(new Event('storage'))\n },\n className: 'app-navigation__miniaturizeTrigger',\n ...{\n // A getter, so the value is read when this object is SPREAD (on every render of the\n // trigger, in createStyleContext) and never when the module is evaluated. As a plain\n // value it read storage at import time, which threw SecurityError on the browsers\n // above and killed the whole chunk: the kit's barrel imports this module, so every\n // page that imports anything from @stokelp/ui went down with it, public marketing\n // pages that show no navigation included.\n get 'data-state'() {\n return readMiniaturizeState()\n },\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":"A,+jBASM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,cAAe,CACtE,SAAU,EACZ,CAAC,EAEKyB,EAA0B,mBAa1BC,M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,EAAAA,QAAD,CAAsB,CAAA,CAClB,CAAA,CAEV,CACF,CAAC,E"}
@@ -1 +1 @@
1
- {"version":3,"file":"AppNavigation.js","names":["ArrowLeftCircleIcon","ForwardRef","AppNavigation_exports","Body","Footer","Header","Item","ItemAlpha","ItemContent","ItemIcon","ItemLabel","ItemSubItems","MiniaturizeTrigger","Root","createStyleContext","appNavigation","MINIATURIZE_STORAGE_KEY","readMiniaturizeState","writeMiniaturizeState","state","styledTag","styled","tag","withProvider","withContext","Icon","Tag","newState"],"sources":["../../../../src/components/app/navigation/AppNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { appNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX, type MouseEvent } from 'react'\nimport { ArrowLeftCircleIcon } from '@heroicons/react/24/outline'\nimport { Tag } from '~/components/tag/Tag'\n\nconst { withProvider, withContext } = createStyleContext(appNavigation, {\n dataAttr: true,\n})\n\nconst MINIATURIZE_STORAGE_KEY = 'isMiniaturizeNav'\n\ntype MiniaturizeState = 'open' | 'closed'\n\n// Whether the nav is collapsed lives in localStorage: no backend field and no teammate\n// sync, and the recipe reads it off `data-state` on the trigger (see the `:has()` rule in\n// theme/recipes/app/navigation.ts).\n//\n// Both helpers swallow their own errors on purpose. A browser that blocks site data\n// (Android Chrome with cookies off, an embedded webview, Safari in lockdown) throws\n// SecurityError on the mere property access, and `typeof localStorage` does not guard\n// against that: it evaluates the same getter. It only guards against the server, where\n// the property is absent.\nconst readMiniaturizeState = (): MiniaturizeState => {\n try {\n return localStorage.getItem(MINIATURIZE_STORAGE_KEY) === 'closed' ? 'closed' : 'open'\n } catch {\n return 'open'\n }\n}\n\nconst writeMiniaturizeState = (state: MiniaturizeState): void => {\n try {\n localStorage.setItem(MINIATURIZE_STORAGE_KEY, state)\n } catch {\n // Storage blocked: the attribute set below still collapses the nav for this page\n // view, the choice just does not survive a reload.\n }\n}\n\n// See Table.tsx for why we wrap `styled(tag)` to pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nexport const Root = withProvider(styledTag('nav'), 'root', {\n defaultProps: {},\n})\nexport const Header = withContext(styledTag('header'), 'header')\nexport const Body = withContext(styledTag('main'), 'body')\n\nexport const Item = withContext(styledTag('div'), 'item')\nexport const ItemSubItems = withContext(styledTag('div'), 'itemSubItems')\nexport const ItemContent = withContext(styledTag('div'), 'itemContent')\nexport const ItemLabel = withContext(styledTag('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(styledTag('footer'), 'footer')\n\nexport const MiniaturizeTrigger = withContext(styledTag('div'), 'miniaturizeTrigger', {\n defaultProps: {\n onClick: (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault()\n const newState = readMiniaturizeState() === 'closed' ? 'open' : 'closed'\n writeMiniaturizeState(newState)\n e.currentTarget.setAttribute('data-state', newState)\n window.dispatchEvent(new Event('storage'))\n },\n className: 'app-navigation__miniaturizeTrigger',\n ...{\n // A getter, so the value is read when this object is SPREAD (on every render of the\n // trigger, in createStyleContext) and never when the module is evaluated. As a plain\n // value it read storage at import time, which threw SecurityError on the browsers\n // above and killed the whole chunk: the kit's barrel imports this module, so every\n // page that imports anything from @stokelp/ui went down with it, public marketing\n // pages that show no navigation included.\n get 'data-state'() {\n return readMiniaturizeState()\n },\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":";;;;;;;;;;;;;;;;;;;;;;A,IASM,EAAE,iBAAc,mBAAgBc,EAAmBC,GAAe,EACtE,UAAU,GACZ,CAAC,GAEKC,IAA0B,oBAa1BC,UAA+C;CACnD,IAAI;EACF,OAAO,aAAa,QAAQD,CAAuB,MAAM,WAAW,WAAW;CACjF,QAAQ;EACN,OAAO;CACT;AACF,GAEME,KAAyB,MAAkC;CAC/D,IAAI;EACF,aAAa,QAAQF,GAAyBG,CAAK;CACrD,QAAQ,CAGR;AACF,GAGMC,KAAoD,MACxDC,EAAOC,CAAG,GAECT,IAAOU,EAAaH,EAAU,KAAK,GAAG,QAAQ,EACzD,cAAc,CAAC,EACjB,CAAC,GACYf,IAASmB,EAAYJ,EAAU,QAAQ,GAAG,QAAQ,GAClDjB,IAAOqB,EAAYJ,EAAU,MAAM,GAAG,MAAM,GAE5Cd,IAAOkB,EAAYJ,EAAU,KAAK,GAAG,MAAM,GAC3CT,IAAea,EAAYJ,EAAU,KAAK,GAAG,cAAc,GAC3DZ,IAAcgB,EAAYJ,EAAU,KAAK,GAAG,aAAa,GACzDV,IAAYc,EAAYJ,EAAU,GAAG,GAAG,WAAW,GACnDX,IAAWe,EAAYC,GAAM,YAAY,EACpD,cAAc,EACZ,MAAM,KACR,EACF,CAAC,GACYlB,IAAYiB,EAAYE,GAAK,aAAa,EACrD,cAAc,EACZ,UAAU,UACZ,EACF,CAAC,GAEYtB,IAASoB,EAAYJ,EAAU,QAAQ,GAAG,QAAQ,GAElDR,IAAqBY,EAAYJ,EAAU,KAAK,GAAG,sBAAsB,EACpF,cAAc;CACZ,UAAU,MAAkC;EAC1C,EAAE,eAAe;EACjB,IAAMO,IAAWV,EAAqB,MAAM,WAAW,SAAS;EAGhE,AAFAC,EAAsBS,CAAQ,GAC9B,EAAE,cAAc,aAAa,cAAcA,CAAQ,GACnD,OAAO,cAAc,IAAI,MAAM,SAAS,CAAC;CAC3C;CACA,WAAW;CACX,GAAG,EAOD,IAAI,eAAe;EACjB,OAAOV,EAAqB;CAC9B,EACF;CACA,UACE,kBAACQ,GAAD,EAAA,UACE,kBAACzB,GAAD,CAAsB,CAAA,EAClB,CAAA;AAEV,EACF,CAAC"}
1
+ {"version":3,"file":"AppNavigation.js","names":["ArrowLeftCircleIcon","ForwardRef","AppNavigation_exports","Body","Footer","Header","Item","ItemAlpha","ItemContent","ItemIcon","ItemLabel","ItemSubItems","MiniaturizeTrigger","Root","createStyleContext","appNavigation","MINIATURIZE_STORAGE_KEY","readMiniaturizeState","writeMiniaturizeState","state","styledTag","styled","tag","withProvider","withContext","Icon","Tag","newState"],"sources":["../../../../src/components/app/navigation/AppNavigation.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { appNavigation } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { Icon } from '~/components/icon/Icon'\nimport { ComponentProps, type JSX, type MouseEvent } from 'react'\nimport { ArrowLeftCircleIcon } from '@heroicons/react/24/outline'\nimport { Tag } from '~/components/tag/Tag'\n\nconst { withProvider, withContext } = createStyleContext(appNavigation, {\n dataAttr: true,\n})\n\nconst MINIATURIZE_STORAGE_KEY = 'isMiniaturizeNav'\n\ntype MiniaturizeState = 'open' | 'closed'\n\n// Whether the nav is collapsed lives in localStorage: no backend field and no teammate\n// sync, and the recipe reads it off `data-state` on the trigger (see the `:has()` rule in\n// theme/recipes/app/navigation.ts).\n//\n// Both helpers swallow their own errors on purpose. A browser that blocks site data\n// (Android Chrome with cookies off, an embedded webview, Safari in lockdown) throws\n// SecurityError on the mere property access, and `typeof localStorage` does not guard\n// against that: it evaluates the same getter. It only guards against the server, where\n// the property is absent.\nconst readMiniaturizeState = (): MiniaturizeState => {\n try {\n return localStorage.getItem(MINIATURIZE_STORAGE_KEY) === 'closed' ? 'closed' : 'open'\n } catch {\n return 'open'\n }\n}\n\nconst writeMiniaturizeState = (state: MiniaturizeState): void => {\n try {\n localStorage.setItem(MINIATURIZE_STORAGE_KEY, state)\n } catch {\n // Storage blocked: the attribute set below still collapses the nav for this page\n // view, the choice just does not survive a reload.\n }\n}\n\n// See Table.tsx for why we wrap `styled(tag)` to pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nexport const Root = withProvider(styledTag('nav'), 'root', {\n defaultProps: {},\n})\nexport const Header = withContext(styledTag('header'), 'header')\nexport const Body = withContext(styledTag('main'), 'body')\n\nexport const Item = withContext(styledTag('div'), 'item')\nexport const ItemSubItems = withContext(styledTag('div'), 'itemSubItems')\nexport const ItemContent = withContext(styledTag('div'), 'itemContent')\nexport const ItemLabel = withContext(styledTag('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(styledTag('footer'), 'footer')\n\nexport const MiniaturizeTrigger = withContext(styledTag('div'), 'miniaturizeTrigger', {\n defaultProps: {\n onClick: (e: MouseEvent<HTMLDivElement>) => {\n e.preventDefault()\n const newState = readMiniaturizeState() === 'closed' ? 'open' : 'closed'\n writeMiniaturizeState(newState)\n e.currentTarget.setAttribute('data-state', newState)\n window.dispatchEvent(new Event('storage'))\n },\n className: 'app-navigation__miniaturizeTrigger',\n ...{\n // A getter, so the value is read when this object is SPREAD (on every render of the\n // trigger, in createStyleContext) and never when the module is evaluated. As a plain\n // value it read storage at import time, which threw SecurityError on the browsers\n // above and killed the whole chunk: the kit's barrel imports this module, so every\n // page that imports anything from @stokelp/ui went down with it, public marketing\n // pages that show no navigation included.\n get 'data-state'() {\n return readMiniaturizeState()\n },\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":";;;;;;;;;;;;;;;;;;;;;;A,IASM,EAAE,iBAAc,mBAAgBc,EAAmBC,GAAe,EACtE,UAAU,GACZ,CAAC,GAEKC,IAA0B,oBAa1BC,UAA+C;CACnD,IAAI;EACF,OAAO,aAAa,QAAQD,CAAuB,MAAM,WAAW,WAAW;CACjF,QAAQ;EACN,OAAO;CACT;AACF,GAEME,KAAyB,MAAkC;CAC/D,IAAI;EACF,aAAa,QAAQF,GAAyBG,CAAK;CACrD,QAAQ,CAGR;AACF,GAGMC,KAAoD,MACxDC,EAAOC,CAAG,GAECT,IAAOU,EAAaH,EAAU,KAAK,GAAG,QAAQ,EACzD,cAAc,CAAC,EACjB,CAAC,GACYf,IAASmB,EAAYJ,EAAU,QAAQ,GAAG,QAAQ,GAClDjB,IAAOqB,EAAYJ,EAAU,MAAM,GAAG,MAAM,GAE5Cd,IAAOkB,EAAYJ,EAAU,KAAK,GAAG,MAAM,GAC3CT,IAAea,EAAYJ,EAAU,KAAK,GAAG,cAAc,GAC3DZ,IAAcgB,EAAYJ,EAAU,KAAK,GAAG,aAAa,GACzDV,IAAYc,EAAYJ,EAAU,GAAG,GAAG,WAAW,GACnDX,IAAWe,EAAYC,GAAM,YAAY,EACpD,cAAc,EACZ,MAAM,KACR,EACF,CAAC,GACYlB,IAAYiB,EAAYE,GAAK,aAAa,EACrD,cAAc,EACZ,UAAU,UACZ,EACF,CAAC,GAEYtB,IAASoB,EAAYJ,EAAU,QAAQ,GAAG,QAAQ,GAElDR,IAAqBY,EAAYJ,EAAU,KAAK,GAAG,sBAAsB,EACpF,cAAc;CACZ,UAAU,MAAkC;EAC1C,EAAE,eAAe;EACjB,IAAMO,IAAWV,EAAqB,MAAM,WAAW,SAAS;EAGhE,AAFAC,EAAsBS,CAAQ,GAC9B,EAAE,cAAc,aAAa,cAAcA,CAAQ,GACnD,OAAO,cAAc,IAAI,MAAM,SAAS,CAAC;CAC3C;CACA,WAAW;CACX,GAAG,EAOD,IAAI,eAAe;EACjB,OAAOV,EAAqB;CAC9B,EACF;CACA,UACE,kBAACQ,GAAD,EAAA,UACE,kBAACzB,GAAD,CAAsB,CAAA,EAClB,CAAA;AAEV,EACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.cjs","names":["createStyleContext","breadcrumb","styled","ark","forwardRef","Children","ReactIs","cloneElement","_Fragment","require_runtime","require_slots","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","react_is","styledTag","tag","StyledBreadcrumb","withProvider","StyledBreadcrumbList","withContext","BreadcrumbItem","BreadcrumbLink","DefaultSeparator","Breadcrumb","props","child","children","item","index","separator"],"sources":["../../../src/components/breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { breadcrumb } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { ark } from '@ark-ui/react'\nimport * as ReactIs from 'react-is'\nimport { Children, cloneElement, ComponentProps, type FC, forwardRef, type JSX, ReactElement, ReactNode } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(breadcrumb)\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst StyledBreadcrumb = withProvider(styledTag('nav'), 'root')\nconst StyledBreadcrumbList = withContext(styledTag('ol'), 'list')\n\nexport const BreadcrumbItem = withContext(styledTag('li'), 'item')\nexport const BreadcrumbLink = withContext(styled(ark.a), 'link')\n\nconst DefaultSeparator = (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.2803 11.4741C16.5732 11.767 16.5732 12.2418 16.2803 12.5347L8.78033 20.0347C8.48744 20.3276 8.01256 20.3276 7.71967 20.0347C7.42678 19.7418 7.42678 19.267 7.71967 18.9741L14.6893 12.0044L7.71967 5.03472C7.42678 4.74183 7.42678 4.26696 7.71967 3.97406C8.01256 3.68117 8.48744 3.68117 8.78033 3.97406L16.2803 11.4741Z\"\n fill=\"#1E3A76\"\n />\n </svg>\n)\n\nexport const Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(\n ({ children, separator = DefaultSeparator, ...props }, ref) => {\n const child = Children.toArray(\n ReactIs.isFragment(children) ? undefined : children,\n ) as ReactElement<BreadcrumbItemProps>[]\n\n return (\n <StyledBreadcrumb {...props} aria-label={props['aria-label'] ?? 'breadcrumb'} ref={ref}>\n <StyledBreadcrumbList>\n {child.map((item, index) => {\n return cloneElement<BreadcrumbItemProps>(item, {\n 'aria-current': index === child.length - 1 ? 'page' : undefined,\n children:\n index === child.length - 1 ? (\n item.props.children\n ) : (\n <>\n {item.props.children}\n {separator ? (\n <>\n {typeof separator === 'object' ? (\n cloneElement(separator as ReactElement)\n ) : (\n <span role=\"presentation\">{separator}</span>\n )}\n </>\n ) : null}\n </>\n ),\n })\n })}\n </StyledBreadcrumbList>\n </StyledBreadcrumb>\n )\n },\n) as FC<BreadcrumbProps>\n\nexport type BreadcrumbLinkProps = ComponentProps<typeof BreadcrumbLink>\nexport type BreadcrumbItemProps = ComponentProps<typeof BreadcrumbItem>\nexport type BreadcrumbProps = ComponentProps<typeof StyledBreadcrumb> & {\n separator?: ReactNode\n}\n"],"mappings":"A,oTAQA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,UAAU,EAG7DgB,EAAoD,IAAA,EACxDf,EAAAA,OAAAA,CAAOgB,CAAG,EAENC,EAAmBC,EAAaH,EAAU,KAAK,EAAG,MAAM,EACxDI,EAAuBC,EAAYL,EAAU,IAAI,EAAG,MAAM,EAEnDM,EAAiBD,EAAYL,EAAU,IAAI,EAAG,MAAM,EACpDO,EAAiBF,GAAA,EAAYpB,EAAAA,OAAAA,CAAOC,EAAAA,IAAI,CAAC,EAAG,MAAM,EAEzDsB,GACJ,EAAAV,EAAA,IAAA,CAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,UAAA,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,kUACF,KAAK,SACN,CAAA,CACE,CAAA,EAGMW,GAAA,EAAatB,EAAAA,WAAAA,EACvB,CAAE,WAAU,YAAYqB,EAAkB,GAAGE,GAAS,IAAQ,CAC7D,IAAMC,EAAQvB,EAAAA,SAAS,QACrBC,EAAQ,WAAWuB,CAAQ,EAAI,IAAA,GAAYA,CAC7C,EAEA,OACE,EAAAd,EAAA,IAAA,CAACI,EAAD,CAAkB,GAAIQ,EAAO,aAAYA,EAAM,eAAiB,aAAmB,MACjF,UAAA,EAAAZ,EAAA,IAAA,CAACM,EAAD,CAAA,SACGO,EAAM,KAAK,EAAM,KAChB,EAAOrB,EAAAA,aAAAA,CAAkCuB,EAAM,CAC7C,eAAgBC,IAAUH,EAAM,OAAS,EAAI,OAAS,IAAA,GACtD,SACEG,IAAUH,EAAM,OAAS,EACvBE,EAAK,MAAM,UAEX,EAAAf,EAAA,KAAA,CAAAP,EAAAA,SAAA,CAAA,SAAA,CACGsB,EAAK,MAAM,SACXE,GACC,EAAAjB,EAAA,IAAA,CAAAP,EAAAA,SAAA,CAAA,SACG,OAAOwB,GAAc,UAAA,EACpBzB,EAAAA,aAAAA,CAAayB,CAAyB,GAEtC,EAAAjB,EAAA,IAAA,CAAC,OAAD,CAAM,KAAK,eAAgB,SAAAiB,CAAgB,CAAA,CAE7C,CAAA,EACA,IACJ,CAAA,CAAA,CAER,CAAC,CACF,CACmB,CAAA,CACN,CAAA,CAEtB,CACF,E"}
1
+ {"version":3,"file":"Breadcrumb.cjs","names":["createStyleContext","breadcrumb","styled","ark","forwardRef","Children","ReactIs","cloneElement","_Fragment","require_runtime","require_slots","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","react_is","styledTag","tag","StyledBreadcrumb","withProvider","StyledBreadcrumbList","withContext","BreadcrumbItem","BreadcrumbLink","DefaultSeparator","Breadcrumb","props","child","children","item","index","separator"],"sources":["../../../src/components/breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { breadcrumb } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { ark } from '@ark-ui/react'\nimport * as ReactIs from 'react-is'\nimport { Children, cloneElement, ComponentProps, type FC, forwardRef, type JSX, ReactElement, ReactNode } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(breadcrumb)\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nconst StyledBreadcrumb = withProvider(styledTag('nav'), 'root')\nconst StyledBreadcrumbList = withContext(styledTag('ol'), 'list')\n\nexport const BreadcrumbItem = withContext(styledTag('li'), 'item')\nexport const BreadcrumbLink = withContext(styled(ark.a), 'link')\n\nconst DefaultSeparator = (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.2803 11.4741C16.5732 11.767 16.5732 12.2418 16.2803 12.5347L8.78033 20.0347C8.48744 20.3276 8.01256 20.3276 7.71967 20.0347C7.42678 19.7418 7.42678 19.267 7.71967 18.9741L14.6893 12.0044L7.71967 5.03472C7.42678 4.74183 7.42678 4.26696 7.71967 3.97406C8.01256 3.68117 8.48744 3.68117 8.78033 3.97406L16.2803 11.4741Z\"\n fill=\"#1E3A76\"\n />\n </svg>\n)\n\nexport const Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(\n ({ children, separator = DefaultSeparator, ...props }, ref) => {\n const child = Children.toArray(\n ReactIs.isFragment(children) ? undefined : children,\n ) as ReactElement<BreadcrumbItemProps>[]\n\n return (\n <StyledBreadcrumb {...props} aria-label={props['aria-label'] ?? 'breadcrumb'} ref={ref}>\n <StyledBreadcrumbList>\n {child.map((item, index) => {\n return cloneElement<BreadcrumbItemProps>(item, {\n 'aria-current': index === child.length - 1 ? 'page' : undefined,\n children:\n index === child.length - 1 ? (\n item.props.children\n ) : (\n <>\n {item.props.children}\n {separator ? (\n <>\n {typeof separator === 'object' ? (\n cloneElement(separator as ReactElement)\n ) : (\n <span role=\"presentation\">{separator}</span>\n )}\n </>\n ) : null}\n </>\n ),\n })\n })}\n </StyledBreadcrumbList>\n </StyledBreadcrumb>\n )\n },\n) as FC<BreadcrumbProps>\n\nexport type BreadcrumbLinkProps = ComponentProps<typeof BreadcrumbLink>\nexport type BreadcrumbItemProps = ComponentProps<typeof BreadcrumbItem>\nexport type BreadcrumbProps = ComponentProps<typeof StyledBreadcrumb> & {\n separator?: ReactNode\n}\n"],"mappings":"A,oTAQA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,UAAU,EAG7DgB,EAAoD,IAAA,EACxDf,EAAAA,OAAAA,CAAOgB,CAAG,EAENC,EAAmBC,EAAaH,EAAU,KAAK,EAAG,MAAM,EACxDI,EAAuBC,EAAYL,EAAU,IAAI,EAAG,MAAM,EAEnDM,EAAiBD,EAAYL,EAAU,IAAI,EAAG,MAAM,EACpDO,EAAiBF,GAAA,EAAYpB,EAAAA,OAAAA,CAAOC,EAAAA,IAAI,CAAC,EAAG,MAAM,EAEzDsB,GACJ,EAAAV,EAAA,IAAA,CAAC,MAAD,CAAK,MAAM,KAAK,OAAO,KAAK,QAAQ,YAAY,KAAK,OAAO,MAAM,6BAChE,UAAA,EAAAA,EAAA,IAAA,CAAC,OAAD,CACE,SAAS,UACT,SAAS,UACT,EAAE,kUACF,KAAK,SACN,CAAA,CACE,CAAA,EAGMW,GAAA,EAAatB,EAAAA,WAAAA,EACvB,CAAE,WAAU,YAAYqB,EAAkB,GAAGE,GAAS,IAAQ,CAC7D,IAAMC,EAAQvB,EAAAA,SAAS,QACrBC,EAAQ,WAAWuB,CAAQ,EAAI,IAAA,GAAYA,CAC7C,EAEA,OACE,EAAAd,EAAA,IAAA,CAACI,EAAD,CAAkB,GAAIQ,EAAO,aAAYA,EAAM,eAAiB,aAAmB,MACjF,UAAA,EAAAZ,EAAA,IAAA,CAACM,EAAD,CAAA,SACGO,EAAM,KAAK,EAAM,KAChB,EAAOrB,EAAAA,aAAAA,CAAkCuB,EAAM,CAC7C,eAAgBC,IAAUH,EAAM,OAAS,EAAI,OAAS,IAAA,GACtD,SACEG,IAAUH,EAAM,OAAS,EACvBE,EAAK,MAAM,UAEX,EAAAf,EAAA,KAAA,CAAAP,EAAAA,SAAA,CAAA,SAAA,CACGsB,EAAK,MAAM,SACXE,GACC,EAAAjB,EAAA,IAAA,CAAAP,EAAAA,SAAA,CAAA,SACG,OAAOwB,GAAc,UAAA,EACpBzB,EAAAA,aAAAA,CAAayB,CAAyB,GAEtC,EAAAjB,EAAA,IAAA,CAAC,OAAD,CAAM,KAAK,eAAgB,SAAAiB,CAAgB,CAAA,CAE7C,CAAA,EACA,IACJ,CAAA,CAAA,CAER,CAAC,CACF,CACmB,CAAA,CACN,CAAA,CAEtB,CACF,E"}
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","names":["_Fragment","Fragment$1","ReactIs","createStyleContext","breadcrumb","styledTag","styled","tag","StyledBreadcrumb","withProvider","StyledBreadcrumbList","withContext","BreadcrumbItem","BreadcrumbLink","ark","DefaultSeparator","Breadcrumb","forwardRef","props","child","Children","children","cloneElement","item","index","separator"],"sources":["../../../src/components/breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { breadcrumb } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { ark } from '@ark-ui/react'\nimport * as ReactIs from 'react-is'\nimport { Children, cloneElement, ComponentProps, type FC, forwardRef, type JSX, ReactElement, ReactNode } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(breadcrumb)\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst StyledBreadcrumb = withProvider(styledTag('nav'), 'root')\nconst StyledBreadcrumbList = withContext(styledTag('ol'), 'list')\n\nexport const BreadcrumbItem = withContext(styledTag('li'), 'item')\nexport const BreadcrumbLink = withContext(styled(ark.a), 'link')\n\nconst DefaultSeparator = (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.2803 11.4741C16.5732 11.767 16.5732 12.2418 16.2803 12.5347L8.78033 20.0347C8.48744 20.3276 8.01256 20.3276 7.71967 20.0347C7.42678 19.7418 7.42678 19.267 7.71967 18.9741L14.6893 12.0044L7.71967 5.03472C7.42678 4.74183 7.42678 4.26696 7.71967 3.97406C8.01256 3.68117 8.48744 3.68117 8.78033 3.97406L16.2803 11.4741Z\"\n fill=\"#1E3A76\"\n />\n </svg>\n)\n\nexport const Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(\n ({ children, separator = DefaultSeparator, ...props }, ref) => {\n const child = Children.toArray(\n ReactIs.isFragment(children) ? undefined : children,\n ) as ReactElement<BreadcrumbItemProps>[]\n\n return (\n <StyledBreadcrumb {...props} aria-label={props['aria-label'] ?? 'breadcrumb'} ref={ref}>\n <StyledBreadcrumbList>\n {child.map((item, index) => {\n return cloneElement<BreadcrumbItemProps>(item, {\n 'aria-current': index === child.length - 1 ? 'page' : undefined,\n children:\n index === child.length - 1 ? (\n item.props.children\n ) : (\n <>\n {item.props.children}\n {separator ? (\n <>\n {typeof separator === 'object' ? (\n cloneElement(separator as ReactElement)\n ) : (\n <span role=\"presentation\">{separator}</span>\n )}\n </>\n ) : null}\n </>\n ),\n })\n })}\n </StyledBreadcrumbList>\n </StyledBreadcrumb>\n )\n },\n) as FC<BreadcrumbProps>\n\nexport type BreadcrumbLinkProps = ComponentProps<typeof BreadcrumbLink>\nexport type BreadcrumbItemProps = ComponentProps<typeof BreadcrumbItem>\nexport type BreadcrumbProps = ComponentProps<typeof StyledBreadcrumb> & {\n separator?: ReactNode\n}\n"],"mappings":";;;;;;;;;AAQA,IAAM,EAAE,iBAAc,mBAAgBG,EAAmBC,CAAU,GAG7DC,KAAoD,MACxDC,EAAOC,CAAG,GAENC,IAAmBC,EAAaJ,EAAU,KAAK,GAAG,MAAM,GACxDK,IAAuBC,EAAYN,EAAU,IAAI,GAAG,MAAM,GAEnDO,IAAiBD,EAAYN,EAAU,IAAI,GAAG,MAAM,GACpDQ,IAAiBF,EAAYL,EAAOQ,EAAI,CAAC,GAAG,MAAM,GAEzDC,IACJ,kBAAC,OAAD;CAAK,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,OAAM;CAChE,UAAA,kBAAC,QAAD;EACE,UAAS;EACT,UAAS;EACT,GAAE;EACF,MAAK;CACN,CAAA;AACE,CAAA,GAGMC,IAAaC,GACvB,EAAE,aAAU,eAAYF,GAAkB,GAAGG,KAAS,MAAQ;CAC7D,IAAMC,IAAQC,EAAS,QACrBlB,EAAQ,WAAWmB,CAAQ,IAAI,KAAA,IAAYA,CAC7C;CAEA,OACE,kBAACb,GAAD;EAAkB,GAAIU;EAAO,cAAYA,EAAM,iBAAiB;EAAmB;EACjF,UAAA,kBAACR,GAAD,EAAA,UACGS,EAAM,KAAK,GAAM,MACTG,EAAkCC,GAAM;GAC7C,gBAAgBC,MAAUL,EAAM,SAAS,IAAI,SAAS,KAAA;GACtD,UACEK,MAAUL,EAAM,SAAS,IACvBI,EAAK,MAAM,WAEX,kBAAAvB,GAAA,EAAA,UAAA,CACGuB,EAAK,MAAM,UACXE,IACC,kBAAAzB,GAAA,EAAA,UACG,OAAOyB,KAAc,WACpBH,EAAaG,CAAyB,IAEtC,kBAAC,QAAD;IAAM,MAAK;IAAgB,UAAAA;GAAgB,CAAA,EAE7C,CAAA,IACA,IACJ,EAAA,CAAA;EAER,CAAC,CACF,EACmB,CAAA;CACN,CAAA;AAEtB,CACF"}
1
+ {"version":3,"file":"Breadcrumb.js","names":["_Fragment","Fragment$1","ReactIs","createStyleContext","breadcrumb","styledTag","styled","tag","StyledBreadcrumb","withProvider","StyledBreadcrumbList","withContext","BreadcrumbItem","BreadcrumbLink","ark","DefaultSeparator","Breadcrumb","forwardRef","props","child","Children","children","cloneElement","item","index","separator"],"sources":["../../../src/components/breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { styled } from '@stokelp/styled-system/jsx'\nimport { breadcrumb } from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { ark } from '@ark-ui/react'\nimport * as ReactIs from 'react-is'\nimport { Children, cloneElement, ComponentProps, type FC, forwardRef, type JSX, ReactElement, ReactNode } from 'react'\n\nconst { withProvider, withContext } = createStyleContext(breadcrumb)\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nconst StyledBreadcrumb = withProvider(styledTag('nav'), 'root')\nconst StyledBreadcrumbList = withContext(styledTag('ol'), 'list')\n\nexport const BreadcrumbItem = withContext(styledTag('li'), 'item')\nexport const BreadcrumbLink = withContext(styled(ark.a), 'link')\n\nconst DefaultSeparator = (\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.2803 11.4741C16.5732 11.767 16.5732 12.2418 16.2803 12.5347L8.78033 20.0347C8.48744 20.3276 8.01256 20.3276 7.71967 20.0347C7.42678 19.7418 7.42678 19.267 7.71967 18.9741L14.6893 12.0044L7.71967 5.03472C7.42678 4.74183 7.42678 4.26696 7.71967 3.97406C8.01256 3.68117 8.48744 3.68117 8.78033 3.97406L16.2803 11.4741Z\"\n fill=\"#1E3A76\"\n />\n </svg>\n)\n\nexport const Breadcrumb = forwardRef<HTMLElement, BreadcrumbProps>(\n ({ children, separator = DefaultSeparator, ...props }, ref) => {\n const child = Children.toArray(\n ReactIs.isFragment(children) ? undefined : children,\n ) as ReactElement<BreadcrumbItemProps>[]\n\n return (\n <StyledBreadcrumb {...props} aria-label={props['aria-label'] ?? 'breadcrumb'} ref={ref}>\n <StyledBreadcrumbList>\n {child.map((item, index) => {\n return cloneElement<BreadcrumbItemProps>(item, {\n 'aria-current': index === child.length - 1 ? 'page' : undefined,\n children:\n index === child.length - 1 ? (\n item.props.children\n ) : (\n <>\n {item.props.children}\n {separator ? (\n <>\n {typeof separator === 'object' ? (\n cloneElement(separator as ReactElement)\n ) : (\n <span role=\"presentation\">{separator}</span>\n )}\n </>\n ) : null}\n </>\n ),\n })\n })}\n </StyledBreadcrumbList>\n </StyledBreadcrumb>\n )\n },\n) as FC<BreadcrumbProps>\n\nexport type BreadcrumbLinkProps = ComponentProps<typeof BreadcrumbLink>\nexport type BreadcrumbItemProps = ComponentProps<typeof BreadcrumbItem>\nexport type BreadcrumbProps = ComponentProps<typeof StyledBreadcrumb> & {\n separator?: ReactNode\n}\n"],"mappings":";;;;;;;;;AAQA,IAAM,EAAE,iBAAc,mBAAgBG,EAAmBC,CAAU,GAG7DC,KAAoD,MACxDC,EAAOC,CAAG,GAENC,IAAmBC,EAAaJ,EAAU,KAAK,GAAG,MAAM,GACxDK,IAAuBC,EAAYN,EAAU,IAAI,GAAG,MAAM,GAEnDO,IAAiBD,EAAYN,EAAU,IAAI,GAAG,MAAM,GACpDQ,IAAiBF,EAAYL,EAAOQ,EAAI,CAAC,GAAG,MAAM,GAEzDC,IACJ,kBAAC,OAAD;CAAK,OAAM;CAAK,QAAO;CAAK,SAAQ;CAAY,MAAK;CAAO,OAAM;CAChE,UAAA,kBAAC,QAAD;EACE,UAAS;EACT,UAAS;EACT,GAAE;EACF,MAAK;CACN,CAAA;AACE,CAAA,GAGMC,IAAaC,GACvB,EAAE,aAAU,eAAYF,GAAkB,GAAGG,KAAS,MAAQ;CAC7D,IAAMC,IAAQC,EAAS,QACrBlB,EAAQ,WAAWmB,CAAQ,IAAI,KAAA,IAAYA,CAC7C;CAEA,OACE,kBAACb,GAAD;EAAkB,GAAIU;EAAO,cAAYA,EAAM,iBAAiB;EAAmB;EACjF,UAAA,kBAACR,GAAD,EAAA,UACGS,EAAM,KAAK,GAAM,MACTG,EAAkCC,GAAM;GAC7C,gBAAgBC,MAAUL,EAAM,SAAS,IAAI,SAAS,KAAA;GACtD,UACEK,MAAUL,EAAM,SAAS,IACvBI,EAAK,MAAM,WAEX,kBAAAvB,GAAA,EAAA,UAAA,CACGuB,EAAK,MAAM,UACXE,IACC,kBAAAzB,GAAA,EAAA,UACG,OAAOyB,KAAc,WACpBH,EAAaG,CAAyB,IAEtC,kBAAC,QAAD;IAAM,MAAK;IAAgB,UAAAA;GAAgB,CAAA,EAE7C,CAAA,IACA,IACJ,EAAA,CAAA;EAER,CAAC,CACF,EACmB,CAAA;CACN,CAAA;AAEtB,CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxCard.cjs","names":["createStyleContext","checkboxCard","styled","ArkCheckbox","ark","forwardRef","splitCssProps","cx","css","CheckIcon","MinusIcon","require_slots","require_icons","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","_stokelp_styled_system_css","styledTag","tag","CheckboxCardRoot","withProvider","CheckboxCardTitle","withContext","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","CheckboxCard","variantProps","checkboxProps","props","cssProps","localProps","rootProps","styles","className","children"],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":"A,8SAgBA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,aAAc,CACrE,SAAU,EACZ,CAAC,EAGKkB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,EAAApB,EAAA,IAAA,CAACd,EAAAA,SAAY,YAAb,CAA0B,CAAA,CACV,C,EAEtB,CAAC,EAED,EAAa,YAAc,e"}
1
+ {"version":3,"file":"CheckboxCard.cjs","names":["createStyleContext","checkboxCard","styled","ArkCheckbox","ark","forwardRef","splitCssProps","cx","css","CheckIcon","MinusIcon","require_slots","require_icons","_ark_ui_react","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","_stokelp_styled_system_css","styledTag","tag","CheckboxCardRoot","withProvider","CheckboxCardTitle","withContext","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","CheckboxCard","variantProps","checkboxProps","props","cssProps","localProps","rootProps","styles","className","children"],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":"A,8SAgBA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,aAAc,CACrE,SAAU,EACZ,CAAC,EAGKkB,EAAoD,IAAA,EACxDjB,EAAAA,OAAAA,CAAOkB,CAAG,EAENC,EAAmBC,GAAA,EAAapB,EAAAA,OAAAA,CAAOC,EAAAA,SAAY,IAAI,CAAC,EAEjDoB,EAAoBC,GAAA,EAAYtB,EAAAA,OAAAA,CAAOC,EAAAA,SAAY,KAAK,EAAG,OAAO,EAClEsB,EAAsBD,EAAYL,EAAU,KAAK,EAAG,SAAS,EAC7DO,EAA0BF,EAAYL,EAAU,GAAG,EAAG,aAAa,EACnEQ,EAAoBH,GAAA,EAAYtB,EAAAA,OAAAA,CAAOE,EAAAA,IAAI,GAAG,EAAG,OAAO,EAOxDwB,GAAA,EAAevB,EAAAA,WAAAA,EAA6C,EAAO,IAAQ,CACtF,GAAM,CAACwB,EAAcC,GAAiB7B,EAAAA,aAAa,kBAAkB8B,CAAK,EACpE,CAACC,EAAUC,IAAA,EAAc3B,EAAAA,cAAAA,CAAcwB,CAAa,EACpD,CAAE,WAAU,YAAW,GAAGI,GAAcD,EACxCE,GAAA,EAASlC,EAAAA,aAAAA,CAAa4B,CAAY,EAExC,OACE,EAAAZ,EAAA,KAAA,CAACI,EAAD,CACO,MACL,WAAA,EAAWd,EAAAA,GAAAA,CAAG4B,EAAO,MAAA,EAAM3B,EAAAA,IAAAA,CAAIwB,CAAQ,EAAGI,CAAS,EACnD,GAAIF,EACJ,MAAOA,EAAU,MAJnB,SAAA,EAME,EAAAjB,EAAA,KAAA,CAACd,EAAAA,SAAY,QAAb,CAAqB,UAAWgC,EAAO,QAAvC,SAAA,EACE,EAAAlB,EAAA,IAAA,CAACd,EAAAA,SAAY,UAAb,CAAA,UACE,EAAAc,EAAA,IAAA,CAACR,EAAAA,UAAD,CAAY,CAAA,CACS,CAAA,GACvB,EAAAQ,EAAA,IAAA,CAACd,EAAAA,SAAY,UAAb,CAAuB,cAAA,GACrB,UAAA,EAAAc,EAAA,IAAA,CAACP,EAAAA,UAAD,CAAY,CAAA,CACS,CAAA,CACJ,C,GACpB2B,GACD,EAAApB,EAAA,IAAA,CAACd,EAAAA,SAAY,YAAb,CAA0B,CAAA,CACV,C,EAEtB,CAAC,EAED,EAAa,YAAc,e"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxCard.js","names":["ArkCheckbox","createStyleContext","checkboxCard","styledTag","styled","tag","CheckboxCardRoot","withProvider","Checkbox","CheckboxCardTitle","withContext","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","ark","CheckboxCard","forwardRef","variantProps","checkboxProps","props","cssProps","localProps","splitCssProps","rootProps","styles","cx","css","className","CheckIcon","MinusIcon","children"],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,EAAE,iBAAc,mBAAgBC,EAAmBC,GAAc,EACrE,UAAU,GACZ,CAAC,GAGKC,KAAoD,MACxDC,EAAOC,CAAG,GAENC,IAAmBC,EAAaH,EAAOJ,EAAY,IAAI,CAAC,GAEjDS,IAAoBC,EAAYN,EAAOJ,EAAY,KAAK,GAAG,OAAO,GAClEW,IAAsBD,EAAYP,EAAU,KAAK,GAAG,SAAS,GAC7DS,IAA0BF,EAAYP,EAAU,GAAG,GAAG,aAAa,GACnEU,IAAoBH,EAAYN,EAAOU,EAAI,GAAG,GAAG,OAAO,GAOxDC,IAAeC,GAA6C,GAAO,MAAQ;CACtF,IAAM,CAACC,GAAcC,KAAiBhB,EAAa,kBAAkBiB,CAAK,GACpE,CAACC,GAAUC,KAAcC,EAAcJ,CAAa,GACpD,EAAE,aAAU,cAAW,GAAGK,MAAcF,GACxCG,IAAStB,EAAae,CAAY;CAExC,OACE,kBAACX,GAAD;EACO;EACL,WAAWmB,EAAGD,EAAO,MAAME,EAAIN,CAAQ,GAAGO,CAAS;EACnD,GAAIJ;EACJ,OAAOA,EAAU;EAJnB,UAAA;GAME,kBAACvB,EAAY,SAAb;IAAqB,WAAWwB,EAAO;IAAvC,UAAA,CACE,kBAACxB,EAAY,WAAb,EAAA,UACE,kBAAC4B,GAAD,CAAY,CAAA,EACS,CAAA,GACvB,kBAAC5B,EAAY,WAAb;KAAuB,eAAA;KACrB,UAAA,kBAAC6B,GAAD,CAAY,CAAA;IACS,CAAA,CACJ;;GACpBC;GACD,kBAAC9B,EAAY,aAAb,CAA0B,CAAA;EACV;;AAEtB,CAAC;AAED,EAAa,cAAc"}
1
+ {"version":3,"file":"CheckboxCard.js","names":["ArkCheckbox","createStyleContext","checkboxCard","styledTag","styled","tag","CheckboxCardRoot","withProvider","Checkbox","CheckboxCardTitle","withContext","CheckboxCardContent","CheckboxCardDescription","CheckboxCardImage","ark","CheckboxCard","forwardRef","variantProps","checkboxProps","props","cssProps","localProps","splitCssProps","rootProps","styles","cx","css","className","CheckIcon","MinusIcon","children"],"sources":["../../../src/components/checkbox-card/CheckboxCard.tsx"],"sourcesContent":["import { ark, Checkbox as ArkCheckbox, type CheckboxRootProps } from '@ark-ui/react'\nimport { css, cx } from '@stokelp/styled-system/css'\nimport { splitCssProps, styled } from '@stokelp/styled-system/jsx'\nimport { checkboxCard, type CheckboxCardVariantProps } from '@stokelp/styled-system/recipes'\nimport type { Assign, JsxStyleProps, StyledComponent } from '@stokelp/styled-system/types'\nimport { ComponentProps, forwardRef, type JSX } from 'react'\nimport { createStyleContext } from '~/utils/slots'\nimport { type CheckboxProps } from '~/components/checkbox'\nimport { CheckIcon, MinusIcon } from '~/shared/assets/icons'\n\ntype StyledCheckboxRootProps = Assign<JsxStyleProps, CheckboxRootProps>\n\nexport interface CheckboxCardProps extends Omit<StyledCheckboxRootProps, 'value'>, CheckboxCardVariantProps {\n value?: string | number\n}\n\nconst { withProvider, withContext } = createStyleContext(checkboxCard, {\n dataAttr: true,\n})\n\n// See Table.tsx for why we pin the literal tag.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nconst CheckboxCardRoot = withProvider(styled(ArkCheckbox.Root))\n\nexport const CheckboxCardTitle = withContext(styled(ArkCheckbox.Label), 'title')\nexport const CheckboxCardContent = withContext(styledTag('div'), 'content')\nexport const CheckboxCardDescription = withContext(styledTag('p'), 'description')\nexport const CheckboxCardImage = withContext(styled(ark.img), 'image')\n\nexport type CheckboxCardTitleProps = ComponentProps<typeof CheckboxCardTitle>\nexport type CheckboxCardContentProps = ComponentProps<typeof CheckboxCardContent>\nexport type CheckboxCardDescriptionProps = ComponentProps<typeof CheckboxCardDescription>\nexport type CheckboxCardImageProps = ComponentProps<typeof CheckboxCardImage>\n\nexport const CheckboxCard = forwardRef<HTMLLabelElement, CheckboxProps>((props, ref) => {\n const [variantProps, checkboxProps] = checkboxCard.splitVariantProps(props)\n const [cssProps, localProps] = splitCssProps(checkboxProps)\n const { children, className, ...rootProps } = localProps\n const styles = checkboxCard(variantProps)\n\n return (\n <CheckboxCardRoot\n ref={ref}\n className={cx(styles.root, css(cssProps), className)}\n {...rootProps}\n value={rootProps.value as string | undefined}\n >\n <ArkCheckbox.Control className={styles.control}>\n <ArkCheckbox.Indicator>\n <CheckIcon />\n </ArkCheckbox.Indicator>\n <ArkCheckbox.Indicator indeterminate>\n <MinusIcon />\n </ArkCheckbox.Indicator>\n </ArkCheckbox.Control>\n {children}\n <ArkCheckbox.HiddenInput />\n </CheckboxCardRoot>\n )\n})\n\nCheckboxCard.displayName = 'CheckboxCard'\n"],"mappings":";;;;;;;;;;AAgBA,IAAM,EAAE,iBAAc,mBAAgBC,EAAmBC,GAAc,EACrE,UAAU,GACZ,CAAC,GAGKC,KAAoD,MACxDC,EAAOC,CAAG,GAENC,IAAmBC,EAAaH,EAAOJ,EAAY,IAAI,CAAC,GAEjDS,IAAoBC,EAAYN,EAAOJ,EAAY,KAAK,GAAG,OAAO,GAClEW,IAAsBD,EAAYP,EAAU,KAAK,GAAG,SAAS,GAC7DS,IAA0BF,EAAYP,EAAU,GAAG,GAAG,aAAa,GACnEU,IAAoBH,EAAYN,EAAOU,EAAI,GAAG,GAAG,OAAO,GAOxDC,IAAeC,GAA6C,GAAO,MAAQ;CACtF,IAAM,CAACC,GAAcC,KAAiBhB,EAAa,kBAAkBiB,CAAK,GACpE,CAACC,GAAUC,KAAcC,EAAcJ,CAAa,GACpD,EAAE,aAAU,cAAW,GAAGK,MAAcF,GACxCG,IAAStB,EAAae,CAAY;CAExC,OACE,kBAACX,GAAD;EACO;EACL,WAAWmB,EAAGD,EAAO,MAAME,EAAIN,CAAQ,GAAGO,CAAS;EACnD,GAAIJ;EACJ,OAAOA,EAAU;EAJnB,UAAA;GAME,kBAACvB,EAAY,SAAb;IAAqB,WAAWwB,EAAO;IAAvC,UAAA,CACE,kBAACxB,EAAY,WAAb,EAAA,UACE,kBAAC4B,GAAD,CAAY,CAAA,EACS,CAAA,GACvB,kBAAC5B,EAAY,WAAb;KAAuB,eAAA;KACrB,UAAA,kBAAC6B,GAAD,CAAY,CAAA;IACS,CAAA,CACJ;;GACpBC;GACD,kBAAC9B,EAAY,aAAb,CAA0B,CAAA;EACV;;AAEtB,CAAC;AAED,EAAa,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.cjs","names":["createStyleContext","table","styled","tableContainer","forwardRef","TableProvider","useTable","tableGroupTitle","useRef","tableEmptyRow","require_slots","require_TableProvider","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","styledTag","tag","TableContainer","StyledTable","withProvider","Table","props","Thead","withContext","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","handleOnClick","sortKey","sortDescriptor","dispatch","onClick","children","addon","Td","StyledTableGroupTitle","TableGroupTitle","$td","tableColumns","StyledTableEmptyRow","TableEmptyRow"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, JSX, MouseEvent, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport {\n table,\n tableContainer,\n tableEmptyRow,\n tableGroupTitle,\n type TableContainerVariantProps,\n type TableEmptyRowVariantProps,\n type TableGroupTitleVariantProps,\n} from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\n// Helper: `styled('tag')` returns `StyledComponent<T, {}>` but TS widens the\n// literal to `string` at d.ts emit, stripping every native HTML attribute\n// from consumer typings. This wrapper pins the literal tag via the generic.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nexport const TableContainer = styled('div', tableContainer) as StyledComponent<'div', TableContainerVariantProps>\n\nconst StyledTable = withProvider(styledTag('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport type TableProps = StyledTableProps & Pick<TableProviderProps, 'onSortChange' | 'descriptor'>\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styledTag('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styledTag('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styledTag('svg'), 'sortIndicator')\nexport const Tbody = withContext(styledTag('tbody'), 'tbody')\nexport const Tr = withContext(styledTag('tr'), 'tr')\nconst StyledTh = withContext(styledTag('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport type ThProps = StyledThProps & {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick = (e: MouseEvent<HTMLTableCellElement>) => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\">&nbsp;{addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styledTag('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle) as StyledComponent<'td', TableGroupTitleVariantProps>\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow) as StyledComponent<'td', TableEmptyRowVariantProps>\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"mappings":"A,iOAgBA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,KAAK,EAKxDe,EAAoD,IAAA,EACxDd,EAAAA,OAAAA,CAAOe,CAAG,EAECC,GAAA,EAAiBhB,EAAAA,OAAAA,CAAO,MAAOC,EAAAA,cAAc,EAEpDgB,EAAcC,EAAaJ,EAAU,OAAO,EAAG,MAAM,EAK9CK,GAAA,EAAQjB,EAAAA,WAAAA,EAClB,CAAE,WAAU,eAAc,aAAY,GAAGkB,GAAS,KAE/C,EAAAP,EAAA,IAAA,CAACV,EAAAA,cAAD,CAA2B,aAA0B,eACnD,UAAA,EAAAU,EAAA,IAAA,CAACI,EAAD,CAAkB,MAAK,GAAIG,EACxB,UACU,CAAA,CACA,CAAA,CAGrB,EAEA,EAAM,YAAc,QAEpB,IAAaC,EAAQC,EAAYR,EAAU,OAAO,EAAG,OAAO,EACtDS,EAAoBD,EAAYR,EAAU,KAAK,EAAG,mBAAmB,EACrEU,EAAgBF,EAAYR,EAAU,KAAK,EAAG,eAAe,EACtDW,EAAQH,EAAYR,EAAU,OAAO,EAAG,OAAO,EAC/CY,EAAKJ,EAAYR,EAAU,IAAI,EAAG,IAAI,EAC7Ca,EAAWL,EAAYR,EAAU,IAAI,EAAG,IAAI,EASrCc,GAAA,EAAK1B,EAAAA,WAAAA,EACf,CAAE,WAAU,QAAO,UAAS,UAAS,GAAGkB,GAAS,IAAQ,CACxD,GAAM,CAAE,WAAU,kBAAmBhB,EAAAA,SAAS,EAExCyB,EAAiB,GAAwC,CACzDC,IACEC,IAAmB,KACrBC,EAAS,CACP,KAAM,yBACN,QAAS,CACP,IAAKF,EACL,UAAW,KACb,CACF,CAAC,EACQC,EAA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AI,SAAS,QAAQ,OAAO,CAAC,EAAE,cAAc,YAAY,EAC1EC,GACFD,EAAI,QAAQ,aAAa,UAAWC,EAAa,SAAS,OAAO,SAAS,CAAC,CAE/E,CACF,EAAG,CAAC,CAAC,GAGH,EAAA3B,EAAA,IAAA,CAAC,KAAD,CAAS,MAAK,UAAU,kBACtB,UAAA,EAAAA,EAAA,IAAA,CAAC4B,EAAD,CAAqB,IAAKF,EAAK,GAAInB,CAAQ,CAAA,CACzC,CAAA,CAER,CAAC,EACD,EAAc,YAAc,gB"}
1
+ {"version":3,"file":"Table.cjs","names":["createStyleContext","table","styled","tableContainer","forwardRef","TableProvider","useTable","tableGroupTitle","useRef","tableEmptyRow","require_slots","require_TableProvider","_stokelp_styled_system_jsx","_stokelp_styled_system_recipes","react","react_jsx_runtime","styledTag","tag","TableContainer","StyledTable","withProvider","Table","props","Thead","withContext","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","handleOnClick","sortKey","sortDescriptor","dispatch","onClick","children","addon","Td","StyledTableGroupTitle","TableGroupTitle","$td","tableColumns","StyledTableEmptyRow","TableEmptyRow"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, JSX, MouseEvent, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport {\n table,\n tableContainer,\n tableEmptyRow,\n tableGroupTitle,\n type TableContainerVariantProps,\n type TableEmptyRowVariantProps,\n type TableGroupTitleVariantProps,\n} from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\n// Helper: `styled('tag')` returns `StyledComponent<T, {}>` but TS widens the\n// literal to `string` at d.ts emit, stripping every native HTML attribute\n// from consumer typings. This wrapper pins the literal tag via the generic.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nexport const TableContainer = styled('div', tableContainer) as StyledComponent<'div', TableContainerVariantProps>\n\nconst StyledTable = withProvider(styledTag('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport type TableProps = StyledTableProps & Pick<TableProviderProps, 'onSortChange' | 'descriptor'>\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styledTag('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styledTag('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styledTag('svg'), 'sortIndicator')\nexport const Tbody = withContext(styledTag('tbody'), 'tbody')\nexport const Tr = withContext(styledTag('tr'), 'tr')\nconst StyledTh = withContext(styledTag('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport type ThProps = StyledThProps & {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick = (e: MouseEvent<HTMLTableCellElement>) => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\">&nbsp;{addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styledTag('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle) as StyledComponent<'td', TableGroupTitleVariantProps>\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow) as StyledComponent<'td', TableEmptyRowVariantProps>\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"mappings":"A,iOAgBA,GAAM,CAAE,eAAc,eAAgBA,EAAAA,mBAAmBC,EAAAA,KAAK,EAKxDe,EAAoD,IAAA,EACxDd,EAAAA,OAAAA,CAAOe,CAAG,EAECC,GAAA,E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EACD,EAAc,YAAc,gB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","names":["createStyleContext","table","styledTag","styled","tag","TableContainer","tableContainer","StyledTable","withProvider","Table","forwardRef","props","TableProvider","Thead","withContext","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","useTable","handleOnClick","sortKey","sortDescriptor","dispatch","onClick","children","addon","Td","StyledTableGroupTitle","tableGroupTitle","TableGroupTitle","$td","useRef","useLayoutEffect","tableColumns","StyledTableEmptyRow","tableEmptyRow","TableEmptyRow"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, JSX, MouseEvent, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport {\n table,\n tableContainer,\n tableEmptyRow,\n tableGroupTitle,\n type TableContainerVariantProps,\n type TableEmptyRowVariantProps,\n type TableGroupTitleVariantProps,\n} from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\n// Helper: `styled('tag')` returns `StyledComponent<T, {}>` but TS widens the\n// literal to `string` at d.ts emit, stripping every native HTML attribute\n// from consumer typings. This wrapper pins the literal tag via the generic.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T, {}> =>\n styled(tag) as StyledComponent<T, {}>\n\nexport const TableContainer = styled('div', tableContainer) as StyledComponent<'div', TableContainerVariantProps>\n\nconst StyledTable = withProvider(styledTag('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport type TableProps = StyledTableProps & Pick<TableProviderProps, 'onSortChange' | 'descriptor'>\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styledTag('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styledTag('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styledTag('svg'), 'sortIndicator')\nexport const Tbody = withContext(styledTag('tbody'), 'tbody')\nexport const Tr = withContext(styledTag('tr'), 'tr')\nconst StyledTh = withContext(styledTag('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport type ThProps = StyledThProps & {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick = (e: MouseEvent<HTMLTableCellElement>) => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\">&nbsp;{addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styledTag('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle) as StyledComponent<'td', TableGroupTitleVariantProps>\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow) as StyledComponent<'td', TableEmptyRowVariantProps>\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"mappings":";;;;;;;;AAgBA,IAAM,EAAE,iBAAc,mBAAgBA,EAAmBC,CAAK,GAKxDC,KAAoD,MACxDC,EAAOC,CAAG,GAECC,IAAiBF,EAAO,OAAOG,CAAc,GAEpDC,IAAcC,EAAaN,EAAU,OAAO,GAAG,MAAM,GAK9CO,IAAQC,GAClB,EAAE,aAAU,iBAAc,eAAY,GAAGC,KAAS,MAE/C,kBAACC,GAAD;CAA2B;CAA0B;CACnD,UAAA,kBAACL,GAAD;EAAkB;EAAK,GAAII;EACxB;CACU,CAAA;AACA,CAAA,CAGrB;AAEA,EAAM,cAAc;AAEpB,IAAaE,IAAQC,EAAYZ,EAAU,OAAO,GAAG,OAAO,GACtDa,IAAoBD,EAAYZ,EAAU,KAAK,GAAG,mBAAmB,GACrEc,IAAgBF,E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C,EAAE,cAAc,YAAY;GAC9E,AAAIG,KACFH,EAAI,QAAQ,aAAa,WAAWG,EAAa,SAAS,OAAO,SAAS,CAAC;EAE/E;CACF,GAAG,CAAC,CAAC,GAGH,kBAAC,MAAD;EAAS;EAAK,WAAU;EACtB,UAAA,kBAACC,GAAD;GAAqB,KAAKJ;GAAK,GAAItB;EAAQ,CAAA;CACzC,CAAA;AAER,CAAC;AACD,EAAc,cAAc"}
1
+ {"version":3,"file":"Table.js","names":["createStyleContext","table","styledTag","styled","tag","TableContainer","tableContainer","StyledTable","withProvider","Table","forwardRef","props","TableProvider","Thead","withContext","SortIndicatorRoot","SortIndicator","Tbody","Tr","StyledTh","Th","useTable","handleOnClick","sortKey","sortDescriptor","dispatch","onClick","children","addon","Td","StyledTableGroupTitle","tableGroupTitle","TableGroupTitle","$td","useRef","useLayoutEffect","tableColumns","StyledTableEmptyRow","tableEmptyRow","TableEmptyRow"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import type { ComponentProps, ElementRef, FC, JSX, MouseEvent, ReactNode } from 'react'\nimport { forwardRef, useLayoutEffect, useRef } from 'react'\nimport { styled } from '@stokelp/styled-system/jsx'\nimport {\n table,\n tableContainer,\n tableEmptyRow,\n tableGroupTitle,\n type TableContainerVariantProps,\n type TableEmptyRowVariantProps,\n type TableGroupTitleVariantProps,\n} from '@stokelp/styled-system/recipes'\nimport type { StyledComponent } from '@stokelp/styled-system/types'\nimport { createStyleContext } from '~/utils/slots'\nimport { TableProvider, type TableProviderProps, useTable } from './TableProvider'\n\nconst { withProvider, withContext } = createStyleContext(table)\n\n// Helper: `styled('tag')` returns `StyledComponent<T, {}>` but TS widens the\n// literal to `string` at d.ts emit, stripping every native HTML attribute\n// from consumer typings. This wrapper pins the literal tag via the generic.\nconst styledTag = <T extends keyof JSX.IntrinsicElements>(tag: T): StyledComponent<T> =>\n styled(tag) as StyledComponent<T>\n\nexport const TableContainer = styled('div', tableContainer) as StyledComponent<'div', TableContainerVariantProps>\n\nconst StyledTable = withProvider(styledTag('table'), 'root')\ntype StyledTableProps = ComponentProps<typeof StyledTable>\n\nexport type TableProps = StyledTableProps & Pick<TableProviderProps, 'onSortChange' | 'descriptor'>\n\nexport const Table = forwardRef<ElementRef<typeof StyledTable>, TableProps>(\n ({ children, onSortChange, descriptor, ...props }, ref) => {\n return (\n <TableProvider descriptor={descriptor} onSortChange={onSortChange}>\n <StyledTable ref={ref} {...props}>\n {children}\n </StyledTable>\n </TableProvider>\n )\n },\n) as FC<TableProps>\n\nTable.displayName = 'Table'\n\nexport const Thead = withContext(styledTag('thead'), 'thead')\nconst SortIndicatorRoot = withContext(styledTag('div'), 'sortIndicatorRoot')\nconst SortIndicator = withContext(styledTag('svg'), 'sortIndicator')\nexport const Tbody = withContext(styledTag('tbody'), 'tbody')\nexport const Tr = withContext(styledTag('tr'), 'tr')\nconst StyledTh = withContext(styledTag('th'), 'th')\n\ntype StyledThProps = ComponentProps<typeof StyledTh>\n\nexport type ThProps = StyledThProps & {\n addon?: ReactNode\n sortKey?: string\n}\n\nexport const Th = forwardRef<ElementRef<typeof StyledTh>, ThProps>(\n ({ children, addon, sortKey, onClick, ...props }, ref) => {\n const { dispatch, sortDescriptor } = useTable()\n\n const handleOnClick = (e: MouseEvent<HTMLTableCellElement>) => {\n if (sortKey) {\n if (sortDescriptor === null) {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n } else if (sortDescriptor.key === sortKey) {\n if (sortDescriptor.direction === 'asc') {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'desc',\n },\n })\n } else {\n dispatch({\n type: 'CLEAR_SORT_DESCRIPTOR',\n })\n }\n } else {\n dispatch({\n type: 'UPDATE_SORT_DESCRIPTOR',\n payload: {\n key: sortKey,\n direction: 'asc',\n },\n })\n }\n }\n onClick?.(e)\n }\n\n return (\n <StyledTh\n ref={ref}\n {...props}\n {...(sortKey ? { 'data-sortable': true } : {})}\n role=\"group\"\n onClick={handleOnClick}\n >\n {children}\n {addon ? <span className=\"th__addon\">&nbsp;{addon}</span> : null}\n {sortDescriptor && sortDescriptor.key === sortKey ? (\n <SortIndicatorRoot data-state=\"active\">\n <SortIndicator\n data-active={sortDescriptor.direction === 'asc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator\n data-active={sortDescriptor.direction === 'desc' ? true : undefined}\n viewBox=\"0 0 8 8\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : sortKey ? (\n <SortIndicatorRoot data-state=\"idle\">\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33334 4.83332L4.00001 3.16666L5.66668 4.83332H2.33334Z\" fill=\"currentColor\" />\n </SortIndicator>\n <SortIndicator data-active={true} viewBox=\"0 0 8 8\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.33333 3.16666L3.99999 4.83332L5.66666 3.16666H2.33333Z\" fill=\"currentColor\" />\n </SortIndicator>\n </SortIndicatorRoot>\n ) : null}\n </StyledTh>\n )\n },\n) as FC<ThProps>\n\nTh.displayName = 'Th'\n\nexport const Td = withContext(styledTag('td'), 'td')\n\nconst StyledTableGroupTitle = styled('td', tableGroupTitle) as StyledComponent<'td', TableGroupTitleVariantProps>\nexport type TableGroupTitleProps = ComponentProps<typeof StyledTableGroupTitle>\nexport const TableGroupTitle = forwardRef<HTMLTableRowElement, TableGroupTitleProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableGroupTitle>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__group__title\">\n <StyledTableGroupTitle ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableGroupTitleProps>\nTableGroupTitle.displayName = 'TableGroupTitle'\n\nconst StyledTableEmptyRow = styled('td', tableEmptyRow) as StyledComponent<'td', TableEmptyRowVariantProps>\nexport type TableEmptyRowProps = ComponentProps<typeof StyledTableEmptyRow>\nexport const TableEmptyRow = forwardRef<HTMLTableRowElement, TableEmptyRowProps>((props, ref) => {\n const $td = useRef<ElementRef<typeof StyledTableEmptyRow>>(null)\n useLayoutEffect(() => {\n if ($td.current) {\n const tableColumns = $td.current?.closest('table')?.querySelector('thead > tr')\n if (tableColumns) {\n $td.current.setAttribute('colspan', tableColumns.children.length.toString())\n }\n }\n }, [])\n\n return (\n <tr ref={ref} className=\"table_tr__empty\">\n <StyledTableEmptyRow ref={$td} {...props} />\n </tr>\n )\n}) as FC<TableEmptyRowProps>\nTableEmptyRow.displayName = 'TableEmptyRow'\n\nexport interface TheadProps extends ComponentProps<typeof Thead> {}\n\nexport interface TbodyProps extends ComponentProps<typeof Tbody> {}\n\nexport interface TrProps extends ComponentProps<typeof Tr> {}\n\nexport interface TdProps extends ComponentProps<typeof Td> {}\n\nexport interface TableContainerProps extends ComponentProps<typeof TableContainer> {}\n"],"mappings":";;;;;;;;AAgBA,IAAM,EAAE,iBAAc,mBAAgBA,EAAmBC,CAAK,GAKxDC,KAAoD,MACxDC,EAAOC,CAAG,GAECC,IAAiBF,EAAO,OAAOG,CAAc,GAEpDC,IAAcC,EAAaN,EAAU,OAAO,GAAG,MAAM,GAK9CO,IAAQC,GAClB,EAAE,aAAU,iBAAc,eAAY,GAAGC,KAAS,MAE/C,kBAACC,GAAD;CA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ACD,EAAgB,cAAc;AAE9B,IAAM0B,IAAsBlC,EAAO,MAAMmC,CAAa,GAEzCC,IAAgB7B,GAAqD,GAAO,MAAQ;CAC/F,IAAMuB,IAAMC,EAA+C,IAAI;CAU/D,OATAC,QAAsB;EACpB,IAAIF,EAAI,SAAS;GACf,IAAMG,IAAeH,EAAI,SAAS,QAAQ,OAAO,CAAC,EAAE,cAAc,YAAY;GAC9E,AAAIG,KACFH,EAAI,QAAQ,aAAa,WAAWG,EAAa,SAAS,OAAO,SAAS,CAAC;EAE/E;CACF,GAAG,CAAC,CAAC,GAGH,kBAAC,MAAD;EAAS;EAAK,WAAU;EACtB,UAAA,kBAACC,GAAD;GAAqB,KAAKJ;GAAK,GAAItB;EAAQ,CAAA;CACzC,CAAA;AAER,CAAC;AACD,EAAc,cAAc"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/ui",
3
- "version": "4.1.2",
3
+ "version": "4.1.4",
4
4
  "description": "Stokelp UI React",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",