@apolitical/component-library 1.1.4 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/discussion/conversation/conversation.d.ts +13 -0
- package/discussion/conversation/index.d.ts +1 -0
- package/discussion/discussion.helpers.d.ts +5 -0
- package/discussion/form/form.d.ts +3 -3
- package/discussion/index.d.ts +2 -0
- package/discussion/likes/likes.d.ts +4 -0
- package/discussion/post/index.d.ts +1 -0
- package/discussion/post/post.d.ts +37 -0
- package/general/link/link.d.ts +2 -2
- package/index.js +72 -72
- package/index.mjs +9923 -9227
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_index.scss +1 -0
- package/styles/base/_table.scss +71 -0
- package/styles/variables/colors/_theme.scss +5 -0
- package/text/index.d.ts +1 -0
- package/text/markdown-text/components/case-study/case-study.d.ts +5 -0
- package/text/markdown-text/components/case-study/index.d.ts +1 -0
- package/text/markdown-text/components/details/details.d.ts +9 -0
- package/text/markdown-text/components/details/index.d.ts +1 -0
- package/text/markdown-text/components/div/div.d.ts +6 -0
- package/text/markdown-text/components/div/index.d.ts +1 -0
- package/text/markdown-text/components/empty-component/empty-component.d.ts +5 -0
- package/text/markdown-text/components/empty-component/index.d.ts +1 -0
- package/text/markdown-text/components/iframe/iframe.d.ts +8 -0
- package/text/markdown-text/components/iframe/index.d.ts +1 -0
- package/text/markdown-text/components/index.d.ts +6 -0
- package/text/markdown-text/components/link/index.d.ts +1 -0
- package/text/markdown-text/components/link/link.d.ts +8 -0
- package/text/markdown-text/index.d.ts +1 -0
- package/text/markdown-text/markdown-text.d.ts +10 -0
package/styles/base/_index.scss
CHANGED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import './../functions',
|
|
3
|
+
'./../variables';
|
|
4
|
+
|
|
5
|
+
$table: ('margin-top': 64, 'margin-bottom': 32, 'padding-vertical': 12, 'padding-horizontal': 20, 'border': 1, 'border-radius': 8);
|
|
6
|
+
|
|
7
|
+
@layer base {
|
|
8
|
+
table {
|
|
9
|
+
width: 100%;
|
|
10
|
+
margin: px-to-rem(map.get($table, 'margin-top')) auto px-to-rem(map.get($table, 'margin-bottom')) auto;
|
|
11
|
+
border-collapse: separate;
|
|
12
|
+
border-spacing: 0;
|
|
13
|
+
|
|
14
|
+
&, p, li { text-align: left; }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
th, td {
|
|
18
|
+
border: px-to-rem(map.get($table, 'border')) solid map.get($theme, 'table_border');
|
|
19
|
+
vertical-align: top;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
th, tbody:first-child tr:first-child td {
|
|
23
|
+
background: map.get($theme, 'table_th_bg');
|
|
24
|
+
padding: px-to-rem(map.get($table, 'padding-horizontal'));
|
|
25
|
+
color: map.get($theme, 'table_th');
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
border-right-width: 0;
|
|
28
|
+
|
|
29
|
+
/* Add border radius to the corners of the table, not each cell */
|
|
30
|
+
&:first-child {
|
|
31
|
+
border-top-left-radius: px-to-rem(map.get($table, 'border-radius'));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&:last-child {
|
|
35
|
+
border-top-right-radius: px-to-rem(map.get($table, 'border-radius'));
|
|
36
|
+
border-right-width: px-to-rem(map.get($table, 'border'));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
td {
|
|
41
|
+
padding: px-to-rem(map.get($table, 'padding-vertical')) px-to-rem(map.get($table, 'padding-horizontal'));
|
|
42
|
+
border-top-width: 0;
|
|
43
|
+
border-right-width: 0;
|
|
44
|
+
|
|
45
|
+
/* Prevent borders with double width due to using border-collapse separate */
|
|
46
|
+
&:last-child {
|
|
47
|
+
border-right-width: px-to-rem(map.get($table, 'border'));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
tr:last-child {
|
|
52
|
+
td {
|
|
53
|
+
&:first-child {
|
|
54
|
+
border-bottom-left-radius: px-to-rem(map.get($table, 'border-radius'));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:last-child {
|
|
58
|
+
border-bottom-right-radius: px-to-rem(map.get($table, 'border-radius'));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Remove the styling if there's only one row as some old articles use tables
|
|
64
|
+
// to display buttons inline
|
|
65
|
+
tr:first-child:last-child {
|
|
66
|
+
td {
|
|
67
|
+
background: none;
|
|
68
|
+
border: none;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -71,6 +71,10 @@ $theme: (
|
|
|
71
71
|
form_input_focus_box-shadow: map.get($c, 'b100'),
|
|
72
72
|
form_search-button_bg: map.get($c, 'n900'),
|
|
73
73
|
|
|
74
|
+
table_border: map.get($c, 'n200'),
|
|
75
|
+
table_th: map.get($c, 'white'),
|
|
76
|
+
table_th_bg: map.get($c, 'n600'),
|
|
77
|
+
|
|
74
78
|
overlay: rgb(21 25 33 / 25%),
|
|
75
79
|
|
|
76
80
|
// Banners
|
|
@@ -104,6 +108,7 @@ $theme: (
|
|
|
104
108
|
discussion-form_small: map.get($c, 'n700'),
|
|
105
109
|
|
|
106
110
|
discussion-likes: map.get($c, 'n600'),
|
|
111
|
+
discussion-likes_hover_bg: map.get($c, 'b100'),
|
|
107
112
|
discussion-likes_liked: map.get($c, 'p500'),
|
|
108
113
|
discussion-likes_liked_bg: map.get($c, 'p500'),
|
|
109
114
|
|
package/text/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as CaseStudy } from './case-study';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** The content to show */
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
/** The language to use for the text */
|
|
6
|
+
locale?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const DetailsWrapper: ({ locale, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default DetailsWrapper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Details } from './details';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Div } from './div';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as EmptyComponent } from './empty-component';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as IFrame } from './iframe';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Link } from './link';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const _default: ({ children, ...props }: {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
href?: string | undefined;
|
|
5
|
+
target?: "_blank" | "_self" | "_parent" | "_top" | undefined;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MarkdownText } from './markdown-text';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Additional classes */
|
|
3
|
+
className?: string;
|
|
4
|
+
/** The options to pass to the markdown parser */
|
|
5
|
+
options?: any;
|
|
6
|
+
/** The content to be parsed */
|
|
7
|
+
children: string;
|
|
8
|
+
}
|
|
9
|
+
declare const MarkdownText: ({ className, options, children }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default MarkdownText;
|