@atom-learning/components 2.54.3 → 2.56.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/dist/components/badge/Badge.d.ts +1 -1
  3. package/dist/components/badge/Badge.js +1 -1
  4. package/dist/components/badge/Badge.js.map +1 -1
  5. package/dist/components/index.d.ts +1 -0
  6. package/dist/components/pagination/Pagination.d.ts +3 -0
  7. package/dist/components/pagination/Pagination.js +2 -0
  8. package/dist/components/pagination/Pagination.js.map +1 -0
  9. package/dist/components/pagination/PaginationItem.d.ts +3 -0
  10. package/dist/components/pagination/PaginationItem.js +2 -0
  11. package/dist/components/pagination/PaginationItem.js.map +1 -0
  12. package/dist/components/pagination/PaginationNextButton.d.ts +470 -0
  13. package/dist/components/pagination/PaginationNextButton.js +2 -0
  14. package/dist/components/pagination/PaginationNextButton.js.map +1 -0
  15. package/dist/components/pagination/PaginationPages.d.ts +2 -0
  16. package/dist/components/pagination/PaginationPages.js +2 -0
  17. package/dist/components/pagination/PaginationPages.js.map +1 -0
  18. package/dist/components/pagination/PaginationPopover.d.ts +2 -0
  19. package/dist/components/pagination/PaginationPopover.js +2 -0
  20. package/dist/components/pagination/PaginationPopover.js.map +1 -0
  21. package/dist/components/pagination/PaginationPreviousButton.d.ts +470 -0
  22. package/dist/components/pagination/PaginationPreviousButton.js +2 -0
  23. package/dist/components/pagination/PaginationPreviousButton.js.map +1 -0
  24. package/dist/components/pagination/index.d.ts +1 -0
  25. package/dist/components/pagination/pagination-context/PaginationContext.d.ts +4 -0
  26. package/dist/components/pagination/pagination-context/PaginationContext.js +2 -0
  27. package/dist/components/pagination/pagination-context/PaginationContext.js.map +1 -0
  28. package/dist/components/pagination/pagination.constants.d.ts +5 -0
  29. package/dist/components/pagination/pagination.constants.js +2 -0
  30. package/dist/components/pagination/pagination.constants.js.map +1 -0
  31. package/dist/components/pagination/pagination.helper.d.ts +3 -0
  32. package/dist/components/pagination/pagination.helper.js +2 -0
  33. package/dist/components/pagination/pagination.helper.js.map +1 -0
  34. package/dist/components/pagination/types.d.ts +42 -0
  35. package/dist/components/pagination/usePagination.d.ts +2 -0
  36. package/dist/components/pagination/usePagination.js +2 -0
  37. package/dist/components/pagination/usePagination.js.map +1 -0
  38. package/dist/docgen.json +1 -1
  39. package/dist/index.cjs.js +1 -1
  40. package/dist/index.cjs.js.map +1 -1
  41. package/dist/index.js +1 -1
  42. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,9 +1,22 @@
