@atom-learning/components 6.14.4 → 6.16.0-beta.0
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/Accordion.js +2 -2
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/action-icon/ActionIcon.d.ts +1 -0
- package/dist/components/action-icon/ActionIcon.js +4 -2
- package/dist/components/action-icon/ActionIcon.js.map +1 -1
- package/dist/components/avatar/Avatar.js +2 -3
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/banner/banner-regular/BannerRegular.d.ts +1 -0
- package/dist/components/banner/banner-regular/BannerRegularActions.js +2 -2
- package/dist/components/banner/banner-regular/BannerRegularActions.js.map +1 -1
- package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +2 -1
- package/dist/components/banner/banner-slim/BannerSlim.d.ts +1 -0
- package/dist/components/banner/banner-slim/BannerSlimButton.js +2 -2
- package/dist/components/banner/banner-slim/BannerSlimButton.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlimContainer.js +2 -3
- package/dist/components/banner/banner-slim/BannerSlimContainer.js.map +1 -1
- package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +2 -1
- package/dist/components/button/Button.d.ts +1 -0
- package/dist/components/button/Button.js +17 -13
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Calendar.js +2 -3
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/carousel/CarouselSlider.js +2 -2
- package/dist/components/carousel/CarouselSlider.js.map +1 -1
- package/dist/components/data-table/DataTableGlobalFilter.js +2 -2
- package/dist/components/data-table/DataTableGlobalFilter.js.map +1 -1
- package/dist/components/data-table/DataTableHead.js +3 -3
- package/dist/components/data-table/DataTableHead.js.map +1 -1
- package/dist/components/data-table/DataTableHeaderCell.js +2 -3
- package/dist/components/data-table/DataTableHeaderCell.js.map +1 -1
- package/dist/components/data-table/DataTableRow.js +2 -3
- package/dist/components/data-table/DataTableRow.js.map +1 -1
- package/dist/components/data-table/DataTableTable.js +3 -4
- package/dist/components/data-table/DataTableTable.js.map +1 -1
- package/dist/components/data-table/drag-and-drop/DragAndDropTable.js +2 -2
- package/dist/components/data-table/drag-and-drop/DragAndDropTable.js.map +1 -1
- package/dist/components/dialog/DialogHeading.js +2 -2
- package/dist/components/dialog/DialogHeading.js.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +2 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +2 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +13 -8
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
- package/dist/components/field-wrapper/FieldDescription.js +2 -2
- package/dist/components/field-wrapper/FieldDescription.js.map +1 -1
- package/dist/components/field-wrapper/FieldWrapper.js +2 -2
- package/dist/components/field-wrapper/FieldWrapper.js.map +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +2 -2
- package/dist/components/field-wrapper/InlineFieldWrapper.js.map +1 -1
- package/dist/components/grid/Grid.js +2 -3
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/link/Link.d.ts +1 -0
- package/dist/components/link/Link.js +13 -9
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/loader/Loader.js +2 -3
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownList.js +2 -2
- package/dist/components/markdown-content/components/MarkdownList.js.map +1 -1
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +2 -2
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js.map +1 -1
- package/dist/components/navigation/NavigationMenu.js +3 -4
- package/dist/components/navigation/NavigationMenu.js.map +1 -1
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js +2 -3
- package/dist/components/navigation/NavigationMenuDropdownTrigger.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +3 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItem.js +2 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItem.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js +2 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +4 -2
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +5 -3
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
- package/dist/components/number-input/NumberInput.js +4 -5
- package/dist/components/number-input/NumberInput.js.map +1 -1
- package/dist/components/number-input/NumberInputStepper.d.ts +2 -1
- package/dist/components/pagination/Pagination.js +2 -2
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/PaginationNextButton.d.ts +2 -1
- package/dist/components/pagination/PaginationPreviousButton.d.ts +2 -1
- package/dist/components/password-field/PasswordField.js +2 -2
- package/dist/components/password-field/PasswordField.js.map +1 -1
- package/dist/components/password-input/PasswordInput.js +3 -3
- package/dist/components/password-input/PasswordInput.js.map +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +2 -2
- package/dist/components/radio-card/RadioCardGroup.js.map +1 -1
- package/dist/components/router-provider/RouterProvider.d.ts +17 -0
- package/dist/components/router-provider/RouterProvider.js +15 -0
- package/dist/components/router-provider/RouterProvider.js.map +1 -0
- package/dist/components/search-input/SearchInput.js +4 -5
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/section-message/SectionMessageDescription.js +2 -2
- package/dist/components/section-message/SectionMessageDescription.js.map +1 -1
- package/dist/components/section-message/SectionMessageDismiss.js +2 -2
- package/dist/components/section-message/SectionMessageDismiss.js.map +1 -1
- package/dist/components/section-message/SectionMessageIcon.js +2 -2
- package/dist/components/section-message/SectionMessageIcon.js.map +1 -1
- package/dist/components/section-message/SectionMessageLayout.js +2 -3
- package/dist/components/section-message/SectionMessageLayout.js.map +1 -1
- package/dist/components/segmented-control/SegmentedControlBadge.js +2 -2
- package/dist/components/segmented-control/SegmentedControlBadge.js.map +1 -1
- package/dist/components/side-bar/SideBar.js +2 -3
- package/dist/components/side-bar/SideBar.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonBarChart.js +2 -2
- package/dist/components/skeleton-loader/SkeletonBarChart.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonButton.js +2 -2
- package/dist/components/skeleton-loader/SkeletonButton.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonCard.js +2 -2
- package/dist/components/skeleton-loader/SkeletonCard.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonColumnChart.js +2 -2
- package/dist/components/skeleton-loader/SkeletonColumnChart.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonDoughnutChart.js +2 -2
- package/dist/components/skeleton-loader/SkeletonDoughnutChart.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonHeading.js +2 -2
- package/dist/components/skeleton-loader/SkeletonHeading.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonPanelList.js +2 -2
- package/dist/components/skeleton-loader/SkeletonPanelList.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonSubjectList.js +2 -2
- package/dist/components/skeleton-loader/SkeletonSubjectList.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonTable.js +2 -2
- package/dist/components/skeleton-loader/SkeletonTable.js.map +1 -1
- package/dist/components/skeleton-loader/SkeletonTabs.js +3 -3
- package/dist/components/skeleton-loader/SkeletonTabs.js.map +1 -1
- package/dist/components/sortable/Handle.d.ts +2 -1
- package/dist/components/sortable/SortableItem.js +2 -2
- package/dist/components/sortable/SortableItem.js.map +1 -1
- package/dist/components/stepper/Stepper.js +2 -2
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/table/Table.js +2 -3
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableStickyColumnsContainer.js +2 -2
- package/dist/components/table/TableStickyColumnsContainer.js.map +1 -1
- package/dist/components/tile-toggle-group/TileToggleGroupRoot.js +2 -2
- package/dist/components/tile-toggle-group/TileToggleGroupRoot.js.map +1 -1
- package/dist/components/toast/ToastCloseButton.js +2 -2
- package/dist/components/toast/ToastCloseButton.js.map +1 -1
- package/dist/components/toggle-group/ToggleGroupRoot.js +2 -3
- package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
- package/dist/components/top-bar/TopBar.d.ts +2 -1
- package/dist/components/top-bar/TopBarBrand.js +2 -3
- package/dist/components/top-bar/TopBarBrand.js.map +1 -1
- package/dist/components/tree/TreeCollapsibleContent.js +2 -2
- package/dist/components/tree/TreeCollapsibleContent.js.map +1 -1
- package/dist/components/tree/TreeCollapsibleTrigger.js +2 -3
- package/dist/components/tree/TreeCollapsibleTrigger.js.map +1 -1
- package/dist/components/tree/TreeIcon.js +2 -2
- package/dist/components/tree/TreeIcon.js.map +1 -1
- package/dist/components/tree/TreeListItem.js +2 -2
- package/dist/components/tree/TreeListItem.js.map +1 -1
- package/dist/components/tree/TreeText.js +2 -2
- package/dist/components/tree/TreeText.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +134 -108
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/styled.d.ts +2 -0
- package/dist/styled.js +5 -4
- package/dist/styled.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { styled } from "../../styled.js";
|
|
1
|
+
import { cn, styled } from "../../styled.js";
|
|
2
2
|
import { Icon } from "../icon/Icon.js";
|
|
3
3
|
import { ActionIcon } from "../action-icon/ActionIcon.js";
|
|
4
4
|
import { useCallbackRef } from "../../utilities/hooks/useCallbackRef.js";
|
|
5
5
|
import { InputBackground, InputText } from "../input/Input.js";
|
|
6
6
|
import { getFieldIconSize } from "../../utilities/style/get-icon-size.js";
|
|
7
|
-
import clsx from "clsx";
|
|
8
7
|
import * as React$1 from "react";
|
|
9
8
|
import { Close, Search } from "@atom-learning/icons";
|
|
10
9
|
//#region src/components/search-input/SearchInput.tsx
|
|
@@ -56,7 +55,7 @@ var SearchInput = React$1.forwardRef(({ size = "md", appearance = "standard", th
|
|
|
56
55
|
if (activeIcon === INPUT_ICON.SEARCH) return /* @__PURE__ */ React$1.createElement(StyledIcon, {
|
|
57
56
|
is: Search,
|
|
58
57
|
size,
|
|
59
|
-
className:
|
|
58
|
+
className: cn(size == "sm" ? "size-4" : "size-5", "top-1/2", "-translate-y-1/2")
|
|
60
59
|
});
|
|
61
60
|
return /* @__PURE__ */ React$1.createElement(ActionIcon, {
|
|
62
61
|
label: clearText,
|
|
@@ -70,7 +69,7 @@ var SearchInput = React$1.forwardRef(({ size = "md", appearance = "standard", th
|
|
|
70
69
|
size,
|
|
71
70
|
appearance,
|
|
72
71
|
theme,
|
|
73
|
-
className:
|
|
72
|
+
className: cn("relative", "w-auto", className)
|
|
74
73
|
}, /* @__PURE__ */ React$1.createElement(InputText, {
|
|
75
74
|
ref: setInputElRef,
|
|
76
75
|
size,
|
|
@@ -78,7 +77,7 @@ var SearchInput = React$1.forwardRef(({ size = "md", appearance = "standard", th
|
|
|
78
77
|
...remainingProps,
|
|
79
78
|
value: innerValue,
|
|
80
79
|
onChange: handleOnChange,
|
|
81
|
-
className:
|
|
80
|
+
className: cn(size === "sm" ? "pr-8" : "pr-10", "[&::-webkit-search-decoration]:appearance-none", "[&::-webkit-search-cancel-button]:appearance-none", "[&::-webkit-search-results-button]:appearance-none")
|
|
82
81
|
}), getIcon());
|
|
83
82
|
});
|
|
84
83
|
SearchInput.displayName = "SearchInput";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.js","names":[],"sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["import { Close, Search } from '@atom-learning/icons'\nimport
|
|
1
|
+
{"version":3,"file":"SearchInput.js","names":[],"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/ActionIcon'\nimport { Icon } from '~/components/icon/Icon'\nimport { Input, InputBackground, InputText } from '~/components/input/Input'\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\nimport { useCallbackRef } from '~/utilities/hooks/useCallbackRef'\nimport { getFieldIconSize } from '~/utilities/style/get-icon-size'\n\nexport type SearchInputProps = React.ComponentProps<typeof Input> & {\n size?: 'sm' | 'md' | 'lg'\n className?: string\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 base: ['text-grey-700', 'absolute', 'pointer-events-none'],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-2.5', 'size-5'],\n lg: ['right-2.5', 'size-5']\n }\n }\n})\n\nexport const SearchInput = React.forwardRef<HTMLInputElement, SearchInputProps>(\n (\n {\n size = 'md',\n appearance = 'standard',\n theme,\n className,\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(ref, () => inputElRef.current as HTMLInputElement)\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 className={cn(\n size == 'sm' ? 'size-4' : 'size-5',\n 'top-1/2',\n '-translate-y-1/2'\n )}\n />\n )\n\n return (\n <ActionIcon\n label={clearText}\n theme=\"neutral\"\n size={iconSize}\n onClick={handleClear}\n className=\"absolute top-1/2 right-1 -translate-y-1/2\"\n >\n <Icon is={Close} />\n </ActionIcon>\n )\n }\n\n return (\n <InputBackground\n size={size}\n appearance={appearance}\n theme={theme}\n className={cn('relative', 'w-auto', className)}\n >\n <InputText\n ref={setInputElRef}\n size={size}\n type=\"search\"\n {...remainingProps}\n value={innerValue}\n onChange={handleOnChange}\n className={cn(\n size === 'sm' ? 'pr-8' : 'pr-10',\n '[&::-webkit-search-decoration]:appearance-none',\n '[&::-webkit-search-cancel-button]:appearance-none',\n '[&::-webkit-search-results-button]:appearance-none'\n )}\n />\n {getIcon()}\n </InputBackground>\n )\n }\n)\n\nSearchInput.displayName = 'SearchInput'\n"],"mappings":";;;;;;;;;AAqBA,IAAK,aAAL,yBAAA,YAAA;AACE,YAAA,YAAA;AACA,YAAA,WAAA;;EAFG,cAAA,EAAA,CAGJ;AAED,IAAM,aAAa,OAAO,MAAM;CAC9B,MAAM;EAAC;EAAiB;EAAY;EAAsB;CAC1D,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,WAAW,SAAS;EACzB,IAAI,CAAC,aAAa,SAAS;EAC3B,IAAI,CAAC,aAAa,SAAS;EAC5B,EACF;CACF,CAAC;AAEF,IAAa,cAAc,QAAM,YAE7B,EACE,OAAO,MACP,aAAa,YACb,OACA,WACA,OACA,eAAe,IACf,eACA,YAAY,SACZ,UACA,GAAG,kBAEL,QACG;CACH,MAAM,CAAC,YAAY,iBAAiB,gBAAgB;CACpD,MAAM,CAAC,YAAY,iBAAiB,QAAM,SAAS,aAAa;CAChE,MAAM,CAAC,YAAY,iBAAiB,QAAM,SACxC,eAAe,WAAW,QAAQ,WAAW,OAC9C;AACD,SAAM,gBAAgB;AACpB,MAAI,OAAO,UAAU,YAAa;AAClC,gBAAc,MAAM;AACpB,gBAAc,QAAQ,WAAW,QAAQ,WAAW,OAAO;IAC1D,CAAC,MAAM,CAAC;CAEX,MAAM,WAAW,QAAM,cAAc,iBAAiB,KAAK,EAAE,CAAC,KAAK,CAAC;AAEpE,SAAM,oBAAoB,WAAW,WAAW,QAA4B;CAE5E,MAAM,oBAAoB;EACxB,MAAM,UAAU,WAAW;AAC3B,MAAI,CAAC,QAAS;AAOd,GAJ+B,OAAO,yBACpC,OAAO,iBAAiB,WACxB,QACD,EAAE,MACqB,OAAO,SAAS,GAAG;EAC3C,MAAM,MAAM,IAAI,MAAM,SAAS,EAC7B,SAAS,MACV,CAAC;AACF,UAAQ,cAAc,IAAI;AAC1B,UAAQ,OAAO;AACf,kBAAgB,GAAG;;CAGrB,MAAM,kBAAkB,UAA+C;AACrE,aAAW,MAAM;EAEjB,MAAM,WAAW,MAAM,OAAO;AAC9B,gBAAc,SAAS;AACvB,kBAAgB,SAAS;AACzB,gBAAc,WAAW,WAAW,QAAQ,WAAW,OAAO;;CAGhE,MAAM,gBAAgB;AACpB,MAAI,eAAe,WAAW,OAC5B,QACE,wBAAA,cAAC,YAAD;GACE,IAAI;GACE;GACN,WAAW,GACT,QAAQ,OAAO,WAAW,UAC1B,WACA,mBACD;GACD,CAAA;AAGN,SACE,wBAAA,cAAC,YAAD;GACE,OAAO;GACP,OAAM;GACN,MAAM;GACN,SAAS;GACT,WAAU;GAGC,EADX,wBAAA,cAAC,MAAD,EAAM,IAAI,OAAS,CAAA,CACR;;AAIjB,QACE,wBAAA,cAAC,iBAAD;EACQ;EACM;EACL;EACP,WAAW,GAAG,YAAY,UAAU,UAAU;EAiB9B,EAfhB,wBAAA,cAAC,WAAD;EACE,KAAK;EACC;EACN,MAAK;EACL,GAAI;EACJ,OAAO;EACP,UAAU;EACV,WAAW,GACT,SAAS,OAAO,SAAS,SACzB,kDACA,qDACA,qDACD;EACD,CAAA,EACD,SAAS,CACM;EAGvB;AAED,YAAY,cAAc"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { Text } from "../text/Text.js";
|
|
2
|
-
import clsx from "clsx";
|
|
3
3
|
import React from "react";
|
|
4
4
|
//#region src/components/section-message/SectionMessageDescription.tsx
|
|
5
5
|
var SectionMessageDescription = ({ className, ...rest }) => /* @__PURE__ */ React.createElement(Text, {
|
|
6
6
|
size: "sm",
|
|
7
7
|
...rest,
|
|
8
|
-
className:
|
|
8
|
+
className: cn("text-grey-900", className)
|
|
9
9
|
});
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SectionMessageDescription };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageDescription.js","names":[],"sources":["../../../src/components/section-message/SectionMessageDescription.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SectionMessageDescription.js","names":[],"sources":["../../../src/components/section-message/SectionMessageDescription.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Text } from '../text/Text'\n\nexport const SectionMessageDescription = ({\n className,\n ...rest\n}: React.ComponentProps<typeof Text>): JSX.Element => (\n <Text size=\"sm\" {...rest} className={cn('text-grey-900', className)} />\n)\n"],"mappings":";;;;AAMA,IAAa,6BAA6B,EACxC,WACA,GAAG,WAEH,sBAAA,cAAC,MAAD;CAAM,MAAK;CAAK,GAAI;CAAM,WAAW,GAAG,iBAAiB,UAAU;CAAI,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { Icon } from "../icon/Icon.js";
|
|
2
3
|
import { ActionIcon } from "../action-icon/ActionIcon.js";
|
|
3
4
|
import { Dismissible } from "../dismissible/index.js";
|
|
4
5
|
import { useSectionMessageContext } from "./SectionMessageContext.js";
|
|
5
|
-
import clsx from "clsx";
|
|
6
6
|
import React, { useEffect } from "react";
|
|
7
7
|
import { Close } from "@atom-learning/icons";
|
|
8
8
|
//#region src/components/section-message/SectionMessageDismiss.tsx
|
|
@@ -18,7 +18,7 @@ var SectionMessageDismiss = ({ label = "Dismiss", className, ...rest }) => {
|
|
|
18
18
|
appearance: "simple",
|
|
19
19
|
theme: "neutral",
|
|
20
20
|
...rest,
|
|
21
|
-
className:
|
|
21
|
+
className: cn("m-auto", "absolute", "top-2", "right-2", className)
|
|
22
22
|
}, /* @__PURE__ */ React.createElement(Icon, { is: Close })));
|
|
23
23
|
};
|
|
24
24
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageDismiss.js","names":[],"sources":["../../../src/components/section-message/SectionMessageDismiss.tsx"],"sourcesContent":["import { Close } from '@atom-learning/icons'\nimport
|
|
1
|
+
{"version":3,"file":"SectionMessageDismiss.js","names":[],"sources":["../../../src/components/section-message/SectionMessageDismiss.tsx"],"sourcesContent":["import { Close } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '~/styled'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Dismissible } from '../dismissible'\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessageContext'\n\nexport const SectionMessageDismiss = ({\n label = 'Dismiss',\n className,\n ...rest\n}: React.ComponentProps<typeof ActionIcon>): JSX.Element => {\n const { setHasDismiss } = useSectionMessageContext()\n\n useEffect(() => {\n setHasDismiss(true)\n return () => setHasDismiss(false)\n }, [setHasDismiss])\n\n return (\n <Dismissible.Trigger asChild>\n <ActionIcon\n label={label}\n size=\"sm\"\n appearance=\"simple\"\n theme=\"neutral\"\n {...rest}\n className={cn('m-auto', 'absolute', 'top-2', 'right-2', className)}\n >\n <Icon is={Close} />\n </ActionIcon>\n </Dismissible.Trigger>\n )\n}\n"],"mappings":";;;;;;;;AAUA,IAAa,yBAAyB,EACpC,QAAQ,WACR,WACA,GAAG,WACuD;CAC1D,MAAM,EAAE,kBAAkB,0BAA0B;AAEpD,iBAAgB;AACd,gBAAc,KAAK;AACnB,eAAa,cAAc,MAAM;IAChC,CAAC,cAAc,CAAC;AAEnB,QACE,sBAAA,cAAC,YAAY,SAAb,EAAqB,SAAA,MAWC,EAVpB,sBAAA,cAAC,YAAD;EACS;EACP,MAAK;EACL,YAAW;EACX,OAAM;EACN,GAAI;EACJ,WAAW,GAAG,UAAU,YAAY,SAAS,WAAW,UAAU;EAGvD,EADX,sBAAA,cAAC,MAAD,EAAM,IAAI,OAAS,CAAA,CACR,CACO"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { Icon } from "../icon/Icon.js";
|
|
2
3
|
import { useSectionMessageContext } from "./SectionMessageContext.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import React, { useEffect } from "react";
|
|
5
5
|
import { Danger, Error, Info, OkCircle } from "@atom-learning/icons";
|
|
6
6
|
//#region src/components/section-message/SectionMessageIcon.tsx
|
|
@@ -21,7 +21,7 @@ var SectionMessageIcon = ({ className, is, ...rest }) => {
|
|
|
21
21
|
is: is || themeIcons[theme],
|
|
22
22
|
size: "sm",
|
|
23
23
|
...rest,
|
|
24
|
-
className:
|
|
24
|
+
className: cn("m-auto", "absolute", "left-4", "top-4", "text-current", className)
|
|
25
25
|
});
|
|
26
26
|
};
|
|
27
27
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageIcon.js","names":[],"sources":["../../../src/components/section-message/SectionMessageIcon.tsx"],"sourcesContent":["import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport
|
|
1
|
+
{"version":3,"file":"SectionMessageIcon.js","names":[],"sources":["../../../src/components/section-message/SectionMessageIcon.tsx"],"sourcesContent":["import { Danger, Error, Info, OkCircle } from '@atom-learning/icons'\nimport React, { useEffect } from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useSectionMessageContext } from './SectionMessageContext'\n\nconst themeIcons = {\n success: OkCircle,\n warning: Danger,\n error: Error,\n neutral: Info,\n info: Info\n}\n\ntype SectionMessageIconProps = Partial<React.ComponentProps<typeof Icon>>\n\nexport const SectionMessageIcon = ({\n className,\n is,\n ...rest\n}: SectionMessageIconProps): JSX.Element => {\n const { theme, setHasIcon } = useSectionMessageContext()\n\n useEffect(() => {\n setHasIcon(true)\n return () => setHasIcon(false)\n }, [setHasIcon])\n\n return (\n <Icon\n is={is || themeIcons[theme]}\n size=\"sm\"\n {...rest}\n className={cn(\n 'm-auto',\n 'absolute',\n 'left-4',\n 'top-4',\n 'text-current',\n className\n )}\n />\n )\n}\n"],"mappings":";;;;;;AAQA,IAAM,aAAa;CACjB,SAAS;CACT,SAAS;CACT,OAAO;CACP,SAAS;CACT,MAAM;CACP;AAID,IAAa,sBAAsB,EACjC,WACA,IACA,GAAG,WACuC;CAC1C,MAAM,EAAE,OAAO,eAAe,0BAA0B;AAExD,iBAAgB;AACd,aAAW,KAAK;AAChB,eAAa,WAAW,MAAM;IAC7B,CAAC,WAAW,CAAC;AAEhB,QACE,sBAAA,cAAC,MAAD;EACE,IAAI,MAAM,WAAW;EACrB,MAAK;EACL,GAAI;EACJ,WAAW,GACT,UACA,YACA,UACA,SACA,gBACA,UACD;EACD,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { styled } from "../../styled.js";
|
|
2
|
-
import clsx from "clsx";
|
|
1
|
+
import { cn, styled } from "../../styled.js";
|
|
3
2
|
import React from "react";
|
|
4
3
|
//#region src/components/section-message/SectionMessageLayout.tsx
|
|
5
4
|
var SectionMessageContent = styled("div", { base: [
|
|
@@ -8,7 +7,7 @@ var SectionMessageContent = styled("div", { base: [
|
|
|
8
7
|
"pt-0.5",
|
|
9
8
|
"*:not-last:mb-2"
|
|
10
9
|
] });
|
|
11
|
-
var SectionMessageActions = ({ className, ...rest }) => /* @__PURE__ */ React.createElement("div", { className:
|
|
10
|
+
var SectionMessageActions = ({ className, ...rest }) => /* @__PURE__ */ React.createElement("div", { className: cn("max-w-full", "shrink-0", className) }, /* @__PURE__ */ React.createElement("div", {
|
|
12
11
|
className: "flex flex-wrap gap-3",
|
|
13
12
|
...rest
|
|
14
13
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionMessageLayout.js","names":[],"sources":["../../../src/components/section-message/SectionMessageLayout.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SectionMessageLayout.js","names":[],"sources":["../../../src/components/section-message/SectionMessageLayout.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/styled'\nimport { cn } from '~/styled'\n\nexport const SectionMessageContent = styled('div', {\n base: ['max-w-full', 'shrink-0', 'pt-0.5', '*:not-last:mb-2']\n})\n\nexport const SectionMessageActions = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => (\n <div className={cn('max-w-full', 'shrink-0', className)}>\n <div className=\"flex flex-wrap gap-3\" {...rest} />\n </div>\n)\n"],"mappings":";;;AAKA,IAAa,wBAAwB,OAAO,OAAO,EACjD,MAAM;CAAC;CAAc;CAAY;CAAU;CAAkB,EAC9D,CAAC;AAEF,IAAa,yBAAyB,EACpC,WACA,GAAG,WAEH,sBAAA,cAAC,OAAD,EAAK,WAAW,GAAG,cAAc,YAAY,UAAU,EAEjD,EADJ,sBAAA,cAAC,OAAD;CAAK,WAAU;CAAuB,GAAI;CAAQ,CAAA,CAC9C"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { Badge } from "../badge/Badge.js";
|
|
2
3
|
import { SegmentedControlContext } from "./SegmentedControlContext.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
//#region src/components/segmented-control/SegmentedControlBadge.tsx
|
|
6
6
|
var badgeSizeMap = {
|
|
@@ -13,7 +13,7 @@ var SegmentedControlBadge = ({ className, ...props }) => {
|
|
|
13
13
|
return /* @__PURE__ */ React$1.createElement(Badge, {
|
|
14
14
|
...props,
|
|
15
15
|
size: badgeSizeMap[size],
|
|
16
|
-
className:
|
|
16
|
+
className: cn("border-none", className, "font-normal")
|
|
17
17
|
});
|
|
18
18
|
};
|
|
19
19
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlBadge.js","names":[],"sources":["../../../src/components/segmented-control/SegmentedControlBadge.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SegmentedControlBadge.js","names":[],"sources":["../../../src/components/segmented-control/SegmentedControlBadge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Badge } from '../badge/Badge'\nimport { SegmentedControlContext } from './SegmentedControlContext'\n\nconst badgeSizeMap = {\n sm: 'xs',\n md: 'xs',\n lg: 'sm'\n}\n\nexport const SegmentedControlBadge = ({\n className,\n ...props\n}: Omit<React.ComponentProps<typeof Badge>, 'size'>): JSX.Element => {\n const { size } = React.useContext(SegmentedControlContext)\n\n return (\n <Badge\n {...props}\n size={badgeSizeMap[size as string]}\n className={cn('border-none', className, 'font-normal')}\n />\n )\n}\n"],"mappings":";;;;;AAOA,IAAM,eAAe;CACnB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,IAAa,yBAAyB,EACpC,WACA,GAAG,YACgE;CACnE,MAAM,EAAE,SAAS,QAAM,WAAW,wBAAwB;AAE1D,QACE,wBAAA,cAAC,OAAD;EACE,GAAI;EACJ,MAAM,aAAa;EACnB,WAAW,GAAG,eAAe,WAAW,cAAc;EACtD,CAAA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { Theme, styled } from "../../styled.js";
|
|
1
|
+
import { Theme, cn, styled } from "../../styled.js";
|
|
2
2
|
import { SideBarContext } from "./SideBarContext.js";
|
|
3
3
|
import { SideBarBody, SideBarBrand, SideBarBrandLogo, SideBarBrandName, SideBarFooter, SideBarHeader } from "./SideBarComponents.js";
|
|
4
|
-
import clsx from "clsx";
|
|
5
4
|
import React from "react";
|
|
6
5
|
import { useFocusWithin, useHover, useInteractOutside } from "react-aria";
|
|
7
6
|
//#region src/components/side-bar/SideBar.tsx
|
|
@@ -91,7 +90,7 @@ var SideBar = ({ theme, className, children, type = "expandable", offset = "0px"
|
|
|
91
90
|
"--offset": offset
|
|
92
91
|
},
|
|
93
92
|
type,
|
|
94
|
-
className:
|
|
93
|
+
className: cn("h-[calc(100svh-var(--offset))]", "top-(--offset)", className)
|
|
95
94
|
}, /* @__PURE__ */ React.createElement(Content, {
|
|
96
95
|
...expandableProps,
|
|
97
96
|
isExpanded,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBar.js","names":[],"sources":["../../../src/components/side-bar/SideBar.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SideBar.js","names":[],"sources":["../../../src/components/side-bar/SideBar.tsx"],"sourcesContent":["import React from 'react'\nimport { useFocusWithin, useHover, useInteractOutside } from 'react-aria'\n\nimport { styled, Theme } from '~/styled'\nimport { cn } from '~/styled'\n\nimport {\n SideBarBody,\n SideBarBrand,\n SideBarBrandLogo,\n SideBarBrandName,\n SideBarFooter,\n SideBarHeader\n} from './SideBarComponents'\nimport { SideBarContext } from './SideBarContext'\n\nconst light = {\n '--background': 'white',\n '--text': 'var(--color-grey-800)',\n '--border': 'var(--color-grey-200)'\n}\n\nconst Root = styled('div', {\n base: ['sticky', 'z-1'],\n variants: {\n type: {\n static: [],\n expandable: ['w-22']\n }\n }\n})\n\nconst Content = styled('div', {\n base: [\n 'bg-(--background)',\n 'border-r',\n 'border-r-(--border)',\n 'shadow-[4px_0_4px_-2px_rgba(31,31,31,0)]',\n 'flex',\n 'flex-col',\n 'h-full',\n 'overflow-hidden',\n 'will-change-width',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[shadow,width]'\n ],\n variants: {\n type: {\n static: [],\n expandable: []\n },\n isExpanded: {\n true: ['w-[16rem]'],\n false: ['w-22']\n }\n },\n compoundVariants: [\n {\n isExpanded: true,\n type: 'expandable',\n class: ['shadow-[4px_0_4px_-2px_rgba(31,31,31,0.1)]']\n }\n ]\n})\n\nconst PointerBlocker = styled('div', {\n base: [\n 'bottom-0',\n 'left-0',\n 'absolute',\n 'right-0',\n 'top-0',\n 'transition-all'\n ],\n variants: {\n isVisible: {\n true: ['delay-0', 'visible'],\n false: ['delay-50', 'invisible']\n }\n }\n})\n\ntype SideBarProps = React.ComponentProps<typeof Root> & {\n className?: string\n offset?: number | string\n} & React.ComponentProps<typeof Theme>\n\nexport const SideBar = ({\n theme,\n className,\n children,\n type = 'expandable',\n offset = '0px',\n style,\n ...rest\n}: SideBarProps) => {\n const [isExpanded, setIsExpanded] = React.useState(type === 'static')\n const ref = React.useRef<HTMLDivElement>(null)\n\n useInteractOutside({\n ref,\n onInteractOutside: () => setIsExpanded(false)\n })\n const { focusWithinProps } = useFocusWithin({\n onFocusWithin: () => setIsExpanded(true),\n onBlurWithin: () => setIsExpanded(false)\n })\n const { hoverProps, isHovered } = useHover({\n onHoverStart: () => setIsExpanded(true),\n onHoverEnd: () => setIsExpanded(false)\n })\n const touchProps = {\n onTouchEnd: () => setIsExpanded(true)\n }\n\n const expandableProps =\n type === 'expandable'\n ? {\n ...focusWithinProps,\n ...hoverProps,\n ...touchProps,\n ref\n }\n : {}\n\n return (\n <SideBarContext.Provider value={{ isExpanded }}>\n <Theme theme={theme || light}>\n <Root\n {...rest}\n style={{ ...style, '--offset': offset }}\n type={type}\n className={cn(\n 'h-[calc(100svh-var(--offset))]',\n 'top-(--offset)',\n className\n )}\n >\n <Content {...expandableProps} isExpanded={isExpanded} type={type}>\n {children}\n {/**\n * When the SideBar is collapsed, ensure that the initial tap event\n * is used to expand the nav first before making the items available\n */}\n {type === 'expandable' && (\n <PointerBlocker isVisible={!isHovered && !isExpanded} />\n )}\n </Content>\n </Root>\n </Theme>\n </SideBarContext.Provider>\n )\n}\n\nSideBar.Brand = SideBarBrand\nSideBar.BrandLogo = SideBarBrandLogo\nSideBar.BrandName = SideBarBrandName\nSideBar.Header = SideBarHeader\nSideBar.Body = SideBarBody\nSideBar.Footer = SideBarFooter\n\nSideBar.displayName = 'SideBar'\n"],"mappings":";;;;;;AAgBA,IAAM,QAAQ;CACZ,gBAAgB;CAChB,UAAU;CACV,YAAY;CACb;AAED,IAAM,OAAO,OAAO,OAAO;CACzB,MAAM,CAAC,UAAU,MAAM;CACvB,UAAU,EACR,MAAM;EACJ,QAAQ,EAAE;EACV,YAAY,CAAC,OAAO;EACrB,EACF;CACF,CAAC;AAEF,IAAM,UAAU,OAAO,OAAO;CAC5B,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,QAAQ,EAAE;GACV,YAAY,EAAE;GACf;EACD,YAAY;GACV,MAAM,CAAC,YAAY;GACnB,OAAO,CAAC,OAAO;GAChB;EACF;CACD,kBAAkB,CAChB;EACE,YAAY;EACZ,MAAM;EACN,OAAO,CAAC,6CAA6C;EACtD,CACF;CACF,CAAC;AAEF,IAAM,iBAAiB,OAAO,OAAO;CACnC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,WAAW;EACT,MAAM,CAAC,WAAW,UAAU;EAC5B,OAAO,CAAC,YAAY,YAAY;EACjC,EACF;CACF,CAAC;AAOF,IAAa,WAAW,EACtB,OACA,WACA,UACA,OAAO,cACP,SAAS,OACT,OACA,GAAG,WACe;CAClB,MAAM,CAAC,YAAY,iBAAiB,MAAM,SAAS,SAAS,SAAS;CACrE,MAAM,MAAM,MAAM,OAAuB,KAAK;AAE9C,oBAAmB;EACjB;EACA,yBAAyB,cAAc,MAAM;EAC9C,CAAC;CACF,MAAM,EAAE,qBAAqB,eAAe;EAC1C,qBAAqB,cAAc,KAAK;EACxC,oBAAoB,cAAc,MAAM;EACzC,CAAC;CACF,MAAM,EAAE,YAAY,cAAc,SAAS;EACzC,oBAAoB,cAAc,KAAK;EACvC,kBAAkB,cAAc,MAAM;EACvC,CAAC;CACF,MAAM,aAAa,EACjB,kBAAkB,cAAc,KAAK,EACtC;CAED,MAAM,kBACJ,SAAS,eACL;EACE,GAAG;EACH,GAAG;EACH,GAAG;EACH;EACD,GACD,EAAE;AAER,QACE,sBAAA,cAAC,eAAe,UAAhB,EAAyB,OAAO,EAAE,YAAY,EAwBpB,EAvBxB,sBAAA,cAAC,OAAD,EAAO,OAAO,SAAS,OAsBf,EArBN,sBAAA,cAAC,MAAD;EACE,GAAI;EACJ,OAAO;GAAE,GAAG;GAAO,YAAY;GAAQ;EACjC;EACN,WAAW,GACT,kCACA,kBACA,UACD;EAYI,EAVL,sBAAA,cAAC,SAAD;EAAS,GAAI;EAA6B;EAAkB;EASlD,EARP,UAKA,SAAS,gBACR,sBAAA,cAAC,gBAAD,EAAgB,WAAW,CAAC,aAAa,CAAC,YAAc,CAAA,CAElD,CACL,CACD,CACgB;;AAI9B,QAAQ,QAAQ;AAChB,QAAQ,YAAY;AACpB,QAAQ,YAAY;AACpB,QAAQ,SAAS;AACjB,QAAQ,OAAO;AACf,QAAQ,SAAS;AAEjB,QAAQ,cAAc"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
3
|
import { Tile } from "../tile/Tile.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import React from "react";
|
|
5
5
|
//#region src/components/skeleton-loader/SkeletonBarChart.tsx
|
|
6
6
|
var getBarWidth = (rowIndex) => Math.round(40 + Math.abs(Math.sin(rowIndex + 1)) * 55);
|
|
7
7
|
var LegendItem = () => /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-3 w-3 rounded-full" }), /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-3 w-24 rounded-full" }));
|
|
8
|
-
var SkeletonBarChart = ({ numberOfLabels = 3, numberOfRows = 4, numberOfTicks = 4, className }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
8
|
+
var SkeletonBarChart = ({ numberOfLabels = 3, numberOfRows = 4, numberOfTicks = 4, className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("p-6", "flex-col", "gap-6", "w-full", className) }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, Array.from({ length: numberOfLabels }, (_, i) => /* @__PURE__ */ React.createElement(LegendItem, { key: i }))), /* @__PURE__ */ React.createElement("div", { className: "flex flex-col justify-between gap-4" }, Array.from({ length: numberOfRows }, (_, i) => /* @__PURE__ */ React.createElement("div", {
|
|
9
9
|
key: i,
|
|
10
10
|
className: "flex items-center gap-5"
|
|
11
11
|
}, /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-3 w-20 shrink-0 rounded-full" }), /* @__PURE__ */ React.createElement("div", { className: "grow" }, /* @__PURE__ */ React.createElement(SkeletonLoader, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonBarChart.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonBarChart.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonBarChart.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonBarChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarWidth = (rowIndex: number) =>\n Math.round(40 + Math.abs(Math.sin(rowIndex + 1)) * 55)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonBarChart = ({\n numberOfLabels = 3,\n numberOfRows = 4,\n numberOfTicks = 4,\n className\n}: {\n numberOfLabels?: number\n numberOfRows?: number\n numberOfTicks?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n <div className=\"flex flex-col justify-between gap-4\">\n {Array.from({ length: numberOfRows }, (_, i) => (\n <div key={i} className=\"flex items-center gap-5\">\n <SkeletonLoader className=\"h-3 w-20 shrink-0 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader\n className=\"h-5 w-(--width) rounded-full\"\n style={{\n '--width': `${getBarWidth(i)}%`\n }}\n />\n </div>\n </div>\n ))}\n <div className=\"flex justify-between pl-24\">\n {Array.from({ length: numberOfTicks }, (_, i) => (\n <SkeletonLoader key={i} className=\"h-2 w-8 rounded-full\" />\n ))}\n </div>\n </div>\n </Tile>\n)\n"],"mappings":";;;;;AAOA,IAAM,eAAe,aACnB,KAAK,MAAM,KAAK,KAAK,IAAI,KAAK,IAAI,WAAW,EAAE,CAAC,GAAG,GAAG;AAExD,IAAM,mBACJ,sBAAA,cAAC,OAAD,EAAK,WAAU,2BAGT,EAFJ,sBAAA,cAAC,gBAAD,EAAgB,WAAU,wBAAyB,CAAA,EACnD,sBAAA,cAAC,gBAAD,EAAgB,WAAU,yBAA0B,CAAA,CAChD;AAGR,IAAa,oBAAoB,EAC/B,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,gBAOA,sBAAA,cAAC,MAAD,EAAM,WAAW,GAAG,OAAO,YAAY,SAAS,UAAU,UAAU,EA0B7D,EAzBL,sBAAA,cAAC,OAAD,EAAK,WAAU,2BAIT,EAHH,MAAM,KAAK,EAAE,QAAQ,gBAAgB,GAAG,GAAG,MAC1C,sBAAA,cAAC,YAAD,EAAY,KAAK,GAAK,CAAA,CACtB,CACE,EACN,sBAAA,cAAC,OAAD,EAAK,WAAU,uCAmBT,EAlBH,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG,GAAG,MACxC,sBAAA,cAAC,OAAD;CAAK,KAAK;CAAG,WAAU;CAUjB,EATJ,sBAAA,cAAC,gBAAD,EAAgB,WAAU,kCAAmC,CAAA,EAC7D,sBAAA,cAAC,OAAD,EAAK,WAAU,QAOT,EANJ,sBAAA,cAAC,gBAAD;CACE,WAAU;CACV,OAAO,EACL,WAAW,GAAG,YAAY,EAAE,CAAC,IAC9B;CACD,CAAA,CACE,CACF,CACN,EACF,sBAAA,cAAC,OAAD,EAAK,WAAU,8BAIT,EAHH,MAAM,KAAK,EAAE,QAAQ,eAAe,GAAG,GAAG,MACzC,sBAAA,cAAC,gBAAD;CAAgB,KAAK;CAAG,WAAU;CAAyB,CAAA,CAC3D,CACE,CACF,CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
|
-
import clsx from "clsx";
|
|
3
3
|
import React from "react";
|
|
4
4
|
//#region src/components/skeleton-loader/SkeletonButton.tsx
|
|
5
|
-
var SkeletonButton = ({ className }) => /* @__PURE__ */ React.createElement(SkeletonLoader, { className:
|
|
5
|
+
var SkeletonButton = ({ className }) => /* @__PURE__ */ React.createElement(SkeletonLoader, { className: cn("w-[10rem]", "h-8", "rounded-sm", className) });
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SkeletonButton };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonButton.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonButton.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonButton.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonButton.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonButton = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => (\n <SkeletonLoader className={cn('w-[10rem]', 'h-8', 'rounded-sm', className)} />\n)\n"],"mappings":";;;;AAMA,IAAa,kBAAkB,EAC7B,gBAIA,sBAAA,cAAC,gBAAD,EAAgB,WAAW,GAAG,aAAa,OAAO,cAAc,UAAU,EAAI,CAAA"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
3
|
import { SkeletonButton } from "./SkeletonButton.js";
|
|
3
4
|
import { Tile } from "../tile/Tile.js";
|
|
4
5
|
import { SkeletonDoughnutChart } from "./SkeletonDoughnutChart.js";
|
|
5
|
-
import clsx from "clsx";
|
|
6
6
|
import React from "react";
|
|
7
7
|
//#region src/components/skeleton-loader/SkeletonCard.tsx
|
|
8
|
-
var SkeletonCard = ({ numberOfRows = 3, withChart, className }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
8
|
+
var SkeletonCard = ({ numberOfRows = 3, withChart, className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("relative", "w-full", "flex-col", "items-center", "gap-6 p-6", className) }, /* @__PURE__ */ React.createElement("div", { className: "align-center flex w-full gap-6" }, withChart && /* @__PURE__ */ React.createElement(SkeletonDoughnutChart, null), /* @__PURE__ */ React.createElement("div", { className: "flex grow flex-col gap-6" }, Array.from({ length: numberOfRows }, (_, index) => index).map((rowNumber) => /* @__PURE__ */ React.createElement(SkeletonLoader, {
|
|
9
9
|
key: rowNumber,
|
|
10
10
|
className: "bg-grey-200 h-10 w-full min-w-25 rounded-md"
|
|
11
11
|
})))), /* @__PURE__ */ React.createElement(SkeletonButton, null));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonCard.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonCard.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonCard.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonCard.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6 p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n"],"mappings":";;;;;;;AAUA,IAAa,gBAAgB,EAC3B,eAAe,GACf,WACA,gBAMA,sBAAA,cAAC,MAAD,EACE,WAAW,GACT,YACA,UACA,YACA,gBACA,aACA,UACD,EAgBI,EAdL,sBAAA,cAAC,OAAD,EAAK,WAAU,kCAYT,EAXH,aAAa,sBAAA,cAAC,uBAAA,KAAwB,EACvC,sBAAA,cAAC,OAAD,EAAK,WAAU,4BAST,EARH,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG,GAAG,UAAU,MAAM,CAAC,KACxD,cACC,sBAAA,cAAC,gBAAD;CACE,KAAK;CACL,WAAU;CACV,CAAA,CAEL,CACG,CACF,EACN,sBAAA,cAAC,gBAAA,KAAiB,CACb"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
3
|
import { Tile } from "../tile/Tile.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import React from "react";
|
|
5
5
|
//#region src/components/skeleton-loader/SkeletonColumnChart.tsx
|
|
6
6
|
var getBarHeight = (groupIndex, columnIndex) => Math.round(90 + Math.abs(Math.sin(groupIndex + columnIndex + 1)) * 30);
|
|
@@ -10,7 +10,7 @@ var ColumnGroup = ({ numberOfColumns, groupIndex }) => /* @__PURE__ */ React.cre
|
|
|
10
10
|
style: { "--height": `${getBarHeight(groupIndex, i)}px` }
|
|
11
11
|
}))), /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-2 w-14 rounded-full" }));
|
|
12
12
|
var LegendItem = () => /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-2" }, /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-3 w-3 rounded-full" }), /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-3 w-24 rounded-full" }));
|
|
13
|
-
var SkeletonColumnChart = ({ numberOfLabels = 2, numberOfGroups = 7, numberOfColumns = 1, className }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
13
|
+
var SkeletonColumnChart = ({ numberOfLabels = 2, numberOfGroups = 7, numberOfColumns = 1, className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("p-6", "flex-col", "gap-6", "w-full", className) }, /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-3" }, /* @__PURE__ */ React.createElement("div", { className: "flex items-center gap-4" }, Array.from({ length: numberOfLabels }, (_, i) => /* @__PURE__ */ React.createElement(LegendItem, { key: i })))), /* @__PURE__ */ React.createElement("div", { className: "flex items-end justify-between gap-2" }, Array.from({ length: numberOfGroups }, (_, i) => /* @__PURE__ */ React.createElement(ColumnGroup, {
|
|
14
14
|
key: i,
|
|
15
15
|
numberOfColumns,
|
|
16
16
|
groupIndex: i
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonColumnChart.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonColumnChart.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonColumnChart.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonColumnChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nconst getBarHeight = (groupIndex: number, columnIndex: number) =>\n Math.round(90 + Math.abs(Math.sin(groupIndex + columnIndex + 1)) * 30)\n\nconst ColumnGroup = ({\n numberOfColumns,\n groupIndex\n}: {\n numberOfColumns: number\n groupIndex: number\n}) => (\n <div className=\"flex flex-col items-center gap-4\">\n <div className=\"flex items-end gap-2\">\n {Array.from({ length: numberOfColumns }, (_, i) => (\n <SkeletonLoader\n key={i}\n className=\"h-(--height) w-5 rounded-t-full rounded-b-none\"\n style={{\n '--height': `${getBarHeight(groupIndex, i)}px`\n }}\n />\n ))}\n </div>\n <SkeletonLoader className=\"h-2 w-14 rounded-full\" />\n </div>\n)\n\nconst LegendItem = () => (\n <div className=\"flex items-center gap-2\">\n <SkeletonLoader className=\"h-3 w-3 rounded-full\" />\n <SkeletonLoader className=\"h-3 w-24 rounded-full\" />\n </div>\n)\n\nexport const SkeletonColumnChart = ({\n numberOfLabels = 2,\n numberOfGroups = 7,\n numberOfColumns = 1,\n className\n}: {\n numberOfLabels?: number\n numberOfGroups?: number\n numberOfColumns?: number\n className?: string\n}) => (\n <Tile className={cn('p-6', 'flex-col', 'gap-6', 'w-full', className)}>\n <div className=\"flex flex-col gap-3\">\n <div className=\"flex items-center gap-4\">\n {Array.from({ length: numberOfLabels }, (_, i) => (\n <LegendItem key={i} />\n ))}\n </div>\n </div>\n <div className=\"flex items-end justify-between gap-2\">\n {Array.from({ length: numberOfGroups }, (_, i) => (\n <ColumnGroup key={i} numberOfColumns={numberOfColumns} groupIndex={i} />\n ))}\n </div>\n </Tile>\n)\n"],"mappings":";;;;;AAOA,IAAM,gBAAgB,YAAoB,gBACxC,KAAK,MAAM,KAAK,KAAK,IAAI,KAAK,IAAI,aAAa,cAAc,EAAE,CAAC,GAAG,GAAG;AAExE,IAAM,eAAe,EACnB,iBACA,iBAKA,sBAAA,cAAC,OAAD,EAAK,WAAU,oCAaT,EAZJ,sBAAA,cAAC,OAAD,EAAK,WAAU,wBAUT,EATH,MAAM,KAAK,EAAE,QAAQ,iBAAiB,GAAG,GAAG,MAC3C,sBAAA,cAAC,gBAAD;CACE,KAAK;CACL,WAAU;CACV,OAAO,EACL,YAAY,GAAG,aAAa,YAAY,EAAE,CAAC,KAC5C;CACD,CAAA,CACF,CACE,EACN,sBAAA,cAAC,gBAAD,EAAgB,WAAU,yBAA0B,CAAA,CAChD;AAGR,IAAM,mBACJ,sBAAA,cAAC,OAAD,EAAK,WAAU,2BAGT,EAFJ,sBAAA,cAAC,gBAAD,EAAgB,WAAU,wBAAyB,CAAA,EACnD,sBAAA,cAAC,gBAAD,EAAgB,WAAU,yBAA0B,CAAA,CAChD;AAGR,IAAa,uBAAuB,EAClC,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,gBAOA,sBAAA,cAAC,MAAD,EAAM,WAAW,GAAG,OAAO,YAAY,SAAS,UAAU,UAAU,EAa7D,EAZL,sBAAA,cAAC,OAAD,EAAK,WAAU,uBAMT,EALJ,sBAAA,cAAC,OAAD,EAAK,WAAU,2BAIT,EAHH,MAAM,KAAK,EAAE,QAAQ,gBAAgB,GAAG,GAAG,MAC1C,sBAAA,cAAC,YAAD,EAAY,KAAK,GAAK,CAAA,CACtB,CACE,CACF,EACN,sBAAA,cAAC,OAAD,EAAK,WAAU,wCAIT,EAHH,MAAM,KAAK,EAAE,QAAQ,gBAAgB,GAAG,GAAG,MAC1C,sBAAA,cAAC,aAAD;CAAa,KAAK;CAAoB;CAAiB,YAAY;CAAK,CAAA,CACxE,CACE,CACD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { Tile } from "../tile/Tile.js";
|
|
2
|
-
import clsx from "clsx";
|
|
3
3
|
import React from "react";
|
|
4
4
|
//#region src/components/skeleton-loader/SkeletonDoughnutChart.tsx
|
|
5
5
|
var buildConicGradient = () => {
|
|
@@ -16,7 +16,7 @@ var buildConicGradient = () => {
|
|
|
16
16
|
});
|
|
17
17
|
return `conic-gradient(${stops.join(", ")})`;
|
|
18
18
|
};
|
|
19
|
-
var SkeletonDoughnutChart = ({ className }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
19
|
+
var SkeletonDoughnutChart = ({ className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("p-6", "size-60", className) }, /* @__PURE__ */ React.createElement("div", {
|
|
20
20
|
className: "animate-shimmer aspect-square w-full rounded-full [background-image:var(--gradient)] bg-clip-padding",
|
|
21
21
|
style: { "--gradient": buildConicGradient() }
|
|
22
22
|
}, /* @__PURE__ */ React.createElement("div", { className: "mt-[20%] ml-[20%] size-[60%] rounded-full bg-white" })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonDoughnutChart.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonDoughnutChart.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonDoughnutChart.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonDoughnutChart.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\n\nconst buildConicGradient = () => {\n const numberOfSegments = 5\n const gap = 4\n const segmentAngle = (360 - numberOfSegments * gap) / numberOfSegments\n const stops: string[] = []\n let current = 0\n\n Array.from({ length: numberOfSegments }).forEach(() => {\n stops.push(\n `var(--color-grey-300) ${current}deg ${current + segmentAngle}deg`\n )\n current += segmentAngle\n stops.push(`white ${current}deg ${current + gap}deg`)\n current += gap\n })\n\n return `conic-gradient(${stops.join(', ')})`\n}\n\nexport const SkeletonDoughnutChart = ({\n className\n}: {\n className?: string\n}) => (\n <Tile className={cn('p-6', 'size-60', className)}>\n <div\n className=\"animate-shimmer aspect-square w-full rounded-full [background-image:var(--gradient)] bg-clip-padding\"\n style={{ '--gradient': buildConicGradient() }}\n >\n <div className=\"mt-[20%] ml-[20%] size-[60%] rounded-full bg-white\" />\n </div>\n </Tile>\n)\n"],"mappings":";;;;AAMA,IAAM,2BAA2B;CAC/B,MAAM,mBAAmB;CACzB,MAAM,MAAM;CACZ,MAAM,gBAAgB,MAAM,mBAAmB,OAAO;CACtD,MAAM,QAAkB,EAAE;CAC1B,IAAI,UAAU;AAEd,OAAM,KAAK,EAAE,QAAQ,kBAAkB,CAAC,CAAC,cAAc;AACrD,QAAM,KACJ,yBAAyB,QAAQ,MAAM,UAAU,aAAa,KAC/D;AACD,aAAW;AACX,QAAM,KAAK,SAAS,QAAQ,MAAM,UAAU,IAAI,KAAK;AACrD,aAAW;GACX;AAEF,QAAO,kBAAkB,MAAM,KAAK,KAAK,CAAC;;AAG5C,IAAa,yBAAyB,EACpC,gBAIA,sBAAA,cAAC,MAAD,EAAM,WAAW,GAAG,OAAO,WAAW,UAAU,EAOzC,EANL,sBAAA,cAAC,OAAD;CACE,WAAU;CACV,OAAO,EAAE,cAAc,oBAAoB,EAAE;CAGzC,EADJ,sBAAA,cAAC,OAAD,EAAK,WAAU,sDAAuD,CAAA,CAClE,CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
|
-
import clsx from "clsx";
|
|
3
3
|
import React from "react";
|
|
4
4
|
//#region src/components/skeleton-loader/SkeletonHeading.tsx
|
|
5
|
-
var SkeletonHeading = ({ className }) => /* @__PURE__ */ React.createElement(SkeletonLoader, { className:
|
|
5
|
+
var SkeletonHeading = ({ className }) => /* @__PURE__ */ React.createElement(SkeletonLoader, { className: cn("w-64", "h-6", "rounded-xl", className) });
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SkeletonHeading };
|
|
8
8
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonHeading.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonHeading.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonHeading.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonHeading.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonHeading = ({\n className\n}: {\n className?: React.ComponentProps<typeof SkeletonLoader>['className']\n}) => <SkeletonLoader className={cn('w-64', 'h-6', 'rounded-xl', className)} />\n"],"mappings":";;;;AAMA,IAAa,mBAAmB,EAC9B,gBAGI,sBAAA,cAAC,gBAAD,EAAgB,WAAW,GAAG,QAAQ,OAAO,cAAc,UAAU,EAAI,CAAA"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
3
|
import { Tile } from "../tile/Tile.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import React from "react";
|
|
5
5
|
//#region src/components/skeleton-loader/SkeletonPanelList.tsx
|
|
6
|
-
var SkeletonPanelList = ({ className }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
6
|
+
var SkeletonPanelList = ({ className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("px-6", "flex-col", "w-full", className) }, /* @__PURE__ */ React.createElement("div", { className: "border-grey-100 flex flex-wrap items-center gap-4 border-b py-4 last:border-b-0" }, /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "size-10 rounded-full" }), /* @__PURE__ */ React.createElement("div", { className: "grow" }, /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-4 w-2/3 rounded-full" })), /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-8 w-28 rounded-md" })));
|
|
7
7
|
//#endregion
|
|
8
8
|
export { SkeletonPanelList };
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonPanelList.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonPanelList.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonPanelList.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonPanelList.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonPanelList = ({ className }: { className?: string }) => (\n <Tile className={cn('px-6', 'flex-col', 'w-full', className)}>\n <div className=\"border-grey-100 flex flex-wrap items-center gap-4 border-b py-4 last:border-b-0\">\n <SkeletonLoader className=\"size-10 rounded-full\" />\n <div className=\"grow\">\n <SkeletonLoader className=\"h-4 w-2/3 rounded-full\" />\n </div>\n <SkeletonLoader className=\"h-8 w-28 rounded-md\" />\n </div>\n </Tile>\n)\n"],"mappings":";;;;;AAOA,IAAa,qBAAqB,EAAE,gBAClC,sBAAA,cAAC,MAAD,EAAM,WAAW,GAAG,QAAQ,YAAY,UAAU,UAAU,EAQrD,EAPL,sBAAA,cAAC,OAAD,EAAK,WAAU,mFAMT,EALJ,sBAAA,cAAC,gBAAD,EAAgB,WAAU,wBAAyB,CAAA,EACnD,sBAAA,cAAC,OAAD,EAAK,WAAU,QAET,EADJ,sBAAA,cAAC,gBAAD,EAAgB,WAAU,0BAA2B,CAAA,CACjD,EACN,sBAAA,cAAC,gBAAD,EAAgB,WAAU,uBAAwB,CAAA,CAC9C,CACD"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
3
|
import { Tile } from "../tile/Tile.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import React from "react";
|
|
5
5
|
//#region src/components/skeleton-loader/SkeletonSubjectList.tsx
|
|
6
|
-
var SkeletonSubjectList = ({ className }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
6
|
+
var SkeletonSubjectList = ({ className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("p-2", "flex-row", "flex-wrap", "items-center", "justify-between", "gap-4", "w-full", className) }, /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "h-22 max-w-xl grow rounded-xl" }), /* @__PURE__ */ React.createElement(SkeletonLoader, { className: "size-10 shrink-0 rounded-md" }));
|
|
7
7
|
//#endregion
|
|
8
8
|
export { SkeletonSubjectList };
|
|
9
9
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonSubjectList.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonSubjectList.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonSubjectList.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonSubjectList.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonSubjectList = ({ className }: { className?: string }) => (\n <Tile\n className={cn(\n 'p-2',\n 'flex-row',\n 'flex-wrap',\n 'items-center',\n 'justify-between',\n 'gap-4',\n 'w-full',\n className\n )}\n >\n <SkeletonLoader className=\"h-22 max-w-xl grow rounded-xl\" />\n <SkeletonLoader className=\"size-10 shrink-0 rounded-md\" />\n </Tile>\n)\n"],"mappings":";;;;;AAOA,IAAa,uBAAuB,EAAE,gBACpC,sBAAA,cAAC,MAAD,EACE,WAAW,GACT,OACA,YACA,aACA,gBACA,mBACA,SACA,UACA,UACD,EAII,EAFL,sBAAA,cAAC,gBAAD,EAAgB,WAAU,iCAAkC,CAAA,EAC5D,sBAAA,cAAC,gBAAD,EAAgB,WAAU,+BAAgC,CAAA,CACrD"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { Table } from "../table/Table.js";
|
|
2
3
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
3
4
|
import { Tile } from "../tile/Tile.js";
|
|
4
|
-
import clsx from "clsx";
|
|
5
5
|
import React from "react";
|
|
6
6
|
//#region src/components/skeleton-loader/SkeletonTable.tsx
|
|
7
7
|
var SkeletonTable = ({ numberOfColumns = 4, numberOfRows = 4, columnWidth, className }) => {
|
|
8
|
-
return /* @__PURE__ */ React.createElement(Tile, { className:
|
|
8
|
+
return /* @__PURE__ */ React.createElement(Tile, { className: cn("p-6", "flex-row", "gap-4", "relative", className) }, /* @__PURE__ */ React.createElement(Table, { size: "md" }, /* @__PURE__ */ React.createElement(Table.Header, { theme: "white" }, Array.from({ length: numberOfColumns }, (_, index) => index).map((columnIndex) => /* @__PURE__ */ React.createElement(Table.HeaderCell, { key: columnIndex }, /* @__PURE__ */ React.createElement(SkeletonLoader, {
|
|
9
9
|
style: { "--width": columnWidth?.[columnIndex] || "100px" },
|
|
10
10
|
className: "h-4 w-(--width) rounded-xl"
|
|
11
11
|
})))), /* @__PURE__ */ React.createElement(Table.Body, { striped: false }, Array.from({ length: numberOfRows }, (_, index) => index).map((rowIndex) => /* @__PURE__ */ React.createElement(Table.Row, { key: rowIndex }, Array.from({ length: numberOfColumns }, (_, index) => index).map((columnIndex) => /* @__PURE__ */ React.createElement(Table.Cell, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonTable.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonTable.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonTable.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonTable.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Table } from '../table/Table'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTable = ({\n numberOfColumns = 4,\n numberOfRows = 4,\n columnWidth,\n className\n}: {\n numberOfColumns?: number\n numberOfRows?: number\n columnWidth?: Record<number, string>\n className?: string\n}) => {\n return (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', 'relative', className)}>\n <Table size=\"md\">\n <Table.Header theme=\"white\">\n {Array.from({ length: numberOfColumns }, (_, index) => index).map(\n (columnIndex) => (\n <Table.HeaderCell key={columnIndex}>\n <SkeletonLoader\n style={{ '--width': columnWidth?.[columnIndex] || '100px' }}\n className=\"h-4 w-(--width) rounded-xl\"\n />\n </Table.HeaderCell>\n )\n )}\n </Table.Header>\n <Table.Body striped={false}>\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowIndex) => (\n <Table.Row key={rowIndex}>\n {Array.from(\n { length: numberOfColumns },\n (_, index) => index\n ).map((columnIndex) => (\n <Table.Cell key={columnIndex} className=\"border-none\">\n <SkeletonLoader\n style={{\n '--width': columnWidth?.[columnIndex] || '100px'\n }}\n className=\"bg-grey-200 h-4 w-(--width) rounded-xl\"\n />\n </Table.Cell>\n ))}\n </Table.Row>\n )\n )}\n </Table.Body>\n </Table>\n </Tile>\n )\n}\n"],"mappings":";;;;;;AAQA,IAAa,iBAAiB,EAC5B,kBAAkB,GAClB,eAAe,GACf,aACA,gBAMI;AACJ,QACE,sBAAA,cAAC,MAAD,EAAM,WAAW,GAAG,OAAO,YAAY,SAAS,YAAY,UAAU,EAoC/D,EAnCL,sBAAA,cAAC,OAAD,EAAO,MAAK,MAkCJ,EAjCN,sBAAA,cAAC,MAAM,QAAP,EAAc,OAAM,SAWL,EAVZ,MAAM,KAAK,EAAE,QAAQ,iBAAiB,GAAG,GAAG,UAAU,MAAM,CAAC,KAC3D,gBACC,sBAAA,cAAC,MAAM,YAAP,EAAkB,KAAK,aAKJ,EAJjB,sBAAA,cAAC,gBAAD;EACE,OAAO,EAAE,WAAW,cAAc,gBAAgB,SAAS;EAC3D,WAAU;EACV,CAAA,CACe,CAEtB,CACY,EACf,sBAAA,cAAC,MAAM,MAAP,EAAY,SAAS,OAoBR,EAnBV,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG,GAAG,UAAU,MAAM,CAAC,KACxD,aACC,sBAAA,cAAC,MAAM,KAAP,EAAW,KAAK,UAcJ,EAbT,MAAM,KACL,EAAE,QAAQ,iBAAiB,GAC1B,GAAG,UAAU,MACf,CAAC,KAAK,gBACL,sBAAA,cAAC,MAAM,MAAP;EAAY,KAAK;EAAa,WAAU;EAO3B,EANX,sBAAA,cAAC,gBAAD;EACE,OAAO,EACL,WAAW,cAAc,gBAAgB,SAC1C;EACD,WAAU;EACV,CAAA,CACS,CACb,CACQ,CAEf,CACU,CACP,CACH"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
1
2
|
import { SkeletonLoader } from "./Skeleton.js";
|
|
2
3
|
import { Tile } from "../tile/Tile.js";
|
|
3
|
-
import clsx from "clsx";
|
|
4
4
|
import React from "react";
|
|
5
5
|
//#region src/components/skeleton-loader/SkeletonTabs.tsx
|
|
6
|
-
var SkeletonTabs = ({ numberOfTabs, className, tabClassName }) => /* @__PURE__ */ React.createElement(Tile, { className:
|
|
6
|
+
var SkeletonTabs = ({ numberOfTabs, className, tabClassName }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("p-6", "flex-row", "gap-4", className) }, Array.from({ length: numberOfTabs }, (_, index) => `tab_${index}`).map((key) => /* @__PURE__ */ React.createElement(SkeletonLoader, {
|
|
7
7
|
key,
|
|
8
|
-
className:
|
|
8
|
+
className: cn("w-32", "h-6", "rounded-sm", tabClassName)
|
|
9
9
|
})));
|
|
10
10
|
//#endregion
|
|
11
11
|
export { SkeletonTabs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SkeletonTabs.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonTabs.tsx"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"SkeletonTabs.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonTabs.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\n\nexport const SkeletonTabs = ({\n numberOfTabs,\n className,\n tabClassName\n}: {\n numberOfTabs: number\n className?: string\n tabClassName?: string\n}) => (\n <Tile className={cn('p-6', 'flex-row', 'gap-4', className)}>\n {Array.from({ length: numberOfTabs }, (_, index) => `tab_${index}`).map(\n (key) => (\n <SkeletonLoader\n key={key}\n className={cn('w-32', 'h-6', 'rounded-sm', tabClassName)}\n />\n )\n )}\n </Tile>\n)\n"],"mappings":";;;;;AAOA,IAAa,gBAAgB,EAC3B,cACA,WACA,mBAMA,sBAAA,cAAC,MAAD,EAAM,WAAW,GAAG,OAAO,YAAY,SAAS,UAAU,EASnD,EARJ,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG,GAAG,UAAU,OAAO,QAAQ,CAAC,KACjE,QACC,sBAAA,cAAC,gBAAD;CACO;CACL,WAAW,GAAG,QAAQ,OAAO,cAAc,aAAa;CACxD,CAAA,CAEL,CACI"}
|
|
@@ -9,9 +9,10 @@ export declare const StyledHandle: React.ForwardRefExoticComponent<Omit<Omit<Omi
|
|
|
9
9
|
isRounded?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
|
|
10
10
|
} & {
|
|
11
11
|
as?: React.ElementType;
|
|
12
|
-
}, "children" | "label" | "hasTooltip" | "tooltipSide" | keyof import("../..").NavigatorActions> & {
|
|
12
|
+
}, "children" | "label" | "hasTooltip" | "tooltipSide" | "reloadDocument" | keyof import("../..").NavigatorActions> & {
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
label: string;
|
|
15
|
+
reloadDocument?: boolean;
|
|
15
16
|
} & Omit<import("../..").TOptionalTooltipWrapperProps, "label"> & import("../..").NavigatorActions, "ref"> & React.RefAttributes<HTMLButtonElement>, "isDragging"> & {
|
|
16
17
|
isDragging?: boolean | undefined;
|
|
17
18
|
} & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { cn } from "../../styled.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { useSortable } from "@dnd-kit/sortable";
|
|
@@ -19,7 +19,7 @@ var SortableItem = ({ id, asChild = false, className, style, isDragHandle = fals
|
|
|
19
19
|
...isDragHandle && !disabled ? listeners : {},
|
|
20
20
|
...isDragHandle && !disabled ? attributes : {},
|
|
21
21
|
...rest,
|
|
22
|
-
className:
|
|
22
|
+
className: cn("translate-x-[calc(var(--translate-x)*1px)]", "translate-y-[calc(var(--translate-y)*1px)]", "scale-(--scale)", isDragging && "z-5", "disabled:**:pointer-events-none", "disabled:cursor-not-allowed", "disabled:opacity-30", isDragHandle && (isDragging ? "cursor-grabbing" : "cursor-grab"), className)
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
SortableItem.displayName = "SortableItem";
|