@gravitee/ui-components 3.25.3-typescript-bfd8f67 → 3.25.3-typescript-94e8113
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 +1292 -0
- package/LICENSE.txt +202 -0
- package/README.md +195 -0
- package/dist/src/atoms/gv-autocomplete.d.ts +104 -0
- package/dist/src/atoms/gv-autocomplete.js +422 -0
- package/dist/src/atoms/gv-button.d.ts +109 -0
- package/dist/src/atoms/gv-button.js +397 -0
- package/dist/src/atoms/gv-checkbox.d.ts +114 -0
- package/dist/src/atoms/gv-checkbox.js +178 -0
- package/dist/src/atoms/gv-date-picker-calendar.d.ts +190 -0
- package/dist/src/atoms/gv-date-picker-calendar.js +812 -0
- package/dist/src/atoms/gv-date-picker-cell.d.ts +80 -0
- package/dist/src/atoms/gv-date-picker-cell.js +174 -0
- package/dist/src/atoms/gv-date-picker.d.ts +194 -0
- package/dist/src/atoms/gv-date-picker.js +638 -0
- package/dist/src/atoms/gv-file-upload.d.ts +64 -0
- package/dist/src/atoms/gv-file-upload.js +348 -0
- package/dist/src/atoms/gv-icon.d.ts +26 -0
- package/dist/src/atoms/gv-icon.js +93 -0
- package/dist/src/atoms/gv-image.d.ts +45 -0
- package/dist/src/atoms/gv-image.js +135 -0
- package/dist/src/atoms/gv-input-message.d.ts +20 -0
- package/dist/src/atoms/gv-input-message.js +78 -0
- package/dist/src/atoms/gv-input.d.ts +246 -0
- package/dist/src/atoms/gv-input.js +508 -0
- package/dist/src/atoms/gv-link.d.ts +67 -0
- package/dist/src/atoms/gv-link.js +204 -0
- package/dist/src/atoms/gv-message.d.ts +23 -0
- package/dist/src/atoms/gv-message.js +133 -0
- package/dist/src/atoms/gv-metric.d.ts +32 -0
- package/dist/src/atoms/gv-metric.js +112 -0
- package/dist/src/atoms/gv-relative-time.d.ts +45 -0
- package/dist/src/atoms/gv-relative-time.js +143 -0
- package/dist/src/atoms/gv-select-native.d.ts +174 -0
- package/dist/src/atoms/gv-select-native.js +363 -0
- package/dist/src/atoms/gv-select.d.ts +71 -0
- package/dist/src/atoms/gv-select.js +413 -0
- package/dist/src/atoms/gv-spinner.d.ts +10 -0
- package/dist/src/atoms/gv-spinner.js +54 -0
- package/dist/src/atoms/gv-state.d.ts +50 -0
- package/dist/src/atoms/gv-state.js +125 -0
- package/dist/src/atoms/gv-switch.d.ts +60 -0
- package/dist/src/atoms/gv-switch.js +235 -0
- package/dist/src/atoms/gv-tag.d.ts +69 -0
- package/dist/src/atoms/gv-tag.js +162 -0
- package/dist/src/atoms/gv-text.d.ts +110 -0
- package/dist/src/atoms/gv-text.js +160 -0
- package/dist/src/charts/gv-chart-bar.d.ts +50 -0
- package/dist/src/charts/gv-chart-bar.js +101 -0
- package/dist/src/charts/gv-chart-gauge.d.ts +58 -0
- package/dist/src/charts/gv-chart-gauge.js +92 -0
- package/dist/src/charts/gv-chart-histogram.d.ts +48 -0
- package/dist/src/charts/gv-chart-histogram.js +78 -0
- package/dist/src/charts/gv-chart-line.d.ts +52 -0
- package/dist/src/charts/gv-chart-line.js +218 -0
- package/dist/src/charts/gv-chart-map.d.ts +50 -0
- package/dist/src/charts/gv-chart-map.js +111 -0
- package/dist/src/charts/gv-chart-pie.d.ts +50 -0
- package/dist/src/charts/gv-chart-pie.js +89 -0
- package/dist/src/index.d.ts +77 -0
- package/dist/src/index.js +77 -0
- package/dist/src/lib/cron-expression.d.ts +1 -0
- package/dist/src/lib/cron-expression.js +176 -0
- package/dist/src/lib/date.d.ts +1 -0
- package/dist/src/lib/date.js +43 -0
- package/dist/src/lib/events.d.ts +1 -0
- package/dist/src/lib/events.js +26 -0
- package/dist/src/lib/http-client-schema-form.d.ts +68 -0
- package/dist/src/lib/http-client-schema-form.js +67 -0
- package/dist/src/lib/http.d.ts +222 -0
- package/dist/src/lib/http.js +237 -0
- package/dist/src/lib/i18n.d.ts +30 -0
- package/dist/src/lib/i18n.js +93 -0
- package/dist/src/lib/item.d.ts +12 -0
- package/dist/src/lib/item.js +110 -0
- package/dist/src/lib/properties.d.ts +42 -0
- package/dist/src/lib/properties.js +171 -0
- package/dist/src/lib/schema-form.d.ts +5 -0
- package/dist/src/lib/schema-form.js +39 -0
- package/dist/src/lib/studio.d.ts +2 -0
- package/dist/src/lib/studio.js +144 -0
- package/dist/src/lib/style.d.ts +6 -0
- package/dist/src/lib/style.js +39 -0
- package/dist/src/lib/text-format.d.ts +6 -0
- package/dist/src/lib/text-format.js +65 -0
- package/dist/src/lib/theme.d.ts +4 -0
- package/dist/src/lib/theme.js +60 -0
- package/dist/src/lib/utils.d.ts +9 -0
- package/dist/src/lib/utils.js +106 -0
- package/dist/src/mixins/chart-element.d.ts +39 -0
- package/dist/src/mixins/chart-element.js +153 -0
- package/dist/src/mixins/input-element.d.ts +64 -0
- package/dist/src/mixins/input-element.js +136 -0
- package/dist/src/mixins/item-resource.d.ts +56 -0
- package/dist/src/mixins/item-resource.js +102 -0
- package/dist/src/mixins/keyboard-element.d.ts +25 -0
- package/dist/src/mixins/keyboard-element.js +62 -0
- package/dist/src/mixins/update-after-browser.d.ts +11 -0
- package/dist/src/mixins/update-after-browser.js +30 -0
- package/dist/src/mixins/with-resize-observer.d.ts +12 -0
- package/dist/src/mixins/with-resize-observer.js +62 -0
- package/dist/src/mixins/with-skeleton-attribute.d.ts +35 -0
- package/dist/src/mixins/with-skeleton-attribute.js +109 -0
- package/dist/src/molecules/gv-card-full.d.ts +78 -0
- package/dist/src/molecules/gv-card-full.js +209 -0
- package/dist/src/molecules/gv-card-list.d.ts +33 -0
- package/dist/src/molecules/gv-card-list.js +101 -0
- package/dist/src/molecules/gv-card.d.ts +65 -0
- package/dist/src/molecules/gv-card.js +130 -0
- package/dist/src/molecules/gv-category-list.d.ts +17 -0
- package/dist/src/molecules/gv-category-list.js +56 -0
- package/dist/src/molecules/gv-category.d.ts +64 -0
- package/dist/src/molecules/gv-category.js +163 -0
- package/dist/src/molecules/gv-code.d.ts +192 -0
- package/dist/src/molecules/gv-code.js +334 -0
- package/dist/src/molecules/gv-confirm.d.ts +60 -0
- package/dist/src/molecules/gv-confirm.js +175 -0
- package/dist/src/molecules/gv-cron-editor.d.ts +115 -0
- package/dist/src/molecules/gv-cron-editor.js +685 -0
- package/dist/src/molecules/gv-dropdown-menu.d.ts +28 -0
- package/dist/src/molecules/gv-dropdown-menu.js +108 -0
- package/dist/src/molecules/gv-expandable.d.ts +37 -0
- package/dist/src/molecules/gv-expandable.js +116 -0
- package/dist/src/molecules/gv-expression-language.d.ts +150 -0
- package/dist/src/molecules/gv-expression-language.js +263 -0
- package/dist/src/molecules/gv-identity-picture.d.ts +44 -0
- package/dist/src/molecules/gv-identity-picture.js +139 -0
- package/dist/src/molecules/gv-list.d.ts +123 -0
- package/dist/src/molecules/gv-list.js +214 -0
- package/dist/src/molecules/gv-metrics.d.ts +65 -0
- package/dist/src/molecules/gv-metrics.js +147 -0
- package/dist/src/molecules/gv-modal.d.ts +64 -0
- package/dist/src/molecules/gv-modal.js +203 -0
- package/dist/src/molecules/gv-nav.d.ts +41 -0
- package/dist/src/molecules/gv-nav.js +180 -0
- package/dist/src/molecules/gv-option.d.ts +65 -0
- package/dist/src/molecules/gv-option.js +230 -0
- package/dist/src/molecules/gv-plans.d.ts +73 -0
- package/dist/src/molecules/gv-plans.js +400 -0
- package/dist/src/molecules/gv-popover.d.ts +91 -0
- package/dist/src/molecules/gv-popover.js +323 -0
- package/dist/src/molecules/gv-promote.d.ts +108 -0
- package/dist/src/molecules/gv-promote.js +203 -0
- package/dist/src/molecules/gv-rating-list.d.ts +77 -0
- package/dist/src/molecules/gv-rating-list.js +341 -0
- package/dist/src/molecules/gv-rating.d.ts +55 -0
- package/dist/src/molecules/gv-rating.js +234 -0
- package/dist/src/molecules/gv-row-expandable.d.ts +8 -0
- package/dist/src/molecules/gv-row-expandable.js +42 -0
- package/dist/src/molecules/gv-row.d.ts +37 -0
- package/dist/src/molecules/gv-row.js +205 -0
- package/dist/src/molecules/gv-stats.d.ts +53 -0
- package/dist/src/molecules/gv-stats.js +110 -0
- package/dist/src/molecules/gv-stepper.d.ts +46 -0
- package/dist/src/molecules/gv-stepper.js +274 -0
- package/dist/src/molecules/gv-table.d.ts +159 -0
- package/dist/src/molecules/gv-table.js +644 -0
- package/dist/src/molecules/gv-tree.d.ts +44 -0
- package/dist/src/molecules/gv-tree.js +238 -0
- package/dist/src/organisms/gv-documentation.d.ts +52 -0
- package/dist/src/organisms/gv-documentation.js +205 -0
- package/dist/src/organisms/gv-header.d.ts +60 -0
- package/dist/src/organisms/gv-header.js +276 -0
- package/dist/src/organisms/gv-http-client.d.ts +57 -0
- package/dist/src/organisms/gv-http-client.js +258 -0
- package/dist/src/organisms/gv-menu.d.ts +74 -0
- package/dist/src/organisms/gv-menu.js +258 -0
- package/dist/src/organisms/gv-newsletter-subscription.d.ts +82 -0
- package/dist/src/organisms/gv-newsletter-subscription.js +258 -0
- package/dist/src/organisms/gv-pagination.d.ts +63 -0
- package/dist/src/organisms/gv-pagination.js +179 -0
- package/dist/src/organisms/gv-properties.d.ts +229 -0
- package/dist/src/organisms/gv-properties.js +860 -0
- package/dist/src/organisms/gv-resizable-views.d.ts +33 -0
- package/dist/src/organisms/gv-resizable-views.js +371 -0
- package/dist/src/organisms/gv-resources.d.ts +125 -0
- package/dist/src/organisms/gv-resources.js +496 -0
- package/dist/src/organisms/gv-schema-form-array.d.ts +55 -0
- package/dist/src/organisms/gv-schema-form-array.js +237 -0
- package/dist/src/organisms/gv-schema-form-control-object.d.ts +64 -0
- package/dist/src/organisms/gv-schema-form-control-object.js +141 -0
- package/dist/src/organisms/gv-schema-form-control.d.ts +90 -0
- package/dist/src/organisms/gv-schema-form-control.js +419 -0
- package/dist/src/organisms/gv-schema-form.d.ts +156 -0
- package/dist/src/organisms/gv-schema-form.js +700 -0
- package/dist/src/organisms/gv-tabs.d.ts +56 -0
- package/dist/src/organisms/gv-tabs.js +201 -0
- package/dist/src/organisms/gv-user-menu.d.ts +56 -0
- package/dist/src/organisms/gv-user-menu.js +298 -0
- package/dist/src/organisms/gv-vertical-menu.d.ts +28 -0
- package/dist/src/organisms/gv-vertical-menu.js +119 -0
- package/dist/src/policy-studio/gv-flow-step.d.ts +142 -0
- package/dist/src/policy-studio/gv-flow-step.js +443 -0
- package/dist/src/policy-studio/gv-flow.d.ts +89 -0
- package/dist/src/policy-studio/gv-flow.js +595 -0
- package/dist/src/policy-studio/gv-policy-studio-menu.d.ts +94 -0
- package/dist/src/policy-studio/gv-policy-studio-menu.js +689 -0
- package/dist/src/policy-studio/gv-policy-studio.d.ts +464 -0
- package/dist/src/policy-studio/gv-policy-studio.js +1712 -0
- package/dist/src/styles/empty.d.ts +1 -0
- package/dist/src/styles/empty.js +35 -0
- package/dist/src/styles/input.d.ts +1 -0
- package/dist/src/styles/input.js +262 -0
- package/dist/src/styles/link.d.ts +1 -0
- package/dist/src/styles/link.js +31 -0
- package/dist/src/styles/shapes.d.ts +2 -0
- package/dist/src/styles/shapes.js +17 -0
- package/dist/src/styles/skeleton.d.ts +1 -0
- package/dist/src/styles/skeleton.js +52 -0
- package/dist/src/styles/zoom.d.ts +1 -0
- package/dist/src/styles/zoom.js +39 -0
- package/dist/src/theme/gv-theme.d.ts +81 -0
- package/dist/src/theme/gv-theme.js +197 -0
- package/dist/wc/gv-autocomplete.d.ts +1 -0
- package/dist/wc/gv-autocomplete.js +1 -0
- package/dist/wc/gv-button.d.ts +1 -0
- package/dist/wc/gv-button.js +1 -0
- package/dist/wc/gv-card-full.d.ts +1 -0
- package/dist/wc/gv-card-full.js +1 -0
- package/dist/wc/gv-card-list.d.ts +1 -0
- package/dist/wc/gv-card-list.js +1 -0
- package/dist/wc/gv-card.d.ts +1 -0
- package/dist/wc/gv-card.js +1 -0
- package/dist/wc/gv-category-list.d.ts +1 -0
- package/dist/wc/gv-category-list.js +1 -0
- package/dist/wc/gv-category.d.ts +1 -0
- package/dist/wc/gv-category.js +1 -0
- package/dist/wc/gv-chart-bar.d.ts +1 -0
- package/dist/wc/gv-chart-bar.js +1 -0
- package/dist/wc/gv-chart-gauge.d.ts +1 -0
- package/dist/wc/gv-chart-gauge.js +1 -0
- package/dist/wc/gv-chart-histogram.d.ts +1 -0
- package/dist/wc/gv-chart-histogram.js +1 -0
- package/dist/wc/gv-chart-line.d.ts +1 -0
- package/dist/wc/gv-chart-line.js +1 -0
- package/dist/wc/gv-chart-map.d.ts +1 -0
- package/dist/wc/gv-chart-map.js +1 -0
- package/dist/wc/gv-chart-pie.d.ts +1 -0
- package/dist/wc/gv-chart-pie.js +1 -0
- package/dist/wc/gv-checkbox.d.ts +1 -0
- package/dist/wc/gv-checkbox.js +1 -0
- package/dist/wc/gv-code.d.ts +1 -0
- package/dist/wc/gv-code.js +1 -0
- package/dist/wc/gv-confirm.d.ts +1 -0
- package/dist/wc/gv-confirm.js +1 -0
- package/dist/wc/gv-cron-editor.d.ts +1 -0
- package/dist/wc/gv-cron-editor.js +1 -0
- package/dist/wc/gv-date-picker-calendar.d.ts +1 -0
- package/dist/wc/gv-date-picker-calendar.js +1 -0
- package/dist/wc/gv-date-picker-cell.d.ts +1 -0
- package/dist/wc/gv-date-picker-cell.js +1 -0
- package/dist/wc/gv-date-picker.d.ts +1 -0
- package/dist/wc/gv-date-picker.js +1 -0
- package/dist/wc/gv-documentation.d.ts +1 -0
- package/dist/wc/gv-documentation.js +1 -0
- package/dist/wc/gv-dropdown-menu.d.ts +1 -0
- package/dist/wc/gv-dropdown-menu.js +1 -0
- package/dist/wc/gv-expandable.d.ts +1 -0
- package/dist/wc/gv-expandable.js +1 -0
- package/dist/wc/gv-expression-language.d.ts +1 -0
- package/dist/wc/gv-expression-language.js +1 -0
- package/dist/wc/gv-file-upload.d.ts +1 -0
- package/dist/wc/gv-file-upload.js +1 -0
- package/dist/wc/gv-flow-step.d.ts +1 -0
- package/dist/wc/gv-flow-step.js +1 -0
- package/dist/wc/gv-flow.d.ts +1 -0
- package/dist/wc/gv-flow.js +1 -0
- package/dist/wc/gv-header.d.ts +1 -0
- package/dist/wc/gv-header.js +1 -0
- package/dist/wc/gv-http-client.d.ts +1 -0
- package/dist/wc/gv-http-client.js +1 -0
- package/dist/wc/gv-icon.d.ts +1 -0
- package/dist/wc/gv-icon.js +1 -0
- package/dist/wc/gv-identity-picture.d.ts +1 -0
- package/dist/wc/gv-identity-picture.js +1 -0
- package/dist/wc/gv-image.d.ts +1 -0
- package/dist/wc/gv-image.js +1 -0
- package/dist/wc/gv-input-message.d.ts +1 -0
- package/dist/wc/gv-input-message.js +1 -0
- package/dist/wc/gv-input.d.ts +1 -0
- package/dist/wc/gv-input.js +1 -0
- package/dist/wc/gv-link.d.ts +1 -0
- package/dist/wc/gv-link.js +1 -0
- package/dist/wc/gv-list.d.ts +1 -0
- package/dist/wc/gv-list.js +1 -0
- package/dist/wc/gv-menu.d.ts +1 -0
- package/dist/wc/gv-menu.js +1 -0
- package/dist/wc/gv-message.d.ts +1 -0
- package/dist/wc/gv-message.js +1 -0
- package/dist/wc/gv-metric.d.ts +1 -0
- package/dist/wc/gv-metric.js +1 -0
- package/dist/wc/gv-metrics.d.ts +1 -0
- package/dist/wc/gv-metrics.js +1 -0
- package/dist/wc/gv-modal.d.ts +1 -0
- package/dist/wc/gv-modal.js +1 -0
- package/dist/wc/gv-nav.d.ts +1 -0
- package/dist/wc/gv-nav.js +1 -0
- package/dist/wc/gv-newsletter-subscription.d.ts +1 -0
- package/dist/wc/gv-newsletter-subscription.js +1 -0
- package/dist/wc/gv-option.d.ts +1 -0
- package/dist/wc/gv-option.js +1 -0
- package/dist/wc/gv-pagination.d.ts +1 -0
- package/dist/wc/gv-pagination.js +1 -0
- package/dist/wc/gv-plans.d.ts +1 -0
- package/dist/wc/gv-plans.js +1 -0
- package/dist/wc/gv-policy-studio-menu.d.ts +1 -0
- package/dist/wc/gv-policy-studio-menu.js +1 -0
- package/dist/wc/gv-policy-studio.d.ts +1 -0
- package/dist/wc/gv-policy-studio.js +1 -0
- package/dist/wc/gv-popover.d.ts +1 -0
- package/dist/wc/gv-popover.js +1 -0
- package/dist/wc/gv-promote.d.ts +1 -0
- package/dist/wc/gv-promote.js +1 -0
- package/dist/wc/gv-properties.d.ts +1 -0
- package/dist/wc/gv-properties.js +1 -0
- package/dist/wc/gv-rating-list.d.ts +1 -0
- package/dist/wc/gv-rating-list.js +1 -0
- package/dist/wc/gv-rating.d.ts +1 -0
- package/dist/wc/gv-rating.js +1 -0
- package/dist/wc/gv-relative-time.d.ts +1 -0
- package/dist/wc/gv-relative-time.js +1 -0
- package/dist/wc/gv-resizable-views.d.ts +1 -0
- package/dist/wc/gv-resizable-views.js +1 -0
- package/dist/wc/gv-resources.d.ts +1 -0
- package/dist/wc/gv-resources.js +1 -0
- package/dist/wc/gv-row-expandable.d.ts +1 -0
- package/dist/wc/gv-row-expandable.js +1 -0
- package/dist/wc/gv-row.d.ts +1 -0
- package/dist/wc/gv-row.js +1 -0
- package/dist/wc/gv-schema-form-array.d.ts +1 -0
- package/dist/wc/gv-schema-form-array.js +1 -0
- package/dist/wc/gv-schema-form-control-object.d.ts +1 -0
- package/dist/wc/gv-schema-form-control-object.js +1 -0
- package/dist/wc/gv-schema-form-control.d.ts +1 -0
- package/dist/wc/gv-schema-form-control.js +1 -0
- package/dist/wc/gv-schema-form.d.ts +1 -0
- package/dist/wc/gv-schema-form.js +1 -0
- package/dist/wc/gv-select-native.d.ts +1 -0
- package/dist/wc/gv-select-native.js +1 -0
- package/dist/wc/gv-select.d.ts +1 -0
- package/dist/wc/gv-select.js +1 -0
- package/dist/wc/gv-spinner.d.ts +1 -0
- package/dist/wc/gv-spinner.js +1 -0
- package/dist/wc/gv-state.d.ts +1 -0
- package/dist/wc/gv-state.js +1 -0
- package/dist/wc/gv-stats.d.ts +1 -0
- package/dist/wc/gv-stats.js +1 -0
- package/dist/wc/gv-stepper.d.ts +1 -0
- package/dist/wc/gv-stepper.js +1 -0
- package/dist/wc/gv-switch.d.ts +1 -0
- package/dist/wc/gv-switch.js +1 -0
- package/dist/wc/gv-table.d.ts +1 -0
- package/dist/wc/gv-table.js +1 -0
- package/dist/wc/gv-tabs.d.ts +1 -0
- package/dist/wc/gv-tabs.js +1 -0
- package/dist/wc/gv-tag.d.ts +1 -0
- package/dist/wc/gv-tag.js +1 -0
- package/dist/wc/gv-text.d.ts +1 -0
- package/dist/wc/gv-text.js +1 -0
- package/dist/wc/gv-theme.d.ts +1 -0
- package/dist/wc/gv-theme.js +1 -0
- package/dist/wc/gv-tree.d.ts +1 -0
- package/dist/wc/gv-tree.js +1 -0
- package/dist/wc/gv-user-menu.d.ts +1 -0
- package/dist/wc/gv-user-menu.js +1 -0
- package/dist/wc/gv-vertical-menu.d.ts +1 -0
- package/dist/wc/gv-vertical-menu.js +1 -0
- package/package.json +8 -16
- package/src/atoms/gv-autocomplete.js +0 -1
- package/src/atoms/gv-button.js +0 -1
- package/src/atoms/gv-checkbox.js +0 -1
- package/src/atoms/gv-date-picker-calendar.js +0 -1
- package/src/atoms/gv-date-picker-cell.js +0 -1
- package/src/atoms/gv-date-picker.js +0 -1
- package/src/atoms/gv-file-upload.js +0 -1
- package/src/atoms/gv-icon.js +0 -1
- package/src/atoms/gv-image.js +0 -1
- package/src/atoms/gv-input-message.js +0 -1
- package/src/atoms/gv-input.js +0 -1
- package/src/atoms/gv-link.js +0 -1
- package/src/atoms/gv-message.js +0 -1
- package/src/atoms/gv-metric.js +0 -1
- package/src/atoms/gv-relative-time.js +0 -1
- package/src/atoms/gv-select-native.js +0 -1
- package/src/atoms/gv-select.js +0 -1
- package/src/atoms/gv-spinner.js +0 -1
- package/src/atoms/gv-state.js +0 -1
- package/src/atoms/gv-switch.js +0 -1
- package/src/atoms/gv-tag.js +0 -1
- package/src/atoms/gv-text.js +0 -1
- package/src/charts/gv-chart-bar.js +0 -1
- package/src/charts/gv-chart-gauge.js +0 -1
- package/src/charts/gv-chart-histogram.js +0 -1
- package/src/charts/gv-chart-line.js +0 -1
- package/src/charts/gv-chart-map.js +0 -1
- package/src/charts/gv-chart-pie.js +0 -1
- package/src/index.js +0 -1
- package/src/lib/cron-expression.js +0 -1
- package/src/lib/date.js +0 -1
- package/src/lib/events.js +0 -1
- package/src/lib/http-client-schema-form.js +0 -1
- package/src/lib/http.js +0 -1
- package/src/lib/i18n.js +0 -1
- package/src/lib/item.js +0 -1
- package/src/lib/properties.js +0 -1
- package/src/lib/schema-form.js +0 -1
- package/src/lib/studio.js +0 -1
- package/src/lib/style.js +0 -1
- package/src/lib/text-format.js +0 -1
- package/src/lib/theme.js +0 -1
- package/src/lib/utils.js +0 -1
- package/src/mixins/chart-element.js +0 -1
- package/src/mixins/input-element.js +0 -1
- package/src/mixins/item-resource.js +0 -1
- package/src/mixins/keyboard-element.js +0 -1
- package/src/mixins/update-after-browser.js +0 -1
- package/src/mixins/with-resize-observer.js +0 -1
- package/src/mixins/with-skeleton-attribute.js +0 -1
- package/src/molecules/gv-card-full.js +0 -1
- package/src/molecules/gv-card-list.js +0 -1
- package/src/molecules/gv-card.js +0 -1
- package/src/molecules/gv-category-list.js +0 -1
- package/src/molecules/gv-category.js +0 -1
- package/src/molecules/gv-code.js +0 -1
- package/src/molecules/gv-confirm.js +0 -1
- package/src/molecules/gv-cron-editor.js +0 -1
- package/src/molecules/gv-dropdown-menu.js +0 -1
- package/src/molecules/gv-expandable.js +0 -1
- package/src/molecules/gv-expression-language.js +0 -1
- package/src/molecules/gv-identity-picture.js +0 -1
- package/src/molecules/gv-list.js +0 -1
- package/src/molecules/gv-metrics.js +0 -1
- package/src/molecules/gv-modal.js +0 -1
- package/src/molecules/gv-nav.js +0 -1
- package/src/molecules/gv-option.js +0 -1
- package/src/molecules/gv-plans.js +0 -1
- package/src/molecules/gv-popover.js +0 -1
- package/src/molecules/gv-promote.js +0 -1
- package/src/molecules/gv-rating-list.js +0 -1
- package/src/molecules/gv-rating.js +0 -1
- package/src/molecules/gv-row-expandable.js +0 -1
- package/src/molecules/gv-row.js +0 -1
- package/src/molecules/gv-stats.js +0 -1
- package/src/molecules/gv-stepper.js +0 -1
- package/src/molecules/gv-table.js +0 -1
- package/src/molecules/gv-tree.js +0 -1
- package/src/organisms/gv-documentation.js +0 -1
- package/src/organisms/gv-header.js +0 -1
- package/src/organisms/gv-http-client.js +0 -1
- package/src/organisms/gv-menu.js +0 -1
- package/src/organisms/gv-newsletter-subscription.js +0 -1
- package/src/organisms/gv-pagination.js +0 -1
- package/src/organisms/gv-properties.js +0 -1
- package/src/organisms/gv-resizable-views.js +0 -1
- package/src/organisms/gv-resources.js +0 -1
- package/src/organisms/gv-schema-form-array.js +0 -1
- package/src/organisms/gv-schema-form-control-object.js +0 -1
- package/src/organisms/gv-schema-form-control.js +0 -1
- package/src/organisms/gv-schema-form.js +0 -1
- package/src/organisms/gv-tabs.js +0 -1
- package/src/organisms/gv-user-menu.js +0 -1
- package/src/organisms/gv-vertical-menu.js +0 -1
- package/src/policy-studio/gv-flow-step.js +0 -1
- package/src/policy-studio/gv-flow.js +0 -1
- package/src/policy-studio/gv-policy-studio-menu.js +0 -1
- package/src/policy-studio/gv-policy-studio.js +0 -1
- package/src/styles/empty.js +0 -1
- package/src/styles/input.js +0 -1
- package/src/styles/link.js +0 -1
- package/src/styles/shapes.js +0 -1
- package/src/styles/skeleton.js +0 -1
- package/src/styles/zoom.js +0 -1
- package/src/theme/gv-theme.js +0 -1
- package/wc/gv-autocomplete.js +0 -1
- package/wc/gv-button.js +0 -1
- package/wc/gv-card-full.js +0 -1
- package/wc/gv-card-list.js +0 -1
- package/wc/gv-card.js +0 -1
- package/wc/gv-category-list.js +0 -1
- package/wc/gv-category.js +0 -1
- package/wc/gv-chart-bar.js +0 -1
- package/wc/gv-chart-gauge.js +0 -1
- package/wc/gv-chart-histogram.js +0 -1
- package/wc/gv-chart-line.js +0 -1
- package/wc/gv-chart-map.js +0 -1
- package/wc/gv-chart-pie.js +0 -1
- package/wc/gv-checkbox.js +0 -1
- package/wc/gv-code.js +0 -1
- package/wc/gv-confirm.js +0 -1
- package/wc/gv-cron-editor.js +0 -1
- package/wc/gv-date-picker-calendar.js +0 -1
- package/wc/gv-date-picker-cell.js +0 -1
- package/wc/gv-date-picker.js +0 -1
- package/wc/gv-documentation.js +0 -1
- package/wc/gv-dropdown-menu.js +0 -1
- package/wc/gv-expandable.js +0 -1
- package/wc/gv-expression-language.js +0 -1
- package/wc/gv-file-upload.js +0 -1
- package/wc/gv-flow-step.js +0 -1
- package/wc/gv-flow.js +0 -1
- package/wc/gv-header.js +0 -1
- package/wc/gv-http-client.js +0 -1
- package/wc/gv-icon.js +0 -1
- package/wc/gv-identity-picture.js +0 -1
- package/wc/gv-image.js +0 -1
- package/wc/gv-input-message.js +0 -1
- package/wc/gv-input.js +0 -1
- package/wc/gv-link.js +0 -1
- package/wc/gv-list.js +0 -1
- package/wc/gv-menu.js +0 -1
- package/wc/gv-message.js +0 -1
- package/wc/gv-metric.js +0 -1
- package/wc/gv-metrics.js +0 -1
- package/wc/gv-modal.js +0 -1
- package/wc/gv-nav.js +0 -1
- package/wc/gv-newsletter-subscription.js +0 -1
- package/wc/gv-option.js +0 -1
- package/wc/gv-pagination.js +0 -1
- package/wc/gv-plans.js +0 -1
- package/wc/gv-policy-studio-menu.js +0 -1
- package/wc/gv-policy-studio.js +0 -1
- package/wc/gv-popover.js +0 -1
- package/wc/gv-promote.js +0 -1
- package/wc/gv-properties.js +0 -1
- package/wc/gv-rating-list.js +0 -1
- package/wc/gv-rating.js +0 -1
- package/wc/gv-relative-time.js +0 -1
- package/wc/gv-resizable-views.js +0 -1
- package/wc/gv-resources.js +0 -1
- package/wc/gv-row-expandable.js +0 -1
- package/wc/gv-row.js +0 -1
- package/wc/gv-schema-form-array.js +0 -1
- package/wc/gv-schema-form-control-object.js +0 -1
- package/wc/gv-schema-form-control.js +0 -1
- package/wc/gv-schema-form.js +0 -1
- package/wc/gv-select-native.js +0 -1
- package/wc/gv-select.js +0 -1
- package/wc/gv-spinner.js +0 -1
- package/wc/gv-state.js +0 -1
- package/wc/gv-stats.js +0 -1
- package/wc/gv-stepper.js +0 -1
- package/wc/gv-switch.js +0 -1
- package/wc/gv-table.js +0 -1
- package/wc/gv-tabs.js +0 -1
- package/wc/gv-tag.js +0 -1
- package/wc/gv-text.js +0 -1
- package/wc/gv-theme.js +0 -1
- package/wc/gv-tree.js +0 -1
- package/wc/gv-user-menu.js +0 -1
- package/wc/gv-vertical-menu.js +0 -1
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
declare const GvSelectNative_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_id: string;
|
|
5
|
+
valid: boolean;
|
|
6
|
+
invalid: boolean;
|
|
7
|
+
updateState(value: any): void;
|
|
8
|
+
setValidity(isInvalid?: boolean, violation?: string): void;
|
|
9
|
+
firstUpdated(): void;
|
|
10
|
+
updated(changedProperties: any): void;
|
|
11
|
+
getInputElement(): any;
|
|
12
|
+
readonly offsetHeight: any;
|
|
13
|
+
renderLabel(): "" | import("lit-html").TemplateResult<1>;
|
|
14
|
+
};
|
|
15
|
+
[x: string]: any;
|
|
16
|
+
readonly properties: {
|
|
17
|
+
disabled: {
|
|
18
|
+
type: BooleanConstructor;
|
|
19
|
+
reflect: boolean;
|
|
20
|
+
};
|
|
21
|
+
required: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
reflect: boolean;
|
|
24
|
+
};
|
|
25
|
+
readonly: {
|
|
26
|
+
type: BooleanConstructor;
|
|
27
|
+
reflect: boolean;
|
|
28
|
+
};
|
|
29
|
+
skeleton: {
|
|
30
|
+
type: BooleanConstructor;
|
|
31
|
+
};
|
|
32
|
+
value: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
reflect: boolean;
|
|
35
|
+
};
|
|
36
|
+
label: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
title: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
};
|
|
42
|
+
name: {
|
|
43
|
+
type: StringConstructor;
|
|
44
|
+
};
|
|
45
|
+
placeholder: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
};
|
|
48
|
+
description: {
|
|
49
|
+
type: StringConstructor;
|
|
50
|
+
};
|
|
51
|
+
autofocus: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
};
|
|
54
|
+
invalid: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
reflect: boolean;
|
|
57
|
+
};
|
|
58
|
+
valid: {
|
|
59
|
+
type: BooleanConstructor;
|
|
60
|
+
reflect: boolean;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
readonly styles: import("lit").CSSResult[];
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A select native component.
|
|
67
|
+
*
|
|
68
|
+
* @fires gv-select:select - Event when user select a value (deprecated, use gv-select:input)
|
|
69
|
+
* @fires gv-select:input - Event when user select a value
|
|
70
|
+
*
|
|
71
|
+
* @attr {Boolean} disabled - same as native select element `disabled` attribute
|
|
72
|
+
* @attr {Boolean} required - same as native select element `required` attribute
|
|
73
|
+
* @attr {Boolean} skeleton - enable skeleton screen UI pattern (loading hint)
|
|
74
|
+
* @attr {Array} options - the options of the select
|
|
75
|
+
* @attr {String | Array} value - the value of the select
|
|
76
|
+
* @attr {String} label - label of the select
|
|
77
|
+
* @attr {String} title - title of the select
|
|
78
|
+
* @attr {String} name - name of the select
|
|
79
|
+
* @attr {String} placeholder - an example value to display in the select when empty
|
|
80
|
+
* @attr {String} description - a description
|
|
81
|
+
* @attr {Boolean} multiple - enable multiple selection
|
|
82
|
+
*
|
|
83
|
+
* @cssprop {Color} [--gv-select--bgc=var(--gv-theme-neutral-color-lightest, #ffffff)] - Background color
|
|
84
|
+
* @cssprop {Color} [--gv-select--bdc=var(--gv-theme-neutral-color-dark, #d9d9d9)] - Border color
|
|
85
|
+
* @cssprop {Color} [--gv-select--c=var(--gv-theme-font-color-dark, #262626)] - Color
|
|
86
|
+
* @cssprop {Color} [--gv-select-hover--bgc=var(--gv-theme-color-light, #86c3d0)] - Hover background color
|
|
87
|
+
* @cssprop {Color} [--gv-select-selected--bgc=var(--gv-theme-neutral-color-light, #efefef)] - Selected background color
|
|
88
|
+
*/
|
|
89
|
+
export class GvSelectNative extends GvSelectNative_base {
|
|
90
|
+
static get properties(): {
|
|
91
|
+
options: {
|
|
92
|
+
type: ArrayConstructor;
|
|
93
|
+
};
|
|
94
|
+
_options: {
|
|
95
|
+
type: ArrayConstructor;
|
|
96
|
+
attribute: boolean;
|
|
97
|
+
};
|
|
98
|
+
large: {
|
|
99
|
+
type: BooleanConstructor;
|
|
100
|
+
};
|
|
101
|
+
medium: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
};
|
|
104
|
+
small: {
|
|
105
|
+
type: BooleanConstructor;
|
|
106
|
+
};
|
|
107
|
+
value: {
|
|
108
|
+
type: number;
|
|
109
|
+
};
|
|
110
|
+
label: {
|
|
111
|
+
type: StringConstructor;
|
|
112
|
+
};
|
|
113
|
+
title: {
|
|
114
|
+
type: StringConstructor;
|
|
115
|
+
};
|
|
116
|
+
name: {
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
};
|
|
119
|
+
placeholder: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
};
|
|
122
|
+
description: {
|
|
123
|
+
type: StringConstructor;
|
|
124
|
+
};
|
|
125
|
+
multiple: {
|
|
126
|
+
type: BooleanConstructor;
|
|
127
|
+
reflect: boolean;
|
|
128
|
+
};
|
|
129
|
+
disabled: {
|
|
130
|
+
type: BooleanConstructor;
|
|
131
|
+
reflect: boolean;
|
|
132
|
+
};
|
|
133
|
+
required: {
|
|
134
|
+
type: BooleanConstructor;
|
|
135
|
+
reflect: boolean;
|
|
136
|
+
};
|
|
137
|
+
readonly: {
|
|
138
|
+
type: BooleanConstructor;
|
|
139
|
+
reflect: boolean;
|
|
140
|
+
};
|
|
141
|
+
skeleton: {
|
|
142
|
+
type: BooleanConstructor;
|
|
143
|
+
};
|
|
144
|
+
autofocus: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
};
|
|
147
|
+
invalid: {
|
|
148
|
+
type: BooleanConstructor;
|
|
149
|
+
reflect: boolean;
|
|
150
|
+
};
|
|
151
|
+
valid: {
|
|
152
|
+
type: BooleanConstructor;
|
|
153
|
+
reflect: boolean;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
_options: {
|
|
157
|
+
label: string;
|
|
158
|
+
value: string;
|
|
159
|
+
disabled: boolean;
|
|
160
|
+
title: null;
|
|
161
|
+
}[];
|
|
162
|
+
willUpdate(changedProperties: any): void;
|
|
163
|
+
_onEnter(e: any): void;
|
|
164
|
+
_onLeave(): void;
|
|
165
|
+
_onInput(e: any): void;
|
|
166
|
+
value: any;
|
|
167
|
+
_onClear(): void;
|
|
168
|
+
set options(arg: any);
|
|
169
|
+
selectedLabel(): string;
|
|
170
|
+
renderSelect(): import("lit-html").TemplateResult<1>;
|
|
171
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
172
|
+
isSelected(option: any): any;
|
|
173
|
+
}
|
|
174
|
+
export {};
|
|
@@ -0,0 +1,363 @@
|
|
|
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 { classMap } from 'lit/directives/class-map';
|
|
17
|
+
import { ifDefined } from 'lit/directives/if-defined';
|
|
18
|
+
import { repeat } from 'lit/directives/repeat';
|
|
19
|
+
import { css, html, LitElement } from 'lit';
|
|
20
|
+
import { skeleton } from '../styles/skeleton';
|
|
21
|
+
import { link } from '../styles/link';
|
|
22
|
+
import { input } from '../styles/input';
|
|
23
|
+
import { dispatchCustomEvent } from '../lib/events';
|
|
24
|
+
import { InputElement } from '../mixins/input-element';
|
|
25
|
+
import { i18n } from '../lib/i18n';
|
|
26
|
+
/**
|
|
27
|
+
* A select native component.
|
|
28
|
+
*
|
|
29
|
+
* @fires gv-select:select - Event when user select a value (deprecated, use gv-select:input)
|
|
30
|
+
* @fires gv-select:input - Event when user select a value
|
|
31
|
+
*
|
|
32
|
+
* @attr {Boolean} disabled - same as native select element `disabled` attribute
|
|
33
|
+
* @attr {Boolean} required - same as native select element `required` attribute
|
|
34
|
+
* @attr {Boolean} skeleton - enable skeleton screen UI pattern (loading hint)
|
|
35
|
+
* @attr {Array} options - the options of the select
|
|
36
|
+
* @attr {String | Array} value - the value of the select
|
|
37
|
+
* @attr {String} label - label of the select
|
|
38
|
+
* @attr {String} title - title of the select
|
|
39
|
+
* @attr {String} name - name of the select
|
|
40
|
+
* @attr {String} placeholder - an example value to display in the select when empty
|
|
41
|
+
* @attr {String} description - a description
|
|
42
|
+
* @attr {Boolean} multiple - enable multiple selection
|
|
43
|
+
*
|
|
44
|
+
* @cssprop {Color} [--gv-select--bgc=var(--gv-theme-neutral-color-lightest, #ffffff)] - Background color
|
|
45
|
+
* @cssprop {Color} [--gv-select--bdc=var(--gv-theme-neutral-color-dark, #d9d9d9)] - Border color
|
|
46
|
+
* @cssprop {Color} [--gv-select--c=var(--gv-theme-font-color-dark, #262626)] - Color
|
|
47
|
+
* @cssprop {Color} [--gv-select-hover--bgc=var(--gv-theme-color-light, #86c3d0)] - Hover background color
|
|
48
|
+
* @cssprop {Color} [--gv-select-selected--bgc=var(--gv-theme-neutral-color-light, #efefef)] - Selected background color
|
|
49
|
+
*/
|
|
50
|
+
export class GvSelectNative extends InputElement(LitElement) {
|
|
51
|
+
static get properties() {
|
|
52
|
+
return {
|
|
53
|
+
...super.properties,
|
|
54
|
+
options: { type: Array },
|
|
55
|
+
_options: { type: Array, attribute: false },
|
|
56
|
+
large: { type: Boolean },
|
|
57
|
+
medium: { type: Boolean },
|
|
58
|
+
small: { type: Boolean },
|
|
59
|
+
value: { type: String | Array },
|
|
60
|
+
label: { type: String },
|
|
61
|
+
title: { type: String },
|
|
62
|
+
name: { type: String },
|
|
63
|
+
placeholder: { type: String },
|
|
64
|
+
description: { type: String },
|
|
65
|
+
multiple: { type: Boolean, reflect: true },
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
static get styles() {
|
|
69
|
+
return [
|
|
70
|
+
...super.styles,
|
|
71
|
+
skeleton,
|
|
72
|
+
input,
|
|
73
|
+
link,
|
|
74
|
+
// language=CSS
|
|
75
|
+
css `
|
|
76
|
+
.box {
|
|
77
|
+
--bdc: var(--gv-select--bdc, var(--gv-theme-neutral-color-dark, #d9d9d9));
|
|
78
|
+
--c: var(--gv-select--c, var(--gv-theme-font-color-dark, #262626));
|
|
79
|
+
--bgc: var(--gv-select--bgc, var(--gv-theme-neutral-color-lightest, #ffffff));
|
|
80
|
+
--bgc-list: var(--gv-select--list-bgc, var(--gv-select--bgc, var(--gv-theme-neutral-color-lightest, #ffffff)));
|
|
81
|
+
--hover-bgc: var(--gv-select-hover--bgc, var(--gv-theme-color-light, #86c3d0));
|
|
82
|
+
--selected-bgc: var(--gv-select-selected--bgc, var(--gv-theme-neutral-color-light, #efefef));
|
|
83
|
+
position: relative;
|
|
84
|
+
color: var(--c);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host([readonly]) div,
|
|
88
|
+
:host([readonly]) input,
|
|
89
|
+
:host([readonly]) input:read-only:hover {
|
|
90
|
+
user-select: auto;
|
|
91
|
+
cursor: text;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
input:read-only:hover {
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
label {
|
|
99
|
+
color: var(--c);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
select,
|
|
103
|
+
.multiple .input {
|
|
104
|
+
background-image: linear-gradient(45deg, transparent 50%, var(--c) 50%), linear-gradient(135deg, var(--c) 50%, transparent 50%),
|
|
105
|
+
linear-gradient(to right, #ccc, #ccc);
|
|
106
|
+
background-position: calc(100% - 17px) calc(1em + 2px), calc(100% - 12px) calc(1em + 2px), calc(100% - 2.5em) 0.5em;
|
|
107
|
+
background-size: 5px 5px, 5px 5px, 1px 1.5em;
|
|
108
|
+
background-repeat: no-repeat;
|
|
109
|
+
-webkit-appearance: none;
|
|
110
|
+
appearance: none;
|
|
111
|
+
background-color: var(--bgc);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.multiple .input {
|
|
115
|
+
padding-right: 35px;
|
|
116
|
+
text-overflow: ellipsis;
|
|
117
|
+
white-space: nowrap;
|
|
118
|
+
overflow: hidden;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.multiple gv-icon {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.multiple.not-empty :not(.show) .input {
|
|
126
|
+
background-image: none, linear-gradient(155deg, var(--c) 0%, transparent 0%), linear-gradient(to right, #ccc, #ccc);
|
|
127
|
+
}
|
|
128
|
+
.multiple.not-empty gv-icon {
|
|
129
|
+
display: block;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.small .multiple .input {
|
|
133
|
+
padding-right: 30px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.small select,
|
|
137
|
+
.small.multiple .input {
|
|
138
|
+
background-position: calc(100% - 16px) calc(0.8em), calc(100% - 11px) calc(0.8em), calc(100% - 2.5em) 0.5em;
|
|
139
|
+
background-size: 5px 5px, 5px 5px, 1px 1em;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.multiple select {
|
|
143
|
+
opacity: 0;
|
|
144
|
+
position: absolute;
|
|
145
|
+
left: 0;
|
|
146
|
+
top: 0;
|
|
147
|
+
max-height: var(--input-medium--h);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.multiple .show {
|
|
151
|
+
min-height: 75px;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.multiple .show select {
|
|
155
|
+
opacity: 1;
|
|
156
|
+
z-index: 1000;
|
|
157
|
+
max-height: 300px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
gv-icon {
|
|
161
|
+
--gv-icon--s: 19px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.medium gv-icon {
|
|
165
|
+
--gv-icon--s: 14px;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.small gv-icon {
|
|
169
|
+
--gv-icon--s: 11px;
|
|
170
|
+
}
|
|
171
|
+
`,
|
|
172
|
+
];
|
|
173
|
+
}
|
|
174
|
+
constructor() {
|
|
175
|
+
super();
|
|
176
|
+
this._options = [{ label: '', value: '', disabled: false, title: null }];
|
|
177
|
+
}
|
|
178
|
+
getInputElement() {
|
|
179
|
+
return this.shadowRoot.querySelector('select');
|
|
180
|
+
}
|
|
181
|
+
async firstUpdated(changedProperties) {
|
|
182
|
+
super.firstUpdated(changedProperties);
|
|
183
|
+
// Give the browser a chance to paint
|
|
184
|
+
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
185
|
+
const input = this.getInputElement();
|
|
186
|
+
if (input) {
|
|
187
|
+
input.addEventListener('input', this._onInput.bind(this));
|
|
188
|
+
if (this.multiple) {
|
|
189
|
+
input.addEventListener('mousedown', this._onEnter.bind(this));
|
|
190
|
+
input.addEventListener('focus', this._onEnter.bind(this));
|
|
191
|
+
input.addEventListener('mouseleave', this._onLeave.bind(this));
|
|
192
|
+
input.addEventListener('blur', this._onLeave.bind(this));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
willUpdate(changedProperties) {
|
|
197
|
+
if (changedProperties.has('value')) {
|
|
198
|
+
this.updateState(this.value);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
updateState(value) {
|
|
202
|
+
super.updateState(value);
|
|
203
|
+
if (value && this._options && this.valid) {
|
|
204
|
+
if (this.multiple) {
|
|
205
|
+
if (this.required) {
|
|
206
|
+
this.setValidity(value.length === 0, 'field is required');
|
|
207
|
+
}
|
|
208
|
+
if (value.length > 0 && this.valid) {
|
|
209
|
+
const possibleValues = this._options.map((o) => o.value);
|
|
210
|
+
this.setValidity(!value.some((v) => possibleValues.includes(v)), 'value is not included in the possible values');
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.setValidity(this.required && this._options.find((option) => option.value === value) == null, 'value is not included in the possible values');
|
|
215
|
+
}
|
|
216
|
+
this.invalid = !this.valid;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
_onEnter(e) {
|
|
220
|
+
const input = this.getInputElement();
|
|
221
|
+
if (!input.parentNode.classList.contains('show')) {
|
|
222
|
+
e.stopPropagation();
|
|
223
|
+
e.preventDefault();
|
|
224
|
+
input.parentNode.classList.add('show');
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
_onLeave() {
|
|
228
|
+
this.getInputElement().parentNode.classList.remove('show');
|
|
229
|
+
}
|
|
230
|
+
_onInput(e) {
|
|
231
|
+
e.stopPropagation();
|
|
232
|
+
if (this.multiple) {
|
|
233
|
+
const options = this.getInputElement().querySelectorAll('option:checked');
|
|
234
|
+
this.value = Array.from(options).map((o) => o.value);
|
|
235
|
+
}
|
|
236
|
+
else {
|
|
237
|
+
this.value = e.target.value;
|
|
238
|
+
}
|
|
239
|
+
this.updateState(this.value);
|
|
240
|
+
dispatchCustomEvent(this, 'select', this.value);
|
|
241
|
+
dispatchCustomEvent(this, 'input', this.value);
|
|
242
|
+
this.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));
|
|
243
|
+
}
|
|
244
|
+
_onClear() {
|
|
245
|
+
Array.from(this.getInputElement().querySelectorAll('option:checked')).forEach((option) => option.removeAttribute('checked'));
|
|
246
|
+
this.value = [];
|
|
247
|
+
dispatchCustomEvent(this, 'select', this.value);
|
|
248
|
+
dispatchCustomEvent(this, 'input', this.value);
|
|
249
|
+
this.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));
|
|
250
|
+
}
|
|
251
|
+
set options(options) {
|
|
252
|
+
if (options) {
|
|
253
|
+
this._options = options.map((option) => {
|
|
254
|
+
if (typeof option !== 'object') {
|
|
255
|
+
return { value: option, label: option };
|
|
256
|
+
}
|
|
257
|
+
else if (!option.label) {
|
|
258
|
+
return { value: option.value, label: option.value };
|
|
259
|
+
}
|
|
260
|
+
return option;
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
selectedLabel() {
|
|
265
|
+
if (this.value != null) {
|
|
266
|
+
const elements = this._options.filter((o) => this.isSelected(o));
|
|
267
|
+
if (elements) {
|
|
268
|
+
return elements.map((e) => e.label).join(', ');
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return '';
|
|
272
|
+
}
|
|
273
|
+
renderSelect() {
|
|
274
|
+
const selectedLabel = this.selectedLabel();
|
|
275
|
+
if (this.readonly) {
|
|
276
|
+
return html `
|
|
277
|
+
<input
|
|
278
|
+
id=${this._id}
|
|
279
|
+
type="text"
|
|
280
|
+
.name=${ifDefined(this.name)}
|
|
281
|
+
.title=${ifDefined(selectedLabel || this.title || this.label)}
|
|
282
|
+
.required=${this.required}
|
|
283
|
+
aria-required=${!!this.required}
|
|
284
|
+
.placeholder=${ifDefined(this.placeholder)}
|
|
285
|
+
.value=${selectedLabel}
|
|
286
|
+
readonly="readonly"
|
|
287
|
+
/>
|
|
288
|
+
`;
|
|
289
|
+
}
|
|
290
|
+
else if (this.multiple) {
|
|
291
|
+
const height = this._options ? this._options.length * (this.small ? 20 : 25) : 50;
|
|
292
|
+
return html `
|
|
293
|
+
<input
|
|
294
|
+
class="input"
|
|
295
|
+
type="text"
|
|
296
|
+
.name=${ifDefined(this.name)}
|
|
297
|
+
.title=${ifDefined(selectedLabel || this.title || this.label)}
|
|
298
|
+
.required=${this.required}
|
|
299
|
+
aria-required=${!!this.required}
|
|
300
|
+
.placeholder=${ifDefined(this.placeholder)}
|
|
301
|
+
.value=${selectedLabel}
|
|
302
|
+
readonly="readonly"
|
|
303
|
+
/>
|
|
304
|
+
<select
|
|
305
|
+
class="input"
|
|
306
|
+
id=${this._id}
|
|
307
|
+
.name=${ifDefined(this.name)}
|
|
308
|
+
.title=${ifDefined(selectedLabel || this.title || this.label)}
|
|
309
|
+
.required=${this.required}
|
|
310
|
+
aria-required=${!!this.required}
|
|
311
|
+
?disabled=${this.disabled || this.skeleton}
|
|
312
|
+
.placeholder=${ifDefined(this.placeholder)}
|
|
313
|
+
multiple
|
|
314
|
+
.size="${this._options.length}"
|
|
315
|
+
style="height: ${height}px"
|
|
316
|
+
>
|
|
317
|
+
${this._options &&
|
|
318
|
+
repeat(this._options, (option) => option, (option) => html ` <option value="${option.value || ''}" ?selected="${this.isSelected(option)}">${option.label}</option> `)}
|
|
319
|
+
</select>
|
|
320
|
+
<div class="box-icon box-icon-clear">
|
|
321
|
+
<gv-icon class="link" shape="code:error" title="${i18n('gv-input.clear')}" @click="${this._onClear}"></gv-icon>
|
|
322
|
+
</div>
|
|
323
|
+
`;
|
|
324
|
+
}
|
|
325
|
+
else {
|
|
326
|
+
return html `<select
|
|
327
|
+
class="input"
|
|
328
|
+
id=${this._id}
|
|
329
|
+
.name=${ifDefined(this.name)}
|
|
330
|
+
.title=${ifDefined(selectedLabel || this.title || this.label)}
|
|
331
|
+
.required=${this.required}
|
|
332
|
+
aria-required=${!!this.required}
|
|
333
|
+
?disabled=${this.disabled || this.skeleton}
|
|
334
|
+
.placeholder=${ifDefined(this.placeholder)}
|
|
335
|
+
>
|
|
336
|
+
${this._options &&
|
|
337
|
+
repeat(this._options, (option) => option, (option) => html ` <option value="${option.value || ''}" ?selected="${this.isSelected(option)}">${option.label}</option>`)}
|
|
338
|
+
</select>`;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
render() {
|
|
342
|
+
const classes = {
|
|
343
|
+
box: true,
|
|
344
|
+
large: this.large,
|
|
345
|
+
medium: this.medium || (!this.large && !this.small),
|
|
346
|
+
small: this.small,
|
|
347
|
+
skeleton: this.skeleton,
|
|
348
|
+
required: this.required,
|
|
349
|
+
multiple: this.multiple,
|
|
350
|
+
'not-empty': this._options && this.multiple && this.value && this.value.length > 0,
|
|
351
|
+
};
|
|
352
|
+
return html `
|
|
353
|
+
<div class="${classMap(classes)}">
|
|
354
|
+
<div class="box-input">${this.renderLabel()} ${this.renderSelect()}</div>
|
|
355
|
+
</div>
|
|
356
|
+
${this.description != null ? html `<div class="description" .innerHTML="${this.description}"></div>` : ''}
|
|
357
|
+
`;
|
|
358
|
+
}
|
|
359
|
+
isSelected(option) {
|
|
360
|
+
return this.multiple ? this.value && this.value.includes(option.value) : '' + this.value === '' + option.value;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
window.customElements.define('gv-select-native', GvSelectNative);
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
declare const GvSelect_base: {
|
|
2
|
+
new (): {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
_onResize({ width }: {
|
|
5
|
+
width: any;
|
|
6
|
+
}): void;
|
|
7
|
+
connectedCallback(): Promise<void>;
|
|
8
|
+
_unobserveResize: (() => any) | undefined;
|
|
9
|
+
disconnectedCallback(): void;
|
|
10
|
+
};
|
|
11
|
+
[x: string]: any;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A select component, is more like a list box...
|
|
15
|
+
* ⚠️ Please use `<gv-select-native>` component if you don't need strong customization.
|
|
16
|
+
* ⚠️ DO NO USE IT inside a `<gv-table>` component to avoid any scroll or overlapping issue.
|
|
17
|
+
*
|
|
18
|
+
* ## Details
|
|
19
|
+
* * has @theme facet
|
|
20
|
+
*
|
|
21
|
+
* @fires gv-select:select - Event when user select a value (deprecated, use gv-select:input)
|
|
22
|
+
* @fires gv-select:input - Event when user select a value
|
|
23
|
+
*
|
|
24
|
+
* @attr {Boolean} disabled - same as native select element `disabled` attribute
|
|
25
|
+
* @attr {Boolean} required - same as native select element `required` attribute
|
|
26
|
+
* @attr {Boolean} skeleton - enable skeleton screen UI pattern (loading hint)
|
|
27
|
+
* @attr {Array} options - the options of the select
|
|
28
|
+
* @attr {String | Array} value - the value of the select
|
|
29
|
+
* @attr {String} label - label of the select
|
|
30
|
+
* @attr {String} title - title of the select
|
|
31
|
+
* @attr {String} name - name of the select
|
|
32
|
+
* @attr {String} placeholder - an example value to display in the select when empty
|
|
33
|
+
* @attr {String} description - a description
|
|
34
|
+
* @attr {Boolean} multiple - enable multiple selection
|
|
35
|
+
*
|
|
36
|
+
* @cssprop {Color} [--gv-select--bgc=var(--gv-theme-neutral-color-lightest, #ffffff)] - Background color
|
|
37
|
+
* @cssprop {Color} [--gv-select--list-bgc=var(--gv-select--bgc, var(--gv-theme-neutral-color-lightest, #ffffff))] - List items background color
|
|
38
|
+
* @cssprop {Color} [--gv-select--bdc=var(--gv-theme-neutral-color-dark, #d9d9d9)] - Border color
|
|
39
|
+
* @cssprop {Color} [--gv-select--c=var(--gv-theme-font-color-dark, #262626)] - Color
|
|
40
|
+
* @cssprop {Color} [--gv-select-hover--bgc=var(--gv-theme-color-light, #86c3d0)] - Hover background color
|
|
41
|
+
* @cssprop {Color} [--gv-select-selected--bgc=var(--gv-theme-neutral-color-light, #efefef)] - Selected background color
|
|
42
|
+
*/
|
|
43
|
+
export class GvSelect extends GvSelect_base {
|
|
44
|
+
static get properties(): any;
|
|
45
|
+
static get styles(): any[];
|
|
46
|
+
_type: string;
|
|
47
|
+
_isClosed: boolean;
|
|
48
|
+
_options: {
|
|
49
|
+
label: string;
|
|
50
|
+
value: string;
|
|
51
|
+
disabled: boolean;
|
|
52
|
+
title: null;
|
|
53
|
+
}[];
|
|
54
|
+
_handleDocumentClick: () => void;
|
|
55
|
+
willUpdate(changedProperties: any): void;
|
|
56
|
+
updateState(value: any): void;
|
|
57
|
+
invalid: boolean | undefined;
|
|
58
|
+
close(): void;
|
|
59
|
+
_onDocumentClick(): void;
|
|
60
|
+
_onClick(e: any): void;
|
|
61
|
+
_onSelect(option: any, e: any): void;
|
|
62
|
+
value: any;
|
|
63
|
+
_onClear(): void;
|
|
64
|
+
_renderIcon(): "" | import("lit-html").TemplateResult<1>;
|
|
65
|
+
set options(arg: any);
|
|
66
|
+
selectedLabel(): string;
|
|
67
|
+
onResize(): void;
|
|
68
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
69
|
+
isSelected(option: any): any;
|
|
70
|
+
}
|
|
71
|
+
export {};
|