1
- ## [2.54.3](https://github.com/Atom-Learning/components/compare/v2.54.2...v2.54.3) (2023-05-10)
1
+ # [2.56.0](https://github.com/Atom-Learning/components/compare/v2.55.0...v2.56.0) (2023-05-25)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * **actionicon:** allow overriding the button type ([8a955e7](https://github.com/Atom-Learning/components/commit/8a955e703a333016850c94299bfe046eada96e02))
6
+ * update tests ([33541b4](https://github.com/Atom-Learning/components/commit/33541b449721bedd813246e06633035818440833))
7
+
8
+
9
+ ### Features
10
+
11
+ * add components to display aspect ratio tokens ([54e3d78](https://github.com/Atom-Learning/components/commit/54e3d78694c32802cef442ba8de9fe404db4de22))
12
+ * add navigation buttons for pagination ([f980396](https://github.com/Atom-Learning/components/commit/f9803965c5f446ec57bdb7b4f6bffc273ee9016e))
13
+ * add Pagination Component ([afd0691](https://github.com/Atom-Learning/components/commit/afd06914c158e1fec570d466e62ea9f711323e84))
14
+ * add pagination context provider ([e931538](https://github.com/Atom-Learning/components/commit/e931538fa16079a8f8337da3f2d96817d1a40c51))
15
+ * add pagination page button ([e0db0c6](https://github.com/Atom-Learning/components/commit/e0db0c638fe8b37c4a8baef51b6964966b598167))
16
+ * add pagination pages component ([1b35c5f](https://github.com/Atom-Learning/components/commit/1b35c5f7475be3a274bc2cf83bac4a2925dd2043))
17
+ * add pagination popover component ([96dc9b2](https://github.com/Atom-Learning/components/commit/96dc9b23631087934bfbf6b511a2038f2d2423a8))
18
+ * allow component to be controlled or uncontrolled ([9233b90](https://github.com/Atom-Learning/components/commit/9233b909a46b090e83fd93d52116a05861244284))
19
+ * implement Pagination component ([9edfb1f](https://github.com/Atom-Learning/components/commit/9edfb1f8d6d13a5b283adc88fa7111a1165e9b98))
7
20
 
8
21
  # [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
9
22
 
@@ -219,7 +219,7 @@ declare const StyledBadge: import("@stitches/react/types/styled-component").Styl
219
219
  marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
220
220
  };
221
221
  }>>, {
222
- theme?: "success" | "danger" | "warning" | "neutral" | "info" | undefined;
222
+ theme?: "success" | "danger" | "warning" | "purple" | "neutral" | "info" | undefined;
223
223
  size?: "sm" | "md" | "xs" | undefined;
224
224
  }, {
225
225
  sm: string;
@@ -1,2 +1,2 @@
1
- import*as t from"react";import{styled as m}from"../../stitches.js";import{Box as l}from"../box/Box.js";import{Flex as a}from"../flex/Flex.js";import{Icon as c}from"../icon/Icon.js";const d=m(a,{justifyContent:"center",alignItems:"center",borderRadius:"$0",minWidth:0,border:"1px solid #FFFFFF",fontFamily:"$body","& > *:not(:last-child)":{mr:"$1"},variants:{theme:{success:{bg:"$successLight",color:"$successMid"},warning:{bg:"$warningLight",color:"$warningText"},danger:{bg:"$dangerLight",color:"$dangerMid"},neutral:{bg:"$tonal50",color:"$tonal400"},info:{bg:"$primaryLight",color:"$primaryMid"}},size:{xs:{fontSize:"$sm",px:"$1",height:"$2"},sm:{fontSize:"$md",px:"$1",height:"$3"},md:{fontSize:"$md",px:"$2",height:"$4"}}}}),i=({theme:r="info",size:o="sm",children:n,...s})=>t.createElement(d,{role:"status",theme:r,size:o,...s},t.Children.map(n,e=>{if(typeof e=="string"||typeof e=="number")return t.createElement(l,{css:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis",py:"$0"}},e);if(t.isValidElement(e)&&e.type===c)return t.cloneElement(e,{size:"sm",css:{...e.props.css,flexShrink:0}})}));i.displayName="Badge";export{i as Badge};
1
+ import*as r from"react";import{styled as l}from"../../stitches.js";import{Box as m}from"../box/Box.js";import{Flex as a}from"../flex/Flex.js";import{Icon as p}from"../icon/Icon.js";const c=l(a,{justifyContent:"center",alignItems:"center",borderRadius:"$0",minWidth:0,border:"1px solid #FFFFFF",fontFamily:"$body","& > *:not(:last-child)":{mr:"$1"},variants:{theme:{success:{bg:"$successLight",color:"$successMid"},warning:{bg:"$warningLight",color:"$warningText"},danger:{bg:"$dangerLight",color:"$dangerMid"},neutral:{bg:"$tonal50",color:"$tonal400"},info:{bg:"$primaryLight",color:"$primaryMid"},purple:{bg:"$purple200",color:"$purple1000"}},size:{xs:{fontSize:"$sm",px:"$1",height:"$2"},sm:{fontSize:"$md",px:"$1",height:"$3"},md:{fontSize:"$md",px:"$2",height:"$4"}}}}),t=({theme:i="info",size:o="sm",children:n,...s})=>r.createElement(c,{role:"status",theme:i,size:o,...s},r.Children.map(n,e=>{if(typeof e=="string"||typeof e=="number")return r.createElement(m,{css:{whiteSpace:"nowrap",overflowX:"hidden",textOverflow:"ellipsis",py:"$0"}},e);if(r.isValidElement(e)&&e.type===p)return r.cloneElement(e,{size:"sm",css:{...e.props.css,flexShrink:0}})}));t.displayName="Badge";export{t as Badge};
2
2
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Box } from '../box'\nimport { Flex } from '../flex'\nimport { Icon } from '../icon'\n\nconst StyledBadge = styled(Flex, {\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '$0',\n minWidth: 0,\n border: '1px solid #FFFFFF',\n fontFamily: '$body',\n '& > *:not(:last-child)': {\n mr: '$1'\n },\n variants: {\n theme: {\n success: {\n bg: '$successLight',\n color: '$successMid'\n },\n warning: {\n bg: '$warningLight',\n color: '$warningText'\n },\n danger: {\n bg: '$dangerLight',\n color: '$dangerMid'\n },\n neutral: {\n bg: '$tonal50',\n color: '$tonal400'\n },\n info: {\n bg: '$primaryLight',\n color: '$primaryMid'\n }\n },\n size: {\n xs: {\n fontSize: '$sm',\n px: '$1',\n height: '$2'\n },\n sm: {\n fontSize: '$md',\n px: '$1',\n height: '$3'\n },\n md: {\n fontSize: '$md',\n px: '$2',\n height: '$4'\n }\n }\n }\n})\n\ntype BadgeProps = React.ComponentProps<typeof StyledBadge>\n\nexport const Badge: React.FC<BadgeProps> = ({\n theme = 'info',\n size = 'sm',\n children,\n ...rest\n}) => {\n return (\n <StyledBadge role=\"status\" theme={theme} size={size} {...rest}>\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return (\n <Box\n css={{\n whiteSpace: 'nowrap',\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n py: '$0'\n }}\n >\n {child}\n </Box>\n )\n }\n\n if (React.isValidElement(child) && child.type === Icon) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof Icon>>,\n {\n size: 'sm',\n css: { ...child.props.css, flexShrink: 0 }\n }\n )\n }\n })}\n </StyledBadge>\n )\n}\n\nBadge.displayName = 'Badge'\n"],"names":["StyledBadge","styled","Flex","Badge","theme","size","children","rest","React","child","Box","Icon"],"mappings":"qLAQA,MAAMA,EAAcC,EAAOC,EAAM,CAC/B,eAAgB,SAChB,WAAY,SACZ,aAAc,KACd,SAAU,EACV,OAAQ,oBACR,WAAY,QACZ,yBAA0B,CACxB,GAAI,IACN,EACA,SAAU,CACR,MAAO,CACL,QAAS,CACP,GAAI,gBACJ,MAAO,aACT,EACA,QAAS,CACP,GAAI,gBACJ,MAAO,cACT,EACA,OAAQ,CACN,GAAI,eACJ,MAAO,YACT,EACA,QAAS,CACP,GAAI,WACJ,MAAO,WACT,EACA,KAAM,CACJ,GAAI,gBACJ,MAAO,aACT,CACF,EACA,KAAM,CACJ,GAAI,CACF,SAAU,MACV,GAAI,KACJ,OAAQ,IACV,EACA,GAAI,CACF,SAAU,MACV,GAAI,KACJ,OAAQ,IACV,EACA,GAAI,CACF,SAAU,MACV,GAAI,KACJ,OAAQ,IACV,CACF,CACF,CACF,CAAC,EAIYC,EAA8B,CAAC,CAC1C,MAAAC,EAAQ,OACR,KAAAC,EAAO,KACP,SAAAC,KACGC,CACL,IAEIC,EAAA,cAACR,EAAA,CAAY,KAAK,SAAS,MAAOI,EAAO,KAAMC,EAAO,GAAGE,GACtDC,EAAM,SAAS,IAAIF,EAAWG,GAAU,CACvC,GAAI,OAAOA,GAAU,UAAY,OAAOA,GAAU,SAChD,OACED,EAAA,cAACE,EAAA,CACC,IAAK,CACH,WAAY,SACZ,UAAW,SACX,aAAc,WACd,GAAI,IACN,CAECD,EAAAA,CACH,EAIJ,GAAID,EAAM,eAAeC,CAAK,GAAKA,EAAM,OAASE,EAChD,OAAOH,EAAM,aACXC,EACA,CACE,KAAM,KACN,IAAK,CAAE,GAAGA,EAAM,MAAM,IAAK,WAAY,CAAE,CAC3C,CACF,CAEJ,CAAC,CACH,EAIJN,EAAM,YAAc"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { Box } from '../box'\nimport { Flex } from '../flex'\nimport { Icon } from '../icon'\n\nconst StyledBadge = styled(Flex, {\n justifyContent: 'center',\n alignItems: 'center',\n borderRadius: '$0',\n minWidth: 0,\n border: '1px solid #FFFFFF',\n fontFamily: '$body',\n '& > *:not(:last-child)': {\n mr: '$1'\n },\n variants: {\n theme: {\n success: {\n bg: '$successLight',\n color: '$successMid'\n },\n warning: {\n bg: '$warningLight',\n color: '$warningText'\n },\n danger: {\n bg: '$dangerLight',\n color: '$dangerMid'\n },\n neutral: {\n bg: '$tonal50',\n color: '$tonal400'\n },\n info: {\n bg: '$primaryLight',\n color: '$primaryMid'\n },\n purple: {\n bg: '$purple200',\n color: '$purple1000'\n }\n },\n size: {\n xs: {\n fontSize: '$sm',\n px: '$1',\n height: '$2'\n },\n sm: {\n fontSize: '$md',\n px: '$1',\n height: '$3'\n },\n md: {\n fontSize: '$md',\n px: '$2',\n height: '$4'\n }\n }\n }\n})\n\ntype BadgeProps = React.ComponentProps<typeof StyledBadge>\n\nexport const Badge: React.FC<BadgeProps> = ({\n theme = 'info',\n size = 'sm',\n children,\n ...rest\n}) => {\n return (\n <StyledBadge role=\"status\" theme={theme} size={size} {...rest}>\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return (\n <Box\n css={{\n whiteSpace: 'nowrap',\n overflowX: 'hidden',\n textOverflow: 'ellipsis',\n py: '$0'\n }}\n >\n {child}\n </Box>\n )\n }\n\n if (React.isValidElement(child) && child.type === Icon) {\n return React.cloneElement(\n child as React.ReactElement<React.ComponentProps<typeof Icon>>,\n {\n size: 'sm',\n css: { ...child.props.css, flexShrink: 0 }\n }\n )\n }\n })}\n </StyledBadge>\n )\n}\n\nBadge.displayName = 'Badge'\n"],"names":["StyledBadge","styled","Flex","Badge","theme","size","children","rest","React","child","Box","Icon"],"mappings":"qLAQA,MAAMA,EAAcC,EAAOC,EAAM,CAC/B,eAAgB,SAChB,WAAY,SACZ,aAAc,KACd,SAAU,EACV,OAAQ,oBACR,WAAY,QACZ,yBAA0B,CACxB,GAAI,IACN,EACA,SAAU,CACR,MAAO,CACL,QAAS,CACP,GAAI,gBACJ,MAAO,aACT,EACA,QAAS,CACP,GAAI,gBACJ,MAAO,cACT,EACA,OAAQ,CACN,GAAI,eACJ,MAAO,YACT,EACA,QAAS,CACP,GAAI,WACJ,MAAO,WACT,EACA,KAAM,CACJ,GAAI,gBACJ,MAAO,aACT,EACA,OAAQ,CACN,GAAI,aACJ,MAAO,aACT,CACF,EACA,KAAM,CACJ,GAAI,CACF,SAAU,MACV,GAAI,KACJ,OAAQ,IACV,EACA,GAAI,CACF,SAAU,MACV,GAAI,KACJ,OAAQ,IACV,EACA,GAAI,CACF,SAAU,MACV,GAAI,KACJ,OAAQ,IACV,CACF,CACF,CACF,CAAC,EAIYC,EAA8B,CAAC,CAC1C,MAAAC,EAAQ,OACR,KAAAC,EAAO,KACP,SAAAC,KACGC,CACL,IAEIC,EAAA,cAACR,EAAA,CAAY,KAAK,SAAS,MAAOI,EAAO,KAAMC,EAAO,GAAGE,CACtDC,EAAAA,EAAM,SAAS,IAAIF,EAAWG,GAAU,CACvC,GAAI,OAAOA,GAAU,UAAY,OAAOA,GAAU,SAChD,OACED,EAAA,cAACE,EAAA,CACC,IAAK,CACH,WAAY,SACZ,UAAW,SACX,aAAc,WACd,GAAI,IACN,CAAA,EAECD,CACH,EAIJ,GAAID,EAAM,eAAeC,CAAK,GAAKA,EAAM,OAASE,EAChD,OAAOH,EAAM,aACXC,EACA,CACE,KAAM,KACN,IAAK,CAAE,GAAGA,EAAM,MAAM,IAAK,WAAY,CAAE,CAC3C,CACF,CAEJ,CAAC,CACH,EAIJN,EAAM,YAAc"}
@@ -42,6 +42,7 @@ export { NavigationMenu } from './navigation';
42
42
  export { NotificationBadge } from './notification-badge';
43
43
  export { NumberInput } from './number-input';
44
44
  export { NumberInputField } from './number-input-field';
45
+ export { Pagination } from './pagination';
45
46
  export { PasswordField } from './password-field';
46
47
  export { PasswordInput } from './password-input';
47
48
  export { Popover } from './popover';
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import type { TPaginationProps } from './types';
3
+ export declare const Pagination: React.FC<TPaginationProps>;
@@ -0,0 +1,2 @@
1
+ import*as t from"react";import{ColorScheme as p}from"../../experiments/color-scheme/ColorScheme.js";import"../accordion/Accordion.js";import"../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"../box/Box.js";import"../button/Button.js";import"../carousel/Carousel.js";import"../checkbox/Checkbox.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"../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"../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 e}from"../flex/Flex.js";import"../form/Form.js";import"dlv";import"react-hook-form";import"../grid/Grid.js";import"../heading/Heading.js";import"../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"../notification-badge/NotificationBadge.js";import"../number-input/NumberInput.js";import"../number-input-field/NumberInputField.js";import"../password-field/PasswordField.js";import"../password-input/PasswordInput.js";import"../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"../stack/Stack.js";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"../sidedrawer/Sidedrawer.js";import"../slider/Slider.js";import"../slider-field/SliderField.js";import"../sortable/SortableHandle.js";import"../sortable/SortableItem.js";import"../sortable/SortableRoot.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"../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"../video/Video.js";import"../banner/banner-regular/BannerRegular.js";import"../tile/Tile.js";import"../tile-interactive/TileInteractive.js";import"../tile-toggle-group/index.js";import{PaginationProvider as n}from"./pagination-context/PaginationContext.js";import{PaginationNextButton as a}from"./PaginationNextButton.js";import{PaginationPages as l}from"./PaginationPages.js";import{PaginationPreviousButton as c}from"./PaginationPreviousButton.js";const r=({colorScheme:i,css:m,...o})=>o!=null&&o.pagesCount?t.createElement(p,{base:"grey1",accent:"blue1",...i,asChild:!0},t.createElement(e,{css:m},t.createElement(n,{...o},t.createElement(c,null),t.createElement(l,null),t.createElement(a,null)))):null;r.displayName="Pagination";export{r as Pagination};
2
+ //# sourceMappingURL=Pagination.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pagination.js","sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme'\nimport { Flex } from '..'\nimport { PaginationProvider } from './pagination-context/PaginationContext'\nimport { PaginationNextButton } from './PaginationNextButton'\nimport { PaginationPages } from './PaginationPages'\nimport { PaginationPreviousButton } from './PaginationPreviousButton'\nimport type { TPaginationProps } from './types'\n\nexport const Pagination: React.FC<TPaginationProps> = ({\n colorScheme,\n css,\n ...paginationProps\n}) => {\n // Return null if pages is 0 or undefined\n if (!paginationProps?.pagesCount) {\n return null\n }\n\n return (\n <ColorScheme base=\"grey1\" accent=\"blue1\" {...colorScheme} asChild>\n <Flex css={css}>\n <PaginationProvider {...paginationProps}>\n <PaginationPreviousButton />\n <PaginationPages />\n <PaginationNextButton />\n </PaginationProvider>\n </Flex>\n </ColorScheme>\n )\n}\n\nPagination.displayName = 'Pagination'\n"],"names":["Pagination","colorScheme","css","paginationProps","React","ColorScheme","Flex","PaginationProvider","PaginationPreviousButton","PaginationPages","PaginationNextButton"],"mappings":"g5GAUa,MAAAA,EAAyC,CAAC,CACrD,YAAAC,EACA,IAAAC,KACGC,CACL,IAEOA,GAAA,MAAAA,EAAiB,WAKpBC,EAAA,cAACC,EAAA,CAAY,KAAK,QAAQ,OAAO,QAAS,GAAGJ,EAAa,QAAO,EAC/DG,EAAAA,EAAA,cAACE,EAAA,CAAK,IAAKJ,CAAAA,EACTE,EAAA,cAACG,EAAA,CAAoB,GAAGJ,CAAAA,EACtBC,EAAA,cAACI,EAAA,IAAyB,EAC1BJ,EAAA,cAACK,EAAA,IAAgB,EACjBL,EAAA,cAACM,EAAA,IAAqB,CACxB,CACF,CACF,EAZO,KAgBXV,EAAW,YAAc"}
@@ -0,0 +1,3 @@
1
+ import * as React from 'react';
2
+ import type { IPaginationItemProps } from './types';
3
+ export declare const PaginationItem: React.FC<IPaginationItemProps>;
@@ -0,0 +1,2 @@
1
+ import*as e from"react";import{styled as c}from"../../stitches.js";import"../../utilities/css-wrapper/CSSWrapper.js";import"../../utilities/no-overflow-wrapper/NoOverflowWrapper.js";import"color2k";import{focusVisibleStyleBlock as b}from"../../utilities/style/focus-visible-style-block.js";import"../../utilities/style/keyframe-animations.js";import"../accordion/Accordion.js";import"../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{Box as $}from"../box/Box.js";import"../button/Button.js";import"../carousel/Carousel.js";import"../checkbox/Checkbox.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"../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"../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/Flex.js";import"../form/Form.js";import"dlv";import"react-hook-form";import"../grid/Grid.js";import"../heading/Heading.js";import"../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"../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/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"../stack/Stack.js";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"../sidedrawer/Sidedrawer.js";import"../slider/Slider.js";import"../slider-field/SliderField.js";import"../sortable/SortableHandle.js";import"../sortable/SortableItem.js";import"../sortable/SortableRoot.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"../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"../video/Video.js";import"../banner/banner-regular/BannerRegular.js";import"../tile/Tile.js";import"../tile-interactive/TileInteractive.js";import"../tile-toggle-group/index.js";import{usePagination as u}from"./usePagination.js";const r=c($,{borderRadius:"$round",size:"4px",bg:"$accent9"}),g=c("button",{alignItems:"center",border:"unset",borderRadius:"$0",cursor:"pointer",fontFamily:"$body",justifyContent:"center",whiteSpace:"nowrap",width:"max-content",display:"flex",flexDirection:"column",p:"0",fontWeight:400,color:"$grey800",bg:"$base1","&:not(:disabled)":{"&:hover":{color:"$accent10",bg:"$base2"},"&:active":{bg:"$base3",color:"$grey1000"},"&:focus-visible":{...b()}},"&:disabled":{opacity:"0.3",cursor:"not-allowed"},variants:{size:{md:{width:"$4",height:"$4"}},selected:{true:{border:"1px solid $accent9",color:"$accent9",fontWeight:600,"&:not(:disabled)":{"&:hover":{borderColor:"$accent10",color:"$accent10"},"&:active":{borderColor:"$accent11",fontColor:"$accent11"}}}},indicated:{true:{fontWeight:600,color:"$accent9","&:not(:disabled)":{"&:hover":{color:"$accent10",[`& ${r}`]:{bg:"$accent10"}},"&:active":{color:"$accent11",[`& ${r}`]:{bg:"$accent11"}}}}}}}),f=({pageNumber:o,css:n})=>{const{currentPage:a,goToPage:l,indicatedPages:s,disabledPages:d,onItemHover:i}=u(),m=s.includes(o),p=d.includes(o),t=a===o;return e.createElement(g,{selected:t,size:"md",onClick:()=>l(o),css:n,indicated:m,disabled:p,"aria-current":t&&"page","aria-disabled":p,onMouseOver:()=>{t||i==null||i(o)}},o,m&&e.createElement(r,null))};export{f as PaginationItem};
2
+ //# sourceMappingURL=PaginationItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginationItem.js","sources":["../../../src/components/pagination/PaginationItem.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { focusVisibleStyleBlock } from '~/utilities'\n\nimport { styled } from '../../stitches'\nimport { Box } from '..'\nimport type { IPaginationItemProps } from './types'\nimport { usePagination } from './usePagination'\n\nconst Dot = styled(Box, {\n borderRadius: '$round',\n size: '4px',\n bg: '$accent9'\n})\n\nconst StyledButton = styled('button', {\n alignItems: 'center',\n border: 'unset',\n borderRadius: '$0',\n cursor: 'pointer',\n fontFamily: '$body',\n justifyContent: 'center',\n whiteSpace: 'nowrap',\n width: 'max-content',\n display: 'flex',\n flexDirection: 'column',\n p: '0',\n fontWeight: 400,\n color: '$grey800',\n bg: '$base1',\n '&:not(:disabled)': {\n '&:hover': {\n color: '$accent10',\n bg: '$base2'\n },\n '&:active': {\n bg: '$base3',\n color: '$grey1000'\n },\n '&:focus-visible': {\n ...focusVisibleStyleBlock()\n }\n },\n '&:disabled': {\n opacity: '0.3',\n cursor: 'not-allowed'\n },\n variants: {\n size: {\n md: {\n width: '$4',\n height: '$4'\n }\n },\n selected: {\n true: {\n border: '1px solid $accent9',\n color: '$accent9',\n fontWeight: 600,\n '&:not(:disabled)': {\n '&:hover': {\n borderColor: '$accent10',\n color: '$accent10'\n },\n '&:active': {\n borderColor: '$accent11',\n fontColor: '$accent11'\n }\n }\n }\n },\n indicated: {\n true: {\n fontWeight: 600,\n color: '$accent9',\n '&:not(:disabled)': {\n '&:hover': {\n color: '$accent10',\n [`& ${Dot}`]: {\n bg: '$accent10'\n }\n },\n '&:active': {\n color: '$accent11',\n [`& ${Dot}`]: {\n bg: '$accent11'\n }\n }\n }\n }\n }\n }\n})\n\nexport const PaginationItem: React.FC<IPaginationItemProps> = ({\n pageNumber,\n css\n}) => {\n const { currentPage, goToPage, indicatedPages, disabledPages, onItemHover } =\n usePagination()\n\n const isIndicated = indicatedPages.includes(pageNumber)\n const isDisabled = disabledPages.includes(pageNumber)\n\n const isSelected = currentPage === pageNumber\n\n const handleOnHover = () => {\n if (isSelected) return\n onItemHover?.(pageNumber)\n }\n\n return (\n <StyledButton\n selected={isSelected}\n size=\"md\"\n onClick={() => goToPage(pageNumber)}\n css={css}\n indicated={isIndicated}\n disabled={isDisabled}\n aria-current={isSelected && 'page'}\n aria-disabled={isDisabled}\n onMouseOver={handleOnHover}\n >\n {pageNumber}\n {isIndicated && <Dot />}\n </StyledButton>\n )\n}\n"],"names":["Dot","styled","Box","StyledButton","focusVisibleStyleBlock","PaginationItem","pageNumber","css","currentPage","goToPage","indicatedPages","disabledPages","onItemHover","usePagination","isIndicated","isDisabled","isSelected","React"],"mappings":"67GASA,MAAMA,EAAMC,EAAOC,EAAK,CACtB,aAAc,SACd,KAAM,MACN,GAAI,UACN,CAAC,EAEKC,EAAeF,EAAO,SAAU,CACpC,WAAY,SACZ,OAAQ,QACR,aAAc,KACd,OAAQ,UACR,WAAY,QACZ,eAAgB,SAChB,WAAY,SACZ,MAAO,cACP,QAAS,OACT,cAAe,SACf,EAAG,IACH,WAAY,IACZ,MAAO,WACP,GAAI,SACJ,mBAAoB,CAClB,UAAW,CACT,MAAO,YACP,GAAI,QACN,EACA,WAAY,CACV,GAAI,SACJ,MAAO,WACT,EACA,kBAAmB,CACjB,GAAGG,EACL,CAAA,CACF,EACA,aAAc,CACZ,QAAS,MACT,OAAQ,aACV,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CACF,MAAO,KACP,OAAQ,IACV,CACF,EACA,SAAU,CACR,KAAM,CACJ,OAAQ,qBACR,MAAO,WACP,WAAY,IACZ,mBAAoB,CAClB,UAAW,CACT,YAAa,YACb,MAAO,WACT,EACA,WAAY,CACV,YAAa,YACb,UAAW,WACb,CACF,CACF,CACF,EACA,UAAW,CACT,KAAM,CACJ,WAAY,IACZ,MAAO,WACP,mBAAoB,CAClB,UAAW,CACT,MAAO,YACP,CAAC,KAAKJ,KAAQ,CACZ,GAAI,WACN,CACF,EACA,WAAY,CACV,MAAO,YACP,CAAC,KAAKA,KAAQ,CACZ,GAAI,WACN,CACF,CACF,CACF,CACF,CACF,CACF,CAAC,EAEYK,EAAiD,CAAC,CAC7D,WAAAC,EACA,IAAAC,CACF,IAAM,CACJ,KAAM,CAAE,YAAAC,EAAa,SAAAC,EAAU,eAAAC,EAAgB,cAAAC,EAAe,YAAAC,CAAY,EACxEC,IAEIC,EAAcJ,EAAe,SAASJ,CAAU,EAChDS,EAAaJ,EAAc,SAASL,CAAU,EAE9CU,EAAaR,IAAgBF,EAOnC,OACEW,EAAA,cAACd,EAAA,CACC,SAAUa,EACV,KAAK,KACL,QAAS,IAAMP,EAASH,CAAU,EAClC,IAAKC,EACL,UAAWO,EACX,SAAUC,EACV,eAAcC,GAAc,OAC5B,gBAAeD,EACf,YAfkB,IAAM,CACtBC,GACJJ,GAAA,MAAAA,EAAcN,CAChB,CAAA,CAAA,EAcKA,EACAQ,GAAeG,EAAA,cAACjB,EAAA,IAAI,CACvB,CAEJ"}
@@ -0,0 +1,470 @@
1
+ import * as React from 'react';
2
+ declare const StyledActionIcon: import("@stitches/react/types/styled-component").StyledComponent<React.ForwardRefExoticComponent<Pick<Omit<Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
3
+ ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
4
+ }, "appearance" | "size" | "css" | "theme" | "isRounded"> & import("@stitches/react/types/styled-component").TransformProps<{
5
+ theme?: "primary" | "success" | "danger" | "warning" | "neutral" | undefined;
6
+ appearance?: "outline" | "solid" | "simple" | undefined;
7
+ size?: "sm" | "md" | "lg" | "xs" | undefined;
8
+ isRounded?: boolean | "true" | undefined;
9
+ }, {
10
+ sm: string;
11
+ md: string;
12
+ lg: string;
13
+ xl: string;
14
+ reducedMotion: string;
15
+ allowMotion: string;
16
+ hover: string;
17
+ }> & {
18
+ css?: import("@stitches/react/types/css-util").CSS<{
19
+ sm: string;
20
+ md: string;
21
+ lg: string;
22
+ xl: string;
23
+ reducedMotion: string;
24
+ allowMotion: string;
25
+ hover: string;
26
+ }, {
27
+ colors: {
28
+ textForeground: any;
29
+ textSubtle: any;
30
+ textPlaceholder: any;
31
+ background: any;
32
+ backgroundAccent: any;
33
+ grey100: any;
34
+ grey200: any;
35
+ grey300: any;
36
+ grey400: any;
37
+ grey500: any;
38
+ grey600: any;
39
+ grey700: any;
40
+ grey800: any;
41
+ grey900: any;
42
+ grey1000: any;
43
+ grey1100: any;
44
+ grey1200: any;
45
+ blue100: any;
46
+ blue200: any;
47
+ blue300: any;
48
+ blue400: any;
49
+ blue500: any;
50
+ blue600: any;
51
+ blue700: any;
52
+ blue800: any;
53
+ blue900: any;
54
+ blue1000: any;
55
+ blue1100: any;
56
+ blue1200: any;
57
+ purple100: any;
58
+ purple200: any;
59
+ purple300: any;
60
+ purple400: any;
61
+ purple500: any;
62
+ purple600: any;
63
+ purple700: any;
64
+ purple800: any;
65
+ purple900: any;
66
+ purple1000: any;
67
+ purple1100: any;
68
+ purple1200: any;
69
+ tonal50: any;
70
+ tonal100: any;
71
+ tonal200: any;
72
+ tonal300: any;
73
+ tonal400: any;
74
+ tonal500: any;
75
+ tonal600: any;
76
+ alpha100: any;
77
+ alpha150: any;
78
+ alpha200: any;
79
+ alpha250: any;
80
+ alpha600: any;
81
+ primaryLight: any;
82
+ primary: any;
83
+ primaryMid: any;
84
+ primaryDark: any;
85
+ secondary: any;
86
+ brandRed: any;
87
+ brandRedAccent: any;
88
+ brandGreen: any;
89
+ brandGreenAccent: any;
90
+ brandPurple: any;
91
+ brandPurpleAccent: any;
92
+ brandYellow: any;
93
+ brandYellowAccent: any;
94
+ successLight: any;
95
+ success: any;
96
+ successMid: any;
97
+ successDark: any;
98
+ dangerLight: any;
99
+ danger: any;
100
+ dangerMid: any;
101
+ dangerDark: any;
102
+ warningLight: any;
103
+ warning: any;
104
+ warningMid: any;
105
+ warningDark: any;
106
+ warningText: any;
107
+ subjectEnglish: any;
108
+ subjectMaths: any;
109
+ subjectScience: any;
110
+ subjectVerbalReasoning: any;
111
+ subjectNonVerbalReasoning: any;
112
+ subjectCreativeWriting: any;
113
+ subjectExamSkills: any;
114
+ };
115
+ space: {
116
+ "0": any;
117
+ "1": any;
118
+ "2": any;
119
+ "3": any;
120
+ "4": any;
121
+ "5": any;
122
+ "6": any;
123
+ "7": any;
124
+ "8": any;
125
+ "9": any;
126
+ "24": any;
127
+ };
128
+ fontSizes: {
129
+ xs: any;
130
+ sm: any;
131
+ md: any;
132
+ lg: any;
133
+ xl: any;
134
+ "2xl": any;
135
+ "3xl": any;
136
+ "4xl": any;
137
+ };
138
+ fonts: {
139
+ sans: any;
140
+ mono: any;
141
+ display: any;
142
+ body: any;
143
+ };
144
+ sizes: {
145
+ "0": any;
146
+ "1": any;
147
+ "2": any;
148
+ "3": any;
149
+ "4": any;
150
+ "5": any;
151
+ "6": any;
152
+ "7": any;
153
+ "8": any;
154
+ };
155
+ radii: {
156
+ "0": any;
157
+ "1": any;
158
+ "2": any;
159
+ "3": any;
160
+ round: any;
161
+ };
162
+ shadows: {
163
+ "0": any;
164
+ "1": any;
165
+ "2": any;
166
+ "3": any;
167
+ };
168
+ ratios: {
169
+ "16-9": any;
170
+ "3-2": any;
171
+ "4-3": any;
172
+ "1-1": any;
173
+ "3-4": any;
174
+ };
175
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
176
+ bg: (value: import("@stitches/react/types/css-util").WithPropertyValue<"background">) => {
177
+ background: import("@stitches/react/types/css-util").WithPropertyValue<"background">;
178
+ };
179
+ size: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">) => {
180
+ height: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
181
+ width: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
182
+ };
183
+ p: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
184
+ padding: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
185
+ };
186
+ pt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
187
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
188
+ };
189
+ pr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
190
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
191
+ };
192
+ pb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
193
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
194
+ };
195
+ pl: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
196
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
197
+ };
198
+ px: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
199
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
200
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
201
+ };
202
+ py: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
203
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
204
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
205
+ };
206
+ m: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
207
+ margin: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
208
+ };
209
+ mt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
210
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
211
+ };
212
+ mr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
213
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
214
+ };
215
+ mb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
216
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
217
+ };
218
+ ml: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
219
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
220
+ };
221
+ mx: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
222
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
223
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
224
+ };
225
+ my: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
226
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
227
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
228
+ };
229
+ }> | undefined;
230
+ }, "appearance" | "size" | "theme" | "label" | "children" | "as" | "isRounded" | "hasTooltip" | "tooltipSide" | keyof import("../../types").NavigatorActions> & import("@stitches/react/types/styled-component").TransformProps<{
231
+ theme?: "primary" | "success" | "danger" | "warning" | "neutral" | undefined;
232
+ appearance?: "outline" | "solid" | "simple" | undefined;
233
+ size?: "sm" | "md" | "lg" | "xs" | undefined;
234
+ isRounded?: boolean | "true" | undefined;
235
+ }, {
236
+ sm: string;
237
+ md: string;
238
+ lg: string;
239
+ xl: string;
240
+ reducedMotion: string;
241
+ allowMotion: string;
242
+ hover: string;
243
+ }> & {
244
+ as?: React.ReactNode;
245
+ children: React.ReactNode;
246
+ label: string;
247
+ hasTooltip?: boolean | undefined;
248
+ tooltipSide?: "bottom" | "left" | "right" | "top" | undefined;
249
+ } & import("../../types").NavigatorActions, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onChange" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "as" | "disabled" | "value" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "isRounded" | "hasTooltip" | "tooltipSide" | keyof import("../../types").NavigatorActions> & React.RefAttributes<HTMLButtonElement>>, {}, {
250
+ sm: string;
251
+ md: string;
252
+ lg: string;
253
+ xl: string;
254
+ reducedMotion: string;
255
+ allowMotion: string;
256
+ hover: string;
257
+ }, import("@stitches/react/types/css-util").CSS<{
258
+ sm: string;
259
+ md: string;
260
+ lg: string;
261
+ xl: string;
262
+ reducedMotion: string;
263
+ allowMotion: string;
264
+ hover: string;
265
+ }, {
266
+ colors: {
267
+ textForeground: any;
268
+ textSubtle: any;
269
+ textPlaceholder: any;
270
+ background: any;
271
+ backgroundAccent: any;
272
+ grey100: any;
273
+ grey200: any;
274
+ grey300: any;
275
+ grey400: any;
276
+ grey500: any;
277
+ grey600: any;
278
+ grey700: any;
279
+ grey800: any;
280
+ grey900: any;
281
+ grey1000: any;
282
+ grey1100: any;
283
+ grey1200: any;
284
+ blue100: any;
285
+ blue200: any;
286
+ blue300: any;
287
+ blue400: any;
288
+ blue500: any;
289
+ blue600: any;
290
+ blue700: any;
291
+ blue800: any;
292
+ blue900: any;
293
+ blue1000: any;
294
+ blue1100: any;
295
+ blue1200: any;
296
+ purple100: any;
297
+ purple200: any;
298
+ purple300: any;
299
+ purple400: any;
300
+ purple500: any;
301
+ purple600: any;
302
+ purple700: any;
303
+ purple800: any;
304
+ purple900: any;
305
+ purple1000: any;
306
+ purple1100: any;
307
+ purple1200: any;
308
+ tonal50: any;
309
+ tonal100: any;
310
+ tonal200: any;
311
+ tonal300: any;
312
+ tonal400: any;
313
+ tonal500: any;
314
+ tonal600: any;
315
+ alpha100: any;
316
+ alpha150: any;
317
+ alpha200: any;
318
+ alpha250: any;
319
+ alpha600: any;
320
+ primaryLight: any;
321
+ primary: any;
322
+ primaryMid: any;
323
+ primaryDark: any;
324
+ secondary: any;
325
+ brandRed: any;
326
+ brandRedAccent: any;
327
+ brandGreen: any;
328
+ brandGreenAccent: any;
329
+ brandPurple: any;
330
+ brandPurpleAccent: any;
331
+ brandYellow: any;
332
+ brandYellowAccent: any;
333
+ successLight: any;
334
+ success: any;
335
+ successMid: any;
336
+ successDark: any;
337
+ dangerLight: any;
338
+ danger: any;
339
+ dangerMid: any;
340
+ dangerDark: any;
341
+ warningLight: any;
342
+ warning: any;
343
+ warningMid: any;
344
+ warningDark: any;
345
+ warningText: any;
346
+ subjectEnglish: any;
347
+ subjectMaths: any;
348
+ subjectScience: any;
349
+ subjectVerbalReasoning: any;
350
+ subjectNonVerbalReasoning: any;
351
+ subjectCreativeWriting: any;
352
+ subjectExamSkills: any;
353
+ };
354
+ space: {
355
+ "0": any;
356
+ "1": any;
357
+ "2": any;
358
+ "3": any;
359
+ "4": any;
360
+ "5": any;
361
+ "6": any;
362
+ "7": any;
363
+ "8": any;
364
+ "9": any;
365
+ "24": any;
366
+ };
367
+ fontSizes: {
368
+ xs: any;
369
+ sm: any;
370
+ md: any;
371
+ lg: any;
372
+ xl: any;
373
+ "2xl": any;
374
+ "3xl": any;
375
+ "4xl": any;
376
+ };
377
+ fonts: {
378
+ sans: any;
379
+ mono: any;
380
+ display: any;
381
+ body: any;
382
+ };
383
+ sizes: {
384
+ "0": any;
385
+ "1": any;
386
+ "2": any;
387
+ "3": any;
388
+ "4": any;
389
+ "5": any;
390
+ "6": any;
391
+ "7": any;
392
+ "8": any;
393
+ };
394
+ radii: {
395
+ "0": any;
396
+ "1": any;
397
+ "2": any;
398
+ "3": any;
399
+ round: any;
400
+ };
401
+ shadows: {
402
+ "0": any;
403
+ "1": any;
404
+ "2": any;
405
+ "3": any;
406
+ };
407
+ ratios: {
408
+ "16-9": any;
409
+ "3-2": any;
410
+ "4-3": any;
411
+ "1-1": any;
412
+ "3-4": any;
413
+ };
414
+ }, import("@stitches/react/types/config").DefaultThemeMap, {
415
+ bg: (value: import("@stitches/react/types/css-util").WithPropertyValue<"background">) => {
416
+ background: import("@stitches/react/types/css-util").WithPropertyValue<"background">;
417
+ };
418
+ size: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">) => {
419
+ height: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
420
+ width: string | number | import("@stitches/react/types/css-util").WithScaleValue<"size">;
421
+ };
422
+ p: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
423
+ padding: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
424
+ };
425
+ pt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
426
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
427
+ };
428
+ pr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
429
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
430
+ };
431
+ pb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
432
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
433
+ };
434
+ pl: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
435
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
436
+ };
437
+ px: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
438
+ paddingLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
439
+ paddingRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
440
+ };
441
+ py: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
442
+ paddingTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
443
+ paddingBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
444
+ };
445
+ m: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
446
+ margin: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
447
+ };
448
+ mt: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
449
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
450
+ };
451
+ mr: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
452
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
453
+ };
454
+ mb: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
455
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
456
+ };
457
+ ml: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
458
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
459
+ };
460
+ mx: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
461
+ marginLeft: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
462
+ marginRight: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
463
+ };
464
+ my: (value: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">) => {
465
+ marginTop: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
466
+ marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
467
+ };
468
+ }>>;
469
+ export declare const PaginationNextButton: (props: Partial<React.ComponentProps<typeof StyledActionIcon>>) => JSX.Element;
470
+ export {};
@@ -0,0 +1,2 @@
1
+ import{ChevronRight as c}from"@atom-learning/icons";import*as i from"react";import{styled as p}from"../../stitches.js";import{ActionIcon as d}from"../action-icon/ActionIcon.js";import{Icon as g}from"../icon/Icon.js";import{TRUNCATED_THRESHOLD as u}from"./pagination.constants.js";import{getPaginationItemsToRender as f}from"./pagination.helper.js";import{usePagination as b}from"./usePagination.js";const P=p(d,{ml:"$1","&:disabled":{opacity:"0.3"}}),x=n=>{const{goToNextPage:r,currentPage:t,pagesCount:e,labels:o,disabledPages:a,isMaxVisibleElementCount:m}=b(),l=f(t,e,u,m),s=t===e||a.includes(e)&&l.includes(e-1);return i.createElement(P,{hasTooltip:!1,size:"md",theme:"neutral",onClick:r,disabled:s,...n,label:(o==null?void 0:o.nextPageButtonLabel)||"Next page"},i.createElement(g,{is:c}))};export{x as PaginationNextButton};
2
+ //# sourceMappingURL=PaginationNextButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PaginationNextButton.js","sources":["../../../src/components/pagination/PaginationNextButton.tsx"],"sourcesContent":["import { ChevronRight } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { styled } from '~/stitches'\n\nimport { ActionIcon } from '../action-icon'\nimport { Icon } from '../icon'\nimport { TRUNCATED_THRESHOLD } from './pagination.constants'\nimport { getPaginationItemsToRender } from './pagination.helper'\nimport { usePagination } from './usePagination'\n\nconst StyledActionIcon = styled(ActionIcon, {\n ml: '$1',\n '&:disabled': {\n opacity: '0.3'\n }\n})\n\nexport const PaginationNextButton = (\n props: Partial<React.ComponentProps<typeof StyledActionIcon>>\n) => {\n const {\n goToNextPage,\n currentPage,\n pagesCount,\n labels,\n disabledPages,\n isMaxVisibleElementCount\n } = usePagination()\n\n const paginationItemsInview = getPaginationItemsToRender(\n currentPage,\n pagesCount,\n TRUNCATED_THRESHOLD,\n isMaxVisibleElementCount\n )\n // Check if we are on the last page or if the last page is disabled and the if the second to last page number is rendered\n const isDisabled =\n currentPage === pagesCount ||\n (disabledPages.includes(pagesCount) &&\n paginationItemsInview.includes(pagesCount - 1))\n\n return (\n <StyledActionIcon\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n onClick={goToNextPage}\n disabled={isDisabled}\n {...props}\n label={labels?.nextPageButtonLabel || 'Next page'}\n >\n <Icon is={ChevronRight} />\n </StyledActionIcon>\n )\n}\n"],"names":["StyledActionIcon","styled","ActionIcon","PaginationNextButton","props","goToNextPage","currentPage","pagesCount","labels","disabledPages","isMaxVisibleElementCount","usePagination","paginationItemsInview","getPaginationItemsToRender","TRUNCATED_THRESHOLD","isDisabled","React","Icon","ChevronRight"],"mappings":"+YAUA,MAAMA,EAAmBC,EAAOC,EAAY,CAC1C,GAAI,KACJ,aAAc,CACZ,QAAS,KACX,CACF,CAAC,EAEYC,EACXC,GACG,CACH,KAAM,CACJ,aAAAC,EACA,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,cAAAC,EACA,yBAAAC,CACF,EAAIC,EAAAA,EAEEC,EAAwBC,EAC5BP,EACAC,EACAO,EACAJ,CACF,EAEMK,EACJT,IAAgBC,GACfE,EAAc,SAASF,CAAU,GAChCK,EAAsB,SAASL,EAAa,CAAC,EAEjD,OACES,EAAA,cAAChB,EAAA,CACC,WAAY,GACZ,KAAK,KACL,MAAM,UACN,QAASK,EACT,SAAUU,EACT,GAAGX,EACJ,OAAOI,GAAA,KAAA,OAAAA,EAAQ,sBAAuB,WAEtCQ,EAAAA,EAAA,cAACC,EAAA,CAAK,GAAIC,CAAc,CAAA,CAC1B,CAEJ"}