@veeqo/ui 10.0.0-beta.3 → 10.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.cjs +4 -4
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.js +4 -4
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Alerts/Alert/Alert.cjs +1 -0
- package/dist/components/Alerts/Alert/Alert.cjs.map +1 -1
- package/dist/components/Alerts/Alert/Alert.js +1 -0
- package/dist/components/Alerts/Alert/Alert.js.map +1 -1
- package/dist/components/Alerts/Alert/styled.cjs +1 -0
- package/dist/components/Alerts/Alert/styled.cjs.map +1 -1
- package/dist/components/Alerts/Alert/styled.d.ts +1 -1
- package/dist/components/Alerts/Alert/styled.js +1 -0
- package/dist/components/Alerts/Alert/styled.js.map +1 -1
- package/dist/components/AnimatedDropdown/AnimatedDropdown.cjs +4 -0
- package/dist/components/AnimatedDropdown/AnimatedDropdown.cjs.map +1 -1
- package/dist/components/AnimatedDropdown/AnimatedDropdown.d.ts +4 -0
- package/dist/components/AnimatedDropdown/AnimatedDropdown.js +4 -0
- package/dist/components/AnimatedDropdown/AnimatedDropdown.js.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarHeader.cjs +1 -0
- package/dist/components/Calendars/components/subcomponents/CalendarHeader.cjs.map +1 -1
- package/dist/components/Calendars/components/subcomponents/CalendarHeader.js +1 -0
- package/dist/components/Calendars/components/subcomponents/CalendarHeader.js.map +1 -1
- package/dist/components/Choice/Choice.cjs +1 -0
- package/dist/components/Choice/Choice.cjs.map +1 -1
- package/dist/components/Choice/Choice.js +1 -0
- package/dist/components/Choice/Choice.js.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs +1 -0
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.cjs.map +1 -1
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js +1 -0
- package/dist/components/DataGrid/components/Body/BodyCell/BodyCell.js.map +1 -1
- package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs +1 -0
- package/dist/components/DataGrid/components/GridContainer/GridContainer.cjs.map +1 -1
- package/dist/components/DataGrid/components/GridContainer/GridContainer.js +1 -0
- package/dist/components/DataGrid/components/GridContainer/GridContainer.js.map +1 -1
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs +1 -0
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.cjs.map +1 -1
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js +1 -0
- package/dist/components/DataGrid/components/Header/HeaderCell/HeaderCell.js.map +1 -1
- package/dist/components/DataTable/DataTable.cjs +1 -0
- package/dist/components/DataTable/DataTable.cjs.map +1 -1
- package/dist/components/DataTable/DataTable.js +1 -0
- package/dist/components/DataTable/DataTable.js.map +1 -1
- package/dist/components/DataTable/components/ColumnMenu.cjs +1 -0
- package/dist/components/DataTable/components/ColumnMenu.cjs.map +1 -1
- package/dist/components/DataTable/components/ColumnMenu.js +1 -0
- package/dist/components/DataTable/components/ColumnMenu.js.map +1 -1
- package/dist/components/DateInputField/DateInputField.cjs +1 -0
- package/dist/components/DateInputField/DateInputField.cjs.map +1 -1
- package/dist/components/DateInputField/DateInputField.js +1 -0
- package/dist/components/DateInputField/DateInputField.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.cjs.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.cjs.map +1 -1
- package/dist/components/DateRangePicker/DateRangePicker.js +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.cjs +52 -13
- package/dist/components/DimensionsInput/DimensionsInput.cjs.map +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.d.ts +1 -1
- package/dist/components/DimensionsInput/DimensionsInput.js +52 -13
- package/dist/components/DimensionsInput/DimensionsInput.js.map +1 -1
- package/dist/components/Dropdown/styled.cjs +1 -1
- package/dist/components/Dropdown/styled.cjs.map +1 -1
- package/dist/components/Dropdown/styled.js +1 -1
- package/dist/components/Dropdown/styled.js.map +1 -1
- package/dist/components/Flex/FlexSpacer/FlexSpacer.cjs +15 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.cjs.map +1 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.d.ts +2 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.js +9 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.js.map +1 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.cjs +9 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.cjs.map +1 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.js +7 -0
- package/dist/components/Flex/FlexSpacer/FlexSpacer.module.scss.js.map +1 -0
- package/dist/components/Flex/FlexSpacer/index.d.ts +1 -0
- package/dist/components/InputAffix/InputAffix.cjs.map +1 -1
- package/dist/components/InputAffix/InputAffix.d.ts +1 -2
- package/dist/components/InputAffix/InputAffix.js.map +1 -1
- package/dist/components/InputGroup/index.cjs.map +1 -1
- package/dist/components/InputGroup/index.d.ts +3 -1
- package/dist/components/InputGroup/index.js.map +1 -1
- package/dist/components/Modal/Modal.cjs +1 -0
- package/dist/components/Modal/Modal.cjs.map +1 -1
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -0
- package/dist/components/Pagination/Pagination.cjs.map +1 -1
- package/dist/components/Pagination/Pagination.js +1 -0
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/styled.cjs +1 -0
- package/dist/components/Pagination/styled.cjs.map +1 -1
- package/dist/components/Pagination/styled.d.ts +2 -2
- package/dist/components/Pagination/styled.js +1 -0
- package/dist/components/Pagination/styled.js.map +1 -1
- package/dist/components/PriceInput/PriceInput.cjs +4 -3
- package/dist/components/PriceInput/PriceInput.cjs.map +1 -1
- package/dist/components/PriceInput/PriceInput.js +4 -3
- package/dist/components/PriceInput/PriceInput.js.map +1 -1
- package/dist/components/Search/Search.cjs +11 -7
- package/dist/components/Search/Search.cjs.map +1 -1
- package/dist/components/Search/Search.d.ts +307 -2
- package/dist/components/Search/Search.js +11 -7
- package/dist/components/Search/Search.js.map +1 -1
- package/dist/components/Search/styled.d.ts +1 -1
- package/dist/components/Search/types.d.ts +0 -2
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs +1 -0
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js +1 -0
- package/dist/components/SelectDropdown/ListItem/components/ListItemContent.js.map +1 -1
- package/dist/components/SelectDropdown/ListItem/styled.cjs +1 -0
- package/dist/components/SelectDropdown/ListItem/styled.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItem/styled.d.ts +2 -2
- package/dist/components/SelectDropdown/ListItem/styled.js +1 -0
- package/dist/components/SelectDropdown/ListItem/styled.js.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs +1 -0
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.cjs.map +1 -1
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js +1 -0
- package/dist/components/SelectDropdown/ListItemSection/ListItemSection.js.map +1 -1
- package/dist/components/SelectDropdown/styled.d.ts +307 -1
- package/dist/components/Stack/index.d.ts +1 -0
- package/dist/components/Stack/types.cjs +38 -0
- package/dist/components/Stack/types.cjs.map +1 -0
- package/dist/components/Stack/types.js +36 -0
- package/dist/components/Stack/types.js.map +1 -0
- package/dist/components/Stepper/styled.cjs +3 -2
- package/dist/components/Stepper/styled.cjs.map +1 -1
- package/dist/components/Stepper/styled.d.ts +2 -2
- package/dist/components/Stepper/styled.js +3 -2
- package/dist/components/Stepper/styled.js.map +1 -1
- package/dist/components/TextField/index.cjs.map +1 -1
- package/dist/components/TextField/index.d.ts +1 -0
- package/dist/components/TextField/index.js.map +1 -1
- package/dist/components/ToastsLayout/components/styled.cjs +1 -0
- package/dist/components/ToastsLayout/components/styled.cjs.map +1 -1
- package/dist/components/ToastsLayout/components/styled.d.ts +3 -3
- package/dist/components/ToastsLayout/components/styled.js +1 -0
- package/dist/components/ToastsLayout/components/styled.js.map +1 -1
- package/dist/components/UploadFile/UploadFile.cjs +1 -0
- package/dist/components/UploadFile/UploadFile.cjs.map +1 -1
- package/dist/components/UploadFile/UploadFile.js +1 -0
- package/dist/components/UploadFile/UploadFile.js.map +1 -1
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs +1 -0
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs.map +1 -1
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js +1 -0
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js.map +1 -1
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs +1 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs.map +1 -1
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js +1 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js.map +1 -1
- package/dist/components/UploadFile/components/UploadedFile/styled.cjs +1 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.cjs.map +1 -1
- package/dist/components/UploadFile/components/UploadedFile/styled.d.ts +1 -1
- package/dist/components/UploadFile/components/UploadedFile/styled.js +1 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.js.map +1 -1
- package/dist/components/ViewsContainer/styled.cjs +1 -0
- package/dist/components/ViewsContainer/styled.cjs.map +1 -1
- package/dist/components/ViewsContainer/styled.d.ts +3 -3
- package/dist/components/ViewsContainer/styled.js +1 -0
- package/dist/components/ViewsContainer/styled.js.map +1 -1
- package/dist/components/WeightInput/WeightInput.cjs +53 -16
- package/dist/components/WeightInput/WeightInput.cjs.map +1 -1
- package/dist/components/WeightInput/WeightInput.js +53 -16
- package/dist/components/WeightInput/WeightInput.js.map +1 -1
- package/dist/components/WeightInput/types.cjs.map +1 -1
- package/dist/components/WeightInput/types.d.ts +1 -0
- package/dist/components/WeightInput/types.js.map +1 -1
- package/dist/hoc/withLabels/styled.cjs +5 -3
- package/dist/hoc/withLabels/styled.cjs.map +1 -1
- package/dist/hoc/withLabels/styled.d.ts +1 -1
- package/dist/hoc/withLabels/styled.js +5 -3
- package/dist/hoc/withLabels/styled.js.map +1 -1
- package/dist/hoc/withLabels/withLabels.cjs +1 -0
- package/dist/hoc/withLabels/withLabels.cjs.map +1 -1
- package/dist/hoc/withLabels/withLabels.js +1 -0
- package/dist/hoc/withLabels/withLabels.js.map +1 -1
- package/dist/index.cjs +1 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/DimensionsInput/styled.cjs +0 -21
- package/dist/components/DimensionsInput/styled.cjs.map +0 -1
- package/dist/components/DimensionsInput/styled.d.ts +0 -308
- package/dist/components/DimensionsInput/styled.js +0 -13
- package/dist/components/DimensionsInput/styled.js.map +0 -1
- package/dist/components/WeightInput/styled.cjs +0 -24
- package/dist/components/WeightInput/styled.cjs.map +0 -1
- package/dist/components/WeightInput/styled.d.ts +0 -317
- package/dist/components/WeightInput/styled.js +0 -16
- package/dist/components/WeightInput/styled.js.map +0 -1
|
@@ -29,8 +29,8 @@ const Accordion = ({ className, children, label, iconSlot, glyphColor = colors.c
|
|
|
29
29
|
React__default.default.createElement(Text.Text, { variant: summaryTextVariant }, label)),
|
|
30
30
|
React__default.default.createElement(styled.Right, null,
|
|
31
31
|
React__default.default.createElement(framerMotion.motion.span, { animate: {
|
|
32
|
-
rotate: shouldOpen ?
|
|
33
|
-
} },
|
|
32
|
+
rotate: shouldOpen ? 0 : 180,
|
|
33
|
+
}, initial: { rotate: 180 } },
|
|
34
34
|
React__default.default.createElement(UpArrowIcon.UpArrowIcon, { name: shouldOpen ? 'downArrow' : 'upArrow' })))),
|
|
35
35
|
!!description && React__default.default.createElement(styled.Description, { variant: "hintText" }, description)),
|
|
36
36
|
shouldOpen && (React__default.default.createElement(styled.UnstyledAccordionContent, { ...FRAMER_MOTION_CONFIG }, children))));
|
|
@@ -43,8 +43,8 @@ const Accordion = ({ className, children, label, iconSlot, glyphColor = colors.c
|
|
|
43
43
|
React__default.default.createElement(Text.Text, { variant: summaryTextVariant }, label)),
|
|
44
44
|
React__default.default.createElement(styled.Right, null,
|
|
45
45
|
React__default.default.createElement(framerMotion.motion.span, { animate: {
|
|
46
|
-
rotate: shouldOpen ?
|
|
47
|
-
} },
|
|
46
|
+
rotate: shouldOpen ? 0 : 180,
|
|
47
|
+
}, initial: { rotate: 180 } },
|
|
48
48
|
React__default.default.createElement(UpArrowIcon.UpArrowIcon, { name: shouldOpen ? 'downArrow' : 'upArrow' })))),
|
|
49
49
|
!!description && React__default.default.createElement(styled.Description, { variant: "hintText" }, description)),
|
|
50
50
|
shouldOpen && React__default.default.createElement(styled.AccordionContent, { ...FRAMER_MOTION_CONFIG }, children)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.cjs","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\n\nimport { motion } from 'framer-motion';\nimport {\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n AccordionSummary,\n UnstyledAccordionSummary,\n UnstyledAccordionContent,\n} from './styled';\nimport { colors } from '../../theme/modules/colors';\nimport { UpArrowIcon } from '../../tempIcons/UpArrowIcon';\nimport { AccordionProps } from './types';\n\nexport const Accordion: FC<AccordionProps> = ({\n className,\n children,\n label,\n iconSlot,\n glyphColor = colors.neutral.ink.lightest,\n timeout = 350,\n description,\n shouldOpenOnMount,\n variant = 'default',\n summaryTextVariant = 'body',\n}: AccordionProps) => {\n const [shouldOpen, setShouldOpen] = useState(!!shouldOpenOnMount);\n const handleOpen = () => setShouldOpen(!shouldOpen);\n\n const FRAMER_MOTION_CONFIG = {\n initial: { opacity: 0 },\n exit: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { from: 0, type: 'tween', duration: timeout / 1000 },\n };\n\n if (variant === 'unstyled') {\n return (\n <AccordionDetails open={!!shouldOpenOnMount} className={className}>\n <UnstyledAccordionSummary onClick={handleOpen}>\n <Top>\n <Left glyphColor={glyphColor}>\n {iconSlot}\n <Text variant={summaryTextVariant}>{label}</Text>\n </Left>\n <Right>\n <motion.span\n animate={{\n rotate: shouldOpen ?
|
|
1
|
+
{"version":3,"file":"Accordion.cjs","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\n\nimport { motion } from 'framer-motion';\nimport {\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n AccordionSummary,\n UnstyledAccordionSummary,\n UnstyledAccordionContent,\n} from './styled';\nimport { colors } from '../../theme/modules/colors';\nimport { UpArrowIcon } from '../../tempIcons/UpArrowIcon';\nimport { AccordionProps } from './types';\n\nexport const Accordion: FC<AccordionProps> = ({\n className,\n children,\n label,\n iconSlot,\n glyphColor = colors.neutral.ink.lightest,\n timeout = 350,\n description,\n shouldOpenOnMount,\n variant = 'default',\n summaryTextVariant = 'body',\n}: AccordionProps) => {\n const [shouldOpen, setShouldOpen] = useState(!!shouldOpenOnMount);\n const handleOpen = () => setShouldOpen(!shouldOpen);\n\n const FRAMER_MOTION_CONFIG = {\n initial: { opacity: 0 },\n exit: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { from: 0, type: 'tween', duration: timeout / 1000 },\n };\n\n if (variant === 'unstyled') {\n return (\n <AccordionDetails open={!!shouldOpenOnMount} className={className}>\n <UnstyledAccordionSummary onClick={handleOpen}>\n <Top>\n <Left glyphColor={glyphColor}>\n {iconSlot}\n <Text variant={summaryTextVariant}>{label}</Text>\n </Left>\n <Right>\n <motion.span\n animate={{\n rotate: shouldOpen ? 0 : 180,\n }}\n initial={{ rotate: 180 }}\n >\n <UpArrowIcon name={shouldOpen ? 'downArrow' : 'upArrow'} />\n </motion.span>\n </Right>\n </Top>\n {!!description && <Description variant=\"hintText\">{description}</Description>}\n </UnstyledAccordionSummary>\n {shouldOpen && (\n <UnstyledAccordionContent {...FRAMER_MOTION_CONFIG}>{children}</UnstyledAccordionContent>\n )}\n </AccordionDetails>\n );\n }\n\n return (\n <AccordionDetails open={!!shouldOpenOnMount} className={className}>\n <AccordionSummary onClick={handleOpen}>\n <Top>\n <Left glyphColor={glyphColor}>\n {iconSlot}\n <Text variant={summaryTextVariant}>{label}</Text>\n </Left>\n <Right>\n <motion.span\n animate={{\n rotate: shouldOpen ? 0 : 180,\n }}\n initial={{ rotate: 180 }}\n >\n <UpArrowIcon name={shouldOpen ? 'downArrow' : 'upArrow'} />\n </motion.span>\n </Right>\n </Top>\n {!!description && <Description variant=\"hintText\">{description}</Description>}\n </AccordionSummary>\n {shouldOpen && <AccordionContent {...FRAMER_MOTION_CONFIG}>{children}</AccordionContent>}\n </AccordionDetails>\n );\n};\n"],"names":["colors","useState","React","AccordionDetails","UnstyledAccordionSummary","Top","Left","Text","Right","motion","UpArrowIcon","Description","UnstyledAccordionContent","AccordionSummary","AccordionContent"],"mappings":";;;;;;;;;;;;;AAmBa,MAAA,SAAS,GAAuB,CAAC,EAC5C,SAAS,EACT,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,UAAU,GAAGA,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,EACxC,OAAO,GAAG,GAAG,EACb,WAAW,EACX,iBAAiB,EACjB,OAAO,GAAG,SAAS,EACnB,kBAAkB,GAAG,MAAM,GACZ,KAAI;AACnB,IAAA,MAAM,CAAC,UAAU,EAAE,aAAa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R,sBAAA,CAAA,aAAA,CAACS,kBAAW,EAAA,EAAC,OAAO,EAAC,UAAU,EAAA,EAAE,WAAW,CAAe,CAC5D;QAClB,UAAU,IAAIT,sBAAC,CAAA,aAAA,CAAAY,uBAAgB,EAAK,EAAA,GAAA,oBAAoB,IAAG,QAAQ,CAAoB,CACvE;AAEvB;;;;"}
|
|
@@ -23,8 +23,8 @@ const Accordion = ({ className, children, label, iconSlot, glyphColor = colors.n
|
|
|
23
23
|
React__default.createElement(Text, { variant: summaryTextVariant }, label)),
|
|
24
24
|
React__default.createElement(Right, null,
|
|
25
25
|
React__default.createElement(motion.span, { animate: {
|
|
26
|
-
rotate: shouldOpen ?
|
|
27
|
-
} },
|
|
26
|
+
rotate: shouldOpen ? 0 : 180,
|
|
27
|
+
}, initial: { rotate: 180 } },
|
|
28
28
|
React__default.createElement(UpArrowIcon, { name: shouldOpen ? 'downArrow' : 'upArrow' })))),
|
|
29
29
|
!!description && React__default.createElement(Description, { variant: "hintText" }, description)),
|
|
30
30
|
shouldOpen && (React__default.createElement(UnstyledAccordionContent, { ...FRAMER_MOTION_CONFIG }, children))));
|
|
@@ -37,8 +37,8 @@ const Accordion = ({ className, children, label, iconSlot, glyphColor = colors.n
|
|
|
37
37
|
React__default.createElement(Text, { variant: summaryTextVariant }, label)),
|
|
38
38
|
React__default.createElement(Right, null,
|
|
39
39
|
React__default.createElement(motion.span, { animate: {
|
|
40
|
-
rotate: shouldOpen ?
|
|
41
|
-
} },
|
|
40
|
+
rotate: shouldOpen ? 0 : 180,
|
|
41
|
+
}, initial: { rotate: 180 } },
|
|
42
42
|
React__default.createElement(UpArrowIcon, { name: shouldOpen ? 'downArrow' : 'upArrow' })))),
|
|
43
43
|
!!description && React__default.createElement(Description, { variant: "hintText" }, description)),
|
|
44
44
|
shouldOpen && React__default.createElement(AccordionContent, { ...FRAMER_MOTION_CONFIG }, children)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\n\nimport { motion } from 'framer-motion';\nimport {\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n AccordionSummary,\n UnstyledAccordionSummary,\n UnstyledAccordionContent,\n} from './styled';\nimport { colors } from '../../theme/modules/colors';\nimport { UpArrowIcon } from '../../tempIcons/UpArrowIcon';\nimport { AccordionProps } from './types';\n\nexport const Accordion: FC<AccordionProps> = ({\n className,\n children,\n label,\n iconSlot,\n glyphColor = colors.neutral.ink.lightest,\n timeout = 350,\n description,\n shouldOpenOnMount,\n variant = 'default',\n summaryTextVariant = 'body',\n}: AccordionProps) => {\n const [shouldOpen, setShouldOpen] = useState(!!shouldOpenOnMount);\n const handleOpen = () => setShouldOpen(!shouldOpen);\n\n const FRAMER_MOTION_CONFIG = {\n initial: { opacity: 0 },\n exit: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { from: 0, type: 'tween', duration: timeout / 1000 },\n };\n\n if (variant === 'unstyled') {\n return (\n <AccordionDetails open={!!shouldOpenOnMount} className={className}>\n <UnstyledAccordionSummary onClick={handleOpen}>\n <Top>\n <Left glyphColor={glyphColor}>\n {iconSlot}\n <Text variant={summaryTextVariant}>{label}</Text>\n </Left>\n <Right>\n <motion.span\n animate={{\n rotate: shouldOpen ?
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React, { FC, useState } from 'react';\n\nimport { motion } from 'framer-motion';\nimport {\n Top,\n Text,\n Left,\n Right,\n Description,\n AccordionDetails,\n AccordionContent,\n AccordionSummary,\n UnstyledAccordionSummary,\n UnstyledAccordionContent,\n} from './styled';\nimport { colors } from '../../theme/modules/colors';\nimport { UpArrowIcon } from '../../tempIcons/UpArrowIcon';\nimport { AccordionProps } from './types';\n\nexport const Accordion: FC<AccordionProps> = ({\n className,\n children,\n label,\n iconSlot,\n glyphColor = colors.neutral.ink.lightest,\n timeout = 350,\n description,\n shouldOpenOnMount,\n variant = 'default',\n summaryTextVariant = 'body',\n}: AccordionProps) => {\n const [shouldOpen, setShouldOpen] = useState(!!shouldOpenOnMount);\n const handleOpen = () => setShouldOpen(!shouldOpen);\n\n const FRAMER_MOTION_CONFIG = {\n initial: { opacity: 0 },\n exit: { opacity: 0 },\n animate: { opacity: 1 },\n transition: { from: 0, type: 'tween', duration: timeout / 1000 },\n };\n\n if (variant === 'unstyled') {\n return (\n <AccordionDetails open={!!shouldOpenOnMount} className={className}>\n <UnstyledAccordionSummary onClick={handleOpen}>\n <Top>\n <Left glyphColor={glyphColor}>\n {iconSlot}\n <Text variant={summaryTextVariant}>{label}</Text>\n </Left>\n <Right>\n <motion.span\n animate={{\n rotate: shouldOpen ? 0 : 180,\n }}\n initial={{ rotate: 180 }}\n >\n <UpArrowIcon name={shouldOpen ? 'downArrow' : 'upArrow'} />\n </motion.span>\n </Right>\n </Top>\n {!!description && <Description variant=\"hintText\">{description}</Description>}\n </UnstyledAccordionSummary>\n {shouldOpen && (\n <UnstyledAccordionContent {...FRAMER_MOTION_CONFIG}>{children}</UnstyledAccordionContent>\n )}\n </AccordionDetails>\n );\n }\n\n return (\n <AccordionDetails open={!!shouldOpenOnMount} className={className}>\n <AccordionSummary onClick={handleOpen}>\n <Top>\n <Left glyphColor={glyphColor}>\n {iconSlot}\n <Text variant={summaryTextVariant}>{label}</Text>\n </Left>\n <Right>\n <motion.span\n animate={{\n rotate: shouldOpen ? 0 : 180,\n }}\n initial={{ rotate: 180 }}\n >\n <UpArrowIcon name={shouldOpen ? 'downArrow' : 'upArrow'} />\n </motion.span>\n </Right>\n </Top>\n {!!description && <Description variant=\"hintText\">{description}</Description>}\n </AccordionSummary>\n {shouldOpen && <AccordionContent {...FRAMER_MOTION_CONFIG}>{children}</AccordionContent>}\n </AccordionDetails>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;AAmBa,MAAA,SAAS,GAAuB,CAAC,EAC5C,SAAS,EACT,QA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AE,EAAE,MAAM,EAAE,GAAG,EAAE,EAAA;AAExB,wBAAAA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAC,EAAA,IAAI,EAAE,UAAU,GAAG,WAAW,GAAG,SAAS,EAAI,CAAA,CAC/C,CACR,CACJ;AACL,YAAA,CAAC,CAAC,WAAW,IAAIA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EAAC,OAAO,EAAC,UAAU,EAAA,EAAE,WAAW,CAAe,CAC5D;QAClB,UAAU,IAAIA,cAAC,CAAA,aAAA,CAAA,gBAAgB,EAAK,EAAA,GAAA,oBAAoB,IAAG,QAAQ,CAAoB,CACvE;AAEvB;;;;"}
|
|
@@ -6,6 +6,7 @@ var constants = require('./constants.cjs');
|
|
|
6
6
|
var Text = require('../../Text/Text.cjs');
|
|
7
7
|
var index = require('../../../theme/index.cjs');
|
|
8
8
|
var Stack = require('../../Stack/Stack.cjs');
|
|
9
|
+
require('../../Stack/types.cjs');
|
|
9
10
|
var Button = require('../../Button/Button.cjs');
|
|
10
11
|
var CrossIcon = require('../../../tempIcons/CrossIcon.cjs');
|
|
11
12
|
var constants$1 = require('../constants.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.cjs","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { AlertContainer } from './styled';\nimport { IconSizeMap, SpacingMap } from './constants';\n\nimport { Text } from '../../Text';\nimport { theme } from '../../../theme';\nimport { Stack } from '../../Stack';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../tempIcons/CrossIcon';\nimport { ColourMap, IconMap } from '../constants';\nimport { AlertProps } from './types';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n ...divProps\n}: AlertProps) => {\n const colours = passedColours ?? ColourMap[variant];\n const IconSlot = iconSlot || IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <AlertContainer\n colours={colours}\n direction=\"horizontal\"\n alignX=\"between\"\n spacing=\"0\"\n {...divProps}\n >\n <Stack\n direction=\"horizontal\"\n alignY={isXsSize ? 'center' : 'start'}\n style={{ margin: SpacingMap[size], gap: SpacingMap[size] }}\n spacing={0}\n >\n <IconSlot\n aria-hidden\n style={{\n minWidth: IconSizeMap[size],\n minHeight: IconSizeMap[size],\n width: IconSizeMap[size],\n height: IconSizeMap[size],\n }}\n color={colours.primary}\n />\n\n {children || (\n <Stack direction=\"vertical\" spacing={isXsSize ? 0 : 'xs'}>\n {titleSlot || (\n <Text\n variant={isXsSize ? 'bodySmallBold' : 'bodyBold'}\n style={size === 'base' ? { lineHeight: '24px' } : {}}\n >\n {title}\n </Text>\n )}\n {messageSlot || <Text variant={isXsSize ? 'bodySmall' : 'body'}>{message}</Text>}\n </Stack>\n )}\n </Stack>\n\n <Stack\n direction=\"horizontal\"\n alignX=\"end\"\n spacing={0}\n style={{\n margin: isXsSize ? undefined : theme.sizes[3],\n gap: isXsSize ? undefined : SpacingMap[size],\n alignItems: 'center',\n }}\n >\n {rightActionsSlot}\n\n {rightActions && (\n <Stack alignY=\"center\" spacing={0} style={{ gap: SpacingMap[size] }}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </Stack>\n )}\n\n {onClickClose && (\n <Stack\n alignY={isXsSize ? 'center' : 'start'}\n style={{ height: '100%', padding: isXsSize ? theme.sizes.xs : undefined }}\n >\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </Stack>\n )}\n </Stack>\n </AlertContainer>\n );\n};\n"],"names":["ColourMap","IconMap","React","AlertContainer","Stack","SpacingMap","IconSizeMap","Text","theme","Button","CrossIcon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.cjs","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { AlertContainer } from './styled';\nimport { IconSizeMap, SpacingMap } from './constants';\n\nimport { Text } from '../../Text';\nimport { theme } from '../../../theme';\nimport { Stack } from '../../Stack';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../tempIcons/CrossIcon';\nimport { ColourMap, IconMap } from '../constants';\nimport { AlertProps } from './types';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n ...divProps\n}: AlertProps) => {\n const colours = passedColours ?? ColourMap[variant];\n const IconSlot = iconSlot || IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <AlertContainer\n colours={colours}\n direction=\"horizontal\"\n alignX=\"between\"\n spacing=\"0\"\n {...divProps}\n >\n <Stack\n direction=\"horizontal\"\n alignY={isXsSize ? 'center' : 'start'}\n style={{ margin: SpacingMap[size], gap: SpacingMap[size] }}\n spacing={0}\n >\n <IconSlot\n aria-hidden\n style={{\n minWidth: IconSizeMap[size],\n minHeight: IconSizeMap[size],\n width: IconSizeMap[size],\n height: IconSizeMap[size],\n }}\n color={colours.primary}\n />\n\n {children || (\n <Stack direction=\"vertical\" spacing={isXsSize ? 0 : 'xs'}>\n {titleSlot || (\n <Text\n variant={isXsSize ? 'bodySmallBold' : 'bodyBold'}\n style={size === 'base' ? { lineHeight: '24px' } : {}}\n >\n {title}\n </Text>\n )}\n {messageSlot || <Text variant={isXsSize ? 'bodySmall' : 'body'}>{message}</Text>}\n </Stack>\n )}\n </Stack>\n\n <Stack\n direction=\"horizontal\"\n alignX=\"end\"\n spacing={0}\n style={{\n margin: isXsSize ? undefined : theme.sizes[3],\n gap: isXsSize ? undefined : SpacingMap[size],\n alignItems: 'center',\n }}\n >\n {rightActionsSlot}\n\n {rightActions && (\n <Stack alignY=\"center\" spacing={0} style={{ gap: SpacingMap[size] }}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </Stack>\n )}\n\n {onClickClose && (\n <Stack\n alignY={isXsSize ? 'center' : 'start'}\n style={{ height: '100%', padding: isXsSize ? theme.sizes.xs : undefined }}\n >\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </Stack>\n )}\n </Stack>\n </AlertContainer>\n );\n};\n"],"names":["ColourMap","IconMap","React","AlertContainer","Stack","SpacingMap","IconSizeMap","Text","theme","Button","CrossIcon"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAca,MAAA,KAAK,GAAG,CAAC,EACpB,IAAI,GAAG,MAAM,EACb,OAAO,GAAG,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,GAAG,QAAQ,EACA,KAAI;AACf,IAAA,MAAM,OAAO,GAAG,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,SAAA,GAAb,aAAa,GAAIA,qBAAS,CAAC,OAAO,CAAC;IACnD,MAAM,QAAQ,GAAG,QAAQ,IAAIC,mBAAO,CAAC,OAAO,CAAC;AAE7C,IAAA,MAAM,QAAQ,GAAG,IAAI,KAAK,IAAI;IAE9B,QACEC,qCAACC,qBAAc,EAAA,EACb,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,YAAY,EACtB,MAAM,EAAC,SAAS,EAChB,OAAO,EAAC,GAAG,KACP,QAAQ,EAAA;AAEZ,QAAAD,sBAAA,CAAA,aAAA,CAACE,WAAK,EACJ,EAAA,SAAS,EAAC,YAAY,EACtB,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAA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AAC7C,gBAAA,GAAG,EAAE,QAAQ,GAAG,SAAS,GAAGH,oBAAU,CAAC,IAAI,CAAC;AAC5C,gBAAA,UAAU,EAAE,QAAQ;AACrB,aAAA,EAAA;YAEA,gBAAgB;AAEhB,YAAA,YAAY,KACXH,sBAAC,CAAA,aAAA,CAAAE,WAAK,EAAC,EAAA,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,EAAEC,oBAAU,CAAC,IAAI,CAAC,EAAE,EAAA,EAChE,YAAY,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,WAAW,EAAE,MAC1CH,sBAAA,CAAA,aAAA,CAACO,aAAM,EAAA,EAAC,GAAG,EAAE,KAAK,EAAE,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,IAAI,EAAA,GAAK,WAAW,EAAA,EACxD,KAAK,CACC,CACV,CAAC,CACI,CACT;AAEA,YAAA,YAAY,KACXP,sBAAA,CAAA,aAAA,CAACE,WAAK,EAAA,EACJ,MAAM,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,EACrC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAGI,WAAK,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,EAAE,EAAA;gBAEzEN,sBAAC,CAAA,aAAA,CAAAO,aAAM,EACL,EAAA,OAAO,EAAC,MAAM,EACd,QAAQ,EAAEP,sBAAA,CAAA,aAAA,CAACQ,mBAAS,EAAA,IAAA,CAAG,EACvB,OAAO,EAAE,YAAY,EACV,YAAA,EAAA,OAAO,EAClB,IAAI,EAAC,IAAI,EACT,CAAA,CACI,CACT,CACK,CACO;AAErB;;;;"}
|
|
@@ -4,6 +4,7 @@ import { SpacingMap, IconSizeMap } from './constants.js';
|
|
|
4
4
|
import { Text } from '../../Text/Text.js';
|
|
5
5
|
import { theme } from '../../../theme/index.js';
|
|
6
6
|
import { Stack } from '../../Stack/Stack.js';
|
|
7
|
+
import '../../Stack/types.js';
|
|
7
8
|
import { Button } from '../../Button/Button.js';
|
|
8
9
|
import { CrossIcon } from '../../../tempIcons/CrossIcon.js';
|
|
9
10
|
import { ColourMap, IconMap } from '../constants.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { AlertContainer } from './styled';\nimport { IconSizeMap, SpacingMap } from './constants';\n\nimport { Text } from '../../Text';\nimport { theme } from '../../../theme';\nimport { Stack } from '../../Stack';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../tempIcons/CrossIcon';\nimport { ColourMap, IconMap } from '../constants';\nimport { AlertProps } from './types';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n ...divProps\n}: AlertProps) => {\n const colours = passedColours ?? ColourMap[variant];\n const IconSlot = iconSlot || IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <AlertContainer\n colours={colours}\n direction=\"horizontal\"\n alignX=\"between\"\n spacing=\"0\"\n {...divProps}\n >\n <Stack\n direction=\"horizontal\"\n alignY={isXsSize ? 'center' : 'start'}\n style={{ margin: SpacingMap[size], gap: SpacingMap[size] }}\n spacing={0}\n >\n <IconSlot\n aria-hidden\n style={{\n minWidth: IconSizeMap[size],\n minHeight: IconSizeMap[size],\n width: IconSizeMap[size],\n height: IconSizeMap[size],\n }}\n color={colours.primary}\n />\n\n {children || (\n <Stack direction=\"vertical\" spacing={isXsSize ? 0 : 'xs'}>\n {titleSlot || (\n <Text\n variant={isXsSize ? 'bodySmallBold' : 'bodyBold'}\n style={size === 'base' ? { lineHeight: '24px' } : {}}\n >\n {title}\n </Text>\n )}\n {messageSlot || <Text variant={isXsSize ? 'bodySmall' : 'body'}>{message}</Text>}\n </Stack>\n )}\n </Stack>\n\n <Stack\n direction=\"horizontal\"\n alignX=\"end\"\n spacing={0}\n style={{\n margin: isXsSize ? undefined : theme.sizes[3],\n gap: isXsSize ? undefined : SpacingMap[size],\n alignItems: 'center',\n }}\n >\n {rightActionsSlot}\n\n {rightActions && (\n <Stack alignY=\"center\" spacing={0} style={{ gap: SpacingMap[size] }}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </Stack>\n )}\n\n {onClickClose && (\n <Stack\n alignY={isXsSize ? 'center' : 'start'}\n style={{ height: '100%', padding: isXsSize ? theme.sizes.xs : undefined }}\n >\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </Stack>\n )}\n </Stack>\n </AlertContainer>\n );\n};\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../../src/components/Alerts/Alert/Alert.tsx"],"sourcesContent":["/* eslint-disable react/destructuring-assignment */\nimport React from 'react';\n\nimport { AlertContainer } from './styled';\nimport { IconSizeMap, SpacingMap } from './constants';\n\nimport { Text } from '../../Text';\nimport { theme } from '../../../theme';\nimport { Stack } from '../../Stack';\nimport { Button } from '../../Button';\nimport { CrossIcon } from '../../../tempIcons/CrossIcon';\nimport { ColourMap, IconMap } from '../constants';\nimport { AlertProps } from './types';\n\nexport const Alert = ({\n size = 'base',\n variant = 'default',\n colours: passedColours,\n rightActions,\n rightActionsSlot,\n title,\n titleSlot,\n messageSlot,\n message,\n children,\n iconSlot,\n onClickClose,\n ...divProps\n}: AlertProps) => {\n const colours = passedColours ?? ColourMap[variant];\n const IconSlot = iconSlot || IconMap[variant];\n\n const isXsSize = size === 'xs';\n\n return (\n <AlertContainer\n colours={colours}\n direction=\"horizontal\"\n alignX=\"between\"\n spacing=\"0\"\n {...divProps}\n >\n <Stack\n direction=\"horizontal\"\n alignY={isXsSize ? 'center' : 'start'}\n style={{ margin: SpacingMap[size], gap: SpacingMap[size] }}\n spacing={0}\n >\n <IconSlot\n aria-hidden\n style={{\n minWidth: IconSizeMap[size],\n minHeight: IconSizeMap[size],\n width: IconSizeMap[size],\n height: IconSizeMap[size],\n }}\n color={colours.primary}\n />\n\n {children || (\n <Stack direction=\"vertical\" spacing={isXsSize ? 0 : 'xs'}>\n {titleSlot || (\n <Text\n variant={isXsSize ? 'bodySmallBold' : 'bodyBold'}\n style={size === 'base' ? { lineHeight: '24px' } : {}}\n >\n {title}\n </Text>\n )}\n {messageSlot || <Text variant={isXsSize ? 'bodySmall' : 'body'}>{message}</Text>}\n </Stack>\n )}\n </Stack>\n\n <Stack\n direction=\"horizontal\"\n alignX=\"end\"\n spacing={0}\n style={{\n margin: isXsSize ? undefined : theme.sizes[3],\n gap: isXsSize ? undefined : SpacingMap[size],\n alignItems: 'center',\n }}\n >\n {rightActionsSlot}\n\n {rightActions && (\n <Stack alignY=\"center\" spacing={0} style={{ gap: SpacingMap[size] }}>\n {rightActions.map(({ label, ...actionProps }) => (\n <Button key={label} type=\"button\" size=\"sm\" {...actionProps}>\n {label}\n </Button>\n ))}\n </Stack>\n )}\n\n {onClickClose && (\n <Stack\n alignY={isXsSize ? 'center' : 'start'}\n style={{ height: '100%', padding: isXsSize ? theme.sizes.xs : undefined }}\n >\n <Button\n variant=\"flat\"\n iconSlot={<CrossIcon />}\n onClick={onClickClose}\n aria-label=\"Close\"\n size=\"sm\"\n />\n </Stack>\n )}\n </Stack>\n </AlertContainer>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;AAAA;AAca,MAAA,KAAK,GAAG,CAAC,EACpB,IAAI,GAAG,MAAM,EACb,OAAO,GAAG,SAAS,EACnB,OAAO,EAAE,aAAa,EACtB,YAAY,EACZ,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,WAAW,EACX,OAAO,EACP,QAAQ,EACR,QAAQ,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AAM,EAAE,OAAO,EAAE,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,EAAE,GAAG,SAAS,EAAE,EAAA;gBAEzEA,cAAC,CAAA,aAAA,CAAA,MAAM,EACL,EAAA,OAAO,EAAC,MAAM,EACd,QAAQ,EAAEA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,IAAA,CAAG,EACvB,OAAO,EAAE,YAAY,EACV,YAAA,EAAA,OAAO,EAClB,IAAI,EAAC,IAAI,EACT,CAAA,CACI,CACT,CACK,CACO;AAErB;;;;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var styled = require('styled-components');
|
|
4
4
|
var Stack = require('../../Stack/Stack.cjs');
|
|
5
|
+
require('../../Stack/types.cjs');
|
|
5
6
|
var index = require('../../../theme/index.cjs');
|
|
6
7
|
|
|
7
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.cjs","sources":["../../../../src/components/Alerts/Alert/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../Stack';\nimport { AlertColours } from '../types';\nimport { theme } from '../../../theme';\n\nexport const AlertContainer = styled(Stack).attrs<{ colours: AlertColours }>({\n direction: 'horizontal',\n alignX: 'between',\n alignY: 'top',\n spacing: 0,\n})<{\n colours: AlertColours;\n}>`\n border: 1px solid ${({ colours: { primary } }) => primary};\n border-radius: ${theme.radius.base};\n\n background-color: ${({ colours: { background } }) => background};\n`;\n"],"names":["styled","Stack","theme"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.cjs","sources":["../../../../src/components/Alerts/Alert/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../Stack';\nimport { AlertColours } from '../types';\nimport { theme } from '../../../theme';\n\nexport const AlertContainer = styled(Stack).attrs<{ colours: AlertColours }>({\n direction: 'horizontal',\n alignX: 'between',\n alignY: 'top',\n spacing: 0,\n})<{\n colours: AlertColours;\n}>`\n border: 1px solid ${({ colours: { primary } }) => primary};\n border-radius: ${theme.radius.base};\n\n background-color: ${({ colours: { background } }) => background};\n`;\n"],"names":["styled","Stack","theme"],"mappings":";;;;;;;;;;;AAKa,MAAA,cAAc,GAAGA,uBAAM,CAACC,WAAK,CAAC,CAAC,KAAK,CAA4B;AAC3E,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,OAAO,EAAE,CAAC;AACX,CAAA,CAAC,CAGoB,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,iBAAA,EAAA,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,OAAO,kBACxCC,WAAK,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAA,EAEd,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,UAAU;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AlertColours } from '../types';
|
|
2
|
-
export declare const AlertContainer: import("styled-components").StyledComponent<"div", any, import("../../Stack
|
|
2
|
+
export declare const AlertContainer: import("styled-components").StyledComponent<"div", any, import("../../Stack").StackProps & {
|
|
3
3
|
colours: AlertColours;
|
|
4
4
|
}, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../src/components/Alerts/Alert/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../Stack';\nimport { AlertColours } from '../types';\nimport { theme } from '../../../theme';\n\nexport const AlertContainer = styled(Stack).attrs<{ colours: AlertColours }>({\n direction: 'horizontal',\n alignX: 'between',\n alignY: 'top',\n spacing: 0,\n})<{\n colours: AlertColours;\n}>`\n border: 1px solid ${({ colours: { primary } }) => primary};\n border-radius: ${theme.radius.base};\n\n background-color: ${({ colours: { background } }) => background};\n`;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/Alerts/Alert/styled.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { Stack } from '../../Stack';\nimport { AlertColours } from '../types';\nimport { theme } from '../../../theme';\n\nexport const AlertContainer = styled(Stack).attrs<{ colours: AlertColours }>({\n direction: 'horizontal',\n alignX: 'between',\n alignY: 'top',\n spacing: 0,\n})<{\n colours: AlertColours;\n}>`\n border: 1px solid ${({ colours: { primary } }) => primary};\n border-radius: ${theme.radius.base};\n\n background-color: ${({ colours: { background } }) => background};\n`;\n"],"names":[],"mappings":";;;;;AAKa,MAAA,cAAc,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAA4B;AAC3E,IAAA,SAAS,EAAE,YAAY;AACvB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM,EAAE,KAAK;AACb,IAAA,OAAO,EAAE,CAAC;AACX,CAAA,CAAC,CAGoB,UAAA,CAAA,EAAA,WAAA,EAAA,qBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,iBAAA,EAAA,CAAC,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,KAAK,OAAO,kBACxC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAA,kBAAA,EAEd,CAAC,EAAE,OAAO,EAAE,EAAE,UAAU,EAAE,EAAE,KAAK,UAAU;;;;"}
|
|
@@ -9,6 +9,10 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
|
|
10
10
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
11
11
|
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated - Use `Dropdown` component instead.
|
|
14
|
+
* This component is deprecated and will be removed in future versions.
|
|
15
|
+
*/
|
|
12
16
|
const AnimatedDropdown = ({ cta, shouldShowDropdown, children, className = 'animated-dropdown', reversed = false, onClickAway = () => { }, timeout = 350, transitionClassnames = 'dropdown', onClick, onMouseEnter, onMouseLeave, }) => {
|
|
13
17
|
const dropdownRef = React.useRef(null);
|
|
14
18
|
useClickAway.useClickAway(dropdownRef, (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedDropdown.cjs","sources":["../../../src/components/AnimatedDropdown/AnimatedDropdown.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { Wrap, Dropdown, Container } from './styled';\n\nimport { AnimatedDropdownProps } from './types';\nimport { useClickAway } from './hooks/useClickAway';\n\nexport const AnimatedDropdown = ({\n cta,\n shouldShowDropdown,\n children,\n className = 'animated-dropdown',\n reversed = false,\n onClickAway = () => {},\n timeout = 350,\n transitionClassnames = 'dropdown',\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: AnimatedDropdownProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useClickAway(dropdownRef, (event: Event) => {\n if (shouldShowDropdown) {\n onClickAway(event);\n }\n });\n\n return (\n <Container\n className={`${className}-container ${className}`}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n ref={dropdownRef}\n >\n {!reversed && cta}\n <Wrap className={`${className}-wrap ${className}`}>\n <CSSTransition\n in={shouldShowDropdown}\n timeout={timeout}\n classNames={transitionClassnames}\n unmountOnExit\n >\n <Dropdown\n role=\"dialog\"\n reversed={reversed}\n className={`${className}-basic-dropdown ${className}`}\n >\n {children}\n </Dropdown>\n </CSSTransition>\n </Wrap>\n {reversed && cta}\n </Container>\n );\n};\n"],"names":["useRef","useClickAway","React","Container","Wrap","CSSTransition","Dropdown"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"AnimatedDropdown.cjs","sources":["../../../src/components/AnimatedDropdown/AnimatedDropdown.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { Wrap, Dropdown, Container } from './styled';\n\nimport { AnimatedDropdownProps } from './types';\nimport { useClickAway } from './hooks/useClickAway';\n\n/**\n * @deprecated - Use `Dropdown` component instead.\n * This component is deprecated and will be removed in future versions.\n */\nexport const AnimatedDropdown = ({\n cta,\n shouldShowDropdown,\n children,\n className = 'animated-dropdown',\n reversed = false,\n onClickAway = () => {},\n timeout = 350,\n transitionClassnames = 'dropdown',\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: AnimatedDropdownProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useClickAway(dropdownRef, (event: Event) => {\n if (shouldShowDropdown) {\n onClickAway(event);\n }\n });\n\n return (\n <Container\n className={`${className}-container ${className}`}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n ref={dropdownRef}\n >\n {!reversed && cta}\n <Wrap className={`${className}-wrap ${className}`}>\n <CSSTransition\n in={shouldShowDropdown}\n timeout={timeout}\n classNames={transitionClassnames}\n unmountOnExit\n >\n <Dropdown\n role=\"dialog\"\n reversed={reversed}\n className={`${className}-basic-dropdown ${className}`}\n >\n {children}\n </Dropdown>\n </CSSTransition>\n </Wrap>\n {reversed && cta}\n </Container>\n );\n};\n"],"names":["useRef","useClickAway","React","Container","Wrap","CSSTransition","Dropdown"],"mappings":";;;;;;;;;;;AAQA;;;AAGG;AACU,MAAA,gBAAgB,GAAG,CAAC,EAC/B,GAAG,EACH,kBAAkB,EAClB,QAAQ,EACR,SAAS,GAAG,mBAAmB,EAC/B,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,MAAO,GAAC,EACtB,OAAO,GAAG,GAAG,EACb,oBAAoB,GAAG,UAAU,EACjC,OAAO,EACP,YAAY,EACZ,YAAY,GACU,KAAI;AAC1B,IAAA,MAAM,WAAW,GAAGA,YAAM,CAAiB,IAAI,CAAC;AAEhD,IAAAC,yBAAY,CAAC,WAAW,EAAE,CAAC,KAAY,KAAI;AACzC,QAAA,IAAI,kBAAkB,EAAE;YACtB,WAAW,CAAC,KAAK,CAAC;AACnB;AACH,KAAC,CAAC;IAEF,QACEC,sBAAC,CAAA,aAAA,CAAAC,gBAAS,EACR,EAAA,SAAS,EAAE,CAAA,EAAG,SAAS,CAAA,WAAA,EAAc,SAAS,CAAA,CAAE,EAChD,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,WAAW,EAAA;QAEf,CAAC,QAAQ,IAAI,GAAG;QACjBD,sBAAC,CAAA,aAAA,CAAAE,WAAI,IAAC,SAAS,EAAE,GAAG,SAAS,CAAA,MAAA,EAAS,SAAS,CAAE,CAAA,EAAA;AAC/C,YAAAF,sBAAA,CAAA,aAAA,CAACG,kCAAa,EAAA,EACZ,EAAE,EAAE,kBAAkB,EACtB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,oBAAoB,EAChC,aAAa,EAAA,IAAA,EAAA;gBAEbH,sBAAC,CAAA,aAAA,CAAAI,eAAQ,IACP,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,CAAA,EAAG,SAAS,CAAmB,gBAAA,EAAA,SAAS,EAAE,EAEpD,EAAA,QAAQ,CACA,CACG,CACX;AACN,QAAA,QAAQ,IAAI,GAAG,CACN;AAEhB;;;;"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AnimatedDropdownProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @deprecated - Use `Dropdown` component instead.
|
|
5
|
+
* This component is deprecated and will be removed in future versions.
|
|
6
|
+
*/
|
|
3
7
|
export declare const AnimatedDropdown: ({ cta, shouldShowDropdown, children, className, reversed, onClickAway, timeout, transitionClassnames, onClick, onMouseEnter, onMouseLeave, }: AnimatedDropdownProps) => React.JSX.Element;
|
|
@@ -3,6 +3,10 @@ import { CSSTransition } from 'react-transition-group';
|
|
|
3
3
|
import { Container, Wrap, Dropdown } from './styled.js';
|
|
4
4
|
import { useClickAway } from './hooks/useClickAway.js';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated - Use `Dropdown` component instead.
|
|
8
|
+
* This component is deprecated and will be removed in future versions.
|
|
9
|
+
*/
|
|
6
10
|
const AnimatedDropdown = ({ cta, shouldShowDropdown, children, className = 'animated-dropdown', reversed = false, onClickAway = () => { }, timeout = 350, transitionClassnames = 'dropdown', onClick, onMouseEnter, onMouseLeave, }) => {
|
|
7
11
|
const dropdownRef = useRef(null);
|
|
8
12
|
useClickAway(dropdownRef, (event) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnimatedDropdown.js","sources":["../../../src/components/AnimatedDropdown/AnimatedDropdown.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { Wrap, Dropdown, Container } from './styled';\n\nimport { AnimatedDropdownProps } from './types';\nimport { useClickAway } from './hooks/useClickAway';\n\nexport const AnimatedDropdown = ({\n cta,\n shouldShowDropdown,\n children,\n className = 'animated-dropdown',\n reversed = false,\n onClickAway = () => {},\n timeout = 350,\n transitionClassnames = 'dropdown',\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: AnimatedDropdownProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useClickAway(dropdownRef, (event: Event) => {\n if (shouldShowDropdown) {\n onClickAway(event);\n }\n });\n\n return (\n <Container\n className={`${className}-container ${className}`}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n ref={dropdownRef}\n >\n {!reversed && cta}\n <Wrap className={`${className}-wrap ${className}`}>\n <CSSTransition\n in={shouldShowDropdown}\n timeout={timeout}\n classNames={transitionClassnames}\n unmountOnExit\n >\n <Dropdown\n role=\"dialog\"\n reversed={reversed}\n className={`${className}-basic-dropdown ${className}`}\n >\n {children}\n </Dropdown>\n </CSSTransition>\n </Wrap>\n {reversed && cta}\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"AnimatedDropdown.js","sources":["../../../src/components/AnimatedDropdown/AnimatedDropdown.tsx"],"sourcesContent":["import React, { useRef } from 'react';\nimport { CSSTransition } from 'react-transition-group';\n\nimport { Wrap, Dropdown, Container } from './styled';\n\nimport { AnimatedDropdownProps } from './types';\nimport { useClickAway } from './hooks/useClickAway';\n\n/**\n * @deprecated - Use `Dropdown` component instead.\n * This component is deprecated and will be removed in future versions.\n */\nexport const AnimatedDropdown = ({\n cta,\n shouldShowDropdown,\n children,\n className = 'animated-dropdown',\n reversed = false,\n onClickAway = () => {},\n timeout = 350,\n transitionClassnames = 'dropdown',\n onClick,\n onMouseEnter,\n onMouseLeave,\n}: AnimatedDropdownProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n\n useClickAway(dropdownRef, (event: Event) => {\n if (shouldShowDropdown) {\n onClickAway(event);\n }\n });\n\n return (\n <Container\n className={`${className}-container ${className}`}\n onClick={onClick}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n ref={dropdownRef}\n >\n {!reversed && cta}\n <Wrap className={`${className}-wrap ${className}`}>\n <CSSTransition\n in={shouldShowDropdown}\n timeout={timeout}\n classNames={transitionClassnames}\n unmountOnExit\n >\n <Dropdown\n role=\"dialog\"\n reversed={reversed}\n className={`${className}-basic-dropdown ${className}`}\n >\n {children}\n </Dropdown>\n </CSSTransition>\n </Wrap>\n {reversed && cta}\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;AAQA;;;AAGG;AACU,MAAA,gBAAgB,GAAG,CAAC,EAC/B,GAAG,EACH,kBAAkB,EAClB,QAAQ,EACR,SAAS,GAAG,mBAAmB,EAC/B,QAAQ,GAAG,KAAK,EAChB,WAAW,GAAG,MAAO,GAAC,EACtB,OAAO,GAAG,GAAG,EACb,oBAAoB,GAAG,UAAU,EACjC,OAAO,EACP,YAAY,EACZ,YAAY,GACU,KAAI;AAC1B,IAAA,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC;AAEhD,IAAA,YAAY,CAAC,WAAW,EAAE,CAAC,KAAY,KAAI;AACzC,QAAA,IAAI,kBAAkB,EAAE;YACtB,WAAW,CAAC,KAAK,CAAC;AACnB;AACH,KAAC,CAAC;IAEF,QACEA,cAAC,CAAA,aAAA,CAAA,SAAS,EACR,EAAA,SAAS,EAAE,CAAA,EAAG,SAAS,CAAA,WAAA,EAAc,SAAS,CAAA,CAAE,EAChD,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,GAAG,EAAE,WAAW,EAAA;QAEf,CAAC,QAAQ,IAAI,GAAG;QACjBA,cAAC,CAAA,aAAA,CAAA,IAAI,IAAC,SAAS,EAAE,GAAG,SAAS,CAAA,MAAA,EAAS,SAAS,CAAE,CAAA,EAAA;AAC/C,YAAAA,cAAA,CAAA,aAAA,CAAC,aAAa,EAAA,EACZ,EAAE,EAAE,kBAAkB,EACtB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,oBAAoB,EAChC,aAAa,EAAA,IAAA,EAAA;gBAEbA,cAAC,CAAA,aAAA,CAAA,QAAQ,IACP,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,CAAA,EAAG,SAAS,CAAmB,gBAAA,EAAA,SAAS,EAAE,EAEpD,EAAA,QAAQ,CACA,CACG,CACX;AACN,QAAA,QAAQ,IAAI,GAAG,CACN;AAEhB;;;;"}
|
|
@@ -6,6 +6,7 @@ var Button = require('../../../Button/Button.cjs');
|
|
|
6
6
|
var RightArrowIcon = require('../../../../tempIcons/RightArrowIcon.cjs');
|
|
7
7
|
var LeftArrowIcon = require('../../../../tempIcons/LeftArrowIcon.cjs');
|
|
8
8
|
var Stack = require('../../../Stack/Stack.cjs');
|
|
9
|
+
require('../../../Stack/types.cjs');
|
|
9
10
|
var UpArrowIcon = require('../../../../tempIcons/UpArrowIcon.cjs');
|
|
10
11
|
var DownArrowIcon = require('../../../../tempIcons/DownArrowIcon.cjs');
|
|
11
12
|
var types = require('../../types.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarHeader.cjs","sources":["../../../../../src/components/Calendars/components/subcomponents/CalendarHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from 'react-aria-components';\n\nimport { Button as VQBtn } from '../../../Button';\nimport { RightArrowIcon } from '../../../../tempIcons/RightArrowIcon';\nimport { LeftArrowIcon } from '../../../../tempIcons/LeftArrowIcon';\nimport { Stack } from '../../../Stack';\nimport { UpArrowIcon } from '../../../../tempIcons/UpArrowIcon';\nimport { DownArrowIcon } from '../../../../tempIcons/DownArrowIcon';\nimport { CalendarLevel } from '../../types';\nimport { levelMoveLabelMap } from '../../data/constants';\nimport { CalendarHeading } from './CalendarHeading';\n\ntype CalendarHeaderProps = {\n level: CalendarLevel;\n currentYear: number;\n handleSwitchLevel: () => void;\n isDisabled?: boolean;\n};\n\nexport const CalendarHeader = ({\n level,\n currentYear,\n handleSwitchLevel,\n isDisabled,\n}: CalendarHeaderProps) => (\n <Stack as=\"header\" direction=\"horizontal\" alignX=\"between\" alignY=\"center\" spacing=\"0\">\n <Button slot=\"previous\" isDisabled={isDisabled} type=\"button\">\n <LeftArrowIcon />\n </Button>\n <Stack\n direction=\"horizontal\"\n alignY=\"center\"\n alignX=\"stretch\"\n spacing=\"xs\"\n style={{ margin: '0 4px' }}\n >\n <CalendarHeading level={level} currentYear={currentYear} />\n <VQBtn\n type=\"button\"\n aria-label={levelMoveLabelMap[level]}\n variant=\"flat\"\n iconSlot={level === CalendarLevel.DODECADE ? <UpArrowIcon /> : <DownArrowIcon />}\n size=\"sm\"\n onClick={handleSwitchLevel}\n disabled={isDisabled}\n />\n </Stack>\n <Button slot=\"next\" isDisabled={isDisabled} type=\"button\">\n <RightArrowIcon />\n </Button>\n </Stack>\n);\n"],"names":["React","Stack","Button","LeftArrowIcon","CalendarHeading","VQBtn","levelMoveLabelMap","CalendarLevel","UpArrowIcon","DownArrowIcon","RightArrowIcon"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarHeader.cjs","sources":["../../../../../src/components/Calendars/components/subcomponents/CalendarHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from 'react-aria-components';\n\nimport { Button as VQBtn } from '../../../Button';\nimport { RightArrowIcon } from '../../../../tempIcons/RightArrowIcon';\nimport { LeftArrowIcon } from '../../../../tempIcons/LeftArrowIcon';\nimport { Stack } from '../../../Stack';\nimport { UpArrowIcon } from '../../../../tempIcons/UpArrowIcon';\nimport { DownArrowIcon } from '../../../../tempIcons/DownArrowIcon';\nimport { CalendarLevel } from '../../types';\nimport { levelMoveLabelMap } from '../../data/constants';\nimport { CalendarHeading } from './CalendarHeading';\n\ntype CalendarHeaderProps = {\n level: CalendarLevel;\n currentYear: number;\n handleSwitchLevel: () => void;\n isDisabled?: boolean;\n};\n\nexport const CalendarHeader = ({\n level,\n currentYear,\n handleSwitchLevel,\n isDisabled,\n}: CalendarHeaderProps) => (\n <Stack as=\"header\" direction=\"horizontal\" alignX=\"between\" alignY=\"center\" spacing=\"0\">\n <Button slot=\"previous\" isDisabled={isDisabled} type=\"button\">\n <LeftArrowIcon />\n </Button>\n <Stack\n direction=\"horizontal\"\n alignY=\"center\"\n alignX=\"stretch\"\n spacing=\"xs\"\n style={{ margin: '0 4px' }}\n >\n <CalendarHeading level={level} currentYear={currentYear} />\n <VQBtn\n type=\"button\"\n aria-label={levelMoveLabelMap[level]}\n variant=\"flat\"\n iconSlot={level === CalendarLevel.DODECADE ? <UpArrowIcon /> : <DownArrowIcon />}\n size=\"sm\"\n onClick={handleSwitchLevel}\n disabled={isDisabled}\n />\n </Stack>\n <Button slot=\"next\" isDisabled={isDisabled} type=\"button\">\n <RightArrowIcon />\n </Button>\n </Stack>\n);\n"],"names":["React","Stack","Button","LeftArrowIcon","CalendarHeading","VQBtn","levelMoveLabelMap","CalendarLevel","UpArrowIcon","DownArrowIcon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AC,IAAI,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,QAAQ,EAAA;AACvD,QAAAF,sBAAA,CAAA,aAAA,CAACU,6BAAc,EAAA,IAAA,CAAG,CACX,CACH;;;;"}
|
|
@@ -4,6 +4,7 @@ import { Button as Button$1 } from '../../../Button/Button.js';
|
|
|
4
4
|
import { RightArrowIcon } from '../../../../tempIcons/RightArrowIcon.js';
|
|
5
5
|
import { LeftArrowIcon } from '../../../../tempIcons/LeftArrowIcon.js';
|
|
6
6
|
import { Stack } from '../../../Stack/Stack.js';
|
|
7
|
+
import '../../../Stack/types.js';
|
|
7
8
|
import { UpArrowIcon } from '../../../../tempIcons/UpArrowIcon.js';
|
|
8
9
|
import { DownArrowIcon } from '../../../../tempIcons/DownArrowIcon.js';
|
|
9
10
|
import { CalendarLevel } from '../../types.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarHeader.js","sources":["../../../../../src/components/Calendars/components/subcomponents/CalendarHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from 'react-aria-components';\n\nimport { Button as VQBtn } from '../../../Button';\nimport { RightArrowIcon } from '../../../../tempIcons/RightArrowIcon';\nimport { LeftArrowIcon } from '../../../../tempIcons/LeftArrowIcon';\nimport { Stack } from '../../../Stack';\nimport { UpArrowIcon } from '../../../../tempIcons/UpArrowIcon';\nimport { DownArrowIcon } from '../../../../tempIcons/DownArrowIcon';\nimport { CalendarLevel } from '../../types';\nimport { levelMoveLabelMap } from '../../data/constants';\nimport { CalendarHeading } from './CalendarHeading';\n\ntype CalendarHeaderProps = {\n level: CalendarLevel;\n currentYear: number;\n handleSwitchLevel: () => void;\n isDisabled?: boolean;\n};\n\nexport const CalendarHeader = ({\n level,\n currentYear,\n handleSwitchLevel,\n isDisabled,\n}: CalendarHeaderProps) => (\n <Stack as=\"header\" direction=\"horizontal\" alignX=\"between\" alignY=\"center\" spacing=\"0\">\n <Button slot=\"previous\" isDisabled={isDisabled} type=\"button\">\n <LeftArrowIcon />\n </Button>\n <Stack\n direction=\"horizontal\"\n alignY=\"center\"\n alignX=\"stretch\"\n spacing=\"xs\"\n style={{ margin: '0 4px' }}\n >\n <CalendarHeading level={level} currentYear={currentYear} />\n <VQBtn\n type=\"button\"\n aria-label={levelMoveLabelMap[level]}\n variant=\"flat\"\n iconSlot={level === CalendarLevel.DODECADE ? <UpArrowIcon /> : <DownArrowIcon />}\n size=\"sm\"\n onClick={handleSwitchLevel}\n disabled={isDisabled}\n />\n </Stack>\n <Button slot=\"next\" isDisabled={isDisabled} type=\"button\">\n <RightArrowIcon />\n </Button>\n </Stack>\n);\n"],"names":["React","VQBtn"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CalendarHeader.js","sources":["../../../../../src/components/Calendars/components/subcomponents/CalendarHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from 'react-aria-components';\n\nimport { Button as VQBtn } from '../../../Button';\nimport { RightArrowIcon } from '../../../../tempIcons/RightArrowIcon';\nimport { LeftArrowIcon } from '../../../../tempIcons/LeftArrowIcon';\nimport { Stack } from '../../../Stack';\nimport { UpArrowIcon } from '../../../../tempIcons/UpArrowIcon';\nimport { DownArrowIcon } from '../../../../tempIcons/DownArrowIcon';\nimport { CalendarLevel } from '../../types';\nimport { levelMoveLabelMap } from '../../data/constants';\nimport { CalendarHeading } from './CalendarHeading';\n\ntype CalendarHeaderProps = {\n level: CalendarLevel;\n currentYear: number;\n handleSwitchLevel: () => void;\n isDisabled?: boolean;\n};\n\nexport const CalendarHeader = ({\n level,\n currentYear,\n handleSwitchLevel,\n isDisabled,\n}: CalendarHeaderProps) => (\n <Stack as=\"header\" direction=\"horizontal\" alignX=\"between\" alignY=\"center\" spacing=\"0\">\n <Button slot=\"previous\" isDisabled={isDisabled} type=\"button\">\n <LeftArrowIcon />\n </Button>\n <Stack\n direction=\"horizontal\"\n alignY=\"center\"\n alignX=\"stretch\"\n spacing=\"xs\"\n style={{ margin: '0 4px' }}\n >\n <CalendarHeading level={level} currentYear={currentYear} />\n <VQBtn\n type=\"button\"\n aria-label={levelMoveLabelMap[level]}\n variant=\"flat\"\n iconSlot={level === CalendarLevel.DODECADE ? <UpArrowIcon /> : <DownArrowIcon />}\n size=\"sm\"\n onClick={handleSwitchLevel}\n disabled={isDisabled}\n />\n </Stack>\n <Button slot=\"next\" isDisabled={isDisabled} type=\"button\">\n <RightArrowIcon />\n </Button>\n </Stack>\n);\n"],"names":["React","VQBtn"],"mappings":";;;;;;;;;;;;;AAoBa,MAAA,cAAc,GAAG,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,iBAAiB,EACjB,UAAU,GACU,MACpBA,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,EAAE,EAAC,QAAQ,EAAC,SAAS,EAAC,YAAY,EAAC,MAAM,EAAC,SAAS,EAAC,MAAM,EAAC,QAAQ,EAAC,OAAO,EAAC,GAAG,EAAA;AACpF,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAC,UAAU,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,QAAQ,EAAA;QAC3DA,cAAC,CAAA,aAAA,CAAA,aAAa,OAAG,CACV;IACTA,cAAC,CAAA,aAAA,CAAA,KAAK,EACJ,EAAA,SAAS,EAAC,YAAY,EACtB,MAAM,EAAC,QAAQ,EACf,MAAM,EAAC,SAAS,EAChB,OAAO,EAAC,IAAI,EACZ,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,EAAA;QAE1BA,cAAC,CAAA,aAAA,CAAA,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAI,CAAA;QAC3DA,cAAC,CAAA,aAAA,CAAAC,QAAK,IACJ,IAAI,EAAC,QAAQ,EACD,YAAA,EAAA,iBAAiB,CAAC,KAAK,CAAC,EACpC,OAAO,EAAC,MAAM,EACd,QAAQ,EAAE,KAAK,KAAK,aAAa,CAAC,QAAQ,GAAGD,cAAA,CAAA,aAAA,CAAC,WAAW,EAAG,IAAA,CAAA,GAAGA,cAAA,CAAA,aAAA,CAAC,aAAa,EAAA,IAAA,CAAG,EAChF,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,iBAAiB,EAC1B,QAAQ,EAAE,UAAU,EAAA,CACpB,CACI;AACR,IAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAC,MAAM,EAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC,QAAQ,EAAA;AACvD,QAAAA,cAAA,CAAA,aAAA,CAAC,cAAc,EAAA,IAAA,CAAG,CACX,CACH;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Choice.cjs","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?: ReactNode;\n hint?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n error?: ReactNode;\n bordered?: boolean;\n Badge?: ReactNode;\n Accessory?: ReactNode;\n Footer?: ReactNode;\n inputPosition?: 'left' | 'right';\n labelVariant?: TextVariant;\n}\n\nexport interface ChoiceProps extends ForwardedChoiceProps {\n id: string;\n children: ReactNode;\n}\n\nconst generateClassNames = (prefix?: string): any => ({\n hint: prefix ? 'choice__hint' : undefined,\n label: prefix ? 'choice__label' : undefined,\n tooltip: prefix ? 'choice__tooltip' : undefined,\n error: prefix ? 'choice__error' : undefined,\n});\n\nexport const Choice = ({\n id,\n className,\n label,\n hint,\n tooltip,\n tooltipContent,\n error,\n bordered,\n Badge,\n Accessory,\n Footer,\n children,\n disabled = false,\n labelVariant = 'body',\n inputPosition = 'left',\n}: ChoiceProps) => {\n const classNames = generateClassNames(className);\n\n const contentMarkup = (\n <RootLayout>\n {inputPosition === 'left' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n {Accessory && <AccessoryLayout>{Accessory}</AccessoryLayout>}\n {label || hint || error || Badge || Footer ? (\n <TextLayout>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n {Badge}\n {label && (\n <Text variant={labelVariant} className={classNames.label}>\n {label}\n </Text>\n )}\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent} className={classNames.tooltip}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n name=\"help\"\n width={theme.sizes.base}\n color={theme.colors.neutral.ink.lightest}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <HintText className={classNames.hint}>{hint}</HintText>}\n {error && <ErrorText className={classNames.error}>{error}</ErrorText>}\n {Footer}\n </TextLayout>\n ) : null}\n {inputPosition === 'right' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n </RootLayout>\n );\n\n if (bordered) {\n return (\n <BorderedWrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </BorderedWrapper>\n );\n }\n\n return (\n <Wrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </Wrapper>\n );\n};\n"],"names":["React","RootLayout","InputLayout","AccessoryLayout","TextLayout","Stack","Text","BlockTooltip","HelpIcon","theme","HintText","ErrorText","BorderedWrapper","Wrapper"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Choice.cjs","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?: ReactNode;\n hint?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n error?: ReactNode;\n bordered?: boolean;\n Badge?: ReactNode;\n Accessory?: ReactNode;\n Footer?: ReactNode;\n inputPosition?: 'left' | 'right';\n labelVariant?: TextVariant;\n}\n\nexport interface ChoiceProps extends ForwardedChoiceProps {\n id: string;\n children: ReactNode;\n}\n\nconst generateClassNames = (prefix?: string): any => ({\n hint: prefix ? 'choice__hint' : undefined,\n label: prefix ? 'choice__label' : undefined,\n tooltip: prefix ? 'choice__tooltip' : undefined,\n error: prefix ? 'choice__error' : undefined,\n});\n\nexport const Choice = ({\n id,\n className,\n label,\n hint,\n tooltip,\n tooltipContent,\n error,\n bordered,\n Badge,\n Accessory,\n Footer,\n children,\n disabled = false,\n labelVariant = 'body',\n inputPosition = 'left',\n}: ChoiceProps) => {\n const classNames = generateClassNames(className);\n\n const contentMarkup = (\n <RootLayout>\n {inputPosition === 'left' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n {Accessory && <AccessoryLayout>{Accessory}</AccessoryLayout>}\n {label || hint || error || Badge || Footer ? (\n <TextLayout>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n {Badge}\n {label && (\n <Text variant={labelVariant} className={classNames.label}>\n {label}\n </Text>\n )}\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent} className={classNames.tooltip}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n name=\"help\"\n width={theme.sizes.base}\n color={theme.colors.neutral.ink.lightest}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <HintText className={classNames.hint}>{hint}</HintText>}\n {error && <ErrorText className={classNames.error}>{error}</ErrorText>}\n {Footer}\n </TextLayout>\n ) : null}\n {inputPosition === 'right' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n </RootLayout>\n );\n\n if (bordered) {\n return (\n <BorderedWrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </BorderedWrapper>\n );\n }\n\n return (\n <Wrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </Wrapper>\n );\n};\n"],"names":["React","RootLayout","InputLayout","AccessoryLayout","TextLayout","Stack","Text","BlockTooltip","HelpIcon","theme","HintText","ErrorText","BorderedWrapper","Wrapper"],"mappings":";;;;;;;;;;;;;;AAwCA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAAW;IACpD,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IACzC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAC3C,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAC/C,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;AAC5C,CAAA,CAAC;AAEW,MAAA,MAAM,GAAG,CAAC,EACrB,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,YAAY,GAAG,MAAM,EACrB,aAAa,GAAG,MAAM,GACV,KAAI;AAChB,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAEhD,IAAA,MAAM,aAAa,IACjBA,sBAAA,CAAA,aAAA,CAACC,iBAAU,EAAA,IAAA;QACR,aAAa,KAAK,MAAM,KACvBD,qCAACE,kBAAW,EAAA,EAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,EAAA,EAAG,QAAQ,CAAe,CAC3E;AACA,QAAA,SAAS,IAAIF,sBAAA,CAAA,aAAA,CAACG,s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G,KAAK,EAAA,EAAG,QAAQ,CAAe,CAC3E,CACU,CACd;AAED,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,QACEF,sBAAC,CAAA,aAAA,CAAAY,sBAAe,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IACnE,aAAa,CACE;AAErB;AAED,IAAA,QACEZ,sBAAC,CAAA,aAAA,CAAAa,cAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC3D,aAAa,CACN;AAEd;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { Stack } from '../Stack/Stack.js';
|
|
3
|
+
import '../Stack/types.js';
|
|
3
4
|
import { theme } from '../../theme/index.js';
|
|
4
5
|
import { RootLayout, InputLayout, AccessoryLayout, TextLayout, BlockTooltip, HintText, ErrorText, BorderedWrapper, Wrapper } from './components/styled.js';
|
|
5
6
|
import { HelpIcon } from '../../tempIcons/HelpIcon.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Choice.js","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?: ReactNode;\n hint?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n error?: ReactNode;\n bordered?: boolean;\n Badge?: ReactNode;\n Accessory?: ReactNode;\n Footer?: ReactNode;\n inputPosition?: 'left' | 'right';\n labelVariant?: TextVariant;\n}\n\nexport interface ChoiceProps extends ForwardedChoiceProps {\n id: string;\n children: ReactNode;\n}\n\nconst generateClassNames = (prefix?: string): any => ({\n hint: prefix ? 'choice__hint' : undefined,\n label: prefix ? 'choice__label' : undefined,\n tooltip: prefix ? 'choice__tooltip' : undefined,\n error: prefix ? 'choice__error' : undefined,\n});\n\nexport const Choice = ({\n id,\n className,\n label,\n hint,\n tooltip,\n tooltipContent,\n error,\n bordered,\n Badge,\n Accessory,\n Footer,\n children,\n disabled = false,\n labelVariant = 'body',\n inputPosition = 'left',\n}: ChoiceProps) => {\n const classNames = generateClassNames(className);\n\n const contentMarkup = (\n <RootLayout>\n {inputPosition === 'left' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n {Accessory && <AccessoryLayout>{Accessory}</AccessoryLayout>}\n {label || hint || error || Badge || Footer ? (\n <TextLayout>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n {Badge}\n {label && (\n <Text variant={labelVariant} className={classNames.label}>\n {label}\n </Text>\n )}\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent} className={classNames.tooltip}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n name=\"help\"\n width={theme.sizes.base}\n color={theme.colors.neutral.ink.lightest}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <HintText className={classNames.hint}>{hint}</HintText>}\n {error && <ErrorText className={classNames.error}>{error}</ErrorText>}\n {Footer}\n </TextLayout>\n ) : null}\n {inputPosition === 'right' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n </RootLayout>\n );\n\n if (bordered) {\n return (\n <BorderedWrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </BorderedWrapper>\n );\n }\n\n return (\n <Wrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </Wrapper>\n );\n};\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Choice.js","sources":["../../../src/components/Choice/Choice.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Stack } from '../Stack';\nimport { theme } from '../../theme';\n\nimport {\n Wrapper,\n BorderedWrapper,\n RootLayout,\n InputLayout,\n AccessoryLayout,\n TextLayout,\n HintText,\n ErrorText,\n BlockTooltip,\n} from './components/styled';\nimport { HelpIcon } from '../../tempIcons/HelpIcon';\nimport { Text } from '../Text';\nimport { TextVariant } from '../Text/types';\n\nexport interface ForwardedChoiceProps {\n className?: string;\n disabled?: boolean;\n label?: ReactNode;\n hint?: ReactNode;\n tooltip?: string;\n tooltipContent?: ReactNode;\n error?: ReactNode;\n bordered?: boolean;\n Badge?: ReactNode;\n Accessory?: ReactNode;\n Footer?: ReactNode;\n inputPosition?: 'left' | 'right';\n labelVariant?: TextVariant;\n}\n\nexport interface ChoiceProps extends ForwardedChoiceProps {\n id: string;\n children: ReactNode;\n}\n\nconst generateClassNames = (prefix?: string): any => ({\n hint: prefix ? 'choice__hint' : undefined,\n label: prefix ? 'choice__label' : undefined,\n tooltip: prefix ? 'choice__tooltip' : undefined,\n error: prefix ? 'choice__error' : undefined,\n});\n\nexport const Choice = ({\n id,\n className,\n label,\n hint,\n tooltip,\n tooltipContent,\n error,\n bordered,\n Badge,\n Accessory,\n Footer,\n children,\n disabled = false,\n labelVariant = 'body',\n inputPosition = 'left',\n}: ChoiceProps) => {\n const classNames = generateClassNames(className);\n\n const contentMarkup = (\n <RootLayout>\n {inputPosition === 'left' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n {Accessory && <AccessoryLayout>{Accessory}</AccessoryLayout>}\n {label || hint || error || Badge || Footer ? (\n <TextLayout>\n <Stack direction=\"horizontal\" alignY=\"center\" spacing=\"sm\">\n {Badge}\n {label && (\n <Text variant={labelVariant} className={classNames.label}>\n {label}\n </Text>\n )}\n {(tooltip || tooltipContent) && (\n <BlockTooltip text={tooltip} content={tooltipContent} className={classNames.tooltip}>\n <HelpIcon\n data-testid=\"tooltip-help\"\n name=\"help\"\n width={theme.sizes.base}\n color={theme.colors.neutral.ink.lightest}\n />\n </BlockTooltip>\n )}\n </Stack>\n {hint && <HintText className={classNames.hint}>{hint}</HintText>}\n {error && <ErrorText className={classNames.error}>{error}</ErrorText>}\n {Footer}\n </TextLayout>\n ) : null}\n {inputPosition === 'right' && (\n <InputLayout align={Accessory ? 'center' : 'top'}>{children}</InputLayout>\n )}\n </RootLayout>\n );\n\n if (bordered) {\n return (\n <BorderedWrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </BorderedWrapper>\n );\n }\n\n return (\n <Wrapper disabled={disabled} htmlFor={id} className={className}>\n {contentMarkup}\n </Wrapper>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;AAwCA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAAW;IACpD,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS;IACzC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;IAC3C,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAC/C,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS;AAC5C,CAAA,CAAC;AAEW,MAAA,MAAM,GAAG,CAAC,EACrB,EAAE,EACF,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,KAAK,EACL,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,YAAY,GAAG,MAAM,EACrB,aAAa,GAAG,MAAM,GACV,KAAI;AAChB,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAEhD,IAAA,MAAM,aAAa,IACjBA,cAAA,CAAA,aAAA,CAAC,UAAU,EAAA,IAAA;QACR,aAAa,KAAK,MAAM,KACvBA,6BAAC,WAAW,EAAA,EAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,EAAA,EAAG,QAAQ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,EAAA,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,KAAK,EAAA,EAAG,QAAQ,CAAe,CAC3E,CACU,CACd;AAED,IAAA,IAAI,QAAQ,EAAE;AACZ,QAAA,QACEA,cAAC,CAAA,aAAA,CAAA,eAAe,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IACnE,aAAa,CACE;AAErB;AAED,IAAA,QACEA,cAAC,CAAA,aAAA,CAAA,OAAO,IAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,IAC3D,aAAa,CACN;AAEd;;;;"}
|
|
@@ -7,6 +7,7 @@ require('uid/secure');
|
|
|
7
7
|
var CellContent = require('../../CellContent/CellContent.cjs');
|
|
8
8
|
var usePinnedColumnStyles = require('../../../hooks/usePinnedColumnStyles.cjs');
|
|
9
9
|
require('../../../../Stack/Stack.cjs');
|
|
10
|
+
require('../../../../Stack/types.cjs');
|
|
10
11
|
require('../../../../../theme/modules/shadows.cjs');
|
|
11
12
|
require('../../../../../theme/modules/sizes.cjs');
|
|
12
13
|
require('../../../../../theme/modules/text.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BodyCell.cjs","sources":["../../../../../../src/components/DataGrid/components/Body/BodyCell/BodyCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Cell, flexRender } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\nimport { AriaRoles } from '../../../types';\nimport { CellContent } from '../../CellContent';\nimport { usePinnedColumnStyles } from '../../../hooks';\n\nimport { useExpandableCell } from './hooks';\nimport styles from './BodyCell.module.scss';\n\ntype ColumnCellProps = {\n /**\n * Cell within the TanStack Table instance.\n */\n cell: Cell<any, any>;\n\n /**\n * ARIA roles for the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether row selection is enabled.\n */\n enableRowSelection: boolean;\n\n /**\n * Whether row expanding is enabled for the grid.\n */\n enableExpanding: boolean;\n};\n\n/**\n * Renders a cell element, and its content, for a given column and row, within the grid body.\n */\nexport const BodyCell = ({\n cell,\n ariaRoles,\n enableRowSelection,\n enableExpanding,\n}: ColumnCellProps) => {\n const { justifyContent, textAlign, rowHeader } = cell.column.columnDef.meta!;\n const CellElement = rowHeader ? 'th' : 'td';\n\n const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({ column: cell.column });\n\n const { expandButtonProps, contentMarginLeft } = useExpandableCell({\n cell,\n enableExpanding,\n enableRowSelection,\n });\n\n const bodyCellClassname = buildClassnames([\n styles.bodyCell,\n pinnedCellClassName,\n 'data-grid-cell',\n ]);\n\n return (\n <CellElement\n className={bodyCellClassname}\n aria-colindex={cell.column.getIndex() + 1}\n scope={rowHeader ? 'row' : undefined}\n role={rowHeader ? 'rowheader' : ariaRoles.cell}\n style={pinnedCellStyles}\n >\n <CellContent\n contentStyle={\n {\n marginLeft: contentMarginLeft,\n justifyContent,\n textAlign,\n } as React.CSSProperties\n }\n expandButtonProps={expandButtonProps}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </CellContent>\n </CellElement>\n );\n};\n"],"names":["usePinnedColumnStyles","useExpandableCell","buildClassnames","styles","React","CellContent","flexRender"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BodyCell.cjs","sources":["../../../../../../src/components/DataGrid/components/Body/BodyCell/BodyCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Cell, flexRender } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\nimport { AriaRoles } from '../../../types';\nimport { CellContent } from '../../CellContent';\nimport { usePinnedColumnStyles } from '../../../hooks';\n\nimport { useExpandableCell } from './hooks';\nimport styles from './BodyCell.module.scss';\n\ntype ColumnCellProps = {\n /**\n * Cell within the TanStack Table instance.\n */\n cell: Cell<any, any>;\n\n /**\n * ARIA roles for the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether row selection is enabled.\n */\n enableRowSelection: boolean;\n\n /**\n * Whether row expanding is enabled for the grid.\n */\n enableExpanding: boolean;\n};\n\n/**\n * Renders a cell element, and its content, for a given column and row, within the grid body.\n */\nexport const BodyCell = ({\n cell,\n ariaRoles,\n enableRowSelection,\n enableExpanding,\n}: ColumnCellProps) => {\n const { justifyContent, textAlign, rowHeader } = cell.column.columnDef.meta!;\n const CellElement = rowHeader ? 'th' : 'td';\n\n const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({ column: cell.column });\n\n const { expandButtonProps, contentMarginLeft } = useExpandableCell({\n cell,\n enableExpanding,\n enableRowSelection,\n });\n\n const bodyCellClassname = buildClassnames([\n styles.bodyCell,\n pinnedCellClassName,\n 'data-grid-cell',\n ]);\n\n return (\n <CellElement\n className={bodyCellClassname}\n aria-colindex={cell.column.getIndex() + 1}\n scope={rowHeader ? 'row' : undefined}\n role={rowHeader ? 'rowheader' : ariaRoles.cell}\n style={pinnedCellStyles}\n >\n <CellContent\n contentStyle={\n {\n marginLeft: contentMarginLeft,\n justifyContent,\n textAlign,\n } as React.CSSProperties\n }\n expandButtonProps={expandButtonProps}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </CellContent>\n </CellElement>\n );\n};\n"],"names":["usePinnedColumnStyles","useExpandableCell","buildClassnames","styles","React","CellContent","flexRender"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAmCA;;AAEG;AACI,MAAM,QAAQ,GAAG,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,eAAe,GACC,KAAI;AACpB,IAAA,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAK;IAC5E,MAAM,WAAW,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;AAE3C,IAAA,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAGA,2CAAqB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;AAEhG,IAAA,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAGC,mCAAiB,CAAC;QACjE,IAAI;QACJ,eAAe;QACf,kBAAkB;AACnB,KAAA,CAAC;IAEF,MAAM,iBAAiB,GAAGC,+BAAe,CAAC;AACxC,QAAAC,eAAM,CAAC,QAAQ;QACf,mBAAmB;QACnB,gBAAgB;AACjB,KAAA,CAAC;IAEF,QACEC,qCAAC,WAAW,EAAA,EACV,SAAS,EAAE,iBAAiB,mBACb,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,EACzC,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,EACpC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC,IAAI,EAC9C,KAAK,EAAE,gBAAgB,EAAA;QAEvBA,sBAAC,CAAA,aAAA,CAAAC,uBAAW,EACV,EAAA,YAAY,EACV;AACE,gBAAA,UAAU,EAAE,iBAAiB;gBAC7B,cAAc;gBACd,SAAS;aACa,EAE1B,iBAAiB,EAAE,iBAAiB,EAAA,EAEnCC,qBAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAC9C,CACF;AAElB;;;;"}
|
|
@@ -5,6 +5,7 @@ import 'uid/secure';
|
|
|
5
5
|
import { CellContent } from '../../CellContent/CellContent.js';
|
|
6
6
|
import { usePinnedColumnStyles } from '../../../hooks/usePinnedColumnStyles.js';
|
|
7
7
|
import '../../../../Stack/Stack.js';
|
|
8
|
+
import '../../../../Stack/types.js';
|
|
8
9
|
import '../../../../../theme/modules/shadows.js';
|
|
9
10
|
import '../../../../../theme/modules/sizes.js';
|
|
10
11
|
import '../../../../../theme/modules/text.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BodyCell.js","sources":["../../../../../../src/components/DataGrid/components/Body/BodyCell/BodyCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Cell, flexRender } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\nimport { AriaRoles } from '../../../types';\nimport { CellContent } from '../../CellContent';\nimport { usePinnedColumnStyles } from '../../../hooks';\n\nimport { useExpandableCell } from './hooks';\nimport styles from './BodyCell.module.scss';\n\ntype ColumnCellProps = {\n /**\n * Cell within the TanStack Table instance.\n */\n cell: Cell<any, any>;\n\n /**\n * ARIA roles for the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether row selection is enabled.\n */\n enableRowSelection: boolean;\n\n /**\n * Whether row expanding is enabled for the grid.\n */\n enableExpanding: boolean;\n};\n\n/**\n * Renders a cell element, and its content, for a given column and row, within the grid body.\n */\nexport const BodyCell = ({\n cell,\n ariaRoles,\n enableRowSelection,\n enableExpanding,\n}: ColumnCellProps) => {\n const { justifyContent, textAlign, rowHeader } = cell.column.columnDef.meta!;\n const CellElement = rowHeader ? 'th' : 'td';\n\n const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({ column: cell.column });\n\n const { expandButtonProps, contentMarginLeft } = useExpandableCell({\n cell,\n enableExpanding,\n enableRowSelection,\n });\n\n const bodyCellClassname = buildClassnames([\n styles.bodyCell,\n pinnedCellClassName,\n 'data-grid-cell',\n ]);\n\n return (\n <CellElement\n className={bodyCellClassname}\n aria-colindex={cell.column.getIndex() + 1}\n scope={rowHeader ? 'row' : undefined}\n role={rowHeader ? 'rowheader' : ariaRoles.cell}\n style={pinnedCellStyles}\n >\n <CellContent\n contentStyle={\n {\n marginLeft: contentMarginLeft,\n justifyContent,\n textAlign,\n } as React.CSSProperties\n }\n expandButtonProps={expandButtonProps}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </CellContent>\n </CellElement>\n );\n};\n"],"names":["React"],"mappings":"
|
|
1
|
+
{"version":3,"file":"BodyCell.js","sources":["../../../../../../src/components/DataGrid/components/Body/BodyCell/BodyCell.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Cell, flexRender } from '@tanstack/react-table';\n\nimport { buildClassnames } from '../../../../../utils';\n\nimport { AriaRoles } from '../../../types';\nimport { CellContent } from '../../CellContent';\nimport { usePinnedColumnStyles } from '../../../hooks';\n\nimport { useExpandableCell } from './hooks';\nimport styles from './BodyCell.module.scss';\n\ntype ColumnCellProps = {\n /**\n * Cell within the TanStack Table instance.\n */\n cell: Cell<any, any>;\n\n /**\n * ARIA roles for the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether row selection is enabled.\n */\n enableRowSelection: boolean;\n\n /**\n * Whether row expanding is enabled for the grid.\n */\n enableExpanding: boolean;\n};\n\n/**\n * Renders a cell element, and its content, for a given column and row, within the grid body.\n */\nexport const BodyCell = ({\n cell,\n ariaRoles,\n enableRowSelection,\n enableExpanding,\n}: ColumnCellProps) => {\n const { justifyContent, textAlign, rowHeader } = cell.column.columnDef.meta!;\n const CellElement = rowHeader ? 'th' : 'td';\n\n const { pinnedCellClassName, pinnedCellStyles } = usePinnedColumnStyles({ column: cell.column });\n\n const { expandButtonProps, contentMarginLeft } = useExpandableCell({\n cell,\n enableExpanding,\n enableRowSelection,\n });\n\n const bodyCellClassname = buildClassnames([\n styles.bodyCell,\n pinnedCellClassName,\n 'data-grid-cell',\n ]);\n\n return (\n <CellElement\n className={bodyCellClassname}\n aria-colindex={cell.column.getIndex() + 1}\n scope={rowHeader ? 'row' : undefined}\n role={rowHeader ? 'rowheader' : ariaRoles.cell}\n style={pinnedCellStyles}\n >\n <CellContent\n contentStyle={\n {\n marginLeft: contentMarginLeft,\n justifyContent,\n textAlign,\n } as React.CSSProperties\n }\n expandButtonProps={expandButtonProps}\n >\n {flexRender(cell.column.columnDef.cell, cell.getContext())}\n </CellContent>\n </CellElement>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA;;AAEG;AACI,MAAM,QAAQ,GAAG,CAAC,EACvB,IAAI,EACJ,SAAS,EACT,kBAAkB,EAClB,eAAe,GACC,KAAI;AACpB,IAAA,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAK;IAC5E,MAAM,WAAW,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI;AAE3C,IAAA,MAAM,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,GAAG,qBAAqB,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;AAEhG,IAAA,MAAM,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,CAAC;QACjE,IAAI;QACJ,eAAe;QACf,kBAAkB;AACnB,KAAA,CAAC;IAEF,MAAM,iBAAiB,GAAG,eAAe,CAAC;AACxC,QAAA,MAAM,CAAC,QAAQ;QACf,mBAAmB;QACnB,gBAAgB;AACjB,KAAA,CAAC;IAEF,QACEA,6BAAC,WAAW,EAAA,EACV,SAAS,EAAE,iBAAiB,mBACb,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,EACzC,KAAK,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,EACpC,IAAI,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC,IAAI,EAC9C,KAAK,EAAE,gBAAgB,EAAA;QAEvBA,cAAC,CAAA,aAAA,CAAA,WAAW,EACV,EAAA,YAAY,EACV;AACE,gBAAA,UAAU,EAAE,iBAAiB;gBAC7B,cAAc;gBACd,SAAS;aACa,EAE1B,iBAAiB,EAAE,iBAAiB,EAAA,EAEnC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAC9C,CACF;AAElB;;;;"}
|
|
@@ -8,6 +8,7 @@ var GridContainer_module = require('./GridContainer.module.scss.cjs');
|
|
|
8
8
|
var usePinnedColumnLayout = require('../../hooks/usePinnedColumnLayout.cjs');
|
|
9
9
|
require('@tanstack/react-table');
|
|
10
10
|
require('../../../Stack/Stack.cjs');
|
|
11
|
+
require('../../../Stack/types.cjs');
|
|
11
12
|
require('../../../Choice/components/styled.cjs');
|
|
12
13
|
require('../../../Text/Text.cjs');
|
|
13
14
|
require('../../../Checkbox/styled.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GridContainer.cjs","sources":["../../../../../src/components/DataGrid/components/GridContainer/GridContainer.tsx"],"sourcesContent":["import React, { RefObject, CSSProperties, ReactNode, AriaAttributes } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { theme } from 'Theme';\nimport { SizeScale } from 'Theme/modules/sizes';\n\nimport { BorderMode } from '../../types/enums';\nimport { AriaRoles } from '../../types';\nimport { buildClassnames } from '../../../../utils/buildClassnames';\n\nimport { Container } from './Container';\n\nimport styles from './GridContainer.module.scss';\nimport { usePinnedColumnLayout } from '../../hooks';\n\ntype GridContainerProps = Pick<AriaAttributes, 'aria-label'> & {\n /**\n * Reference to be used for the outer container element.\n */\n containerRef?: RefObject<HTMLDivElement>;\n\n /**\n * Reference to be used for the table element.\n */\n tableRef?: RefObject<HTMLTableElement>;\n\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n containerStyles?: CSSProperties;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether resizeable columns are enabled or not.\n */\n enableResizeableColumns: boolean;\n\n /**\n * Density of the grid.\n */\n density: keyof SizeScale;\n\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n\n /**\n * Child elements (table contents).\n */\n children: ReactNode;\n};\n\nconst gridContainerClassname = buildClassnames([styles.dataGridStyle, 'data-grid']);\n\n/**\n * The Grid container, which includes a wrapper and the table element itself. Controls table layout, applies\n * styling and sets table-specific CSS variables (such as density).\n */\nexport const GridContainer = ({\n containerRef,\n tableRef,\n borderMode,\n containerStyles,\n ariaRoles,\n enableResizeableColumns,\n density,\n table,\n children,\n 'aria-label': ariaLabel,\n}: GridContainerProps) => {\n const { pinnedColumnLayoutStyles } = usePinnedColumnLayout({ table });\n\n return (\n <Container ref={containerRef} borderMode={borderMode} style={containerStyles}>\n <table\n ref={tableRef}\n className={gridContainerClassname}\n role={ariaRoles.table}\n style={\n {\n tableLayout: enableResizeableColumns ? 'fixed' : 'auto',\n '--density': theme.sizes[density],\n ...pinnedColumnLayoutStyles,\n } as CSSProperties\n }\n aria-colcount={table.getFlatHeaders().length}\n aria-rowcount={table.getRowCount()}\n aria-label={ariaLabel}\n >\n {children}\n </table>\n </Container>\n );\n};\n"],"names":["buildClassnames","styles","usePinnedColumnLayout","React","Container","theme"],"mappings":"
|
|
1
|
+
{"version":3,"file":"GridContainer.cjs","sources":["../../../../../src/components/DataGrid/components/GridContainer/GridContainer.tsx"],"sourcesContent":["import React, { RefObject, CSSProperties, ReactNode, AriaAttributes } from 'react';\nimport { Table } from '@tanstack/react-table';\n\nimport { theme } from 'Theme';\nimport { SizeScale } from 'Theme/modules/sizes';\n\nimport { BorderMode } from '../../types/enums';\nimport { AriaRoles } from '../../types';\nimport { buildClassnames } from '../../../../utils/buildClassnames';\n\nimport { Container } from './Container';\n\nimport styles from './GridContainer.module.scss';\nimport { usePinnedColumnLayout } from '../../hooks';\n\ntype GridContainerProps = Pick<AriaAttributes, 'aria-label'> & {\n /**\n * Reference to be used for the outer container element.\n */\n containerRef?: RefObject<HTMLDivElement>;\n\n /**\n * Reference to be used for the table element.\n */\n tableRef?: RefObject<HTMLTableElement>;\n\n /**\n * Border mode.\n */\n borderMode: BorderMode;\n\n /**\n * Additional container styles.\n */\n containerStyles?: CSSProperties;\n\n /**\n * ARIA roles used in the grid.\n */\n ariaRoles: AriaRoles;\n\n /**\n * Whether resizeable columns are enabled or not.\n */\n enableResizeableColumns: boolean;\n\n /**\n * Density of the grid.\n */\n density: keyof SizeScale;\n\n /**\n * The TanStack Table instance.\n */\n table: Table<any>;\n\n /**\n * Child elements (table contents).\n */\n children: ReactNode;\n};\n\nconst gridContainerClassname = buildClassnames([styles.dataGridStyle, 'data-grid']);\n\n/**\n * The Grid container, which includes a wrapper and the table element itself. Controls table layout, applies\n * styling and sets table-specific CSS variables (such as density).\n */\nexport const GridContainer = ({\n containerRef,\n tableRef,\n borderMode,\n containerStyles,\n ariaRoles,\n enableResizeableColumns,\n density,\n table,\n children,\n 'aria-label': ariaLabel,\n}: GridContainerProps) => {\n const { pinnedColumnLayoutStyles } = usePinnedColumnLayout({ table });\n\n return (\n <Container ref={containerRef} borderMode={borderMode} style={containerStyles}>\n <table\n ref={tableRef}\n className={gridContainerClassname}\n role={ariaRoles.table}\n style={\n {\n tableLayout: enableResizeableColumns ? 'fixed' : 'auto',\n '--density': theme.sizes[density],\n ...pinnedColumnLayoutStyles,\n } as CSSProperties\n }\n aria-colcount={table.getFlatHeaders().length}\n aria-rowcount={table.getRowCount()}\n aria-label={ariaLabel}\n >\n {children}\n </table>\n </Container>\n );\n};\n"],"names":["buildClassnames","styles","usePinnedColumnLayout","React","Container","theme"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA8DA,MAAM,sBAAsB,GAAGA,+BAAe,CAAC,CAACC,oBAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AAEnF;;;AAGG;AACI,MAAM,aAAa,GAAG,CAAC,EAC5B,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,OAAO,EACP,KAAK,EACL,QAAQ,EACR,YAAY,EAAE,SAAS,GACJ,KAAI;IACvB,MAAM,EAAE,wBAAwB,EAAE,GAAGC,2CAAqB,CAAC,EAAE,KAAK,EAAE,CAAC;AAErE,IAAA,QACEC,sBAAA,CAAA,aAAA,CAACC,mBAAS,EAAA,EAAC,GAAG,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAAA;AAC1E,QAAAD,sBAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EACE,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,sBAAsB,EACjC,IAAI,EAAE,SAAS,CAAC,KAAK,EACrB,KAAK,EACH;gBACE,WAAW,EAAE,uBAAuB,GAAG,OAAO,GAAG,MAAM;AACvD,gBAAA,WAAW,EAAEE,WAAK,CAAC,KAAK,CAAC,OAAO,CAAC;AACjC,gBAAA,GAAG,wBAAwB;AACX,aAAA,EAAA,eAAA,EAEL,KAAK,CAAC,cAAc,EAAE,CAAC,MAAM,mBAC7B,KAAK,CAAC,WAAW,EAAE,gBACtB,SAAS,EAAA,EAEpB,QAAQ,CACH,CACE;AAEhB;;;;"}
|
|
@@ -6,6 +6,7 @@ import styles from './GridContainer.module.scss.js';
|
|
|
6
6
|
import { usePinnedColumnLayout } from '../../hooks/usePinnedColumnLayout.js';
|
|
7
7
|
import '@tanstack/react-table';
|
|
8
8
|
import '../../../Stack/Stack.js';
|
|
9
|
+
import '../../../Stack/types.js';
|
|
9
10
|
import '../../../Choice/components/styled.js';
|
|
10
11
|
import '../../../Text/Text.js';
|
|
11
12
|
import '../../../Checkbox/styled.js';
|