@atom-learning/components 4.0.0-beta.10 → 4.0.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js.map +1 -1
- package/dist/components/action-icon/ActionIcon.js +1 -1
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/chip/Chip.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +1 -1
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/DataTableTable.js.map +1 -1
- package/dist/components/dialog/DialogContent.js +1 -1
- package/dist/components/dialog/DialogContent.js.map +1 -1
- package/dist/components/empty-state/EmptyStateBody.js +1 -1
- package/dist/components/empty-state/EmptyStateBody.js.map +1 -1
- package/dist/components/empty-state/EmptyStateTitle.js +1 -1
- package/dist/components/empty-state/EmptyStateTitle.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/keyboard-shortcut/KeyboardShortcut.d.ts +760 -0
- package/dist/components/keyboard-shortcut/KeyboardShortcut.js +2 -0
- package/dist/components/keyboard-shortcut/KeyboardShortcut.js.map +1 -0
- package/dist/components/keyboard-shortcut/index.d.ts +1124 -0
- package/dist/components/keyboard-shortcut/index.js +2 -0
- package/dist/components/keyboard-shortcut/index.js.map +1 -0
- package/dist/components/navigation/NavigationMenu.styles.d.ts +1 -1
- package/dist/components/navigation/NavigationMenu.styles.js +1 -1
- package/dist/components/navigation/NavigationMenu.styles.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.d.ts +2 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalText.js.map +1 -1
- package/dist/components/pagination/PaginationPopover.js +1 -1
- package/dist/components/pagination/PaginationPopover.js.map +1 -1
- package/dist/components/radio-card/RadioCardGroup.js.map +1 -1
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/section-message/SectionMessageTitle.js.map +1 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/table/Table.d.ts +3 -5
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableCell.js +1 -1
- package/dist/components/table/TableCell.js.map +1 -1
- package/dist/components/table/TableStickyColumnsContainer.d.ts +1 -3
- package/dist/components/table/TableStickyColumnsContainer.js +1 -1
- package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
- package/dist/components/table/useStickyColumnsCss.d.ts +1 -3
- package/dist/components/table/useStickyColumnsCss.js +1 -1
- package/dist/components/table/useStickyColumnsCss.js.map +1 -1
- package/dist/components/tabs/TabsTrigger.js +1 -1
- package/dist/components/tabs/TabsTrigger.js.map +1 -1
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.js.map +1 -1
- package/dist/components/top-bar/TopBarBrand.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/experiments/color-scheme/stitches.colorscheme.config.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/utilities/style/focus-visible-style-block.d.ts +2 -1
- package/dist/utilities/style/focus-visible-style-block.js +1 -1
- package/dist/utilities/style/focus-visible-style-block.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/keyboard-shortcut/index.ts"],"sourcesContent":["import {\n KeyboardShortcut as KeyboardShortcutComponent,\n KeyboardShortcutIndicator\n} from './KeyboardShortcut'\n\nexport const KeyboardShortcut = Object.assign(KeyboardShortcutComponent, {\n Indicator: KeyboardShortcutIndicator\n})\n\nKeyboardShortcut.displayName = 'KeyboardShortcut'\n"],"names":["KeyboardShortcut","KeyboardShortcutComponent","KeyboardShortcutIndicator"],"mappings":"8FAKaA,EAAmB,OAAO,OAAOC,EAA2B,CACvE,UAAWC,CACb,CAAC,EAEDF,EAAiB,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const o={background:"none",color:"$text",opacity:"30%",cursor:"default"},e={all:"unset",position:"relative",color:"$text",outline:"none",cursor:"pointer",fontFamily:"$body",userSelect:"none",padding:"$3",borderRadius:"$1",background:"$background","&:hover":{background:"$backgroundHover",color:"$textHover"},"&:active":{background:"$backgroundActive",color:"$textActive"},"&:focus-visible":{boxShadow:"inset 0 0 0 2px $colors$primary800"},"&:disabled":{...o}},t={fontWeight:
|
|
1
|
+
const o={background:"none",color:"$text",opacity:"30%",cursor:"default"},e={all:"unset",position:"relative",color:"$text",outline:"none",cursor:"pointer",fontFamily:"$body",userSelect:"none",padding:"$3",borderRadius:"$1",background:"$background","&:hover":{background:"$backgroundHover",color:"$textHover"},"&:active":{background:"$backgroundActive",color:"$textActive"},"&:focus-visible":{boxShadow:"inset 0 0 0 2px $colors$primary800"},"&:disabled":{...o}},t={fontWeight:600,color:"$itemTextSelected","&::after":{backgroundColor:"$itemBackgroundSelected",borderRadius:"$1",bottom:0,content:"",display:"block",height:"2px",left:"50%",position:"absolute",transform:"translate(-50%,0)",width:"$2"}};export{t as navigationMenuActiveItemStyles,e as navigationMenuBaseItemStyles,o as navigationMenuDisabledItemStyles};
|
|
2
2
|
//# sourceMappingURL=NavigationMenu.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenu.styles.js","sources":["../../../src/components/navigation/NavigationMenu.styles.ts"],"sourcesContent":["export const navigationMenuDisabledItemStyles = {\n background: 'none',\n color: '$text',\n opacity: '30%',\n cursor: 'default'\n}\n\nexport const navigationMenuBaseItemStyles = {\n all: 'unset',\n position: 'relative',\n color: '$text',\n outline: 'none',\n cursor: 'pointer',\n fontFamily: '$body',\n userSelect: 'none',\n padding: '$3',\n borderRadius: '$1',\n background: '$background',\n '&:hover': { background: '$backgroundHover', color: '$textHover' },\n '&:active': {\n background: '$backgroundActive',\n color: '$textActive'\n },\n '&:focus-visible': {\n boxShadow: 'inset 0 0 0 2px $colors$primary800'\n },\n '&:disabled': {\n ...navigationMenuDisabledItemStyles\n }\n}\n\nexport const navigationMenuActiveItemStyles = {\n fontWeight:
|
|
1
|
+
{"version":3,"file":"NavigationMenu.styles.js","sources":["../../../src/components/navigation/NavigationMenu.styles.ts"],"sourcesContent":["export const navigationMenuDisabledItemStyles = {\n background: 'none',\n color: '$text',\n opacity: '30%',\n cursor: 'default'\n}\n\nexport const navigationMenuBaseItemStyles = {\n all: 'unset',\n position: 'relative',\n color: '$text',\n outline: 'none',\n cursor: 'pointer',\n fontFamily: '$body',\n userSelect: 'none',\n padding: '$3',\n borderRadius: '$1',\n background: '$background',\n '&:hover': { background: '$backgroundHover', color: '$textHover' },\n '&:active': {\n background: '$backgroundActive',\n color: '$textActive'\n },\n '&:focus-visible': {\n boxShadow: 'inset 0 0 0 2px $colors$primary800'\n },\n '&:disabled': {\n ...navigationMenuDisabledItemStyles\n }\n}\n\nexport const navigationMenuActiveItemStyles = {\n fontWeight: 600,\n color: '$itemTextSelected',\n '&::after': {\n backgroundColor: '$itemBackgroundSelected',\n borderRadius: '$1',\n bottom: 0,\n content: '',\n display: 'block',\n height: '2px',\n left: '50%',\n position: 'absolute',\n transform: 'translate(-50%,0)',\n width: '$2'\n }\n}\n"],"names":["navigationMenuDisabledItemStyles","navigationMenuBaseItemStyles","navigationMenuActiveItemStyles"],"mappings":"AAAO,MAAMA,EAAmC,CAC9C,WAAY,OACZ,MAAO,QACP,QAAS,MACT,OAAQ,SACV,EAEaC,EAA+B,CAC1C,IAAK,QACL,SAAU,WACV,MAAO,QACP,QAAS,OACT,OAAQ,UACR,WAAY,QACZ,WAAY,OACZ,QAAS,KACT,aAAc,KACd,WAAY,cACZ,UAAW,CAAE,WAAY,mBAAoB,MAAO,YAAa,EACjE,WAAY,CACV,WAAY,oBACZ,MAAO,aACT,EACA,kBAAmB,CACjB,UAAW,oCACb,EACA,aAAc,CACZ,GAAGD,CACL,CACF,EAEaE,EAAiC,CAC5C,WAAY,IACZ,MAAO,oBACP,WAAY,CACV,gBAAiB,0BACjB,aAAc,KACd,OAAQ,EACR,QAAS,GACT,QAAS,QACT,OAAQ,MACR,KAAM,MACN,SAAU,WACV,UAAW,oBACX,MAAO,IACT,CACF"}
|
|
@@ -17,11 +17,11 @@ export declare const navigationMenuVerticalItemStyles: {
|
|
|
17
17
|
'&[data-state=open]': {
|
|
18
18
|
'--navigation-menu-vertical-item-font-weight': number;
|
|
19
19
|
};
|
|
20
|
-
'&[
|
|
20
|
+
'&[disabled]': {
|
|
21
21
|
opacity: number;
|
|
22
22
|
cursor: string;
|
|
23
23
|
};
|
|
24
|
-
'&:not([
|
|
24
|
+
'&:not([disabled])': {
|
|
25
25
|
'&:hover': {
|
|
26
26
|
bg: string;
|
|
27
27
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import{focusVisibleStyleBlock as t}from"../../utilities/style/focus-visible-style-block.js";import"../../utilities/style/keyframe-animations.js";import{resetButtonStyles as e,resetLinkStyles as i}from"../../utilities/style/reset.js";const o={...e,...i,cursor:"pointer",borderRadius:"$2",display:"flex",alignItems:"center",p:"$2",pl:"var(--navigation-menu-vertical-item-pl)",width:"100%",color:"$text",bg:"$background","--navigation-menu-vertical-item-font-weight":400,"&[data-active]":{bg:"$backgroundSelected",color:"$textSelected","--navigation-menu-vertical-item-font-weight":600},"&[data-state=open]":{"--navigation-menu-vertical-item-font-weight":600},"&[
|
|
1
|
+
import"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import{focusVisibleStyleBlock as t}from"../../utilities/style/focus-visible-style-block.js";import"../../utilities/style/keyframe-animations.js";import{resetButtonStyles as e,resetLinkStyles as i}from"../../utilities/style/reset.js";const o={...e,...i,cursor:"pointer",borderRadius:"$2",display:"flex",alignItems:"center",p:"$2",pl:"var(--navigation-menu-vertical-item-pl)",width:"100%",color:"$text",bg:"$background","--navigation-menu-vertical-item-font-weight":400,"&[data-active]":{bg:"$backgroundSelected",color:"$textSelected","--navigation-menu-vertical-item-font-weight":600},"&[data-state=open]":{"--navigation-menu-vertical-item-font-weight":600},"&[disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([disabled])":{"&:hover":{bg:"$backgroundHover"},"&:active":{bg:"$backgroundActive"},"&:focus-visible":t()},variants:{size:{md:{minHeight:"$4"},lg:{minHeight:"$5"}}}};export{o as navigationMenuVerticalItemStyles};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuVertical.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["import { focusVisibleStyleBlock } from '~/utilities'\nimport { resetButtonStyles, resetLinkStyles } from '~/utilities/style/reset'\n\nexport const navigationMenuVerticalItemStyles = {\n ...resetButtonStyles,\n ...resetLinkStyles,\n cursor: 'pointer',\n borderRadius: '$2',\n display: 'flex',\n alignItems: 'center',\n p: '$2',\n pl: `var(--navigation-menu-vertical-item-pl)`,\n width: '100%',\n color: '$text',\n bg: '$background',\n '--navigation-menu-vertical-item-font-weight': 400,\n '&[data-active]': {\n bg: '$backgroundSelected',\n color: '$textSelected',\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[data-state=open]': {\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[
|
|
1
|
+
{"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["import { focusVisibleStyleBlock } from '~/utilities'\nimport { resetButtonStyles, resetLinkStyles } from '~/utilities/style/reset'\n\nexport const navigationMenuVerticalItemStyles = {\n ...resetButtonStyles,\n ...resetLinkStyles,\n cursor: 'pointer',\n borderRadius: '$2',\n display: 'flex',\n alignItems: 'center',\n p: '$2',\n pl: `var(--navigation-menu-vertical-item-pl)`,\n width: '100%',\n color: '$text',\n bg: '$background',\n '--navigation-menu-vertical-item-font-weight': 400,\n '&[data-active]': {\n bg: '$backgroundSelected',\n color: '$textSelected',\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[data-state=open]': {\n '--navigation-menu-vertical-item-font-weight': 600\n },\n '&[disabled]': {\n opacity: 0.3,\n cursor: 'not-allowed'\n },\n '&:not([disabled])': {\n '&:hover': {\n bg: '$backgroundHover'\n },\n '&:active': {\n bg: '$backgroundActive'\n },\n '&:focus-visible': focusVisibleStyleBlock()\n },\n variants: {\n size: {\n md: {\n minHeight: '$4'\n },\n lg: {\n minHeight: '$5'\n }\n }\n }\n}\n"],"names":["navigationMenuVerticalItemStyles","resetButtonStyles","resetLinkStyles","focusVisibleStyleBlock"],"mappings":"4YAGaA,EAAmC,CAC9C,GAAGC,EACH,GAAGC,EACH,OAAQ,UACR,aAAc,KACd,QAAS,OACT,WAAY,SACZ,EAAG,KACH,GAAI,0CACJ,MAAO,OACP,MAAO,QACP,GAAI,cACJ,8CAA+C,IAC/C,iBAAkB,CAChB,GAAI,sBACJ,MAAO,gBACP,8CAA+C,GACjD,EACA,qBAAsB,CACpB,8CAA+C,GACjD,EACA,cAAe,CACb,QAAS,GACT,OAAQ,aACV,EACA,oBAAqB,CACnB,UAAW,CACT,GAAI,kBACN,EACA,WAAY,CACV,GAAI,mBACN,EACA,kBAAmBC,EAAuB,CAC5C,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,UAAW,IACb,EACA,GAAI,CACF,UAAW,IACb,CACF,CACF,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from"react";import{Text as o}from"../text/Text.js";import{styled as i}from"../../stitches.js";import"../side-bar/SideBar.js";import{useSidebarState as r}from"../side-bar/SideBarContext.js";const s="10rem",n=i.withConfig({shouldForwardStitchesProp:t=>["as"].includes(t)})(o,{fontWeight:"var(--navigation-menu-vertical-item-font-weight)",lineHeight:1.2,width:"max-content",maxWidth:s,variants:{isExpanded:{true:{opacity:1,"@allowMotion":{transform:"translate(0)",transition:"opacity 125ms ease-out, transform 125ms ease-out"}},false:{opacity:0,"@allowMotion":{transform:"translate(8px)",transition:"opacity 125ms ease-out, transform 0ms ease-out 125ms"}}}}}),m=t=>{const{isExpanded:e}=r();return a.createElement(n,{size:"md",as:"span",...t,isExpanded:e})};export{m as NavigationMenuVerticalText};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuVerticalText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVerticalText.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalText.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '~/components/text'\nimport { styled } from '~/stitches'\n\nimport { useSidebarState } from '../side-bar'\n\nconst SIZE_EXPANDED_MAX = '10rem'\n\nconst StyledNavigationMenuVerticalText = styled.withConfig({\n shouldForwardStitchesProp: (propName) => ['as'].includes(propName)\n})(Text, {\n fontWeight: 'var(--navigation-menu-vertical-item-font-weight)',\n lineHeight: 1.2,\n variants: {\n isExpanded: {\n true: {\n
|
|
1
|
+
{"version":3,"file":"NavigationMenuVerticalText.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalText.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '~/components/text'\nimport { styled } from '~/stitches'\n\nimport { useSidebarState } from '../side-bar'\n\nconst SIZE_EXPANDED_MAX = '10rem'\n\nconst StyledNavigationMenuVerticalText = styled.withConfig({\n shouldForwardStitchesProp: (propName) => ['as'].includes(propName)\n})(Text, {\n fontWeight: 'var(--navigation-menu-vertical-item-font-weight)',\n lineHeight: 1.2,\n width: 'max-content',\n maxWidth: SIZE_EXPANDED_MAX,\n variants: {\n isExpanded: {\n true: {\n opacity: 1,\n '@allowMotion': {\n transform: 'translate(0)',\n transition: 'opacity 125ms ease-out, transform 125ms ease-out'\n }\n },\n false: {\n opacity: 0,\n '@allowMotion': {\n transform: 'translate(8px)',\n transition: 'opacity 125ms ease-out, transform 0ms ease-out 125ms'\n }\n }\n }\n }\n})\n\ntype TStyledNavigationMenuVerticalTextProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalText\n>\n\nexport const NavigationMenuVerticalText = (\n props: TStyledNavigationMenuVerticalTextProps\n): JSX.Element => {\n const { isExpanded } = useSidebarState()\n return (\n <StyledNavigationMenuVerticalText\n size=\"md\"\n as=\"span\"\n {...props}\n isExpanded={isExpanded}\n />\n )\n}\n"],"names":["SIZE_EXPANDED_MAX","StyledNavigationMenuVerticalText","styled","propName","Text","NavigationMenuVerticalText","props","isExpanded","useSidebarState","React"],"mappings":"sMAOA,MAAMA,EAAoB,QAEpBC,EAAmCC,EAAO,WAAW,CACzD,0BAA4BC,GAAa,CAAC,IAAI,EAAE,SAASA,CAAQ,CACnE,CAAC,EAAEC,EAAM,CACP,WAAY,mDACZ,WAAY,IACZ,MAAO,cACP,SAAUJ,EACV,SAAU,CACR,WAAY,CACV,KAAM,CACJ,QAAS,EACT,eAAgB,CACd,UAAW,eACX,WAAY,kDACd,CACF,EACA,MAAO,CACL,QAAS,EACT,eAAgB,CACd,UAAW,iBACX,WAAY,sDACd,CACF,CACF,CACF,CACF,CAAC,EAMYK,EACXC,GACgB,CAChB,KAAM,CAAE,WAAAC,CAAW,EAAIC,EAAgB,EACvC,OACEC,EAAA,cAACR,EAAA,CACC,KAAK,KACL,GAAG,OACF,GAAGK,EACJ,WAAYC,CAAAA,CACd,CAEJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ellypsis as s}from"@atom-learning/icons";import t from"react";import"../accordion/Accordion.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import"../alert-dialog/AlertDialog.js";import"../alert-dialog/alert-context/AlertContext.js";import"../avatar/Avatar.js";import"../badge/Badge.js";import"../banner/banner-regular/BannerRegular.js";import"../banner/banner-slim/BannerSlim.js";import"../box/Box.js";import"../button/Button.js";import"../carousel/Carousel.js";import"../checkbox/Checkbox.js";import"../checkbox-group/CheckboxGroup.js";import"../checkbox-tree/CheckboxTree.js";import"../checkbox-field/CheckboxField.js";import"../chip/Chip.js";import"../chip/ChipGroup.js";import"../chip-dismissible-group/index.js";import"../chip-toggle-group/index.js";import"../combobox/Combobox.js";import"../create-password-field/CreatePasswordField.js";import"../data-table/DataTableContext.js";import"../data-table/DataTable.js";import"../date-field/DateField.js";import"../date-input/DateInput.js";import"../dialog/Dialog.js";import"../dismissible/index.js";import"../dismissible-group/index.js";import"../divider/Divider.js";import"../drawer/Drawer.js";import"../dropdown-menu/DropdownMenu.js";import"../empty-state/EmptyState.js";import"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../file-input/FileInput.js";import{Flex as g}from"../flex/Flex.js";import"../form/Form.js";import"dlv";import"react-hook-form";import"../grid/Grid.js";import"../heading/Heading.js";import{Icon as f}from"../icon/Icon.js";import"../image/Image.js";import"../inline-message/InlineMessage.js";import"../input/Input.js";import"../input-field/InputField.js";import"../label/Label.js";import"../link/Link.js";import"../list/List.js";import"../loader/Loader.js";import"../markdown-content/MarkdownContent.js";import"../navigation/NavigationMenu.js";import"../navigation-menu-vertical/NavigationMenuVertical.js";import"../notification-badge/NotificationBadge.js";import"../number-input/NumberInput.js";import"../number-input-field/NumberInputField.js";import"./Pagination.js";import"../password-field/PasswordField.js";import"../password-input/PasswordInput.js";import{Popover as r}from"../popover/Popover.js";import"../progress-bar/ProgressBar.js";import"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import"../radio-button-field/RadioButtonField.js";import"../radio-card/RadioCard.js";import"@radix-ui/react-radio-group";import"../search-field/SearchField.js";import"../search-input/SearchInput.js";import"../section-message/SectionMessage.js";import"../select/Select.js";import"../select-field/SelectField.js";import"../side-bar/SideBar.js";import"../side-bar/SideBarContext.js";import"../slider/Slider.js";import"../slider-field/SliderField.js";import"../sortable/SortableHandle.js";import"../sortable/SortableItem.js";import"../sortable/SortableRoot.js";import"../spacer/Spacer.js";import"../stack-content/StackContent.js";import"../stepper/Stepper.js";import"../switch/Switch.js";import"../table/Table.js";import"../tabs/Tabs.js";import"../text/Text.js";import"../textarea/Textarea.js";import"../textarea-field/TextareaField.js";import"../tile/Tile.js";import"../tile-interactive/TileInteractive.js";import"../tile-toggle-group/index.js";import"../toast/Toast.js";import"../toast/ToastProvider.js";import"../toggle-group/ToggleGroupButton.js";import"../toggle-group/ToggleGroupItem.js";import"../toggle-group/ToggleGroupRoot.js";import"../tooltip/Tooltip.js";import"../top-bar/TopBar.js";import"../tree/Tree.js";import"../video/Video.js";import{PaginationPage as u}from"./PaginationPage.js";import{usePagination as d}from"./usePagination.js";const E=({children:e})=>{const{pagesCount:n,labels:i}=d(),p=Array.from({length:n},(o,l)=>l+1),[a,m]=t.useState(!1);return t.createElement(r,{open:a,onOpenChange:m,defaultOpen:!1},t.createElement(r.Trigger,{asChild:!0},e||t.createElement(c,{hasTooltip:!1,size:"md",theme:"neutral",label:(i==null?void 0:i.popoverTriggerLabel)||"Open pagination popover","data-testid":"pagination_popover_trigger"},t.createElement(f,{is:s}))),t.createElement(r.Content,{size:"md",showCloseButton:!1,css:{p:0}},t.createElement(g,{css:{p:"$4",display:"flex",flexWrap:"wrap",gap:"$1",justifyContent:"center"}},p==null?void 0:p.map(o=>t.createElement(u,{key:o,pageNumber:o,onClick:()=>m(!1)})))))};export{E as PaginationPopover};
|
|
1
|
+
import{Ellypsis as s}from"@atom-learning/icons";import t from"react";import"../accordion/Accordion.js";import{ActionIcon as c}from"../action-icon/ActionIcon.js";import"../alert-dialog/AlertDialog.js";import"../alert-dialog/alert-context/AlertContext.js";import"../avatar/Avatar.js";import"../badge/Badge.js";import"../banner/banner-regular/BannerRegular.js";import"../banner/banner-slim/BannerSlim.js";import"../box/Box.js";import"../button/Button.js";import"../carousel/Carousel.js";import"../checkbox/Checkbox.js";import"../checkbox-group/CheckboxGroup.js";import"../checkbox-tree/CheckboxTree.js";import"../checkbox-field/CheckboxField.js";import"../chip/Chip.js";import"../chip/ChipGroup.js";import"../chip-dismissible-group/index.js";import"../chip-toggle-group/index.js";import"../combobox/Combobox.js";import"../create-password-field/CreatePasswordField.js";import"../data-table/DataTableContext.js";import"../data-table/DataTable.js";import"../date-field/DateField.js";import"../date-input/DateInput.js";import"../dialog/Dialog.js";import"../dismissible/index.js";import"../dismissible-group/index.js";import"../divider/Divider.js";import"../drawer/Drawer.js";import"../dropdown-menu/DropdownMenu.js";import"../empty-state/EmptyState.js";import"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../file-input/FileInput.js";import{Flex as g}from"../flex/Flex.js";import"../form/Form.js";import"dlv";import"react-hook-form";import"../grid/Grid.js";import"../heading/Heading.js";import{Icon as f}from"../icon/Icon.js";import"../image/Image.js";import"../inline-message/InlineMessage.js";import"../input/Input.js";import"../input-field/InputField.js";import"../label/Label.js";import"../link/Link.js";import"../list/List.js";import"../loader/Loader.js";import"../markdown-content/MarkdownContent.js";import"../navigation/NavigationMenu.js";import"../navigation-menu-vertical/NavigationMenuVertical.js";import"../notification-badge/NotificationBadge.js";import"../number-input/NumberInput.js";import"../number-input-field/NumberInputField.js";import"./Pagination.js";import"../password-field/PasswordField.js";import"../password-input/PasswordInput.js";import{Popover as r}from"../popover/Popover.js";import"../progress-bar/ProgressBar.js";import"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import"../radio-button-field/RadioButtonField.js";import"../radio-card/RadioCard.js";import"@radix-ui/react-radio-group";import"../search-field/SearchField.js";import"../search-input/SearchInput.js";import"../section-message/SectionMessage.js";import"../select/Select.js";import"../select-field/SelectField.js";import"../side-bar/SideBar.js";import"../side-bar/SideBarContext.js";import"../slider/Slider.js";import"../slider-field/SliderField.js";import"../sortable/SortableHandle.js";import"../sortable/SortableItem.js";import"../sortable/SortableRoot.js";import"../spacer/Spacer.js";import"../stack-content/StackContent.js";import"../stepper/Stepper.js";import"../switch/Switch.js";import"../table/Table.js";import"../tabs/Tabs.js";import"../text/Text.js";import"../textarea/Textarea.js";import"../textarea-field/TextareaField.js";import"../tile/Tile.js";import"../tile-interactive/TileInteractive.js";import"../tile-toggle-group/index.js";import"../toast/Toast.js";import"../toast/ToastProvider.js";import"../toggle-group/ToggleGroupButton.js";import"../toggle-group/ToggleGroupItem.js";import"../toggle-group/ToggleGroupRoot.js";import"../tooltip/Tooltip.js";import"../top-bar/TopBar.js";import"../tree/Tree.js";import"../video/Video.js";import"../keyboard-shortcut/index.js";import{PaginationPage as u}from"./PaginationPage.js";import{usePagination as d}from"./usePagination.js";const E=({children:e})=>{const{pagesCount:n,labels:i}=d(),p=Array.from({length:n},(o,l)=>l+1),[a,m]=t.useState(!1);return t.createElement(r,{open:a,onOpenChange:m,defaultOpen:!1},t.createElement(r.Trigger,{asChild:!0},e||t.createElement(c,{hasTooltip:!1,size:"md",theme:"neutral",label:(i==null?void 0:i.popoverTriggerLabel)||"Open pagination popover","data-testid":"pagination_popover_trigger"},t.createElement(f,{is:s}))),t.createElement(r.Content,{size:"md",showCloseButton:!1,css:{p:0}},t.createElement(g,{css:{p:"$4",display:"flex",flexWrap:"wrap",gap:"$1",justifyContent:"center"}},p==null?void 0:p.map(o=>t.createElement(u,{key:o,pageNumber:o,onClick:()=>m(!1)})))))};export{E as PaginationPopover};
|
|
2
2
|
//# sourceMappingURL=PaginationPopover.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationPopover.js","sources":["../../../src/components/pagination/PaginationPopover.tsx"],"sourcesContent":["import { Ellypsis } from '@atom-learning/icons'\nimport React from 'react'\n\nimport { ActionIcon, Flex, Icon, Popover } from '..'\nimport { PaginationPage } from './PaginationPage'\nimport { usePagination } from './usePagination'\n\nexport const PaginationPopover = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const { pagesCount, labels } = usePagination()\n const paginationItems = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n const [isOpen, setIsOpen] = React.useState<boolean>(false)\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen} defaultOpen={false}>\n <Popover.Trigger asChild>\n {children || (\n <ActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n label={labels?.popoverTriggerLabel || 'Open pagination popover'}\n data-testid=\"pagination_popover_trigger\"\n >\n <Icon is={Ellypsis} />\n </ActionIcon>\n )}\n </Popover.Trigger>\n <Popover.Content size=\"md\" showCloseButton={false} css={{ p: 0 }}>\n <Flex\n css={{\n p: '$4',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '$1',\n justifyContent: 'center'\n }}\n >\n {paginationItems?.map((pageNumber) => {\n return (\n <PaginationPage\n key={pageNumber}\n pageNumber={pageNumber}\n onClick={() => setIsOpen(false)}\n />\n )\n })}\n </Flex>\n </Popover.Content>\n </Popover>\n )\n}\n"],"names":["PaginationPopover","children","pagesCount","labels","usePagination","paginationItems","_","index","isOpen","setIsOpen","React","Popover","ActionIcon","Icon","Ellypsis","Flex","pageNumber","PaginationPage"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaginationPopover.js","sources":["../../../src/components/pagination/PaginationPopover.tsx"],"sourcesContent":["import { Ellypsis } from '@atom-learning/icons'\nimport React from 'react'\n\nimport { ActionIcon, Flex, Icon, Popover } from '..'\nimport { PaginationPage } from './PaginationPage'\nimport { usePagination } from './usePagination'\n\nexport const PaginationPopover = ({\n children\n}: React.PropsWithChildren<unknown>) => {\n const { pagesCount, labels } = usePagination()\n const paginationItems = Array.from(\n { length: pagesCount },\n (_, index) => index + 1\n )\n\n const [isOpen, setIsOpen] = React.useState<boolean>(false)\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen} defaultOpen={false}>\n <Popover.Trigger asChild>\n {children || (\n <ActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n label={labels?.popoverTriggerLabel || 'Open pagination popover'}\n data-testid=\"pagination_popover_trigger\"\n >\n <Icon is={Ellypsis} />\n </ActionIcon>\n )}\n </Popover.Trigger>\n <Popover.Content size=\"md\" showCloseButton={false} css={{ p: 0 }}>\n <Flex\n css={{\n p: '$4',\n display: 'flex',\n flexWrap: 'wrap',\n gap: '$1',\n justifyContent: 'center'\n }}\n >\n {paginationItems?.map((pageNumber) => {\n return (\n <PaginationPage\n key={pageNumber}\n pageNumber={pageNumber}\n onClick={() => setIsOpen(false)}\n />\n )\n })}\n </Flex>\n </Popover.Content>\n </Popover>\n )\n}\n"],"names":["PaginationPopover","children","pagesCount","labels","usePagination","paginationItems","_","index","isOpen","setIsOpen","React","Popover","ActionIcon","Icon","Ellypsis","Flex","pageNumber","PaginationPage"],"mappings":"oqHAOO,MAAMA,EAAoB,CAAC,CAChC,SAAAC,CACF,IAAwC,CACtC,KAAM,CAAE,WAAAC,EAAY,OAAAC,CAAO,EAAIC,EAAc,EACvCC,EAAkB,MAAM,KAC5B,CAAE,OAAQH,CAAW,EACrB,CAACI,EAAGC,IAAUA,EAAQ,CACxB,EAEM,CAACC,EAAQC,CAAS,EAAIC,EAAM,SAAkB,EAAK,EAEzD,OACEA,EAAA,cAACC,EAAA,CAAQ,KAAMH,EAAQ,aAAcC,EAAW,YAAa,EAC3DC,EAAAA,EAAA,cAACC,EAAQ,QAAR,CAAgB,QAAO,EAAA,EACrBV,GACCS,EAAA,cAACE,EAAA,CACC,WAAY,GACZ,KAAK,KACL,MAAM,UACN,OAAOT,GAAA,KAAAA,OAAAA,EAAQ,sBAAuB,0BACtC,cAAY,4BAEZO,EAAAA,EAAA,cAACG,EAAA,CAAK,GAAIC,CAAAA,CAAU,CACtB,CAEJ,EACAJ,EAAA,cAACC,EAAQ,QAAR,CAAgB,KAAK,KAAK,gBAAiB,GAAO,IAAK,CAAE,EAAG,CAAE,CAC7DD,EAAAA,EAAA,cAACK,EAAA,CACC,IAAK,CACH,EAAG,KACH,QAAS,OACT,SAAU,OACV,IAAK,KACL,eAAgB,QAClB,GAECV,GAAA,KAAA,OAAAA,EAAiB,IAAKW,GAEnBN,EAAA,cAACO,EAAA,CACC,IAAKD,EACL,WAAYA,EACZ,QAAS,IAAMP,EAAU,EAAK,EAChC,CAGN,CAAA,CACF,CACF,CAEJ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioCardGroup.js","sources":["../../../src/components/radio-card/RadioCardGroup.tsx"],"sourcesContent":["import type { VariantProps } from '@atom-learning/stitches-react'\nimport * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport type { Override } from '~/utilities'\n\nimport { Flex } from '../flex'\nimport { RadioCard, StyledRadioCard } from './RadioCard'\n\ntype RadioCardGroupProps = Override<\n Pick<React.ComponentProps<typeof Flex>, 'justify' | 'gap' | 'css'> &\n VariantProps<typeof StyledRadioCard>,\n React.ComponentProps<typeof RadioGroup.Root>\n>\n\nexport const RadioCardGroup = ({\n css,\n children,\n size,\n isFullWidth,\n align,\n gap = '3',\n justify,\n ...rest\n}: RadioCardGroupProps) => (\n <RadioGroup.Root {...rest}>\n <Flex direction=\"row\" justify={justify} gap={gap} wrap=\"wrap\" css={css}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child?.type === RadioCard) {\n return React.cloneElement(child
|
|
1
|
+
{"version":3,"file":"RadioCardGroup.js","sources":["../../../src/components/radio-card/RadioCardGroup.tsx"],"sourcesContent":["import type { VariantProps } from '@atom-learning/stitches-react'\nimport * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport type { Override } from '~/utilities'\n\nimport { Flex } from '../flex'\nimport { RadioCard, StyledRadioCard } from './RadioCard'\n\ntype RadioCardGroupProps = Override<\n Pick<React.ComponentProps<typeof Flex>, 'justify' | 'gap' | 'css'> &\n VariantProps<typeof StyledRadioCard>,\n React.ComponentProps<typeof RadioGroup.Root>\n>\n\nexport const RadioCardGroup = ({\n css,\n children,\n size,\n isFullWidth,\n align,\n gap = '3',\n justify,\n ...rest\n}: RadioCardGroupProps) => (\n <RadioGroup.Root {...rest}>\n <Flex direction=\"row\" justify={justify} gap={gap} wrap=\"wrap\" css={css}>\n {React.Children.map(children, (child) => {\n if (React.isValidElement(child) && child?.type === RadioCard) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof RadioCard>>,\n { size, isFullWidth, align }\n )\n }\n return child\n })}\n </Flex>\n </RadioGroup.Root>\n)\n"],"names":["RadioCardGroup","css","children","size","isFullWidth","align","gap","justify","rest","React","RadioGroup","Flex","child","RadioCard"],"mappings":"8JAeaA,EAAiB,CAAC,CAC7B,IAAAC,EACA,SAAAC,EACA,KAAAC,EACA,YAAAC,EACA,MAAAC,EACA,IAAAC,EAAM,IACN,QAAAC,KACGC,CACL,IACEC,EAAA,cAACC,EAAW,KAAX,CAAiB,GAAGF,CAAAA,EACnBC,EAAA,cAACE,EAAA,CAAK,UAAU,MAAM,QAASJ,EAAS,IAAKD,EAAK,KAAK,OAAO,IAAKL,GAChEQ,EAAM,SAAS,IAAIP,EAAWU,GACzBH,EAAM,eAAeG,CAAK,IAAKA,GAAA,YAAAA,EAAO,QAASC,EAC1CJ,EAAM,aACXG,EACA,CAAE,KAAAT,EAAM,YAAAC,EAAa,MAAAC,CAAM,CAC7B,EAEKO,CACR,CACH,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Search as
|
|
1
|
+
import{Search as H,Close as $}from"@atom-learning/icons";import*as t from"react";import{ActionIcon as k}from"../action-icon/ActionIcon.js";import{Icon as E}from"../icon/Icon.js";import{InputText as L,InputBackground as x}from"../input/Input.js";import{styled as f}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{getFieldIconSize as T}from"../../utilities/style/get-icon-size.js";import{useCallbackRef as M}from"../../utilities/hooks/useCallbackRef.js";var N=(e=>(e.SEARCH="SEARCH",e.CLEAR="CLEAR",e))(N||{});const O=f(E,{color:"$grey700",position:"absolute",pointerEvents:"none",variants:{size:{sm:{right:"$2",size:"$1"},md:{right:10,size:20},lg:{right:10,size:20}}}}),V=f(L,{"&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button":{display:"none"}}),h=t.forwardRef(({size:e="md",css:C,value:s,defaultValue:l="",onValueChange:n,clearText:d="Clear",onChange:c,...b},v)=>{const[u,R]=M(),[g,m]=t.useState(l),[A,p]=t.useState(l?"CLEAR":"SEARCH");t.useEffect(()=>{typeof s>"u"||(m(s),p(s?"CLEAR":"SEARCH"))},[s]);const z=t.useMemo(()=>T(e),[e]);t.useImperativeHandle(v,()=>u.current);const S=()=>{var r,o;const a=u.current;if(!a)return;const i=(r=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:r.set;(o=i==null?void 0:i.call)==null||o.call(i,a,"");const y=new Event("input",{bubbles:!0});a.dispatchEvent(y),a.focus(),n==null||n("")},w=r=>{c==null||c(r);const o=r.target.value;m(o),n==null||n(o),p(o?"CLEAR":"SEARCH")},I=()=>A==="SEARCH"?t.createElement(O,{is:H,size:e,css:{size:e=="sm"?"$1":20,top:"50%",transform:"translateY(-50%)"}}):t.createElement(k,{label:d,theme:"neutral",size:z,css:{position:"absolute",top:"50%",transform:"translateY(-50%)",right:"$1"},onClick:S},t.createElement(E,{is:$}));return t.createElement(x,{css:{position:"relative",width:"auto",...C},size:e},t.createElement(V,{ref:R,size:e,type:"search",...b,value:g,onChange:w,css:{pr:e==="sm"?"$5":"$6"}}),I())});h.displayName="SearchInput";export{h as SearchInput};
|
|
2
2
|
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import { Close, Search } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon'\nimport {
|
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import { Close, Search } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { ActionIcon } from '~/components/action-icon'\nimport { Icon } from '~/components/icon/'\nimport { Input, InputBackground, InputText } from '~/components/input/'\nimport { CSS, styled } from '~/stitches'\nimport { getFieldIconSize } from '~/utilities'\nimport { useCallbackRef } from '~/utilities/hooks/useCallbackRef'\n\nexport type SearchInputProps = React.ComponentProps<typeof Input> & {\n size?: 'sm' | 'md' | 'lg'\n css?: CSS\n value?: string\n defaultValue?: string\n onValueChange?: (newValue: string) => void\n clearText?: string\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void\n}\n\nenum INPUT_ICON {\n SEARCH = 'SEARCH',\n CLEAR = 'CLEAR'\n}\n\nconst StyledIcon = styled(Icon, {\n color: '$grey700',\n position: 'absolute',\n pointerEvents: 'none',\n variants: {\n size: {\n sm: {\n right: '$2',\n size: '$1'\n },\n md: {\n right: 10,\n size: 20\n },\n lg: {\n right: 10,\n size: 20\n }\n }\n }\n})\n\nconst StyledSearchInputText = styled(InputText, {\n '&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button':\n {\n display: 'none'\n }\n})\n\nexport const SearchInput: React.ForwardRefExoticComponent<SearchInputProps> =\n React.forwardRef(\n (\n {\n size = 'md',\n css,\n value,\n defaultValue = '',\n onValueChange,\n clearText = 'Clear',\n onChange,\n ...remainingProps\n },\n ref\n ) => {\n const [inputElRef, setInputElRef] = useCallbackRef()\n const [innerValue, setInnerValue] = React.useState(defaultValue)\n const [activeIcon, setActiveIcon] = React.useState<INPUT_ICON>(\n defaultValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH\n )\n React.useEffect(() => {\n if (typeof value === 'undefined') return\n setInnerValue(value)\n setActiveIcon(value ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH)\n }, [value])\n\n const iconSize = React.useMemo(() => getFieldIconSize(size), [size])\n\n React.useImperativeHandle(\n ref,\n () => inputElRef.current as HTMLInputElement\n )\n\n const handleClear = () => {\n const inputEl = inputElRef.current\n if (!inputEl) return\n\n // https://stackoverflow.com/a/46012210\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n 'value'\n )?.set\n nativeInputValueSetter?.call?.(inputEl, '')\n const ev2 = new Event('input', {\n bubbles: true\n })\n inputEl.dispatchEvent(ev2)\n inputEl.focus()\n onValueChange?.('')\n }\n\n const handleOnChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n onChange?.(event)\n\n const newValue = event.target.value\n setInnerValue(newValue)\n onValueChange?.(newValue)\n setActiveIcon(newValue ? INPUT_ICON.CLEAR : INPUT_ICON.SEARCH)\n }\n\n const getIcon = () => {\n if (activeIcon === INPUT_ICON.SEARCH)\n return (\n <StyledIcon\n is={Search}\n size={size}\n css={{\n size: size == 'sm' ? '$1' : 20,\n top: '50%',\n transform: 'translateY(-50%)'\n }}\n />\n )\n\n return (\n <ActionIcon\n label={clearText}\n theme=\"neutral\"\n size={iconSize}\n css={{\n position: 'absolute',\n top: '50%',\n transform: 'translateY(-50%)',\n right: '$1'\n }}\n onClick={handleClear}\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n }\n\n return (\n <InputBackground\n css={{ position: 'relative', width: 'auto', ...css }}\n size={size}\n >\n <StyledSearchInputText\n ref={setInputElRef}\n size={size}\n type=\"search\"\n {...remainingProps}\n value={innerValue}\n onChange={handleOnChange}\n css={{ pr: size === 'sm' ? '$5' : '$6' }}\n />\n {getIcon()}\n </InputBackground>\n )\n }\n )\n\nSearchInput.displayName = 'SearchInput'\n"],"names":["INPUT_ICON","StyledIcon","styled","Icon","StyledSearchInputText","InputText","SearchInput","React","size","css","value","defaultValue","onValueChange","clearText","onChange","remainingProps","ref","inputElRef","setInputElRef","useCallbackRef","innerValue","setInnerValue","activeIcon","setActiveIcon","iconSize","getFieldIconSize","handleClear","_a","_b","inputEl","nativeInputValueSetter","ev2","handleOnChange","event","newValue","getIcon","Search","ActionIcon","Close","InputBackground"],"mappings":"2mBAoBA,IAAKA,GAAAA,IACHA,EAAA,OAAS,SACTA,EAAA,MAAQ,QAFLA,OAAA,CAAA,CAKL,EAAA,MAAMC,EAAaC,EAAOC,EAAM,CAC9B,MAAO,WACP,SAAU,WACV,cAAe,OACf,SAAU,CACR,KAAM,CACJ,GAAI,CACF,MAAO,KACP,KAAM,IACR,EACA,GAAI,CACF,MAAO,GACP,KAAM,EACR,EACA,GAAI,CACF,MAAO,GACP,KAAM,EACR,CACF,CACF,CACF,CAAC,EAEKC,EAAwBF,EAAOG,EAAW,CAC9C,kGACE,CACE,QAAS,MACX,CACJ,CAAC,EAEYC,EACXC,EAAM,WACJ,CACE,CACE,KAAAC,EAAO,KACP,IAAAC,EACA,MAAAC,EACA,aAAAC,EAAe,GACf,cAAAC,EACA,UAAAC,EAAY,QACZ,SAAAC,KACGC,CACL,EACAC,IACG,CACH,KAAM,CAACC,EAAYC,CAAa,EAAIC,IAC9B,CAACC,EAAYC,CAAa,EAAId,EAAM,SAASI,CAAY,EACzD,CAACW,EAAYC,CAAa,EAAIhB,EAAM,SACxCI,EAAe,QAAmB,QACpC,EACAJ,EAAM,UAAU,IAAM,CAChB,OAAOG,EAAU,MACrBW,EAAcX,CAAK,EACnBa,EAAcb,EAAQ,QAAmB,QAAiB,EAC5D,EAAG,CAACA,CAAK,CAAC,EAEV,MAAMc,EAAWjB,EAAM,QAAQ,IAAMkB,EAAiBjB,CAAI,EAAG,CAACA,CAAI,CAAC,EAEnED,EAAM,oBACJS,EACA,IAAMC,EAAW,OACnB,EAEA,MAAMS,EAAc,IAAM,CAvFhC,IAAAC,EAAAC,EAwFQ,MAAMC,EAAUZ,EAAW,QAC3B,GAAI,CAACY,EAAS,OAGd,MAAMC,GAAyBH,EAAA,OAAO,yBACpC,OAAO,iBAAiB,UACxB,OACF,IAH+B,KAAAA,OAAAA,EAG5B,KACHC,EAAAE,GAAA,YAAAA,EAAwB,OAAxB,MAAAF,EAAA,KAAAE,EAA+BD,EAAS,EAAA,EACxC,MAAME,EAAM,IAAI,MAAM,QAAS,CAC7B,QAAS,EACX,CAAC,EACDF,EAAQ,cAAcE,CAAG,EACzBF,EAAQ,MACRjB,EAAAA,GAAA,MAAAA,EAAgB,EAAA,CAClB,EAEMoB,EAAkBC,GAA+C,CACrEnB,GAAA,MAAAA,EAAWmB,CAEX,EAAA,MAAMC,EAAWD,EAAM,OAAO,MAC9BZ,EAAca,CAAQ,EACtBtB,GAAA,MAAAA,EAAgBsB,CAChBX,EAAAA,EAAcW,EAAW,QAAmB,QAAiB,CAC/D,EAEMC,EAAU,IACVb,IAAe,SAEff,EAAA,cAACN,EAAA,CACC,GAAImC,EACJ,KAAM5B,EACN,IAAK,CACH,KAAMA,GAAQ,KAAO,KAAO,GAC5B,IAAK,MACL,UAAW,kBACb,CAAA,CACF,EAIFD,EAAA,cAAC8B,EAAA,CACC,MAAOxB,EACP,MAAM,UACN,KAAMW,EACN,IAAK,CACH,SAAU,WACV,IAAK,MACL,UAAW,mBACX,MAAO,IACT,EACA,QAASE,CAAAA,EAETnB,EAAA,cAACJ,EAAA,CAAK,GAAImC,CAAAA,CAAO,CACnB,EAIJ,OACE/B,EAAA,cAACgC,EAAA,CACC,IAAK,CAAE,SAAU,WAAY,MAAO,OAAQ,GAAG9B,CAAI,EACnD,KAAMD,CAAAA,EAEND,EAAA,cAACH,EAAA,CACC,IAAKc,EACL,KAAMV,EACN,KAAK,SACJ,GAAGO,EACJ,MAAOK,EACP,SAAUY,EACV,IAAK,CAAE,GAAIxB,IAAS,KAAO,KAAO,IAAK,CAAA,CACzC,EACC2B,EACH,CAAA,CAEJ,CACF,EAEF7B,EAAY,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageTitle.js","sources":["../../../src/components/section-message/SectionMessageTitle.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '../text'\n\nexport const SectionMessageTitle = (props: React.ComponentProps<typeof Text
|
|
1
|
+
{"version":3,"file":"SectionMessageTitle.js","sources":["../../../src/components/section-message/SectionMessageTitle.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '../text'\n\nexport const SectionMessageTitle = (\n props: React.ComponentProps<typeof Text>\n): JSX.Element => <Text size=\"md\" weight=\"bold\" {...props} />\n"],"names":["SectionMessageTitle","props","React","Text"],"mappings":"kEAIaA,EACXC,GACgBC,EAAA,cAACC,EAAA,CAAK,KAAK,KAAK,OAAO,OAAQ,GAAGF,CAAO,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Track as $,Root as b,Range as g,Thumb as y}from"@radix-ui/react-slider";import*as e from"react";import{styled as t}from"../../stitches.js";import{CSSWrapper as v}from"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{disabledStyle as
|
|
1
|
+
import{Track as $,Root as b,Range as g,Thumb as y}from"@radix-ui/react-slider";import*as e from"react";import{styled as t}from"../../stitches.js";import{CSSWrapper as v}from"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import"../../utilities/style/keyframe-animations.js";import{disabledStyle as o}from"../../utilities/style/disabledStyle.js";import{SliderSteps as S}from"./SliderSteps.js";import{SliderValue as x}from"./SliderValue.js";const a=t($,{borderRadius:"$round",flexGrow:1,position:"relative",'&[data-orientation="horizontal"]':{height:"$space$1"},'&[data-orientation="vertical"]':{width:"$space$1"}}),R=t(b,{alignItems:"center",display:"flex",position:"relative",touchAction:"none",userSelect:"none",cursor:"pointer",'&[data-orientation="horizontal"]':{height:"$1"},'&[data-orientation="vertical"]':{flexDirection:"column",width:"$1"},"&[disabled]":o,variants:{theme:{light:{[`${a}`]:{bg:"#fff"}},tonal:{[`${a}`]:{bg:"$grey600"}}}}}),E=t(g,{bg:"$primary800",borderRadius:"$round",height:"100%",position:"absolute","&[disabled]":o}),k=t(y,{bg:"$primary900",borderRadius:"$round",display:"block",size:"$1","&:hover":{bg:"$primary1000"},"&:focus":{outline:"2px solid $primary900",outlineOffset:"2px"},"&[disabled]":o}),r=e.forwardRef(({value:l,defaultValue:n,min:m=0,max:d=100,theme:s="tonal",css:p,children:u,...c},f)=>{const i=l||n;return e.createElement(v,{css:p},e.createElement(R,{theme:s,defaultValue:n,value:l,min:m,max:d,ref:f,...c},e.createElement(a,null,e.createElement(E,null)),(i==null?void 0:i.length)&&i.map((w,h)=>e.createElement(k,{key:`thumb${h}`}))),u)});r.Value=x,r.Steps=S,r.displayName="Slider";export{r as Slider};
|
|
2
2
|
//# sourceMappingURL=Slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { Range, Root, Thumb, Track } from '@radix-ui/react-slider'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { CSSWrapper, disabledStyle } from '~/utilities'\n\nimport { SliderSteps } from './SliderSteps'\nimport { SliderValue } from './SliderValue'\n\nconst StyledTrack = styled(Track, {\n borderRadius: '$round',\n flexGrow: 1,\n position: 'relative',\n '&[data-orientation=\"horizontal\"]': { height: '$space$1' },\n '&[data-orientation=\"vertical\"]': { width: '$space$1' }\n})\n\nconst StyledSlider = styled(Root, {\n alignItems: 'center',\n display: 'flex',\n position: 'relative',\n touchAction: 'none',\n userSelect: 'none',\n cursor: 'pointer',\n '&[data-orientation=\"horizontal\"]': {\n height: '$1'\n },\n '&[data-orientation=\"vertical\"]': {\n flexDirection: 'column',\n width: '$1'\n },\n '&[
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["import { Range, Root, Thumb, Track } from '@radix-ui/react-slider'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { CSSWrapper, disabledStyle } from '~/utilities'\n\nimport { SliderSteps } from './SliderSteps'\nimport { SliderValue } from './SliderValue'\n\nconst StyledTrack = styled(Track, {\n borderRadius: '$round',\n flexGrow: 1,\n position: 'relative',\n '&[data-orientation=\"horizontal\"]': { height: '$space$1' },\n '&[data-orientation=\"vertical\"]': { width: '$space$1' }\n})\n\nconst StyledSlider = styled(Root, {\n alignItems: 'center',\n display: 'flex',\n position: 'relative',\n touchAction: 'none',\n userSelect: 'none',\n cursor: 'pointer',\n '&[data-orientation=\"horizontal\"]': {\n height: '$1'\n },\n '&[data-orientation=\"vertical\"]': {\n flexDirection: 'column',\n width: '$1'\n },\n '&[disabled]': disabledStyle,\n variants: {\n theme: {\n light: {\n [`${StyledTrack}`]: { bg: '#fff' }\n },\n tonal: {\n [`${StyledTrack}`]: { bg: '$grey600' }\n }\n }\n }\n})\n\nconst StyledRange = styled(Range, {\n bg: '$primary800',\n borderRadius: '$round',\n height: '100%',\n position: 'absolute',\n '&[disabled]': disabledStyle\n})\n\nconst StyledThumb = styled(Thumb, {\n bg: '$primary900',\n borderRadius: '$round',\n display: 'block',\n size: '$1',\n '&:hover': {\n bg: '$primary1000'\n },\n '&:focus': {\n outline: '2px solid $primary900',\n outlineOffset: '2px'\n },\n '&[disabled]': disabledStyle\n})\n\nexport type SliderProps = React.ComponentProps<typeof StyledSlider>\n\ntype SliderType = React.ForwardRefExoticComponent<SliderProps> & {\n Value: typeof SliderValue\n Steps: typeof SliderSteps\n}\n\nexport const Slider: SliderType = React.forwardRef(\n (\n {\n value,\n defaultValue,\n min = 0,\n max = 100,\n theme = 'tonal',\n css,\n children,\n ...remainingProps\n },\n ref\n ) => {\n const values = value || defaultValue\n return (\n <CSSWrapper css={css}>\n <StyledSlider\n theme={theme}\n defaultValue={defaultValue}\n value={value}\n min={min}\n max={max}\n ref={ref}\n {...remainingProps}\n >\n <StyledTrack>\n <StyledRange />\n </StyledTrack>\n {values?.length &&\n values.map((_, i) => <StyledThumb key={`thumb${i}`} />)}\n </StyledSlider>\n {children}\n </CSSWrapper>\n )\n }\n) as SliderType\n\nSlider.Value = SliderValue\nSlider.Steps = SliderSteps\n\nSlider.displayName = 'Slider'\n"],"names":["StyledTrack","styled","Track","StyledSlider","Root","disabledStyle","StyledRange","Range","StyledThumb","Thumb","Slider","React","value","defaultValue","min","max","theme","css","children","remainingProps","ref","values","CSSWrapper","_","i","SliderValue","SliderSteps"],"mappings":"ogBASA,MAAMA,EAAcC,EAAOC,EAAO,CAChC,aAAc,SACd,SAAU,EACV,SAAU,WACV,mCAAoC,CAAE,OAAQ,UAAW,EACzD,iCAAkC,CAAE,MAAO,UAAW,CACxD,CAAC,EAEKC,EAAeF,EAAOG,EAAM,CAChC,WAAY,SACZ,QAAS,OACT,SAAU,WACV,YAAa,OACb,WAAY,OACZ,OAAQ,UACR,mCAAoC,CAClC,OAAQ,IACV,EACA,iCAAkC,CAChC,cAAe,SACf,MAAO,IACT,EACA,cAAeC,EACf,SAAU,CACR,MAAO,CACL,MAAO,CACL,CAAC,GAAGL,KAAgB,CAAE,GAAI,MAAO,CACnC,EACA,MAAO,CACL,CAAC,GAAGA,KAAgB,CAAE,GAAI,UAAW,CACvC,CACF,CACF,CACF,CAAC,EAEKM,EAAcL,EAAOM,EAAO,CAChC,GAAI,cACJ,aAAc,SACd,OAAQ,OACR,SAAU,WACV,cAAeF,CACjB,CAAC,EAEKG,EAAcP,EAAOQ,EAAO,CAChC,GAAI,cACJ,aAAc,SACd,QAAS,QACT,KAAM,KACN,UAAW,CACT,GAAI,cACN,EACA,UAAW,CACT,QAAS,wBACT,cAAe,KACjB,EACA,cAAeJ,CACjB,CAAC,EASYK,EAAqBC,EAAM,WACtC,CACE,CACE,MAAAC,EACA,aAAAC,EACA,IAAAC,EAAM,EACN,IAAAC,EAAM,IACN,MAAAC,EAAQ,QACR,IAAAC,EACA,SAAAC,KACGC,CACL,EACAC,IACG,CACH,MAAMC,EAAST,GAASC,EACxB,OACEF,EAAA,cAACW,EAAA,CAAW,IAAKL,CAAAA,EACfN,EAAA,cAACR,EAAA,CACC,MAAOa,EACP,aAAcH,EACd,MAAOD,EACP,IAAKE,EACL,IAAKC,EACL,IAAKK,EACJ,GAAGD,CAAAA,EAEJR,EAAA,cAACX,EAAA,KACCW,EAAA,cAACL,EAAA,IAAY,CACf,GACCe,GAAA,KAAA,OAAAA,EAAQ,SACPA,EAAO,IAAI,CAACE,EAAGC,IAAMb,EAAA,cAACH,EAAA,CAAY,IAAK,QAAQgB,GAAAA,CAAK,CAAE,CAC1D,EACCN,CACH,CAEJ,CACF,EAEAR,EAAO,MAAQe,EACff,EAAO,MAAQgB,EAEfhB,EAAO,YAAc"}
|
|
@@ -370,11 +370,11 @@ declare const StyledTable: import("@atom-learning/stitches-react/types/styled-co
|
|
|
370
370
|
declare type TableProps = React.ComponentProps<typeof StyledTable> & {
|
|
371
371
|
numberOfStickyColumns?: number;
|
|
372
372
|
scrollContainerCss?: CSS;
|
|
373
|
-
|
|
373
|
+
scrollContainerkey?: string;
|
|
374
374
|
maxRowDepth?: number;
|
|
375
375
|
};
|
|
376
376
|
export declare const Table: {
|
|
377
|
-
({ size, corners, numberOfStickyColumns, scrollContainerCss,
|
|
377
|
+
({ size, corners, numberOfStickyColumns, scrollContainerCss, scrollContainerkey, ...rest }: TableProps): React.JSX.Element;
|
|
378
378
|
displayName: string;
|
|
379
379
|
} & {
|
|
380
380
|
Body: {
|
|
@@ -2948,11 +2948,9 @@ export declare const Table: {
|
|
|
2948
2948
|
};
|
|
2949
2949
|
}> | undefined;
|
|
2950
2950
|
}>;
|
|
2951
|
-
StickyColumnsContainer: ({ children, numberOfStickyColumns,
|
|
2951
|
+
StickyColumnsContainer: ({ children, numberOfStickyColumns, css, ...restProps }: React.PropsWithChildren<{
|
|
2952
2952
|
numberOfStickyColumns?: number | undefined;
|
|
2953
2953
|
css?: CSS | undefined;
|
|
2954
|
-
controlColumnCount?: number | undefined;
|
|
2955
|
-
maxRowDepth?: number | undefined;
|
|
2956
2954
|
}>) => React.JSX.Element;
|
|
2957
2955
|
};
|
|
2958
2956
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as i from"react";import{styled as b}from"../../stitches.js";import{TableBody as c}from"./TableBody.js";import{TableCell as e}from"./TableCell.js";import{TableFooter as f}from"./TableFooter.js";import{TableFooterCell as r}from"./TableFooterCell.js";import{TableHeader as C}from"./TableHeader.js";import{TableHeaderCell as o}from"./TableHeaderCell.js";import{StyledRow as u,TableRow as y}from"./TableRow.js";import{TableStickyColumnsContainer as a}from"./TableStickyColumnsContainer.js";const h=b("table",{borderCollapse:"separate",borderSpacing:0,fontFamily:"$sans",fontSize:"$sm",width:"100%",variants:{size:{md:{[`${e}, ${o}, ${r}`]:{height:"$4",padding:"$1 $3"}},lg:{[`${e}, ${o}, ${r}`]:{height:"$5",padding:"$2 $3"}},xl:{[`${e}, ${o}, ${r}`]:{height:"$6",padding:"$4 $3"}}},corners:{round:{[`${o}`]:{"&:first-of-type":{borderTopLeftRadius:"$0"},"&:last-of-type":{borderTopRightRadius:"$0"}},[`${u}:last-child`]:{[`${e}:first-child`]:{borderBottomLeftRadius:"$0"},[`${e}:last-child`]:{borderBottomRightRadius:"$0"}}},square:{}}}}),s=({size:m="md",corners:n="round",numberOfStickyColumns:t=0,scrollContainerCss:d,scrollContainerkey:$,...p})=>{const l=i.createElement(h,{size:m,corners:n,...p});return t?i.createElement(a,{key:$,css:d,numberOfStickyColumns:t},l):l},T=Object.assign(s,{Body:c,Cell:e,Footer:f,FooterCell:r,Header:C,HeaderCell:o,Row:y,StickyColumnsContainer:a});s.displayName="Table";export{T as Table};
|
|
2
2
|
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { StyledRow, TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$sans',\n fontSize: '$sm',\n width: '100%',\n variants: {\n size: {\n md: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$4',\n padding: '$1 $3'\n }\n },\n lg: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$5',\n padding: '$2 $3'\n }\n },\n xl: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$6',\n padding: '$4 $3'\n }\n }\n },\n corners: {\n round: {\n [`${TableHeaderCell}`]: {\n '&:first-of-type': { borderTopLeftRadius: '$0' },\n '&:last-of-type': { borderTopRightRadius: '$0' }\n },\n [`${StyledRow}:last-child`]: {\n [`${TableCell}:first-child`]: { borderBottomLeftRadius: '$0' },\n [`${TableCell}:last-child`]: { borderBottomRightRadius: '$0' }\n }\n },\n square: {}\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCss?: CSS\n
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { StyledRow, TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\nconst StyledTable = styled('table', {\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$sans',\n fontSize: '$sm',\n width: '100%',\n variants: {\n size: {\n md: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$4',\n padding: '$1 $3'\n }\n },\n lg: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$5',\n padding: '$2 $3'\n }\n },\n xl: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$6',\n padding: '$4 $3'\n }\n }\n },\n corners: {\n round: {\n [`${TableHeaderCell}`]: {\n '&:first-of-type': { borderTopLeftRadius: '$0' },\n '&:last-of-type': { borderTopRightRadius: '$0' }\n },\n [`${StyledRow}:last-child`]: {\n [`${TableCell}:first-child`]: { borderBottomLeftRadius: '$0' },\n [`${TableCell}:last-child`]: { borderBottomRightRadius: '$0' }\n }\n },\n square: {}\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCss?: CSS\n scrollContainerkey?: string\n maxRowDepth?: number\n}\n\nconst TableComponent = ({\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCss,\n scrollContainerkey,\n ...rest\n}: TableProps) => {\n const tableComponent = <StyledTable size={size} corners={corners} {...rest} />\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n key={scrollContainerkey}\n css={scrollContainerCss}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n}\n\nexport const Table = Object.assign(TableComponent, {\n Body: TableBody,\n Cell: TableCell,\n Footer: TableFooter,\n FooterCell: TableFooterCell,\n Header: TableHeader,\n HeaderCell: TableHeaderCell,\n Row: TableRow,\n StickyColumnsContainer: TableStickyColumnsContainer\n})\n\nTableComponent.displayName = 'Table'\n"],"names":["StyledTable","styled","TableCell","TableHeaderCell","TableFooterCell","StyledRow","TableComponent","size","corners","numberOfStickyColumns","scrollContainerCss","scrollContainerkey","rest","tableComponent","React","TableStickyColumnsContainer","Table","TableBody","TableFooter","TableHeader","TableRow"],"mappings":"4eAaA,MAAMA,EAAcC,EAAO,QAAS,CAClC,eAAgB,WAChB,cAAe,EACf,WAAY,QACZ,SAAU,MACV,MAAO,OACP,SAAU,CACR,KAAM,CACJ,GAAI,CACF,CAAC,GAAGC,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,EACA,GAAI,CACF,CAAC,GAAGF,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,EACA,GAAI,CACF,CAAC,GAAGF,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,CACF,EACA,QAAS,CACP,MAAO,CACL,CAAC,GAAGD,KAAoB,CACtB,kBAAmB,CAAE,oBAAqB,IAAK,EAC/C,iBAAkB,CAAE,qBAAsB,IAAK,CACjD,EACA,CAAC,GAAGE,gBAAyB,CAC3B,CAAC,GAAGH,iBAA0B,CAAE,uBAAwB,IAAK,EAC7D,CAAC,GAAGA,gBAAyB,CAAE,wBAAyB,IAAK,CAC/D,CACF,EACA,OAAQ,CAAA,CACV,CACF,CACF,CAAC,EASKI,EAAiB,CAAC,CACtB,KAAAC,EAAO,KACP,QAAAC,EAAU,QACV,sBAAAC,EAAwB,EACxB,mBAAAC,EACA,mBAAAC,KACGC,CACL,IAAkB,CAChB,MAAMC,EAAiBC,EAAA,cAACd,EAAA,CAAY,KAAMO,EAAM,QAASC,EAAU,GAAGI,CAAM,CAAA,EAE5E,OAAIH,EAEAK,EAAA,cAACC,EAAA,CACC,IAAKJ,EACL,IAAKD,EACL,sBAAuBD,CAAAA,EAEtBI,CACH,EAIGA,CACT,EAEaG,EAAQ,OAAO,OAAOV,EAAgB,CACjD,KAAMW,EACN,KAAMf,EACN,OAAQgB,EACR,WAAYd,EACZ,OAAQe,EACR,WAAYhB,EACZ,IAAKiB,EACL,uBAAwBL,CAC1B,CAAC,EAEDT,EAAe,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{styled as
|
|
1
|
+
import{styled as l}from"../../stitches.js";const e=l("td",{borderBottom:"1px solid $grey200",boxSizing:"border-box",color:"$grey800",fontFamily:"$body",lineHeight:1.5,textAlign:"left",verticalAlign:"middle","&:first-child":{fontWeight:"600"}});e.displayName="TableCell";export{e as TableCell};
|
|
2
2
|
//# sourceMappingURL=TableCell.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.js","sources":["../../../src/components/table/TableCell.tsx"],"sourcesContent":["import { styled } from '~/stitches'\n\nexport const TableCell = styled('td', {\n borderBottom: '1px solid $grey200',\n boxSizing: 'border-box',\n color: '$grey800',\n fontFamily: '$body',\n lineHeight: 1.5,\n textAlign: 'left',\n verticalAlign: 'middle',\n '&:first-child': { fontWeight: '
|
|
1
|
+
{"version":3,"file":"TableCell.js","sources":["../../../src/components/table/TableCell.tsx"],"sourcesContent":["import { styled } from '~/stitches'\n\nexport const TableCell = styled('td', {\n borderBottom: '1px solid $grey200',\n boxSizing: 'border-box',\n color: '$grey800',\n fontFamily: '$body',\n lineHeight: 1.5,\n textAlign: 'left',\n verticalAlign: 'middle',\n '&:first-child': { fontWeight: '600' }\n})\n\nTableCell.displayName = 'TableCell'\n"],"names":["TableCell","styled"],"mappings":"2CAEO,MAAMA,EAAYC,EAAO,KAAM,CACpC,aAAc,qBACd,UAAW,aACX,MAAO,WACP,WAAY,QACZ,WAAY,IACZ,UAAW,OACX,cAAe,SACf,gBAAiB,CAAE,WAAY,KAAM,CACvC,CAAC,EAEDD,EAAU,YAAc"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { CSS } from '../../stitches';
|
|
3
|
-
export declare const TableStickyColumnsContainer: ({ children, numberOfStickyColumns,
|
|
3
|
+
export declare const TableStickyColumnsContainer: ({ children, numberOfStickyColumns, css, ...restProps }: React.PropsWithChildren<{
|
|
4
4
|
numberOfStickyColumns?: number | undefined;
|
|
5
5
|
css?: CSS | undefined;
|
|
6
|
-
controlColumnCount?: number | undefined;
|
|
7
|
-
maxRowDepth?: number | undefined;
|
|
8
6
|
}>) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from"react";import{Box as a}from"../box/Box.js";import{useStickyColumnsCss as m}from"./useStickyColumnsCss.js";const h=({children:s,numberOfStickyColumns:t=0,css:c,...i})=>{const[e,p]=r.useState(!1),o=r.useRef(null),{columnsCss:u}=m({numberOfStickyColumns:t,wrapperRef:o});return r.createElement(a,{onScroll:l=>{const n=l.currentTarget.scrollWidth>l.currentTarget.clientWidth;n!==e&&p(n)},role:"scrollbar",ref:o,css:{overflow:"auto",maxWidth:"100%",...u,[`& td:nth-child(${t}), th:nth-child(${t})`]:{...e&&{boxShadow:"$colors$alpha200 -2px -3px 9px 1px",clipPath:"inset(0px -10px 0px 0px)"}},"& td":{bg:"inherit"},...c},...i},s)};export{h as TableStickyColumnsContainer};
|
|
2
2
|
//# sourceMappingURL=TableStickyColumnsContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableStickyColumnsContainer.js","sources":["../../../src/components/table/TableStickyColumnsContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Box } from '../box'\nimport { useStickyColumnsCss } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n
|
|
1
|
+
{"version":3,"file":"TableStickyColumnsContainer.js","sources":["../../../src/components/table/TableStickyColumnsContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Box } from '../box'\nimport { useStickyColumnsCss } from './useStickyColumnsCss'\n\nexport const TableStickyColumnsContainer = ({\n children,\n numberOfStickyColumns = 0,\n css,\n ...restProps\n}: React.PropsWithChildren<{\n numberOfStickyColumns?: number\n css?: CSS\n}>) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const wrapperRef = React.useRef(null)\n const { columnsCss } = useStickyColumnsCss({\n numberOfStickyColumns,\n wrapperRef\n })\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll =\n event.currentTarget.scrollWidth > event.currentTarget.clientWidth\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <Box\n onScroll={handleScroll}\n role=\"scrollbar\"\n ref={wrapperRef}\n css={{\n overflow: 'auto',\n maxWidth: '100%',\n ...columnsCss,\n [`& td:nth-child(${numberOfStickyColumns}), th:nth-child(${numberOfStickyColumns})`]:\n {\n ...(hasScroll && {\n boxShadow: '$colors$alpha200 -2px -3px 9px 1px',\n clipPath: 'inset(0px -10px 0px 0px)'\n })\n },\n '& td': {\n bg: 'inherit'\n },\n ...css\n }}\n {...restProps}\n >\n {children}\n </Box>\n )\n}\n"],"names":["TableStickyColumnsContainer","children","numberOfStickyColumns","css","restProps","hasScroll","setHasScroll","React","wrapperRef","columnsCss","useStickyColumnsCss","Box","event","newHasScroll"],"mappings":"wHAOa,MAAAA,EAA8B,CAAC,CAC1C,SAAAC,EACA,sBAAAC,EAAwB,EACxB,IAAAC,KACGC,CACL,IAGO,CACL,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzDC,EAAaD,EAAM,OAAO,IAAI,EAC9B,CAAE,WAAAE,CAAW,EAAIC,EAAoB,CACzC,sBAAAR,EACA,WAAAM,CACF,CAAC,EAUD,OACED,EAAA,cAACI,EAAA,CACC,SAVkBC,GAAyC,CAC7D,MAAMC,EACJD,EAAM,cAAc,YAAcA,EAAM,cAAc,YACpDC,IAAiBR,GACnBC,EAAaO,CAAY,CAE7B,EAKI,KAAK,YACL,IAAKL,EACL,IAAK,CACH,SAAU,OACV,SAAU,OACV,GAAGC,EACH,CAAC,kBAAkBP,oBAAwCA,MACzD,CACE,GAAIG,GAAa,CACf,UAAW,qCACX,SAAU,0BACZ,CACF,EACF,OAAQ,CACN,GAAI,SACN,EACA,GAAGF,CACL,EACC,GAAGC,CAEHH,EAAAA,CACH,CAEJ"}
|
|
@@ -3,10 +3,8 @@ import { CSS } from '../../stitches';
|
|
|
3
3
|
interface IUseStickyColumnsCss {
|
|
4
4
|
columnsCss: CSS;
|
|
5
5
|
}
|
|
6
|
-
export declare const useStickyColumnsCss: ({ numberOfStickyColumns, wrapperRef
|
|
6
|
+
export declare const useStickyColumnsCss: ({ numberOfStickyColumns, wrapperRef }: {
|
|
7
7
|
numberOfStickyColumns: number;
|
|
8
8
|
wrapperRef: React.RefObject<HTMLTableSectionElement>;
|
|
9
|
-
controlColumnCount?: number | undefined;
|
|
10
|
-
maxRowDepth?: number | undefined;
|
|
11
9
|
}) => IUseStickyColumnsCss;
|
|
12
10
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"react";const d=({numberOfStickyColumns:t,wrapperRef:r})=>{const[i,f]=n.useState({}),u=n.useCallback(()=>{var e;let s=0;const o=(e=r.current)==null?void 0:e.querySelectorAll("th");return Array.from(o||[]).slice(0,t).reduce((m,p,c)=>{const l=c+1,a={...m,[`& td:nth-of-type(${l}), th:nth-of-type(${l})`]:{position:"sticky",left:`${s}px`,minWidth:`${p.offsetWidth}px`,zIndex:"2"}};return s+=(o==null?void 0:o.item(c).clientWidth)||0,a},{})},[t,r]);return n.useLayoutEffect(()=>{if(!t)return;const e=u();f(e)},[t,r,u]),{columnsCss:i}};export{d as useStickyColumnsCss};
|
|
2
2
|
//# sourceMappingURL=useStickyColumnsCss.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useStickyColumnsCss.js","sources":["../../../src/components/table/useStickyColumnsCss.ts"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS } from '../../stitches'\n\ninterface IUseStickyColumnsCss {\n columnsCss: CSS\n}\n\
|
|
1
|
+
{"version":3,"file":"useStickyColumnsCss.js","sources":["../../../src/components/table/useStickyColumnsCss.ts"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS } from '../../stitches'\n\ninterface IUseStickyColumnsCss {\n columnsCss: CSS\n}\n\nexport const useStickyColumnsCss = ({\n numberOfStickyColumns,\n wrapperRef\n}: {\n numberOfStickyColumns: number\n wrapperRef: React.RefObject<HTMLTableSectionElement>\n}): IUseStickyColumnsCss => {\n const [columnsCss, setColumnsCss] = React.useState<CSS>({})\n\n const generateColumnsCss = React.useCallback(() => {\n let accWidth = 0\n\n // Getting the table header cells elements to use their width to set the left position in the sticky columns.\n const tableHeaderCells = wrapperRef.current?.querySelectorAll('th')\n const tableHeaderElements = Array.from(tableHeaderCells || [])\n\n // Getting only the number of sticky columns from the elements array that is what we are interested in.\n const stickyColumns = tableHeaderElements.slice(0, numberOfStickyColumns)\n\n const newColumnsCss = stickyColumns.reduce((acc: CSS, column, index) => {\n const elementNumber = index + 1\n const cssObject = {\n ...acc,\n [`& td:nth-of-type(${elementNumber}), th:nth-of-type(${elementNumber})`]:\n {\n position: 'sticky',\n left: `${accWidth}px`,\n minWidth: `${column.offsetWidth}px`, // fixing width for sticky columns\n zIndex: '2'\n }\n }\n\n accWidth += tableHeaderCells?.item(index).clientWidth || 0\n\n return cssObject\n }, {} as CSS)\n\n return newColumnsCss\n }, [numberOfStickyColumns, wrapperRef])\n\n React.useLayoutEffect(() => {\n if (!numberOfStickyColumns) return\n const newColumnsCss = generateColumnsCss()\n\n setColumnsCss(newColumnsCss)\n }, [numberOfStickyColumns, wrapperRef, generateColumnsCss])\n\n return {\n columnsCss\n }\n}\n"],"names":["useStickyColumnsCss","numberOfStickyColumns","wrapperRef","columnsCss","setColumnsCss","React","generateColumnsCss","_a","accWidth","tableHeaderCells","acc","column","index","elementNumber","cssObject","newColumnsCss"],"mappings":"wBAQa,MAAAA,EAAsB,CAAC,CAClC,sBAAAC,EACA,WAAAC,CACF,IAG4B,CAC1B,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAM,SAAc,CAAA,CAAE,EAEpDC,EAAqBD,EAAM,YAAY,IAAM,CAjBrD,IAAAE,EAkBI,IAAIC,EAAW,EAGf,MAAMC,GAAmBF,EAAAL,EAAW,UAAX,KAAAK,OAAAA,EAAoB,iBAAiB,IAAA,EAwB9D,OAvB4B,MAAM,KAAKE,GAAoB,CAAE,CAAA,EAGnB,MAAM,EAAGR,CAAqB,EAEpC,OAAO,CAACS,EAAUC,EAAQC,IAAU,CACtE,MAAMC,EAAgBD,EAAQ,EACxBE,EAAY,CAChB,GAAGJ,EACH,CAAC,oBAAoBG,sBAAkCA,MACrD,CACE,SAAU,SACV,KAAM,GAAGL,MACT,SAAU,GAAGG,EAAO,gBACpB,OAAQ,GACV,CACJ,EAEA,OAAAH,IAAYC,GAAA,KAAAA,OAAAA,EAAkB,KAAKG,CAAAA,EAAO,cAAe,EAElDE,CACT,EAAG,EAAS,CAGd,EAAG,CAACb,EAAuBC,CAAU,CAAC,EAEtC,OAAAG,EAAM,gBAAgB,IAAM,CAC1B,GAAI,CAACJ,EAAuB,OAC5B,MAAMc,EAAgBT,EAAmB,EAEzCF,EAAcW,CAAa,CAC7B,EAAG,CAACd,EAAuBC,EAAYI,CAAkB,CAAC,EAEnD,CACL,WAAAH,CACF,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Trigger as n}from"@radix-ui/react-tabs";import*as e from"react";import{styled as
|
|
1
|
+
import{Trigger as n}from"@radix-ui/react-tabs";import*as e from"react";import{styled as o}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import{focusVisibleStyleBlock as c}from"../../utilities/style/focus-visible-style-block.js";import"../../utilities/style/keyframe-animations.js";import{disabledStyle as l}from"../../utilities/style/disabledStyle.js";import{Text as s}from"../text/Text.js";const t=o("div",{position:"absolute",inset:0,height:"calc(100% + 2px)",opacity:0,bg:"$interactive1"}),m=o(n,{background:"none",border:"none",cursor:"pointer",flexShrink:0,p:"$4",userSelect:"none",borderBottom:"2px solid transparent",position:"relative",'&[data-state="active"]':{color:"$interactive1",fontWeight:600,letterSpacing:"-0.005em",borderColor:"currentColor"},"&[disabled]":l,"&:not([disabled])":{"&:hover, &:focus-visible":{color:"$interactive2",[`& ${t}`]:{opacity:.07}},"&:active":{color:"$interactive3"},"&:focus-visible":{...c()}}}),r=({children:i,...a})=>e.createElement(m,{...a},e.createElement(s,{size:"sm",as:"span"},i),e.createElement(t,null));r.displayName="TabsTrigger";export{r as TabsTrigger};
|
|
2
2
|
//# sourceMappingURL=TabsTrigger.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabsTrigger.js","sources":["../../../src/components/tabs/TabsTrigger.tsx"],"sourcesContent":["import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { disabledStyle, focusVisibleStyleBlock } from '~/utilities'\n\nimport { Text } from '../text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n position: 'absolute',\n inset: 0,\n height: 'calc(100% + 2px)',\n opacity: 0,\n bg: '$interactive1'\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n flexShrink: 0,\n p: '$4',\n userSelect: 'none',\n borderBottom: '2px solid transparent',\n position: 'relative',\n '&[data-state=\"active\"]': {\n color: '$interactive1',\n fontWeight: 600,\n letterSpacing: '-0.005em',\n borderColor: 'currentColor'\n },\n '&[
|
|
1
|
+
{"version":3,"file":"TabsTrigger.js","sources":["../../../src/components/tabs/TabsTrigger.tsx"],"sourcesContent":["import { Trigger } from '@radix-ui/react-tabs'\nimport * as React from 'react'\n\nimport { styled } from '~/stitches'\nimport { disabledStyle, focusVisibleStyleBlock } from '~/utilities'\n\nimport { Text } from '../text'\n\nconst StyledTabsTriggerHoverBackground = styled('div', {\n position: 'absolute',\n inset: 0,\n height: 'calc(100% + 2px)',\n opacity: 0,\n bg: '$interactive1'\n})\n\nconst StyledTabsTrigger = styled(Trigger, {\n background: 'none',\n border: 'none',\n cursor: 'pointer',\n flexShrink: 0,\n p: '$4',\n userSelect: 'none',\n borderBottom: '2px solid transparent',\n position: 'relative',\n '&[data-state=\"active\"]': {\n color: '$interactive1',\n fontWeight: 600,\n letterSpacing: '-0.005em',\n borderColor: 'currentColor'\n },\n '&[disabled]': disabledStyle,\n '&:not([disabled])': {\n '&:hover, &:focus-visible': {\n color: '$interactive2',\n [`& ${StyledTabsTriggerHoverBackground}`]: {\n opacity: 0.07\n }\n },\n '&:active': {\n color: '$interactive3'\n },\n '&:focus-visible': {\n ...focusVisibleStyleBlock()\n }\n }\n})\n\nexport const TabsTrigger = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledTabsTrigger> & { value: string }) => (\n <StyledTabsTrigger {...rest}>\n <Text size=\"sm\" as=\"span\">\n {children}\n </Text>\n <StyledTabsTriggerHoverBackground />\n </StyledTabsTrigger>\n)\n\nTabsTrigger.displayName = 'TabsTrigger'\n"],"names":["StyledTabsTriggerHoverBackground","styled","StyledTabsTrigger","Trigger","disabledStyle","focusVisibleStyleBlock","TabsTrigger","children","rest","React","Text"],"mappings":"ofAQA,MAAMA,EAAmCC,EAAO,MAAO,CACrD,SAAU,WACV,MAAO,EACP,OAAQ,mBACR,QAAS,EACT,GAAI,eACN,CAAC,EAEKC,EAAoBD,EAAOE,EAAS,CACxC,WAAY,OACZ,OAAQ,OACR,OAAQ,UACR,WAAY,EACZ,EAAG,KACH,WAAY,OACZ,aAAc,wBACd,SAAU,WACV,yBAA0B,CACxB,MAAO,gBACP,WAAY,IACZ,cAAe,WACf,YAAa,cACf,EACA,cAAeC,EACf,oBAAqB,CACnB,2BAA4B,CAC1B,MAAO,gBACP,CAAC,KAAKJ,KAAqC,CACzC,QAAS,GACX,CACF,EACA,WAAY,CACV,MAAO,eACT,EACA,kBAAmB,CACjB,GAAGK,EACL,CAAA,CACF,CACF,CAAC,EAEYC,EAAc,CAAC,CAC1B,SAAAC,KACGC,CACL,IACEC,EAAA,cAACP,EAAA,CAAmB,GAAGM,GACrBC,EAAA,cAACC,EAAA,CAAK,KAAK,KAAK,GAAG,MAAA,EAChBH,CACH,EACAE,EAAA,cAACT,EAAA,IAAiC,CACpC,EAGFM,EAAY,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as n from"react";import{styled as
|
|
1
|
+
import*as n from"react";import{styled as f}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import{capsize as e}from"../../utilities/style/capsize.js";import"color2k";import"../../utilities/style/keyframe-animations.js";const i={size:{xs:{fontSize:"$xs",lineHeight:1.6,...e(.4364)},sm:{fontSize:"$sm",lineHeight:1.53,...e(.4056)},md:{fontSize:"$md",lineHeight:1.5,...e(.3864)},lg:{fontSize:"$lg",lineHeight:1.52,...e(.3983)},xl:{fontSize:"$xl",lineHeight:1.42,...e(.3506)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}},s=({size:t,noCapsize:o})=>({...i.size[t],...i.noCapsize[`${o}`]}),a=f("p",{m:0,"& > &":{"&:before, &:after":{display:"none"}},variants:{...i,weight:{normal:{fontWeight:400},bold:{fontWeight:600}},family:{body:{fontFamily:"$body"},display:{fontFamily:"$display"},mono:{fontFamily:"$mono"}}}}),m=n.forwardRef(({size:t="md",family:o="body",...l},r)=>n.createElement(a,{size:t,family:o,...l,ref:r}));m.displayName="Text";export{a as StyledText,m as Text,s as getTextVariant,i as textVariants};
|
|
2
2
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const textVariants = {\n size: {\n xs: { fontSize: '$xs', lineHeight: 1.6, ...capsize(0.4364) },\n sm: { fontSize: '$sm', lineHeight: 1.53, ...capsize(0.4056) },\n md: { fontSize: '$md', lineHeight: 1.5, ...capsize(0.3864) },\n lg: { fontSize: '$lg', lineHeight: 1.52, ...capsize(0.3983) },\n xl: { fontSize: '$xl', lineHeight: 1.42, ...capsize(0.3506) }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n}\n\nexport const getTextVariant: (options: {\n size: keyof typeof textVariants.size\n noCapsize?: boolean\n}) => CSS = ({ size, noCapsize }) => ({\n ...textVariants.size[size],\n ...textVariants.noCapsize[`${noCapsize}`]\n})\n\nexport const StyledText = styled('p', {\n m: 0,\n /** Allow nesting `<Text />` inside `<Text />` without forcing a new line and spacing. */\n '& > &': {\n '&:before, &:after': { display: 'none' }\n },\n variants: {\n ...textVariants,\n weight: {\n normal: { fontWeight: 400 },\n bold: { fontWeight: 600 }\n },\n family: {\n body: { fontFamily: '$body' },\n display: { fontFamily: '$display' },\n mono: { fontFamily: '$mono' }
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../src/components/text/Text.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\nimport type { Override } from '~/utilities'\nimport { capsize } from '~/utilities'\n\nexport const textVariants = {\n size: {\n xs: { fontSize: '$xs', lineHeight: 1.6, ...capsize(0.4364) },\n sm: { fontSize: '$sm', lineHeight: 1.53, ...capsize(0.4056) },\n md: { fontSize: '$md', lineHeight: 1.5, ...capsize(0.3864) },\n lg: { fontSize: '$lg', lineHeight: 1.52, ...capsize(0.3983) },\n xl: { fontSize: '$xl', lineHeight: 1.42, ...capsize(0.3506) }\n },\n noCapsize: {\n true: {\n '&::before, &::after': { display: 'none !important' }\n }\n }\n}\n\nexport const getTextVariant: (options: {\n size: keyof typeof textVariants.size\n noCapsize?: boolean\n}) => CSS = ({ size, noCapsize }) => ({\n ...textVariants.size[size],\n ...textVariants.noCapsize[`${noCapsize}`]\n})\n\nexport const StyledText = styled('p', {\n m: 0,\n /** Allow nesting `<Text />` inside `<Text />` without forcing a new line and spacing. */\n '& > &': {\n '&:before, &:after': { display: 'none' }\n },\n variants: {\n ...textVariants,\n weight: {\n normal: { fontWeight: 400 },\n bold: { fontWeight: 600 }\n },\n family: {\n body: { fontFamily: '$body' },\n display: { fontFamily: '$display' },\n mono: { fontFamily: '$mono' }\n }\n }\n})\n\ntype TextProps = Override<\n React.ComponentProps<typeof StyledText>,\n {\n as?:\n | 'blockquote'\n | 'caption'\n | 'dd'\n | 'dt'\n | 'figcaption'\n | 'li'\n | 'p'\n | 'span'\n | 'legend'\n | React.ComponentType\n | React.ElementType\n }\n>\n\nexport const Text: React.ForwardRefExoticComponent<TextProps> =\n React.forwardRef(\n (\n { size = 'md', family = 'body', ...remainingProps },\n ref\n ) => (\n <StyledText\n size={size}\n family={family}\n {...remainingProps}\n ref={ref}\n />\n )\n )\n\nText.displayName = 'Text'\n"],"names":["textVariants","capsize","getTextVariant","size","noCapsize","StyledText","styled","Text","React","family","remainingProps","ref"],"mappings":"sTAMa,MAAAA,EAAe,CAC1B,KAAM,CACJ,GAAI,CAAE,SAAU,MAAO,WAAY,IAAK,GAAGC,EAAQ,KAAM,CAAE,EAC3D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,EAC5D,GAAI,CAAE,SAAU,MAAO,WAAY,IAAK,GAAGA,EAAQ,KAAM,CAAE,EAC3D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,EAC5D,GAAI,CAAE,SAAU,MAAO,WAAY,KAAM,GAAGA,EAAQ,KAAM,CAAE,CAC9D,EACA,UAAW,CACT,KAAM,CACJ,sBAAuB,CAAE,QAAS,iBAAkB,CACtD,CACF,CACF,EAEaC,EAGD,CAAC,CAAE,KAAAC,EAAM,UAAAC,CAAU,KAAO,CACpC,GAAGJ,EAAa,KAAKG,GACrB,GAAGH,EAAa,UAAU,GAAGI,IAC/B,GAEaC,EAAaC,EAAO,IAAK,CACpC,EAAG,EAEH,QAAS,CACP,oBAAqB,CAAE,QAAS,MAAO,CACzC,EACA,SAAU,CACR,GAAGN,EACH,OAAQ,CACN,OAAQ,CAAE,WAAY,GAAI,EAC1B,KAAM,CAAE,WAAY,GAAI,CAC1B,EACA,OAAQ,CACN,KAAM,CAAE,WAAY,OAAQ,EAC5B,QAAS,CAAE,WAAY,UAAW,EAClC,KAAM,CAAE,WAAY,OAAQ,CAC9B,CACF,CACF,CAAC,EAoBYO,EACXC,EAAM,WACJ,CACE,CAAE,KAAAL,EAAO,KAAM,OAAAM,EAAS,UAAWC,CAAe,EAClDC,IAEAH,EAAA,cAACH,EACC,CAAA,KAAMF,EACN,OAAQM,EACP,GAAGC,EACJ,IAAKC,EACP,CAEJ,EAEFJ,EAAK,YAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TopBarBrand.js","sources":["../../../src/components/top-bar/TopBarBrand.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Image } from '../image'\nimport { Text } from '../text'\n\
|
|
1
|
+
{"version":3,"file":"TopBarBrand.js","sources":["../../../src/components/top-bar/TopBarBrand.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Image } from '../image'\nimport { Text } from '../text'\n\nexport const TopBarBrandLogo = ({\n src,\n alt = 'Atom Learning logo',\n css\n}: Pick<\n React.ComponentProps<typeof Image>,\n 'src' | 'alt' | 'css'\n>): JSX.Element => {\n return (\n <Image\n src={src}\n alt={alt}\n css={{\n height: '$3',\n mr: '$3',\n width: 'auto',\n ...css\n }}\n />\n )\n}\n\nexport const TopBarBrandName = styled(Text, {\n color: '$grey800'\n})\n\nexport const TopBarBrand = styled('a', {\n display: 'flex',\n alignItems: 'center',\n textDecoration: 'none',\n color: '$grey800',\n '&:hover, &:focus': { textDecoration: 'none' }\n})\n"],"names":["TopBarBrandLogo","src","alt","css","React","Image","TopBarBrandName","styled","Text","TopBarBrand"],"mappings":"iJAOa,MAAAA,EAAkB,CAAC,CAC9B,IAAAC,EACA,IAAAC,EAAM,qBACN,IAAAC,CACF,IAKIC,EAAA,cAACC,EAAA,CACC,IAAKJ,EACL,IAAKC,EACL,IAAK,CACH,OAAQ,KACR,GAAI,KACJ,MAAO,OACP,GAAGC,CACL,CACF,CAAA,EAISG,EAAkBC,EAAOC,EAAM,CAC1C,MAAO,UACT,CAAC,EAEYC,EAAcF,EAAO,IAAK,CACrC,QAAS,OACT,WAAY,SACZ,eAAgB,OAChB,MAAO,WACP,mBAAoB,CAAE,eAAgB,MAAO,CAC/C,CAAC"}
|