@limetech/lime-elements 38.31.0 → 38.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/lime-elements.cjs.js +1 -1
- package/dist/cjs/limel-action-bar_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-ai-avatar.cjs.entry.js +1 -1
- package/dist/cjs/limel-callout.cjs.entry.js +1 -1
- package/dist/cjs/limel-chart.cjs.entry.js +1 -1
- package/dist/cjs/limel-chip_2.cjs.entry.js +1 -1
- package/dist/cjs/limel-collapsible-section.cjs.entry.js +2 -2
- package/dist/cjs/limel-collapsible-section.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-drag-handle.cjs.entry.js +34 -0
- package/dist/cjs/limel-drag-handle.cjs.entry.js.map +1 -0
- package/dist/cjs/limel-file-viewer.cjs.entry.js +1 -1
- package/dist/cjs/limel-file.cjs.entry.js +1 -1
- package/dist/cjs/limel-flatpickr-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-form.cjs.entry.js +3220 -305
- package/dist/cjs/limel-form.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limel-info-tile.cjs.entry.js.map +1 -1
- package/dist/cjs/limel-linear-progress.cjs.entry.js +1 -1
- package/dist/cjs/limel-list-item.cjs.entry.js +1 -1
- package/dist/cjs/limel-profile-picture.cjs.entry.js +1 -1
- package/dist/cjs/limel-prosemirror-adapter.cjs.entry.js +1 -1
- package/dist/cjs/limel-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/limel-table.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{translations-d2be6dd7.js → translations-a42886f2.js} +17 -1
- package/dist/cjs/translations-a42886f2.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/action-bar/action-bar-item/action-bar-item.css +3 -0
- package/dist/collection/components/action-bar/action-bar.css +3 -0
- package/dist/collection/components/badge/badge.css +3 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.css +3 -0
- package/dist/collection/components/button/button.css +3 -0
- package/dist/collection/components/button-group/button-group.css +3 -0
- package/dist/collection/components/card/card.css +3 -0
- package/dist/collection/components/chart/chart.css +6 -0
- package/dist/collection/components/checkbox/checkbox.css +3 -0
- package/dist/collection/components/chip/chip.css +3 -0
- package/dist/collection/components/chip-set/chip-set.css +6 -0
- package/dist/collection/components/circular-progress/circular-progress.css +3 -0
- package/dist/collection/components/code-editor/code-editor.css +3 -0
- package/dist/collection/components/collapsible-section/collapsible-section.css +17 -8
- package/dist/collection/components/color-picker/color-picker-palette.css +3 -0
- package/dist/collection/components/color-picker/color-picker.css +3 -0
- package/dist/collection/components/date-picker/flatpickr-adapter/flatpickr-adapter.css +3 -0
- package/dist/collection/components/dialog/dialog.css +3 -0
- package/dist/collection/components/dock/dock-button/dock-button.css +3 -0
- package/dist/collection/components/dock/dock.css +3 -0
- package/dist/collection/components/drag-handle/drag-handle.css +174 -0
- package/dist/collection/components/drag-handle/drag-handle.js +125 -0
- package/dist/collection/components/drag-handle/drag-handle.js.map +1 -0
- package/dist/collection/components/file/file.css +3 -0
- package/dist/collection/components/file-viewer/file-viewer.css +3 -0
- package/dist/collection/components/form/form.css +143 -14
- package/dist/collection/components/form/templates/array-field-collapsible-item.js +13 -16
- package/dist/collection/components/form/templates/array-field-collapsible-item.js.map +1 -1
- package/dist/collection/components/form/templates/array-field-simple-item.js +16 -49
- package/dist/collection/components/form/templates/array-field-simple-item.js.map +1 -1
- package/dist/collection/components/form/templates/array-field.js +306 -19
- package/dist/collection/components/form/templates/array-field.js.map +1 -1
- package/dist/collection/components/header/header.css +3 -0
- package/dist/collection/components/help/help.css +3 -0
- package/dist/collection/components/help/limel-help-content.css +3 -0
- package/dist/collection/components/icon-button/icon-button.css +3 -0
- package/dist/collection/components/info-tile/info-tile.css +3 -0
- package/dist/collection/components/input-field/input-field.css +3 -0
- package/dist/collection/components/list/list.css +6 -0
- package/dist/collection/components/list-item/list-item.css +3 -0
- package/dist/collection/components/list-item/menu-item-meta/menu-item-meta.css +3 -0
- package/dist/collection/components/markdown/markdown.css +3 -0
- package/dist/collection/components/menu-list/menu-list.css +6 -0
- package/dist/collection/components/notched-outline/notched-outline.css +3 -0
- package/dist/collection/components/popover-surface/popover-surface.css +3 -0
- package/dist/collection/components/profile-picture/profile-picture.css +3 -0
- package/dist/collection/components/progress-flow/progress-flow-item/progress-flow-item.css +3 -0
- package/dist/collection/components/radio-button-group/radio-button.css +3 -0
- package/dist/collection/components/select/select.css +6 -0
- package/dist/collection/components/shortcut/shortcut.css +3 -0
- package/dist/collection/components/slider/slider.css +3 -0
- package/dist/collection/components/split-button/split-button.css +3 -0
- package/dist/collection/components/switch/switch.css +3 -0
- package/dist/collection/components/tab-bar/tab-bar.css +3 -0
- package/dist/collection/components/table/table.css +12 -0
- package/dist/collection/components/text-editor/prosemirror-adapter/prosemirror-adapter.css +3 -0
- package/dist/collection/components/text-editor/text-editor.css +3 -0
- package/dist/collection/style/mixins.scss +53 -0
- package/dist/collection/translations/da.js +2 -0
- package/dist/collection/translations/da.js.map +1 -1
- package/dist/collection/translations/de.js +2 -0
- package/dist/collection/translations/de.js.map +1 -1
- package/dist/collection/translations/en.js +2 -0
- package/dist/collection/translations/en.js.map +1 -1
- package/dist/collection/translations/fi.js +2 -0
- package/dist/collection/translations/fi.js.map +1 -1
- package/dist/collection/translations/fr.js +2 -0
- package/dist/collection/translations/fr.js.map +1 -1
- package/dist/collection/translations/nl.js +2 -0
- package/dist/collection/translations/nl.js.map +1 -1
- package/dist/collection/translations/no.js +2 -0
- package/dist/collection/translations/no.js.map +1 -1
- package/dist/collection/translations/sv.js +2 -0
- package/dist/collection/translations/sv.js.map +1 -1
- package/dist/esm/lime-elements.js +1 -1
- package/dist/esm/limel-action-bar_2.entry.js +1 -1
- package/dist/esm/limel-ai-avatar.entry.js +1 -1
- package/dist/esm/limel-callout.entry.js +1 -1
- package/dist/esm/limel-chart.entry.js +1 -1
- package/dist/esm/limel-chip_2.entry.js +1 -1
- package/dist/esm/limel-collapsible-section.entry.js +2 -2
- package/dist/esm/limel-collapsible-section.entry.js.map +1 -1
- package/dist/esm/limel-drag-handle.entry.js +30 -0
- package/dist/esm/limel-drag-handle.entry.js.map +1 -0
- package/dist/esm/limel-file-viewer.entry.js +1 -1
- package/dist/esm/limel-file.entry.js +1 -1
- package/dist/esm/limel-flatpickr-adapter.entry.js +1 -1
- package/dist/esm/limel-form.entry.js +3214 -299
- package/dist/esm/limel-form.entry.js.map +1 -1
- package/dist/esm/limel-info-tile.entry.js +1 -1
- package/dist/esm/limel-info-tile.entry.js.map +1 -1
- package/dist/esm/limel-linear-progress.entry.js +1 -1
- package/dist/esm/limel-list-item.entry.js +1 -1
- package/dist/esm/limel-profile-picture.entry.js +1 -1
- package/dist/esm/limel-prosemirror-adapter.entry.js +1 -1
- package/dist/esm/limel-snackbar.entry.js +1 -1
- package/dist/esm/limel-table.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{translations-91c611da.js → translations-9bfde9f4.js} +17 -1
- package/dist/esm/translations-9bfde9f4.js.map +1 -0
- package/dist/lime-elements/lime-elements.esm.js +1 -1
- package/dist/lime-elements/lime-elements.esm.js.map +1 -1
- package/dist/lime-elements/p-309d0652.entry.js +2 -0
- package/dist/lime-elements/{p-e6245ef7.entry.js.map → p-309d0652.entry.js.map} +1 -1
- package/dist/lime-elements/p-31f1cb08.entry.js +2 -0
- package/dist/lime-elements/p-31f1cb08.entry.js.map +1 -0
- package/dist/lime-elements/{p-cc7f4c81.entry.js → p-3311eaf3.entry.js} +2 -2
- package/dist/lime-elements/{p-aeba4aa4.entry.js → p-40542ccc.entry.js} +2 -2
- package/dist/lime-elements/{p-d349e355.entry.js → p-42e889d8.entry.js} +2 -2
- package/dist/lime-elements/p-5df2361b.js +2 -0
- package/dist/lime-elements/p-5df2361b.js.map +1 -0
- package/dist/lime-elements/{p-b5abf284.entry.js → p-5e976a59.entry.js} +2 -2
- package/dist/lime-elements/{p-6c60172e.entry.js → p-787be044.entry.js} +2 -2
- package/dist/lime-elements/p-8ea3b80a.entry.js +2 -0
- package/dist/lime-elements/p-8ea3b80a.entry.js.map +1 -0
- package/dist/lime-elements/{p-d1aa44e1.entry.js → p-92aa9610.entry.js} +2 -2
- package/dist/lime-elements/{p-8e3c4418.entry.js → p-aa1e7319.entry.js} +2 -2
- package/dist/lime-elements/p-ae267255.entry.js +27 -0
- package/dist/lime-elements/p-ae267255.entry.js.map +1 -0
- package/dist/lime-elements/{p-ed04acfc.entry.js → p-b0acf522.entry.js} +2 -2
- package/dist/lime-elements/{p-f83ebd28.entry.js → p-b7bbb6a5.entry.js} +2 -2
- package/dist/lime-elements/{p-eb396630.entry.js → p-cd2f780a.entry.js} +2 -2
- package/dist/lime-elements/{p-aae161ef.entry.js → p-d79c85e2.entry.js} +2 -2
- package/dist/lime-elements/{p-1b036add.entry.js → p-e00465fa.entry.js} +2 -2
- package/dist/lime-elements/{p-29c2cdc6.entry.js → p-ee5c4112.entry.js} +2 -2
- package/dist/lime-elements/{p-e6bb4d1a.entry.js → p-fbac230b.entry.js} +2 -2
- package/dist/lime-elements/style/mixins.scss +53 -0
- package/dist/scss/mixins.scss +53 -0
- package/dist/types/components/drag-handle/drag-handle.d.ts +46 -0
- package/dist/types/components/form/templates/array-field-collapsible-item.d.ts +3 -1
- package/dist/types/components/form/templates/array-field-simple-item.d.ts +5 -9
- package/dist/types/components/form/templates/array-field.d.ts +35 -4
- package/dist/types/components.d.ts +113 -0
- package/dist/types/translations/da.d.ts +2 -0
- package/dist/types/translations/de.d.ts +2 -0
- package/dist/types/translations/en.d.ts +2 -0
- package/dist/types/translations/fi.d.ts +2 -0
- package/dist/types/translations/fr.d.ts +2 -0
- package/dist/types/translations/nl.d.ts +2 -0
- package/dist/types/translations/no.d.ts +2 -0
- package/dist/types/translations/sv.d.ts +2 -0
- package/package.json +5 -2
- package/dist/cjs/translations-d2be6dd7.js.map +0 -1
- package/dist/esm/translations-91c611da.js.map +0 -1
- package/dist/lime-elements/p-4c88e5d3.js +0 -2
- package/dist/lime-elements/p-4c88e5d3.js.map +0 -1
- package/dist/lime-elements/p-d6d66daa.entry.js +0 -21
- package/dist/lime-elements/p-d6d66daa.entry.js.map +0 -1
- package/dist/lime-elements/p-e6245ef7.entry.js +0 -2
- package/dist/lime-elements/p-ed8aa16c.entry.js +0 -2
- package/dist/lime-elements/p-ed8aa16c.entry.js.map +0 -1
- /package/dist/lime-elements/{p-cc7f4c81.entry.js.map → p-3311eaf3.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-aeba4aa4.entry.js.map → p-40542ccc.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-d349e355.entry.js.map → p-42e889d8.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-b5abf284.entry.js.map → p-5e976a59.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-6c60172e.entry.js.map → p-787be044.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-d1aa44e1.entry.js.map → p-92aa9610.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-8e3c4418.entry.js.map → p-aa1e7319.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-ed04acfc.entry.js.map → p-b0acf522.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-f83ebd28.entry.js.map → p-b7bbb6a5.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-eb396630.entry.js.map → p-cd2f780a.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-aae161ef.entry.js.map → p-d79c85e2.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-1b036add.entry.js.map → p-e00465fa.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-29c2cdc6.entry.js.map → p-ee5c4112.entry.js.map} +0 -0
- /package/dist/lime-elements/{p-e6bb4d1a.entry.js.map → p-fbac230b.entry.js.map} +0 -0
|
@@ -1,4 +1,91 @@
|
|
|
1
1
|
@charset "UTF-8";
|
|
2
|
+
/**
|
|
3
|
+
* Note! This file is exported to `dist/scss/` in the published
|
|
4
|
+
* node module, for consumer projects to import.
|
|
5
|
+
* That means this file cannot import from any file that isn't
|
|
6
|
+
* also exported, keeping the same relative path.
|
|
7
|
+
*
|
|
8
|
+
* Or, just don't import anything, that works too.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* This can be used on a trigger element that opens a dropdown menu or a popover.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* This mixin will mask out the content that is close to
|
|
15
|
+
* the edges of a scrollable area.
|
|
16
|
+
* - If the scrollable content has `overflow-y`, use `vertically`
|
|
17
|
+
* as an argument for `$direction`.
|
|
18
|
+
- If the scrollable content has `overflow-x`, use `horizontally`
|
|
19
|
+
* as an argument for `$direction`.
|
|
20
|
+
*
|
|
21
|
+
* For the visual effect to work smoothly, we need to make sure that
|
|
22
|
+
* the size of the fade-out edge effect is the same as the
|
|
23
|
+
* internal paddings of the scrollable area. Otherwise, content of a
|
|
24
|
+
* scrollable area that does not have a padding will fade out before
|
|
25
|
+
* any scrolling has been done.
|
|
26
|
+
* This is why this mixin already adds paddings, which automatically
|
|
27
|
+
* default to the size of the fade-out effect.
|
|
28
|
+
* This size defaults to `1rem`, but to override the size use
|
|
29
|
+
* `--limel-top-edge-fade-height` & `--limel-bottom-edge-fade-height`
|
|
30
|
+
* when `vertically` argument is set, and use
|
|
31
|
+
* `--limel-left-edge-fade-width` & `--limel-right-edge-fade-width`
|
|
32
|
+
* when `horizontally` argument is set.
|
|
33
|
+
* Of course you can also programmatically increase and decrease the
|
|
34
|
+
* size of these variables for each edge, based on the amount of
|
|
35
|
+
* scrolling that has been done by the user. In this case, make sure
|
|
36
|
+
* to add a custom padding where the mixin is used, to override
|
|
37
|
+
* the paddings that are automatically added by the mixin in the
|
|
38
|
+
* compiled CSS code.
|
|
39
|
+
*/
|
|
40
|
+
/**
|
|
41
|
+
* This mixin will add an animated underline to the bottom of an `a` elements.
|
|
42
|
+
* Note that you may need to add `all: unset;` –depending on your use case–
|
|
43
|
+
* before using this mixin.
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* This mixin creates a cross-browser font stack.
|
|
47
|
+
* - `sans-serif` can be used for the UI of the components.
|
|
48
|
+
* - `monospace` can be used for code.
|
|
49
|
+
*
|
|
50
|
+
* ⚠️ If we change the font stacks, we need to update
|
|
51
|
+
* 1. the consumer documentation in `README.md`, and
|
|
52
|
+
* 2. the CSS variables of `--kompendium-example-font-family`
|
|
53
|
+
* in the `<style>` tag of `index.html`.
|
|
54
|
+
*/
|
|
55
|
+
/**
|
|
56
|
+
* This mixin is a hack, using old CSS syntax
|
|
57
|
+
* to enable you to truncate a piece of text,
|
|
58
|
+
* after a certain number of lines.
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* This mixin will add a chessboard background pattern,
|
|
62
|
+
* typically used to visualize transparency.
|
|
63
|
+
*/
|
|
64
|
+
/**
|
|
65
|
+
* Make a container resizable by the user.
|
|
66
|
+
* This is used in the documentations and examples
|
|
67
|
+
* of some components, to demonstrate how the component
|
|
68
|
+
* behaves in a resizable container.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Drag to reorder mixins
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* The breakpoints below are used to create responsive designs
|
|
75
|
+
* in Lime's products. Therefore, they are here to get distributed
|
|
76
|
+
* to all components in other private repos, which rely on this `mixins`
|
|
77
|
+
* file, to create consistent styles.
|
|
78
|
+
*
|
|
79
|
+
* :::important
|
|
80
|
+
* In very rare cases you should used media queries!
|
|
81
|
+
* Nowadays, there are many better ways of achieving responsive design
|
|
82
|
+
* without media queries. For example, using CSS Grid, Flexbox, and their features.
|
|
83
|
+
* :::
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* Media query mixins for responsive design based on screen width.
|
|
87
|
+
* Note that these mixins do not detect the device type!
|
|
88
|
+
*/
|
|
2
89
|
/*
|
|
3
90
|
* This file is imported into every component!
|
|
4
91
|
*
|
|
@@ -13,6 +100,12 @@
|
|
|
13
100
|
* @prop --form-background-color-of-even-rows: Background of even rows in the form, when layout type is `row`. Defaults to `transparent`.
|
|
14
101
|
* @prop --form-background-color-of-odd-rows:Background of odd rows in the form, when layout type is `row`. Defaults to `--contrast-200`.
|
|
15
102
|
*/
|
|
103
|
+
*,
|
|
104
|
+
*::after,
|
|
105
|
+
*::before {
|
|
106
|
+
box-sizing: border-box;
|
|
107
|
+
}
|
|
108
|
+
|
|
16
109
|
.form-group {
|
|
17
110
|
min-width: 0;
|
|
18
111
|
}
|
|
@@ -20,18 +113,58 @@
|
|
|
20
113
|
.limel-form-array-item--simple {
|
|
21
114
|
display: flex;
|
|
22
115
|
align-items: center;
|
|
23
|
-
padding
|
|
116
|
+
padding: 0.25rem;
|
|
24
117
|
}
|
|
25
|
-
.limel-form-array-item--simple *:first-child {
|
|
26
|
-
flex
|
|
118
|
+
.limel-form-array-item--simple > *:first-child {
|
|
119
|
+
flex: 1;
|
|
120
|
+
min-width: 0;
|
|
27
121
|
}
|
|
28
122
|
|
|
29
|
-
|
|
30
|
-
|
|
123
|
+
.array-items {
|
|
124
|
+
isolation: isolate;
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-direction: column;
|
|
127
|
+
row-gap: var(--form-row-gap, 0.5rem);
|
|
128
|
+
margin-top: 1rem;
|
|
129
|
+
}
|
|
130
|
+
.array-items.has-an-item-which-is-being-dragged limel-collapsible-section {
|
|
131
|
+
--limel-cs-grid-template-rows: 0fr;
|
|
132
|
+
--limel-cs-opacity-transition-speed: 0.2s;
|
|
133
|
+
--limel-cs-grid-template-rows-transition-speed: 0.2s;
|
|
134
|
+
--limel-cs-open-header-bottom-border-radius: 0.75rem;
|
|
31
135
|
}
|
|
32
136
|
|
|
33
|
-
.limel-
|
|
34
|
-
|
|
137
|
+
.array-item:has(limel-drag-handle:hover), .array-item:has(limel-drag-handle:focus-within), .array-item.is-elevated, .array-item.sortable-chosen {
|
|
138
|
+
will-change: transform, box-shadow, border-radius, background-color;
|
|
139
|
+
}
|
|
140
|
+
.array-item.sortable-ghost {
|
|
141
|
+
border-radius: 0.5rem;
|
|
142
|
+
box-shadow: var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3);
|
|
143
|
+
}
|
|
144
|
+
.array-item.sortable-chosen {
|
|
145
|
+
border-radius: 0.5rem;
|
|
146
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
147
|
+
}
|
|
148
|
+
.array-item.is-elevated[draggable=false] {
|
|
149
|
+
animation: sit-here 0.8s forwards;
|
|
150
|
+
}
|
|
151
|
+
@keyframes sit-here {
|
|
152
|
+
0% {
|
|
153
|
+
border-radius: 0.5rem;
|
|
154
|
+
background-color: var(--lime-elevated-surface-background-color);
|
|
155
|
+
box-shadow: var(--shadow-depth-64), 0 0.65rem 0.75rem -0.425rem rgb(var(--color-black), 0.3);
|
|
156
|
+
}
|
|
157
|
+
100% {
|
|
158
|
+
box-shadow: none;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
limel-drag-handle {
|
|
163
|
+
order: 10;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
limel-collapsible-section.is-being-dragged {
|
|
167
|
+
border-radius: 0.75rem !important;
|
|
35
168
|
}
|
|
36
169
|
|
|
37
170
|
.limel-form-layout--default {
|
|
@@ -157,13 +290,6 @@ p {
|
|
|
157
290
|
font-size: var(--limel-theme-default-font-size);
|
|
158
291
|
}
|
|
159
292
|
|
|
160
|
-
p + limel-collapsible-section,
|
|
161
|
-
p + .limel-form-array-item--simple,
|
|
162
|
-
h1 + limel-collapsible-section,
|
|
163
|
-
h1 + .limel-form-array-item--simple {
|
|
164
|
-
margin-top: 1rem;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
293
|
.form-group {
|
|
168
294
|
position: relative;
|
|
169
295
|
}
|
|
@@ -292,6 +418,9 @@ h1 + .limel-form-array-item--simple {
|
|
|
292
418
|
* of some components, to demonstrate how the component
|
|
293
419
|
* behaves in a resizable container.
|
|
294
420
|
*/
|
|
421
|
+
/**
|
|
422
|
+
* Drag to reorder mixins
|
|
423
|
+
*/
|
|
295
424
|
/**
|
|
296
425
|
* The breakpoints below are used to create responsive designs
|
|
297
426
|
* in Lime's products. Therefore, they are here to get distributed
|
|
@@ -39,31 +39,28 @@ export class CollapsibleItemTemplate extends React.Component {
|
|
|
39
39
|
if (this.state.isOpen) {
|
|
40
40
|
children = this.props.item.children;
|
|
41
41
|
}
|
|
42
|
+
const dragHandle = this.props.allowItemReorder
|
|
43
|
+
? React.createElement('limel-drag-handle', {
|
|
44
|
+
slot: 'header',
|
|
45
|
+
class: 'drag-handle',
|
|
46
|
+
})
|
|
47
|
+
: null;
|
|
42
48
|
return React.createElement('limel-collapsible-section', {
|
|
43
49
|
header: findTitle(data, schema, formSchema) || 'New item',
|
|
44
|
-
class: 'limel-form-array-item--object',
|
|
50
|
+
class: 'array-item limel-form-array-item--object',
|
|
45
51
|
ref: (section) => {
|
|
46
52
|
this.section = section;
|
|
47
53
|
},
|
|
48
54
|
'is-open': this.state.isOpen,
|
|
49
|
-
|
|
55
|
+
'data-reorder-id': String(this.props.index),
|
|
56
|
+
'data-reorderable': this.props.allowItemReorder
|
|
57
|
+
? 'true'
|
|
58
|
+
: 'false',
|
|
59
|
+
}, dragHandle, children);
|
|
50
60
|
}
|
|
51
61
|
setActions(element) {
|
|
52
|
-
const { item, index, allowItemRemoval
|
|
62
|
+
const { item, index, allowItemRemoval } = this.props;
|
|
53
63
|
const actions = [];
|
|
54
|
-
if (allowItemReorder) {
|
|
55
|
-
actions.push({
|
|
56
|
-
id: 'down',
|
|
57
|
-
icon: 'down_arrow',
|
|
58
|
-
disabled: !item.hasMoveDown,
|
|
59
|
-
run: item.onReorderClick(index, index + 1),
|
|
60
|
-
}, {
|
|
61
|
-
id: 'up',
|
|
62
|
-
icon: 'up_arrow',
|
|
63
|
-
disabled: !item.hasMoveUp,
|
|
64
|
-
run: item.onReorderClick(index, index - 1),
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
64
|
if (allowItemRemoval) {
|
|
68
65
|
actions.push({
|
|
69
66
|
id: 'remove',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-field-collapsible-item.js","sourceRoot":"","sources":["../../../../src/components/form/templates/array-field-collapsible-item.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwCpC,MAAM,OAAO,uBAAwB,SAAQ,KAAK,CAAC,SAA+B;EAK9E,YAAmB,KAA2B;IAC1C,KAAK,CAAC,KAAK,CAAC,CAAC;IADE,UAAK,GAAL,KAAK,CAAsB;IAJ9C,UAAK,GAAG;MACJ,MAAM,EAAE,KAAK;KAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"array-field-collapsible-item.js","sourceRoot":"","sources":["../../../../src/components/form/templates/array-field-collapsible-item.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwCpC,MAAM,OAAO,uBAAwB,SAAQ,KAAK,CAAC,SAA+B;EAK9E,YAAmB,KAA2B;IAC1C,KAAK,CAAC,KAAK,CAAC,CAAC;IADE,UAAK,GAAL,KAAK,CAAsB;IAJ9C,UAAK,GAAG;MACJ,MAAM,EAAE,KAAK;KAChB,CAAC;IAsFM,eAAU,GAAG,GAAG,EAAE;MACtB,IAAI,CAAC,QAAQ,CAAC;QACV,MAAM,EAAE,IAAI;OACf,CAAC,CAAC;IACP,CAAC,CAAC;IAtFE,IAAI,CAAC,YAAY,GAAG,IAAI,CA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;KAChB;IAED,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;MACf,OAAO,IAAI,CAAC;KACf;IAED,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;EACvD,CAAC;CACJ","sourcesContent":["import { Action } from '../../collapsible-section/action';\nimport React from 'react';\nimport { findTitle } from './common';\nimport { ArrayFieldItem, Runnable } from './types';\nimport { isEmpty } from 'lodash-es';\nimport { JSONSchema7 } from 'json-schema';\n\ninterface CollapsibleItemProps {\n /**\n * Data from reach-jsonschema-form\n */\n item: ArrayFieldItem;\n\n /**\n * The index of the field in the array\n */\n index: number;\n\n /**\n * The value of the field\n */\n data: any;\n\n /**\n * Schema for the field\n */\n schema: JSONSchema7;\n\n /**\n * Schema for the entire form\n */\n formSchema: JSONSchema7;\n\n /**\n * Control whether items can be removed.\n */\n allowItemRemoval: boolean;\n\n /**\n * Whether this particular item can be reordered.\n */\n allowItemReorder: boolean;\n}\n\nexport class CollapsibleItemTemplate extends React.Component<CollapsibleItemProps> {\n state = {\n isOpen: false,\n };\n\n constructor(public props: CollapsibleItemProps) {\n super(props);\n this.handleAction = this.handleAction.bind(this);\n this.isDeepEmpty = this.isDeepEmpty.bind(this);\n\n this.state = {\n isOpen: this.isDeepEmpty(props.data),\n };\n }\n\n private section: HTMLLimelCollapsibleSectionElement;\n\n public componentDidMount() {\n const section = this.section;\n section.addEventListener('action', this.handleAction);\n section.addEventListener('open', this.handleOpen);\n\n this.setActions(section);\n }\n\n public componentDidUpdate() {\n this.setActions(this.section);\n }\n\n public componentWillUnmount() {\n const section = this.section;\n section.removeEventListener('action', this.handleAction);\n section.removeEventListener('open', this.handleOpen);\n }\n\n public render() {\n const { data, schema, formSchema } = this.props;\n let children: any;\n if (this.state.isOpen) {\n children = this.props.item.children;\n }\n\n const dragHandle = this.props.allowItemReorder\n ? React.createElement('limel-drag-handle', {\n slot: 'header',\n class: 'drag-handle',\n })\n : null;\n\n return React.createElement(\n 'limel-collapsible-section',\n {\n header: findTitle(data, schema, formSchema) || 'New item',\n class: 'array-item limel-form-array-item--object',\n ref: (section: HTMLLimelCollapsibleSectionElement) => {\n this.section = section;\n },\n 'is-open': this.state.isOpen,\n 'data-reorder-id': String(this.props.index),\n 'data-reorderable': this.props.allowItemReorder\n ? 'true'\n : 'false',\n },\n dragHandle,\n children\n );\n }\n\n private setActions(element: HTMLLimelCollapsibleSectionElement) {\n const { item, index, allowItemRemoval } = this.props;\n const actions: Array<Action & Runnable> = [];\n\n if (allowItemRemoval) {\n actions.push({\n id: 'remove',\n icon: 'trash',\n disabled: !item.hasRemove,\n run: item.onDropIndexClick(index),\n });\n }\n\n element.actions = actions;\n }\n\n private handleAction(event: CustomEvent<Action & Runnable>) {\n event.stopPropagation();\n event.detail.run(event);\n }\n\n private handleOpen = () => {\n this.setState({\n isOpen: true,\n });\n };\n\n private isDeepEmpty(data) {\n if (typeof data !== 'object') {\n return false;\n }\n\n if (isEmpty(data)) {\n return true;\n }\n\n return Object.values(data).every(this.isDeepEmpty);\n }\n}\n"]}
|
|
@@ -8,14 +8,6 @@ export class SimpleItemTemplate extends React.Component {
|
|
|
8
8
|
const { item, index } = this.props;
|
|
9
9
|
item.onDropIndexClick(index)(event);
|
|
10
10
|
};
|
|
11
|
-
this.handleMoveUp = (event) => {
|
|
12
|
-
const { item, index } = this.props;
|
|
13
|
-
item.onReorderClick(index, index - 1)(event);
|
|
14
|
-
};
|
|
15
|
-
this.handleMoveDown = (event) => {
|
|
16
|
-
const { item, index } = this.props;
|
|
17
|
-
item.onReorderClick(index, index + 1)(event);
|
|
18
|
-
};
|
|
19
11
|
this.setRemoveButton = (button) => {
|
|
20
12
|
if (this.removeButton) {
|
|
21
13
|
this.removeButton.removeEventListener('click', this.handleRemove);
|
|
@@ -25,39 +17,30 @@ export class SimpleItemTemplate extends React.Component {
|
|
|
25
17
|
this.removeButton.addEventListener('click', this.handleRemove);
|
|
26
18
|
}
|
|
27
19
|
};
|
|
28
|
-
this.setMoveUpButton = (button) => {
|
|
29
|
-
if (this.moveUpButton) {
|
|
30
|
-
this.moveUpButton.removeEventListener('click', this.handleMoveUp);
|
|
31
|
-
}
|
|
32
|
-
this.moveUpButton = button || undefined;
|
|
33
|
-
if (this.moveUpButton) {
|
|
34
|
-
this.moveUpButton.addEventListener('click', this.handleMoveUp);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
this.setMoveDownButton = (button) => {
|
|
38
|
-
if (this.moveDownButton) {
|
|
39
|
-
this.moveDownButton.removeEventListener('click', this.handleMoveDown);
|
|
40
|
-
}
|
|
41
|
-
this.moveDownButton = button || undefined;
|
|
42
|
-
if (this.moveDownButton) {
|
|
43
|
-
this.moveDownButton.addEventListener('click', this.handleMoveDown);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
20
|
}
|
|
47
21
|
componentWillUnmount() {
|
|
48
22
|
this.setRemoveButton(undefined);
|
|
49
|
-
this.setMoveUpButton(undefined);
|
|
50
|
-
this.setMoveDownButton(undefined);
|
|
51
23
|
}
|
|
52
24
|
render() {
|
|
53
|
-
const { item } = this.props;
|
|
25
|
+
const { item, allowItemReorder } = this.props;
|
|
54
26
|
return React.createElement('div', {
|
|
55
|
-
className: 'limel-form-array-item--simple',
|
|
56
|
-
|
|
57
|
-
?
|
|
58
|
-
|
|
27
|
+
className: 'array-item limel-form-array-item--simple',
|
|
28
|
+
'data-reorder-id': String(this.props.dataIndex),
|
|
29
|
+
'data-reorderable': allowItemReorder ? 'true' : 'false',
|
|
30
|
+
}, this.props.item.children, this.renderRemoveButton(item), this.renderDragHandle());
|
|
31
|
+
}
|
|
32
|
+
renderDragHandle() {
|
|
33
|
+
if (!this.props.allowItemReorder) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
return React.createElement('limel-drag-handle', {
|
|
37
|
+
class: 'drag-handle',
|
|
38
|
+
});
|
|
59
39
|
}
|
|
60
40
|
renderRemoveButton(item) {
|
|
41
|
+
if (!this.props.allowItemRemoval) {
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
61
44
|
const props = {
|
|
62
45
|
icon: 'trash',
|
|
63
46
|
disabled: !item.hasRemove,
|
|
@@ -65,21 +48,5 @@ export class SimpleItemTemplate extends React.Component {
|
|
|
65
48
|
};
|
|
66
49
|
return React.createElement(LIMEL_ICON_BUTTON, props);
|
|
67
50
|
}
|
|
68
|
-
renderMoveUpButton(item) {
|
|
69
|
-
const props = {
|
|
70
|
-
icon: 'up_arrow',
|
|
71
|
-
disabled: !item.hasMoveUp,
|
|
72
|
-
ref: this.setMoveUpButton,
|
|
73
|
-
};
|
|
74
|
-
return React.createElement(LIMEL_ICON_BUTTON, props);
|
|
75
|
-
}
|
|
76
|
-
renderMoveDownButton(item) {
|
|
77
|
-
const props = {
|
|
78
|
-
icon: 'down_arrow',
|
|
79
|
-
disabled: !item.hasMoveDown,
|
|
80
|
-
ref: this.setMoveDownButton,
|
|
81
|
-
};
|
|
82
|
-
return React.createElement(LIMEL_ICON_BUTTON, props);
|
|
83
|
-
}
|
|
84
51
|
}
|
|
85
52
|
//# sourceMappingURL=array-field-simple-item.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-field-simple-item.js","sourceRoot":"","sources":["../../../../src/components/form/templates/array-field-simple-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"array-field-simple-item.js","sourceRoot":"","sources":["../../../../src/components/form/templates/array-field-simple-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;AAE9C,MAAM,OAAO,kBAAmB,SAAQ,KAAK,CAAC,SAA0B;EACpE,YAAmB,KAAsB;IACrC,KAAK,CAAC,KAAK,CAAC,CAAC;IADE,UAAK,GAAL,KAAK,CAAiB;IAkDjC,iBAAY,GAAG,CAAC,KAAmB,EA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MAC5C,KAAK,EAAE,aAAa;KACvB,CAAC,CAAC;EACP,CAAC;EAEO,kBAAkB,CAAC,IAAoB;IAC3C,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;MAC9B,OAAO;KACV;IAED,MAAM,KAAK,GAAQ;MACf,IAAI,EAAE,OAAO;MACb,QAAQ,EAAE,CAAC,IAAI,CAAC,SAAS;MACzB,GAAG,EAAE,IAAI,CAAC,eAAe;KAC5B,CAAC;IAEF,OAAO,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC;EACzD,CAAC;CAoBJ","sourcesContent":["import React from 'react';\nimport { ArrayFieldItem } from './types';\n\ninterface SimpleItemProps {\n item: ArrayFieldItem;\n index: number;\n allowItemRemoval: boolean;\n allowItemReorder: boolean;\n dataIndex: number;\n}\n\nconst LIMEL_ICON_BUTTON = 'limel-icon-button';\n\nexport class SimpleItemTemplate extends React.Component<SimpleItemProps> {\n constructor(public props: SimpleItemProps) {\n super(props);\n }\n\n private removeButton?: HTMLLimelIconButtonElement;\n\n public componentWillUnmount() {\n this.setRemoveButton(undefined);\n }\n\n public render() {\n const { item, allowItemReorder } = this.props;\n\n return React.createElement(\n 'div',\n {\n className: 'array-item limel-form-array-item--simple',\n 'data-reorder-id': String(this.props.dataIndex),\n 'data-reorderable': allowItemReorder ? 'true' : 'false',\n },\n this.props.item.children,\n this.renderRemoveButton(item),\n this.renderDragHandle()\n );\n }\n\n private renderDragHandle() {\n if (!this.props.allowItemReorder) {\n return;\n }\n\n return React.createElement('limel-drag-handle', {\n class: 'drag-handle',\n });\n }\n\n private renderRemoveButton(item: ArrayFieldItem) {\n if (!this.props.allowItemRemoval) {\n return;\n }\n\n const props: any = {\n icon: 'trash',\n disabled: !item.hasRemove,\n ref: this.setRemoveButton,\n };\n\n return React.createElement(LIMEL_ICON_BUTTON, props);\n }\n\n private handleRemove = (event: PointerEvent): void => {\n const { item, index } = this.props;\n item.onDropIndexClick(index)(event);\n };\n\n private readonly setRemoveButton = (\n button?: HTMLLimelIconButtonElement | null\n ) => {\n if (this.removeButton) {\n this.removeButton.removeEventListener('click', this.handleRemove);\n }\n\n this.removeButton = button || undefined;\n\n if (this.removeButton) {\n this.removeButton.addEventListener('click', this.handleRemove);\n }\n };\n}\n"]}
|