@openedx/paragon 22.6.0 → 23.0.0-alpha.2
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/README.md +61 -21
- package/bin/paragon-scripts.js +128 -9
- package/dist/ActionRow/_index.scss +2 -4
- package/dist/Alert/index.scss +41 -32
- package/dist/Annotation/_mixins.scss +104 -0
- package/dist/Annotation/index.scss +130 -103
- package/dist/Avatar/index.scss +18 -20
- package/dist/AvatarButton/index.scss +3 -5
- package/dist/Badge/index.scss +112 -2
- package/dist/Breadcrumb/index.scss +14 -16
- package/dist/Bubble/index.scss +25 -12
- package/dist/Button/_mixins.scss +14 -0
- package/dist/Button/button-group.scss +126 -0
- package/dist/Button/index.js +15 -40
- package/dist/Button/index.js.map +1 -1
- package/dist/Button/index.scss +855 -372
- package/dist/Card/card-bootstrap.scss +168 -0
- package/dist/Card/index.scss +78 -79
- package/dist/Carousel/index.scss +168 -2
- package/dist/Chip/ChipIcon.d.ts +2 -2
- package/dist/Chip/ChipIcon.js.map +1 -1
- package/dist/Chip/index.d.ts +2 -2
- package/dist/Chip/index.js +2 -2
- package/dist/Chip/index.js.map +1 -1
- package/dist/Chip/index.scss +48 -38
- package/dist/Chip/mixins.scss +8 -3
- package/dist/ChipCarousel/index.scss +4 -4
- package/dist/CloseButton/index.scss +31 -2
- package/dist/Code/index.scss +47 -2
- package/dist/Collapsible/index.scss +15 -15
- package/dist/ColorPicker/index.scss +9 -11
- package/dist/DataTable/CollapsibleButtonGroup.js +2 -2
- package/dist/DataTable/CollapsibleButtonGroup.js.map +1 -1
- package/dist/DataTable/index.scss +48 -50
- package/dist/Dropdown/dropdown-bootstrap.scss +181 -0
- package/dist/Dropdown/index.js +0 -2
- package/dist/Dropdown/index.js.map +1 -1
- package/dist/Dropdown/index.scss +11 -12
- package/dist/Dropzone/index.scss +12 -14
- package/dist/Form/_FormText.scss +8 -8
- package/dist/Form/_bootstrap-custom-forms.scss +551 -0
- package/dist/Form/_bootstrap-forms.scss +381 -0
- package/dist/Form/_index.scss +168 -146
- package/dist/Form/_input-group.scss +188 -0
- package/dist/Form/_mixins.scss +216 -3
- package/dist/Hyperlink/index.js +32 -20
- package/dist/Hyperlink/index.js.map +1 -1
- package/dist/Hyperlink/index.scss +1 -1
- package/dist/Icon/index.d.ts +2 -4
- package/dist/Icon/index.js +1 -1
- package/dist/Icon/index.js.map +1 -1
- package/dist/Icon/index.scss +10 -12
- package/dist/IconButton/_mixins.scss +4 -0
- package/dist/IconButton/index.js +5 -11
- package/dist/IconButton/index.js.map +1 -1
- package/dist/IconButton/index.scss +387 -74
- package/dist/IconButtonToggle/index.scss +1 -1
- package/dist/Image/index.scss +53 -2
- package/dist/Menu/index.scss +25 -27
- package/dist/Modal/_ModalDialog.scss +52 -54
- package/dist/Modal/index.scss +6 -73
- package/dist/Nav/_mixins.scss +4 -4
- package/dist/Nav/index.scss +70 -66
- package/dist/Navbar/index.scss +276 -2
- package/dist/OverflowScroll/data/useOverflowScrollElementAttributes.js +3 -3
- package/dist/Overlay/index.js +2 -3
- package/dist/Overlay/index.js.map +1 -1
- package/dist/PageBanner/index.scss +17 -21
- package/dist/Pagination/index.scss +32 -34
- package/dist/Pagination/pagination-bootstrap.scss +83 -0
- package/dist/Popover/index.scss +9 -10
- package/dist/Popover/popover-bootstrap.scss +198 -0
- package/dist/ProductTour/Checkpoint.scss +71 -43
- package/dist/ProgressBar/_mixins.scss +22 -0
- package/dist/ProgressBar/bootstrap-progress.scss +49 -0
- package/dist/ProgressBar/index.scss +28 -36
- package/dist/Scrollable/index.scss +2 -2
- package/dist/SearchField/SearchFieldInput.js +2 -2
- package/dist/SearchField/SearchFieldInput.js.map +1 -1
- package/dist/SearchField/index.scss +15 -17
- package/dist/SelectableBox/index.scss +11 -13
- package/dist/Sheet/index.scss +10 -10
- package/dist/Spinner/index.scss +57 -2
- package/dist/Stack/index.scss +1 -3
- package/dist/Stepper/index.scss +20 -20
- package/dist/Sticky/index.scss +4 -6
- package/dist/Tabs/index.js +0 -2
- package/dist/Tabs/index.js.map +1 -1
- package/dist/Tabs/index.scss +29 -25
- package/dist/Toast/ToastContainer.scss +9 -11
- package/dist/Toast/bootstrap-toast.scss +46 -0
- package/dist/Toast/index.scss +9 -10
- package/dist/Tooltip/index.scss +136 -10
- package/dist/ValidationMessage/index.scss +1 -1
- package/dist/core.css +16777 -0
- package/dist/core.css.map +1 -0
- package/dist/core.min.css +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -18
- package/dist/index.scss +0 -4
- package/dist/light.css +4098 -0
- package/dist/light.css.map +1 -0
- package/dist/light.min.css +2 -0
- package/dist/theme-urls.json +21 -0
- package/dist/utils/breakpoints.js +1 -1
- package/lib/build-scss.js +188 -0
- package/lib/build-tokens.js +133 -0
- package/lib/help.js +36 -23
- package/lib/replace-variables.js +38 -0
- package/lib/utils.js +30 -0
- package/package.json +30 -14
- package/src/ActionRow/_index.scss +2 -4
- package/src/Alert/index.scss +41 -32
- package/src/Annotation/_mixins.scss +104 -0
- package/src/Annotation/index.scss +130 -103
- package/src/Avatar/index.scss +18 -20
- package/src/AvatarButton/index.scss +3 -5
- package/src/Badge/index.scss +112 -2
- package/src/Breadcrumb/index.scss +14 -16
- package/src/Bubble/index.scss +25 -12
- package/src/Button/{Button.test.tsx → Button.test.jsx} +2 -14
- package/src/Button/README.md +0 -84
- package/src/Button/__snapshots__/{Button.test.tsx.snap → Button.test.jsx.snap} +2 -19
- package/src/Button/_mixins.scss +14 -0
- package/src/Button/button-group.scss +126 -0
- package/src/Button/index.jsx +113 -0
- package/src/Button/index.scss +855 -372
- package/src/Card/card-bootstrap.scss +168 -0
- package/src/Card/index.scss +78 -79
- package/src/Carousel/index.scss +168 -2
- package/src/Chip/ChipIcon.tsx +1 -1
- package/src/Chip/index.scss +48 -38
- package/src/Chip/index.tsx +5 -5
- package/src/Chip/mixins.scss +8 -3
- package/src/ChipCarousel/index.scss +4 -4
- package/src/CloseButton/index.scss +31 -2
- package/src/Code/index.scss +47 -2
- package/src/Collapsible/index.scss +15 -15
- package/src/ColorPicker/index.scss +9 -11
- package/src/DataTable/CollapsibleButtonGroup.jsx +2 -2
- package/src/DataTable/index.scss +48 -50
- package/src/Dropdown/README.md +0 -93
- package/src/Dropdown/dropdown-bootstrap.scss +181 -0
- package/src/Dropdown/index.jsx +0 -2
- package/src/Dropdown/index.scss +11 -12
- package/src/Dropzone/index.scss +12 -14
- package/src/Form/_FormText.scss +8 -8
- package/src/Form/_bootstrap-custom-forms.scss +551 -0
- package/src/Form/_bootstrap-forms.scss +381 -0
- package/src/Form/_index.scss +168 -146
- package/src/Form/_input-group.scss +188 -0
- package/src/Form/_mixins.scss +216 -3
- package/src/Hyperlink/{Hyperlink.test.tsx → Hyperlink.test.jsx} +10 -21
- package/src/Hyperlink/{index.tsx → index.jsx} +37 -41
- package/src/Hyperlink/index.scss +1 -1
- package/src/Icon/index.d.ts +2 -4
- package/src/Icon/index.jsx +1 -1
- package/src/Icon/index.scss +10 -12
- package/src/IconButton/README.md +1 -15
- package/src/IconButton/__snapshots__/IconButton.test.jsx.snap +5 -28
- package/src/IconButton/_mixins.scss +4 -0
- package/src/IconButton/index.jsx +6 -13
- package/src/IconButton/index.scss +387 -74
- package/src/IconButtonToggle/index.scss +1 -1
- package/src/Image/index.scss +53 -2
- package/src/Menu/index.scss +25 -27
- package/src/Modal/_ModalDialog.scss +52 -54
- package/src/Modal/index.scss +6 -73
- package/src/Nav/_mixins.scss +4 -4
- package/src/Nav/index.scss +70 -66
- package/src/Navbar/index.scss +276 -2
- package/src/OverflowScroll/data/useOverflowScrollElementAttributes.js +3 -3
- package/src/Overlay/index.jsx +2 -3
- package/src/PageBanner/index.scss +17 -21
- package/src/Pagination/index.scss +32 -34
- package/src/Pagination/pagination-bootstrap.scss +83 -0
- package/src/Popover/index.scss +9 -10
- package/src/Popover/popover-bootstrap.scss +198 -0
- package/src/ProductTour/Checkpoint.scss +71 -43
- package/src/ProgressBar/_mixins.scss +22 -0
- package/src/ProgressBar/bootstrap-progress.scss +49 -0
- package/src/ProgressBar/index.scss +28 -36
- package/src/Scrollable/index.scss +2 -2
- package/src/SearchField/SearchFieldInput.jsx +2 -2
- package/src/SearchField/__snapshots__/SearchField.test.jsx.snap +12 -8
- package/src/SearchField/index.scss +15 -17
- package/src/SelectableBox/index.scss +11 -13
- package/src/Sheet/index.scss +10 -10
- package/src/Spinner/index.scss +57 -2
- package/src/Stack/index.scss +1 -3
- package/src/Stepper/index.scss +20 -20
- package/src/Sticky/index.scss +4 -6
- package/src/Tabs/README.md +1 -23
- package/src/Tabs/index.jsx +0 -3
- package/src/Tabs/index.scss +29 -25
- package/src/Toast/ToastContainer.scss +9 -11
- package/src/Toast/bootstrap-toast.scss +46 -0
- package/src/Toast/index.scss +9 -10
- package/src/Tooltip/index.scss +136 -10
- package/src/TransitionReplace/README.md +4 -4
- package/src/ValidationMessage/index.scss +1 -1
- package/src/index.d.ts +2 -2
- package/src/index.js +4 -18
- package/src/index.scss +0 -4
- package/src/{setupTest.ts → setupTest.js} +0 -7
- package/src/utils/breakpoints.js +1 -1
- package/styles/css/core/custom-media-breakpoints.css +17 -0
- package/styles/css/core/index.css +2 -0
- package/styles/css/core/variables.css +603 -0
- package/styles/css/themes/light/index.css +2 -0
- package/styles/css/themes/light/utility-classes.css +2454 -0
- package/styles/css/themes/light/variables.css +1644 -0
- package/{scss → styles/scss}/core/_functions.scss +1 -1
- package/styles/scss/core/_grid.scss +21 -0
- package/{scss → styles/scss}/core/_utilities.scss +17 -11
- package/styles/scss/core/_variables.scss +868 -0
- package/styles/scss/core/bootstrap-override/_functions.scss +104 -0
- package/styles/scss/core/bootstrap-override/_mixins.scss +4 -0
- package/styles/scss/core/bootstrap-override/_utilities.scss +4 -0
- package/styles/scss/core/bootstrap-override/bootstrap.scss +2 -0
- package/styles/scss/core/bootstrap-override/mixins/_grid-framework.scss +80 -0
- package/styles/scss/core/bootstrap-override/mixins/_grid.scss +69 -0
- package/styles/scss/core/bootstrap-override/mixins/_list-group.scss +22 -0
- package/styles/scss/core/bootstrap-override/utilities/_background.scss +7 -0
- package/styles/scss/core/bootstrap-override/utilities/_borders.scss +67 -0
- package/styles/scss/core/bootstrap-override/utilities/_spacing.scss +70 -0
- package/styles/scss/core/bootstrap-override/utilities/_text.scss +68 -0
- package/styles/scss/core/core.scss +21 -0
- package/{scss → styles/scss}/core/utilities-only.scss +1 -0
- package/tokens/README.md +157 -0
- package/tokens/css-utilities.js +56 -0
- package/tokens/map-scss-to-css.js +24 -0
- package/tokens/replace-variables.js +32 -0
- package/tokens/sass-helpers.js +98 -0
- package/tokens/src/core/alias/size.json +15 -0
- package/tokens/src/core/components/ActionRow.json +10 -0
- package/tokens/src/core/components/Alert.json +30 -0
- package/tokens/src/core/components/Annotation.json +25 -0
- package/tokens/src/core/components/Avatar.json +17 -0
- package/tokens/src/core/components/AvatarButton.json +11 -0
- package/tokens/src/core/components/Badge.json +33 -0
- package/tokens/src/core/components/Breadcrumb.json +23 -0
- package/tokens/src/core/components/Bubble.json +10 -0
- package/tokens/src/core/components/Button/core.json +105 -0
- package/tokens/src/core/components/Card.json +96 -0
- package/tokens/src/core/components/Carousel.json +37 -0
- package/tokens/src/core/components/Chip.json +41 -0
- package/tokens/src/core/components/ChipCarousel.json +15 -0
- package/tokens/src/core/components/CloseButton.json +14 -0
- package/tokens/src/core/components/Code.json +34 -0
- package/tokens/src/core/components/Collapsible.json +29 -0
- package/tokens/src/core/components/ColorPicker.json +8 -0
- package/tokens/src/core/components/Container.json +13 -0
- package/tokens/src/core/components/DataTable.json +27 -0
- package/tokens/src/core/components/Dropdown.json +67 -0
- package/tokens/src/core/components/Dropzone.json +21 -0
- package/tokens/src/core/components/Form/other.json +14 -0
- package/tokens/src/core/components/Form/size.json +229 -0
- package/tokens/src/core/components/Form/spacing.json +155 -0
- package/tokens/src/core/components/Form/transition.json +16 -0
- package/tokens/src/core/components/Form/typography.json +122 -0
- package/tokens/src/core/components/Icon.json +11 -0
- package/tokens/src/core/components/IconButton.json +15 -0
- package/tokens/src/core/components/Image.json +28 -0
- package/tokens/src/core/components/Menu.json +48 -0
- package/tokens/src/core/components/Modal.json +47 -0
- package/tokens/src/core/components/Nav.json +52 -0
- package/tokens/src/core/components/Navbar.json +70 -0
- package/tokens/src/core/components/Pagination.json +66 -0
- package/tokens/src/core/components/Popover.json +48 -0
- package/tokens/src/core/components/ProductTour.json +32 -0
- package/tokens/src/core/components/ProgressBar.json +39 -0
- package/tokens/src/core/components/SearchField.json +23 -0
- package/tokens/src/core/components/SelectableBox.json +9 -0
- package/tokens/src/core/components/Sheet.json +10 -0
- package/tokens/src/core/components/Spinner.json +19 -0
- package/tokens/src/core/components/Stack.json +7 -0
- package/tokens/src/core/components/Stepper.json +42 -0
- package/tokens/src/core/components/Sticky.json +7 -0
- package/tokens/src/core/components/Tab.json +19 -0
- package/tokens/src/core/components/Tabs.json +19 -0
- package/tokens/src/core/components/Toast.json +30 -0
- package/tokens/src/core/components/Tooltip.json +33 -0
- package/tokens/src/core/components/general/caret.json +13 -0
- package/tokens/src/core/components/general/headings.json +16 -0
- package/tokens/src/core/components/general/hr.json +10 -0
- package/tokens/src/core/components/general/input.json +51 -0
- package/tokens/src/core/components/general/link.json +30 -0
- package/tokens/src/core/components/general/list.json +26 -0
- package/tokens/src/core/components/general/text.json +24 -0
- package/tokens/src/core/global/breakpoints.json +12 -0
- package/tokens/src/core/global/display.json +22 -0
- package/tokens/src/core/global/elevation.json +19 -0
- package/tokens/src/core/global/other.json +4 -0
- package/tokens/src/core/global/spacing.json +37 -0
- package/tokens/src/core/global/transition.json +14 -0
- package/tokens/src/core/global/typography.json +91 -0
- package/tokens/src/core/utilities/color.json +12 -0
- package/tokens/src/themes/light/alias/color.json +114 -0
- package/tokens/src/themes/light/components/Alert.json +38 -0
- package/tokens/src/themes/light/components/Annotation.json +29 -0
- package/tokens/src/themes/light/components/Avatar.json +7 -0
- package/tokens/src/themes/light/components/Badge.json +186 -0
- package/tokens/src/themes/light/components/Breadcrumb.json +13 -0
- package/tokens/src/themes/light/components/Bubble.json +18 -0
- package/tokens/src/themes/light/components/Button/brand.json +260 -0
- package/tokens/src/themes/light/components/Button/core.json +24 -0
- package/tokens/src/themes/light/components/Button/danger.json +247 -0
- package/tokens/src/themes/light/components/Button/dark.json +230 -0
- package/tokens/src/themes/light/components/Button/info.json +238 -0
- package/tokens/src/themes/light/components/Button/light.json +236 -0
- package/tokens/src/themes/light/components/Button/primary.json +250 -0
- package/tokens/src/themes/light/components/Button/secondary.json +278 -0
- package/tokens/src/themes/light/components/Button/success.json +253 -0
- package/tokens/src/themes/light/components/Button/tertiary.json +109 -0
- package/tokens/src/themes/light/components/Button/warning.json +276 -0
- package/tokens/src/themes/light/components/Card.json +36 -0
- package/tokens/src/themes/light/components/Carousel.json +45 -0
- package/tokens/src/themes/light/components/Chip.json +50 -0
- package/tokens/src/themes/light/components/CloseButton.json +10 -0
- package/tokens/src/themes/light/components/Code.json +23 -0
- package/tokens/src/themes/light/components/DataTable.json +26 -0
- package/tokens/src/themes/light/components/Dropdown.json +41 -0
- package/tokens/src/themes/light/components/Dropzone.json +23 -0
- package/tokens/src/themes/light/components/Form/color.json +270 -0
- package/tokens/src/themes/light/components/Form/elevation.json +76 -0
- package/tokens/src/themes/light/components/Form/other.json +131 -0
- package/tokens/src/themes/light/components/IconButton.json +451 -0
- package/tokens/src/themes/light/components/Image.json +18 -0
- package/tokens/src/themes/light/components/Menu.json +30 -0
- package/tokens/src/themes/light/components/Modal.json +37 -0
- package/tokens/src/themes/light/components/Nav.json +166 -0
- package/tokens/src/themes/light/components/Navbar.json +136 -0
- package/tokens/src/themes/light/components/OverflowScroll.json +9 -0
- package/tokens/src/themes/light/components/PageBanner.json +24 -0
- package/tokens/src/themes/light/components/Pagination.json +45 -0
- package/tokens/src/themes/light/components/Popover.json +55 -0
- package/tokens/src/themes/light/components/ProductTour.json +35 -0
- package/tokens/src/themes/light/components/ProgressBar.json +20 -0
- package/tokens/src/themes/light/components/Scrollable.json +14 -0
- package/tokens/src/themes/light/components/SearchField.json +25 -0
- package/tokens/src/themes/light/components/Sheet.json +22 -0
- package/tokens/src/themes/light/components/Stepper.json +34 -0
- package/tokens/src/themes/light/components/Sticky.json +18 -0
- package/tokens/src/themes/light/components/Tab.json +62 -0
- package/tokens/src/themes/light/components/Toast.json +33 -0
- package/tokens/src/themes/light/components/Tooltip.json +30 -0
- package/tokens/src/themes/light/components/general/body.json +8 -0
- package/tokens/src/themes/light/components/general/headings.json +7 -0
- package/tokens/src/themes/light/components/general/hr.json +15 -0
- package/tokens/src/themes/light/components/general/input.json +18 -0
- package/tokens/src/themes/light/components/general/link.json +109 -0
- package/tokens/src/themes/light/components/general/list.json +38 -0
- package/tokens/src/themes/light/components/general/text.json +12 -0
- package/tokens/src/themes/light/global/color.json +1661 -0
- package/tokens/src/themes/light/global/elevation.json +201 -0
- package/tokens/src/themes/light/global/other.json +4 -0
- package/tokens/style-dictionary.js +229 -0
- package/tokens/utils.js +210 -0
- package/dist/ActionRow/_variables.scss +0 -2
- package/dist/Alert/_variables.scss +0 -24
- package/dist/Annotation/_variables.scss +0 -18
- package/dist/Avatar/_variables.scss +0 -10
- package/dist/AvatarButton/_variables.scss +0 -3
- package/dist/Badge/_variables.scss +0 -16
- package/dist/Breadcrumb/_variables.scss +0 -27
- package/dist/Bubble/_variables.scss +0 -8
- package/dist/Button/_variables.scss +0 -52
- package/dist/Button/deprecated/index.js +0 -149
- package/dist/Button/deprecated/index.js.map +0 -1
- package/dist/Button/index.d.ts +0 -35
- package/dist/Card/_variables.scss +0 -55
- package/dist/Carousel/_variables.scss +0 -27
- package/dist/CheckBox/index.js +0 -102
- package/dist/CheckBox/index.js.map +0 -1
- package/dist/CheckBoxGroup/index.js +0 -15
- package/dist/CheckBoxGroup/index.js.map +0 -1
- package/dist/Chip/_variables.scss +0 -28
- package/dist/ChipCarousel/_variables.scss +0 -3
- package/dist/CloseButton/_variables.scss +0 -6
- package/dist/Code/_variables.scss +0 -17
- package/dist/Collapsible/_variables.scss +0 -12
- package/dist/ColorPicker/_variables.scss +0 -2
- package/dist/Container/_variables.scss +0 -5
- package/dist/DataTable/_variables.scss +0 -11
- package/dist/Dropdown/_variables.scss +0 -33
- package/dist/Dropdown/deprecated/DropdownButton.js +0 -44
- package/dist/Dropdown/deprecated/DropdownButton.js.map +0 -1
- package/dist/Dropdown/deprecated/DropdownItem.js +0 -33
- package/dist/Dropdown/deprecated/DropdownItem.js.map +0 -1
- package/dist/Dropdown/deprecated/DropdownMenu.js +0 -46
- package/dist/Dropdown/deprecated/DropdownMenu.js.map +0 -1
- package/dist/Dropdown/deprecated/index.js +0 -241
- package/dist/Dropdown/deprecated/index.js.map +0 -1
- package/dist/Dropzone/_variables.scss +0 -9
- package/dist/Fieldset/index.js +0 -117
- package/dist/Fieldset/index.js.map +0 -1
- package/dist/Fieldset/index.scss +0 -12
- package/dist/Form/_variables.scss +0 -267
- package/dist/Hyperlink/index.d.ts +0 -24
- package/dist/Icon/_variables.scss +0 -7
- package/dist/Image/_variables.scss +0 -13
- package/dist/Input/index.js +0 -166
- package/dist/Input/index.js.map +0 -1
- package/dist/InputSelect/index.js +0 -105
- package/dist/InputSelect/index.js.map +0 -1
- package/dist/InputText/index.js +0 -45
- package/dist/InputText/index.js.map +0 -1
- package/dist/ListBox/index.js +0 -148
- package/dist/ListBox/index.js.map +0 -1
- package/dist/ListBoxOption/index.js +0 -94
- package/dist/ListBoxOption/index.js.map +0 -1
- package/dist/Menu/_variables.scss +0 -24
- package/dist/Modal/_variables.scss +0 -50
- package/dist/Modal/index.js +0 -292
- package/dist/Modal/index.js.map +0 -1
- package/dist/Nav/_variables.scss +0 -58
- package/dist/Navbar/_variables.scss +0 -40
- package/dist/OverflowScroll/_variables.scss +0 -5
- package/dist/OverflowScroll/index.scss +0 -1
- package/dist/Pagination/_variables.scss +0 -19
- package/dist/Popover/_variables.scss +0 -36
- package/dist/ProductTour/_variables.scss +0 -15
- package/dist/ProgressBar/_variables.scss +0 -23
- package/dist/RadioButtonGroup/index.js +0 -188
- package/dist/RadioButtonGroup/index.js.map +0 -1
- package/dist/SearchField/_variables.scss +0 -14
- package/dist/SelectableBox/_variables.scss +0 -5
- package/dist/Spinner/_variables.scss +0 -9
- package/dist/Stack/_variables.scss +0 -1
- package/dist/StatusAlert/index.js +0 -168
- package/dist/StatusAlert/index.js.map +0 -1
- package/dist/Stepper/_variables.scss +0 -18
- package/dist/Sticky/_variables.scss +0 -3
- package/dist/Table/_variables.scss +0 -34
- package/dist/Table/index.js +0 -267
- package/dist/Table/index.js.map +0 -1
- package/dist/Table/index.scss +0 -12
- package/dist/Tabs/_variables.scss +0 -24
- package/dist/Tabs/deprecated/Tabs.scss +0 -3
- package/dist/Tabs/deprecated/index.js +0 -123
- package/dist/Tabs/deprecated/index.js.map +0 -1
- package/dist/TextArea/index.js +0 -44
- package/dist/TextArea/index.js.map +0 -1
- package/dist/Toast/_variables.scss +0 -19
- package/dist/Tooltip/_variables.scss +0 -21
- package/dist/ValidationFormGroup/index.js +0 -106
- package/dist/ValidationFormGroup/index.js.map +0 -1
- package/dist/paragon.css +0 -45
- package/dist/setupTest.d.ts +0 -2
- package/dist/setupTest.js.map +0 -1
- package/dist/utils/types/bootstrap.d.ts +0 -39
- package/dist/utils/types/bootstrap.js +0 -2
- package/dist/utils/types/bootstrap.js.map +0 -1
- package/scss/core/_grid.scss +0 -21
- package/scss/core/_variables.scss +0 -875
- package/scss/core/core.scss +0 -21
- package/src/ActionRow/_variables.scss +0 -2
- package/src/Alert/_variables.scss +0 -24
- package/src/Annotation/_variables.scss +0 -18
- package/src/Avatar/_variables.scss +0 -10
- package/src/AvatarButton/_variables.scss +0 -3
- package/src/Badge/_variables.scss +0 -16
- package/src/Breadcrumb/_variables.scss +0 -27
- package/src/Bubble/_variables.scss +0 -8
- package/src/Button/_variables.scss +0 -52
- package/src/Button/deprecated/Button.test.jsx +0 -34
- package/src/Button/deprecated/index.jsx +0 -145
- package/src/Button/index.tsx +0 -159
- package/src/Card/_variables.scss +0 -55
- package/src/Carousel/_variables.scss +0 -27
- package/src/CheckBox/CheckBox.test.jsx +0 -65
- package/src/CheckBox/README.md +0 -93
- package/src/CheckBox/index.jsx +0 -80
- package/src/CheckBoxGroup/CheckBoxGroup.test.jsx +0 -33
- package/src/CheckBoxGroup/README.md +0 -35
- package/src/CheckBoxGroup/index.jsx +0 -19
- package/src/Chip/_variables.scss +0 -28
- package/src/ChipCarousel/_variables.scss +0 -3
- package/src/CloseButton/_variables.scss +0 -6
- package/src/Code/_variables.scss +0 -17
- package/src/Collapsible/_variables.scss +0 -12
- package/src/ColorPicker/_variables.scss +0 -2
- package/src/Container/_variables.scss +0 -5
- package/src/DataTable/_variables.scss +0 -11
- package/src/Dropdown/_variables.scss +0 -33
- package/src/Dropdown/deprecated/Dropdown.test.jsx +0 -238
- package/src/Dropdown/deprecated/DropdownButton.jsx +0 -52
- package/src/Dropdown/deprecated/DropdownItem.jsx +0 -34
- package/src/Dropdown/deprecated/DropdownMenu.jsx +0 -50
- package/src/Dropdown/deprecated/__snapshots__/Dropdown.test.jsx.snap +0 -229
- package/src/Dropdown/deprecated/index.jsx +0 -222
- package/src/Dropzone/_variables.scss +0 -9
- package/src/Fieldset/Fieldset.test.jsx +0 -101
- package/src/Fieldset/README.md +0 -146
- package/src/Fieldset/index.jsx +0 -107
- package/src/Fieldset/index.scss +0 -12
- package/src/Form/_variables.scss +0 -267
- package/src/Icon/_variables.scss +0 -7
- package/src/Image/_variables.scss +0 -13
- package/src/Input/README.md +0 -74
- package/src/Input/__snapshots__/input.test.jsx.snap +0 -53
- package/src/Input/index.jsx +0 -151
- package/src/Input/input.test.jsx +0 -85
- package/src/InputSelect/README.md +0 -136
- package/src/InputSelect/index.jsx +0 -92
- package/src/InputText/InputText.test.jsx +0 -74
- package/src/InputText/README.md +0 -293
- package/src/InputText/index.jsx +0 -49
- package/src/ListBox/ListBox.test.jsx +0 -161
- package/src/ListBox/README.md +0 -185
- package/src/ListBox/index.jsx +0 -115
- package/src/ListBoxOption/ListBoxOption.test.jsx +0 -154
- package/src/ListBoxOption/index.jsx +0 -78
- package/src/Menu/_variables.scss +0 -24
- package/src/Modal/README.md +0 -148
- package/src/Modal/_variables.scss +0 -50
- package/src/Modal/index.jsx +0 -319
- package/src/Modal/tests/Modal.test.jsx +0 -261
- package/src/Nav/_variables.scss +0 -58
- package/src/Navbar/_variables.scss +0 -40
- package/src/OverflowScroll/_variables.scss +0 -5
- package/src/OverflowScroll/index.scss +0 -1
- package/src/Pagination/_variables.scss +0 -19
- package/src/Popover/_variables.scss +0 -36
- package/src/ProductTour/_variables.scss +0 -15
- package/src/ProgressBar/_variables.scss +0 -23
- package/src/RadioButtonGroup/README.md +0 -50
- package/src/RadioButtonGroup/RadioButtonGroup.test.jsx +0 -127
- package/src/RadioButtonGroup/index.jsx +0 -185
- package/src/SearchField/_variables.scss +0 -14
- package/src/SelectableBox/_variables.scss +0 -5
- package/src/Spinner/_variables.scss +0 -9
- package/src/Stack/_variables.scss +0 -1
- package/src/StatusAlert/README.md +0 -149
- package/src/StatusAlert/StatusAlert.test.jsx +0 -150
- package/src/StatusAlert/index.jsx +0 -144
- package/src/Stepper/_variables.scss +0 -18
- package/src/Sticky/_variables.scss +0 -3
- package/src/Table/README.md +0 -506
- package/src/Table/Table.test.jsx +0 -367
- package/src/Table/_variables.scss +0 -34
- package/src/Table/index.jsx +0 -264
- package/src/Table/index.scss +0 -12
- package/src/Tabs/_variables.scss +0 -24
- package/src/Tabs/deprecated/Tabs.scss +0 -3
- package/src/Tabs/deprecated/Tabs.test.jsx +0 -50
- package/src/Tabs/deprecated/index.jsx +0 -117
- package/src/TextArea/README.md +0 -63
- package/src/TextArea/index.jsx +0 -48
- package/src/Toast/_variables.scss +0 -19
- package/src/Tooltip/_variables.scss +0 -21
- package/src/ValidationFormGroup/README.md +0 -116
- package/src/ValidationFormGroup/ValidationFormGroup.test.jsx +0 -146
- package/src/ValidationFormGroup/__snapshots__/ValidationFormGroup.test.jsx.snap +0 -161
- package/src/ValidationFormGroup/index.jsx +0 -114
- package/src/utils/types/bootstrap.test.tsx +0 -86
- package/src/utils/types/bootstrap.ts +0 -43
- /package/src/Button/{ButtonGroup.test.tsx → ButtonGroup.test.jsx} +0 -0
- /package/src/Button/{ButtonToolbar.test.tsx → ButtonToolbar.test.jsx} +0 -0
- /package/src/Button/__snapshots__/{ButtonGroup.test.tsx.snap → ButtonGroup.test.jsx.snap} +0 -0
- /package/src/Button/__snapshots__/{ButtonToolbar.test.tsx.snap → ButtonToolbar.test.jsx.snap} +0 -0
- /package/{scss → styles/scss}/core/_exports.module.scss +0 -0
- /package/{scss → styles/scss}/core/_typography.scss +0 -0
package/README.md
CHANGED
|
@@ -39,29 +39,39 @@ In your React project:
|
|
|
39
39
|
import { ComponentName } from '@openedx/paragon';
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
####
|
|
42
|
+
#### CSS Foundation
|
|
43
43
|
|
|
44
|
-
Usage
|
|
44
|
+
**Usage with no theme:**
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
The Paragon CSS Foundation offers a collection of fundamental styles, encompassing padding, typography, and sizing.
|
|
47
|
+
When applied, these styles contribute to the creation of a straightforward and neat appearance for your application.
|
|
48
|
+
|
|
49
|
+
To integrate these foundational styles into your project, include the following import:
|
|
47
50
|
|
|
48
51
|
```
|
|
49
|
-
|
|
50
|
-
@import '~@openedx/paragon/scss/core/core.scss';
|
|
52
|
+
@use "@openedx/paragon/dist/core.min.css";
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
Usage
|
|
55
|
+
**Usage with a theme:**
|
|
56
|
+
|
|
57
|
+
In addition to the basic styles, you can provide a theme layer that includes styles for colors, shadows, backgrounds
|
|
58
|
+
and transparency of elements. This allows you to visually represent a specific theme in your application.
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
To apply these theme-specific styles, include the following import:
|
|
56
61
|
|
|
57
62
|
```
|
|
58
|
-
@
|
|
59
|
-
@
|
|
60
|
-
@import '~@openedx/paragon/scss/core/core.scss';
|
|
61
|
-
@import '~@edx/brand/paragon/overrides.scss';
|
|
63
|
+
@use "@openedx/paragon/dist/core.min.css";
|
|
64
|
+
@use "@my-brand/light.min.css";
|
|
62
65
|
```
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
**CDN links:**
|
|
68
|
+
|
|
69
|
+
Alternative style integration is available when using CDN links:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
@import url("https://cdn.jsdelivr.net/npm/@my-brand/core.min.css");
|
|
73
|
+
@import url("https://cdn.jsdelivr.net/npm/@my-brand/light.min.css");
|
|
74
|
+
```
|
|
65
75
|
|
|
66
76
|
## Paragon CLI
|
|
67
77
|
|
|
@@ -69,7 +79,11 @@ The Paragon CLI (Command Line Interface) is a tool that provides various utility
|
|
|
69
79
|
|
|
70
80
|
### Available Commands
|
|
71
81
|
|
|
72
|
-
- `paragon install-theme
|
|
82
|
+
- `paragon install-theme`: Install a [brand package](https://github.com/openedx/brand-openedx).
|
|
83
|
+
- `paragon migrate-to-openedx-scope`: Migrate from "@edx/paragon" to "@openedx/paragon".
|
|
84
|
+
- `paragon build-tokens`: Build Paragon's design tokens.
|
|
85
|
+
- `paragon replace-variables`: Replace SCSS variables usages or definitions to CSS variables and vice versa in `.scss` files.
|
|
86
|
+
- `paragon build-scss`: Compile Paragon's core and themes SCSS into CSS.
|
|
73
87
|
|
|
74
88
|
Use `paragon help` to see more information.
|
|
75
89
|
|
|
@@ -148,7 +162,7 @@ module.exports = {
|
|
|
148
162
|
dist: The sub-directory of the source code where it puts its build artifact. Often "dist".
|
|
149
163
|
*/
|
|
150
164
|
localModules: [
|
|
151
|
-
{ moduleName: '@openedx/paragon/scss/core', dir: '../src/paragon', dist: 'scss/core' },
|
|
165
|
+
{ moduleName: '@openedx/paragon/styles/scss/core', dir: '../src/paragon', dist: 'styles/scss/core' },
|
|
152
166
|
{ moduleName: '@openedx/paragon/icons', dir: '../src/paragon', dist: 'icons' },
|
|
153
167
|
// Note that using dist: 'dist' will require you to run 'npm build' in Paragon
|
|
154
168
|
// to add local changes to the 'dist' directory, so that they can be picked up by the MFE.
|
|
@@ -158,7 +172,7 @@ module.exports = {
|
|
|
158
172
|
};
|
|
159
173
|
```
|
|
160
174
|
|
|
161
|
-
Then, when importing Paragon's core SCSS in your MFE the import needs to begin with a tilde `~` so that path to your local Paragon repository gets resolved correctly: `@import "~@openedx/paragon/scss/core";`
|
|
175
|
+
Then, when importing Paragon's core SCSS in your MFE the import needs to begin with a tilde `~` so that path to your local Paragon repository gets resolved correctly: `@import "~@openedx/paragon/styles/scss/core/core.scss";`
|
|
162
176
|
|
|
163
177
|
#### Internationalization
|
|
164
178
|
|
|
@@ -271,8 +285,7 @@ This will create a directory in `/src/` that will contain templates for all nece
|
|
|
271
285
|
MyComponent
|
|
272
286
|
├── index.jsx
|
|
273
287
|
├── README.md
|
|
274
|
-
├──
|
|
275
|
-
├── _variables.scss
|
|
288
|
+
├── index.scss
|
|
276
289
|
└── MyComponent.test.jsx
|
|
277
290
|
```
|
|
278
291
|
|
|
@@ -311,11 +324,10 @@ export default MyComponent;
|
|
|
311
324
|
##### 4. (Optional) Add styles to your component.
|
|
312
325
|
|
|
313
326
|
If your component requires additional styling (which most likely is the case), edit created SCSS style sheet in your
|
|
314
|
-
component's directory `/src/MyComponent/
|
|
327
|
+
component's directory `/src/MyComponent/index.scss` which by default contains an empty class for your component.
|
|
315
328
|
|
|
316
|
-
If you wish to use
|
|
317
|
-
easily overridden and customized by the consumers of Paragon),
|
|
318
|
-
This way the variables will also get automatically picked up by documentation site and displayed on your component's page.
|
|
329
|
+
If you wish to use CSS variables (which is the preferred way of styling the components since values can be
|
|
330
|
+
easily overridden and customized by the consumers of Paragon), you can do so by utilizing [design tokens](/tokens).
|
|
319
331
|
|
|
320
332
|
**Please note that you need to follow [Paragon's CSS styling conventions](docs/decisions/0012-css-styling-conventions).**
|
|
321
333
|
|
|
@@ -477,3 +489,31 @@ The assigned maintainers for this component and other project details may be fou
|
|
|
477
489
|
Please do not report security issues in public. Please email security@openedx.org.
|
|
478
490
|
|
|
479
491
|
We tend to prioritize security issues which impact the published `@openedx/paragon` NPM library more so than the [documentation website](https://paragon-openedx.netlify.app/) or example React application.
|
|
492
|
+
|
|
493
|
+
## Design Tokens
|
|
494
|
+
|
|
495
|
+
Design tokens are all the values needed to build and maintain a design system — spacing, color, typography, object styles, etc. They can represent anything defined by the design: color as an RGB value, opacity as a number, spacing as a REM value. They are used instead of hard-coded values to provide flexibility and uniformity across the application.
|
|
496
|
+
|
|
497
|
+
By defining style properties as tokens, we can transform the styles into various implementations compatible with different platforms or formats as our use cases expand (e.g., transforming tokens to CSS variables, CSS utility classes, etc.).
|
|
498
|
+
|
|
499
|
+
### Theming with design tokens
|
|
500
|
+
|
|
501
|
+
Paragon uses [style-dictionary](https://github.com/amzn/style-dictionary) to build design tokens into CSS variables that are included in the package. Read more in [design tokens README](tokens/README.md).
|
|
502
|
+
|
|
503
|
+
#### Compiling CSS from design tokens for Paragon contributions (in this repo)
|
|
504
|
+
1. **`npm install`.** Install dependencies, including `style-dictionary`.
|
|
505
|
+
2. Make changes to design token(s).
|
|
506
|
+
3. **`npm run build-scss`.** Transforms the tokens to CSS variables and CSS utility classes, and generates `core.css` and `light.css` output files.
|
|
507
|
+
- `light.css`. CSS variable definitions for colors in the light theme variant.
|
|
508
|
+
- `core.css`. Contains the majority of Paragon/Bootstrap foundational styles for layout, components, etc. Consumes CSS variables defined by `light.css`.
|
|
509
|
+
4. Test changes locally (e.g., running the documentation website, the example MFE app, etc.).
|
|
510
|
+
5. Ensure changes to `core.css` and `light.css` are committed & released to NPM (which also "releases" them on versioned public CDNs for NPM packages).
|
|
511
|
+
6. Consuming applications would inject the `core.css` and `light.css` theme files into their applications via a mechanism similar to https://github.com/openedx/frontend-platform/pull/440 (ideally pulling from a public CDN for NPM packages, but falling back to locally installed copies, if needed).
|
|
512
|
+
|
|
513
|
+
#### Compiling CSS from design tokens for `@edx/brand` theme authors (in `@edx/brand` repos)
|
|
514
|
+
1. **`npm install`.** Install dependencies, including `@openedx/paragon`.
|
|
515
|
+
2. Create tokens that will override Paragon's default tokens (matching same JSON schema).
|
|
516
|
+
3. **`npm run build-scss`.** This `@edx/brand` repo will have a new NPM script that utilizes a new CLI exported by `@openedx/paragon` which exposes the `build-tokens.js` script (or possibly another if we end up needing one for the brand packages to run specifically, TBD) for `@edx/brand` consumers.
|
|
517
|
+
- The intent of running this command is to effectively deep merge the tokens defined in Paragon's default tokens with the override tokens defined by `@edx/brand`, generating its own `core.css` and `light.css` output files (exact output files still a TBD) containing CSS variable overrides based on the token overrides.
|
|
518
|
+
5. Ensure any changes to the generated `core.css` and `light.css` files are committed & released to NPM (which also "releases" them on versioned public CDNs for NPM packages).
|
|
519
|
+
- _Note: It is a bit unclear still in the above linked implementation POC for `@edx/frontend-platform` how it would integrate with `@edx/brand` in this way. Open to suggestions/feedback/ideas here._
|
package/bin/paragon-scripts.js
CHANGED
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
const chalk = require('chalk');
|
|
3
3
|
const themeCommand = require('../lib/install-theme');
|
|
4
4
|
const helpCommand = require('../lib/help');
|
|
5
|
+
const buildTokensCommand = require('../lib/build-tokens');
|
|
6
|
+
const replaceVariablesCommand = require('../lib/replace-variables');
|
|
7
|
+
const buildScssCommand = require('../lib/build-scss');
|
|
8
|
+
const { sendTrackInfo } = require('../lib/utils');
|
|
5
9
|
const versionCommand = require('../lib/version');
|
|
6
10
|
const migrateToOpenEdxScopeCommand = require('../lib/migrate-to-openedx-scope');
|
|
7
11
|
|
|
8
|
-
const HELP_COMMAND = 'help';
|
|
9
12
|
const commandAliases = {
|
|
10
13
|
'-v': 'version',
|
|
11
14
|
'--version': 'version',
|
|
@@ -31,6 +34,9 @@ const COMMANDS = {
|
|
|
31
34
|
* {
|
|
32
35
|
* name: '--optionName',
|
|
33
36
|
* description: 'optionDescription',
|
|
37
|
+
* choices: 'optionChoices',
|
|
38
|
+
* defaultValue: 'optionDefaultValue',
|
|
39
|
+
* required: true/false,
|
|
34
40
|
* },
|
|
35
41
|
* ...
|
|
36
42
|
* ],
|
|
@@ -60,8 +66,118 @@ const COMMANDS = {
|
|
|
60
66
|
},
|
|
61
67
|
],
|
|
62
68
|
},
|
|
69
|
+
'build-tokens': {
|
|
70
|
+
executor: buildTokensCommand,
|
|
71
|
+
description: 'CLI to build Paragon design tokens.',
|
|
72
|
+
options: [
|
|
73
|
+
{
|
|
74
|
+
name: '-s, --source',
|
|
75
|
+
description: 'Specify the source directory for design tokens.',
|
|
76
|
+
defaultValue: '\'\'',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: '-b, --build-dir',
|
|
80
|
+
description: 'Specify the build directory for the generated tokens.',
|
|
81
|
+
defaultValue: './build/',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: '--source-tokens-only',
|
|
85
|
+
description: 'Include only source design tokens in the build.',
|
|
86
|
+
defaultValue: false,
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: '-t, --themes',
|
|
90
|
+
description: 'Specify themes to include in the token build.',
|
|
91
|
+
defaultValue: 'light',
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
'replace-variables': {
|
|
96
|
+
executor: replaceVariablesCommand,
|
|
97
|
+
description: 'CLI to replace SCSS variables usages or definitions to CSS variables and vice versa in .scss files.',
|
|
98
|
+
parameters: [
|
|
99
|
+
{
|
|
100
|
+
name: '-p, --filePath',
|
|
101
|
+
description: 'Path to the file or directory where to replace variables.',
|
|
102
|
+
defaultValue: '\'\'',
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
options: [
|
|
106
|
+
{
|
|
107
|
+
name: '-s, --source',
|
|
108
|
+
description: 'Type of replacement: usage or definition. If set to "definition" the command will only update SCSS variables definitions with CSS variables, if set to "usage" - all occurrences of SCSS variables will we replaced',
|
|
109
|
+
defaultValue: '\'\'',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: '-t, --replacementType',
|
|
113
|
+
description: 'Type of replacement: usage or definition. If set to "definition" the command will only update SCSS variables definitions with CSS variables, if set to "usage" - all occurrences of SCSS variables will we replaced',
|
|
114
|
+
choices: '[usage|definition]',
|
|
115
|
+
defaultValue: 'definition',
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: '-d, --direction',
|
|
119
|
+
description: 'Map direction: css-to-scss or scss-to-css, if replacement type parameter is set to "definition" this has no effect.',
|
|
120
|
+
choices: '[scss-to-css|css-to-scss]',
|
|
121
|
+
defaultValue: 'scss-to-css',
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
},
|
|
125
|
+
'build-scss': {
|
|
126
|
+
executor: buildScssCommand,
|
|
127
|
+
description: 'CLI to compile Paragon\'s core and themes SCSS into CSS.',
|
|
128
|
+
options: [
|
|
129
|
+
{
|
|
130
|
+
name: '--corePath',
|
|
131
|
+
description: 'Path to the theme\'s core SCSS file, defaults to Paragon\'s core.scss.',
|
|
132
|
+
defaultValue: 'styles/scss/core/core.scss',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: '--themesPath',
|
|
136
|
+
description: `Path to the directory that contains themes' files. Expects directory to have following structure:
|
|
137
|
+
themes/
|
|
138
|
+
light/
|
|
139
|
+
│ ├─ index.css
|
|
140
|
+
│ ├─ other_css_files
|
|
141
|
+
dark/
|
|
142
|
+
│ ├─ index.css
|
|
143
|
+
│ ├─ other_css_files
|
|
144
|
+
some_other_custom_theme/
|
|
145
|
+
│ ├─ index.css
|
|
146
|
+
│ ├─ other_css_files
|
|
147
|
+
...
|
|
148
|
+
|
|
149
|
+
where index.css has imported all other CSS files in the theme's subdirectory. The script will output
|
|
150
|
+
light.css, dark.css and some_other_custom_theme.css files (together with maps and minified versions).
|
|
151
|
+
You can provide any amount of themes. Default to paragon's themes.
|
|
152
|
+
`,
|
|
153
|
+
defaultValue: 'styles/css/themes',
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: '--outDir',
|
|
157
|
+
description: 'Specifies directory where to out resulting CSS files.',
|
|
158
|
+
defaultValue: './dist',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: '--defaultThemeVariants',
|
|
162
|
+
description: `Specifies default theme variants. Defaults to a single 'light' theme variant.
|
|
163
|
+
You can provide multiple default theme variants by passing multiple values, for
|
|
164
|
+
example: \`--defaultThemeVariants light dark\`
|
|
165
|
+
`,
|
|
166
|
+
defaultValue: 'light',
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
},
|
|
63
170
|
help: {
|
|
64
|
-
executor: helpCommand,
|
|
171
|
+
executor: (args) => helpCommand(COMMANDS, args),
|
|
172
|
+
parameters: [
|
|
173
|
+
{
|
|
174
|
+
name: 'command',
|
|
175
|
+
description: 'Specifies command name.',
|
|
176
|
+
defaultValue: '\'\'',
|
|
177
|
+
choices: '[install-theme|build-tokens|replace-variables|build-scss]',
|
|
178
|
+
required: false,
|
|
179
|
+
},
|
|
180
|
+
],
|
|
65
181
|
description: 'Displays help for available commands.',
|
|
66
182
|
},
|
|
67
183
|
version: {
|
|
@@ -70,8 +186,14 @@ const COMMANDS = {
|
|
|
70
186
|
},
|
|
71
187
|
};
|
|
72
188
|
|
|
189
|
+
/**
|
|
190
|
+
* Executes a Paragon CLI command based on the provided command-line arguments.
|
|
191
|
+
*
|
|
192
|
+
* @async
|
|
193
|
+
* @function executeParagonCommand
|
|
194
|
+
*/
|
|
73
195
|
(async () => {
|
|
74
|
-
const [command] = process.argv.slice(2);
|
|
196
|
+
const [command, ...commandArgs] = process.argv.slice(2);
|
|
75
197
|
const resolvedCommand = commandAliases[command] || command;
|
|
76
198
|
const executor = COMMANDS[resolvedCommand];
|
|
77
199
|
|
|
@@ -81,16 +203,13 @@ const COMMANDS = {
|
|
|
81
203
|
return;
|
|
82
204
|
}
|
|
83
205
|
|
|
84
|
-
if (command === HELP_COMMAND) {
|
|
85
|
-
helpCommand(COMMANDS);
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
206
|
try {
|
|
90
|
-
await executor.executor();
|
|
207
|
+
await executor.executor(commandArgs);
|
|
208
|
+
sendTrackInfo('openedx.paragon.cli-command.used', { command, status: 'success' });
|
|
91
209
|
} catch (error) {
|
|
92
210
|
// eslint-disable-next-line no-console
|
|
93
211
|
console.error(chalk.red.bold('An error occurred:', error.message));
|
|
212
|
+
sendTrackInfo('openedx.paragon.cli-command.used', { command, status: 'error', errorMsg: error.message });
|
|
94
213
|
process.exit(1);
|
|
95
214
|
}
|
|
96
215
|
})();
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import "variables";
|
|
2
|
-
|
|
3
1
|
.pgn__action-row {
|
|
4
2
|
display: flex;
|
|
5
3
|
flex-grow: 1;
|
|
@@ -11,7 +9,7 @@
|
|
|
11
9
|
}
|
|
12
10
|
|
|
13
11
|
& > * + * {
|
|
14
|
-
margin-inline-start:
|
|
12
|
+
margin-inline-start: var(--pgn-spacing-action-row-gap-x);
|
|
15
13
|
}
|
|
16
14
|
}
|
|
17
15
|
|
|
@@ -27,7 +25,7 @@
|
|
|
27
25
|
}
|
|
28
26
|
|
|
29
27
|
& > * + * {
|
|
30
|
-
margin-bottom:
|
|
28
|
+
margin-bottom: var(--pgn-spacing-action-row-gap-y);
|
|
31
29
|
}
|
|
32
30
|
}
|
|
33
31
|
|
package/dist/Alert/index.scss
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import "variables";
|
|
2
|
-
|
|
3
1
|
//
|
|
4
2
|
// Override Bootstrap's alert definition.
|
|
5
3
|
// We do this to get more control over colors
|
|
@@ -12,11 +10,13 @@
|
|
|
12
10
|
|
|
13
11
|
.alert {
|
|
14
12
|
position: relative;
|
|
15
|
-
padding:
|
|
16
|
-
margin-bottom:
|
|
17
|
-
border:
|
|
13
|
+
padding: var(--pgn-spacing-alert-padding-y) var(--pgn-spacing-alert-padding-x);
|
|
14
|
+
margin-bottom: var(--pgn-spacing-alert-margin-bottom);
|
|
15
|
+
border: var(--pgn-size-alert-border-width) solid var(--pgn-alert-border-color, transparent);
|
|
16
|
+
color: inherit;
|
|
17
|
+
background-color: var(--pgn-alert-bg, transparent);
|
|
18
18
|
|
|
19
|
-
@include border-radius(
|
|
19
|
+
@include border-radius(var(--pgn-size-alert-border-radius));
|
|
20
20
|
@include pgn-box-shadow(1, "down");
|
|
21
21
|
|
|
22
22
|
.alert-message-content > :last-child {
|
|
@@ -24,8 +24,9 @@
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
.alert-icon {
|
|
27
|
+
color: var(--pgn-alert-icon-color, inherit);
|
|
27
28
|
float: left;
|
|
28
|
-
margin-inline-end:
|
|
29
|
+
margin-inline-end: var(--pgn-spacing-alert-icon-space);
|
|
29
30
|
width: 1.5rem;
|
|
30
31
|
height: 1.5rem;
|
|
31
32
|
flex-shrink: 0;
|
|
@@ -34,17 +35,17 @@
|
|
|
34
35
|
|
|
35
36
|
// Headings for larger alerts
|
|
36
37
|
.alert-heading {
|
|
37
|
-
// Specified to prevent conflicts of changing
|
|
38
|
-
color:
|
|
38
|
+
// Specified to prevent conflicts of changing var(--pgn-color-headings-base)
|
|
39
|
+
color: var(--pgn-color-alert-title);
|
|
39
40
|
display: flex;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
// added to align content and icon
|
|
43
44
|
.alert-content {
|
|
44
45
|
display: flex;
|
|
45
|
-
font-size:
|
|
46
|
-
line-height:
|
|
47
|
-
color:
|
|
46
|
+
font-size: var(--pgn-typography-alert-font-size);
|
|
47
|
+
line-height: var(--pgn-typography-alert-line-height);
|
|
48
|
+
color: var(--pgn-color-alert-content);
|
|
48
49
|
text-align: start;
|
|
49
50
|
|
|
50
51
|
div {
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
|
|
55
56
|
// Provide class for links that match alerts
|
|
56
57
|
.alert-link {
|
|
57
|
-
font-weight:
|
|
58
|
+
font-weight: var(--pgn-typography-alert-font-weight-link);
|
|
58
59
|
text-decoration: underline;
|
|
59
60
|
|
|
60
61
|
&:hover {
|
|
@@ -66,16 +67,16 @@
|
|
|
66
67
|
//
|
|
67
68
|
// Expand the right padding and account for the close button's positioning.
|
|
68
69
|
|
|
69
|
-
// Baking in $close-font-size:
|
|
70
|
+
// Baking in $close-font-size: var(--pgn-typography-font-size-base) * 1.5 !default; to avoid any dependency
|
|
70
71
|
.alert-dismissible {
|
|
71
|
-
padding-right: (
|
|
72
|
+
padding-right: calc((var(--pgn-typography-font-size-base) * 1.5) + (var(--pgn-spacing-alert-padding-x) * 2));
|
|
72
73
|
|
|
73
74
|
// Adjust close link position
|
|
74
75
|
.close {
|
|
75
76
|
position: absolute;
|
|
76
77
|
top: 0;
|
|
77
78
|
right: 0;
|
|
78
|
-
padding:
|
|
79
|
+
padding: var(--pgn-spacing-alert-padding-y) var(--pgn-spacing-alert-padding-x);
|
|
79
80
|
color: inherit;
|
|
80
81
|
}
|
|
81
82
|
}
|
|
@@ -85,28 +86,36 @@
|
|
|
85
86
|
align-items: center;
|
|
86
87
|
|
|
87
88
|
.pgn__alert-actions {
|
|
88
|
-
margin-inline-start:
|
|
89
|
+
margin-inline-start: var(--pgn-spacing-alert-actions-gap);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
92
|
|
|
92
|
-
.pgn__alert-message-wrapper-stacked {
|
|
93
|
-
|
|
94
|
-
margin-top: $alert-actions-gap;
|
|
95
|
-
}
|
|
93
|
+
.pgn__alert-message-wrapper-stacked .pgn__alert-actions {
|
|
94
|
+
margin-top: var(--pgn-spacing-alert-actions-gap);
|
|
96
95
|
}
|
|
97
96
|
|
|
98
97
|
// Alternate styles
|
|
99
|
-
//
|
|
100
|
-
// Generate contextual modifier classes for coloring the alert.
|
|
101
98
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
99
|
+
.alert-success {
|
|
100
|
+
--pgn-alert-bg: var(--pgn-color-alert-bg-success);
|
|
101
|
+
--pgn-alert-border-color: var(--pgn-color-alert-border-success);
|
|
102
|
+
--pgn-alert-icon-color: var(--pgn-color-alert-icon-success);
|
|
103
|
+
}
|
|
107
104
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
105
|
+
.alert-info {
|
|
106
|
+
--pgn-alert-bg: var(--pgn-color-alert-bg-info);
|
|
107
|
+
--pgn-alert-border-color: var(--pgn-color-alert-border-info);
|
|
108
|
+
--pgn-alert-icon-color: var(--pgn-color-alert-icon-info);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.alert-danger {
|
|
112
|
+
--pgn-alert-bg: var(--pgn-color-alert-bg-danger);
|
|
113
|
+
--pgn-alert-border-color: var(--pgn-color-alert-border-danger);
|
|
114
|
+
--pgn-alert-icon-color: var(--pgn-color-alert-icon-danger);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.alert-warning {
|
|
118
|
+
--pgn-alert-bg: var(--pgn-color-alert-bg-warning);
|
|
119
|
+
--pgn-alert-border-color: var(--pgn-color-alert-border-warning);
|
|
120
|
+
--pgn-alert-icon-color: var(--pgn-color-alert-icon-warning);
|
|
112
121
|
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
@mixin annotation-triangle($triangle-color, $triangle-direction) {
|
|
2
|
+
content: "";
|
|
3
|
+
height: 0;
|
|
4
|
+
width: 0;
|
|
5
|
+
position: absolute;
|
|
6
|
+
border: solid transparent;
|
|
7
|
+
|
|
8
|
+
@if $triangle-direction == top {
|
|
9
|
+
border-bottom-color: $triangle-color;
|
|
10
|
+
border-width: 0 var(--pgn-size-annotation-arrow-border-width) var(--pgn-size-annotation-arrow-border-width);
|
|
11
|
+
right: 0;
|
|
12
|
+
left: 0;
|
|
13
|
+
top: calc(var(--pgn-size-annotation-arrow-border-width) * -1);
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@else if $triangle-direction == right {
|
|
18
|
+
border-left-color: $triangle-color;
|
|
19
|
+
border-width:
|
|
20
|
+
var(--pgn-size-annotation-arrow-border-width) 0 var(--pgn-size-annotation-arrow-border-width)
|
|
21
|
+
var(--pgn-size-annotation-arrow-border-width);
|
|
22
|
+
top: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
right: calc(var(--pgn-size-annotation-arrow-border-width) * -1);
|
|
25
|
+
margin: auto 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@else if $triangle-direction == bottom {
|
|
29
|
+
border-top-color: $triangle-color;
|
|
30
|
+
border-width: var(--pgn-size-annotation-arrow-border-width) var(--pgn-size-annotation-arrow-border-width) 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
left: 0;
|
|
33
|
+
bottom: calc(var(--pgn-size-annotation-arrow-border-width) * -1);
|
|
34
|
+
margin: 0 auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@else if $triangle-direction == left {
|
|
38
|
+
border-right-color: $triangle-color;
|
|
39
|
+
border-width:
|
|
40
|
+
var(--pgn-size-annotation-arrow-border-width) var(--pgn-size-annotation-arrow-border-width)
|
|
41
|
+
var(--pgn-size-annotation-arrow-border-width) 0;
|
|
42
|
+
top: 0;
|
|
43
|
+
bottom: 0;
|
|
44
|
+
left: calc(var(--pgn-size-annotation-arrow-border-width) * -1);
|
|
45
|
+
margin: auto 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@else {
|
|
49
|
+
@error "Unknown direction #{$triangle-direction}.";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@mixin annotation-variant($bg-color, $text-color, $direction) {
|
|
54
|
+
background-color: $bg-color;
|
|
55
|
+
color: $text-color;
|
|
56
|
+
|
|
57
|
+
// set additional margin to arrow side of the Annotation
|
|
58
|
+
margin-#{$direction}:
|
|
59
|
+
calc(
|
|
60
|
+
var(--pgn-size-annotation-arrow-border-width) + var(--pgn-spacing-annotation-arrow-side-margin)
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
[dir="rtl"] & {
|
|
64
|
+
@if $direction == left {
|
|
65
|
+
margin-left: 0;
|
|
66
|
+
margin-right:
|
|
67
|
+
calc(
|
|
68
|
+
var(--pgn-size-annotation-arrow-border-width) + var(--pgn-spacing-annotation-arrow-side-margin)
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@else if $direction == right {
|
|
73
|
+
margin-right: 0;
|
|
74
|
+
margin-left:
|
|
75
|
+
calc(
|
|
76
|
+
var(--pgn-size-annotation-arrow-border-width) + var(--pgn-spacing-annotation-arrow-side-margin)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&::after {
|
|
82
|
+
@include annotation-triangle($bg-color, $direction);
|
|
83
|
+
|
|
84
|
+
[dir="rtl"] & {
|
|
85
|
+
@if $direction == left {
|
|
86
|
+
left: initial;
|
|
87
|
+
right: calc(var(--pgn-size-annotation-arrow-border-width) * -1);
|
|
88
|
+
border-width:
|
|
89
|
+
var(--pgn-size-annotation-arrow-border-width) 0 var(--pgn-size-annotation-arrow-border-width)
|
|
90
|
+
var(--pgn-size-annotation-arrow-border-width);
|
|
91
|
+
border-left-color: $bg-color;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@else if $direction == right {
|
|
95
|
+
right: initial;
|
|
96
|
+
left: calc(var(--pgn-size-annotation-arrow-border-width) * -1);
|
|
97
|
+
border-width:
|
|
98
|
+
var(--pgn-size-annotation-arrow-border-width) var(--pgn-size-annotation-arrow-border-width)
|
|
99
|
+
var(--pgn-size-annotation-arrow-border-width) 0;
|
|
100
|
+
border-right-color: $bg-color;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|