@indico-data/design-system 2.2.0 → 2.3.1
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/.yarn/sdks/eslint/bin/eslint.js +8 -1
- package/.yarn/sdks/eslint/package.json +1 -1
- package/.yarn/sdks/prettier/bin/prettier.cjs +8 -1
- package/.yarn/sdks/prettier/index.cjs +8 -1
- package/.yarn/sdks/typescript/bin/tsc +8 -1
- package/.yarn/sdks/typescript/bin/tsserver +8 -1
- package/.yarn/sdks/typescript/package.json +1 -1
- package/.yarnrc.yml +1 -0
- package/lib/index.css +141 -101
- package/lib/index.d.ts +973 -14
- package/lib/index.esm.css +141 -101
- package/lib/index.esm.js +25974 -27484
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +26265 -27775
- package/lib/index.js.map +1 -1
- package/lib/src/components/button/Button.stories.d.ts +1 -1
- package/lib/src/components/button/types.d.ts +0 -1
- package/lib/src/components/grid/col/Col.stories.d.ts +1 -2
- package/lib/src/components/grid/container/Container.stories.d.ts +1 -1
- package/lib/src/components/grid/row/Row.stories.d.ts +1 -1
- package/lib/src/components/index.d.ts +1 -0
- package/lib/src/components/table/LoadingComponent.d.ts +1 -0
- package/lib/src/components/table/Table.d.ts +78 -0
- package/lib/src/components/table/Table.stories.d.ts +6 -0
- package/lib/src/components/table/index.d.ts +1 -0
- package/lib/src/components/table/sampleData.d.ts +8 -0
- package/lib/src/index.d.ts +2 -1
- package/lib/src/legacy/components/Accordion/Accordion.stories.d.ts +9 -9
- package/lib/src/legacy/components/Accordion/Accordion.styles.d.ts +1 -2
- package/lib/src/legacy/components/ListTable/Header/Header.styles.d.ts +1 -2
- package/lib/src/legacy/components/ListTable/ListTable.stories.d.ts +7 -7
- package/lib/src/legacy/components/ListTable/ListTable.styles.d.ts +1 -2
- package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.stories.d.ts +2 -2
- package/lib/src/legacy/components/LoadingAwareContainer/LoadingAwareContainer.styles.d.ts +2 -3
- package/lib/src/legacy/components/Pagination/Pagination.styles.d.ts +1 -2
- package/lib/src/legacy/components/Toggle/Toggle.d.ts +1 -2
- package/lib/src/legacy/components/Toggle/Toggle.stories.d.ts +4 -4
- package/lib/src/legacy/components/Toggle/Toggle.styles.d.ts +1 -2
- package/lib/src/legacy/components/Tooltip/Tooltip.styles.d.ts +1 -2
- package/lib/src/legacy/components/basic-section/Section/Section.stories.d.ts +1 -2
- package/lib/src/legacy/components/basic-section/Section/Section.styles.d.ts +1 -2
- package/lib/src/legacy/components/basic-section/SectionBlock/SectionBlock.styles.d.ts +1 -2
- package/lib/src/legacy/components/basic-section/SectionBody/SectionBody.styles.d.ts +1 -2
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.stories.d.ts +1 -1
- package/lib/src/legacy/components/basic-section/SectionHeader/SectionHeader.styles.d.ts +1 -2
- package/lib/src/legacy/components/basic-section/SectionTable/SectionTable.styles.d.ts +1 -2
- package/lib/src/legacy/components/buttons/Button/Button.stories.d.ts +1 -1
- package/lib/src/legacy/components/buttons/Button/Button.styles.d.ts +1 -2
- package/lib/src/legacy/components/buttons/IconButton/IconButton.stories.d.ts +3 -3
- package/lib/src/legacy/components/buttons/IconButton/IconButton.styles.d.ts +4 -3
- package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.stories.d.ts +8 -9
- package/lib/src/legacy/components/dropdowns/BorderSelect/BorderSelect.styles.d.ts +2 -3
- package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.d.ts +5 -5
- package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.stories.d.ts +7 -7
- package/lib/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.styles.d.ts +3 -2
- package/lib/src/legacy/components/dropdowns/Select/Select.stories.d.ts +6 -7
- package/lib/src/legacy/components/dropdowns/Select/Select.styles.d.ts +1 -2
- package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.d.ts +5 -5
- package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.stories.d.ts +5 -6
- package/lib/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.styles.d.ts +3 -2
- package/lib/src/legacy/components/index.d.ts +0 -1
- package/lib/src/legacy/components/inputs/DatePicker/DatePicker.styles.d.ts +1 -2
- package/lib/src/legacy/components/inputs/EditableInput/EditableInput.styles.d.ts +1 -2
- package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.d.ts +1 -2
- package/lib/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.styles.d.ts +1 -2
- package/lib/src/legacy/components/inputs/NumberInput/NumberInput.stories.d.ts +2 -2
- package/lib/src/legacy/components/inputs/NumberInput/NumberInput.styles.d.ts +1 -2
- package/lib/src/legacy/components/inputs/RadioButtons/RadioButtons.styles.d.ts +5 -6
- package/lib/src/legacy/components/inputs/RadioGroup/RadioGroup.styles.d.ts +1 -2
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.stories.d.ts +8 -9
- package/lib/src/legacy/components/inputs/SearchInput/SearchInput.styles.d.ts +1 -2
- package/lib/src/legacy/components/inputs/TextInput/TextInput.stories.d.ts +9 -9
- package/lib/src/legacy/components/inputs/TextInput/TextInput.styles.d.ts +2 -3
- package/lib/src/legacy/components/loading-indicators/BarSpinner/BarSpinner.styles.d.ts +1 -2
- package/lib/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.styles.d.ts +4 -5
- package/lib/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.d.ts +1 -2
- package/lib/src/legacy/components/loading-indicators/LoadingIndicator/LoadingIndicator.styles.d.ts +4 -5
- package/lib/src/legacy/components/loading-indicators/LoadingList/LoadingList.styles.d.ts +1 -2
- package/lib/src/legacy/components/loading-indicators/PercentageRing/PercentageRing.styles.d.ts +1 -2
- package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.stories.d.ts +5 -5
- package/lib/src/legacy/components/modals/ConfirmModal/ConfirmModal.styles.d.ts +1 -2
- package/lib/src/legacy/components/modals/ModalBase/ModalBase.styles.d.ts +1 -1
- package/lib/src/legacy/components/text-truncate/TextTruncate.styles.d.ts +1 -2
- package/lib/src/legacy/components/user-feedback/Shrug/Shrug.stories.d.ts +11 -11
- package/lib/src/legacy/components/user-feedback/Shrug/Shrug.styles.d.ts +1 -2
- package/lib/src/legacy/styles/globals/buttons.d.ts +0 -1
- package/lib/src/legacy/styles/globals/forms.d.ts +0 -1
- package/lib/src/legacy/styles/globals/layout.d.ts +0 -1
- package/lib/src/legacy/styles/globals/lists.d.ts +0 -1
- package/lib/src/legacy/styles/globals/margin-padding.d.ts +0 -1
- package/lib/src/legacy/styles/globals/media.d.ts +0 -1
- package/lib/src/legacy/styles/globals/tables.d.ts +0 -1
- package/lib/src/legacy/styles/globals/typography.d.ts +0 -1
- package/lib/src/legacy/styles/globals/utility-classes.d.ts +0 -1
- package/lib/src/types.d.ts +2 -2
- package/package.json +4 -2
- package/rollup.config.mjs +1 -1
- package/src/components/button/Button.mdx +1 -1
- package/src/components/button/Button.stories.tsx +8 -8
- package/src/components/button/Button.tsx +1 -1
- package/src/components/grid/GridSystem.mdx +0 -1
- package/src/components/grid/col/Col.stories.tsx +1 -2
- package/src/components/grid/container/Container.mdx +0 -1
- package/src/components/grid/container/Container.stories.tsx +1 -3
- package/src/components/grid/row/Row.mdx +0 -1
- package/src/components/grid/row/Row.stories.tsx +1 -3
- package/src/components/icons/Icon.mdx +1 -1
- package/src/components/icons/Icon.stories.tsx +2 -3
- package/src/components/index.ts +1 -0
- package/src/components/table/LoadingComponent.tsx +5 -0
- package/src/components/table/Table.mdx +15 -0
- package/src/components/table/Table.stories.tsx +547 -0
- package/src/components/table/Table.tsx +112 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/sampleData.ts +162 -0
- package/src/components/table/styles/Table.scss +79 -0
- package/src/components/table/styles/_variables.scss +19 -0
- package/src/index.ts +1 -1
- package/src/legacy/components/Accordion/Accordion.tsx +1 -1
- package/src/legacy/components/ListTable/Header/Header.tsx +2 -4
- package/src/legacy/components/ListTable/ListTable.stories.tsx +1 -1
- package/src/legacy/components/Toggle/Toggle.tsx +2 -3
- package/src/legacy/components/Tooltip/Tooltip.tsx +2 -1
- package/src/legacy/components/basic-section/SectionTable/SectionTable.tsx +1 -1
- package/src/legacy/components/buttons/IconButton/IconButton.tsx +1 -1
- package/src/legacy/components/dropdowns/BorderSelect/BorderSelect.tsx +1 -1
- package/src/legacy/components/dropdowns/MultiCombobox/MultiCombobox.tsx +1 -1
- package/src/legacy/components/dropdowns/Select/Select.tsx +1 -1
- package/src/legacy/components/dropdowns/SingleCombobox/SingleCombobox.tsx +1 -1
- package/src/legacy/components/index.ts +0 -1
- package/src/legacy/components/inputs/EditableInput/EditableInput.tsx +1 -1
- package/src/legacy/components/inputs/NoInputDatePicker/NoInputDatePicker.tsx +2 -3
- package/src/legacy/components/inputs/NumberInput/NumberInput.tsx +1 -1
- package/src/legacy/components/inputs/SearchInput/SearchInput.stories.tsx +3 -3
- package/src/legacy/components/inputs/SearchInput/SearchInput.tsx +1 -1
- package/src/legacy/components/loading-indicators/CircleSpinner/CircleSpinner.tsx +2 -3
- package/src/legacy/components/user-feedback/Shrug/Shrug.tsx +1 -1
- package/src/styles/index.scss +2 -2
- package/src/types.ts +3 -5
- package/webpack.config.js +13 -6
- package/lib/src/legacy/components/Navigation/Drawer/Drawer.d.ts +0 -16
- package/lib/src/legacy/components/Navigation/Drawer/Drawer.stories.d.ts +0 -6
- package/lib/src/legacy/components/Navigation/Drawer/DrawerLinkList.d.ts +0 -9
- package/lib/src/legacy/components/Navigation/Drawer/DrawerLinkList.styles.d.ts +0 -2
- package/lib/src/legacy/components/Navigation/Drawer/__mocks__/mocks.d.ts +0 -3
- package/lib/src/legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.d.ts +0 -1
- package/lib/src/legacy/components/Navigation/Drawer/index.d.ts +0 -1
- package/lib/src/legacy/components/Navigation/Drawer/types.d.ts +0 -7
- package/lib/src/legacy/components/Navigation/index.d.ts +0 -1
- package/src/legacy/components/Navigation/Drawer/Drawer.scss +0 -61
- package/src/legacy/components/Navigation/Drawer/Drawer.stories.tsx +0 -43
- package/src/legacy/components/Navigation/Drawer/Drawer.tsx +0 -107
- package/src/legacy/components/Navigation/Drawer/DrawerLinkList.styles.ts +0 -65
- package/src/legacy/components/Navigation/Drawer/DrawerLinkList.tsx +0 -64
- package/src/legacy/components/Navigation/Drawer/__mocks__/mocks.ts +0 -49
- package/src/legacy/components/Navigation/Drawer/__tests__/Drawer.test.tsx +0 -180
- package/src/legacy/components/Navigation/Drawer/__tests__/DrawerLinkList.test.tsx +0 -66
- package/src/legacy/components/Navigation/Drawer/index.ts +0 -1
- package/src/legacy/components/Navigation/Drawer/types.ts +0 -8
- package/src/legacy/components/Navigation/index.ts +0 -1
- /package/src/components/grid/{Grid.scss → styles/Grid.scss} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
export const sampleData = [
|
|
2
|
+
{
|
|
3
|
+
name: 'Thalion',
|
|
4
|
+
class: 'Ranger',
|
|
5
|
+
age: 120,
|
|
6
|
+
weapon: 'Longbow',
|
|
7
|
+
backstory: 'Raised by wolves in the deep forests.',
|
|
8
|
+
favoriteMeal: 'Venison stew',
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
name: 'Brom',
|
|
12
|
+
class: 'Fighter',
|
|
13
|
+
age: 35,
|
|
14
|
+
weapon: 'Greatsword',
|
|
15
|
+
backstory: 'A former soldier seeking redemption.',
|
|
16
|
+
favoriteMeal: 'Roasted boar',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Elysia',
|
|
20
|
+
class: 'Cleric',
|
|
21
|
+
age: 60,
|
|
22
|
+
weapon: 'Mace',
|
|
23
|
+
backstory: 'A devoted follower of the goddess of life.',
|
|
24
|
+
favoriteMeal: 'Vegetable soup',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Faelar',
|
|
28
|
+
class: 'Rogue',
|
|
29
|
+
age: 80,
|
|
30
|
+
weapon: 'Dagger',
|
|
31
|
+
backstory: 'Grew up on the streets of a bustling city.',
|
|
32
|
+
favoriteMeal: 'Bread and cheese',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Maelis',
|
|
36
|
+
class: 'Wizard',
|
|
37
|
+
age: 200,
|
|
38
|
+
weapon: 'Staff',
|
|
39
|
+
backstory: 'A scholar obsessed with ancient magic.',
|
|
40
|
+
favoriteMeal: 'Mushroom stew',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'Grimm',
|
|
44
|
+
class: 'Barbarian',
|
|
45
|
+
age: 40,
|
|
46
|
+
weapon: 'Battleaxe',
|
|
47
|
+
backstory: 'Hails from a tribe in the frozen north.',
|
|
48
|
+
favoriteMeal: 'Grilled salmon',
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: 'Seraphina',
|
|
52
|
+
class: 'Bard',
|
|
53
|
+
age: 25,
|
|
54
|
+
weapon: 'Rapier',
|
|
55
|
+
backstory: 'A wandering minstrel with a mysterious past.',
|
|
56
|
+
favoriteMeal: 'Apple pie',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Kael',
|
|
60
|
+
class: 'Druid',
|
|
61
|
+
age: 75,
|
|
62
|
+
weapon: 'Scimitar',
|
|
63
|
+
backstory: 'A guardian of the natural world.',
|
|
64
|
+
favoriteMeal: 'Berry tart',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: 'Aria',
|
|
68
|
+
class: 'Paladin',
|
|
69
|
+
age: 30,
|
|
70
|
+
weapon: 'Longsword',
|
|
71
|
+
backstory: 'A knight on a divine mission.',
|
|
72
|
+
favoriteMeal: 'Roasted chicken',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'Xan',
|
|
76
|
+
class: 'Warlock',
|
|
77
|
+
age: 45,
|
|
78
|
+
weapon: 'Pact Blade',
|
|
79
|
+
backstory: 'Made a pact with a powerful entity for magic.',
|
|
80
|
+
favoriteMeal: 'Stuffed peppers',
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Lyra',
|
|
84
|
+
class: 'Sorcerer',
|
|
85
|
+
age: 28,
|
|
86
|
+
weapon: 'Dagger',
|
|
87
|
+
backstory: 'Born with innate magical abilities.',
|
|
88
|
+
favoriteMeal: 'Pancakes with syrup',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: 'Thorn',
|
|
92
|
+
class: 'Monk',
|
|
93
|
+
age: 50,
|
|
94
|
+
weapon: 'Quarterstaff',
|
|
95
|
+
backstory: 'A hermit who seeks enlightenment.',
|
|
96
|
+
favoriteMeal: 'Rice and vegetables',
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'Cassia',
|
|
100
|
+
class: 'Ranger',
|
|
101
|
+
age: 32,
|
|
102
|
+
weapon: 'Shortbow',
|
|
103
|
+
backstory: 'A hunter with a keen eye.',
|
|
104
|
+
favoriteMeal: 'Roasted pheasant',
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
name: 'Darius',
|
|
108
|
+
class: 'Fighter',
|
|
109
|
+
age: 36,
|
|
110
|
+
weapon: 'Longsword',
|
|
111
|
+
backstory: 'A mercenary with a heart of gold.',
|
|
112
|
+
favoriteMeal: 'Beef stew',
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: 'Iris',
|
|
116
|
+
class: 'Cleric',
|
|
117
|
+
age: 60,
|
|
118
|
+
weapon: 'Warhammer',
|
|
119
|
+
backstory: 'A healer devoted to the god of light.',
|
|
120
|
+
favoriteMeal: 'Fresh bread and soup',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'Fenrir',
|
|
124
|
+
class: 'Barbarian',
|
|
125
|
+
age: 42,
|
|
126
|
+
weapon: 'Greataxe',
|
|
127
|
+
backstory: 'A warrior from a distant land.',
|
|
128
|
+
favoriteMeal: 'Grilled steak',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'Luna',
|
|
132
|
+
class: 'Druid',
|
|
133
|
+
age: 70,
|
|
134
|
+
weapon: 'Sickle',
|
|
135
|
+
backstory: 'A protector of the natural world.',
|
|
136
|
+
favoriteMeal: 'Fruit salad',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: 'Orion',
|
|
140
|
+
class: 'Paladin',
|
|
141
|
+
age: 33,
|
|
142
|
+
weapon: 'Halberd',
|
|
143
|
+
backstory: 'A knight on a holy quest.',
|
|
144
|
+
favoriteMeal: 'Roasted lamb',
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: 'Astra',
|
|
148
|
+
class: 'Bard',
|
|
149
|
+
age: 26,
|
|
150
|
+
weapon: 'Lute',
|
|
151
|
+
backstory: 'A musician with a magical voice.',
|
|
152
|
+
favoriteMeal: 'Honey cake',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
name: 'Zephyr',
|
|
156
|
+
class: 'Rogue',
|
|
157
|
+
age: 29,
|
|
158
|
+
weapon: 'Shortsword',
|
|
159
|
+
backstory: 'A thief with a quick hand.',
|
|
160
|
+
favoriteMeal: 'Fish and chips',
|
|
161
|
+
},
|
|
162
|
+
];
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@import 'variables.scss';
|
|
2
|
+
|
|
3
|
+
:root,
|
|
4
|
+
:root [data-theme='light'],
|
|
5
|
+
:root [data-theme='dark'] {
|
|
6
|
+
.table-loading {
|
|
7
|
+
color: var(--pf-table-font-color);
|
|
8
|
+
}
|
|
9
|
+
.table-wrapper {
|
|
10
|
+
background-color: var(--pf-table-background-color);
|
|
11
|
+
color: var(--pf-table-font-color);
|
|
12
|
+
|
|
13
|
+
.rdt_Table,
|
|
14
|
+
.rdt_TableRow,
|
|
15
|
+
.rdt_TableCol,
|
|
16
|
+
.rdt_TableCol_Sortable,
|
|
17
|
+
.rdt_TableCell,
|
|
18
|
+
.rdt_TableHeader,
|
|
19
|
+
.rdt_TableFooter,
|
|
20
|
+
.rdt_TableHead,
|
|
21
|
+
.rdt_TableHeadRow,
|
|
22
|
+
.rdt_TableBody,
|
|
23
|
+
.rdt_ExpanderRow,
|
|
24
|
+
.rdt_Pagination {
|
|
25
|
+
background-color: var(--pf-table-background-color);
|
|
26
|
+
color: var(--pf-table-font-color);
|
|
27
|
+
}
|
|
28
|
+
button {
|
|
29
|
+
svg {
|
|
30
|
+
fill: var(--pf-table-font-color);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&:disabled {
|
|
34
|
+
svg {
|
|
35
|
+
fill: var(--pf-gray-color-900);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.pf__table--striped {
|
|
42
|
+
.rdt_TableRow:nth-child(odd) {
|
|
43
|
+
.rdt_TableCell {
|
|
44
|
+
background-color: var(--pf-table-stripe-color);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:root [data-theme='light'] {
|
|
51
|
+
.table-wrapper {
|
|
52
|
+
.rdt_Table,
|
|
53
|
+
.rdt_TableRow,
|
|
54
|
+
.rdt_TableCol,
|
|
55
|
+
.rdt_TableCol_Sortable,
|
|
56
|
+
.rdt_TableCell,
|
|
57
|
+
.rdt_TableHeader,
|
|
58
|
+
.rdt_TableFooter,
|
|
59
|
+
.rdt_TableHead,
|
|
60
|
+
.rdt_TableHeadRow,
|
|
61
|
+
.rdt_TableBody,
|
|
62
|
+
.rdt_ExpanderRow,
|
|
63
|
+
.rdt_Pagination {
|
|
64
|
+
background-color: var(--pf-table-background-color);
|
|
65
|
+
color: var(--pf-table-font-color);
|
|
66
|
+
}
|
|
67
|
+
button {
|
|
68
|
+
svg {
|
|
69
|
+
fill: var(--pf-table-font-color);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:disabled {
|
|
73
|
+
svg {
|
|
74
|
+
fill: var(--pf-gray-color-300);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Common Variables
|
|
2
|
+
:root,
|
|
3
|
+
:root [data-theme='light'],
|
|
4
|
+
:root [data-theme='dark'] {
|
|
5
|
+
--pf-table-font-color: var(--pf-gray-color);
|
|
6
|
+
--pf-table-stripe-color: var(--pf-gray-color-100);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Light Theme Specific Variables
|
|
10
|
+
:root [data-theme='light'] {
|
|
11
|
+
--pf-table-background-color: var(--pf-white-color);
|
|
12
|
+
--pf-table-stripe-color: var(--pf-gray-color-100);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Dark Theme Specific Variables
|
|
16
|
+
:root [data-theme='dark'] {
|
|
17
|
+
--pf-table-background-color: var(--pf-primary-color-700);
|
|
18
|
+
--pf-table-stripe-color: var(--pf-primary-color-400);
|
|
19
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -24,7 +24,6 @@ export {
|
|
|
24
24
|
CirclePulse,
|
|
25
25
|
CircleSpinner,
|
|
26
26
|
ConfirmModal,
|
|
27
|
-
Drawer,
|
|
28
27
|
DatePicker,
|
|
29
28
|
EditableInput,
|
|
30
29
|
IconButton,
|
|
@@ -61,3 +60,4 @@ export { numberUtils, stringUtils, colorUtils } from './legacy/utils';
|
|
|
61
60
|
export { Container, Row, Col } from './components/grid';
|
|
62
61
|
export { Button } from './components/button';
|
|
63
62
|
export { Icon } from './components/icons';
|
|
63
|
+
export { Table } from './components/table';
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
import { numberUtils } from '@/legacy/utils';
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
import { Button } from '@/legacy/components/buttons';
|
|
9
|
-
import { Icon } from '@/components/icons';
|
|
6
|
+
import { BorderSelect, Button } from '@/legacy/components';
|
|
7
|
+
import { Icon } from '@/components';
|
|
10
8
|
|
|
11
9
|
import { StyledHeader } from './Header.styles';
|
|
12
10
|
|
|
@@ -5,7 +5,7 @@ import { Button } from '@/legacy/components';
|
|
|
5
5
|
|
|
6
6
|
import { ListTable } from './ListTable';
|
|
7
7
|
import { mockUserHeaders, mockDocProcHeaders, mockAllUsers, mockDocProcReport } from './mock-data';
|
|
8
|
-
import { Icon } from '@/components
|
|
8
|
+
import { Icon } from '@/components';
|
|
9
9
|
|
|
10
10
|
const meta = {
|
|
11
11
|
component: ListTable,
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
6
|
-
import { Icon } from '@/components
|
|
7
|
-
import { PermafrostComponent, IconName } from '@/types';
|
|
6
|
+
import { Icon } from '@/components';
|
|
7
|
+
import { PermafrostComponent, IconName, IconSizes } from '@/types';
|
|
8
8
|
import { StyledToggle } from './Toggle.styles';
|
|
9
|
-
import { IconSizes } from '@/components/icons/types';
|
|
10
9
|
|
|
11
10
|
type Props = {
|
|
12
11
|
disabled: boolean;
|
|
@@ -4,7 +4,7 @@ import React, { useState } from 'react';
|
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
6
6
|
import { IconName } from '@/types';
|
|
7
|
-
import { Icon } from '@/components
|
|
7
|
+
import { Icon } from '@/components';
|
|
8
8
|
import { BorderSelect } from '@/legacy/components/dropdowns';
|
|
9
9
|
|
|
10
10
|
import { StyledSectionTable } from './SectionTable.styles';
|
|
@@ -8,7 +8,7 @@ import { AriaButtonProps } from '@react-types/button';
|
|
|
8
8
|
|
|
9
9
|
import { SPACING } from '@/legacy/tokens';
|
|
10
10
|
import { IconName, PermafrostComponent } from '@/types';
|
|
11
|
-
import { Icon } from '@/components
|
|
11
|
+
import { Icon } from '@/components';
|
|
12
12
|
import { CircleSpinner } from '@/legacy/components';
|
|
13
13
|
import { ButtonSize, IconButtonVariant } from '../types';
|
|
14
14
|
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
|
|
7
|
-
import { Icon } from '@/components
|
|
7
|
+
import { Icon } from '@/components';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
|
|
10
10
|
import { StyledSelect, StyledValidationError } from './BorderSelect.styles';
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { components } from 'react-select';
|
|
5
5
|
|
|
6
6
|
import { PermafrostComponent } from '@/types';
|
|
7
|
-
import { Icon } from '@/components
|
|
7
|
+
import { Icon } from '@/components';
|
|
8
8
|
import { addCustomProps } from '../utils';
|
|
9
9
|
import type { ComboboxProps, ComboboxOption } from '../types';
|
|
10
10
|
|
|
@@ -29,7 +29,6 @@ export { Pagination } from './Pagination';
|
|
|
29
29
|
export { Shrug } from './user-feedback';
|
|
30
30
|
export { ConfirmModal, ModalBase } from './modals';
|
|
31
31
|
export { LoadingAwareContainer } from './LoadingAwareContainer';
|
|
32
|
-
export { Drawer } from './Navigation/Drawer';
|
|
33
32
|
export { TextTruncate } from './text-truncate';
|
|
34
33
|
export { Toggle } from './Toggle';
|
|
35
34
|
export { Tooltip } from './Tooltip';
|
|
@@ -8,7 +8,7 @@ import classNames from 'classnames';
|
|
|
8
8
|
|
|
9
9
|
import { stringUtils } from '@/legacy/utils';
|
|
10
10
|
|
|
11
|
-
import { Icon } from '@/components
|
|
11
|
+
import { Icon } from '@/components';
|
|
12
12
|
import { PermafrostComponent } from '@/types';
|
|
13
13
|
|
|
14
14
|
import { StyledEditableInput } from './EditableInput.styles';
|
|
@@ -11,11 +11,10 @@ import {
|
|
|
11
11
|
DateRange,
|
|
12
12
|
} from 'react-day-picker';
|
|
13
13
|
import { usePopper } from 'react-popper';
|
|
14
|
-
import { IconName, PermafrostComponent } from '@/types';
|
|
15
|
-
import { Icon } from '@/components
|
|
14
|
+
import { IconName, IconSizes, PermafrostComponent } from '@/types';
|
|
15
|
+
import { Icon } from '@/components';
|
|
16
16
|
|
|
17
17
|
import { StyledNoInputDatePicker } from './NoInputDatePicker.styles';
|
|
18
|
-
import { IconSizes } from '@/components/icons/types';
|
|
19
18
|
|
|
20
19
|
type Props = PermafrostComponent & {
|
|
21
20
|
ariaLabel?: string;
|
|
@@ -5,7 +5,7 @@ import classNames from 'classnames';
|
|
|
5
5
|
import { v4 as uuid } from 'uuid';
|
|
6
6
|
|
|
7
7
|
import { Button } from '@/legacy/components/buttons';
|
|
8
|
-
import { Icon } from '@/components
|
|
8
|
+
import { Icon } from '@/components';
|
|
9
9
|
import { PermafrostComponent } from '@/types';
|
|
10
10
|
|
|
11
11
|
import { StyledNumberField } from './NumberInput.styles';
|
|
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof SearchInput>;
|
|
|
17
17
|
export const Base: Story = {};
|
|
18
18
|
|
|
19
19
|
export const Border: Story = {
|
|
20
|
-
args: {
|
|
20
|
+
args: { inputBorder: true },
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
export const SearchIcon: Story = {
|
|
@@ -25,7 +25,7 @@ export const SearchIcon: Story = {
|
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export const BorderAndSearchIcon: Story = {
|
|
28
|
-
args: {
|
|
28
|
+
args: { inputBorder: true, showSearchIcon: true },
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export const ClearInputIcon: Story = {
|
|
@@ -33,5 +33,5 @@ export const ClearInputIcon: Story = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export const ClearInputIconWithBorder: Story = {
|
|
36
|
-
args: { showClearInputIcon: true,
|
|
36
|
+
args: { showClearInputIcon: true, inputBorder: true },
|
|
37
37
|
};
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { v4 as uuid } from 'uuid';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
|
|
7
|
-
import { Icon } from '@/components
|
|
7
|
+
import { Icon } from '@/components';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
|
|
10
10
|
import { StyledSearchField } from './SearchInput.styles';
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import { Icon } from '@/components
|
|
6
|
-
import { PermafrostComponent } from '@/types';
|
|
7
|
-
import { IconSizes } from '@/components/icons/types';
|
|
5
|
+
import { Icon } from '@/components';
|
|
6
|
+
import { PermafrostComponent, IconSizes } from '@/types';
|
|
8
7
|
|
|
9
8
|
type Props = PermafrostComponent & {
|
|
10
9
|
ariaLabel?: string;
|
|
@@ -4,7 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { Link } from 'react-router-dom';
|
|
5
5
|
|
|
6
6
|
import { Button } from '@/legacy/components/buttons';
|
|
7
|
-
import { Icon } from '@/components
|
|
7
|
+
import { Icon } from '@/components';
|
|
8
8
|
import { PermafrostComponent } from '@/types';
|
|
9
9
|
|
|
10
10
|
import { StyledShrug } from './Shrug.styles';
|
package/src/styles/index.scss
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
@import 'variables/index.scss';
|
|
3
3
|
|
|
4
4
|
// Components
|
|
5
|
-
@import '../legacy/components/Navigation/Drawer/Drawer.scss';
|
|
6
5
|
@import '../components/button/styles/Button.scss';
|
|
7
6
|
@import '../components/icons/styles/Icon.scss';
|
|
7
|
+
@import '../components/grid/styles/Grid.scss';
|
|
8
|
+
@import '../components/table/styles/Table.scss';
|
|
8
9
|
|
|
9
|
-
// Helper Classes
|
|
10
10
|
@import 'typography';
|
|
11
11
|
@import 'colors';
|
|
12
12
|
@import 'borders';
|
package/src/types.ts
CHANGED
|
@@ -8,10 +8,8 @@ export type PermafrostComponent = {
|
|
|
8
8
|
export type ButtonVariant = 'default' | 'primary' | 'destructive';
|
|
9
9
|
export type ButtonSize = 'normal' | 'large';
|
|
10
10
|
|
|
11
|
-
// Component types -- TODO -- move to their own files
|
|
12
|
-
import { ListItem } from './legacy/components/Navigation/Drawer/types';
|
|
13
|
-
|
|
14
|
-
export type { ListItem };
|
|
15
|
-
|
|
16
11
|
import { IconName } from '../build/generated/iconTypes';
|
|
17
12
|
export type { IconName };
|
|
13
|
+
|
|
14
|
+
import { IconSizes } from '@/components/icons/types';
|
|
15
|
+
export type { IconSizes };
|
package/webpack.config.js
CHANGED
|
@@ -34,16 +34,23 @@ module.exports = {
|
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
test: /\.scss$/,
|
|
37
|
-
use: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
use: [
|
|
38
|
+
'style-loader',
|
|
39
|
+
{
|
|
40
|
+
loader: 'css-loader',
|
|
41
|
+
options: {
|
|
42
|
+
modules: false,
|
|
43
|
+
},
|
|
41
44
|
},
|
|
42
|
-
|
|
45
|
+
'sass-loader',
|
|
46
|
+
],
|
|
43
47
|
},
|
|
44
48
|
],
|
|
45
49
|
},
|
|
46
50
|
resolve: {
|
|
51
|
+
alias: {
|
|
52
|
+
'@': path.resolve(__dirname, 'src'),
|
|
53
|
+
},
|
|
47
54
|
extensions: ['.mjs', '.js', '.cjs', '.jsx', '.tsx', '.ts', '.mdx'],
|
|
48
55
|
modules: ['node_modules'],
|
|
49
56
|
},
|
|
@@ -54,4 +61,4 @@ module.exports = {
|
|
|
54
61
|
'react-select': 'react-select',
|
|
55
62
|
'styled-components': 'styled-components',
|
|
56
63
|
},
|
|
57
|
-
};
|
|
64
|
+
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { IconName, PermafrostComponent } from '@/types';
|
|
3
|
-
import { ListItem } from './types';
|
|
4
|
-
import './Drawer.scss';
|
|
5
|
-
type Props = PermafrostComponent & {
|
|
6
|
-
style?: React.CSSProperties;
|
|
7
|
-
logoText?: string;
|
|
8
|
-
logoIcon?: IconName;
|
|
9
|
-
headerComponent?: React.ReactNode;
|
|
10
|
-
navigationItems?: ListItem[];
|
|
11
|
-
footerItems?: ListItem[];
|
|
12
|
-
expandedWidth?: string;
|
|
13
|
-
collapsedWidth?: string;
|
|
14
|
-
};
|
|
15
|
-
export declare const Drawer: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { PermafrostComponent } from '@/types';
|
|
2
|
-
import { ListItem } from './types';
|
|
3
|
-
type Props = PermafrostComponent & {
|
|
4
|
-
style?: object;
|
|
5
|
-
listItems?: ListItem[];
|
|
6
|
-
isOpen: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const DrawerLinkList: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const StyledDrawerLinkList: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Drawer } from './Drawer';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Drawer } from './Drawer';
|