@gravitee/ui-components 3.25.3-typescript-8a53edf → 3.25.3-typescript-e7256ca
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/package.json +3 -4
- package/src/atoms/gv-autocomplete.d.ts +104 -0
- package/src/atoms/gv-autocomplete.js +1 -461
- package/src/atoms/gv-button.d.ts +109 -0
- package/src/atoms/gv-button.js +1 -410
- package/src/atoms/gv-checkbox.d.ts +114 -0
- package/src/atoms/gv-checkbox.js +1 -187
- package/src/atoms/gv-date-picker-calendar.d.ts +190 -0
- package/src/atoms/gv-date-picker-calendar.js +1 -894
- package/src/atoms/gv-date-picker-cell.d.ts +80 -0
- package/src/atoms/gv-date-picker-cell.js +1 -190
- package/src/atoms/gv-date-picker.d.ts +194 -0
- package/src/atoms/gv-date-picker.js +1 -671
- package/src/atoms/gv-file-upload.d.ts +64 -0
- package/src/atoms/gv-file-upload.js +1 -367
- package/src/atoms/gv-icon.d.ts +26 -0
- package/src/atoms/gv-icon.js +1 -103
- package/src/atoms/gv-image.d.ts +45 -0
- package/src/atoms/gv-image.js +1 -144
- package/src/atoms/gv-input-message.d.ts +20 -0
- package/src/atoms/gv-input-message.js +1 -84
- package/src/atoms/gv-input.d.ts +246 -0
- package/src/atoms/gv-input.js +1 -561
- package/src/atoms/gv-link.d.ts +67 -0
- package/src/atoms/gv-link.js +1 -210
- package/src/atoms/gv-message.d.ts +23 -0
- package/src/atoms/gv-message.js +1 -128
- package/src/atoms/gv-metric.d.ts +32 -0
- package/src/atoms/gv-metric.js +1 -117
- package/src/atoms/gv-relative-time.d.ts +45 -0
- package/src/atoms/gv-relative-time.js +1 -156
- package/src/atoms/gv-select-native.d.ts +174 -0
- package/src/atoms/gv-select-native.js +1 -388
- package/src/atoms/gv-select.d.ts +71 -0
- package/src/atoms/gv-select.js +1 -437
- package/src/atoms/gv-spinner.d.ts +10 -0
- package/src/atoms/gv-spinner.js +1 -57
- package/src/atoms/gv-state.d.ts +50 -0
- package/src/atoms/gv-state.js +1 -130
- package/src/atoms/gv-switch.d.ts +60 -0
- package/src/atoms/gv-switch.js +1 -243
- package/src/atoms/gv-tag.d.ts +69 -0
- package/src/atoms/gv-tag.js +1 -168
- package/src/atoms/gv-text.d.ts +110 -0
- package/src/atoms/gv-text.js +1 -168
- package/src/charts/gv-chart-bar.d.ts +50 -0
- package/src/charts/gv-chart-bar.js +1 -103
- package/src/charts/gv-chart-gauge.d.ts +58 -0
- package/src/charts/gv-chart-gauge.js +1 -100
- package/src/charts/gv-chart-histogram.d.ts +48 -0
- package/src/charts/gv-chart-histogram.js +1 -83
- package/src/charts/gv-chart-line.d.ts +52 -0
- package/src/charts/gv-chart-line.js +1 -224
- package/src/charts/gv-chart-map.d.ts +50 -0
- package/src/charts/gv-chart-map.js +1 -112
- package/src/charts/gv-chart-pie.d.ts +50 -0
- package/src/charts/gv-chart-pie.js +1 -91
- package/src/index.d.ts +77 -0
- package/src/index.js +1 -77
- package/src/lib/cron-expression.d.ts +1 -0
- package/src/lib/cron-expression.js +1 -205
- package/src/lib/date.d.ts +1 -0
- package/src/lib/date.js +1 -44
- package/src/lib/events.d.ts +1 -0
- package/src/lib/events.js +1 -26
- package/src/lib/http-client-schema-form.d.ts +68 -0
- package/src/lib/http-client-schema-form.js +1 -67
- package/src/lib/http.d.ts +222 -0
- package/src/lib/http.js +1 -237
- package/src/lib/i18n.d.ts +30 -0
- package/src/lib/i18n.js +1 -103
- package/src/lib/item.d.ts +12 -0
- package/src/lib/item.js +1 -118
- package/src/lib/properties.d.ts +42 -0
- package/src/lib/properties.js +1 -189
- package/src/lib/schema-form.d.ts +5 -0
- package/src/lib/schema-form.js +1 -44
- package/src/lib/studio.d.ts +2 -0
- package/src/lib/studio.js +1 -141
- package/src/lib/style.d.ts +6 -0
- package/src/lib/style.js +1 -41
- package/src/lib/text-format.d.ts +6 -0
- package/src/lib/text-format.js +1 -69
- package/src/lib/theme.d.ts +4 -0
- package/src/lib/theme.js +1 -63
- package/src/lib/utils.d.ts +9 -0
- package/src/lib/utils.js +1 -111
- package/src/mixins/chart-element.d.ts +39 -0
- package/src/mixins/chart-element.js +1 -165
- package/src/mixins/input-element.d.ts +64 -0
- package/src/mixins/input-element.js +1 -144
- package/src/mixins/item-resource.d.ts +56 -0
- package/src/mixins/item-resource.js +1 -120
- package/src/mixins/keyboard-element.d.ts +25 -0
- package/src/mixins/keyboard-element.js +1 -69
- package/src/mixins/update-after-browser.d.ts +11 -0
- package/src/mixins/update-after-browser.js +1 -30
- package/src/mixins/with-resize-observer.d.ts +12 -0
- package/src/mixins/with-resize-observer.js +1 -68
- package/src/mixins/with-skeleton-attribute.d.ts +35 -0
- package/src/mixins/with-skeleton-attribute.js +1 -112
- package/src/molecules/gv-card-full.d.ts +78 -0
- package/src/molecules/gv-card-full.js +1 -218
- package/src/molecules/gv-card-list.d.ts +33 -0
- package/src/molecules/gv-card-list.js +1 -113
- package/src/molecules/gv-card.d.ts +65 -0
- package/src/molecules/gv-card.js +1 -133
- package/src/molecules/gv-category-list.d.ts +17 -0
- package/src/molecules/gv-category-list.js +1 -60
- package/src/molecules/gv-category.d.ts +64 -0
- package/src/molecules/gv-category.js +1 -170
- package/src/molecules/gv-code.d.ts +192 -0
- package/src/molecules/gv-code.js +1 -359
- package/src/molecules/gv-confirm.d.ts +60 -0
- package/src/molecules/gv-confirm.js +1 -188
- package/src/molecules/gv-cron-editor.d.ts +115 -0
- package/src/molecules/gv-cron-editor.js +1 -710
- package/src/molecules/gv-dropdown-menu.d.ts +28 -0
- package/src/molecules/gv-dropdown-menu.js +1 -116
- package/src/molecules/gv-expandable.d.ts +37 -0
- package/src/molecules/gv-expandable.js +1 -122
- package/src/molecules/gv-expression-language.d.ts +150 -0
- package/src/molecules/gv-expression-language.js +1 -270
- package/src/molecules/gv-identity-picture.d.ts +44 -0
- package/src/molecules/gv-identity-picture.js +1 -148
- package/src/molecules/gv-list.d.ts +123 -0
- package/src/molecules/gv-list.js +1 -227
- package/src/molecules/gv-metrics.d.ts +65 -0
- package/src/molecules/gv-metrics.js +1 -162
- package/src/molecules/gv-modal.d.ts +64 -0
- package/src/molecules/gv-modal.js +1 -213
- package/src/molecules/gv-nav.d.ts +41 -0
- package/src/molecules/gv-nav.js +1 -196
- package/src/molecules/gv-option.d.ts +65 -0
- package/src/molecules/gv-option.js +1 -242
- package/src/molecules/gv-plans.d.ts +73 -0
- package/src/molecules/gv-plans.js +1 -429
- package/src/molecules/gv-popover.d.ts +91 -0
- package/src/molecules/gv-popover.js +1 -351
- package/src/molecules/gv-promote.d.ts +108 -0
- package/src/molecules/gv-promote.js +1 -209
- package/src/molecules/gv-rating-list.d.ts +77 -0
- package/src/molecules/gv-rating-list.js +1 -365
- package/src/molecules/gv-rating.d.ts +55 -0
- package/src/molecules/gv-rating.js +1 -253
- package/src/molecules/gv-row-expandable.d.ts +8 -0
- package/src/molecules/gv-row-expandable.js +1 -45
- package/src/molecules/gv-row.d.ts +37 -0
- package/src/molecules/gv-row.js +1 -210
- package/src/molecules/gv-stats.d.ts +53 -0
- package/src/molecules/gv-stats.js +1 -121
- package/src/molecules/gv-stepper.d.ts +46 -0
- package/src/molecules/gv-stepper.js +1 -288
- package/src/molecules/gv-table.d.ts +159 -0
- package/src/molecules/gv-table.js +1 -685
- package/src/molecules/gv-tree.d.ts +44 -0
- package/src/molecules/gv-tree.js +1 -250
- package/src/organisms/gv-documentation.d.ts +52 -0
- package/src/organisms/gv-documentation.js +1 -215
- package/src/organisms/gv-header.d.ts +60 -0
- package/src/organisms/gv-header.js +1 -288
- package/src/organisms/gv-http-client.d.ts +57 -0
- package/src/organisms/gv-http-client.js +1 -275
- package/src/organisms/gv-menu.d.ts +74 -0
- package/src/organisms/gv-menu.js +1 -263
- package/src/organisms/gv-newsletter-subscription.d.ts +82 -0
- package/src/organisms/gv-newsletter-subscription.js +1 -271
- package/src/organisms/gv-pagination.d.ts +63 -0
- package/src/organisms/gv-pagination.js +1 -198
- package/src/organisms/gv-properties.d.ts +229 -0
- package/src/organisms/gv-properties.js +1 -920
- package/src/organisms/gv-resizable-views.d.ts +33 -0
- package/src/organisms/gv-resizable-views.js +1 -396
- package/src/organisms/gv-resources.d.ts +125 -0
- package/src/organisms/gv-resources.js +1 -535
- package/src/organisms/gv-schema-form-array.d.ts +55 -0
- package/src/organisms/gv-schema-form-array.js +1 -250
- package/src/organisms/gv-schema-form-control-object.d.ts +64 -0
- package/src/organisms/gv-schema-form-control-object.js +1 -154
- package/src/organisms/gv-schema-form-control.d.ts +90 -0
- package/src/organisms/gv-schema-form-control.js +1 -443
- package/src/organisms/gv-schema-form.d.ts +156 -0
- package/src/organisms/gv-schema-form.js +1 -751
- package/src/organisms/gv-tabs.d.ts +56 -0
- package/src/organisms/gv-tabs.js +1 -210
- package/src/organisms/gv-user-menu.d.ts +56 -0
- package/src/organisms/gv-user-menu.js +1 -314
- package/src/organisms/gv-vertical-menu.d.ts +28 -0
- package/src/organisms/gv-vertical-menu.js +1 -123
- package/src/policy-studio/gv-flow-step.d.ts +142 -0
- package/src/policy-studio/gv-flow-step.js +1 -464
- package/src/policy-studio/gv-flow.d.ts +89 -0
- package/src/policy-studio/gv-flow.js +1 -621
- package/src/policy-studio/gv-policy-studio-menu.d.ts +94 -0
- package/src/policy-studio/gv-policy-studio-menu.js +1 -750
- package/src/policy-studio/gv-policy-studio.d.ts +464 -0
- package/src/policy-studio/gv-policy-studio.js +1 -1842
- package/src/styles/empty.d.ts +1 -0
- package/src/styles/empty.js +1 -36
- package/src/styles/input.d.ts +1 -0
- package/src/styles/input.js +1 -263
- package/src/styles/link.d.ts +1 -0
- package/src/styles/link.js +1 -32
- package/src/styles/shapes.d.ts +2 -0
- package/src/styles/shapes.js +1 -17
- package/src/styles/skeleton.d.ts +1 -0
- package/src/styles/skeleton.js +1 -53
- package/src/styles/zoom.d.ts +1 -0
- package/src/styles/zoom.js +1 -40
- package/src/theme/gv-theme.d.ts +81 -0
- package/src/theme/gv-theme.js +1 -203
- package/wc/gv-autocomplete.d.ts +1 -0
- package/wc/gv-autocomplete.js +1 -1
- package/wc/gv-button.d.ts +1 -0
- package/wc/gv-button.js +1 -1
- package/wc/gv-card-full.d.ts +1 -0
- package/wc/gv-card-full.js +1 -1
- package/wc/gv-card-list.d.ts +1 -0
- package/wc/gv-card-list.js +1 -1
- package/wc/gv-card.d.ts +1 -0
- package/wc/gv-card.js +1 -1
- package/wc/gv-category-list.d.ts +1 -0
- package/wc/gv-category-list.js +1 -1
- package/wc/gv-category.d.ts +1 -0
- package/wc/gv-category.js +1 -1
- package/wc/gv-chart-bar.d.ts +1 -0
- package/wc/gv-chart-bar.js +1 -1
- package/wc/gv-chart-gauge.d.ts +1 -0
- package/wc/gv-chart-gauge.js +1 -1
- package/wc/gv-chart-histogram.d.ts +1 -0
- package/wc/gv-chart-histogram.js +1 -1
- package/wc/gv-chart-line.d.ts +1 -0
- package/wc/gv-chart-line.js +1 -1
- package/wc/gv-chart-map.d.ts +1 -0
- package/wc/gv-chart-map.js +1 -1
- package/wc/gv-chart-pie.d.ts +1 -0
- package/wc/gv-chart-pie.js +1 -1
- package/wc/gv-checkbox.d.ts +1 -0
- package/wc/gv-checkbox.js +1 -1
- package/wc/gv-code.d.ts +1 -0
- package/wc/gv-code.js +1 -1
- package/wc/gv-confirm.d.ts +1 -0
- package/wc/gv-confirm.js +1 -1
- package/wc/gv-cron-editor.d.ts +1 -0
- package/wc/gv-cron-editor.js +1 -1
- package/wc/gv-date-picker-calendar.d.ts +1 -0
- package/wc/gv-date-picker-calendar.js +1 -1
- package/wc/gv-date-picker-cell.d.ts +1 -0
- package/wc/gv-date-picker-cell.js +1 -1
- package/wc/gv-date-picker.d.ts +1 -0
- package/wc/gv-date-picker.js +1 -1
- package/wc/gv-documentation.d.ts +1 -0
- package/wc/gv-documentation.js +1 -1
- package/wc/gv-dropdown-menu.d.ts +1 -0
- package/wc/gv-dropdown-menu.js +1 -1
- package/wc/gv-expandable.d.ts +1 -0
- package/wc/gv-expandable.js +1 -1
- package/wc/gv-expression-language.d.ts +1 -0
- package/wc/gv-expression-language.js +1 -1
- package/wc/gv-file-upload.d.ts +1 -0
- package/wc/gv-file-upload.js +1 -1
- package/wc/gv-flow-step.d.ts +1 -0
- package/wc/gv-flow-step.js +1 -1
- package/wc/gv-flow.d.ts +1 -0
- package/wc/gv-flow.js +1 -1
- package/wc/gv-header.d.ts +1 -0
- package/wc/gv-header.js +1 -1
- package/wc/gv-http-client.d.ts +1 -0
- package/wc/gv-http-client.js +1 -1
- package/wc/gv-icon.d.ts +1 -0
- package/wc/gv-icon.js +1 -1
- package/wc/gv-identity-picture.d.ts +1 -0
- package/wc/gv-identity-picture.js +1 -1
- package/wc/gv-image.d.ts +1 -0
- package/wc/gv-image.js +1 -1
- package/wc/gv-input-message.d.ts +1 -0
- package/wc/gv-input-message.js +1 -1
- package/wc/gv-input.d.ts +1 -0
- package/wc/gv-input.js +1 -1
- package/wc/gv-link.d.ts +1 -0
- package/wc/gv-link.js +1 -1
- package/wc/gv-list.d.ts +1 -0
- package/wc/gv-list.js +1 -1
- package/wc/gv-menu.d.ts +1 -0
- package/wc/gv-menu.js +1 -1
- package/wc/gv-message.d.ts +1 -0
- package/wc/gv-message.js +1 -1
- package/wc/gv-metric.d.ts +1 -0
- package/wc/gv-metric.js +1 -1
- package/wc/gv-metrics.d.ts +1 -0
- package/wc/gv-metrics.js +1 -1
- package/wc/gv-modal.d.ts +1 -0
- package/wc/gv-modal.js +1 -1
- package/wc/gv-nav.d.ts +1 -0
- package/wc/gv-nav.js +1 -1
- package/wc/gv-newsletter-subscription.d.ts +1 -0
- package/wc/gv-newsletter-subscription.js +1 -1
- package/wc/gv-option.d.ts +1 -0
- package/wc/gv-option.js +1 -1
- package/wc/gv-pagination.d.ts +1 -0
- package/wc/gv-pagination.js +1 -1
- package/wc/gv-plans.d.ts +1 -0
- package/wc/gv-plans.js +1 -1
- package/wc/gv-policy-studio-menu.d.ts +1 -0
- package/wc/gv-policy-studio-menu.js +1 -1
- package/wc/gv-policy-studio.d.ts +1 -0
- package/wc/gv-policy-studio.js +1 -1
- package/wc/gv-popover.d.ts +1 -0
- package/wc/gv-popover.js +1 -1
- package/wc/gv-promote.d.ts +1 -0
- package/wc/gv-promote.js +1 -1
- package/wc/gv-properties.d.ts +1 -0
- package/wc/gv-properties.js +1 -1
- package/wc/gv-rating-list.d.ts +1 -0
- package/wc/gv-rating-list.js +1 -1
- package/wc/gv-rating.d.ts +1 -0
- package/wc/gv-rating.js +1 -1
- package/wc/gv-relative-time.d.ts +1 -0
- package/wc/gv-relative-time.js +1 -1
- package/wc/gv-resizable-views.d.ts +1 -0
- package/wc/gv-resizable-views.js +1 -1
- package/wc/gv-resources.d.ts +1 -0
- package/wc/gv-resources.js +1 -1
- package/wc/gv-row-expandable.d.ts +1 -0
- package/wc/gv-row-expandable.js +1 -1
- package/wc/gv-row.d.ts +1 -0
- package/wc/gv-row.js +1 -1
- package/wc/gv-schema-form-array.d.ts +1 -0
- package/wc/gv-schema-form-array.js +1 -1
- package/wc/gv-schema-form-control-object.d.ts +1 -0
- package/wc/gv-schema-form-control-object.js +1 -1
- package/wc/gv-schema-form-control.d.ts +1 -0
- package/wc/gv-schema-form-control.js +1 -1
- package/wc/gv-schema-form.d.ts +1 -0
- package/wc/gv-schema-form.js +1 -1
- package/wc/gv-select-native.d.ts +1 -0
- package/wc/gv-select-native.js +1 -1
- package/wc/gv-select.d.ts +1 -0
- package/wc/gv-select.js +1 -1
- package/wc/gv-spinner.d.ts +1 -0
- package/wc/gv-spinner.js +1 -1
- package/wc/gv-state.d.ts +1 -0
- package/wc/gv-state.js +1 -1
- package/wc/gv-stats.d.ts +1 -0
- package/wc/gv-stats.js +1 -1
- package/wc/gv-stepper.d.ts +1 -0
- package/wc/gv-stepper.js +1 -1
- package/wc/gv-switch.d.ts +1 -0
- package/wc/gv-switch.js +1 -1
- package/wc/gv-table.d.ts +1 -0
- package/wc/gv-table.js +1 -1
- package/wc/gv-tabs.d.ts +1 -0
- package/wc/gv-tabs.js +1 -1
- package/wc/gv-tag.d.ts +1 -0
- package/wc/gv-tag.js +1 -1
- package/wc/gv-text.d.ts +1 -0
- package/wc/gv-text.js +1 -1
- package/wc/gv-theme.d.ts +1 -0
- package/wc/gv-theme.js +1 -1
- package/wc/gv-tree.d.ts +1 -0
- package/wc/gv-tree.js +1 -1
- package/wc/gv-user-menu.d.ts +1 -0
- package/wc/gv-user-menu.js +1 -1
- package/wc/gv-vertical-menu.d.ts +1 -0
- package/wc/gv-vertical-menu.js +1 -1
- package/CHANGELOG.md +0 -1292
- package/LICENSE.txt +0 -202
- package/README.md +0 -195
- package/src/.eslintrc.js +0 -19
- package/src/theme/definition.json +0 -1762
package/src/molecules/gv-card.js
CHANGED
|
@@ -1,133 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { css, LitElement, html } from 'lit';
|
|
17
|
-
import { skeleton } from '../styles/skeleton';
|
|
18
|
-
import { classMap } from 'lit/directives/class-map';
|
|
19
|
-
import '../atoms/gv-image';
|
|
20
|
-
import '../atoms/gv-button';
|
|
21
|
-
import { i18n } from '../lib/i18n';
|
|
22
|
-
import { ItemResource } from '../mixins/item-resource';
|
|
23
|
-
import { getVersion, getTitle } from '../lib/item';
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Card component
|
|
27
|
-
*
|
|
28
|
-
* ## Details
|
|
29
|
-
* * has @theme facet
|
|
30
|
-
*
|
|
31
|
-
* @attr {Promise<any>} item - An item.
|
|
32
|
-
*
|
|
33
|
-
* @cssprop {Color} [--gv-card--bgc=var(--gv-theme-neutral-color-lightest, #ffffff)] - Background color
|
|
34
|
-
*/
|
|
35
|
-
export class GvCard extends ItemResource(LitElement) {
|
|
36
|
-
static get styles() {
|
|
37
|
-
return [
|
|
38
|
-
...super.styles,
|
|
39
|
-
// language=CSS
|
|
40
|
-
css`
|
|
41
|
-
:host {
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
display: inline-block;
|
|
44
|
-
margin: 0.2rem;
|
|
45
|
-
vertical-align: middle;
|
|
46
|
-
width: 144px;
|
|
47
|
-
max-height: 144px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
gv-identity-picture {
|
|
51
|
-
width: 65px;
|
|
52
|
-
height: 65px;
|
|
53
|
-
--gv-image--of: contain;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.card {
|
|
57
|
-
position: relative;
|
|
58
|
-
display: flex;
|
|
59
|
-
flex-direction: column;
|
|
60
|
-
max-width: 144px;
|
|
61
|
-
min-height: 144px;
|
|
62
|
-
border-radius: 2px;
|
|
63
|
-
background-color: var(--gv-card--bgc, var(--gv-theme-neutral-color-lightest, #ffffff));
|
|
64
|
-
color: var(--gv-theme-font-color-dark, #262626);
|
|
65
|
-
box-shadow: 0 0 0 1px var(--gv-theme-neutral-color, #f5f5f5), 0 1px 3px var(--gv-theme-neutral-color-dark, #bfbfbf);
|
|
66
|
-
transition: all 0.3s;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.card:hover {
|
|
70
|
-
transform: translateY(-4px);
|
|
71
|
-
box-shadow: 0 10px 20px -10px var(--gv-theme-neutral-color-dark, #bfbfbf);
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.content > div {
|
|
76
|
-
display: flex;
|
|
77
|
-
justify-content: center;
|
|
78
|
-
margin-bottom: 0.2rem;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.image {
|
|
82
|
-
display: flex;
|
|
83
|
-
flex: 1;
|
|
84
|
-
align-items: center;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
position: relative;
|
|
87
|
-
padding-top: 0.2rem;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.title {
|
|
91
|
-
line-height: 22px;
|
|
92
|
-
font-size: var(--gv-theme-font-size-s, 12px);
|
|
93
|
-
text-transform: capitalize;
|
|
94
|
-
font-weight: bold;
|
|
95
|
-
white-space: nowrap;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.content {
|
|
100
|
-
flex: 1;
|
|
101
|
-
padding: 6px 16px 12px;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.version {
|
|
105
|
-
color: var(--gv-theme-neutral-color-dark, #d9d9d9);
|
|
106
|
-
top: 0.4rem;
|
|
107
|
-
right: 0.4rem;
|
|
108
|
-
position: absolute;
|
|
109
|
-
}
|
|
110
|
-
`,
|
|
111
|
-
skeleton,
|
|
112
|
-
];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
render() {
|
|
116
|
-
const title = getTitle(this._item);
|
|
117
|
-
return html`<div class="card" title="${title}">
|
|
118
|
-
<span class="${classMap({ skeleton: this._skeleton, version: true })}">${getVersion(this._item)}</span>
|
|
119
|
-
<div class="${classMap({ image: true, skeleton: this._skeleton })}">${this._renderImage()}</div>
|
|
120
|
-
|
|
121
|
-
<div class="${classMap({ content: true, empty: this._error || this._empty })}">
|
|
122
|
-
${this._error || this._empty
|
|
123
|
-
? html` <span>${this._error ? i18n('gv-card.error') : i18n('gv-card.empty')}</span> `
|
|
124
|
-
: html` <div class="${classMap({ skeleton: this._skeleton })}">
|
|
125
|
-
<span class="title">${title}</span>
|
|
126
|
-
</div>
|
|
127
|
-
<div>${this._renderStates()}</div>`}
|
|
128
|
-
</div>
|
|
129
|
-
</div>`;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
window.customElements.define('gv-card', GvCard);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvCard=void 0;const e=require("lit"),t=require("../styles/skeleton"),r=require("lit/directives/class-map");require("../atoms/gv-image"),require("../atoms/gv-button");const i=require("../lib/i18n"),s=require("../mixins/item-resource"),o=require("../lib/item");class a extends((0,s.ItemResource)(e.LitElement)){static get styles(){return[...super.styles,e.css`:host{box-sizing:border-box;display:inline-block;margin:.2rem;vertical-align:middle;width:144px;max-height:144px}gv-identity-picture{width:65px;height:65px;--gv-image--of:contain}.card{position:relative;display:flex;flex-direction:column;max-width:144px;min-height:144px;border-radius:2px;background-color:var(--gv-card--bgc,var(--gv-theme-neutral-color-lightest,#fff));color:var(--gv-theme-font-color-dark,#262626);box-shadow:0 0 0 1px var(--gv-theme-neutral-color,#f5f5f5),0 1px 3px var(--gv-theme-neutral-color-dark,#bfbfbf);transition:all .3s}.card:hover{transform:translateY(-4px);box-shadow:0 10px 20px -10px var(--gv-theme-neutral-color-dark,#bfbfbf);cursor:pointer}.content>div{display:flex;justify-content:center;margin-bottom:.2rem}.image{display:flex;flex:1;align-items:center;justify-content:center;position:relative;padding-top:.2rem}.title{line-height:22px;font-size:var(--gv-theme-font-size-s,12px);text-transform:capitalize;font-weight:700;white-space:nowrap;overflow:hidden}.content{flex:1;padding:6px 16px 12px}.version{color:var(--gv-theme-neutral-color-dark,#d9d9d9);top:.4rem;right:.4rem;position:absolute}`,t.skeleton]}render(){const t=(0,o.getTitle)(this._item);return e.html`<div class="card" title="${t}"><span class="${(0,r.classMap)({skeleton:this._skeleton,version:!0})}">${(0,o.getVersion)(this._item)}</span><div class="${(0,r.classMap)({image:!0,skeleton:this._skeleton})}">${this._renderImage()}</div><div class="${(0,r.classMap)({content:!0,empty:this._error||this._empty})}">${this._error||this._empty?e.html`<span>${this._error?(0,i.i18n)("gv-card.error"):(0,i.i18n)("gv-card.empty")}</span>`:e.html`<div class="${(0,r.classMap)({skeleton:this._skeleton})}"><span class="title">${t}</span></div><div>${this._renderStates()}</div>`}</div></div>`}}exports.GvCard=a,window.customElements.define("gv-card",a);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* List of categories
|
|
3
|
+
*
|
|
4
|
+
* ## Details
|
|
5
|
+
* * has @theme facet
|
|
6
|
+
*
|
|
7
|
+
* @cssprop {Color} [--gv-category-list--bgc-1=#cce6eb] - Category background color 1
|
|
8
|
+
* @cssprop {Color} [--gv-category-list--bgc-2=#fcf1a8] - Category background color 2
|
|
9
|
+
* @cssprop {Color} [--gv-category-list--bgc-3=#d9d4f1] - Category background color 3
|
|
10
|
+
* @cssprop {Color} [--gv-category-list--bgc-4=#f9c15e] - Category background color 4
|
|
11
|
+
* @cssprop {Color} [--gv-category-list--bgc-5=#d4fccd] - Category background color 5
|
|
12
|
+
* @cssprop {Color} [--gv-category-list--bgc-6=#e0c8b2] - Category background color 6
|
|
13
|
+
*/
|
|
14
|
+
export class GvCategoryList extends GvCardList {
|
|
15
|
+
_getCategoryBackgroundColor(index: any): string;
|
|
16
|
+
}
|
|
17
|
+
import { GvCardList } from "./gv-card-list";
|
|
@@ -1,60 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { css, html } from 'lit';
|
|
17
|
-
import './gv-category';
|
|
18
|
-
import { GvCardList } from './gv-card-list';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* List of categories
|
|
22
|
-
*
|
|
23
|
-
* ## Details
|
|
24
|
-
* * has @theme facet
|
|
25
|
-
*
|
|
26
|
-
* @cssprop {Color} [--gv-category-list--bgc-1=#cce6eb] - Category background color 1
|
|
27
|
-
* @cssprop {Color} [--gv-category-list--bgc-2=#fcf1a8] - Category background color 2
|
|
28
|
-
* @cssprop {Color} [--gv-category-list--bgc-3=#d9d4f1] - Category background color 3
|
|
29
|
-
* @cssprop {Color} [--gv-category-list--bgc-4=#f9c15e] - Category background color 4
|
|
30
|
-
* @cssprop {Color} [--gv-category-list--bgc-5=#d4fccd] - Category background color 5
|
|
31
|
-
* @cssprop {Color} [--gv-category-list--bgc-6=#e0c8b2] - Category background color 6
|
|
32
|
-
*/
|
|
33
|
-
export class GvCategoryList extends GvCardList {
|
|
34
|
-
static get styles() {
|
|
35
|
-
return [
|
|
36
|
-
...super.styles,
|
|
37
|
-
// language=CSS
|
|
38
|
-
css`
|
|
39
|
-
:host {
|
|
40
|
-
--bgc-1: var(--gv-category-list--bgc-1, #cce6eb);
|
|
41
|
-
--bgc-2: var(--gv-category-list--bgc-2, #fcf1a8);
|
|
42
|
-
--bgc-3: var(--gv-category-list--bgc-3, #d9d4f1);
|
|
43
|
-
--bgc-4: var(--gv-category-list--bgc-4, #f9c15e);
|
|
44
|
-
--bgc-5: var(--gv-category-list--bgc-5, #d4fccd);
|
|
45
|
-
--bgc-6: var(--gv-category-list--bgc-6, #e0c8b2);
|
|
46
|
-
}
|
|
47
|
-
`,
|
|
48
|
-
];
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
renderItem(item, index) {
|
|
52
|
-
return html`<gv-category class="item" .category="${item || null}" style="${this._getCategoryBackgroundColor(index)}"> </gv-category>`;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
_getCategoryBackgroundColor(index) {
|
|
56
|
-
return `--gv-category--bgc: var(--bgc-${(index % 6) + 1})`;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
window.customElements.define('gv-category-list', GvCategoryList);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvCategoryList=void 0;const e=require("lit");require("./gv-category");const t=require("./gv-card-list");class r extends t.GvCardList{static get styles(){return[...super.styles,e.css`:host{--bgc-1:var(--gv-category-list--bgc-1, #cce6eb);--bgc-2:var(--gv-category-list--bgc-2, #fcf1a8);--bgc-3:var(--gv-category-list--bgc-3, #d9d4f1);--bgc-4:var(--gv-category-list--bgc-4, #f9c15e);--bgc-5:var(--gv-category-list--bgc-5, #d4fccd);--bgc-6:var(--gv-category-list--bgc-6, #e0c8b2)}`]}renderItem(t,r){return e.html`<gv-category class="item" .category="${t||null}" style="${this._getCategoryBackgroundColor(r)}"></gv-category>`}_getCategoryBackgroundColor(e){return`--gv-category--bgc: var(--bgc-${e%6+1})`}}exports.GvCategoryList=r,window.customElements.define("gv-category-list",r);
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
declare const GvCategory_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_invisible: boolean;
|
|
5
|
+
_skeleton: boolean;
|
|
6
|
+
_error: boolean;
|
|
7
|
+
_empty: boolean;
|
|
8
|
+
updated(changedProperties: any): void;
|
|
9
|
+
};
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
readonly properties: {
|
|
12
|
+
_invisible: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
reflect: boolean;
|
|
15
|
+
};
|
|
16
|
+
_skeleton: {
|
|
17
|
+
type: BooleanConstructor;
|
|
18
|
+
attribute: boolean;
|
|
19
|
+
};
|
|
20
|
+
_error: {
|
|
21
|
+
type: BooleanConstructor;
|
|
22
|
+
attribute: boolean;
|
|
23
|
+
};
|
|
24
|
+
_empty: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
attribute: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly styles: import("lit").CSSResult[];
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* A card used to display a category
|
|
33
|
+
*
|
|
34
|
+
* ## Details
|
|
35
|
+
* * has @theme facet
|
|
36
|
+
*
|
|
37
|
+
* @fires gv-category:click - Custom click event
|
|
38
|
+
*
|
|
39
|
+
* @attr {Promise<{name, description, _links: { picture }, total_apis}>} category - A category object
|
|
40
|
+
* @attr {Length} limit - number of characters that can be display in the description. If _description_ is greater, it will be truncated.
|
|
41
|
+
*
|
|
42
|
+
* @cssprop {Color} [--gv-category--bgc=var(--gv-theme-neutral-color-lightest, #ffffff)] - Background color
|
|
43
|
+
* @cssprop {Color} [--gv-category--c=var(--gv-theme-font-color-dark, #262626)] - Color
|
|
44
|
+
* @cssprop {Length} [--gv-category--h=200px] - Height
|
|
45
|
+
*/
|
|
46
|
+
export class GvCategory extends GvCategory_base {
|
|
47
|
+
static get properties(): {
|
|
48
|
+
category: {
|
|
49
|
+
type: ObjectConstructor;
|
|
50
|
+
};
|
|
51
|
+
limit: {
|
|
52
|
+
type: NumberConstructor;
|
|
53
|
+
};
|
|
54
|
+
_category: {
|
|
55
|
+
type: ObjectConstructor;
|
|
56
|
+
attribute: boolean;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
_skeletonAttribute: string;
|
|
60
|
+
_get(property: any): any;
|
|
61
|
+
_onClick(): void;
|
|
62
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
@@ -1,170 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
import { LitElement, html, css } from 'lit';
|
|
17
|
-
import { truncate } from '../lib/utils';
|
|
18
|
-
import { classMap } from 'lit/directives/class-map';
|
|
19
|
-
import { dispatchCustomEvent } from '../lib/events';
|
|
20
|
-
import { i18n } from '../lib/i18n';
|
|
21
|
-
import { withSkeletonAttribute } from '../mixins/with-skeleton-attribute';
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* A card used to display a category
|
|
25
|
-
*
|
|
26
|
-
* ## Details
|
|
27
|
-
* * has @theme facet
|
|
28
|
-
*
|
|
29
|
-
* @fires gv-category:click - Custom click event
|
|
30
|
-
*
|
|
31
|
-
* @attr {Promise<{name, description, _links: { picture }, total_apis}>} category - A category object
|
|
32
|
-
* @attr {Length} limit - number of characters that can be display in the description. If _description_ is greater, it will be truncated.
|
|
33
|
-
*
|
|
34
|
-
* @cssprop {Color} [--gv-category--bgc=var(--gv-theme-neutral-color-lightest, #ffffff)] - Background color
|
|
35
|
-
* @cssprop {Color} [--gv-category--c=var(--gv-theme-font-color-dark, #262626)] - Color
|
|
36
|
-
* @cssprop {Length} [--gv-category--h=200px] - Height
|
|
37
|
-
*/
|
|
38
|
-
export class GvCategory extends withSkeletonAttribute(LitElement) {
|
|
39
|
-
static get properties() {
|
|
40
|
-
return {
|
|
41
|
-
category: { type: Object },
|
|
42
|
-
limit: { type: Number },
|
|
43
|
-
_category: { type: Object, attribute: false },
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
static get styles() {
|
|
48
|
-
return [
|
|
49
|
-
...super.styles,
|
|
50
|
-
// language=CSS
|
|
51
|
-
css`
|
|
52
|
-
:host {
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
display: inline-block;
|
|
55
|
-
margin: 0.2rem;
|
|
56
|
-
vertical-align: middle;
|
|
57
|
-
min-width: 415px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.card {
|
|
61
|
-
background-color: var(--gv-category--bgc, var(--gv-theme-neutral-color-lightest, #ffffff));
|
|
62
|
-
border-radius: 4px;
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
height: var(--gv-category--h, 200px);
|
|
66
|
-
padding: 2rem;
|
|
67
|
-
box-shadow: 0 0 0 1px var(--gv-theme-neutral-color-dark, #bfbfbf), 0 1px 3px var(--gv-theme-neutral-color-dark, #bfbfbf);
|
|
68
|
-
transition: all 0.3s;
|
|
69
|
-
position: relative;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.card:hover {
|
|
73
|
-
transform: translateY(-4px);
|
|
74
|
-
box-shadow: 0 20px 40px -14px var(--gv-theme-neutral-color, #f5f5f5);
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.box {
|
|
79
|
-
display: flex;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.title {
|
|
83
|
-
flex: 1;
|
|
84
|
-
align-self: center;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.title span {
|
|
88
|
-
font-size: var(--gv-theme-font-size-s);
|
|
89
|
-
font-weight: 600;
|
|
90
|
-
line-height: var(--gv-theme-font-size-s);
|
|
91
|
-
margin-left: 8px;
|
|
92
|
-
opacity: 0.7;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
gv-identity-picture {
|
|
96
|
-
height: 80px;
|
|
97
|
-
width: 80px;
|
|
98
|
-
margin: 0.5rem 1rem 0.5rem 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.title {
|
|
102
|
-
color: var(--gv-category--c, var(--gv-theme-font-color-dark, #262626));
|
|
103
|
-
font-size: var(--gv-theme-font-size-xxl, 30px);
|
|
104
|
-
font-style: normal;
|
|
105
|
-
font-weight: 600;
|
|
106
|
-
line-height: calc(var(--gv-theme-font-size-xxl, 30px) + 6px);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.description {
|
|
110
|
-
color: var(--gv-category--c, var(--gv-theme-font-color-dark, #262626));
|
|
111
|
-
font-size: var(--gv-theme-font-size-l, 16px);
|
|
112
|
-
font-style: normal;
|
|
113
|
-
font-weight: normal;
|
|
114
|
-
line-height: 24px;
|
|
115
|
-
opacity: 0.7;
|
|
116
|
-
|
|
117
|
-
/** text-overflow **/
|
|
118
|
-
max-height: 150px;
|
|
119
|
-
display: -webkit-box;
|
|
120
|
-
-webkit-line-clamp: 4;
|
|
121
|
-
-webkit-box-orient: vertical;
|
|
122
|
-
overflow: hidden;
|
|
123
|
-
}
|
|
124
|
-
`,
|
|
125
|
-
];
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
constructor() {
|
|
129
|
-
super();
|
|
130
|
-
this._skeletonAttribute = 'category';
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
_get(property) {
|
|
134
|
-
if (this._category) {
|
|
135
|
-
return this._category[property];
|
|
136
|
-
}
|
|
137
|
-
return '';
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
_onClick() {
|
|
141
|
-
dispatchCustomEvent(this, 'click', this._category);
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
render() {
|
|
145
|
-
const total = this._get('total_apis');
|
|
146
|
-
return html`<div
|
|
147
|
-
@click=${this._onClick}
|
|
148
|
-
class="${classMap({ card: true, skeleton: this._skeleton, empty: this._error || this._empty })}"
|
|
149
|
-
>
|
|
150
|
-
${this._error || this._empty
|
|
151
|
-
? html`
|
|
152
|
-
<div class="${classMap({ skeleton: this._skeleton })}">
|
|
153
|
-
<span>${this._error ? i18n('gv-category.error') : i18n('gv-category.empty')}</span>
|
|
154
|
-
</div>
|
|
155
|
-
`
|
|
156
|
-
: html` <div class="box">
|
|
157
|
-
<gv-identity-picture
|
|
158
|
-
.skeleton="${this._skeleton}"
|
|
159
|
-
display_name="${this._get('name')}"
|
|
160
|
-
picture="${this._get('_links') ? this._get('_links').picture : ''}"
|
|
161
|
-
></gv-identity-picture>
|
|
162
|
-
<div class="title">${this._get('name')}${total ? html`<span>(${total})</span>` : ''}</div>
|
|
163
|
-
</div>
|
|
164
|
-
|
|
165
|
-
<div class="description">${truncate(this._get('description'), this.limit)}</div>`}
|
|
166
|
-
</div> `;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
window.customElements.define('gv-category', GvCategory);
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.GvCategory=void 0;const e=require("lit"),t=require("../lib/utils"),i=require("lit/directives/class-map"),r=require("../lib/events"),s=require("../lib/i18n"),o=require("../mixins/with-skeleton-attribute");class a extends((0,o.withSkeletonAttribute)(e.LitElement)){static get properties(){return{category:{type:Object},limit:{type:Number},_category:{type:Object,attribute:!1}}}static get styles(){return[...super.styles,e.css`:host{box-sizing:border-box;display:inline-block;margin:.2rem;vertical-align:middle;min-width:415px}.card{background-color:var(--gv-category--bgc,var(--gv-theme-neutral-color-lightest,#fff));border-radius:4px;display:flex;flex-direction:column;height:var(--gv-category--h,200px);padding:2rem;box-shadow:0 0 0 1px var(--gv-theme-neutral-color-dark,#bfbfbf),0 1px 3px var(--gv-theme-neutral-color-dark,#bfbfbf);transition:all .3s;position:relative}.card:hover{transform:translateY(-4px);box-shadow:0 20px 40px -14px var(--gv-theme-neutral-color,#f5f5f5);cursor:pointer}.box{display:flex}.title{flex:1;align-self:center}.title span{font-size:var(--gv-theme-font-size-s);font-weight:600;line-height:var(--gv-theme-font-size-s);margin-left:8px;opacity:.7}gv-identity-picture{height:80px;width:80px;margin:.5rem 1rem .5rem 0}.title{color:var(--gv-category--c,var(--gv-theme-font-color-dark,#262626));font-size:var(--gv-theme-font-size-xxl,30px);font-style:normal;font-weight:600;line-height:calc(var(--gv-theme-font-size-xxl,30px) + 6px)}.description{color:var(--gv-category--c,var(--gv-theme-font-color-dark,#262626));font-size:var(--gv-theme-font-size-l,16px);font-style:normal;font-weight:400;line-height:24px;opacity:.7;max-height:150px;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}`]}constructor(){super(),this._skeletonAttribute="category"}_get(e){return this._category?this._category[e]:""}_onClick(){(0,r.dispatchCustomEvent)(this,"click",this._category)}render(){const r=this._get("total_apis");return e.html`<div @click="${this._onClick}" class="${(0,i.classMap)({card:!0,skeleton:this._skeleton,empty:this._error||this._empty})}">${this._error||this._empty?e.html`<div class="${(0,i.classMap)({skeleton:this._skeleton})}"><span>${this._error?(0,s.i18n)("gv-category.error"):(0,s.i18n)("gv-category.empty")}</span></div>`:e.html`<div class="box"><gv-identity-picture .skeleton="${this._skeleton}" display_name="${this._get("name")}" picture="${this._get("_links")?this._get("_links").picture:""}"></gv-identity-picture><div class="title">${this._get("name")}${r?e.html`<span>(${r})</span>`:""}</div></div><div class="description">${(0,t.truncate)(this._get("description"),this.limit)}</div>`}</div>`}}exports.GvCategory=a,window.customElements.define("gv-category",a);
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Code component
|
|
3
|
+
*
|
|
4
|
+
* ## Details
|
|
5
|
+
* * has @theme facet
|
|
6
|
+
*
|
|
7
|
+
* @fires gv-code:input - input events with the `value` on `detail`
|
|
8
|
+
* @fires gv-code:ready - event dispatch when component is ready
|
|
9
|
+
* @fires gv-code:clipboard-copy - event dispatch when component the `value` has been copied to clipboard
|
|
10
|
+
*
|
|
11
|
+
* @attr {String} label - code language
|
|
12
|
+
* @attr {String} value - code content to be highlighted
|
|
13
|
+
* @attr {options} Object - options based on codemirror
|
|
14
|
+
* @attr {String} placeholder - an example value to display in the input when empty
|
|
15
|
+
* @attr {Number} rows - number of rows of the text element
|
|
16
|
+
* @attr {Boolean} large - for a large input (only if the field has one row)
|
|
17
|
+
* @attr {Boolean} medium - for a medium input (only if the field has one row) (Default)
|
|
18
|
+
* @attr {Boolean} small - for a small input (only if the field has one row)
|
|
19
|
+
*
|
|
20
|
+
* @attr {Boolean} [clipboard=false]- true if field has clipboard button
|
|
21
|
+
* @attr {Boolean} [autofocus=false] - true to put the focus on the input
|
|
22
|
+
* @attr {Boolean} [readonly=false] - true if field is readonly mode
|
|
23
|
+
*/
|
|
24
|
+
export class GvCode extends GvInput {
|
|
25
|
+
static get properties(): {
|
|
26
|
+
options: {
|
|
27
|
+
type: ObjectConstructor;
|
|
28
|
+
};
|
|
29
|
+
rows: {
|
|
30
|
+
type: NumberConstructor;
|
|
31
|
+
};
|
|
32
|
+
_error: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
attribute: boolean;
|
|
35
|
+
};
|
|
36
|
+
type: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
reflect: boolean;
|
|
39
|
+
};
|
|
40
|
+
large: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
};
|
|
43
|
+
medium: {
|
|
44
|
+
type: BooleanConstructor;
|
|
45
|
+
};
|
|
46
|
+
small: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
};
|
|
49
|
+
icon: {
|
|
50
|
+
type: StringConstructor;
|
|
51
|
+
};
|
|
52
|
+
iconLeft: {
|
|
53
|
+
type: StringConstructor;
|
|
54
|
+
attribute: string;
|
|
55
|
+
};
|
|
56
|
+
loading: {
|
|
57
|
+
type: BooleanConstructor;
|
|
58
|
+
};
|
|
59
|
+
min: {
|
|
60
|
+
type: NumberConstructor;
|
|
61
|
+
};
|
|
62
|
+
max: {
|
|
63
|
+
type: NumberConstructor;
|
|
64
|
+
};
|
|
65
|
+
autocomplete: {
|
|
66
|
+
type: StringConstructor;
|
|
67
|
+
};
|
|
68
|
+
clipboard: {
|
|
69
|
+
type: BooleanConstructor;
|
|
70
|
+
};
|
|
71
|
+
clickable: {
|
|
72
|
+
type: BooleanConstructor;
|
|
73
|
+
};
|
|
74
|
+
clearable: {
|
|
75
|
+
type: BooleanConstructor;
|
|
76
|
+
};
|
|
77
|
+
noSubmit: {
|
|
78
|
+
type: BooleanConstructor;
|
|
79
|
+
attribute: string;
|
|
80
|
+
};
|
|
81
|
+
pattern: {
|
|
82
|
+
type: StringConstructor;
|
|
83
|
+
reflect: boolean;
|
|
84
|
+
};
|
|
85
|
+
description: {
|
|
86
|
+
type: StringConstructor;
|
|
87
|
+
};
|
|
88
|
+
_type: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
attribute: boolean;
|
|
91
|
+
};
|
|
92
|
+
disabled: {
|
|
93
|
+
type: BooleanConstructor;
|
|
94
|
+
reflect: boolean;
|
|
95
|
+
};
|
|
96
|
+
required: {
|
|
97
|
+
type: BooleanConstructor;
|
|
98
|
+
reflect: boolean;
|
|
99
|
+
};
|
|
100
|
+
readonly: {
|
|
101
|
+
type: BooleanConstructor;
|
|
102
|
+
reflect: boolean;
|
|
103
|
+
};
|
|
104
|
+
skeleton: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
};
|
|
107
|
+
value: {
|
|
108
|
+
type: StringConstructor;
|
|
109
|
+
reflect: boolean;
|
|
110
|
+
};
|
|
111
|
+
label: {
|
|
112
|
+
type: StringConstructor;
|
|
113
|
+
};
|
|
114
|
+
title: {
|
|
115
|
+
type: StringConstructor;
|
|
116
|
+
};
|
|
117
|
+
name: {
|
|
118
|
+
type: StringConstructor;
|
|
119
|
+
};
|
|
120
|
+
placeholder: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
};
|
|
123
|
+
autofocus: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
};
|
|
126
|
+
invalid: {
|
|
127
|
+
type: BooleanConstructor;
|
|
128
|
+
reflect: boolean;
|
|
129
|
+
};
|
|
130
|
+
valid: {
|
|
131
|
+
type: BooleanConstructor;
|
|
132
|
+
reflect: boolean; /**
|
|
133
|
+
* Code component
|
|
134
|
+
*
|
|
135
|
+
* ## Details
|
|
136
|
+
* * has @theme facet
|
|
137
|
+
*
|
|
138
|
+
* @fires gv-code:input - input events with the `value` on `detail`
|
|
139
|
+
* @fires gv-code:ready - event dispatch when component is ready
|
|
140
|
+
* @fires gv-code:clipboard-copy - event dispatch when component the `value` has been copied to clipboard
|
|
141
|
+
*
|
|
142
|
+
* @attr {String} label - code language
|
|
143
|
+
* @attr {String} value - code content to be highlighted
|
|
144
|
+
* @attr {options} Object - options based on codemirror
|
|
145
|
+
* @attr {String} placeholder - an example value to display in the input when empty
|
|
146
|
+
* @attr {Number} rows - number of rows of the text element
|
|
147
|
+
* @attr {Boolean} large - for a large input (only if the field has one row)
|
|
148
|
+
* @attr {Boolean} medium - for a medium input (only if the field has one row) (Default)
|
|
149
|
+
* @attr {Boolean} small - for a small input (only if the field has one row)
|
|
150
|
+
*
|
|
151
|
+
* @attr {Boolean} [clipboard=false]- true if field has clipboard button
|
|
152
|
+
* @attr {Boolean} [autofocus=false] - true to put the focus on the input
|
|
153
|
+
* @attr {Boolean} [readonly=false] - true if field is readonly mode
|
|
154
|
+
*/
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
static findLanguage(mode: any): Promise<import("@codemirror/language").LanguageDescription | {
|
|
158
|
+
name: string;
|
|
159
|
+
support: {
|
|
160
|
+
extension: import("@codemirror/stream-parser").StreamLanguage<unknown>;
|
|
161
|
+
};
|
|
162
|
+
} | null | undefined>;
|
|
163
|
+
static get codemirrorTheme(): import("@codemirror/state").Extension;
|
|
164
|
+
readonly: boolean;
|
|
165
|
+
autofocus: boolean;
|
|
166
|
+
clipboard: boolean;
|
|
167
|
+
_clipboardIcon: string;
|
|
168
|
+
languageCompartment: Compartment;
|
|
169
|
+
readonlyCompartment: Compartment;
|
|
170
|
+
placeholderCompartment: Compartment;
|
|
171
|
+
get hasInputStyle(): boolean;
|
|
172
|
+
_autocomplete(completionContext: any): any;
|
|
173
|
+
findBestAutocompleteHandler(completionContext: any): {
|
|
174
|
+
handler: {
|
|
175
|
+
run(completionContext: any): any;
|
|
176
|
+
};
|
|
177
|
+
match: boolean;
|
|
178
|
+
};
|
|
179
|
+
get defaultCompletionHandler(): {
|
|
180
|
+
run(completionContext: any): any;
|
|
181
|
+
};
|
|
182
|
+
_getExtensions(): import("@codemirror/state").Extension[];
|
|
183
|
+
getExtensions(): never[];
|
|
184
|
+
_editorState: any;
|
|
185
|
+
_editorView: any;
|
|
186
|
+
_reflectPlaceholder(): void;
|
|
187
|
+
_reflectValue(): void;
|
|
188
|
+
_reflectReadonlyDisabled(): void;
|
|
189
|
+
_reflectOptions(): Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
import { GvInput } from "../atoms/gv-input";
|
|
192
|
+
import { Compartment } from "@codemirror/state";
|