@ebl-vue/editor-full 2.31.24 → 2.31.28

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.
Files changed (114) hide show
  1. package/dist/index.d.ts +1 -28
  2. package/dist/index.mjs +540 -702
  3. package/dist/index.mjs.map +1 -1
  4. package/package.json +3 -3
  5. package/types/index.d.ts +5 -1
  6. package/.postcssrc.yml +0 -33
  7. package/postcss.config.js +0 -15
  8. package/src/components/Editor/Editor.vue +0 -293
  9. package/src/components/Editor/EditorRender.vue +0 -274
  10. package/src/components/index.ts +0 -29
  11. package/src/constants/index.ts +0 -1
  12. package/src/i18n/zh-cn.ts +0 -158
  13. package/src/icons/index.ts +0 -93
  14. package/src/index.ts +0 -22
  15. package/src/installer.ts +0 -21
  16. package/src/plugins/alert/index.css +0 -150
  17. package/src/plugins/alert/index.ts +0 -456
  18. package/src/plugins/block-alignment/index.css +0 -9
  19. package/src/plugins/block-alignment/index.ts +0 -117
  20. package/src/plugins/block-alignment/readme.md +0 -1
  21. package/src/plugins/code/LICENSE +0 -21
  22. package/src/plugins/code/index.css +0 -158
  23. package/src/plugins/code/index.ts +0 -573
  24. package/src/plugins/code/utils/string.ts +0 -34
  25. package/src/plugins/color-picker/index.ts +0 -130
  26. package/src/plugins/color-picker/styles.css +0 -27
  27. package/src/plugins/delimiter/index.css +0 -14
  28. package/src/plugins/delimiter/index.ts +0 -121
  29. package/src/plugins/drag-drop/index.css +0 -19
  30. package/src/plugins/drag-drop/index.ts +0 -151
  31. package/src/plugins/drag-drop/readme.md +0 -1
  32. package/src/plugins/header/H1.ts +0 -404
  33. package/src/plugins/header/H2.ts +0 -403
  34. package/src/plugins/header/H3.ts +0 -404
  35. package/src/plugins/header/H4.ts +0 -404
  36. package/src/plugins/header/H5.ts +0 -403
  37. package/src/plugins/header/H6.ts +0 -404
  38. package/src/plugins/header/index.css +0 -20
  39. package/src/plugins/header/index.ts +0 -15
  40. package/src/plugins/header/types.d.ts +0 -46
  41. package/src/plugins/imageResizeCrop/ImageTune.ts +0 -916
  42. package/src/plugins/imageResizeCrop/index.css +0 -230
  43. package/src/plugins/imageResizeCrop/index.ts +0 -5
  44. package/src/plugins/imageResizeCrop/types.d.ts +0 -23
  45. package/src/plugins/imageTool/index.css +0 -156
  46. package/src/plugins/imageTool/index.ts +0 -538
  47. package/src/plugins/imageTool/types/codexteam__ajax.d.ts +0 -89
  48. package/src/plugins/imageTool/types/types.ts +0 -236
  49. package/src/plugins/imageTool/ui.ts +0 -313
  50. package/src/plugins/imageTool/uploader.ts +0 -272
  51. package/src/plugins/imageTool/utils/dom.ts +0 -24
  52. package/src/plugins/imageTool/utils/index.ts +0 -73
  53. package/src/plugins/imageTool/utils/isPromise.ts +0 -10
  54. package/src/plugins/indent/index.css +0 -86
  55. package/src/plugins/indent/index.ts +0 -695
  56. package/src/plugins/inline-code/index.css +0 -11
  57. package/src/plugins/inline-code/index.ts +0 -202
  58. package/src/plugins/list/ListRenderer/ChecklistRenderer.ts +0 -208
  59. package/src/plugins/list/ListRenderer/ListRenderer.ts +0 -73
  60. package/src/plugins/list/ListRenderer/OrderedListRenderer.ts +0 -123
  61. package/src/plugins/list/ListRenderer/UnorderedListRenderer.ts +0 -123
  62. package/src/plugins/list/ListRenderer/index.ts +0 -6
  63. package/src/plugins/list/ListTabulator/index.ts +0 -1179
  64. package/src/plugins/list/index.ts +0 -480
  65. package/src/plugins/list/styles/CssPrefix.ts +0 -4
  66. package/src/plugins/list/styles/input.css +0 -36
  67. package/src/plugins/list/styles/list.css +0 -165
  68. package/src/plugins/list/types/Elements.ts +0 -14
  69. package/src/plugins/list/types/ItemMeta.ts +0 -40
  70. package/src/plugins/list/types/ListParams.ts +0 -102
  71. package/src/plugins/list/types/ListRenderer.ts +0 -6
  72. package/src/plugins/list/types/OlCounterType.ts +0 -63
  73. package/src/plugins/list/types/index.ts +0 -14
  74. package/src/plugins/list/utils/focusItem.ts +0 -18
  75. package/src/plugins/list/utils/getChildItems.ts +0 -40
  76. package/src/plugins/list/utils/getItemChildWrapper.ts +0 -10
  77. package/src/plugins/list/utils/getItemContentElement.ts +0 -10
  78. package/src/plugins/list/utils/getSiblings.ts +0 -52
  79. package/src/plugins/list/utils/isLastItem.ts +0 -9
  80. package/src/plugins/list/utils/itemHasSublist.ts +0 -10
  81. package/src/plugins/list/utils/normalizeData.ts +0 -83
  82. package/src/plugins/list/utils/removeChildWrapperIfEmpty.ts +0 -31
  83. package/src/plugins/list/utils/renderToolboxInput.ts +0 -105
  84. package/src/plugins/list/utils/stripNumbers.ts +0 -7
  85. package/src/plugins/list/utils/type-guards.ts +0 -8
  86. package/src/plugins/marker/index.css +0 -4
  87. package/src/plugins/marker/index.ts +0 -199
  88. package/src/plugins/outline/index.css +0 -52
  89. package/src/plugins/outline/index.ts +0 -63
  90. package/src/plugins/paragraph/index.css +0 -23
  91. package/src/plugins/paragraph/index.ts +0 -381
  92. package/src/plugins/paragraph/types/icons.d.ts +0 -4
  93. package/src/plugins/paragraph/utils/makeFragment.ts +0 -17
  94. package/src/plugins/quote/index.css +0 -26
  95. package/src/plugins/quote/index.ts +0 -203
  96. package/src/plugins/table/index.ts +0 -4
  97. package/src/plugins/table/plugin.ts +0 -254
  98. package/src/plugins/table/style.css +0 -388
  99. package/src/plugins/table/table.ts +0 -1195
  100. package/src/plugins/table/toolbox.ts +0 -166
  101. package/src/plugins/table/utils/dom.ts +0 -130
  102. package/src/plugins/table/utils/popover.ts +0 -185
  103. package/src/plugins/table/utils/throttled.ts +0 -22
  104. package/src/plugins/underline/index.css +0 -3
  105. package/src/plugins/underline/index.ts +0 -214
  106. package/src/plugins/undo/index.ts +0 -524
  107. package/src/plugins/undo/observer.ts +0 -101
  108. package/src/style.css +0 -114
  109. package/src/types.ts +0 -3
  110. package/src/utils/AxiosService.ts +0 -87
  111. package/src/utils/index.ts +0 -15
  112. package/src/utils/install.ts +0 -19
  113. package/tsconfig.json +0 -37
  114. package/vite.config.ts +0 -81
