@instructure/ui-view 11.7.3 → 11.7.4-pr-snapshot-1781695314229
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 +44 -0
- package/LICENSE.md +1 -0
- package/{lib/ContextView/v2/props.js → babel.config.cjs} +12 -7
- package/es/ContextView/v1/index.js +5 -5
- package/es/ContextView/v1/styles.js +0 -1
- package/es/ContextView/v2/index.js +4 -4
- package/es/ContextView/v2/styles.js +0 -1
- package/es/View/v1/index.js +4 -4
- package/es/View/v2/index.js +3 -6
- package/es/View/v2/props.js +1 -1
- package/es/exports/a.js +3 -2
- package/es/exports/b.js +3 -2
- package/package.json +14 -19
- package/src/ContextView/v1/index.tsx +5 -4
- package/src/ContextView/v2/index.tsx +4 -3
- package/src/View/v1/index.tsx +4 -3
- package/src/View/v2/index.tsx +3 -9
- package/src/View/v2/props.ts +0 -12
- package/src/exports/a.ts +2 -2
- package/src/exports/b.ts +2 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/ContextView/v1/index.d.ts +1 -0
- package/types/ContextView/v1/index.d.ts.map +1 -1
- package/types/ContextView/v2/index.d.ts +1 -0
- package/types/ContextView/v2/index.d.ts.map +1 -1
- package/types/View/v1/index.d.ts +2 -1
- package/types/View/v1/index.d.ts.map +1 -1
- package/types/View/v2/index.d.ts +2 -2
- package/types/View/v2/index.d.ts.map +1 -1
- package/types/View/v2/props.d.ts +0 -11
- package/types/View/v2/props.d.ts.map +1 -1
- package/types/exports/a.d.ts +2 -2
- package/types/exports/a.d.ts.map +1 -1
- package/types/exports/b.d.ts +2 -2
- package/types/exports/b.d.ts.map +1 -1
- package/lib/ContextView/v1/index.js +0 -133
- package/lib/ContextView/v1/props.js +0 -31
- package/lib/ContextView/v1/styles.js +0 -267
- package/lib/ContextView/v1/theme.js +0 -49
- package/lib/ContextView/v2/index.js +0 -132
- package/lib/ContextView/v2/styles.js +0 -267
- package/lib/View/v1/index.js +0 -182
- package/lib/View/v1/props.js +0 -34
- package/lib/View/v1/styles.js +0 -423
- package/lib/View/v1/theme.js +0 -109
- package/lib/View/v2/index.js +0 -181
- package/lib/View/v2/props.js +0 -34
- package/lib/View/v2/styles.js +0 -432
- package/lib/exports/a.js +0 -19
- package/lib/exports/b.js +0 -19
- package/lib/package.json +0 -1
|
@@ -6,6 +6,7 @@ category: components
|
|
|
6
6
|
---
|
|
7
7
|
**/
|
|
8
8
|
declare class ContextView extends Component<ContextViewProps> {
|
|
9
|
+
static displayName: string;
|
|
9
10
|
static readonly componentId = "ContextView";
|
|
10
11
|
static allowedProps: readonly (keyof {
|
|
11
12
|
as?: import("@instructure/shared-types").AsElementType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ContextView/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CA8DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ContextView/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAUjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,WAAW,SAAgB;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CA8DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -6,6 +6,7 @@ category: components
|
|
|
6
6
|
---
|
|
7
7
|
**/
|
|
8
8
|
declare class ContextView extends Component<ContextViewProps> {
|
|
9
|
+
static displayName: string;
|
|
9
10
|
static readonly componentId = "ContextView";
|
|
10
11
|
static allowedProps: readonly (keyof {
|
|
11
12
|
as?: import("@instructure/shared-types").AsElementType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ContextView/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CA8DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ContextView/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AASjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;;;GAIG;AAEH,cACM,WAAY,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IACnD,MAAM,CAAC,WAAW,SAAgB;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAgB;IAC3C,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWlB;IAED,iBAAiB;IAIjB,kBAAkB;IAIlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,SAAS,GAAI,IAAI,OAAO,GAAG,IAAI,UAQ9B;IAED,MAAM;CA8DP;AAED,eAAe,WAAW,CAAA;AAC1B,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/types/View/v1/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ category: components
|
|
|
7
7
|
@module View
|
|
8
8
|
**/
|
|
9
9
|
declare class View extends Component<ViewProps> {
|
|
10
|
+
static displayName: string;
|
|
10
11
|
static componentId: string;
|
|
11
|
-
static allowedProps: readonly (keyof import("./props").ViewOwnProps)[];
|
|
12
|
+
static allowedProps: readonly (keyof import("./props.js").ViewOwnProps)[];
|
|
12
13
|
static defaultProps: {
|
|
13
14
|
readonly display: "auto";
|
|
14
15
|
readonly overflowX: "visible";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/View/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAiBhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIxC;;;;;GAKG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/View/v1/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAiBhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIxC;;;;;GAKG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY,uDAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWT;IAgBV,MAAM,CAAC,aAAa,GAClB,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,WAAW,aAAa,CAAC,GAAG,CAAC,yBAmB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;IACnC,IAAI,QAAQ,mBAMX;gBAEW,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAwDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,GAAI,IAAI,WAAW,GAAG,IAAI,UAKzC;IAED,MAAM;CA0CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/View/v2/index.d.ts
CHANGED
|
@@ -7,8 +7,9 @@ category: components
|
|
|
7
7
|
@module View
|
|
8
8
|
**/
|
|
9
9
|
declare class View extends Component<ViewProps> {
|
|
10
|
+
static displayName: string;
|
|
10
11
|
static componentId: string;
|
|
11
|
-
static allowedProps: readonly (keyof import("./props").ViewOwnProps)[];
|
|
12
|
+
static allowedProps: readonly (keyof import("./props.js").ViewOwnProps)[];
|
|
12
13
|
static defaultProps: {
|
|
13
14
|
readonly display: "auto";
|
|
14
15
|
readonly overflowX: "visible";
|
|
@@ -23,7 +24,6 @@ declare class View extends Component<ViewProps> {
|
|
|
23
24
|
};
|
|
24
25
|
static omitViewProps: (props: Record<string, any>, Component: ComponentType<any>) => Record<string, any>;
|
|
25
26
|
private spanMarginVerified;
|
|
26
|
-
get _element(): Element | null;
|
|
27
27
|
constructor(props: ViewProps);
|
|
28
28
|
componentDidMount(): void;
|
|
29
29
|
componentDidUpdate(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/View/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAgBhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIxC;;;;;GAKG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/View/v2/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAgBhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAIxC;;;;;GAKG;AACH,cAEM,IAAK,SAAQ,SAAS,CAAC,SAAS,CAAC;IACrC,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,WAAW,SAAS;IAC3B,MAAM,CAAC,YAAY,uDAAe;IAClC,MAAM,CAAC,YAAY;;;;;;;;;;;MAWT;IAgBV,MAAM,CAAC,aAAa,GAClB,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC1B,WAAW,aAAa,CAAC,GAAG,CAAC,yBAqB9B;IAED,OAAO,CAAC,kBAAkB,CAAS;gBAEvB,KAAK,EAAE,SAAS;IAK5B,iBAAiB;IAIjB,kBAAkB;IAwDlB,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;IAE1B,gBAAgB,GAAI,IAAI,WAAW,GAAG,IAAI,UAKzC;IAED,MAAM;CA0CP;AAED,eAAe,IAAI,CAAA;AACnB,OAAO,EAAE,IAAI,EAAE,CAAA"}
|
package/types/View/v2/props.d.ts
CHANGED
|
@@ -128,17 +128,6 @@ type ViewOwnProps = {
|
|
|
128
128
|
* Valid values are `auto`, `contain`, `none`.
|
|
129
129
|
*/
|
|
130
130
|
overscrollBehavior?: 'auto' | 'contain' | 'none';
|
|
131
|
-
/**
|
|
132
|
-
* DEPRECATED, this prop does nothing. Use the focusOutlineOffset theme
|
|
133
|
-
* variable
|
|
134
|
-
*
|
|
135
|
-
* Sets the radius of the focus border ring.
|
|
136
|
-
*
|
|
137
|
-
* For offset type, the given value is increased by the difference between the focus ring' offset and the focus ring's width.
|
|
138
|
-
*
|
|
139
|
-
* For inset type, the given value is decreased by the sum of the focus ring' offset and the focus ring's width.
|
|
140
|
-
*/
|
|
141
|
-
focusRingBorderRadius?: string;
|
|
142
131
|
/**
|
|
143
132
|
* Display the focus ring when any of the descendants is focused.
|
|
144
133
|
* (uses the [:focus-within](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-within)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/View/v2/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAA;AACvD,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACpB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,MAAM,EACN,QAAQ,EACR,cAAc,EACd,WAAW,EACZ,MAAM,sBAAs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;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAA;IAChD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,KAAK,QAAQ,GAAG,MAAM,YAAY,CAAA;AAElC,KAAK,SAAS,GAAG,YAAY,GAC3B,cAAc,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,EAAE,SAAS,CAAC,GAChE,mBAAmB,CAAC,YAAY,CAAC,CAAA;AAEnC,KAAK,eAAe,GAAG,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEhD,KAAK,SAAS,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACxC,YAAY,EAAE,WAAW,CAAA;CAC1B,CAAA;AAKD,QAAA,MAAM,YAAY,EAAE,eAoCnB,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,CAAA"}
|
package/types/exports/a.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ContextView } from '../ContextView/v1';
|
|
2
|
-
export { View } from '../View/v1';
|
|
1
|
+
export { ContextView } from '../ContextView/v1/index.js';
|
|
2
|
+
export { View } from '../View/v1/index.js';
|
|
3
3
|
export type { ContextViewProps } from '../ContextView/v1/props';
|
|
4
4
|
export type { ViewProps, ViewOwnProps } from '../View/v1/props';
|
|
5
5
|
//# sourceMappingURL=a.d.ts.map
|
package/types/exports/a.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../../src/exports/a.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../../src/exports/a.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAE1C,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA"}
|
package/types/exports/b.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ContextView } from '../ContextView/v2';
|
|
2
|
-
export { View } from '../View/v2';
|
|
1
|
+
export { ContextView } from '../ContextView/v2/index.js';
|
|
2
|
+
export { View } from '../View/v2/index.js';
|
|
3
3
|
export type { ContextViewProps } from '../ContextView/v2/props';
|
|
4
4
|
export type { ViewProps, ViewOwnProps } from '../View/v2/props';
|
|
5
5
|
//# sourceMappingURL=b.d.ts.map
|
package/types/exports/b.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../../src/exports/b.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"b.d.ts","sourceRoot":"","sources":["../../src/exports/b.ts"],"names":[],"mappings":"AAwBA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAE1C,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA"}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = exports.ContextView = void 0;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _emotion = require("@instructure/emotion");
|
|
10
|
-
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
-
var _v = require("../../View/v1");
|
|
12
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
|
13
|
-
var _theme = _interopRequireDefault(require("./theme"));
|
|
14
|
-
var _props = require("./props");
|
|
15
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
16
|
-
var _dec, _class;
|
|
17
|
-
/*
|
|
18
|
-
* The MIT License (MIT)
|
|
19
|
-
*
|
|
20
|
-
* Copyright (c) 2015 - present Instructure, Inc.
|
|
21
|
-
*
|
|
22
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
23
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
24
|
-
* in the Software without restriction, including without limitation the rights
|
|
25
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
26
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
27
|
-
* furnished to do so, subject to the following conditions:
|
|
28
|
-
*
|
|
29
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
30
|
-
* copies or substantial portions of the Software.
|
|
31
|
-
*
|
|
32
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
33
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
34
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
35
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
36
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
37
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
38
|
-
* SOFTWARE.
|
|
39
|
-
*/
|
|
40
|
-
/**
|
|
41
|
-
---
|
|
42
|
-
category: components
|
|
43
|
-
---
|
|
44
|
-
**/
|
|
45
|
-
let ContextView = exports.ContextView = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = class ContextView extends _react.Component {
|
|
46
|
-
static displayName = "ContextView";
|
|
47
|
-
static componentId = 'ContextView';
|
|
48
|
-
static allowedProps = _props.allowedProps;
|
|
49
|
-
static defaultProps = {
|
|
50
|
-
as: 'span',
|
|
51
|
-
elementRef: () => {},
|
|
52
|
-
debug: false,
|
|
53
|
-
width: 'auto',
|
|
54
|
-
height: 'auto',
|
|
55
|
-
children: null,
|
|
56
|
-
textAlign: 'start',
|
|
57
|
-
background: 'default',
|
|
58
|
-
shadow: 'resting',
|
|
59
|
-
placement: 'center end'
|
|
60
|
-
};
|
|
61
|
-
componentDidMount() {
|
|
62
|
-
this.props.makeStyles?.();
|
|
63
|
-
}
|
|
64
|
-
componentDidUpdate() {
|
|
65
|
-
this.props.makeStyles?.();
|
|
66
|
-
}
|
|
67
|
-
ref = null;
|
|
68
|
-
handleRef = el => {
|
|
69
|
-
const {
|
|
70
|
-
elementRef
|
|
71
|
-
} = this.props;
|
|
72
|
-
this.ref = el;
|
|
73
|
-
if (typeof elementRef === 'function') {
|
|
74
|
-
elementRef(el);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
render() {
|
|
78
|
-
const {
|
|
79
|
-
as,
|
|
80
|
-
background,
|
|
81
|
-
children,
|
|
82
|
-
debug,
|
|
83
|
-
height,
|
|
84
|
-
width,
|
|
85
|
-
maxHeight,
|
|
86
|
-
maxWidth,
|
|
87
|
-
minHeight,
|
|
88
|
-
minWidth,
|
|
89
|
-
margin,
|
|
90
|
-
padding,
|
|
91
|
-
shadow,
|
|
92
|
-
stacking,
|
|
93
|
-
style,
|
|
94
|
-
textAlign,
|
|
95
|
-
styles,
|
|
96
|
-
borderColor
|
|
97
|
-
} = this.props;
|
|
98
|
-
return (0, _jsxRuntime.jsx)(_v.View, {
|
|
99
|
-
...(0, _omitProps.omitProps)(this.props, ContextView.allowedProps),
|
|
100
|
-
css: styles?.contextView,
|
|
101
|
-
style: style,
|
|
102
|
-
borderWidth: "none",
|
|
103
|
-
display: "inline-block",
|
|
104
|
-
as: as,
|
|
105
|
-
withVisualDebug: debug,
|
|
106
|
-
elementRef: this.handleRef,
|
|
107
|
-
margin: margin,
|
|
108
|
-
stacking: stacking,
|
|
109
|
-
children: (0, _jsxRuntime.jsxs)(_v.View, {
|
|
110
|
-
css: styles?.contextView__content,
|
|
111
|
-
display: "block",
|
|
112
|
-
borderRadius: "medium",
|
|
113
|
-
borderWidth: "small",
|
|
114
|
-
borderColor: borderColor || (background === 'default' ? 'primary' : 'transparent'),
|
|
115
|
-
background: background === 'default' ? 'primary' : 'primary-inverse',
|
|
116
|
-
withVisualDebug: debug,
|
|
117
|
-
height: height,
|
|
118
|
-
width: width,
|
|
119
|
-
maxHeight: maxHeight,
|
|
120
|
-
maxWidth: maxWidth,
|
|
121
|
-
minHeight: minHeight,
|
|
122
|
-
minWidth: minWidth,
|
|
123
|
-
padding: padding,
|
|
124
|
-
shadow: shadow,
|
|
125
|
-
textAlign: textAlign,
|
|
126
|
-
children: [(0, _jsxRuntime.jsx)("span", {
|
|
127
|
-
css: styles?.contextView__arrow
|
|
128
|
-
}), children]
|
|
129
|
-
})
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}) || _class);
|
|
133
|
-
var _default = exports.default = ContextView;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
|
-
/*
|
|
8
|
-
* The MIT License (MIT)
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
-
*
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
*
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
* copies or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
* SOFTWARE.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
const allowedProps = exports.allowedProps = ['as', 'elementRef', 'margin', 'padding', 'height', 'width', 'maxHeight', 'maxWidth', 'minHeight', 'minWidth', 'children', 'textAlign', 'shadow', 'stacking', 'background', 'placement', 'debug', 'borderColor'];
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
require("core-js/modules/es.array.includes.js");
|
|
8
|
-
var _mirrorPlacement = require("@instructure/ui-position/lib/mirrorPlacement.js");
|
|
9
|
-
/*
|
|
10
|
-
* The MIT License (MIT)
|
|
11
|
-
*
|
|
12
|
-
* Copyright (c) 2015 - present Instructure, Inc.
|
|
13
|
-
*
|
|
14
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
16
|
-
* in the Software without restriction, including without limitation the rights
|
|
17
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
19
|
-
* furnished to do so, subject to the following conditions:
|
|
20
|
-
*
|
|
21
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
22
|
-
* copies or substantial portions of the Software.
|
|
23
|
-
*
|
|
24
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
-
* SOFTWARE.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
|
-
const endPlacements = ['end center', 'end top', 'end bottom', 'end stretch', 'center end', 'end'];
|
|
34
|
-
const startPlacements = ['start center', 'start top', 'start bottom', 'start stretch', 'center start', 'start'];
|
|
35
|
-
const bottomPlacements = ['bottom', 'bottom end', 'bottom start', 'bottom stretch', 'bottom center'];
|
|
36
|
-
const topPlacements = ['top', 'top start', 'top end', 'top stretch', 'top center'];
|
|
37
|
-
const getPlacementStyle = (placement, theme) => {
|
|
38
|
-
if (endPlacements.includes(placement)) {
|
|
39
|
-
return {
|
|
40
|
-
paddingInlineStart: theme?.arrowSize,
|
|
41
|
-
paddingInlineEnd: '0'
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
if (startPlacements.includes(placement)) {
|
|
45
|
-
return {
|
|
46
|
-
paddingInlineEnd: theme?.arrowSize,
|
|
47
|
-
paddingInlineStart: '0'
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
if (bottomPlacements.includes(placement)) {
|
|
51
|
-
return {
|
|
52
|
-
paddingTop: theme?.arrowSize
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
if (topPlacements.includes(placement)) {
|
|
56
|
-
return {
|
|
57
|
-
paddingBottom: theme?.arrowSize
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
return {
|
|
61
|
-
position: 'absolute',
|
|
62
|
-
left: '-999em'
|
|
63
|
-
};
|
|
64
|
-
};
|
|
65
|
-
const getArrowCorrections = (placement, theme) => {
|
|
66
|
-
const center = ['top', 'bottom', 'top center', 'bottom center', 'top stretch', 'bottom stretch'];
|
|
67
|
-
const start = ['top start', 'bottom start'];
|
|
68
|
-
const end = ['top end', 'bottom end'];
|
|
69
|
-
const top = ['start top', 'end top'];
|
|
70
|
-
const bottom = ['start bottom', 'end bottom'];
|
|
71
|
-
if (center.includes(placement)) {
|
|
72
|
-
return {
|
|
73
|
-
insetInlineStart: '50%'
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
if (start.includes(placement)) {
|
|
77
|
-
return {
|
|
78
|
-
insetInlineStart: `calc((${theme?.arrowSize} + ${theme?.arrowBorderWidth}) * 2)`,
|
|
79
|
-
insetInlineEnd: 'auto'
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
if (end.includes(placement)) {
|
|
83
|
-
return {
|
|
84
|
-
insetInlineStart: `calc(100% - (${theme?.arrowSize} + ${theme?.arrowBorderWidth}) * 2)`,
|
|
85
|
-
insetInlineEnd: 'auto'
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
if (top.includes(placement)) {
|
|
89
|
-
return {
|
|
90
|
-
top: `calc((${theme?.arrowSize} + ${theme?.arrowBorderWidth}) * 2)`
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
if (bottom.includes(placement)) {
|
|
94
|
-
return {
|
|
95
|
-
top: `calc(100% - (${theme?.arrowSize} + ${theme?.arrowBorderWidth}) * 2)`
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
return {};
|
|
99
|
-
};
|
|
100
|
-
const getArrowPlacementVariant = (placement, background, theme, props) => {
|
|
101
|
-
const transformedPlacement = (0, _mirrorPlacement.mirrorPlacement)(placement, ' ');
|
|
102
|
-
const isInversed = background === 'inverse';
|
|
103
|
-
const {
|
|
104
|
-
borderColor
|
|
105
|
-
} = props;
|
|
106
|
-
if (endPlacements.includes(transformedPlacement)) {
|
|
107
|
-
return {
|
|
108
|
-
main: {
|
|
109
|
-
top: '50%',
|
|
110
|
-
insetInlineStart: '100%',
|
|
111
|
-
insetInlineEnd: 'auto',
|
|
112
|
-
marginTop: `calc(-1 * (${theme?.arrowSize} + ${theme?.arrowBorderWidth}))`,
|
|
113
|
-
borderInlineEndWidth: '0',
|
|
114
|
-
borderInlineEndColor: 'transparent',
|
|
115
|
-
borderInlineStartColor: borderColor || (isInversed ? theme?.arrowBorderColorInverse : theme?.arrowBorderColor),
|
|
116
|
-
borderTopColor: 'transparent',
|
|
117
|
-
borderBottomColor: 'transparent',
|
|
118
|
-
borderInlineStartWidth: theme?.arrowSize
|
|
119
|
-
},
|
|
120
|
-
__after: {
|
|
121
|
-
insetInlineEnd: theme?.arrowBorderWidth,
|
|
122
|
-
insetInlineStart: 'auto',
|
|
123
|
-
marginTop: `calc(-1 * ${theme?.arrowSize})`,
|
|
124
|
-
borderInlineEndWidth: '0',
|
|
125
|
-
borderInlineEndColor: 'transparent',
|
|
126
|
-
borderTopColor: 'transparent',
|
|
127
|
-
borderBottomColor: 'transparent',
|
|
128
|
-
borderInlineStartWidth: theme?.arrowSize,
|
|
129
|
-
borderInlineStartColor: isInversed ? theme?.arrowBackgroundColorInverse : theme?.arrowBackgroundColor
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
if (startPlacements.includes(transformedPlacement)) {
|
|
134
|
-
return {
|
|
135
|
-
main: {
|
|
136
|
-
top: '50%',
|
|
137
|
-
insetInlineEnd: '100%',
|
|
138
|
-
insetInlineStart: 'auto',
|
|
139
|
-
marginTop: `calc(-1 * (${theme?.arrowSize} + ${theme?.arrowBorderWidth}))`,
|
|
140
|
-
borderInlineStartWidth: '0',
|
|
141
|
-
borderInlineStartColor: 'transparent',
|
|
142
|
-
borderInlineEndColor: borderColor || (isInversed ? theme?.arrowBorderColorInverse : theme?.arrowBorderColor),
|
|
143
|
-
borderTopColor: 'transparent',
|
|
144
|
-
borderBottomColor: 'transparent',
|
|
145
|
-
borderInlineEndWidth: theme?.arrowSize
|
|
146
|
-
},
|
|
147
|
-
__after: {
|
|
148
|
-
insetInlineStart: theme?.arrowBorderWidth,
|
|
149
|
-
insetInlineEnd: 'auto',
|
|
150
|
-
marginTop: `calc(-1 * ${theme?.arrowSize})`,
|
|
151
|
-
borderInlineStartWidth: '0',
|
|
152
|
-
borderInlineStartColor: 'transparent',
|
|
153
|
-
borderTopColor: 'transparent',
|
|
154
|
-
borderBottomColor: 'transparent',
|
|
155
|
-
borderInlineEndWidth: theme?.arrowSize,
|
|
156
|
-
borderInlineEndColor: isInversed ? theme?.arrowBackgroundColorInverse : theme?.arrowBackgroundColor
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
if (bottomPlacements.includes(transformedPlacement)) {
|
|
161
|
-
return {
|
|
162
|
-
main: {
|
|
163
|
-
top: '100%',
|
|
164
|
-
marginInlineStart: `calc(-1 * (${theme?.arrowSize} + ${theme?.arrowBorderWidth}))`,
|
|
165
|
-
marginInlineEnd: '0',
|
|
166
|
-
borderBottomWidth: '0',
|
|
167
|
-
borderBottomColor: 'transparent',
|
|
168
|
-
borderInlineStartColor: 'transparent',
|
|
169
|
-
borderInlineEndColor: 'transparent'
|
|
170
|
-
},
|
|
171
|
-
__after: {
|
|
172
|
-
bottom: theme?.arrowBorderWidth,
|
|
173
|
-
marginInlineStart: `calc(-1 * ${theme?.arrowSize})`,
|
|
174
|
-
marginInlineEnd: '0',
|
|
175
|
-
borderBottomWidth: '0',
|
|
176
|
-
borderBottomColor: 'transparent',
|
|
177
|
-
borderInlineStartColor: 'transparent',
|
|
178
|
-
borderInlineEndColor: 'transparent',
|
|
179
|
-
borderTopColor: isInversed ? theme?.arrowBackgroundColorInverse : theme?.arrowBackgroundColor
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
return {
|
|
184
|
-
main: {
|
|
185
|
-
bottom: '100%',
|
|
186
|
-
marginInlineStart: `calc(-1 * (${theme?.arrowSize} + ${theme?.arrowBorderWidth}))`,
|
|
187
|
-
marginInlineEnd: '0',
|
|
188
|
-
borderTopWidth: '0',
|
|
189
|
-
borderTopColor: 'transparent',
|
|
190
|
-
borderInlineStartColor: 'transparent',
|
|
191
|
-
borderInlineEndColor: 'transparent'
|
|
192
|
-
},
|
|
193
|
-
__after: {
|
|
194
|
-
top: theme?.arrowBorderWidth,
|
|
195
|
-
marginInlineStart: `calc(-1 * ${theme?.arrowSize})`,
|
|
196
|
-
marginInlineEnd: '0',
|
|
197
|
-
borderTopWidth: '0',
|
|
198
|
-
borderTopColor: 'transparent',
|
|
199
|
-
borderInlineStartColor: 'transparent',
|
|
200
|
-
borderInlineEndColor: 'transparent',
|
|
201
|
-
borderBottomColor: isInversed ? theme?.arrowBackgroundColorInverse : theme?.arrowBackgroundColor
|
|
202
|
-
}
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
/**
|
|
207
|
-
* ---
|
|
208
|
-
* private: true
|
|
209
|
-
* ---
|
|
210
|
-
* Generates the style object from the theme and provided additional information
|
|
211
|
-
* @param {Object} componentTheme The theme variable object.
|
|
212
|
-
* @param {Object} props the props of the component, the style is applied to
|
|
213
|
-
* @param {Object} state the state of the component, the style is applied to
|
|
214
|
-
* @return {Object} The final style object, which will be used in the component
|
|
215
|
-
*/
|
|
216
|
-
const generateStyle = (componentTheme, props) => {
|
|
217
|
-
const {
|
|
218
|
-
placement,
|
|
219
|
-
background,
|
|
220
|
-
borderColor
|
|
221
|
-
} = props;
|
|
222
|
-
const arrowBaseStyles = {
|
|
223
|
-
content: '""',
|
|
224
|
-
height: '0',
|
|
225
|
-
width: '0',
|
|
226
|
-
position: 'absolute',
|
|
227
|
-
display: 'block',
|
|
228
|
-
boxSizing: 'border-box',
|
|
229
|
-
pointerEvents: 'none',
|
|
230
|
-
borderStyle: 'solid'
|
|
231
|
-
};
|
|
232
|
-
const arrowBackGroundVariants = {
|
|
233
|
-
default: componentTheme?.arrowBorderColor,
|
|
234
|
-
inverse: componentTheme?.arrowBorderColorInverse
|
|
235
|
-
};
|
|
236
|
-
const arrowPlacementVariant = getArrowPlacementVariant(placement, background, componentTheme, props);
|
|
237
|
-
return {
|
|
238
|
-
contextView: {
|
|
239
|
-
label: 'contextView',
|
|
240
|
-
boxSizing: 'border-box',
|
|
241
|
-
minHeight: `calc(${componentTheme?.arrowSize} * 2)`,
|
|
242
|
-
...getPlacementStyle(placement, componentTheme)
|
|
243
|
-
},
|
|
244
|
-
contextView__content: {
|
|
245
|
-
label: 'contextView__content',
|
|
246
|
-
position: 'relative'
|
|
247
|
-
},
|
|
248
|
-
contextView__arrow: {
|
|
249
|
-
label: 'contextView__arrow',
|
|
250
|
-
...arrowBaseStyles,
|
|
251
|
-
display: 'block',
|
|
252
|
-
borderWidth: `calc(${componentTheme?.arrowSize} + ${componentTheme?.arrowBorderWidth})`,
|
|
253
|
-
borderColor: borderColor || arrowBackGroundVariants[background],
|
|
254
|
-
...arrowPlacementVariant.main,
|
|
255
|
-
...getArrowCorrections(placement, componentTheme),
|
|
256
|
-
'&::after': {
|
|
257
|
-
borderWidth: componentTheme?.arrowSize,
|
|
258
|
-
borderColor: arrowBackGroundVariants[background],
|
|
259
|
-
...arrowPlacementVariant.__after,
|
|
260
|
-
...arrowBaseStyles
|
|
261
|
-
}
|
|
262
|
-
},
|
|
263
|
-
arrowSize: componentTheme.arrowSize,
|
|
264
|
-
arrowBorderWidth: componentTheme.arrowBorderWidth
|
|
265
|
-
};
|
|
266
|
-
};
|
|
267
|
-
var _default = exports.default = generateStyle;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
/*
|
|
8
|
-
* The MIT License (MIT)
|
|
9
|
-
*
|
|
10
|
-
* Copyright (c) 2015 - present Instructure, Inc.
|
|
11
|
-
*
|
|
12
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
14
|
-
* in the Software without restriction, including without limitation the rights
|
|
15
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
17
|
-
* furnished to do so, subject to the following conditions:
|
|
18
|
-
*
|
|
19
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
20
|
-
* copies or substantial portions of the Software.
|
|
21
|
-
*
|
|
22
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
-
* SOFTWARE.
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Generates the theme object for the component from the theme and provided additional information
|
|
33
|
-
* @param {Object} theme The actual theme object.
|
|
34
|
-
* @return {Object} The final theme object with the overrides and component variables
|
|
35
|
-
*/
|
|
36
|
-
const generateComponentTheme = theme => {
|
|
37
|
-
const componentVariables = {
|
|
38
|
-
arrowSize: '0.5rem',
|
|
39
|
-
arrowBorderWidth: theme?.borders?.widthSmall,
|
|
40
|
-
arrowBackgroundColor: theme?.colors?.contrasts?.white1010,
|
|
41
|
-
arrowBorderColor: theme?.colors?.contrasts?.grey1424,
|
|
42
|
-
arrowBackgroundColorInverse: theme?.colors?.contrasts?.grey125125,
|
|
43
|
-
arrowBorderColorInverse: 'transparent'
|
|
44
|
-
};
|
|
45
|
-
return {
|
|
46
|
-
...componentVariables
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
var _default = exports.default = generateComponentTheme;
|