@atom-learning/components 2.32.3-beta.0 → 2.33.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/CHANGELOG.md +60 -0
- package/README.md +11 -5
- package/dist/components/accordion/AccordionItem.js +1 -1
- package/dist/components/accordion/AccordionTrigger.js +1 -1
- package/dist/components/avatar/Avatar.js +1 -1
- package/dist/components/calendar/Calendar.js +1 -1
- package/dist/components/carousel/CarouselArrows.js +1 -1
- package/dist/components/carousel/CarouselSlide.js +1 -1
- package/dist/components/checkbox-field/CheckboxField.js +1 -1
- package/dist/components/chip/Chip.js +1 -1
- package/dist/components/chip/ChipGroup.js +1 -1
- package/dist/components/chip-dismissible-group/ChipDismissibleGroupRoot.js +1 -1
- package/dist/components/data-table/DataTable.js +1 -1
- package/dist/components/data-table/DataTableBody.js +1 -1
- package/dist/components/data-table/DataTableDataCell.js +1 -1
- package/dist/components/data-table/DataTableGlobalFilter.js +1 -1
- package/dist/components/data-table/DataTableRow.js +1 -1
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/drag-and-drop/DraggableRow.js +1 -1
- package/dist/components/data-table/drag-and-drop/Handle.js +1 -1
- package/dist/components/dismissible/DismissibleRoot.js +1 -1
- package/dist/components/dismissible/DismissibleTrigger.js +1 -1
- package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +1 -1
- package/dist/components/field-wrapper/FieldDescription.js +1 -1
- package/dist/components/field-wrapper/InlineFieldWrapper.js +1 -1
- package/dist/components/file-input/FileInput.js +1 -1
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/icon/Icon.js +1 -1
- package/dist/components/inline-message/InlineMessage.js +1 -1
- package/dist/components/label/Label.js +1 -1
- package/dist/components/link/Link.js +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/markdown-content/components/MarkdownEmphasis.js +1 -1
- package/dist/components/markdown-content/components/MarkdownHeading.js +1 -1
- package/dist/components/markdown-content/components/MarkdownImage.js +1 -1
- package/dist/components/markdown-content/components/MarkdownInlineCode.js +1 -1
- package/dist/components/markdown-content/components/MarkdownLink.js +1 -1
- package/dist/components/markdown-content/components/MarkdownListItem.js +1 -1
- package/dist/components/markdown-content/components/MarkdownParagraph.js +1 -1
- package/dist/components/markdown-content/components/MarkdownStrong.js +1 -1
- package/dist/components/markdown-content/components/MarkdownThematicBreak.js +1 -1
- package/dist/components/navigation/NavigationMenuDropdownContent.js +1 -1
- package/dist/components/navigation/NavigationMenuLink.js +1 -1
- package/dist/components/notification-badge/NotificationBadge.js +1 -1
- package/dist/components/number-input/NumberInput.js +1 -1
- package/dist/components/number-input-field/NumberInputField.js +1 -1
- package/dist/components/popover/PopoverContent.js +1 -1
- package/dist/components/radio-button/RadioButton.js +1 -1
- package/dist/components/radio-button-field/RadioButtonField.js +1 -1
- package/dist/components/radio-button-field/RadioField.js +1 -1
- package/dist/components/radio-card/RadioCardGroup.js +1 -1
- package/dist/components/search-input/SearchInput.d.ts +2 -0
- package/dist/components/search-input/SearchInput.js +1 -1
- package/dist/components/select-field/SelectField.js +1 -1
- package/dist/components/sidedrawer/SidedrawerAccordion/SidedrawerAccordionContent.js +1 -1
- package/dist/components/sidedrawer/SidedrawerContent.js +1 -1
- package/dist/components/slider/Slider.d.ts +2 -1
- package/dist/components/slider/Slider.js +1 -1
- package/dist/components/slider-field/SliderField.js +1 -1
- package/dist/components/stack-content/StackContent.js +1 -1
- package/dist/components/stepper/StepperStepBack.js +1 -1
- package/dist/components/table/Table.d.ts +1 -5
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/TableBody.js +1 -1
- package/dist/components/table/TableHeader.js +1 -1
- package/dist/components/table/TableRow.js +1 -1
- package/dist/components/tabs/Tabs.js +1 -1
- package/dist/components/tabs/TabsTrigger.js +1 -1
- package/dist/components/tabs/TabsTriggerList.js +1 -1
- package/dist/components/text/Text.js +1 -1
- package/dist/components/toast/Toast.js +1 -1
- package/dist/components/toast/ToastProvider.js +1 -1
- package/dist/components/toggle-group/ToggleGroupButton.js +1 -1
- package/dist/components/tooltip/TooltipContent.js +1 -1
- package/dist/components/video/Video.js +1 -1
- package/dist/docgen.json +1 -1
- package/dist/experiments/color-scheme/ColorScheme.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/utilities/hooks/useCallbackRef.js +1 -1
- package/package.json +6 -6
- package/dist/components/table/TableStickyColumnsContainer.d.ts +0 -9
- package/dist/components/table/TableStickyColumnsContainer.js +0 -1
- package/dist/docs/Accordion.mdx +0 -94
- package/dist/docs/ActionIcon.mdx +0 -87
- package/dist/docs/AlertDialog.mdx +0 -40
- package/dist/docs/Avatar.mdx +0 -129
- package/dist/docs/Badge.mdx +0 -55
- package/dist/docs/Box.mdx +0 -52
- package/dist/docs/Button.mdx +0 -68
- package/dist/docs/CONTRIBUTING.md +0 -224
- package/dist/docs/CSSWrapper.mdx +0 -10
- package/dist/docs/Carousel.mdx +0 -88
- package/dist/docs/Checkbox.mdx +0 -19
- package/dist/docs/CheckboxField.mdx +0 -14
- package/dist/docs/Chip.mdx +0 -118
- package/dist/docs/ChipDismissibleGroup.mdx +0 -33
- package/dist/docs/ChipToggleGroup.mdx +0 -27
- package/dist/docs/Combobox.mdx +0 -44
- package/dist/docs/DataTable.mdx +0 -279
- package/dist/docs/DateField.mdx +0 -20
- package/dist/docs/DateInput.mdx +0 -87
- package/dist/docs/Dialog.mdx +0 -68
- package/dist/docs/Dismissible.mdx +0 -48
- package/dist/docs/DismissibleGroup.mdx +0 -29
- package/dist/docs/Divider.mdx +0 -16
- package/dist/docs/DropdownMenu.mdx +0 -30
- package/dist/docs/EmptyState.mdx +0 -23
- package/dist/docs/FieldWrapper.mdx +0 -30
- package/dist/docs/FileInput.mdx +0 -45
- package/dist/docs/Flex.mdx +0 -16
- package/dist/docs/Form.mdx +0 -411
- package/dist/docs/Grid.mdx +0 -28
- package/dist/docs/Heading.mdx +0 -30
- package/dist/docs/Icon.mdx +0 -30
- package/dist/docs/Image.mdx +0 -14
- package/dist/docs/InlineMessage.mdx +0 -52
- package/dist/docs/Input.mdx +0 -24
- package/dist/docs/InputField.mdx +0 -26
- package/dist/docs/Label.mdx +0 -32
- package/dist/docs/Link.mdx +0 -53
- package/dist/docs/List.mdx +0 -38
- package/dist/docs/Loader.mdx +0 -16
- package/dist/docs/MarkdownContent.mdx +0 -77
- package/dist/docs/NavigationMenu.mdx +0 -144
- package/dist/docs/NotificationBadge.mdx +0 -35
- package/dist/docs/NumberInput.mdx +0 -37
- package/dist/docs/NumberInputField.mdx +0 -26
- package/dist/docs/PasswordField.mdx +0 -23
- package/dist/docs/PasswordInput.mdx +0 -15
- package/dist/docs/Popover.mdx +0 -29
- package/dist/docs/ProgressBar.mdx +0 -56
- package/dist/docs/README.mdx +0 -79
- package/dist/docs/RadioButton.mdx +0 -10
- package/dist/docs/RadioButtonField.mdx +0 -25
- package/dist/docs/RadioCard.mdx +0 -62
- package/dist/docs/SearchField.mdx +0 -26
- package/dist/docs/SearchInput.mdx +0 -13
- package/dist/docs/Select.mdx +0 -56
- package/dist/docs/SelectField.mdx +0 -17
- package/dist/docs/Sidedrawer.mdx +0 -155
- package/dist/docs/Slider.mdx +0 -117
- package/dist/docs/SliderField.mdx +0 -35
- package/dist/docs/Stack.mdx +0 -24
- package/dist/docs/StackContent.mdx +0 -32
- package/dist/docs/Stepper.mdx +0 -154
- package/dist/docs/Styling.mdx +0 -85
- package/dist/docs/Switch.mdx +0 -28
- package/dist/docs/Table.mdx +0 -146
- package/dist/docs/Tabs.mdx +0 -76
- package/dist/docs/Text.mdx +0 -24
- package/dist/docs/Textarea.mdx +0 -12
- package/dist/docs/TextareaField.mdx +0 -21
- package/dist/docs/Toast.mdx +0 -20
- package/dist/docs/ToggleGroup.mdx +0 -88
- package/dist/docs/Tooltip.mdx +0 -25
- package/dist/docs/TopBar.mdx +0 -95
- package/dist/docs/Video.mdx +0 -12
- package/dist/docs/accessibility.mdx +0 -67
- package/dist/docs/coreconcepts.mdx +0 -77
- package/dist/docs/introduction.mdx +0 -33
- package/dist/docs/versioning.mdx +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,63 @@
|
|
|
1
|
+
# [2.33.0](https://github.com/Atom-Learning/components/compare/v2.32.2...v2.33.0) (2023-02-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add build:color-scheme script ([4dda294](https://github.com/Atom-Learning/components/commit/4dda2940772cde65cc73890fdf2d63debf8df9d3))
|
|
7
|
+
* another pass over the documentation to fix bugs which weren't flagging in build ([b6089a1](https://github.com/Atom-Learning/components/commit/b6089a1d82391304065ee0015f66a482d9ef78b2))
|
|
8
|
+
* build local deps before test ([4820a9a](https://github.com/Atom-Learning/components/commit/4820a9a4140e693dacfe9aea44aad8096c11e9b4))
|
|
9
|
+
* change hasAlpha to use hasOwnProperty instead and keep typescript happy ([3c4a504](https://github.com/Atom-Learning/components/commit/3c4a504e0097791518c2fabe11b0214e9a901d67))
|
|
10
|
+
* Chip ci validate ([bc135f8](https://github.com/Atom-Learning/components/commit/bc135f86a2457966ec83031d3991ddacdfeaa1fa))
|
|
11
|
+
* ComponentProps keep changes to component from origin/main ([6fba7b6](https://github.com/Atom-Learning/components/commit/6fba7b67bff8acf49566ef19a97ce18cbe2d40ef))
|
|
12
|
+
* config tweaks to get images to work and fix to required external radio ([323f645](https://github.com/Atom-Learning/components/commit/323f645edb1e7e8cca28ad2bb874e28e3de0d1f0))
|
|
13
|
+
* docs Navigation arrow to take no space ([f3543d9](https://github.com/Atom-Learning/components/commit/f3543d98c3a37aca941a568b53d61285587a1e73))
|
|
14
|
+
* documentation path in config ([5d44f7f](https://github.com/Atom-Learning/components/commit/5d44f7f32257fd9f68a2aa99222c95239656088c))
|
|
15
|
+
* formatting changes for netlify to pick up blocks and borked datatable example ([8c5d993](https://github.com/Atom-Learning/components/commit/8c5d993c7c1f01c5bbd1b9ba50c692a1488778eb))
|
|
16
|
+
* get documentation building ([324d715](https://github.com/Atom-Learning/components/commit/324d7159aac33a25c3e68c4719297caa774b95bb))
|
|
17
|
+
* Header trigger color ([8257872](https://github.com/Atom-Learning/components/commit/8257872f6de93521f05c15367d0a7412eb5771c2))
|
|
18
|
+
* IconTokenItem proptype ([ef780f3](https://github.com/Atom-Learning/components/commit/ef780f35115b2f5264053024c1da0ef8ec9e6940))
|
|
19
|
+
* lib not to explode when higher react 18 or over (lib dependencies do not support 18: useForm) ([25ba883](https://github.com/Atom-Learning/components/commit/25ba883660380604511e6e43df5c76b7ec91599b))
|
|
20
|
+
* lib to add local-deps build before dev or build runs ([069febd](https://github.com/Atom-Learning/components/commit/069febd5c093cdc2819697068e9ff43f48463691))
|
|
21
|
+
* make Pagination generation more robust ([873ac19](https://github.com/Atom-Learning/components/commit/873ac19ada603f2b38716cebd82dc38042bad452))
|
|
22
|
+
* minimum required content added ([587c315](https://github.com/Atom-Learning/components/commit/587c31585642de7a3bf0dbdb09433b6bc561c7d6))
|
|
23
|
+
* navigation not working even though url is changing ([dfd99b9](https://github.com/Atom-Learning/components/commit/dfd99b91453f218fed5a8374ebca5848c532c29c))
|
|
24
|
+
* nothing to lint in documentation ([56e33f9](https://github.com/Atom-Learning/components/commit/56e33f9def13053954f38e7049f6fc2827c97328))
|
|
25
|
+
* overwriting boolean value bug in CodeBlock ([3839688](https://github.com/Atom-Learning/components/commit/3839688cd1daf0063b02098861479cd8d8479f17))
|
|
26
|
+
* padding override TokenListRoot ul Stack ([5efb66b](https://github.com/Atom-Learning/components/commit/5efb66b9bade60d445e653a4dfa0a5fb333cf003))
|
|
27
|
+
* pre markdown setup ([7b97fdc](https://github.com/Atom-Learning/components/commit/7b97fdcc5ec3f498ae540c6f1520cf9b38dfd5ce))
|
|
28
|
+
* remove .env from git ([4497617](https://github.com/Atom-Learning/components/commit/44976171b490de6db2806e7ea202a1441592150b))
|
|
29
|
+
* roll node-fetch back to 2 to avoid weird netlify-cms error ([352d242](https://github.com/Atom-Learning/components/commit/352d242b05881e1ff2b71aff67aa08e417c654cc))
|
|
30
|
+
* run server npm command from root when `local_backend` ([429687d](https://github.com/Atom-Learning/components/commit/429687d506805eca15b88684379140296fdd4202))
|
|
31
|
+
* spacing in content ([19b3c49](https://github.com/Atom-Learning/components/commit/19b3c49f4be62cfb835c6731f2a0c806df21d0de))
|
|
32
|
+
* stop generate-component-props from breaking if dist folder was completely deleted ([be0d24e](https://github.com/Atom-Learning/components/commit/be0d24ed7a250b16fea57be312e9db4d675685a6))
|
|
33
|
+
* suspect snapshot updates ([f11a807](https://github.com/Atom-Learning/components/commit/f11a8076143a69af915226f81bab6af2177bfc63))
|
|
34
|
+
* TokenListRoot readd ItemComponent typing ([5a0941b](https://github.com/Atom-Learning/components/commit/5a0941b0aac94ec5e289835743b25231883e8f1d))
|
|
35
|
+
* typescript errors ([19fd30d](https://github.com/Atom-Learning/components/commit/19fd30ded8273c99d0f0f94c4f660138e42c2137))
|
|
36
|
+
* update README ([5b8fe99](https://github.com/Atom-Learning/components/commit/5b8fe99843d90bfb4ecb71347f2786d4bf627034))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Features
|
|
40
|
+
|
|
41
|
+
* /documentation ([0fa3b25](https://github.com/Atom-Learning/components/commit/0fa3b2588cd783a2d734c23c709eb3ed28e9e872))
|
|
42
|
+
* add experimental flag to ColorScheme component ([8305d7d](https://github.com/Atom-Learning/components/commit/8305d7d471a307cc7c87df5eb8085708307ee9d7))
|
|
43
|
+
* add some additional tidbits into the README.md ([8b051a7](https://github.com/Atom-Learning/components/commit/8b051a70d70a226692d22492773c70c324b93d7f))
|
|
44
|
+
* bye documentation related lib stuff ([bfd30c2](https://github.com/Atom-Learning/components/commit/bfd30c28ba2f4274f39851b7849221132b3d6a76))
|
|
45
|
+
* ColorScheme alpha version ([23ef23d](https://github.com/Atom-Learning/components/commit/23ef23d701adca5dd9ed1c722931969b424167da))
|
|
46
|
+
* delete documentation in lib ([7cfbe2d](https://github.com/Atom-Learning/components/commit/7cfbe2df50a96c13f58a67c6c6e20359be0212ab))
|
|
47
|
+
* deps and package.json tweaks ([0110d13](https://github.com/Atom-Learning/components/commit/0110d139fa5f266f3b543eaa77649d364c2ee693))
|
|
48
|
+
* documentation ([ff654e0](https://github.com/Atom-Learning/components/commit/ff654e07f41adb82793295aea95c96581e58e65f))
|
|
49
|
+
* expand ComponentProps ([2268116](https://github.com/Atom-Learning/components/commit/22681165f22aa4fb143e2f511ad07b1abfcc05aa))
|
|
50
|
+
* meta and favicon ([686ec5d](https://github.com/Atom-Learning/components/commit/686ec5db8f453d9a744b79c2c963fca2ebd3c4d9))
|
|
51
|
+
* more ColorScheme tweak ([88849ed](https://github.com/Atom-Learning/components/commit/88849edd4e0dee74c1d41f2a44f5f4e47e79c4f9))
|
|
52
|
+
* more correct config.yml ([653f333](https://github.com/Atom-Learning/components/commit/653f333b3e20193c30bf0349daa33ab0b6a17e00))
|
|
53
|
+
* nest StackContent in Layout TabsContent ([02c0a0d](https://github.com/Atom-Learning/components/commit/02c0a0d70162bdd8c354788db29ddab58897f958))
|
|
54
|
+
* partial OAuth setup ([d02a25c](https://github.com/Atom-Learning/components/commit/d02a25cf9fc206b9c340ec7ae5734e3fff9226cf))
|
|
55
|
+
* README ([1e810e2](https://github.com/Atom-Learning/components/commit/1e810e249026428d461a30dc15bfeaa5fa6b33e8))
|
|
56
|
+
* rename tonal vars to base to match property of ColorScheme component ([47c9c7a](https://github.com/Atom-Learning/components/commit/47c9c7a5d86a8c258842fcb602e3a2218f54776b))
|
|
57
|
+
* replace custom id function with @lukeed/uuid ([383ee4c](https://github.com/Atom-Learning/components/commit/383ee4c09661b81968f9f662adc6e8f63951255e))
|
|
58
|
+
* replace tonal to base from ColorScheme ([e8d553e](https://github.com/Atom-Learning/components/commit/e8d553e02b3849857fa63004a2c57be307427965))
|
|
59
|
+
* update config with current design system site url and branch ([9688113](https://github.com/Atom-Learning/components/commit/968811362dd5caeab38d7cdb33817b4e1d6a42b8))
|
|
60
|
+
|
|
1
61
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
2
62
|
|
|
3
63
|
|
package/README.md
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Component Library
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|

|
|
5
5
|

|
|
6
6
|
|
|
7
|
-
`@atom-learning/components
|
|
7
|
+
`lib/`, released as `@atom-learning/components`, is a collection of generic React components built using [stitches](https://stitches.dev) and [radix](https://www.radix-ui.com/), it includes components that cover layout, content, data collection, media and a host of other UI concerns. It uses `@atom-learning/theme` to provide the design tokens for color, typography, spacing and layout.
|
|
8
|
+
|
|
9
|
+
You can read about the components included in `@atom-learning/components` at [https://design.atomlearning.technology](https://design.atomlearning.technology)
|
|
10
|
+
|
|
11
|
+
## Getting started
|
|
12
|
+
|
|
13
|
+
Install the publicly available `@atom-learning/components `npm package:
|
|
8
14
|
|
|
9
15
|
```
|
|
10
|
-
yarn add @atom-learning/components
|
|
16
|
+
yarn add @atom-learning/components
|
|
11
17
|
```
|
|
12
18
|
|
|
19
|
+
Import and use in your project:
|
|
20
|
+
|
|
13
21
|
```jsx
|
|
14
22
|
import { Box, Heading, Text } from '@atom-learning/components'
|
|
15
23
|
|
|
@@ -22,5 +30,3 @@ const Component = () => {
|
|
|
22
30
|
)
|
|
23
31
|
}
|
|
24
32
|
```
|
|
25
|
-
|
|
26
|
-
You can read more about the components included in `@atom-learning/components` at [https://design.atomlearning.technology](https://design.atomlearning.technology)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Item as m}from"@radix-ui/react-accordion";import r from"react";import{styled as l}from"../../stitches.js";const c=l(m,{width:"100%","&:not(:last-child)":{mb:"$1"}}),i=({children:t,value:o
|
|
1
|
+
import{Item as m}from"@radix-ui/react-accordion";import r from"react";import{styled as l}from"../../stitches.js";const c=l(m,{width:"100%","&:not(:last-child)":{mb:"$1"}}),i=({children:t,value:e,...o})=>r.createElement(c,{value:e,...o},t);export{i as AccordionItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronDown as i}from"@atom-learning/icons";import{Trigger as s}from"@radix-ui/react-accordion";import e from"react";import{styled as t}from"../../stitches.js";import{Icon as n}from"../icon/Icon.js";import{
|
|
1
|
+
import{ChevronDown as i}from"@atom-learning/icons";import{Trigger as s}from"@radix-ui/react-accordion";import e from"react";import{styled as t}from"../../stitches.js";import{Icon as n}from"../icon/Icon.js";import{ColorScheme as c}from"../../experiments/color-scheme/ColorScheme.js";import{focusVisibleStyleBlock as d}from"../../utilities/style/focus-visible-style-block.js";const l=t(n,{transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"},'[data-state="closed"] > &':{transform:"rotate(0deg)"}}),m=t(s,{border:0,py:"$3",px:"$4",width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",cursor:"pointer",bg:"$interactive2",color:"$interactiveForeground","&[data-disabled]":{opacity:.3,cursor:"not-allowed"},"&:not([data-disabled])":{"&:active, &:hover, &:focus-visible":{bg:"$interactive3"},"&:focus-visible":{...d()}},'&[data-state="open"]':{borderRadius:"$0 $0 0 0"},'&[data-state="closed"]':{borderRadius:"$0"}}),f=({children:o,colorScheme:r={},...a})=>e.createElement(c,{asChild:!0,accent:"slate",interactive:"loContrast1",...r},e.createElement(m,{...a},o,e.createElement(l,{is:i})));export{f as AccordionTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";import{styled as n}from"../../stitches.js";import{AvatarIcon as v}from"./AvatarIcon.js";import{AvatarImage as u}from"./AvatarImage.js";import{AvatarInitial as b}from"./AvatarInitial.js";import{AvatarPlaceholder as p}from"./AvatarPlaceholder.js";import{focusVisibleStyleBlock as z}from"../../utilities/style/focus-visible-style-block.js";const s={display:"flex",justifyContent:"center",alignItems:"center",color:"$tonal400",borderRadius:"$round",border:"2px solid $tonal100",backgroundColor:"$white",overflow:"hidden",variants:{size:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"},xl:{size:"$6"},xxl:{size:"$7"}}}}
|
|
1
|
+
import*as o from"react";import{styled as n}from"../../stitches.js";import{AvatarIcon as v}from"./AvatarIcon.js";import{AvatarImage as u}from"./AvatarImage.js";import{AvatarInitial as b}from"./AvatarInitial.js";import{AvatarPlaceholder as p}from"./AvatarPlaceholder.js";import{focusVisibleStyleBlock as z}from"../../utilities/style/focus-visible-style-block.js";const s={display:"flex",justifyContent:"center",alignItems:"center",color:"$tonal400",borderRadius:"$round",border:"2px solid $tonal100",backgroundColor:"$white",overflow:"hidden",variants:{size:{xs:{size:"$2"},sm:{size:"$3"},md:{size:"$4"},lg:{size:"$5"},xl:{size:"$6"},xxl:{size:"$7"}}}},$=n("div",s),f=n("button",{all:"unset",...s,"&:not([disabled])":{"&:hover":{borderColor:"$tonal400",backgroundColor:"$tonal50"},"&:active":{borderColor:"$primary",backgroundColor:"$tonal100"},"&:focus-visible":z()},"&[disabled]":{opacity:"30%",cursor:"not-allowed"}}),d=o.createContext({name:void 0,size:"lg"}),m=({children:a,name:e,size:i})=>{const t=o.useMemo(()=>({name:e,size:i}),[e,i]);return o.createElement(d.Provider,{value:t},a)},c=({children:a,size:e="lg",name:i,disabled:t=!1,onClick:l})=>o.createElement(m,{name:i,size:e},l?o.createElement(f,{size:e,disabled:t,onClick:t?void 0:l,css:{cursor:t?"auto":"pointer"}},a):o.createElement($,{size:e},a)),r=c;r.Image=u,r.Initial=b,r.Placeholder=p,r.Icon=v,r.displayName="Avatar";export{r as Avatar,c as AvatarRoot,d as AvatarRootContext,m as AvatarRootProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as
|
|
1
|
+
import{ChevronLeft as q,ChevronRight as H}from"@atom-learning/icons";import{useDayzed as J}from"dayzed";import*as e from"react";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Box as g}from"../box/Box.js";import{Button as C}from"../button/Button.js";import{Flex as Y}from"../flex/Flex.js";import{Icon as w}from"../icon/Icon.js";import{Text as K}from"../text/Text.js";import{styled as F}from"../../stitches.js";import{monthNamesShort as Q,weekdayNamesShort as V,DEFAULT_LABELS as X}from"./constants.js";import{Day as Z}from"./Day.js";const f=F("div",{display:"grid",gridTemplateColumns:"repeat(7, 1fr)",gridGap:"$1 $2"}),ee=F(C,{color:"$tonal600",p:"$3",width:"$6",variants:{selected:{false:{color:"$tonal600 !important",fontWeight:"400","&:hover":{bg:"$tonal100 !important",color:"$tonal600 !important"},"&[disabled]":{bg:"white !important"}}}}}),te=(i,c)=>{const u=i.slice(0,c);return i.slice(c).concat(u)},S=({css:i,refDateSelected:c,refDateToday:u,firstDayOfWeek:$=0,monthNames:N=Q,weekdayNames:T=V,labels:y=X,date:o=new Date,minDate:l,maxDate:m,setYear:A,...L})=>{const[a,E]=e.useState(!1),[s,k]=e.useState(o==null?void 0:o.getFullYear()),O=t=>{const r=o;r.setFullYear(t),A(r),E(!1)},W=l&&s-16<=l.getFullYear(),z=m&&s>=m.getFullYear(),B=Array.from({length:16},(t,r)=>{const n=s-r;return m&&n>m.getFullYear()||l&&n<l.getFullYear()?0:n}),{calendars:d,getBackProps:I,getForwardProps:M,getDateProps:G}=J({firstDayOfWeek:$,showOutsideDays:!0,date:o,minDate:l,maxDate:m,...L});return d.length?e.createElement(g,{css:{position:"relative",width:"min-content",mt:"-$1",...i}},e.createElement(Y,{css:{position:"absolute",top:0,right:"-$1"}},e.createElement(x,{label:y[a?"previousYear":"previous"],theme:"neutral",size:"md",...!a&&I({calendars:d}),...a&&{onClick:()=>k(s-16)},disabled:a&&W},e.createElement(w,{is:q})),e.createElement(x,{label:y[a?"nextYear":"next"],theme:"neutral",size:"md",...!a&&M({calendars:d}),...a&&{onClick:()=>k(s+16)},disabled:a&&z},e.createElement(w,{is:H}))),a&&e.createElement(f,{css:{gridTemplateColumns:"repeat(4, 1fr)",pt:"$7",direction:"rtl",gridGap:"$3 $1"}},B.map((t,r)=>{const n=t===o.getFullYear();return t?e.createElement(ee,{key:`${t}${r}`,theme:n?"primary":"neutral",onClick:()=>O(t),selected:n},t):e.createElement(g,{key:r,css:{width:"$6",height:"$4"}})})),!a&&d.map(({month:t,year:r,weeks:n})=>e.createElement(g,{key:`${t}${r}`},e.createElement(Y,{css:{height:"$4",alignItems:"center",mb:"$4"}},e.createElement(C,{theme:"neutral",css:{px:"0",color:"$tonal600"},onClick:()=>E(!0)},N[t]," ",r)),e.createElement(f,{css:{mb:"$3"}},te(T,$).map(p=>e.createElement(K,{as:"span",size:"sm",key:`${t}${r}${p}`,css:{fontWeight:600,textAlign:"center"}},p))),e.createElement(f,null,n.map((p,P)=>p.map((h,j)=>{const D=`${t}${r}${P}${j}`;if(!h)return e.createElement("div",{key:D});const{date:R,selected:b,today:v,prevMonth:U,nextMonth:_}=h;return e.createElement(Z,{isOutsideMonth:U||_,isSelected:b,isToday:v,key:D,ref:b?c:v?u:null,...G({dateObj:h}),type:"button"},R.getDate())})))))):null};S.displayName="Calendar";export{S as Calendar};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as
|
|
1
|
+
import{ChevronLeft as s,ChevronRight as i}from"@atom-learning/icons";import{ButtonBack as a,ButtonNext as l}from"pure-react-carousel";import*as r from"react";import{Icon as t}from"../icon/Icon.js";import{styled as o}from"../../stitches.js";const n={alignItems:"center",bg:"unset",border:"unset",color:"$primary",cursor:"pointer",display:"flex",justifyContent:"center",p:"unset",size:"$5",top:"50%",transform:"translateY(-50%)",transition:"color 0.15s ease-in-out","&:hover":{color:"$primaryMid"},"&:active":{color:"$primaryDark"},"&:disabled":{color:"$tonal100"}},m=o(a,n),c=o(l,n),p=e=>r.createElement(m,{...e},r.createElement(t,{is:s})),u=e=>r.createElement(c,{...e},r.createElement(t,{is:i}));export{u as CarouselArrowNext,p as CarouselArrowPrevious};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Slide as
|
|
1
|
+
import{Slide as r}from"pure-react-carousel";import*as e from"react";import{Box as m}from"../box/Box.js";import{styled as i}from"../../stitches.js";const l=i(r,{}),s=({children:t,...o})=>e.createElement(l,{...o,tag:"div"},e.createElement(m,{css:{px:"$3"}},t));export{s as CarouselSlide};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{useFormContext as h,useController as k}from"react-hook-form";import{Checkbox as F}from"../checkbox/Checkbox.js";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as b}from"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as v}from"../form/useFieldError.js";var x=(e=>(e.ON="on",e.OFF="off",e))(x||{});const c=({css:e,label:m,name:l,validation:r,description:d,defaultChecked:f=!1,checked:o,...s})=>{const{control:u}=h(),{error:n}=v(l),{field:{ref:p,onChange:a,value:i,name:C}}=k({name:l,control:u,rules:r,defaultValue:f});return t.useEffect(()=>{typeof o<"u"&&a(o)},[o]),t.createElement(b,{css:e,description:d,error:n,label:m,required:Boolean(r==null?void 0:r.required)},t.createElement(F,{ref:p,name:C,...s,onCheckedChange:a,value:i?"on":"off",checked:i,...n&&{state:"error"}}))};c.displayName="CheckboxField";export{c as CheckboxField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as C}from"../box/Box.js";import{Flex as g}from"../flex/Flex.js";import{Icon as
|
|
1
|
+
import*as e from"react";import{Box as C}from"../box/Box.js";import{Flex as g}from"../flex/Flex.js";import{Icon as p}from"../icon/Icon.js";import{getTextVariant as a}from"../text/Text.js";import{styled as m}from"../../stitches.js";import{overrideStitchesVariantValue as z}from"../../utilities/override-stitches-variant-value/overrideStitchesVariantValue.js";const d={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},h=m("span",{display:"inline-flex",alignItems:"center",px:"$1",flexGrow:1,...d,"& > *:not(:last-child)":{mr:"$1"}}),u={sm:"sm",md:"sm",lg:"md"},y=m(p,{flexShrink:0}),l=({...r})=>{const i=e.useContext(c),{size:t}=i,n=e.useMemo(()=>z(t,o=>u[o]),[t]);return e.createElement(y,{...r,size:n})},E=({children:r,...i})=>{const t=e.Children.toArray(r),n=t.length<=1;return e.createElement(h,{...i},t.map((o,$)=>!n&&typeof o=="string"?e.createElement(C,{as:"span",css:d,key:o},o):e.isValidElement(o)&&o.type===p?e.createElement(l,{key:`icon-${$}`,...o.props}):o))},f=m(g,{px:"$2",border:"1px solid",borderRadius:"$0",alignItems:"center",fontFamily:"$body",maxWidth:"100%",borderColor:"$primary",color:"$primaryMid",bg:"$primaryLight","&[data-disabled]":{opacity:"0.3",pointerEvents:"none"},variants:{size:{sm:{height:"$2",...a({size:"sm"})},md:{height:"$3",...a({size:"sm"})},lg:{height:"$4",...a({size:"md"})}}}}),c=e.createContext({}),x=({size:r,children:i})=>{const t=e.useMemo(()=>({size:r}),[r]);return e.createElement(c.Provider,{value:t},i)},v=e.forwardRef(({asWorkaround:r,size:i="md",...t},n)=>e.createElement(x,{size:i},e.createElement(f,{ref:n,as:r,size:i,...t}))),s=v;s.Content=E,s.Icon=l,s.displayName="Chip";export{s as Chip,l as ChipIcon,c as ChipRootContext,x as ChipRootProvider,h as StyledChipContent,y as StyledChipIcon,f as StyledRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as r from"react";import{Stack as a}from"../stack/Stack.js";const p=r.forwardRef(({gap:o=2,...
|
|
1
|
+
import*as r from"react";import{Stack as a}from"../stack/Stack.js";const p=r.forwardRef(({gap:o=2,...t},e)=>r.createElement(a,{ref:e,direction:"row",gap:o,align:!1,...t}));export{p as ChipGroup};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"react";import"../chip/Chip.js";import{ChipGroup as m}from"../chip/ChipGroup.js";import{DismissibleGroup as p}from"../dismissible-group/index.js";const
|
|
1
|
+
import*as o from"react";import"../chip/Chip.js";import{ChipGroup as m}from"../chip/ChipGroup.js";import{DismissibleGroup as p}from"../dismissible-group/index.js";const t=o.forwardRef((r,i)=>o.createElement(m,{as:p,ref:i,...r}));export{t as ChipDismissibleGroupRoot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"react";import{DataTableBody as t}from"./DataTableBody.js";import{DataTableProvider as e}from"./DataTableContext.js";import{DataTableDataCell as m}from"./DataTableDataCell.js";import{DataTableError as l}from"./DataTableError.js";import{DataTableGlobalFilter as i}from"./DataTableGlobalFilter.js";import{DataTableHead as p}from"./DataTableHead.js";import{DataTableHeaderCell as b}from"./DataTableHeaderCell.js";import{DataTableLoading as D}from"./DataTableLoading.js";import{DataTableRow as T}from"./DataTableRow.js";import{DataTableTable as f}from"./DataTableTable.js";import"./drag-and-drop/DragAndDropContainer.js";import"@dnd-kit/sortable";import"@dnd-kit/utilities";import"@tanstack/react-table";import"../table/Table.js";import"./drag-and-drop/Handle.js";import{DragAndDropTable as d}from"./drag-and-drop/DragAndDropTable.js";import{Pagination as n}from"./pagination/Pagination.js";const a=r=>o.createElement(e,{...r});a.Body=t,a.DataCell=m,a.DragAndDropTable=d,a.Head=p,a.HeaderCell=b,a.Pagination=n,a.Row=T,a.GlobalFilter=i,a.Table=f,a.Loading=D,a.Error=l;export{a as DataTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{Table as m}from"../table/Table.js";import{useDataTable as p}from"./DataTableContext.js";import{DataTable as i}from"./DataTable.js";const l=({striped:r=!1,...o})=>{const{getRowModel:a}=p();return t.createElement(m.Body,{...o,striped:r},a().rows.map(e=>t.createElement(i.Row,{row:e,key:e.id})))};export{l as DataTableBody};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{flexRender as l}from"@tanstack/react-table";import*as
|
|
1
|
+
import{flexRender as l}from"@tanstack/react-table";import*as t from"react";import{Table as o}from"../table/Table.js";const m=({cell:e})=>t.createElement(o.Cell,{key:e.id},l(e.column.columnDef.cell,e.getContext()));export{m as DataTableDataCell};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{debounce as p}from"throttle-debounce";import{OptionallyVisuallyHiddenContainer as u}from"../../utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js";import{Label as
|
|
1
|
+
import*as e from"react";import{debounce as p}from"throttle-debounce";import{OptionallyVisuallyHiddenContainer as u}from"../../utilities/optionally-visually-hidden-container/OptionallyVisuallyHiddenContainer.js";import{Label as d}from"../label/Label.js";import{SearchInput as f}from"../search-input/SearchInput.js";import{useDataTable as g}from"./DataTableContext.js";const h=({onChange:a,label:t,hideLabel:r=!1,...n})=>{const{setGlobalFilter:o,getState:m,resetPagination:i}=g(),{globalFilter:b}=m(),s=p(250,l=>{const{target:{value:c}}=l;a==null||a(l),i(),o(c)});return e.createElement(e.Fragment,null,e.createElement(u,{hidden:r},e.createElement(d,{css:{mb:"$3"},htmlFor:t},t)),e.createElement(f,{...n,defaultValue:b,onChange:s,name:t}))};export{h as DataTableGlobalFilter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"react";import{Table as
|
|
1
|
+
import*as l from"react";import{Table as a}from"../table/Table.js";import{DataTableDataCell as o}from"./DataTableDataCell.js";const r=({row:t})=>l.createElement(a.Row,null,t.getVisibleCells().map((e,m)=>l.createElement(o,{key:e.id,cell:e})));export{r as DataTableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Table as
|
|
1
|
+
import*as e from"react";import{Table as i}from"../table/Table.js";import{DataTable as t}from"./DataTable.js";import{AsyncDataState as c}from"./DataTable.types.js";import{useDataTable as p}from"./DataTableContext.js";import{DataTableLoading as b}from"./DataTableLoading.js";const D=({sortable:a,striped:r,theme:o,css:m,...n})=>{const{asyncDataState:s}=p(),l=s===c.PENDING;return e.createElement(e.Fragment,null,e.createElement(b,null),e.createElement(i,{...n,css:{...m,...l&&{opacity:.5,pointerEvents:"none",transition:"opacity 250ms linear 150ms"}}},e.createElement(t.Head,{theme:o,sortable:a}),e.createElement(t.Body,{striped:r})))};export{D as DataTableTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useSortable as f}from"@dnd-kit/sortable";import{CSS as d}from"@dnd-kit/utilities";import{flexRender as g}from"@tanstack/react-table";import*as e from"react";import{Table as l}from"../../table/Table.js";import{DataTableDataCell as c}from"../DataTableDataCell.js";import{useDragAndDropTable as b}from"./DragAndDropContainer.js";import{Handle as D}from"./Handle.js";import"../DataTable.js";import"../DataTable.types.js";import"../DataTableContext.js";import"../DataTableLoading.js";const u=({row:
|
|
1
|
+
import{useSortable as f}from"@dnd-kit/sortable";import{CSS as d}from"@dnd-kit/utilities";import{flexRender as g}from"@tanstack/react-table";import*as e from"react";import{Table as l}from"../../table/Table.js";import{DataTableDataCell as c}from"../DataTableDataCell.js";import{useDragAndDropTable as b}from"./DragAndDropContainer.js";import{Handle as D}from"./Handle.js";import"../DataTable.js";import"../DataTable.types.js";import"../DataTableContext.js";import"../DataTableLoading.js";const u=({row:t})=>{const{idColumn:i}=b(),{attributes:m,listeners:a,transform:n,setNodeRef:s,isDragging:o}=f({id:t.original[i]});return e.createElement(l.Row,{ref:s,css:{transform:d.Transform.toString(n),zIndex:o?5:void 0}},t.getVisibleCells().map((r,p)=>p===0?e.createElement(l.Cell,{key:r.id},e.createElement(D,{...m,...a,isDragging:o,css:{display:"inline-block"},label:"drag and drop"}),g(r.column.columnDef.cell,r.getContext())):e.createElement(c,{key:r.id,cell:r})))};export{u as DraggableRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DragHandle as n}from"@atom-learning/icons";import*as r from"react";import{styled as s}from"../../../stitches.js";import{ActionIcon as m}from"../../action-icon/ActionIcon.js";import{Icon as g}from"../../icon/Icon.js";const i=s(m,{color:"inherit !important",fill:"currentColor",variants:{isDragging:{true:{cursor:"grabbing"},false:{cursor:"grab"}}}}),l=r.forwardRef(({isDragging:o,size:e,...
|
|
1
|
+
import{DragHandle as n}from"@atom-learning/icons";import*as r from"react";import{styled as s}from"../../../stitches.js";import{ActionIcon as m}from"../../action-icon/ActionIcon.js";import{Icon as g}from"../../icon/Icon.js";const i=s(m,{color:"inherit !important",fill:"currentColor",variants:{isDragging:{true:{cursor:"grabbing"},false:{cursor:"grab"}}}}),l=r.forwardRef(({isDragging:o,size:e,...t},a)=>r.createElement(i,{ref:a,isDragging:o,appearance:"simple",size:e,...t},r.createElement(g,{is:n,size:e})));export{l as Handle,i as StyledHandle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Slot as c}from"@radix-ui/react-slot";import*as e from"react";const r=e.createContext({isDismissed:!1,setIsDismissed:()=>null}),n=({children:
|
|
1
|
+
import{Slot as c}from"@radix-ui/react-slot";import*as e from"react";const r=e.createContext({isDismissed:!1,setIsDismissed:()=>null}),n=({children:t,disabled:s})=>{const[i,l]=e.useState(!1),o=e.useMemo(()=>({disabled:s,isDismissed:i,setIsDismissed:l}),[s,i]);return e.createElement(r.Provider,{value:o},t)},u=({asChild:t=!1,value:s,onDismiss:i,...l})=>{const o=e.useContext(r),{isDismissed:d,disabled:a}=o;if(e.useEffect(()=>{d&&(i==null||i(s))},[d]),d)return null;const m={...a&&{["data-disabled"]:""},...l};return e.createElement(t?c:"div",{...m})},b=({disabled:t=!1,...s})=>e.createElement(n,{disabled:t},e.createElement(u,{...s}));export{b as DismissibleRoot,r as DismissibleRootContext,n as DismissibleRootProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Slot as m}from"@radix-ui/react-slot";import*as
|
|
1
|
+
import{Slot as m}from"@radix-ui/react-slot";import*as t from"react";import{DismissibleRootContext as l}from"./DismissibleRoot.js";const b=s=>t.createElement("button",{type:"button",...s},"Dismiss"),a=({asChild:s=!1,...i})=>{const e=t.useContext(l);if(e===void 0)throw new Error("Dismissible.Trigger can only be used within a Dismissible.Item");const{setIsDismissed:o,disabled:r}=e,n={disabled:r,onClick:()=>{o(!0)},...i};return t.createElement(s?m:b,{...n})};export{a as DismissibleTrigger};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:
|
|
1
|
+
import e from"react";import{styled as n}from"../../stitches.js";import{DropdownMenuItem as m}from"./DropdownMenuItem.js";const i=n("a",{textDecoration:"none"}),l=({children:t,href:o,...r})=>e.createElement(m,{...r,asChild:!0},e.createElement(i,{href:o,role:"menuitem"},t));export{l as DropdownMenuLinkItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Text as r}from"../text/Text.js";const s=({children:
|
|
1
|
+
import*as e from"react";import{Text as r}from"../text/Text.js";const s=({children:t,css:o})=>e.createElement(r,{size:"sm",css:{color:"$tonal300",maxWidth:"80ch",...o}},t);export{s as Description};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Box as
|
|
1
|
+
import*as e from"react";import{Box as o}from"../box/Box.js";import{Checkbox as d}from"../checkbox/Checkbox.js";import{InlineMessage as f}from"../inline-message/InlineMessage.js";import{Label as $}from"../label/Label.js";import{RadioButton as u}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";import{Description as E}from"./FieldDescription.js";const l=({align:n="start",children:a,css:s,description:i,direction:t="row",error:m,label:p,required:c})=>e.createElement(o,{css:s},e.createElement($,{align:n,direction:t,required:c,type:"inline"},e.Children.map(a,r=>e.createElement(o,{css:{[t==="reverse"?"ml":"mr"]:"$3",...((r==null?void 0:r.type)===d||(r==null?void 0:r.type)===u)&&{transform:"translateY($space$1)"}}},r)),p),m&&e.createElement(f,{css:{mt:"$2"}},m),i&&e.createElement(E,{css:{mt:"$2",[t==="reverse"?"mr":"ml"]:"calc($space$3 + $sizes$1)"}},i));l.displayName="InlineFieldWrapper";export{l as InlineFieldWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:
|
|
1
|
+
import{Upload as c}from"@atom-learning/icons";import*as e from"react";import{Button as s}from"../button/Button.js";import{Icon as u}from"../icon/Icon.js";const t=({accept:l,children:i,multiple:n=!1,onFileSelect:o,...r})=>{const p=a=>{const{files:m}=a.target;o(m)};return e.createElement(s,{as:"label",...r},e.createElement(u,{is:c}),i,e.createElement("input",{type:"file",onChange:p,accept:l,multiple:n,hidden:!0}))};t.displayName="FileInput";export{t as FileInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as s from"react";import{styled as p}from"../../stitches.js";import{createThemeVariants as o}from"../../utilities/create-theme-variants/createThemeVariants.js";const d=p("div",{display:"grid",variants:{gap:o("space",{gap:"$key"})}}),a=({css:
|
|
1
|
+
import*as s from"react";import{styled as p}from"../../stitches.js";import{createThemeVariants as o}from"../../utilities/create-theme-variants/createThemeVariants.js";const d=p("div",{display:"grid",variants:{gap:o("space",{gap:"$key"})}}),a=({css:t,gap:m=2,minItemSize:e,maxItemSize:i="1fr",...r})=>s.createElement(d,{css:{...e&&{gridTemplateColumns:`repeat(auto-fit, minmax(${e}, ${i}))`},...t},gap:m,...r});a.displayName="Grid";export{a as Grid};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{styled as
|
|
1
|
+
import*as i from"react";import{styled as f}from"../../stitches.js";import{capsize as e}from"../../utilities/style/capsize.js";const t=f("h2",{fontFamily:"$display",fontWeight:700,m:0,variants:{size:{xs:{fontFamily:"$body",fontWeight:600,fontSize:"$md",lineHeight:1.5,...e(.3864)},sm:{fontSize:"$lg",lineHeight:1.14,...e(.2174,.2254)},md:{fontSize:"$xl",lineHeight:1.14,...e(.2174,.2254)},lg:{fontSize:"$2xl",lineHeight:1.08,...e(.1865,.1945)},xl:{fontSize:"$3xl",lineHeight:1.12,...e(.206,.214)},xxl:{fontSize:"$4xl",lineHeight:1.06,...e(.1793,.1873)}},noCapsize:{true:{"&::before, &::after":{display:"none !important"}}}}}),n=i.forwardRef(({size:o="md",...l},a)=>i.createElement(t,{ref:a,size:o,...l}));n.displayName="Heading";export{n as Heading,t as StyledHeading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as n}from"../../stitches.js";const i=n("svg",{display:"inline-block",fill:"none",stroke:"currentcolor",strokeLinecap:"round",strokeLinejoin:"round",verticalAlign:"middle",variants:{size:{sm:{size:"$1",strokeWidth:"1.5"},md:{size:"$2",strokeWidth:"1.75"},lg:{size:"$3",strokeWidth:"2"}}}}),d=e.forwardRef(({is:r,size:o="md",...
|
|
1
|
+
import*as e from"react";import{styled as n}from"../../stitches.js";const i=n("svg",{display:"inline-block",fill:"none",stroke:"currentcolor",strokeLinecap:"round",strokeLinejoin:"round",verticalAlign:"middle",variants:{size:{sm:{size:"$1",strokeWidth:"1.5"},md:{size:"$2",strokeWidth:"1.75"},lg:{size:"$3",strokeWidth:"2"}}}}),d=e.forwardRef(({is:r,size:o="md",...t},s)=>e.createElement(i,{size:o,"aria-hidden":"true",...t,as:r,ref:s}));export{d as Icon,i as StyledIcon};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Flex as a}from"../flex/Flex.js";import{Icon as c}from"../icon/Icon.js";import{Text as E}from"../text/Text.js";import{styled as
|
|
1
|
+
import*as e from"react";import{Flex as a}from"../flex/Flex.js";import{Icon as c}from"../icon/Icon.js";import{Text as E}from"../text/Text.js";import{styled as t}from"../../stitches.js";import{INLINE_MESSAGE_THEMES as f,INLINE_MESSAGE_ICONS as l}from"./InlineMessage.config.js";const p=t(a,{variants:{theme:f}}),I=t(c,{flexShrink:"0",mr:"$2"}),S=({css:s,showIcon:m=!0,theme:r="error",size:o="sm",children:n,...i})=>e.createElement(p,{theme:r,css:s,...i},m&&e.createElement(I,{size:"sm",is:l[r]}),e.createElement(E,{as:"span",size:o,css:{transform:"translateY($space$0)"}},n));export{S as InlineMessage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as t}from"../../stitches.js";import{getTextVariant as i}from"../text/Text.js";const p=t("label",{color:"$tonal500",fontFamily:"$body",m:0,variants:{size:{sm:i({size:"sm"}),md:i({size:"md"})},type:{block:{display:"block",fontWeight:600},inline:{display:"flex",fontWeight:400,maxWidth:"max-content"}},align:{start:{},center:{}},direction:{reverse:{},row:{}}},compoundVariants:[{type:"inline",align:"start",css:{alignItems:"flex-start"}},{type:"inline",align:"center",css:{alignItems:"center"}},{type:"inline",direction:"reverse",css:{flexDirection:"row-reverse"}},{type:"inline",direction:"row",css:{flexDirection:"row"}}]}),y=t("span",{color:"$danger",ml:"$1",fontWeight:400}),n=({align:r="start",as:a="label",direction:l="row",size:o="md",type:s="block",children:c,required:m,...d})=>e.createElement(p,{as:a,size:o,type:s,align:r,direction:l,...d},c,m&&e.createElement(y,{"aria-hidden":!0},"*"));n.displayName="Label";export{n as Label};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{styled as a}from"../../stitches.js";import{StyledHeading as p}from"../heading/Heading.js";import{StyledLi as s}from"../list/List.js";import"../markdown-content/components/MarkdownCode.js";import{StyledMarkdownEmphasis as f}from"../markdown-content/components/MarkdownEmphasis.js";import"../markdown-content/components/MarkdownInlineCode.js";import"../image/Image.js";import{StyledText as d,textVariants as l}from"../text/Text.js";import"../markdown-content/components/MarkdownStrong.js";import"../divider/Divider.js";const e=a("a",{bg:"unset",border:"unset",p:"unset",color:"$primary",cursor:"pointer",fontFamily:"$body",textDecoration:"none","&:focus, &:hover":{color:"$primaryMid",textDecoration:"underline"},"&:active":{color:"$primaryDark"},[`${d} > &, ${p} > &, ${s} > &, ${f} > &`]:{fontSize:"100%",lineHeight:1,"&::before, &::after":{content:"none"}},variants:l}),o=t.forwardRef(({size:i="md",href:r,...n},m)=>t.createElement(e,{...!r&&{as:"button",noCapsize:!0},size:i,href:r,...n,ref:m}));o.displayName="Link";export{o as Link,e as StyledLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as
|
|
1
|
+
import*as e from"react";import{styled as r}from"../../stitches.js";import{textVariants as d}from"../text/Text.js";const t=r("li",{}),l=r("ul",{fontFamily:"$body",m:"unset",p:"unset",[`& > ${t}`]:{"&:not(:last-child)":{mb:"$2"},"&:last-child":{mb:0}},variants:{...d,as:{ol:{pl:"$4",listStyle:"decimal",[`& > ${t}`]:{pl:"$1","&::marker":{fontSize:"$sm",fontWeight:"bold"}}},ul:{pl:"$3",[`& > ${t}`]:{pl:"$2","&::marker":{content:"\u2022",fontWeight:"bold"}}}},theme:{primary:{[`& > ${t}`]:{"&::marker":{color:"$primary"}}}}}}),o=e.forwardRef(({size:i="md",noCapsize:m=!0,ordered:a,...s},n)=>e.createElement(l,{ref:n,as:a?"ol":"ul",size:i,noCapsize:m,...s}));o.Item=t;export{o as List,t as StyledLi,l as StyledList};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"react";import{styled as n}from"../../../stitches.js";const o=n("em",{fontStyle:"italic"}),a=({node:
|
|
1
|
+
import*as l from"react";import{styled as n}from"../../../stitches.js";const o=n("em",{fontStyle:"italic"}),a=({node:t,handleNode:r})=>{var e;return l.createElement(o,null,(e=t.children)==null?void 0:e.map(r))};export{a as MarkdownEmphasis,o as StyledMarkdownEmphasis};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{Heading as
|
|
1
|
+
import*as i from"react";import{Heading as d}from"../../heading/Heading.js";const o=e=>{switch(e){case 1:return{size:"xl",as:"h1"};case 2:return{size:"lg",as:"h2"};case 3:return{size:"md",as:"h3"};case 4:return{size:"sm",as:"h4"};case 5:return{size:"xs",as:"h5"};default:return{size:"xs",as:"h6"}}},c=({node:e,handleNode:r,...a})=>{var s;const{as:t,size:n}=o(e.depth);return i.createElement(d,{as:t,size:n,...a},(s=e.children)==null?void 0:s.map(r))};export{c as MarkdownHeading};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{Image as
|
|
1
|
+
import*as e from"react";import{Image as o}from"../../image/Image.js";const m=({node:r,css:a})=>{var t;return e.createElement(o,{src:r.url,alt:(t=r.alt)!=null?t:void 0,css:a})};export{m as MarkdownImage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{styled as n}from"../../../stitches.js";import{Box as
|
|
1
|
+
import*as e from"react";import{styled as n}from"../../../stitches.js";import{Box as t}from"../../box/Box.js";const r=n(t,{bg:"$tonal100",borderRadius:"$0",color:"$tonal600",display:"inline-block",fontFamily:"$mono",fontSize:"85%",p:"$0 $1"}),l=({node:o})=>e.createElement(r,{as:"code"},o.value);export{l as MarkdownInlineCode};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:
|
|
1
|
+
import*as l from"react";import{Link as i}from"../../link/Link.js";const n=({node:e,handleNode:o})=>{var r,t;return l.createElement(i,{title:(r=e.title)!=null?r:void 0,href:e.url},(t=e.children)==null?void 0:t.map(o))};export{n as MarkdownLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as o from"react";import{List as n}from"../../list/List.js";const m=({node:e,handleNode:r})=>{var t;return o.createElement(n.Item,null,(t=e.children)==null?void 0:t.map(r))};export{m as MarkdownListItem};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{Text as n}from"../../text/Text.js";const d=({node:e,handleNode:a,...o})=>{var r;return t.createElement(n,{...o},(r=e.children)==null?void 0:r.map(a))};export{d as MarkdownParagraph};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as r from"react";import{styled as e}from"../../../stitches.js";const d=e("strong",{fontWeight:600}),l=({node:t,handleNode:n})=>{var o;return r.createElement(d,null,(o=t.children)==null?void 0:o.map(n))};export{l as MarkdownStrong};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as t from"react";import{Divider as e}from"../../divider/Divider.js";const o=({css:r})=>t.createElement(e,{css:{width:"100%",...r}});export{o as MarkdownThematicBreak};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"@radix-ui/react-navigation-menu";import
|
|
1
|
+
import*as i from"@radix-ui/react-navigation-menu";import e from"react";import{preventHover as o}from"./preventHover.js";import{styled as t}from"../../stitches.js";const a=t("ul",{listStyle:"none",m:0,p:0}),m=t(i.Content,{p:"$3",bg:"white",mt:"4px",boxShadow:"$1",borderRadius:"$1"}),n=({children:r})=>e.createElement(m,{onPointerMove:o,onPointerLeave:o},e.createElement(a,null,r));n.displayName="NavigationMenuDropdownContent";export{n as NavigationMenuDropdownContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as n from"@radix-ui/react-navigation-menu";import e from"react";import{styled as t}from"../../stitches.js";import{navigationMenuBaseItemStyles as o,navigationMenuDisabledItemStyles as p,navigationMenuActiveItemStyles as v}from"./NavigationMenu.styles.js";const u=t("button",{...o,...p}),y=t(n.Item),f=t(n.Link,o,{display:"block",textDecoration:"none",lineHeight:1,variants:{elementType:{dropdownItem:{"&[data-active]":{background:"$primaryLight",color:"$primary","*":{color:"$primary"},"&:hover":{background:"$tonal50"},"&:active":{background:"$tonal100"},"&:focus-visible":{boxShadow:"0 0 0 2px $colors$primary"}}},link:{"&[data-active]":{...v}}}}}),r=e.forwardRef(({children:a,href:l,disabled:m,css:s,variant:c="link",...i},d)=>e.createElement(y,null,m?e.createElement(u,{disabled:!0,...i},a):e.createElement(f,{href:l,ref:d,elementType:c,css:s,...i},a)));r.displayName="NavigationMenuLink";export{r as NavigationMenuLink};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"react";import{styled as o}from"../../stitches.js";import{Box as i}from"../box/Box.js";import{Flex as n}from"../flex/Flex.js";const l=o(i,{position:"relative"}),a=o(n,{fontFamily:"$body",fontSize:"$sm",flexDirection:"column",justifyContent:"center",position:"absolute",top:"0",right:"0",transform:"translate(calc($sizes$2 / 2), -50%)",borderRadius:"$round",p:"$2",height:"$2",minWidth:"$2",textAlign:"center",color:"#fff",bg:"$primary"}),m=({value:t,children:r})=>e.createElement(l,null,!!t&&e.createElement(a,{role:"status"},t),r);export{m as NotificationBadge};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Minus as
|
|
1
|
+
import{Minus as B,Plus as $}from"@atom-learning/icons";import*as t from"react";import{Flex as F}from"../flex/Flex.js";import{Input as H}from"../input/Input.js";import{NumberInputStepper as x}from"./NumberInputStepper.js";const N=t.forwardRef((g,k)=>{const{name:E,min:o=0,max:l=Number.MAX_SAFE_INTEGER,step:s=1,initialValue:y=0,disabled:u=!1,readonly:m=!1,size:v="md",onChange:C,stepperButtonLabels:T,disabledTooltipContent:A,css:I,...L}=g,[r,M]=t.useState(y),i=t.useRef(null);t.useImperativeHandle(k,()=>i.current);const w={increment:"increment",decrement:"decrement",...T},R={decrement:`Cannot enter values below ${o}`,increment:`Cannot enter values above ${l}`,...A},d=r>=l,c=r<=o,p=t.useCallback(e=>Math.min(Math.max(e,o),l),[l,o]),a=t.useCallback(e=>{M(e),C==null||C(Number(e))},[C]),z=t.useCallback(e=>{const n=e.target.value.replace(/\D/g,"");a(n)},[a]),b=t.useCallback(()=>{var e;if(d||m)return;(e=i==null?void 0:i.current)==null||e.focus();let n;r===""?n=s:n=Number(r)+s,a(p(n))},[p,d,m,s,a,r]),f=t.useCallback(()=>{var e;if(c||m)return;(e=i==null?void 0:i.current)==null||e.focus();let n;r===""?n=o:n=Number(r)-s,a(p(n))},[p,c,m,o,s,a,r]),D=t.useCallback(e=>{if(e.nativeEvent.isComposing)return;const n=e.key,h={ArrowUp:b,ArrowRight:b,ArrowDown:f,ArrowLeft:f,Home:()=>a(o),End:()=>a(l)}[n];h&&(e.preventDefault(),h(e))},[b,f,a,o,l]),S={name:E,type:"number",value:r,...L,onChange:z,onKeyDown:D,size:v,css:{borderRadius:"0px",width:"$6","&:disabled":{opacity:.3,pointerEvents:"none"}},ref:i,readOnly:m,disabled:u,"aria-valuemin":o,"aria-valuemax":l,"aria-valuenow":Number(r),role:"spinbutton"};return t.createElement(F,{css:I},t.createElement(x,{onClick:f,icon:B,css:{borderRight:"none",borderTopRightRadius:"0px",borderBottomRightRadius:"0px"},size:v,disabled:c||u,showTooltip:c&&!u,disabledTooltipContent:R.decrement,label:w.decrement}),t.createElement(H,{...S}),t.createElement(x,{onClick:b,icon:$,css:{borderLeft:"none",borderTopLeftRadius:"0px",borderBottomLeftRadius:"0px"},size:v,disabled:d||u,showTooltip:d&&!u,disabledTooltipContent:R.increment,label:w.increment}))});N.displayName="NumberInput";export{N as NumberInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as i from"react";import{useFormContext as c}from"react-hook-form";import{FieldWrapper as f}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{NumberInput as F}from"../number-input/NumberInput.js";const m=({css:p,label:n,name:r,validation:e,prompt:a,description:l,...d})=>{const{register:
|
|
1
|
+
import*as i from"react";import{useFormContext as c}from"react-hook-form";import{FieldWrapper as f}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{NumberInput as F}from"../number-input/NumberInput.js";const m=({css:p,label:n,name:r,validation:e,prompt:a,description:l,...d})=>{const{register:t,trigger:s}=c(),{error:o}=b(r),u=e?t(e):t;return i.createElement(f,{css:p,description:l,error:o,fieldId:r,label:n,prompt:a,required:Boolean(e==null?void 0:e.required)},i.createElement(F,{id:r,name:r,ref:u,...o&&{state:"error","aria-invalid":!0},...d,onChange:s}))};m.displayName="NumberInputField";export{m as NumberInputField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{POPOVER_Z_INDEX as c}from"../../constants/zIndices.js";import{styled as t}from"../../stitches.js";import{ActionIcon as f}from"../action-icon/ActionIcon.js";import{Icon as
|
|
1
|
+
import{Close as r}from"@atom-learning/icons";import{Content as l,Arrow as p,Close as h}from"@radix-ui/react-popover";import*as e from"react";import{POPOVER_Z_INDEX as c}from"../../constants/zIndices.js";import{styled as t}from"../../stitches.js";import{ActionIcon as f}from"../action-icon/ActionIcon.js";import{Icon as x}from"../icon/Icon.js";import{slideDownAndFade as $,slideLeftAndFade as g,slideUpAndFade as w,slideRightAndFade as z}from"../../utilities/style/keyframe-animations.js";const b=t(l,{bg:"white",borderRadius:"$1",boxShadow:"$2",maxWidth:"90vw",p:"$sizes$2",pr:"$6",position:"relative",zIndex:c,"@allowMotion":{animationDuration:"75ms",animationTimingFunction:"cubic-bezier(0.16, 1, 0.3, 1)",willChange:"transform, opacity",'&[data-state="open"]':{'&[data-side="top"]':{animationName:$},'&[data-side="right"]':{animationName:g},'&[data-side="bottom"]':{animationName:w},'&[data-side="left"]':{animationName:z}}},variants:{size:{sm:{maxWidth:"200px"},md:{maxWidth:"400px"},lg:{maxWidth:"600px"}}}}),C=t(p,{fill:"white",zIndex:1,'[data-align="end"] &':{mr:"$sizes$2"},'[data-align="start"] &':{ml:"$sizes$2"}}),u=({children:i,side:o="top",sideOffset:a=8,closePopoverText:s="Close popover",showCloseButton:n=!0,size:m="md",...d})=>e.createElement(b,{size:m,side:o,sideOffset:a,...d},n&&e.createElement(f,{as:h,css:{position:"absolute",right:"$0",top:"$0"},label:s,size:"md",theme:"neutral"},e.createElement(x,{is:r})),i,e.createElement(C,{width:16,height:8}));export{u as PopoverContent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"@radix-ui/react-radio-group";import*as r from"react";import{styled as
|
|
1
|
+
import*as o from"@radix-ui/react-radio-group";import*as r from"react";import{styled as t}from"../../stitches.js";const n=t(o.Item,{alignItems:"center",appearance:"none",backgroundColor:"transparent",border:"1px solid $tonal400",borderRadius:"$round",color:"white",cursor:"pointer",display:"flex",justifyContent:"center",p:0,size:"$1",transition:"all 50ms ease-out","&:focus":{outline:"2px solid $primary",outlineOffset:"1px"},'&[data-state="checked"]':{backgroundColor:"$primary",borderColor:"$primary"},"&[disabled]":{backgroundColor:"$tonal100",borderColor:"$tonal400",color:"$tonal400",cursor:"not-allowed"}}),l=t(o.Indicator,{size:"6px",borderRadius:"$round",backgroundColor:"currentcolor",position:"absolute"}),e=a=>r.createElement(n,{...a},r.createElement(l,null));e.displayName="RadioButton";export{e as RadioButton};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import{useFormContext as
|
|
1
|
+
import*as e from"react";import{useFormContext as B,useController as F}from"react-hook-form";import{Description as R}from"../field-wrapper/FieldDescription.js";import"../form/Form.js";import{useFieldError as V}from"../form/useFieldError.js";import{InlineMessage as b}from"../inline-message/InlineMessage.js";import{Label as h}from"../label/Label.js";import"../radio-button/RadioButton.js";import{RadioButtonGroup as x}from"../radio-button/RadioButtonGroup.js";import{styled as y}from"../../stitches.js";import{RadioField as q}from"./RadioField.js";const I=y("fieldset",{all:"unset"}),r=({children:d,css:c,direction:f="column",defaultValue:l,value:o,description:n,label:p,name:a,validation:t,onValueChange:i,...E})=>{const{control:C}=B(),{field:{ref:g,onChange:m,value:v,name:$}}=F({name:a,control:C,rules:t,defaultValue:l}),{error:u}=V(a);return e.useEffect(()=>{typeof o<"u"&&m(o)},[o]),e.createElement(I,{css:c},e.createElement(h,{as:"legend",css:{p:0,mb:"$3"},required:Boolean(t==null?void 0:t.required)},p),n&&e.createElement(R,{css:{mb:"$3"}},n),e.createElement(x,{ref:g,direction:f,defaultValue:l,onValueChange:s=>{m(s),i==null||i(s)},value:v,...E},d),u&&e.createElement(b,{css:{mt:"$2"}},u))};r.Item=q,r.displayName="RadioButtonField";export{r as RadioButtonField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as
|
|
1
|
+
import*as e from"react";import"../field-wrapper/FieldWrapper.js";import{InlineFieldWrapper as r}from"../field-wrapper/InlineFieldWrapper.js";import{RadioButton as m}from"../radio-button/RadioButton.js";import"../radio-button/RadioButtonGroup.js";const o=({css:t,label:a,value:i,...l})=>e.createElement(r,{css:t,label:a},e.createElement(m,{value:i,...l}));o.displayName="RadioField";export{o as RadioField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as d from"@radix-ui/react-radio-group";import*as
|
|
1
|
+
import*as d from"@radix-ui/react-radio-group";import*as t from"react";import{Stack as p}from"../stack/Stack.js";import{RadioCard as c}from"./RadioCard.js";const f=({css:e,children:r,size:l,isFullWidth:o,align:a,gap:s="3",justify:m,...n})=>t.createElement(d.Root,{...n},t.createElement(p,{direction:"row",justify:m,gap:s,css:e},t.Children.map(r,i=>t.isValidElement(i)&&(i==null?void 0:i.type)===c?t.cloneElement(i,{size:l,isFullWidth:o,align:a}):i)));export{f as RadioCardGroup};
|
|
@@ -5,6 +5,8 @@ export declare type SearchInputProps = React.ComponentProps<typeof Input> & {
|
|
|
5
5
|
size?: 'sm' | 'md';
|
|
6
6
|
css?: CSS;
|
|
7
7
|
value?: string;
|
|
8
|
+
defaultValue?: string;
|
|
9
|
+
onValueChange?: (newValue: string) => void;
|
|
8
10
|
clearText?: string;
|
|
9
11
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Search as z,Close as
|
|
1
|
+
import{Search as z,Close as H}from"@atom-learning/icons";import*as e from"react";import{ActionIcon as I}from"../action-icon/ActionIcon.js";import{Box as k}from"../box/Box.js";import{Icon as E}from"../icon/Icon.js";import{Input as L}from"../input/Input.js";import{styled as f}from"../../stitches.js";import{useCallbackRef as x}from"../../utilities/hooks/useCallbackRef.js";var N=(t=>(t.SEARCH="SEARCH",t.CLEAR="CLEAR",t))(N||{});const O=f(E,{color:"$tonal300",position:"absolute",pointerEvents:"none",variants:{size:{sm:{top:"$2",right:"$2",size:"$1"},md:{top:10,right:10,size:20}}}}),T=f(L,{'&::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, & input[type="search"]::-webkit-search-results-decoration':{display:"none"}}),h=e.forwardRef(({size:t="md",css:C,value:r,defaultValue:i="",onValueChange:n,clearText:b="Clear",onChange:c,...d},v)=>{const[u,R]=x(),[A,p]=e.useState(i),[S,m]=e.useState(i?"CLEAR":"SEARCH");e.useEffect(()=>{typeof r>"u"||(p(r),m(r?"CLEAR":"SEARCH"))},[r]),e.useImperativeHandle(v,()=>u.current);const w=()=>{var s,o;const a=u.current;if(!a)return;const l=(s=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:s.set;(o=l==null?void 0:l.call)==null||o.call(l,a,"");const g=new Event("input",{bubbles:!0});a.dispatchEvent(g),a.focus(),n==null||n("")},y=s=>{c==null||c(s);const o=s.target.value;p(o),n==null||n(o),m(o?"CLEAR":"SEARCH")},$=()=>S==="SEARCH"?e.createElement(O,{is:z,size:t,css:{size:t=="sm"?"$1":20}}):e.createElement(I,{label:b,theme:"neutral",size:t,css:{position:"absolute",top:"0",right:"$1"},onClick:w},e.createElement(E,{is:H}));return e.createElement(k,{css:{position:"relative",...C}},e.createElement(T,{ref:R,size:t,type:"search",...d,value:A,onChange:y,css:{pr:t==="sm"?"$5":"$6"}}),$())});h.displayName="SearchInput";export{h as SearchInput};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as
|
|
1
|
+
import*as i from"react";import{useFormContext as u}from"react-hook-form";import{FieldWrapper as F}from"../field-wrapper/FieldWrapper.js";import"../field-wrapper/InlineFieldWrapper.js";import"../form/Form.js";import{useFieldError as b}from"../form/useFieldError.js";import{Select as h}from"../select/Select.js";const l=({css:m=void 0,children:d,name:e,label:p,validation:r,prompt:a,description:n,hideLabel:s,...c})=>{const{register:o}=u(),{error:t}=b(e),f=r?o(r):o;return i.createElement(F,{css:m,description:n,error:t,fieldId:e,label:p,prompt:a,required:Boolean(r==null?void 0:r.required),hideLabel:s},i.createElement(h,{name:e,id:e,...c,ref:f,...t&&{state:"error"}},d))};l.displayName="SelectField";export{l as SelectField};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as
|
|
1
|
+
import{Content as i}from"@radix-ui/react-accordion";import t from"react";import{keyframes as e,styled as n}from"../../../stitches.js";import{Box as m}from"../../box/Box.js";const c=e({from:{height:0},to:{height:"var(--radix-accordion-content-height)"}}),d=e({from:{height:"var(--radix-accordion-content-height)"},to:{height:0}}),h=n(i,{bg:"white",overflow:"hidden","@allowMotion":{'&[data-state="open"]':{animation:`${c} 300ms ease-out`},'&[data-state="closed"]':{animation:`${d} 300ms ease-out`}}}),s=({children:o,...a})=>t.createElement(h,{...a},t.Children.map(o,r=>t.createElement(m,{css:{"> a":{px:"$6"},"> button":{px:"$6"}}},r)));export{s as SidedrawerAccordionContent};
|