@@ -1,480 +0,0 @@
1
- import type { API, BlockAPI, PasteConfig, ToolboxConfig } from '@ebl-vue/editorjs';
2
- import type {
3
- BlockToolConstructorOptions,
4
- MenuConfigItem,
5
- ToolConfig
6
- } from '@ebl-vue/editorjs/types/tools';
7
- import { IconListBulleted, IconListNumbered, IconChecklist } from '../../icons';
8
- import { IconStartWith } from '../../icons';
9
- import type { ListConfig, ListData, ListDataStyle, ListItem, OldListData } from './types/ListParams';
10
- import ListTabulator from './ListTabulator';
11
- import { CheckListRenderer, OrderedListRenderer, UnorderedListRenderer } from './ListRenderer';
12
- import type { ListRenderer } from './types/ListRenderer';
13
- import { renderToolboxInput } from './utils/renderToolboxInput';
14
- import { OlCounterIconsMap, type OlCounterType, OlCounterTypesMap } from './types/OlCounterType';
15
-
16
- /**
17
- * Build styles
18
- */
19
- import './styles/list.css';
20
- import './styles/input.css';
21
- import stripNumbers from './utils/stripNumbers';
22
- import normalizeData from './utils/normalizeData';
23
- import type { PasteEvent } from './types';
24
- import type { OrderedListItemMeta } from './types/ItemMeta';
25
-
26
- /**
27
- * Constructor Params for Editorjs List Tool, use to pass initial data and settings
28
- */
29
- export type ListParams = BlockToolConstructorOptions<ListData | OldListData, ListConfig>;
30
-
31
- /**
32
- * Default class of the component used in editor
33
- */
34
- export default class EditorjsList {
35
- /**
36
- * Notify core that read-only mode is supported
37
- */
38
- public static get isReadOnlySupported(): boolean {
39
- return true;
40
- }
41
-
42
- /**
43
- * Allow to use native Enter behaviour
44
- */
45
- public static get enableLineBreaks(): boolean {
46
- return true;
47
- }
48
-
49
- /**
50
- * Get Tool toolbox settings
51
- * icon - Tool icon's SVG
52
- * title - title to show in toolbox
53
- */
54
- public static get toolbox(): ToolboxConfig {
55
- return [
56
- {
57
- icon: IconListBulleted,
58
- title: 'Unordered List',
59
- data: {
60
- style: 'unordered',
61
- },
62
- },
63
- {
64
- icon: IconListNumbered,
65
- title: 'Ordered List',
66
- data: {
67
- style: 'ordered',
68
- },
69
- },
70
- {
71
- icon: IconChecklist,
72
- title: 'Checklist',
73
- data: {
74
- style: 'checklist',
75
- },
76
- },
77
- ];
78
- }
79
-
80
- /**
81
- * On paste sanitzation config. Allow only tags that are allowed in the Tool.
82
- * @returns - paste config object used in editor
83
- */
84
- public static get pasteConfig(): PasteConfig {
85
- return {
86
- tags: ['OL', 'UL', 'LI'],
87
- };
88
- }
89
-
90
- /**
91
- * Convert from text to list with import and export list to text
92
- */
93
- public static get conversionConfig(): {
94
- /**
95
- * Method that is responsible for conversion from data to string
96
- * @param data - current list data
97
- * @returns - contents string formed from list data
98
- */
99
- export: (data: ListData) => string;
100
-
101
- /**
102
- * Method that is responsible for conversion from string to data
103
- * @param content - contents string
104
- * @returns - list data formed from contents string
105
- */
106
- import: (content: string, config: ToolConfig<ListConfig>) => ListData;
107
- } {
108
- return {
109
- export: (data) => {
110
- return EditorjsList.joinRecursive(data);
111
- },
112
- import: (content, config) => {
113
- return {
114
- meta: {},
115
- items: [
116
- {
117
- content,
118
- meta: {},
119
- items: [],
120
- },
121
- ],
122
- style: config?.defaultStyle !== undefined ? config.defaultStyle : 'unordered',
123
- };
124
- },
125
- };
126
- }
127
-
128
- /**
129
- * Get list style name
130
- */
131
- private get listStyle(): ListDataStyle {
132
- return this.data.style || this.defaultListStyle;
133
- }
134
-
135
- /**
136
- * Set list style
137
- * @param style - new style to set
138
- */
139
- private set listStyle(style: ListDataStyle) {
140
- this.data.style = style;
141
-
142
- this.changeTabulatorByStyle();
143
-
144
- /**
145
- * Create new list element
146
- */
147
- const newListElement = this.list!.render();
148
-
149
- this.listElement?.replaceWith(newListElement);
150
-
151
- this.listElement = newListElement;
152
- }
153
-
154
- /**
155
- * The Editor.js API
156
- */
157
- private api: API;
158
-
159
- /**
160
- * Is Ediotrjs List Tool read-only
161
- */
162
- private readOnly: boolean;
163
-
164
- /**
165
- * Tool's configuration
166
- */
167
- private config: ListConfig | undefined;
168
-
169
- /**
170
- * Default list style formes as passed default list style from config or 'ordered' as default
171
- */
172
- private defaultListStyle?: ListConfig['defaultStyle'];
173
-
174
- /**
175
- * Default Counter type of the ordered list
176
- */
177
- private defaultCounterTypes: OlCounterType[];
178
-
179
- /**
180
- * Tool's data
181
- */
182
- private data: ListData;
183
-
184
- /**
185
- * Editor block api
186
- */
187
- private block: BlockAPI;
188
-
189
- /**
190
- * Class that is responsible for complete list rendering and saving
191
- */
192
- private list: ListTabulator<ListRenderer> | undefined;
193
-
194
- /**
195
- * Main constant wrapper of the whole list
196
- */
197
- private listElement: HTMLElement | undefined;
198
-
199
- /**
200
- * Render plugin`s main Element and fill it with saved data
201
- * @param params - tool constructor options
202
- * @param params.data - previously saved data
203
- * @param params.config - user config for Tool
204
- * @param params.api - Editor.js API
205
- * @param params.readOnly - read-only mode flag
206
- */
207
- constructor({ data, config, api, readOnly, block }: ListParams) {
208
- this.api = api;
209
- this.readOnly = readOnly;
210
- this.config = config;
211
- this.block = block;
212
-
213
- /**
214
- * Set the default list style from the config or presetted 'unordered'.
215
- */
216
- this.defaultListStyle = this.config?.defaultStyle || 'unordered';
217
-
218
- /**
219
- * Set the default counter types for the ordered list
220
- */
221
- this.defaultCounterTypes = (this.config as ListConfig).counterTypes || Array.from(OlCounterTypesMap.values()) as OlCounterType[];
222
-
223
- const initialData = {
224
- style: this.defaultListStyle,
225
- meta: {},
226
- items: [],
227
- };
228
-
229
- this.data = Object.keys(data).length ? normalizeData(data) : initialData;
230
-
231
- /**
232
- * Assign default value of the property for the ordered list
233
- */
234
- if (this.listStyle === 'ordered' && (this.data.meta as OrderedListItemMeta).counterType === undefined) {
235
- (this.data.meta as OrderedListItemMeta).counterType = 'numeric';
236
- }
237
-
238
- this.changeTabulatorByStyle();
239
- }
240
-
241
- /**
242
- * Convert from list to text for conversionConfig
243
- * @param data - current data of the list
244
- * @returns - string of the recursively merged contents of the items of the list
245
- */
246
- private static joinRecursive(data: ListData | ListItem): string {
247
- return data.items
248
- .map(item => `${item.content} ${EditorjsList.joinRecursive(item)}`)
249
- .join('');
250
- }
251
-
252
- /**
253
- * Function that is responsible for content rendering
254
- * @returns rendered list wrapper with all contents
255
- */
256
- public render(): HTMLElement {
257
- this.listElement = this.list!.render();
258
-
259
- return this.listElement;
260
- }
261
-
262
- /**
263
- * Function that is responsible for content saving
264
- * @returns formatted content used in editor
265
- */
266
- public save(): ListData {
267
- this.data = this.list!.save();
268
-
269
- return this.data;
270
- }
271
-
272
- /**
273
- * Function that is responsible for mergind two lists into one
274
- * @param data - data of the next standing list, that should be merged with current
275
- */
276
- public merge(data: ListData): void {
277
- this.list!.merge(data);
278
- }
279
-
280
- /**
281
- * Creates Block Tune allowing to change the list style
282
- * @returns array of tune configs
283
- */
284
- public renderSettings(): MenuConfigItem[] {
285
- const defaultTunes: MenuConfigItem[] = [
286
- {
287
- label: this.api.i18n.t('Unordered'),
288
- icon: IconListBulleted,
289
- closeOnActivate: true,
290
- isActive: this.listStyle == 'unordered',
291
- onActivate: () => {
292
- this.listStyle = 'unordered';
293
- },
294
- },
295
- {
296
- label: this.api.i18n.t('Ordered'),
297
- icon: IconListNumbered,
298
- closeOnActivate: true,
299
- isActive: this.listStyle == 'ordered',
300
- onActivate: () => {
301
- this.listStyle = 'ordered';
302
- },
303
- },
304
- {
305
- label: this.api.i18n.t('Checklist'),
306
- icon: IconChecklist,
307
- closeOnActivate: true,
308
- isActive: this.listStyle == 'checklist',
309
- onActivate: () => {
310
- this.listStyle = 'checklist';
311
- },
312
- },
313
- ];
314
-
315
- if (this.listStyle === 'ordered') {
316
- const startWithElement = renderToolboxInput(
317
- (index: string) => this.changeStartWith(Number(index)),
318
- {
319
- value: String((this.data.meta as OrderedListItemMeta).start ?? 1),
320
- placeholder: '',
321
- attributes: {
322
- required: 'true',
323
- },
324
- sanitize: input => stripNumbers(input),
325
- });
326
-
327
- const orderedListTunes: MenuConfigItem[] = [
328
- {
329
- label: this.api.i18n.t('Start with'),
330
- icon: IconStartWith,
331
- children: {
332
- items: [
333
- {
334
- element: startWithElement,
335
- // @ts-expect-error ts(2820) can not use PopoverItem enum from editor.js types
336
- type: 'html',
337
- },
338
- ],
339
- },
340
- },
341
- ];
342
-
343
- const orderedListCountersTunes: MenuConfigItem = {
344
- label: this.api.i18n.t('Counter type'),
345
- icon: OlCounterIconsMap.get((this.data.meta as OrderedListItemMeta).counterType!),
346
- children: {
347
- items: [],
348
- },
349
- };
350
-
351
- /**
352
- * For each counter type in OlCounterType create toolbox item
353
- */
354
- OlCounterTypesMap.forEach((_, counterType: string) => {
355
- const counterTypeValue = OlCounterTypesMap.get(counterType)! as OlCounterType;
356
-
357
- if (!this.defaultCounterTypes.includes(counterTypeValue)) {
358
- return;
359
- }
360
-
361
- orderedListCountersTunes.children.items!.push({
362
- title: this.api.i18n.t(counterType),
363
- icon: OlCounterIconsMap.get(counterTypeValue),
364
- isActive: (this.data.meta as OrderedListItemMeta).counterType === OlCounterTypesMap.get(counterType),
365
- closeOnActivate: true,
366
- onActivate: () => {
367
- this.changeCounters(OlCounterTypesMap.get(counterType) as OlCounterType);
368
- },
369
- });
370
- });
371
-
372
- /**
373
- * Dont show Counter type tune if there is no valid counter types
374
- */
375
- if (orderedListCountersTunes.children.items!.length > 1) {
376
- orderedListTunes.push(orderedListCountersTunes);
377
- }
378
-
379
- // @ts-expect-error ts(2820) can not use PopoverItem enum from editor.js types
380
- defaultTunes.push({ type: 'separator' }, ...orderedListTunes);
381
- }
382
-
383
- return defaultTunes;
384
- }
385
-
386
- /**
387
- * On paste callback that is fired from Editor.
388
- * @param event - event with pasted data
389
- */
390
- public onPaste(event: PasteEvent): void {
391
- const { tagName: tag } = event.detail.data;
392
-
393
- switch (tag) {
394
- case 'OL':
395
- this.listStyle = 'ordered';
396
- break;
397
- case 'UL':
398
- case 'LI':
399
- this.listStyle = 'unordered';
400
- }
401
-
402
- this.list!.onPaste(event);
403
- }
404
-
405
- /**
406
- * Handle UL, OL and LI tags paste and returns List data
407
- * @param element - html element that contains whole list
408
- */
409
- public pasteHandler(element: PasteEvent['detail']['data']): ListData {
410
- const data = this.list!.pasteHandler(element);
411
-
412
- return data;
413
- }
414
-
415
- /**
416
- * Changes ordered list counterType property value
417
- * @param counterType - new value of the counterType value
418
- */
419
- private changeCounters(counterType: OlCounterType): void {
420
- this.list?.changeCounters(counterType);
421
-
422
- (this.data.meta as OrderedListItemMeta).counterType = counterType;
423
- }
424
-
425
- /**
426
- * Changes ordered list start property value
427
- * @param index - new value of the start property
428
- */
429
- private changeStartWith(index: number): void {
430
- this.list?.changeStartWith(index);
431
-
432
- (this.data.meta as OrderedListItemMeta).start = index;
433
- }
434
-
435
- /**
436
- * This method allows changing tabulator respectfully to passed style
437
- */
438
- private changeTabulatorByStyle(): void {
439
- switch (this.listStyle) {
440
- case 'ordered':
441
- this.list = new ListTabulator<OrderedListRenderer>({
442
- data: this.data,
443
- readOnly: this.readOnly,
444
- api: this.api,
445
- config: this.config,
446
- block: this.block,
447
- },
448
- new OrderedListRenderer(this.readOnly, this.config)
449
- );
450
-
451
- break;
452
-
453
- case 'unordered':
454
- this.list = new ListTabulator<UnorderedListRenderer>({
455
- data: this.data,
456
- readOnly: this.readOnly,
457
- api: this.api,
458
- config: this.config,
459
- block: this.block,
460
- },
461
- new UnorderedListRenderer(this.readOnly, this.config)
462
- );
463
-
464
- break;
465
-
466
- case 'checklist':
467
- this.list = new ListTabulator<CheckListRenderer>({
468
- data: this.data,
469
- readOnly: this.readOnly,
470
- api: this.api,
471
- config: this.config,
472
- block: this.block,
473
- },
474
- new CheckListRenderer(this.readOnly, this.config)
475
- );
476
-
477
- break;
478
- }
479
- }
480
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * Default css prefix for list
3
- */
4
- export const CssPrefix = 'cdx-list';
@@ -1,36 +0,0 @@
1
- .cdx-list-start-with-field {
2
- background: #F8F8F8;
3
- border: 1px solid rgba(226,226,229,0.20);
4
- border-radius: 6px;
5
- padding: 2px;
6
- display: grid;
7
- grid-template-columns: auto auto 1fr;
8
- grid-template-rows: auto;
9
- }
10
-
11
- .cdx-list-start-with-field--invalid {
12
- background: #FFECED;
13
- border: 1px solid #E13F3F;
14
- }
15
-
16
- .cdx-list-start-with-field--invalid .cdx-list-start-with-field__input {
17
- color: #E13F3F;
18
- }
19
-
20
- .cdx-list-start-with-field__input {
21
- font-size: 14px;
22
- outline: none;
23
- font-weight: 500;
24
- font-family: inherit;
25
- border: 0;
26
- background: transparent;
27
- margin: 0;
28
- padding: 0;
29
- line-height: 22px;
30
- min-width: calc(100% - var(--toolbox-buttons-size) - var(--icon-margin-right));
31
- }
32
-
33
- .cdx-list-start-with-field__input::placeholder {
34
- color: var(--grayText);
35
- font-weight: 500;
36
- }
@@ -1,165 +0,0 @@
1
- .cdx-list {
2
- margin: 0;
3
- padding: 0;
4
- outline: none;
5
- display: grid;
6
- counter-reset: item;
7
- gap: var(--spacing-s);
8
- padding: var(--spacing-xs);
9
- --spacing-s: 8px;
10
- --spacing-xs: 6px;
11
- --list-counter-type: numeric;
12
- --radius-border: 5px;
13
- --checkbox-background: #fff;
14
- --color-border: #C9C9C9;
15
- --color-bg-checked: #369FFF;
16
- --line-height: 1.45em;
17
- --color-bg-checked-hover: #0059AB;
18
- --color-tick: #fff;
19
- --size-checkbox: 1.2em;
20
- }
21
- .cdx-list ol{
22
- padding-inline-start:0;
23
- }
24
-
25
- .cdx-list__item {
26
- line-height: var(--line-height);
27
- display: grid;
28
- grid-template-columns: auto 1fr;
29
- grid-template-rows: auto auto;
30
- grid-template-areas:
31
- "checkbox content"
32
- ". child";
33
- }
34
-
35
- .cdx-list__item-children {
36
- display: grid;
37
- grid-area: child;
38
- gap: var(--spacing-s);
39
- padding-top: var(--spacing-s);
40
- }
41
-
42
- .cdx-list__item [contenteditable]{
43
- outline: none;
44
- }
45
-
46
- .cdx-list__item-content {
47
- word-break: break-word;
48
- white-space: pre-wrap;
49
- grid-area: content;
50
- padding-left: var(--spacing-s);
51
- }
52
-
53
- .cdx-list__item::before {
54
- counter-increment: item;
55
-
56
- white-space: nowrap;
57
- }
58
-
59
- .cdx-list-ordered .cdx-list__item::before {
60
- content: counters(item, ".", var(--list-counter-type)) ".";
61
- }
62
-
63
- .cdx-list-ordered {
64
- counter-reset: item;
65
- }
66
- .cdx-list-unordered{
67
- padding-inline-start:0;
68
- }
69
- .cdx-list-unordered .cdx-list__item::before {
70
- content: "•";
71
- }
72
-
73
- .cdx-list-checklist .cdx-list__item::before {
74
- content: "";
75
- }
76
-
77
- .cdx-list__settings .cdx-settings-button {
78
- width: 50%;
79
- }
80
-
81
- .cdx-list__checkbox {
82
- padding-top: calc((var(--line-height) - var(--size-checkbox)) / 2);
83
- grid-area: checkbox;
84
- width: var(--size-checkbox);
85
- height: var(--size-checkbox);
86
- display: flex;
87
- cursor: pointer;
88
- }
89
-
90
- .cdx-list__checkbox svg {
91
- opacity: 0;
92
- height: var(--size-checkbox);
93
- width: var(--size-checkbox);
94
- left: -1px;
95
- top: -1px;
96
- position: absolute;
97
- }
98
-
99
- @media (hover: hover) {
100
- .cdx-list__checkbox:not(.cdx-list__checkbox--no-hover):hover .cdx-list__checkbox-check svg {
101
- opacity: 1;
102
- }
103
- }
104
-
105
- .cdx-list__checkbox--checked {
106
- line-height: var(--line-height);
107
- }
108
-
109
- @media (hover: hover) {
110
- .cdx-list__checkbox--checked:not(.cdx-list__checkbox--checked--no-hover):hover .cdx-checklist__checkbox-check {
111
- background: var(--color-bg-checked-hover);
112
- border-color: var(--color-bg-checked-hover);
113
- }
114
- }
115
-
116
- .cdx-list__checkbox--checked .cdx-list__checkbox-check {
117
- background: var(--color-bg-checked);
118
- border-color: var(--color-bg-checked);
119
- }
120
-
121
- .cdx-list__checkbox--checked .cdx-list__checkbox-check svg {
122
- opacity: 1;
123
- }
124
-
125
- .cdx-list__checkbox--checked .cdx-list__checkbox-check svg path {
126
- stroke: var(--color-tick);
127
- }
128
-
129
- .cdx-list__checkbox--checked .cdx-list__checkbox-check::before {
130
- opacity: 0;
131
- visibility: visible;
132
- transform: scale(2.5);
133
- }
134
-
135
- .cdx-list__checkbox-check {
136
- cursor: pointer;
137
- display: inline-block;
138
- position: relative;
139
- margin: 0 auto;
140
- width: var(--size-checkbox);
141
- height: var(--size-checkbox);
142
- box-sizing: border-box;
143
- border-radius: var(--radius-border);
144
- border: 1px solid var(--color-border);
145
- background: var(--checkbox-background);
146
- }
147
-
148
- .cdx-list__checkbox-check::before {
149
- content: '';
150
- position: absolute;
151
- top: 0;
152
- right: 0;
153
- bottom: 0;
154
- left: 0;
155
- border-radius: 100%;
156
- background-color: var(--color-bg-checked);
157
- visibility: hidden;
158
- pointer-events: none;
159
- transform: scale(1);
160
- transition: transform 400ms ease-out, opacity 400ms;
161
- }
162
-
163
- .cdx-list__checkbox-check--disabled {
164
- pointer-events: none;
165
- }
@@ -1,14 +0,0 @@
1
- /**
2
- * Type that represents the list item
3
- */
4
- export type ItemElement = HTMLElement;
5
-
6
- /**
7
- * Type that represents children wrapper of the list item
8
- */
9
- export type ItemChildWrapperElement = HTMLElement;
10
-
11
- /**
12
- * Type that represents content element of the item
13
- */
14
- export type ItemContentElement = HTMLElement;