@instructure/ui-tree-browser 7.20.1 → 7.20.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/CHANGELOG.md +6 -0
- package/es/TreeBrowser/TreeButton/index.js +22 -20
- package/es/TreeBrowser/TreeButton/theme.js +6 -0
- package/es/TreeBrowser/TreeCollection/index.js +2 -0
- package/es/TreeBrowser/TreeNode/index.js +21 -21
- package/es/TreeBrowser/TreeNode/theme.js +73 -0
- package/es/TreeBrowser/index.js +2 -1
- package/lib/TreeBrowser/TreeButton/index.js +22 -20
- package/lib/TreeBrowser/TreeButton/theme.js +6 -0
- package/lib/TreeBrowser/TreeCollection/index.js +2 -0
- package/lib/TreeBrowser/TreeNode/index.js +21 -21
- package/lib/TreeBrowser/TreeNode/theme.js +80 -0
- package/lib/TreeBrowser/index.js +4 -2
- package/package.json +11 -11
- package/src/TreeBrowser/TreeButton/index.js +2 -0
- package/src/TreeBrowser/TreeButton/styles.css +6 -0
- package/src/TreeBrowser/TreeButton/theme.js +6 -0
- package/src/TreeBrowser/TreeCollection/index.js +2 -0
- package/src/TreeBrowser/TreeNode/index.js +2 -2
- package/src/TreeBrowser/TreeNode/styles.css +328 -0
- package/src/TreeBrowser/TreeNode/theme.js +78 -0
- package/src/TreeBrowser/index.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [7.20.2](https://github.com/instructure/instructure-ui/compare/v7.20.1...v7.20.2) (2022-07-29)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **ui-tree-browser:** fix TreeButton theme overrides ([bf8e254](https://github.com/instructure/instructure-ui/commit/bf8e254))
|
|
11
|
+
|
|
6
12
|
## [7.20.1](https://github.com/instructure/instructure-ui/compare/v7.20.0...v7.20.1) (2022-07-22)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @instructure/ui-tree-browser
|
|
@@ -38,34 +38,36 @@ import { isIE11 } from '@instructure/ui-utils';
|
|
|
38
38
|
import { Img } from '@instructure/ui-img';
|
|
39
39
|
import { callRenderProp } from '@instructure/ui-react-utils';
|
|
40
40
|
var styles = {
|
|
41
|
-
componentId: '
|
|
41
|
+
componentId: 'eUVXS',
|
|
42
42
|
template: function template(theme) {
|
|
43
|
-
return "\n\n@keyframes dRarB_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.dRarB_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:dRarB_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .dRarB_bGBk{text-align:left}\n\n[dir=rtl] .dRarB_bGBk{text-align:right}\n\n.dRarB_bGBk:not(.dRarB_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.dRarB_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_bGBk:hover .dRarB_dnnz,.dRarB_bGBk:hover.dRarB_fjNS,.dRarB_bGBk:hover .dRarB_biFO,.dRarB_bGBk:hover .dRarB_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.dRarB_bGBk.dRarB_cVYB:not(.dRarB_eoSs):after{opacity:1;transform:scale(1)}\n\n.dRarB_bGBk.dRarB_cVYB.dRarB_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.dRarB_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.dRarB_dnnz,.dRarB_eWKC{min-width:0.0625rem}\n\n.dRarB_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.dRarB_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.dRarB_biFO,.dRarB_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.dRarB_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.dRarB_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.dRarB_ewdC:not(.dRarB_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:auto;right:0}\n\n.dRarB_doqw.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.dRarB_doqw.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz,.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz,.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw .dRarB_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.dRarB_doqw .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn .dRarB_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.dRarB_ycrn .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj .dRarB_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.dRarB_cMDj .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_fGhm.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_fGhm .dRarB_dnnz,.dRarB_fGhm .dRarB_biFO,.dRarB_fGhm .dRarB_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
43
|
+
return "\n\n@keyframes eUVXS_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.eUVXS_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:eUVXS_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .eUVXS_bGBk{text-align:left}\n\n[dir=rtl] .eUVXS_bGBk{text-align:right}\n\n.eUVXS_bGBk:not(.eUVXS_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.eUVXS_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.eUVXS_bGBk:hover.eUVXS_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.eUVXS_bGBk:hover.eUVXS_ewdC:before{visibility:hidden}\n\n.eUVXS_bGBk:hover .eUVXS_dnnz,.eUVXS_bGBk:hover.eUVXS_fjNS,.eUVXS_bGBk:hover .eUVXS_biFO,.eUVXS_bGBk:hover .eUVXS_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.eUVXS_bGBk.eUVXS_cVYB:not(.eUVXS_eoSs):after{opacity:1;transform:scale(1)}\n\n.eUVXS_bGBk.eUVXS_cVYB.eUVXS_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.eUVXS_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.eUVXS_dnnz,.eUVXS_eWKC{min-width:0.0625rem}\n\n.eUVXS_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.eUVXS_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.eUVXS_biFO,.eUVXS_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.eUVXS_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.eUVXS_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.eUVXS_ewdC:not(.eUVXS_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .eUVXS_ewdC:not(.eUVXS_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .eUVXS_ewdC:not(.eUVXS_cxHQ):before{left:auto;right:0}\n\n.eUVXS_doqw.eUVXS_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.eUVXS_doqw.eUVXS_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz,.eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz,[dir=ltr] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz,[dir=rtl] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw.eUVXS_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz,.eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz,[dir=ltr] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz,[dir=rtl] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw .eUVXS_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.eUVXS_doqw .eUVXS_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.eUVXS_ycrn.eUVXS_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.eUVXS_ycrn.eUVXS_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz,.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz,[dir=ltr] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz,[dir=rtl] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn.eUVXS_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz,.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz,[dir=ltr] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz,[dir=rtl] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn .eUVXS_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.eUVXS_ycrn .eUVXS_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.eUVXS_cMDj.eUVXS_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.eUVXS_cMDj.eUVXS_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz,.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz,[dir=ltr] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz,[dir=rtl] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj.eUVXS_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz,.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz,[dir=ltr] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz,[dir=rtl] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj .eUVXS_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.eUVXS_cMDj .eUVXS_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.eUVXS_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.eUVXS_fGhm.eUVXS_ewdC:before{visibility:hidden}\n\n.eUVXS_fGhm .eUVXS_dnnz,.eUVXS_fGhm .eUVXS_biFO,.eUVXS_fGhm .eUVXS_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
44
44
|
},
|
|
45
|
-
'root': '
|
|
46
|
-
'button': '
|
|
47
|
-
'ie11': '
|
|
48
|
-
'selected': '
|
|
49
|
-
'folderTree': '
|
|
50
|
-
'icon': '
|
|
51
|
-
'node': '
|
|
52
|
-
'textDescriptor': '
|
|
53
|
-
'textName': '
|
|
54
|
-
'focused': '
|
|
55
|
-
'layout': '
|
|
56
|
-
'text': '
|
|
57
|
-
'isRootButton': '
|
|
58
|
-
'small': '
|
|
59
|
-
'thumbnail': '
|
|
60
|
-
'indent': '
|
|
61
|
-
'medium': '
|
|
62
|
-
'large': '
|
|
45
|
+
'root': 'eUVXS_bGBk',
|
|
46
|
+
'button': 'eUVXS_EwaR',
|
|
47
|
+
'ie11': 'eUVXS_eoSs',
|
|
48
|
+
'selected': 'eUVXS_fGhm',
|
|
49
|
+
'folderTree': 'eUVXS_ewdC',
|
|
50
|
+
'icon': 'eUVXS_dnnz',
|
|
51
|
+
'node': 'eUVXS_fjNS',
|
|
52
|
+
'textDescriptor': 'eUVXS_biFO',
|
|
53
|
+
'textName': 'eUVXS_sTpL',
|
|
54
|
+
'focused': 'eUVXS_cVYB',
|
|
55
|
+
'layout': 'eUVXS_byIz',
|
|
56
|
+
'text': 'eUVXS_eWKC',
|
|
57
|
+
'isRootButton': 'eUVXS_cxHQ',
|
|
58
|
+
'small': 'eUVXS_doqw',
|
|
59
|
+
'thumbnail': 'eUVXS_dXYn',
|
|
60
|
+
'indent': 'eUVXS_cIHp',
|
|
61
|
+
'medium': 'eUVXS_ycrn',
|
|
62
|
+
'large': 'eUVXS_cMDj'
|
|
63
63
|
};
|
|
64
64
|
import theme from "./theme.js";
|
|
65
65
|
/**
|
|
66
66
|
---
|
|
67
67
|
parent: TreeBrowser
|
|
68
68
|
---
|
|
69
|
+
DO NOT use as standalone component!
|
|
70
|
+
TreeBrowser generates all Collections and Buttons internally.
|
|
69
71
|
**/
|
|
70
72
|
// Todo: merge TreeButton and TreeNode: TreeButton should be a special type of TreeNode
|
|
71
73
|
|
|
@@ -21,6 +21,12 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
TODO: this file is copied as Node's theme, keep in sync!
|
|
27
|
+
It needs to be copied instead of reused,
|
|
28
|
+
otherwise it messes with theme overrides
|
|
29
|
+
*/
|
|
24
30
|
export default function generator(_ref) {
|
|
25
31
|
var colors = _ref.colors,
|
|
26
32
|
spacing = _ref.spacing,
|
|
@@ -62,6 +62,8 @@ import theme from "./theme.js";
|
|
|
62
62
|
---
|
|
63
63
|
parent: TreeBrowser
|
|
64
64
|
---
|
|
65
|
+
DO NOT use as standalone component!
|
|
66
|
+
TreeBrowser generates all Collections and Buttons internally.
|
|
65
67
|
**/
|
|
66
68
|
|
|
67
69
|
var TreeCollection = (_dec = testable(), _dec2 = themeable(theme, styles), _dec(_class = _dec2(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
@@ -38,30 +38,30 @@ import { themeable } from '@instructure/ui-themeable';
|
|
|
38
38
|
import { testable } from '@instructure/ui-testable';
|
|
39
39
|
import { isIE11 } from '@instructure/ui-utils';
|
|
40
40
|
var styles = {
|
|
41
|
-
componentId: '
|
|
41
|
+
componentId: 'euDmC',
|
|
42
42
|
template: function template(theme) {
|
|
43
|
-
return "\n\n@keyframes dRarB_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.dRarB_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:dRarB_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .dRarB_bGBk{text-align:left}\n\n[dir=rtl] .dRarB_bGBk{text-align:right}\n\n.dRarB_bGBk:not(.dRarB_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.dRarB_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_bGBk:hover .dRarB_dnnz,.dRarB_bGBk:hover.dRarB_fjNS,.dRarB_bGBk:hover .dRarB_biFO,.dRarB_bGBk:hover .dRarB_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.dRarB_bGBk.dRarB_cVYB:not(.dRarB_eoSs):after{opacity:1;transform:scale(1)}\n\n.dRarB_bGBk.dRarB_cVYB.dRarB_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.dRarB_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.dRarB_dnnz,.dRarB_eWKC{min-width:0.0625rem}\n\n.dRarB_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.dRarB_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.dRarB_biFO,.dRarB_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.dRarB_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.dRarB_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.dRarB_ewdC:not(.dRarB_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:auto;right:0}\n\n.dRarB_doqw.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.dRarB_doqw.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz,.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz,.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw .dRarB_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.dRarB_doqw .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn .dRarB_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.dRarB_ycrn .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj .dRarB_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.dRarB_cMDj .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_fGhm.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_fGhm .dRarB_dnnz,.dRarB_fGhm .dRarB_biFO,.dRarB_fGhm .dRarB_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
43
|
+
return "\n\n@keyframes euDmC_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.euDmC_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:euDmC_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .euDmC_bGBk{text-align:left}\n\n[dir=rtl] .euDmC_bGBk{text-align:right}\n\n.euDmC_bGBk:not(.euDmC_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.euDmC_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.euDmC_bGBk:hover.euDmC_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.euDmC_bGBk:hover.euDmC_ewdC:before{visibility:hidden}\n\n.euDmC_bGBk:hover .euDmC_dnnz,.euDmC_bGBk:hover.euDmC_fjNS,.euDmC_bGBk:hover .euDmC_biFO,.euDmC_bGBk:hover .euDmC_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.euDmC_bGBk.euDmC_cVYB:not(.euDmC_eoSs):after{opacity:1;transform:scale(1)}\n\n.euDmC_bGBk.euDmC_cVYB.euDmC_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.euDmC_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.euDmC_dnnz,.euDmC_eWKC{min-width:0.0625rem}\n\n.euDmC_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.euDmC_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.euDmC_biFO,.euDmC_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.euDmC_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.euDmC_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.euDmC_ewdC:not(.euDmC_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .euDmC_ewdC:not(.euDmC_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .euDmC_ewdC:not(.euDmC_cxHQ):before{left:auto;right:0}\n\n.euDmC_doqw.euDmC_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.euDmC_doqw.euDmC_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.euDmC_doqw.euDmC_ewdC .euDmC_dnnz,.euDmC_doqw.euDmC_ewdC .euDmC_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .euDmC_doqw.euDmC_ewdC .euDmC_dnnz,[dir=ltr] .euDmC_doqw.euDmC_ewdC .euDmC_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .euDmC_doqw.euDmC_ewdC .euDmC_dnnz,[dir=rtl] .euDmC_doqw.euDmC_ewdC .euDmC_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.euDmC_doqw.euDmC_ewdC .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw.euDmC_ewdC .euDmC_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw.euDmC_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.euDmC_doqw.euDmC_cIHp .euDmC_dnnz,.euDmC_doqw.euDmC_cIHp .euDmC_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .euDmC_doqw.euDmC_cIHp .euDmC_dnnz,[dir=ltr] .euDmC_doqw.euDmC_cIHp .euDmC_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .euDmC_doqw.euDmC_cIHp .euDmC_dnnz,[dir=rtl] .euDmC_doqw.euDmC_cIHp .euDmC_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.euDmC_doqw.euDmC_cIHp .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw.euDmC_cIHp .euDmC_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw .euDmC_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.euDmC_doqw .euDmC_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.euDmC_ycrn.euDmC_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.euDmC_ycrn.euDmC_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.euDmC_ycrn.euDmC_ewdC .euDmC_dnnz,.euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .euDmC_ycrn.euDmC_ewdC .euDmC_dnnz,[dir=ltr] .euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .euDmC_ycrn.euDmC_ewdC .euDmC_dnnz,[dir=rtl] .euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.euDmC_ycrn.euDmC_ewdC .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn.euDmC_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.euDmC_ycrn.euDmC_cIHp .euDmC_dnnz,.euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .euDmC_ycrn.euDmC_cIHp .euDmC_dnnz,[dir=ltr] .euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .euDmC_ycrn.euDmC_cIHp .euDmC_dnnz,[dir=rtl] .euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.euDmC_ycrn.euDmC_cIHp .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn .euDmC_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.euDmC_ycrn .euDmC_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.euDmC_cMDj.euDmC_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.euDmC_cMDj.euDmC_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.euDmC_cMDj.euDmC_ewdC .euDmC_dnnz,.euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .euDmC_cMDj.euDmC_ewdC .euDmC_dnnz,[dir=ltr] .euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .euDmC_cMDj.euDmC_ewdC .euDmC_dnnz,[dir=rtl] .euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.euDmC_cMDj.euDmC_ewdC .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj.euDmC_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.euDmC_cMDj.euDmC_cIHp .euDmC_dnnz,.euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .euDmC_cMDj.euDmC_cIHp .euDmC_dnnz,[dir=ltr] .euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .euDmC_cMDj.euDmC_cIHp .euDmC_dnnz,[dir=rtl] .euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.euDmC_cMDj.euDmC_cIHp .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj .euDmC_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.euDmC_cMDj .euDmC_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.euDmC_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.euDmC_fGhm.euDmC_ewdC:before{visibility:hidden}\n\n.euDmC_fGhm .euDmC_dnnz,.euDmC_fGhm .euDmC_biFO,.euDmC_fGhm .euDmC_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
44
44
|
},
|
|
45
|
-
'root': '
|
|
46
|
-
'button': '
|
|
47
|
-
'ie11': '
|
|
48
|
-
'selected': '
|
|
49
|
-
'folderTree': '
|
|
50
|
-
'icon': '
|
|
51
|
-
'node': '
|
|
52
|
-
'textDescriptor': '
|
|
53
|
-
'textName': '
|
|
54
|
-
'focused': '
|
|
55
|
-
'layout': '
|
|
56
|
-
'text': '
|
|
57
|
-
'isRootButton': '
|
|
58
|
-
'small': '
|
|
59
|
-
'thumbnail': '
|
|
60
|
-
'indent': '
|
|
61
|
-
'medium': '
|
|
62
|
-
'large': '
|
|
45
|
+
'root': 'euDmC_bGBk',
|
|
46
|
+
'button': 'euDmC_EwaR',
|
|
47
|
+
'ie11': 'euDmC_eoSs',
|
|
48
|
+
'selected': 'euDmC_fGhm',
|
|
49
|
+
'folderTree': 'euDmC_ewdC',
|
|
50
|
+
'icon': 'euDmC_dnnz',
|
|
51
|
+
'node': 'euDmC_fjNS',
|
|
52
|
+
'textDescriptor': 'euDmC_biFO',
|
|
53
|
+
'textName': 'euDmC_sTpL',
|
|
54
|
+
'focused': 'euDmC_cVYB',
|
|
55
|
+
'layout': 'euDmC_byIz',
|
|
56
|
+
'text': 'euDmC_eWKC',
|
|
57
|
+
'isRootButton': 'euDmC_cxHQ',
|
|
58
|
+
'small': 'euDmC_doqw',
|
|
59
|
+
'thumbnail': 'euDmC_dXYn',
|
|
60
|
+
'indent': 'euDmC_cIHp',
|
|
61
|
+
'medium': 'euDmC_ycrn',
|
|
62
|
+
'large': 'euDmC_cMDj'
|
|
63
63
|
};
|
|
64
|
-
import theme from "
|
|
64
|
+
import theme from "./theme.js";
|
|
65
65
|
/**
|
|
66
66
|
---
|
|
67
67
|
parent: TreeBrowser
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
TODO: this is a copy of the Button's theme, keep in sync!
|
|
27
|
+
It needs to be copied instead of reused,
|
|
28
|
+
otherwise it messes with theme overrides
|
|
29
|
+
*/
|
|
30
|
+
export default function generator(_ref) {
|
|
31
|
+
var colors = _ref.colors,
|
|
32
|
+
spacing = _ref.spacing,
|
|
33
|
+
typography = _ref.typography,
|
|
34
|
+
borders = _ref.borders;
|
|
35
|
+
return {
|
|
36
|
+
hoverBackgroundColor: colors.backgroundBrand,
|
|
37
|
+
hoverTextColor: colors.textLightest,
|
|
38
|
+
focusOutlineWidth: borders.widthMedium,
|
|
39
|
+
focusOutlineColor: colors.borderBrand,
|
|
40
|
+
focusOutlineStyle: borders.style,
|
|
41
|
+
iconColor: colors.textDarkest,
|
|
42
|
+
iconsMarginRight: spacing.xSmall,
|
|
43
|
+
descriptorMarginTop: spacing.xxxSmall,
|
|
44
|
+
descriptorTextColor: colors.textDarkest,
|
|
45
|
+
descriptorFontSizeSmall: typography.fontSizeXSmall,
|
|
46
|
+
descriptorFontSizeMedium: typography.fontSizeXSmall,
|
|
47
|
+
descriptorFontSizeLarge: typography.fontSizeSmall,
|
|
48
|
+
nameTextColor: colors.textBrand,
|
|
49
|
+
nameFontSizeSmall: typography.fontSizeXSmall,
|
|
50
|
+
nameFontSizeMedium: typography.fontSizeSmall,
|
|
51
|
+
nameFontSizeLarge: typography.fontSizeMedium,
|
|
52
|
+
baseSpacingSmall: spacing.xSmall,
|
|
53
|
+
baseSpacingMedium: spacing.small,
|
|
54
|
+
baseSpacingLarge: '1rem',
|
|
55
|
+
borderWidth: borders.widthSmall,
|
|
56
|
+
borderRadius: borders.radiusMedium,
|
|
57
|
+
borderColor: colors.borderDark,
|
|
58
|
+
textLineHeight: typography.lineHeightCondensed,
|
|
59
|
+
selectedTextColor: colors.textLightest,
|
|
60
|
+
selectedBackgroundColor: colors.backgroundDark,
|
|
61
|
+
selectedOutlineWidth: borders.widthLarge
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
generator['canvas'] = function (variables) {
|
|
66
|
+
return {
|
|
67
|
+
iconColor: variables['ic-brand-font-color-dark'],
|
|
68
|
+
hoverBackgroundColor: variables['ic-brand-primary'],
|
|
69
|
+
focusOutlineColor: variables['ic-brand-primary'],
|
|
70
|
+
nameTextColor: variables['ic-brand-primary'],
|
|
71
|
+
descriptorTextColor: variables['ic-brand-font-color-dark']
|
|
72
|
+
};
|
|
73
|
+
};
|
package/es/TreeBrowser/index.js
CHANGED
|
@@ -38,6 +38,7 @@ import { pickProps } from '@instructure/ui-react-utils';
|
|
|
38
38
|
import { controllable } from '@instructure/ui-prop-types';
|
|
39
39
|
import { testable } from '@instructure/ui-testable';
|
|
40
40
|
import { TreeCollection } from "./TreeCollection/index.js";
|
|
41
|
+
import { TreeButton } from "./TreeButton/index.js";
|
|
41
42
|
import { TreeNode } from "./TreeNode/index.js";
|
|
42
43
|
var styles = {
|
|
43
44
|
componentId: 'DBzxS',
|
|
@@ -466,6 +467,6 @@ var TreeBrowser = (_dec = testable(), _dec2 = themeable(theme, styles), _dec(_cl
|
|
|
466
467
|
rootId: void 0,
|
|
467
468
|
expanded: void 0,
|
|
468
469
|
treeLabel: void 0
|
|
469
|
-
}, _class2.Node = TreeNode, _temp)) || _class) || _class);
|
|
470
|
+
}, _class2.Collection = TreeCollection, _class2.Button = TreeButton, _class2.Node = TreeNode, _temp)) || _class) || _class);
|
|
470
471
|
export default TreeBrowser;
|
|
471
472
|
export { TreeBrowser };
|
|
@@ -40,34 +40,36 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
40
40
|
var _dec, _dec2, _class, _class2, _temp;
|
|
41
41
|
|
|
42
42
|
var styles = {
|
|
43
|
-
componentId: '
|
|
43
|
+
componentId: 'eUVXS',
|
|
44
44
|
template: function template(theme) {
|
|
45
|
-
return "\n\n@keyframes dRarB_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.dRarB_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:dRarB_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .dRarB_bGBk{text-align:left}\n\n[dir=rtl] .dRarB_bGBk{text-align:right}\n\n.dRarB_bGBk:not(.dRarB_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.dRarB_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_bGBk:hover .dRarB_dnnz,.dRarB_bGBk:hover.dRarB_fjNS,.dRarB_bGBk:hover .dRarB_biFO,.dRarB_bGBk:hover .dRarB_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.dRarB_bGBk.dRarB_cVYB:not(.dRarB_eoSs):after{opacity:1;transform:scale(1)}\n\n.dRarB_bGBk.dRarB_cVYB.dRarB_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.dRarB_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.dRarB_dnnz,.dRarB_eWKC{min-width:0.0625rem}\n\n.dRarB_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.dRarB_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.dRarB_biFO,.dRarB_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.dRarB_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.dRarB_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.dRarB_ewdC:not(.dRarB_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:auto;right:0}\n\n.dRarB_doqw.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.dRarB_doqw.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz,.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz,.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw .dRarB_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.dRarB_doqw .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn .dRarB_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.dRarB_ycrn .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj .dRarB_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.dRarB_cMDj .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_fGhm.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_fGhm .dRarB_dnnz,.dRarB_fGhm .dRarB_biFO,.dRarB_fGhm .dRarB_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
45
|
+
return "\n\n@keyframes eUVXS_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.eUVXS_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:eUVXS_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .eUVXS_bGBk{text-align:left}\n\n[dir=rtl] .eUVXS_bGBk{text-align:right}\n\n.eUVXS_bGBk:not(.eUVXS_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.eUVXS_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.eUVXS_bGBk:hover.eUVXS_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.eUVXS_bGBk:hover.eUVXS_ewdC:before{visibility:hidden}\n\n.eUVXS_bGBk:hover .eUVXS_dnnz,.eUVXS_bGBk:hover.eUVXS_fjNS,.eUVXS_bGBk:hover .eUVXS_biFO,.eUVXS_bGBk:hover .eUVXS_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.eUVXS_bGBk.eUVXS_cVYB:not(.eUVXS_eoSs):after{opacity:1;transform:scale(1)}\n\n.eUVXS_bGBk.eUVXS_cVYB.eUVXS_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.eUVXS_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.eUVXS_dnnz,.eUVXS_eWKC{min-width:0.0625rem}\n\n.eUVXS_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.eUVXS_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.eUVXS_biFO,.eUVXS_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.eUVXS_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.eUVXS_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.eUVXS_ewdC:not(.eUVXS_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .eUVXS_ewdC:not(.eUVXS_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .eUVXS_ewdC:not(.eUVXS_cxHQ):before{left:auto;right:0}\n\n.eUVXS_doqw.eUVXS_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.eUVXS_doqw.eUVXS_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz,.eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz,[dir=ltr] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz,[dir=rtl] .eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.eUVXS_doqw.eUVXS_ewdC .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw.eUVXS_ewdC .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw.eUVXS_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz,.eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz,[dir=ltr] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz,[dir=rtl] .eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.eUVXS_doqw.eUVXS_cIHp .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw.eUVXS_cIHp .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.eUVXS_doqw .eUVXS_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.eUVXS_doqw .eUVXS_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.eUVXS_ycrn.eUVXS_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.eUVXS_ycrn.eUVXS_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz,.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz,[dir=ltr] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz,[dir=rtl] .eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn.eUVXS_ewdC .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn.eUVXS_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz,.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz,[dir=ltr] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz,[dir=rtl] .eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn.eUVXS_cIHp .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.eUVXS_ycrn .eUVXS_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.eUVXS_ycrn .eUVXS_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.eUVXS_cMDj.eUVXS_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.eUVXS_cMDj.eUVXS_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz,.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz,[dir=ltr] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz,[dir=rtl] .eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj.eUVXS_ewdC .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj.eUVXS_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz,.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz,[dir=ltr] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz,[dir=rtl] .eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj.eUVXS_cIHp .eUVXS_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.eUVXS_cMDj .eUVXS_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.eUVXS_cMDj .eUVXS_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.eUVXS_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.eUVXS_fGhm.eUVXS_ewdC:before{visibility:hidden}\n\n.eUVXS_fGhm .eUVXS_dnnz,.eUVXS_fGhm .eUVXS_biFO,.eUVXS_fGhm .eUVXS_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
46
46
|
},
|
|
47
|
-
'root': '
|
|
48
|
-
'button': '
|
|
49
|
-
'ie11': '
|
|
50
|
-
'selected': '
|
|
51
|
-
'folderTree': '
|
|
52
|
-
'icon': '
|
|
53
|
-
'node': '
|
|
54
|
-
'textDescriptor': '
|
|
55
|
-
'textName': '
|
|
56
|
-
'focused': '
|
|
57
|
-
'layout': '
|
|
58
|
-
'text': '
|
|
59
|
-
'isRootButton': '
|
|
60
|
-
'small': '
|
|
61
|
-
'thumbnail': '
|
|
62
|
-
'indent': '
|
|
63
|
-
'medium': '
|
|
64
|
-
'large': '
|
|
47
|
+
'root': 'eUVXS_bGBk',
|
|
48
|
+
'button': 'eUVXS_EwaR',
|
|
49
|
+
'ie11': 'eUVXS_eoSs',
|
|
50
|
+
'selected': 'eUVXS_fGhm',
|
|
51
|
+
'folderTree': 'eUVXS_ewdC',
|
|
52
|
+
'icon': 'eUVXS_dnnz',
|
|
53
|
+
'node': 'eUVXS_fjNS',
|
|
54
|
+
'textDescriptor': 'eUVXS_biFO',
|
|
55
|
+
'textName': 'eUVXS_sTpL',
|
|
56
|
+
'focused': 'eUVXS_cVYB',
|
|
57
|
+
'layout': 'eUVXS_byIz',
|
|
58
|
+
'text': 'eUVXS_eWKC',
|
|
59
|
+
'isRootButton': 'eUVXS_cxHQ',
|
|
60
|
+
'small': 'eUVXS_doqw',
|
|
61
|
+
'thumbnail': 'eUVXS_dXYn',
|
|
62
|
+
'indent': 'eUVXS_cIHp',
|
|
63
|
+
'medium': 'eUVXS_ycrn',
|
|
64
|
+
'large': 'eUVXS_cMDj'
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
/**
|
|
68
68
|
---
|
|
69
69
|
parent: TreeBrowser
|
|
70
70
|
---
|
|
71
|
+
DO NOT use as standalone component!
|
|
72
|
+
TreeBrowser generates all Collections and Buttons internally.
|
|
71
73
|
**/
|
|
72
74
|
// Todo: merge TreeButton and TreeNode: TreeButton should be a special type of TreeNode
|
|
73
75
|
var TreeButton = (_dec = (0, _testable.testable)(), _dec2 = (0, _themeable.themeable)(_theme.default, styles), _dec(_class = _dec2(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
@@ -28,6 +28,12 @@ exports.default = generator;
|
|
|
28
28
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
29
|
* SOFTWARE.
|
|
30
30
|
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
TODO: this file is copied as Node's theme, keep in sync!
|
|
34
|
+
It needs to be copied instead of reused,
|
|
35
|
+
otherwise it messes with theme overrides
|
|
36
|
+
*/
|
|
31
37
|
function generator(_ref) {
|
|
32
38
|
var colors = _ref.colors,
|
|
33
39
|
spacing = _ref.spacing,
|
|
@@ -65,6 +65,8 @@ var styles = {
|
|
|
65
65
|
---
|
|
66
66
|
parent: TreeBrowser
|
|
67
67
|
---
|
|
68
|
+
DO NOT use as standalone component!
|
|
69
|
+
TreeBrowser generates all Collections and Buttons internally.
|
|
68
70
|
**/
|
|
69
71
|
var TreeCollection = (_dec = (0, _testable.testable)(), _dec2 = (0, _themeable.themeable)(_theme.default, styles), _dec(_class = _dec2(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
70
72
|
(0, _inherits2.default)(TreeCollection, _Component);
|
|
@@ -35,33 +35,33 @@ var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
|
35
35
|
|
|
36
36
|
var _isIE = require("@instructure/ui-utils/lib/isIE11.js");
|
|
37
37
|
|
|
38
|
-
var _theme = _interopRequireDefault(require("
|
|
38
|
+
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
39
39
|
|
|
40
40
|
var _dec, _dec2, _class, _class2, _temp;
|
|
41
41
|
|
|
42
42
|
var styles = {
|
|
43
|
-
componentId: '
|
|
43
|
+
componentId: 'euDmC',
|
|
44
44
|
template: function template(theme) {
|
|
45
|
-
return "\n\n@keyframes dRarB_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.dRarB_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:dRarB_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .dRarB_bGBk{text-align:left}\n\n[dir=rtl] .dRarB_bGBk{text-align:right}\n\n.dRarB_bGBk:not(.dRarB_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.dRarB_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_bGBk:hover.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_bGBk:hover .dRarB_dnnz,.dRarB_bGBk:hover.dRarB_fjNS,.dRarB_bGBk:hover .dRarB_biFO,.dRarB_bGBk:hover .dRarB_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.dRarB_bGBk.dRarB_cVYB:not(.dRarB_eoSs):after{opacity:1;transform:scale(1)}\n\n.dRarB_bGBk.dRarB_cVYB.dRarB_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.dRarB_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.dRarB_dnnz,.dRarB_eWKC{min-width:0.0625rem}\n\n.dRarB_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.dRarB_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.dRarB_biFO,.dRarB_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.dRarB_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.dRarB_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.dRarB_ewdC:not(.dRarB_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .dRarB_ewdC:not(.dRarB_cxHQ):before{left:auto;right:0}\n\n.dRarB_doqw.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.dRarB_doqw.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz,.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz,.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_doqw.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.dRarB_doqw .dRarB_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.dRarB_doqw .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.dRarB_ycrn.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.dRarB_ycrn .dRarB_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.dRarB_ycrn .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.dRarB_cMDj.dRarB_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_ewdC .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=ltr] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dnnz,[dir=rtl] .dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj.dRarB_cIHp .dRarB_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.dRarB_cMDj .dRarB_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.dRarB_cMDj .dRarB_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.dRarB_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.dRarB_fGhm.dRarB_ewdC:before{visibility:hidden}\n\n.dRarB_fGhm .dRarB_dnnz,.dRarB_fGhm .dRarB_biFO,.dRarB_fGhm .dRarB_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
45
|
+
return "\n\n@keyframes euDmC_EwaR{50%{opacity:0.5;transform:translate3d(2%,0,0)}to{opacity:1;transform:translateZ(0)}}\n\n.euDmC_bGBk{-ms-user-select:none;-webkit-user-select:none;animation-delay:0.2s;animation-duration:0.2s;animation-fill-mode:forwards;animation-name:euDmC_EwaR;animation-timing-function:ease-out;background-color:transparent;border:none;border-radius:".concat(theme.borderRadius || 'inherit', ";box-sizing:border-box;cursor:pointer;display:block;font-family:inherit;margin:0;opacity:0.01;outline:0;position:relative;text-align:start;transform:translate3d(-2%,0,0);transform-origin:left center;user-select:none;width:100%;z-index:1}\n\n[dir=ltr] .euDmC_bGBk{text-align:left}\n\n[dir=rtl] .euDmC_bGBk{text-align:right}\n\n.euDmC_bGBk:not(.euDmC_eoSs):after{border:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', ";border-radius:calc(").concat(theme.borderRadius || 'inherit', "*1.5);bottom:-0.25rem;box-sizing:border-box;content:\"\";display:block;left:-0.25rem;opacity:0;pointer-events:none;position:absolute;right:-0.25rem;top:-0.25rem;transform:scale(0.95);transition:all 0.2s}\n\n.euDmC_bGBk:hover{background-color:").concat(theme.hoverBackgroundColor || 'inherit', "}\n\n.euDmC_bGBk:hover.euDmC_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.euDmC_bGBk:hover.euDmC_ewdC:before{visibility:hidden}\n\n.euDmC_bGBk:hover .euDmC_dnnz,.euDmC_bGBk:hover.euDmC_fjNS,.euDmC_bGBk:hover .euDmC_biFO,.euDmC_bGBk:hover .euDmC_sTpL{color:").concat(theme.hoverTextColor || 'inherit', "}\n\n.euDmC_bGBk.euDmC_cVYB:not(.euDmC_eoSs):after{opacity:1;transform:scale(1)}\n\n.euDmC_bGBk.euDmC_cVYB.euDmC_eoSs{outline:").concat(theme.focusOutlineWidth || 'inherit', " ").concat(theme.focusOutlineStyle || 'inherit', " ").concat(theme.focusOutlineColor || 'inherit', "}\n\n.euDmC_byIz{align-items:center;display:flex;line-height:1;min-height:2rem}\n\n.euDmC_dnnz,.euDmC_eWKC{min-width:0.0625rem}\n\n.euDmC_dnnz{align-items:center;color:").concat(theme.iconColor || 'inherit', ";display:flex;justify-content:center;position:relative;z-index:1}\n\n.euDmC_eWKC{flex:1;line-height:").concat(theme.textLineHeight || 'inherit', "}\n\n.euDmC_biFO,.euDmC_sTpL{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n\n.euDmC_sTpL{color:").concat(theme.nameTextColor || 'inherit', "}\n\n.euDmC_biFO{color:").concat(theme.descriptorTextColor || 'inherit', ";margin-top:").concat(theme.descriptorMarginTop || 'inherit', "}\n\n.euDmC_ewdC:not(.euDmC_cxHQ):before{background:").concat(theme.borderColor || 'inherit', ";content:\"\";height:").concat(theme.borderWidth || 'inherit', ";inset-inline-end:auto;inset-inline-start:0;pointer-events:none;position:absolute;top:50%}\n\n[dir=ltr] .euDmC_ewdC:not(.euDmC_cxHQ):before{left:0;right:auto}\n\n[dir=rtl] .euDmC_ewdC:not(.euDmC_cxHQ):before{left:auto;right:0}\n\n.euDmC_doqw.euDmC_ewdC{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) ").concat(theme.baseSpacingSmall || 'inherit', "}\n\n.euDmC_doqw.euDmC_ewdC:before{width:calc(").concat(theme.baseSpacingSmall || 'inherit', " - 0.0625rem)}\n\n.euDmC_doqw.euDmC_ewdC .euDmC_dnnz,.euDmC_doqw.euDmC_ewdC .euDmC_dXYn{-webkit-margin-end:").concat(theme.baseSpacingSmall || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingSmall || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .euDmC_doqw.euDmC_ewdC .euDmC_dnnz,[dir=ltr] .euDmC_doqw.euDmC_ewdC .euDmC_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingSmall || 'inherit', "}\n\n[dir=rtl] .euDmC_doqw.euDmC_ewdC .euDmC_dnnz,[dir=rtl] .euDmC_doqw.euDmC_ewdC .euDmC_dXYn{margin-left:").concat(theme.baseSpacingSmall || 'inherit', ";margin-right:0}\n\n.euDmC_doqw.euDmC_ewdC .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw.euDmC_ewdC .euDmC_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw.euDmC_cIHp{padding:calc(").concat(theme.baseSpacingSmall || 'inherit', "/3) calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n.euDmC_doqw.euDmC_cIHp .euDmC_dnnz,.euDmC_doqw.euDmC_cIHp .euDmC_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .euDmC_doqw.euDmC_cIHp .euDmC_dnnz,[dir=ltr] .euDmC_doqw.euDmC_cIHp .euDmC_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2)}\n\n[dir=rtl] .euDmC_doqw.euDmC_cIHp .euDmC_dnnz,[dir=rtl] .euDmC_doqw.euDmC_cIHp .euDmC_dXYn{margin-left:calc(").concat(theme.baseSpacingSmall || 'inherit', "/2);margin-right:0}\n\n.euDmC_doqw.euDmC_cIHp .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw.euDmC_cIHp .euDmC_dXYn{height:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2);width:calc(").concat(theme.baseSpacingSmall || 'inherit', "*2)}\n\n.euDmC_doqw .euDmC_sTpL{font-size:").concat(theme.nameFontSizeSmall || 'inherit', "}\n\n.euDmC_doqw .euDmC_biFO{font-size:").concat(theme.descriptorFontSizeSmall || 'inherit', "}\n\n.euDmC_ycrn.euDmC_ewdC{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) ").concat(theme.baseSpacingMedium || 'inherit', "}\n\n.euDmC_ycrn.euDmC_ewdC:before{width:calc(").concat(theme.baseSpacingMedium || 'inherit', " - 0.0625rem)}\n\n.euDmC_ycrn.euDmC_ewdC .euDmC_dnnz,.euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{-webkit-margin-end:").concat(theme.baseSpacingMedium || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingMedium || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .euDmC_ycrn.euDmC_ewdC .euDmC_dnnz,[dir=ltr] .euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingMedium || 'inherit', "}\n\n[dir=rtl] .euDmC_ycrn.euDmC_ewdC .euDmC_dnnz,[dir=rtl] .euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{margin-left:").concat(theme.baseSpacingMedium || 'inherit', ";margin-right:0}\n\n.euDmC_ycrn.euDmC_ewdC .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn.euDmC_ewdC .euDmC_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn.euDmC_cIHp{padding:calc(").concat(theme.baseSpacingMedium || 'inherit', "/3) calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n.euDmC_ycrn.euDmC_cIHp .euDmC_dnnz,.euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .euDmC_ycrn.euDmC_cIHp .euDmC_dnnz,[dir=ltr] .euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2)}\n\n[dir=rtl] .euDmC_ycrn.euDmC_cIHp .euDmC_dnnz,[dir=rtl] .euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{margin-left:calc(").concat(theme.baseSpacingMedium || 'inherit', "/2);margin-right:0}\n\n.euDmC_ycrn.euDmC_cIHp .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn.euDmC_cIHp .euDmC_dXYn{height:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2);width:calc(").concat(theme.baseSpacingMedium || 'inherit', "*2)}\n\n.euDmC_ycrn .euDmC_sTpL{font-size:").concat(theme.nameFontSizeMedium || 'inherit', "}\n\n.euDmC_ycrn .euDmC_biFO{font-size:").concat(theme.descriptorFontSizeMedium || 'inherit', "}\n\n.euDmC_cMDj.euDmC_ewdC{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) ").concat(theme.baseSpacingLarge || 'inherit', "}\n\n.euDmC_cMDj.euDmC_ewdC:before{width:calc(").concat(theme.baseSpacingLarge || 'inherit', " - 0.0625rem)}\n\n.euDmC_cMDj.euDmC_ewdC .euDmC_dnnz,.euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{-webkit-margin-end:").concat(theme.baseSpacingLarge || 'inherit', ";-webkit-margin-start:0;margin-inline-end:").concat(theme.baseSpacingLarge || 'inherit', ";margin-inline-start:0}\n\n[dir=ltr] .euDmC_cMDj.euDmC_ewdC .euDmC_dnnz,[dir=ltr] .euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{margin-left:0;margin-right:").concat(theme.baseSpacingLarge || 'inherit', "}\n\n[dir=rtl] .euDmC_cMDj.euDmC_ewdC .euDmC_dnnz,[dir=rtl] .euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{margin-left:").concat(theme.baseSpacingLarge || 'inherit', ";margin-right:0}\n\n.euDmC_cMDj.euDmC_ewdC .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj.euDmC_ewdC .euDmC_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj.euDmC_cIHp{padding:calc(").concat(theme.baseSpacingLarge || 'inherit', "/3) calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n.euDmC_cMDj.euDmC_cIHp .euDmC_dnnz,.euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{-webkit-margin-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);-webkit-margin-start:0;margin-inline-end:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-inline-start:0}\n\n[dir=ltr] .euDmC_cMDj.euDmC_cIHp .euDmC_dnnz,[dir=ltr] .euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{margin-left:0;margin-right:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2)}\n\n[dir=rtl] .euDmC_cMDj.euDmC_cIHp .euDmC_dnnz,[dir=rtl] .euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{margin-left:calc(").concat(theme.baseSpacingLarge || 'inherit', "/2);margin-right:0}\n\n.euDmC_cMDj.euDmC_cIHp .euDmC_dnnz{font-size:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj.euDmC_cIHp .euDmC_dXYn{height:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2);width:calc(").concat(theme.baseSpacingLarge || 'inherit', "*2)}\n\n.euDmC_cMDj .euDmC_sTpL{font-size:").concat(theme.nameFontSizeLarge || 'inherit', "}\n\n.euDmC_cMDj .euDmC_biFO{font-size:").concat(theme.descriptorFontSizeLarge || 'inherit', "}\n\n.euDmC_fGhm{background-color:").concat(theme.selectedBackgroundColor || 'inherit', "}\n\n.euDmC_fGhm.euDmC_ewdC:before{visibility:hidden}\n\n.euDmC_fGhm .euDmC_dnnz,.euDmC_fGhm .euDmC_biFO,.euDmC_fGhm .euDmC_sTpL{color:").concat(theme.selectedTextColor || 'inherit', "}");
|
|
46
46
|
},
|
|
47
|
-
'root': '
|
|
48
|
-
'button': '
|
|
49
|
-
'ie11': '
|
|
50
|
-
'selected': '
|
|
51
|
-
'folderTree': '
|
|
52
|
-
'icon': '
|
|
53
|
-
'node': '
|
|
54
|
-
'textDescriptor': '
|
|
55
|
-
'textName': '
|
|
56
|
-
'focused': '
|
|
57
|
-
'layout': '
|
|
58
|
-
'text': '
|
|
59
|
-
'isRootButton': '
|
|
60
|
-
'small': '
|
|
61
|
-
'thumbnail': '
|
|
62
|
-
'indent': '
|
|
63
|
-
'medium': '
|
|
64
|
-
'large': '
|
|
47
|
+
'root': 'euDmC_bGBk',
|
|
48
|
+
'button': 'euDmC_EwaR',
|
|
49
|
+
'ie11': 'euDmC_eoSs',
|
|
50
|
+
'selected': 'euDmC_fGhm',
|
|
51
|
+
'folderTree': 'euDmC_ewdC',
|
|
52
|
+
'icon': 'euDmC_dnnz',
|
|
53
|
+
'node': 'euDmC_fjNS',
|
|
54
|
+
'textDescriptor': 'euDmC_biFO',
|
|
55
|
+
'textName': 'euDmC_sTpL',
|
|
56
|
+
'focused': 'euDmC_cVYB',
|
|
57
|
+
'layout': 'euDmC_byIz',
|
|
58
|
+
'text': 'euDmC_eWKC',
|
|
59
|
+
'isRootButton': 'euDmC_cxHQ',
|
|
60
|
+
'small': 'euDmC_doqw',
|
|
61
|
+
'thumbnail': 'euDmC_dXYn',
|
|
62
|
+
'indent': 'euDmC_cIHp',
|
|
63
|
+
'medium': 'euDmC_ycrn',
|
|
64
|
+
'large': 'euDmC_cMDj'
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
/**
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = generator;
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* The MIT License (MIT)
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
12
|
+
*
|
|
13
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
+
* in the Software without restriction, including without limitation the rights
|
|
16
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
18
|
+
* furnished to do so, subject to the following conditions:
|
|
19
|
+
*
|
|
20
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
21
|
+
* copies or substantial portions of the Software.
|
|
22
|
+
*
|
|
23
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
+
* SOFTWARE.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
TODO: this is a copy of the Button's theme, keep in sync!
|
|
34
|
+
It needs to be copied instead of reused,
|
|
35
|
+
otherwise it messes with theme overrides
|
|
36
|
+
*/
|
|
37
|
+
function generator(_ref) {
|
|
38
|
+
var colors = _ref.colors,
|
|
39
|
+
spacing = _ref.spacing,
|
|
40
|
+
typography = _ref.typography,
|
|
41
|
+
borders = _ref.borders;
|
|
42
|
+
return {
|
|
43
|
+
hoverBackgroundColor: colors.backgroundBrand,
|
|
44
|
+
hoverTextColor: colors.textLightest,
|
|
45
|
+
focusOutlineWidth: borders.widthMedium,
|
|
46
|
+
focusOutlineColor: colors.borderBrand,
|
|
47
|
+
focusOutlineStyle: borders.style,
|
|
48
|
+
iconColor: colors.textDarkest,
|
|
49
|
+
iconsMarginRight: spacing.xSmall,
|
|
50
|
+
descriptorMarginTop: spacing.xxxSmall,
|
|
51
|
+
descriptorTextColor: colors.textDarkest,
|
|
52
|
+
descriptorFontSizeSmall: typography.fontSizeXSmall,
|
|
53
|
+
descriptorFontSizeMedium: typography.fontSizeXSmall,
|
|
54
|
+
descriptorFontSizeLarge: typography.fontSizeSmall,
|
|
55
|
+
nameTextColor: colors.textBrand,
|
|
56
|
+
nameFontSizeSmall: typography.fontSizeXSmall,
|
|
57
|
+
nameFontSizeMedium: typography.fontSizeSmall,
|
|
58
|
+
nameFontSizeLarge: typography.fontSizeMedium,
|
|
59
|
+
baseSpacingSmall: spacing.xSmall,
|
|
60
|
+
baseSpacingMedium: spacing.small,
|
|
61
|
+
baseSpacingLarge: '1rem',
|
|
62
|
+
borderWidth: borders.widthSmall,
|
|
63
|
+
borderRadius: borders.radiusMedium,
|
|
64
|
+
borderColor: colors.borderDark,
|
|
65
|
+
textLineHeight: typography.lineHeightCondensed,
|
|
66
|
+
selectedTextColor: colors.textLightest,
|
|
67
|
+
selectedBackgroundColor: colors.backgroundDark,
|
|
68
|
+
selectedOutlineWidth: borders.widthLarge
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
generator['canvas'] = function (variables) {
|
|
73
|
+
return {
|
|
74
|
+
iconColor: variables['ic-brand-font-color-dark'],
|
|
75
|
+
hoverBackgroundColor: variables['ic-brand-primary'],
|
|
76
|
+
focusOutlineColor: variables['ic-brand-primary'],
|
|
77
|
+
nameTextColor: variables['ic-brand-primary'],
|
|
78
|
+
descriptorTextColor: variables['ic-brand-font-color-dark']
|
|
79
|
+
};
|
|
80
|
+
};
|
package/lib/TreeBrowser/index.js
CHANGED
|
@@ -39,7 +39,9 @@ var _testable = require("@instructure/ui-testable/lib/testable.js");
|
|
|
39
39
|
|
|
40
40
|
var _index = require("./TreeCollection/index.js");
|
|
41
41
|
|
|
42
|
-
var _index2 = require("./
|
|
42
|
+
var _index2 = require("./TreeButton/index.js");
|
|
43
|
+
|
|
44
|
+
var _index3 = require("./TreeNode/index.js");
|
|
43
45
|
|
|
44
46
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
45
47
|
|
|
@@ -469,7 +471,7 @@ var TreeBrowser = (_dec = (0, _testable.testable)(), _dec2 = (0, _themeable.them
|
|
|
469
471
|
rootId: void 0,
|
|
470
472
|
expanded: void 0,
|
|
471
473
|
treeLabel: void 0
|
|
472
|
-
}, _class2.
|
|
474
|
+
}, _class2.Collection = _index.TreeCollection, _class2.Button = _index2.TreeButton, _class2.Node = _index3.TreeNode, _temp)) || _class) || _class);
|
|
473
475
|
exports.TreeBrowser = TreeBrowser;
|
|
474
476
|
var _default = TreeBrowser;
|
|
475
477
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-tree-browser",
|
|
3
|
-
"version": "7.20.
|
|
3
|
+
"version": "7.20.2",
|
|
4
4
|
"description": "A component for displaying a hierarchical view of information",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -23,19 +23,19 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "^7.20.
|
|
27
|
-
"@instructure/ui-test-locator": "^7.20.
|
|
28
|
-
"@instructure/ui-test-utils": "^7.20.
|
|
26
|
+
"@instructure/ui-babel-preset": "^7.20.2",
|
|
27
|
+
"@instructure/ui-test-locator": "^7.20.2",
|
|
28
|
+
"@instructure/ui-test-utils": "^7.20.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.9.2",
|
|
32
|
-
"@instructure/ui-icons": "^7.20.
|
|
33
|
-
"@instructure/ui-img": "^7.20.
|
|
34
|
-
"@instructure/ui-prop-types": "^7.20.
|
|
35
|
-
"@instructure/ui-react-utils": "^7.20.
|
|
36
|
-
"@instructure/ui-testable": "^7.20.
|
|
37
|
-
"@instructure/ui-themeable": "^7.20.
|
|
38
|
-
"@instructure/ui-utils": "^7.20.
|
|
32
|
+
"@instructure/ui-icons": "^7.20.2",
|
|
33
|
+
"@instructure/ui-img": "^7.20.2",
|
|
34
|
+
"@instructure/ui-prop-types": "^7.20.2",
|
|
35
|
+
"@instructure/ui-react-utils": "^7.20.2",
|
|
36
|
+
"@instructure/ui-testable": "^7.20.2",
|
|
37
|
+
"@instructure/ui-themeable": "^7.20.2",
|
|
38
|
+
"@instructure/ui-utils": "^7.20.2",
|
|
39
39
|
"classnames": "^2",
|
|
40
40
|
"keycode": "^2",
|
|
41
41
|
"prop-types": "^15"
|
|
@@ -39,6 +39,8 @@ import theme from './theme'
|
|
|
39
39
|
---
|
|
40
40
|
parent: TreeBrowser
|
|
41
41
|
---
|
|
42
|
+
DO NOT use as standalone component!
|
|
43
|
+
TreeBrowser generates all Collections and Buttons internally.
|
|
42
44
|
**/
|
|
43
45
|
|
|
44
46
|
// Todo: merge TreeButton and TreeNode: TreeButton should be a special type of TreeNode
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/* stylelint-disable no-descending-specificity, selector-max-class */
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
TODO: this file is copied as Node's css, keep in sync!
|
|
5
|
+
It needs to be copied instead of reused,
|
|
6
|
+
otherwise it messes with theme overrides
|
|
7
|
+
*/
|
|
8
|
+
|
|
3
9
|
@keyframes button {
|
|
4
10
|
50% {
|
|
5
11
|
opacity: 0.5;
|
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
TODO: this file is copied as Node's theme, keep in sync!
|
|
27
|
+
It needs to be copied instead of reused,
|
|
28
|
+
otherwise it messes with theme overrides
|
|
29
|
+
*/
|
|
30
|
+
|
|
25
31
|
export default function generator({ colors, spacing, typography, borders }) {
|
|
26
32
|
return {
|
|
27
33
|
hoverBackgroundColor: colors.backgroundBrand,
|
|
@@ -32,8 +32,8 @@ import { themeable } from '@instructure/ui-themeable'
|
|
|
32
32
|
import { testable } from '@instructure/ui-testable'
|
|
33
33
|
import { isIE11 } from '@instructure/ui-utils'
|
|
34
34
|
|
|
35
|
-
import styles from '
|
|
36
|
-
import theme from '
|
|
35
|
+
import styles from './styles.css'
|
|
36
|
+
import theme from './theme'
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
---
|
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
/* stylelint-disable no-descending-specificity, selector-max-class */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
TODO: this is a copy of the Button's css, keep in sync!
|
|
5
|
+
It needs to be copied instead of reused,
|
|
6
|
+
otherwise it messes with theme overrides
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
@keyframes button {
|
|
10
|
+
50% {
|
|
11
|
+
opacity: 0.5;
|
|
12
|
+
transform: translate3d(2%, 0, 0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
100% {
|
|
16
|
+
opacity: 1;
|
|
17
|
+
transform: translate3d(0, 0, 0);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.root {
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: block;
|
|
24
|
+
width: 100%;
|
|
25
|
+
margin: 0;
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
text-align: start;
|
|
28
|
+
font-family: inherit;
|
|
29
|
+
user-select: none;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
border: none;
|
|
32
|
+
border-radius: var(--borderRadius);
|
|
33
|
+
position: relative;
|
|
34
|
+
z-index: 1; /* stylelint-disable-line scale-unlimited/declaration-strict-value */
|
|
35
|
+
transform: translate3d(-2%, 0, 0);
|
|
36
|
+
opacity: 0.01;
|
|
37
|
+
transform-origin: left center;
|
|
38
|
+
animation-name: button;
|
|
39
|
+
animation-duration: 0.2s;
|
|
40
|
+
animation-fill-mode: forwards;
|
|
41
|
+
animation-timing-function: ease-out;
|
|
42
|
+
animation-delay: 0.2s;
|
|
43
|
+
outline: 0;
|
|
44
|
+
|
|
45
|
+
&:not(.ie11)::after {
|
|
46
|
+
content: "";
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
display: block;
|
|
50
|
+
position: absolute;
|
|
51
|
+
top: -0.25rem;
|
|
52
|
+
bottom: -0.25rem;
|
|
53
|
+
left: -0.25rem; /* stylelint-disable-line property-blacklist */
|
|
54
|
+
right: -0.25rem; /* stylelint-disable-line property-blacklist */
|
|
55
|
+
border: var(--focusOutlineWidth) var(--focusOutlineStyle) var(--focusOutlineColor);
|
|
56
|
+
border-radius: calc(var(--borderRadius) * 1.5);
|
|
57
|
+
transition: all 0.2s;
|
|
58
|
+
|
|
59
|
+
/* properties to transition on :focus */
|
|
60
|
+
opacity: 0;
|
|
61
|
+
transform: scale(0.95);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:hover {
|
|
65
|
+
background-color: var(--hoverBackgroundColor);
|
|
66
|
+
|
|
67
|
+
&.selected {
|
|
68
|
+
background-color: var(--selectedBackgroundColor);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.folderTree::before {
|
|
72
|
+
visibility: hidden;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&.node {
|
|
76
|
+
color: var(--hoverTextColor);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.textName,
|
|
80
|
+
.textDescriptor,
|
|
81
|
+
.icon {
|
|
82
|
+
color: var(--hoverTextColor);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.focused {
|
|
87
|
+
&:not(.ie11)::after {
|
|
88
|
+
opacity: 1;
|
|
89
|
+
transform: scale(1);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&.ie11 {
|
|
93
|
+
outline: var(--focusOutlineWidth) var(--focusOutlineStyle) var(--focusOutlineColor);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.layout {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
line-height: 1;
|
|
102
|
+
min-height: 2rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.icon,
|
|
106
|
+
.text {
|
|
107
|
+
min-width: 0.0625rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.icon {
|
|
111
|
+
position: relative;
|
|
112
|
+
z-index: 1; /* stylelint-disable-line scale-unlimited/declaration-strict-value */
|
|
113
|
+
color: var(--iconColor);
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.text {
|
|
120
|
+
line-height: var(--textLineHeight);
|
|
121
|
+
flex: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.textName,
|
|
125
|
+
.textDescriptor {
|
|
126
|
+
display: block;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
white-space: nowrap;
|
|
129
|
+
text-overflow: ellipsis;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.textName {
|
|
133
|
+
color: var(--nameTextColor);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.textDescriptor {
|
|
137
|
+
margin-top: var(--descriptorMarginTop);
|
|
138
|
+
color: var(--descriptorTextColor);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.folderTree {
|
|
142
|
+
&:not(.isRootButton)::before {
|
|
143
|
+
content: "";
|
|
144
|
+
height: var(--borderWidth);
|
|
145
|
+
background: var(--borderColor);
|
|
146
|
+
position: absolute;
|
|
147
|
+
inset-inline-start: 0;
|
|
148
|
+
inset-inline-end: auto;
|
|
149
|
+
top: 50%;
|
|
150
|
+
pointer-events: none;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.small {
|
|
155
|
+
&.folderTree {
|
|
156
|
+
padding: calc(var(--baseSpacingSmall) / 3) var(--baseSpacingSmall);
|
|
157
|
+
|
|
158
|
+
&::before {
|
|
159
|
+
width: calc(var(--baseSpacingSmall) - 0.0625rem);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.icon,
|
|
163
|
+
.thumbnail {
|
|
164
|
+
margin-inline-end: var(--baseSpacingSmall);
|
|
165
|
+
margin-inline-start: 0;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.icon {
|
|
169
|
+
font-size: calc(var(--baseSpacingSmall) * 2);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.thumbnail {
|
|
173
|
+
height: calc(var(--baseSpacingSmall) * 2);
|
|
174
|
+
width: calc(var(--baseSpacingSmall) * 2);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.indent {
|
|
179
|
+
padding: calc(var(--baseSpacingSmall) / 3) calc(var(--baseSpacingSmall) / 2);
|
|
180
|
+
|
|
181
|
+
.icon,
|
|
182
|
+
.thumbnail {
|
|
183
|
+
margin-inline-end: calc(var(--baseSpacingSmall) / 2);
|
|
184
|
+
margin-inline-start: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.icon {
|
|
188
|
+
font-size: calc(var(--baseSpacingSmall) * 2);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.thumbnail {
|
|
192
|
+
height: calc(var(--baseSpacingSmall) * 2);
|
|
193
|
+
width: calc(var(--baseSpacingSmall) * 2);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.textName {
|
|
198
|
+
font-size: var(--nameFontSizeSmall);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.textDescriptor {
|
|
202
|
+
font-size: var(--descriptorFontSizeSmall);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.medium {
|
|
207
|
+
&.folderTree {
|
|
208
|
+
padding: calc(var(--baseSpacingMedium) / 3) var(--baseSpacingMedium);
|
|
209
|
+
|
|
210
|
+
&::before {
|
|
211
|
+
width: calc(var(--baseSpacingMedium) - 0.0625rem);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.icon,
|
|
215
|
+
.thumbnail {
|
|
216
|
+
margin-inline-end: var(--baseSpacingMedium);
|
|
217
|
+
margin-inline-start: 0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.icon {
|
|
221
|
+
font-size: calc(var(--baseSpacingMedium) * 2);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.thumbnail {
|
|
225
|
+
height: calc(var(--baseSpacingMedium) * 2);
|
|
226
|
+
width: calc(var(--baseSpacingMedium) * 2);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&.indent {
|
|
231
|
+
padding: calc(var(--baseSpacingMedium) / 3) calc(var(--baseSpacingMedium) / 2);
|
|
232
|
+
|
|
233
|
+
.icon,
|
|
234
|
+
.thumbnail {
|
|
235
|
+
margin-inline-end: calc(var(--baseSpacingMedium) / 2);
|
|
236
|
+
margin-inline-start: 0;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.icon {
|
|
240
|
+
font-size: calc(var(--baseSpacingMedium) * 2);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.thumbnail {
|
|
244
|
+
height: calc(var(--baseSpacingMedium) * 2);
|
|
245
|
+
width: calc(var(--baseSpacingMedium) * 2);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.textName {
|
|
250
|
+
font-size: var(--nameFontSizeMedium);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.textDescriptor {
|
|
254
|
+
font-size: var(--descriptorFontSizeMedium);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.large {
|
|
259
|
+
&.folderTree {
|
|
260
|
+
padding: calc(var(--baseSpacingLarge) / 3) var(--baseSpacingLarge);
|
|
261
|
+
|
|
262
|
+
&::before {
|
|
263
|
+
width: calc(var(--baseSpacingLarge) - 0.0625rem);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.icon,
|
|
267
|
+
.thumbnail {
|
|
268
|
+
margin-inline-end: var(--baseSpacingLarge);
|
|
269
|
+
margin-inline-start: 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.icon {
|
|
273
|
+
font-size: calc(var(--baseSpacingLarge) * 2);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.thumbnail {
|
|
277
|
+
height: calc(var(--baseSpacingLarge) * 2);
|
|
278
|
+
width: calc(var(--baseSpacingLarge) * 2);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&.indent {
|
|
283
|
+
padding: calc(var(--baseSpacingLarge) / 3) calc(var(--baseSpacingLarge) / 2);
|
|
284
|
+
|
|
285
|
+
.icon,
|
|
286
|
+
.thumbnail {
|
|
287
|
+
margin-inline-end: calc(var(--baseSpacingLarge) / 2);
|
|
288
|
+
margin-inline-start: 0;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.icon {
|
|
292
|
+
font-size: calc(var(--baseSpacingLarge) * 2);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.thumbnail {
|
|
296
|
+
height: calc(var(--baseSpacingLarge) * 2);
|
|
297
|
+
width: calc(var(--baseSpacingLarge) * 2);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.textName {
|
|
302
|
+
font-size: var(--nameFontSizeLarge);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.textDescriptor {
|
|
306
|
+
font-size: var(--descriptorFontSizeLarge);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.expanded {}
|
|
311
|
+
|
|
312
|
+
.selected {
|
|
313
|
+
background-color: var(--selectedBackgroundColor);
|
|
314
|
+
|
|
315
|
+
&.folderTree::before {
|
|
316
|
+
visibility: hidden;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.textName,
|
|
320
|
+
.textDescriptor,
|
|
321
|
+
.icon {
|
|
322
|
+
color: var(--selectedTextColor);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.isRootButton {}
|
|
327
|
+
|
|
328
|
+
/* stylelint-enable no-descending-specificity, selector-max-class */
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The MIT License (MIT)
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
* in the Software without restriction, including without limitation the rights
|
|
9
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
* furnished to do so, subject to the following conditions:
|
|
12
|
+
*
|
|
13
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
* copies or substantial portions of the Software.
|
|
15
|
+
*
|
|
16
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
* SOFTWARE.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
TODO: this is a copy of the Button's theme, keep in sync!
|
|
27
|
+
It needs to be copied instead of reused,
|
|
28
|
+
otherwise it messes with theme overrides
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
export default function generator({ colors, spacing, typography, borders }) {
|
|
32
|
+
return {
|
|
33
|
+
hoverBackgroundColor: colors.backgroundBrand,
|
|
34
|
+
hoverTextColor: colors.textLightest,
|
|
35
|
+
|
|
36
|
+
focusOutlineWidth: borders.widthMedium,
|
|
37
|
+
focusOutlineColor: colors.borderBrand,
|
|
38
|
+
focusOutlineStyle: borders.style,
|
|
39
|
+
|
|
40
|
+
iconColor: colors.textDarkest,
|
|
41
|
+
iconsMarginRight: spacing.xSmall,
|
|
42
|
+
|
|
43
|
+
descriptorMarginTop: spacing.xxxSmall,
|
|
44
|
+
descriptorTextColor: colors.textDarkest,
|
|
45
|
+
descriptorFontSizeSmall: typography.fontSizeXSmall,
|
|
46
|
+
descriptorFontSizeMedium: typography.fontSizeXSmall,
|
|
47
|
+
descriptorFontSizeLarge: typography.fontSizeSmall,
|
|
48
|
+
|
|
49
|
+
nameTextColor: colors.textBrand,
|
|
50
|
+
nameFontSizeSmall: typography.fontSizeXSmall,
|
|
51
|
+
nameFontSizeMedium: typography.fontSizeSmall,
|
|
52
|
+
nameFontSizeLarge: typography.fontSizeMedium,
|
|
53
|
+
|
|
54
|
+
baseSpacingSmall: spacing.xSmall,
|
|
55
|
+
baseSpacingMedium: spacing.small,
|
|
56
|
+
baseSpacingLarge: '1rem',
|
|
57
|
+
|
|
58
|
+
borderWidth: borders.widthSmall,
|
|
59
|
+
borderRadius: borders.radiusMedium,
|
|
60
|
+
borderColor: colors.borderDark,
|
|
61
|
+
|
|
62
|
+
textLineHeight: typography.lineHeightCondensed,
|
|
63
|
+
|
|
64
|
+
selectedTextColor: colors.textLightest,
|
|
65
|
+
selectedBackgroundColor: colors.backgroundDark,
|
|
66
|
+
selectedOutlineWidth: borders.widthLarge
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
generator['canvas'] = function (variables) {
|
|
71
|
+
return {
|
|
72
|
+
iconColor: variables['ic-brand-font-color-dark'],
|
|
73
|
+
hoverBackgroundColor: variables['ic-brand-primary'],
|
|
74
|
+
focusOutlineColor: variables['ic-brand-primary'],
|
|
75
|
+
nameTextColor: variables['ic-brand-primary'],
|
|
76
|
+
descriptorTextColor: variables['ic-brand-font-color-dark']
|
|
77
|
+
}
|
|
78
|
+
}
|
package/src/TreeBrowser/index.js
CHANGED
|
@@ -34,6 +34,7 @@ import { controllable } from '@instructure/ui-prop-types'
|
|
|
34
34
|
import { testable } from '@instructure/ui-testable'
|
|
35
35
|
|
|
36
36
|
import { TreeCollection } from './TreeCollection'
|
|
37
|
+
import { TreeButton } from './TreeButton'
|
|
37
38
|
import { TreeNode } from './TreeNode'
|
|
38
39
|
|
|
39
40
|
import styles from './styles.css'
|
|
@@ -139,6 +140,8 @@ class TreeBrowser extends Component {
|
|
|
139
140
|
treeLabel: undefined
|
|
140
141
|
}
|
|
141
142
|
|
|
143
|
+
static Collection = TreeCollection
|
|
144
|
+
static Button = TreeButton
|
|
142
145
|
static Node = TreeNode
|
|
143
146
|
|
|
144
147
|
constructor(props) {
|