From b3ecb5e9c6fbf789c251bda277a24d0ae5eaa84a Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Mon, 19 Feb 2024 09:15:18 -0500 Subject: [PATCH 1/7] Updated Lazy document to handle viewing PDF's without downloading. --- .vscode/settings.json | 4 + packages/controlled-vocabulary/package.json | 6 +- packages/geospatial/package.json | 2 +- packages/semantic-ui/package.json | 4 +- .../src/components/AnnotationLayer.css | 329 ++++++++++++++++++ .../semantic-ui/src/components/FacetSlider.js | 12 +- .../src/components/LazyDocument.js | 36 +- .../semantic-ui/src/components/TextLayer.css | 110 ++++++ .../src/components/ViewPDFButton.js | 68 ++++ .../semantic-ui/src/components/rc-slider.css | 267 ++++++++++++++ packages/semantic-ui/src/i18n/en.json | 5 +- packages/semantic-ui/src/index.js | 1 + packages/shared/package.json | 2 +- packages/storybook/src/assets/test.pdf | Bin 0 -> 3908 bytes .../src/semantic-ui/LazyDocument.stories.js | 11 + packages/user-defined-fields/package.json | 6 +- packages/visualize/package.json | 2 +- react-components.json | 4 +- 18 files changed, 841 insertions(+), 28 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 packages/semantic-ui/src/components/AnnotationLayer.css create mode 100644 packages/semantic-ui/src/components/TextLayer.css create mode 100644 packages/semantic-ui/src/components/ViewPDFButton.js create mode 100644 packages/semantic-ui/src/components/rc-slider.css create mode 100644 packages/storybook/src/assets/test.pdf diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..09a63d3e --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ +"typescript.validate.enable": false, +"javascript.validate.enable": false +} \ No newline at end of file diff --git a/packages/controlled-vocabulary/package.json b/packages/controlled-vocabulary/package.json index 1ac3016e..95afb5d9 100644 --- a/packages/controlled-vocabulary/package.json +++ b/packages/controlled-vocabulary/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/controlled-vocabulary", - "version": "1.1.3", + "version": "1.1.4-beta.9", "description": "A package of components to allow user to configure dropdown elements. Use with the \"controlled_vocabulary\" gem.", "license": "MIT", "main": "./build/index.js", @@ -12,8 +12,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.3", - "@performant-software/shared-components": "^1.1.3", + "@performant-software/semantic-components": "^1.1.4-beta.9", + "@performant-software/shared-components": "^1.1.4-beta.9", "i18next": "^21.9.2", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/geospatial/package.json b/packages/geospatial/package.json index e37e47ea..918f2fcd 100644 --- a/packages/geospatial/package.json +++ b/packages/geospatial/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/geospatial", - "version": "1.1.3", + "version": "1.1.4-beta.9", "description": "TODO: ADD", "license": "MIT", "main": "./build/index.js", diff --git a/packages/semantic-ui/package.json b/packages/semantic-ui/package.json index d4fa3d8a..857ede29 100644 --- a/packages/semantic-ui/package.json +++ b/packages/semantic-ui/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/semantic-components", - "version": "1.1.3", + "version": "1.1.4-beta.9", "description": "A package of shared components based on the Semantic UI Framework.", "license": "MIT", "main": "./build/index.js", @@ -12,7 +12,7 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/shared-components": "^1.1.3", + "@performant-software/shared-components": "^1.1.4-beta.9", "@react-google-maps/api": "^2.8.1", "axios": "^0.26.1", "i18next": "^19.4.4", diff --git a/packages/semantic-ui/src/components/AnnotationLayer.css b/packages/semantic-ui/src/components/AnnotationLayer.css new file mode 100644 index 00000000..db3f1bce --- /dev/null +++ b/packages/semantic-ui/src/components/AnnotationLayer.css @@ -0,0 +1,329 @@ +/* Copyright 2014 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +:root { + --react-pdf-annotation-layer: 1; + --annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,"); + --input-focus-border-color: Highlight; + --input-focus-outline: 1px solid Canvas; + --input-unfocused-border-color: transparent; + --input-disabled-border-color: transparent; + --input-hover-border-color: black; + --link-outline: none; +} + +@media screen and (forced-colors: active) { + :root { + --input-focus-border-color: CanvasText; + --input-unfocused-border-color: ActiveText; + --input-disabled-border-color: GrayText; + --input-hover-border-color: Highlight; + --link-outline: 1.5px solid LinkText; + } + .annotationLayer .textWidgetAnnotation :is(input, textarea):required, + .annotationLayer .choiceWidgetAnnotation select:required, + .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required { + outline: 1.5px solid selectedItem; + } + + .annotationLayer .linkAnnotation:hover { + backdrop-filter: invert(100%); + } +} + +.annotationLayer { + position: absolute; + top: 0; + left: 0; + pointer-events: none; + transform-origin: 0 0; + z-index: 3; +} + +.annotationLayer[data-main-rotation='90'] .norotate { + transform: rotate(270deg) translateX(-100%); +} +.annotationLayer[data-main-rotation='180'] .norotate { + transform: rotate(180deg) translate(-100%, -100%); +} +.annotationLayer[data-main-rotation='270'] .norotate { + transform: rotate(90deg) translateY(-100%); +} + +.annotationLayer canvas { + position: absolute; + width: 100%; + height: 100%; +} + +.annotationLayer section { + position: absolute; + text-align: initial; + pointer-events: auto; + box-sizing: border-box; + margin: 0; + transform-origin: 0 0; +} + +.annotationLayer .linkAnnotation { + outline: var(--link-outline); +} + +.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a { + position: absolute; + font-size: 1em; + top: 0; + left: 0; + width: 100%; + height: 100%; +} + +.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover { + opacity: 0.2; + background: rgba(255, 255, 0, 1); + box-shadow: 0 2px 10px rgba(255, 255, 0, 1); +} + +.annotationLayer .textAnnotation img { + position: absolute; + cursor: pointer; + width: 100%; + height: 100%; + top: 0; + left: 0; +} + +.annotationLayer .textWidgetAnnotation :is(input, textarea), +.annotationLayer .choiceWidgetAnnotation select, +.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input { + background-image: var(--annotation-unfocused-field-background); + border: 2px solid var(--input-unfocused-border-color); + box-sizing: border-box; + font: calc(9px * var(--scale-factor)) sans-serif; + height: 100%; + margin: 0; + vertical-align: top; + width: 100%; +} + +.annotationLayer .textWidgetAnnotation :is(input, textarea):required, +.annotationLayer .choiceWidgetAnnotation select:required, +.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required { + outline: 1.5px solid red; +} + +.annotationLayer .choiceWidgetAnnotation select option { + padding: 0; +} + +.annotationLayer .buttonWidgetAnnotation.radioButton input { + border-radius: 50%; +} + +.annotationLayer .textWidgetAnnotation textarea { + resize: none; +} + +.annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled], +.annotationLayer .choiceWidgetAnnotation select[disabled], +.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] { + background: none; + border: 2px solid var(--input-disabled-border-color); + cursor: not-allowed; +} + +.annotationLayer .textWidgetAnnotation :is(input, textarea):hover, +.annotationLayer .choiceWidgetAnnotation select:hover, +.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover { + border: 2px solid var(--input-hover-border-color); +} +.annotationLayer .textWidgetAnnotation :is(input, textarea):hover, +.annotationLayer .choiceWidgetAnnotation select:hover, +.annotationLayer .buttonWidgetAnnotation.checkBox input:hover { + border-radius: 2px; +} + +.annotationLayer .textWidgetAnnotation :is(input, textarea):focus, +.annotationLayer .choiceWidgetAnnotation select:focus { + background: none; + border: 2px solid var(--input-focus-border-color); + border-radius: 2px; + outline: var(--input-focus-outline); +} + +.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus { + background-image: none; + background-color: transparent; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox :focus { + border: 2px solid var(--input-focus-border-color); + border-radius: 2px; + outline: var(--input-focus-outline); +} + +.annotationLayer .buttonWidgetAnnotation.radioButton :focus { + border: 2px solid var(--input-focus-border-color); + outline: var(--input-focus-outline); +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before, +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after, +.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before { + background-color: CanvasText; + content: ''; + display: block; + position: absolute; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before, +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after { + height: 80%; + left: 45%; + width: 1px; +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before { + transform: rotate(45deg); +} + +.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after { + transform: rotate(-45deg); +} + +.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before { + border-radius: 50%; + height: 50%; + left: 30%; + top: 20%; + width: 50%; +} + +.annotationLayer .textWidgetAnnotation input.comb { + font-family: monospace; + padding-left: 2px; + padding-right: 0; +} + +.annotationLayer .textWidgetAnnotation input.comb:focus { + /* + * Letter spacing is placed on the right side of each character. Hence, the + * letter spacing of the last character may be placed outside the visible + * area, causing horizontal scrolling. We avoid this by extending the width + * when the element has focus and revert this when it loses focus. + */ + width: 103%; +} + +.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input { + appearance: none; +} + +.annotationLayer .popupTriggerArea { + height: 100%; + width: 100%; +} + +.annotationLayer .fileAttachmentAnnotation .popupTriggerArea { + position: absolute; +} + +.annotationLayer .popupWrapper { + position: absolute; + font-size: calc(9px * var(--scale-factor)); + width: 100%; + min-width: calc(180px * var(--scale-factor)); + pointer-events: none; +} + +.annotationLayer .popup { + position: absolute; + max-width: calc(180px * var(--scale-factor)); + background-color: rgba(255, 255, 153, 1); + box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) + rgba(136, 136, 136, 1); + border-radius: calc(2px * var(--scale-factor)); + padding: calc(6px * var(--scale-factor)); + margin-left: calc(5px * var(--scale-factor)); + cursor: pointer; + font: message-box; + white-space: normal; + word-wrap: break-word; + pointer-events: auto; +} + +.annotationLayer .popup > * { + font-size: calc(9px * var(--scale-factor)); +} + +.annotationLayer .popup h1 { + display: inline-block; +} + +.annotationLayer .popupDate { + display: inline-block; + margin-left: calc(5px * var(--scale-factor)); +} + +.annotationLayer .popupContent { + border-top: 1px solid rgba(51, 51, 51, 1); + margin-top: calc(2px * var(--scale-factor)); + padding-top: calc(2px * var(--scale-factor)); +} + +.annotationLayer .richText > * { + white-space: pre-wrap; + font-size: calc(9px * var(--scale-factor)); +} + +.annotationLayer .highlightAnnotation, +.annotationLayer .underlineAnnotation, +.annotationLayer .squigglyAnnotation, +.annotationLayer .strikeoutAnnotation, +.annotationLayer .freeTextAnnotation, +.annotationLayer .lineAnnotation svg line, +.annotationLayer .squareAnnotation svg rect, +.annotationLayer .circleAnnotation svg ellipse, +.annotationLayer .polylineAnnotation svg polyline, +.annotationLayer .polygonAnnotation svg polygon, +.annotationLayer .caretAnnotation, +.annotationLayer .inkAnnotation svg polyline, +.annotationLayer .stampAnnotation, +.annotationLayer .fileAttachmentAnnotation { + cursor: pointer; +} + +.annotationLayer section svg { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; +} + +.annotationLayer .annotationTextContent { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + color: transparent; + user-select: none; + pointer-events: none; +} + +.annotationLayer .annotationTextContent span { + width: 100%; + display: inline-block; +} diff --git a/packages/semantic-ui/src/components/FacetSlider.js b/packages/semantic-ui/src/components/FacetSlider.js index ce7c3c53..bc92fd07 100644 --- a/packages/semantic-ui/src/components/FacetSlider.js +++ b/packages/semantic-ui/src/components/FacetSlider.js @@ -10,7 +10,11 @@ import React, { import { Grid } from 'semantic-ui-react'; import Facet, { type Props as FacetProps } from './Facet'; import { type RangeSliderProps } from '../types/InstantSearch'; -import 'rc-slider/assets/index.css'; + +// This is copied from the rc-slider node_module. SO update if updating versions +// See https://nextjs.org/docs/messages/css-npm +import './rc-slider.css'; + import './FacetSlider.css'; type Props = FacetProps & RangeSliderProps; @@ -25,7 +29,7 @@ const FacetSlider = forwardRef(({ useRangeSlider, ...props }: Props, ref: HTMLEl refine, } = useRangeSlider(props); - const [valueView, setValueView] = useState>([range.min, range.max]); + const [valueView, setValueView] = useState < Array < number >> ([range.min, range.max]); /** * Sets the visibility variable based on the range min and max. @@ -72,12 +76,12 @@ const FacetSlider = forwardRef(({ useRangeSlider, ...props }: Props, ref: HTMLEl columns={2} > - { valueView[0] } + {valueView[0]} - { valueView[1] } + {valueView[1]} diff --git a/packages/semantic-ui/src/components/LazyDocument.js b/packages/semantic-ui/src/components/LazyDocument.js index 85bb5ab3..a0aed074 100644 --- a/packages/semantic-ui/src/components/LazyDocument.js +++ b/packages/semantic-ui/src/components/LazyDocument.js @@ -3,6 +3,7 @@ import React, { useCallback, useState, type Node } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import { + Button, Dimmer, Icon, Image, @@ -14,9 +15,13 @@ import { import DownloadButton from './DownloadButton'; import LazyLoader from './LazyLoader'; -import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; -import 'react-pdf/dist/esm/Page/TextLayer.css'; +// These are copied from the react-pdt node_module. This is for NextJS builds +// see https://nextjs.org/docs/messages/css-npm +import './AnnotationLayer.css'; +import './TextLayer.css'; + import './LazyDocument.css'; +import ViewPDFButton from './ViewPDFButton'; type Props = { children?: Node, @@ -26,6 +31,8 @@ type Props = { image?: any, pdf?: boolean, preview?: ?string, + view?: Boolean, + view_url?: String, size?: string, src?: string }; @@ -87,13 +94,13 @@ const LazyDocument = (props: Props) => { onMouseEnter={() => setDimmer(true)} onMouseLeave={() => setDimmer(false)} > - { !loaded && ( + {!loaded && ( )} - { !error && props.preview && ( + {!error && props.preview && ( { size={props.size} /> )} - { !error && loaded && !props.preview && props.src && props.pdf && ( + {!error && loaded && !props.preview && props.src && props.pdf && ( { )} - { (error || (!props.preview && !(props.src && props.pdf))) && ( + {!error && loaded && props.view && props.view_url && props.pdf && dimmer && ( + +
+ +
+
+ )} + {(error || (!props.preview && !(props.src && props.pdf))) && ( { /> )} - { (props.download || props.src || props.children) && props.dimmable && ( + {(props.download || props.src || props.children) && props.dimmable && (
- { props.download && ( + {props.download && ( )} - { props.children } + {props.children}
)} diff --git a/packages/semantic-ui/src/components/TextLayer.css b/packages/semantic-ui/src/components/TextLayer.css new file mode 100644 index 00000000..592ec1c4 --- /dev/null +++ b/packages/semantic-ui/src/components/TextLayer.css @@ -0,0 +1,110 @@ +/* Copyright 2014 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +:root { + --react-pdf-text-layer: 1; + --highlight-bg-color: rgba(180, 0, 170, 1); + --highlight-selected-bg-color: rgba(0, 100, 0, 1); +} + +@media screen and (forced-colors: active) { + :root { + --highlight-bg-color: Highlight; + --highlight-selected-bg-color: ButtonText; + } +} + +[data-main-rotation='90'] { + transform: rotate(90deg) translateY(-100%); +} +[data-main-rotation='180'] { + transform: rotate(180deg) translate(-100%, -100%); +} +[data-main-rotation='270'] { + transform: rotate(270deg) translateX(-100%); +} + +.textLayer { + position: absolute; + text-align: initial; + inset: 0; + overflow: hidden; + line-height: 1; + text-size-adjust: none; + forced-color-adjust: none; + transform-origin: 0 0; + z-index: 2; +} + +.textLayer :is(span, br) { + color: transparent; + position: absolute; + white-space: pre; + cursor: text; + margin: 0; + transform-origin: 0 0; +} + +/* Only necessary in Google Chrome, see issue 14205, and most unfortunately + * the problem doesn't show up in "text" reference tests. */ +.textLayer span.markedContent { + top: 0; + height: 0; +} + +.textLayer .highlight { + margin: -1px; + padding: 1px; + background-color: var(--highlight-bg-color); + border-radius: 4px; +} + +.textLayer .highlight.appended { + position: initial; +} + +.textLayer .highlight.begin { + border-radius: 4px 0 0 4px; +} + +.textLayer .highlight.end { + border-radius: 0 4px 4px 0; +} + +.textLayer .highlight.middle { + border-radius: 0; +} + +.textLayer .highlight.selected { + background-color: var(--highlight-selected-bg-color); +} + +/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */ +.textLayer br::selection { + background: transparent; +} + +.textLayer .endOfContent { + display: block; + position: absolute; + inset: 100% 0 0; + z-index: -1; + cursor: default; + user-select: none; +} + +.textLayer .endOfContent.active { + top: 0; +} diff --git a/packages/semantic-ui/src/components/ViewPDFButton.js b/packages/semantic-ui/src/components/ViewPDFButton.js new file mode 100644 index 00000000..db1a750e --- /dev/null +++ b/packages/semantic-ui/src/components/ViewPDFButton.js @@ -0,0 +1,68 @@ +// @flow + +import React, { useMemo } from 'react'; +import { Icon, Button } from 'semantic-ui-react'; +import i18n from '../i18n/i18n'; + +type Props = { + basic?: boolean, + className?: string, + color?: string, + compact?: boolean, + primary?: boolean, + size?: string, + secondary?: boolean, + url: string, +}; + +const ViewPDFButton = (props: Props) => { + /** + * Sets the appropriate class names based on the formatting props. + * + * @type {string} + */ + const className = useMemo(() => { + const classNames = ['ui', 'button']; + + if (props.basic) { + classNames.push('basic'); + } + + if (props.className) { + classNames.push(...props.className.split(' ')); + } + + if (props.color) { + classNames.push(props.color); + } + + if (props.compact) { + classNames.push('compact'); + } + + if (props.primary) { + classNames.push('primary'); + } + + if (props.secondary) { + classNames.push('secondary'); + } + + if (props.size) { + classNames.push(props.size); + } + + return classNames.join(' '); + }, [props.basic, props.color]); + + return ( + + ); +}; + +export default ViewPDFButton; diff --git a/packages/semantic-ui/src/components/rc-slider.css b/packages/semantic-ui/src/components/rc-slider.css new file mode 100644 index 00000000..3d521941 --- /dev/null +++ b/packages/semantic-ui/src/components/rc-slider.css @@ -0,0 +1,267 @@ +.rc-slider { + position: relative; + width: 100%; + height: 14px; + padding: 5px 0; + border-radius: 6px; + touch-action: none; + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +.rc-slider * { + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +.rc-slider-rail { + position: absolute; + width: 100%; + height: 4px; + background-color: #e9e9e9; + border-radius: 6px; +} +.rc-slider-track { + position: absolute; + height: 4px; + background-color: #abe2fb; + border-radius: 6px; +} +.rc-slider-track-draggable { + z-index: 1; + box-sizing: content-box; + background-clip: content-box; + border-top: 5px solid rgba(0, 0, 0, 0); + border-bottom: 5px solid rgba(0, 0, 0, 0); + transform: translateY(-5px); +} +.rc-slider-handle { + position: absolute; + width: 14px; + height: 14px; + margin-top: -5px; + background-color: #fff; + border: solid 2px #96dbfa; + border-radius: 50%; + cursor: pointer; + cursor: -webkit-grab; + cursor: grab; + opacity: 0.8; + touch-action: pan-x; +} +.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging { + border-color: #57c5f7; + box-shadow: 0 0 0 5px #96dbfa; +} +.rc-slider-handle:focus { + outline: none; + box-shadow: none; +} +.rc-slider-handle:focus-visible { + border-color: #2db7f5; + box-shadow: 0 0 0 3px #96dbfa; +} +.rc-slider-handle-click-focused:focus { + border-color: #96dbfa; + box-shadow: unset; +} +.rc-slider-handle:hover { + border-color: #57c5f7; +} +.rc-slider-handle:active { + border-color: #57c5f7; + box-shadow: 0 0 5px #57c5f7; + cursor: -webkit-grabbing; + cursor: grabbing; +} +.rc-slider-mark { + position: absolute; + top: 18px; + left: 0; + width: 100%; + font-size: 12px; +} +.rc-slider-mark-text { + position: absolute; + display: inline-block; + color: #999; + text-align: center; + vertical-align: middle; + cursor: pointer; +} +.rc-slider-mark-text-active { + color: #666; +} +.rc-slider-step { + position: absolute; + width: 100%; + height: 4px; + background: transparent; +} +.rc-slider-dot { + position: absolute; + bottom: -2px; + width: 8px; + height: 8px; + vertical-align: middle; + background-color: #fff; + border: 2px solid #e9e9e9; + border-radius: 50%; + cursor: pointer; +} +.rc-slider-dot-active { + border-color: #96dbfa; +} +.rc-slider-dot-reverse { + margin-right: -4px; +} +.rc-slider-disabled { + background-color: #e9e9e9; +} +.rc-slider-disabled .rc-slider-track { + background-color: #ccc; +} +.rc-slider-disabled .rc-slider-handle, +.rc-slider-disabled .rc-slider-dot { + background-color: #fff; + border-color: #ccc; + box-shadow: none; + cursor: not-allowed; +} +.rc-slider-disabled .rc-slider-mark-text, +.rc-slider-disabled .rc-slider-dot { + cursor: not-allowed !important; +} +.rc-slider-vertical { + width: 14px; + height: 100%; + padding: 0 5px; +} +.rc-slider-vertical .rc-slider-rail { + width: 4px; + height: 100%; +} +.rc-slider-vertical .rc-slider-track { + bottom: 0; + left: 5px; + width: 4px; +} +.rc-slider-vertical .rc-slider-track-draggable { + border-top: 0; + border-bottom: 0; + border-right: 5px solid rgba(0, 0, 0, 0); + border-left: 5px solid rgba(0, 0, 0, 0); + transform: translateX(-5px); +} +.rc-slider-vertical .rc-slider-handle { + margin-top: 0; + margin-left: -5px; + touch-action: pan-y; +} +.rc-slider-vertical .rc-slider-mark { + top: 0; + left: 18px; + height: 100%; +} +.rc-slider-vertical .rc-slider-step { + width: 4px; + height: 100%; +} +.rc-slider-vertical .rc-slider-dot { + margin-left: -2px; +} +.rc-slider-tooltip-zoom-down-enter, +.rc-slider-tooltip-zoom-down-appear { + display: block !important; + animation-duration: 0.3s; + animation-fill-mode: both; + animation-play-state: paused; +} +.rc-slider-tooltip-zoom-down-leave { + display: block !important; + animation-duration: 0.3s; + animation-fill-mode: both; + animation-play-state: paused; +} +.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active, +.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active { + animation-name: rcSliderTooltipZoomDownIn; + animation-play-state: running; +} +.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active { + animation-name: rcSliderTooltipZoomDownOut; + animation-play-state: running; +} +.rc-slider-tooltip-zoom-down-enter, +.rc-slider-tooltip-zoom-down-appear { + transform: scale(0, 0); + animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); +} +.rc-slider-tooltip-zoom-down-leave { + animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); +} +@keyframes rcSliderTooltipZoomDownIn { + 0% { + transform: scale(0, 0); + transform-origin: 50% 100%; + opacity: 0; + } + 100% { + transform: scale(1, 1); + transform-origin: 50% 100%; + } +} +@keyframes rcSliderTooltipZoomDownOut { + 0% { + transform: scale(1, 1); + transform-origin: 50% 100%; + } + 100% { + transform: scale(0, 0); + transform-origin: 50% 100%; + opacity: 0; + } +} +.rc-slider-tooltip { + position: absolute; + top: -9999px; + left: -9999px; + visibility: visible; + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +.rc-slider-tooltip * { + box-sizing: border-box; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} +.rc-slider-tooltip-hidden { + display: none; +} +.rc-slider-tooltip-placement-top { + padding: 4px 0 8px 0; +} +.rc-slider-tooltip-inner { + min-width: 24px; + height: 24px; + padding: 6px 2px; + color: #fff; + font-size: 12px; + line-height: 1; + text-align: center; + text-decoration: none; + background-color: #6c6c6c; + border-radius: 6px; + box-shadow: 0 0 4px #d9d9d9; +} +.rc-slider-tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow { + bottom: 4px; + left: 50%; + margin-left: -4px; + border-width: 4px 4px 0; + border-top-color: #6c6c6c; +} diff --git a/packages/semantic-ui/src/i18n/en.json b/packages/semantic-ui/src/i18n/en.json index b4ee3791..bb944a16 100644 --- a/packages/semantic-ui/src/i18n/en.json +++ b/packages/semantic-ui/src/i18n/en.json @@ -57,7 +57,8 @@ "save": "Save", "search": "Search", "show": "Show", - "upload": "Upload" + "upload": "Upload", + "pdf": "View PDF" }, "errors": { "save": "There was an error saving the record.", @@ -331,4 +332,4 @@ }, "title": "XML" } -} +} \ No newline at end of file diff --git a/packages/semantic-ui/src/index.js b/packages/semantic-ui/src/index.js index 612641d6..1486dc5b 100644 --- a/packages/semantic-ui/src/index.js +++ b/packages/semantic-ui/src/index.js @@ -99,6 +99,7 @@ export { default as Toaster } from './components/Toaster'; export { default as VideoFrameSelector } from './components/VideoFrameSelector'; export { default as VideoPlayer } from './components/VideoPlayer'; export { default as VideoPlayerButton } from './components/VideoPlayerButton'; +export { default as ViewPDFButton } from './components/ViewPDFButton'; export { default as ViewXML } from './components/ViewXML'; // Context diff --git a/packages/shared/package.json b/packages/shared/package.json index 222c7b6f..6373459b 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/shared-components", - "version": "1.1.3", + "version": "1.1.4-beta.9", "description": "A package of shared, framework agnostic, components.", "license": "MIT", "main": "./build/index.js", diff --git a/packages/storybook/src/assets/test.pdf b/packages/storybook/src/assets/test.pdf new file mode 100644 index 0000000000000000000000000000000000000000..34f8324f24f0b92140148fcf6ac8ef40e8e74581 GIT binary patch literal 3908 zcmcInYiu0V6*k~DiD6u5et<*~w+^nIV(;9U+1c3vCuF^TBqV;|-H<>Ccy{-CJz;mo znYr88q&27y-W3G}lZZ&6juZ(Z5JiYIMc{;ocqIZv1OZuK@u<|2zz?WYK^t+--G|q^ z+q4nt%xdR8&N=tobIy0}xy^%JJ?%m{l6|-txRSScW z@tN0IH9}SLG{sOW=`>AOD#s`~qe31Hm#@n`%g!(ld@9K?@Fr2hlDx(lalucN41vdn zT$dBrx#$df>=)oWRfUN)U7I>m1|128l6t}lj<9ed6*Mg~m7=<7CTK#@m6iXUVlza6 z3zuRpJ~76K9JRQWanqo|pp|Am0ZRzo2F92ZNpjnDAPRLc zC~v&(dgA0VnX*5OOJwYGQy^@;&-z`5EeJ)7o8qE!3?i4vJ$8mO555_Tvo4ktyz7{g z=A#6|2Nb|q_PNKbtkkgjuEg;092*|~=5Ss8?h7w^@~pcIo; z8xQ<--)qym8dqI#TirQz2WA#MjYud6C}2WJ#@*{$2`9L*3WMNo#HKvv@RB)(nD6Gi zBp3*{gPx4K4hIUKV9<(@K9;hrPInv(hC?AmC5EXA=tezvtoF>1%fSdhUJlK4U&mQBh2eyg$Ni<&A#AFt=##S>s zJ<5Sml93MQ+EoY)2}2<56D^2MkkXkqQo9ZaZ`Y_nRH}x-!qCDj z+lJh%<-p7uh+;b#anc!KOF70__F7!9Omj3*4b6c&mP>GfhPanw0vE8B?fE=9YI#IM ze6F*~dmHQ&AN9c{s!oMw-3~;t?WBpk!FD2!ZfcKDg6)ZtIE5dLOxM?ze}Gmwwte)G)oIY5AQq>Fga% z>pSn?{q`*#U!CyfsSneu=8Ru2-v8LyM?Y%2{P!R1Jn!z=#J;{COtws2xc7G>_lBh8 zvZ?oeRR8AQx8@#x@|R1Nygu{P4aa}H_S{K*;Lktbv)^kBym3swdG94#o|@fv?y-r; zA5Wg&z51Yj>vg9--Prb%sa?;!z2%(GuWs9UQ+lF4`PmJRY~L~Y?ey`JpDv#1G}|sa z_BSKEQc^4mACyr*Zq}-)~&MbL~He&s%oo%h$Gi9+Fyae`fZo$A+(3vHPB9w;z9Z zkNwu+T}?-)FL`(CeT(|8UiV>c#qysuKflDDxHS6gUrs)-XlU)8*I(K3+M?q(&Aj~h z(>+&A?yfh!?(Oh5YA2@02ey8DaN>&>zMgvM#(yoQb^rd;eLEVeb0VHgH84>N%_g}1 zG-yVs7toA&DMxb%Fx;*|JgF3ruFzn(0?iT6wlZy=Q_xbh8!5bXF?&X)X?014`U@<4va z^ZTweX|Z20;Jk&46SY|LJ}Oe=zf~SUbLvnk^|FTHzY=9b^wKBme*a literal 0 HcmV?d00001 diff --git a/packages/storybook/src/semantic-ui/LazyDocument.stories.js b/packages/storybook/src/semantic-ui/LazyDocument.stories.js index d6d3ac9e..0dcf5190 100644 --- a/packages/storybook/src/semantic-ui/LazyDocument.stories.js +++ b/packages/storybook/src/semantic-ui/LazyDocument.stories.js @@ -7,6 +7,7 @@ import FileInputButton from '../../../semantic-ui/src/components/FileInputButton import image from '../assets/test-image.jpg'; import LazyDocument from '../../../semantic-ui/src/components/LazyDocument'; import portraitImage from '../assets/portrait-test-image.jpg'; +import pdf from '../assets/test.pdf'; export default { title: 'Components/Semantic UI/LazyDocument' @@ -85,6 +86,16 @@ export const CardContent = () => ( ); +export const ViewContent = () => ( + +); + + export const ListContent = () => ( diff --git a/packages/user-defined-fields/package.json b/packages/user-defined-fields/package.json index 46b6a08b..93a95daf 100644 --- a/packages/user-defined-fields/package.json +++ b/packages/user-defined-fields/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/user-defined-fields", - "version": "1.1.3", + "version": "1.1.4-beta.9", "description": "A package of components used for allowing end users to define fields on models. Use with the \"user_defined_fields\" gem.", "license": "MIT", "main": "./build/index.js", @@ -9,8 +9,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.3", - "@performant-software/shared-components": "^1.1.3", + "@performant-software/semantic-components": "^1.1.4-beta.9", + "@performant-software/shared-components": "^1.1.4-beta.9", "i18next": "^21.9.1", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/visualize/package.json b/packages/visualize/package.json index 8327c66a..2cef80d6 100644 --- a/packages/visualize/package.json +++ b/packages/visualize/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/visualize", - "version": "1.1.3", + "version": "1.1.4-beta.9", "description": "A package of components used for data visualization", "license": "MIT", "main": "./build/index.js", diff --git a/react-components.json b/react-components.json index 51141891..e2f8ad2f 100644 --- a/react-components.json +++ b/react-components.json @@ -7,5 +7,5 @@ "packages/user-defined-fields", "packages/visualize" ], - "version": "1.1.3" -} + "version": "1.1.4-beta.9" +} \ No newline at end of file From 234f4fd55f8a63c63f2ee291add47c03b4d5b53e Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Tue, 20 Feb 2024 08:48:28 -0500 Subject: [PATCH 2/7] Fixed wrong case --- packages/semantic-ui/src/components/LazyDocument.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/semantic-ui/src/components/LazyDocument.js b/packages/semantic-ui/src/components/LazyDocument.js index a0aed074..51b25826 100644 --- a/packages/semantic-ui/src/components/LazyDocument.js +++ b/packages/semantic-ui/src/components/LazyDocument.js @@ -3,7 +3,6 @@ import React, { useCallback, useState, type Node } from 'react'; import { pdfjs, Document, Page } from 'react-pdf'; import { - Button, Dimmer, Icon, Image, @@ -32,7 +31,7 @@ type Props = { pdf?: boolean, preview?: ?string, view?: Boolean, - view_url?: String, + viewUrl?: String, size?: string, src?: string }; @@ -132,14 +131,14 @@ const LazyDocument = (props: Props) => { )} - {!error && loaded && props.view && props.view_url && props.pdf && dimmer && ( + {!error && loaded && props.view && props.viewUrl && props.pdf && dimmer && (
- +
)} From a941b3b944ba3d92522726bd1cbf3d340deb7b8d Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Tue, 20 Feb 2024 09:29:10 -0500 Subject: [PATCH 3/7] Addressing PR review --- packages/controlled-vocabulary/package.json | 6 +++--- packages/geospatial/package.json | 2 +- packages/semantic-ui/package.json | 4 ++-- packages/semantic-ui/src/components/FacetSlider.css | 2 ++ packages/semantic-ui/src/components/FacetSlider.js | 4 ---- packages/semantic-ui/src/components/LazyDocument.css | 3 +++ packages/semantic-ui/src/components/LazyDocument.js | 5 ----- packages/semantic-ui/webpack.config.js | 12 ++++++++++++ packages/shared/package.json | 2 +- packages/user-defined-fields/package.json | 6 +++--- packages/visualize/package.json | 2 +- react-components.json | 2 +- 12 files changed, 29 insertions(+), 21 deletions(-) diff --git a/packages/controlled-vocabulary/package.json b/packages/controlled-vocabulary/package.json index 95afb5d9..2927c196 100644 --- a/packages/controlled-vocabulary/package.json +++ b/packages/controlled-vocabulary/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/controlled-vocabulary", - "version": "1.1.4-beta.9", + "version": "1.1.4-beta.10", "description": "A package of components to allow user to configure dropdown elements. Use with the \"controlled_vocabulary\" gem.", "license": "MIT", "main": "./build/index.js", @@ -12,8 +12,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.9", - "@performant-software/shared-components": "^1.1.4-beta.9", + "@performant-software/semantic-components": "^1.1.4-beta.10", + "@performant-software/shared-components": "^1.1.4-beta.10", "i18next": "^21.9.2", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/geospatial/package.json b/packages/geospatial/package.json index 918f2fcd..5421a3b6 100644 --- a/packages/geospatial/package.json +++ b/packages/geospatial/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/geospatial", - "version": "1.1.4-beta.9", + "version": "1.1.4-beta.10", "description": "TODO: ADD", "license": "MIT", "main": "./build/index.js", diff --git a/packages/semantic-ui/package.json b/packages/semantic-ui/package.json index 857ede29..e03bf8f1 100644 --- a/packages/semantic-ui/package.json +++ b/packages/semantic-ui/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/semantic-components", - "version": "1.1.4-beta.9", + "version": "1.1.4-beta.10", "description": "A package of shared components based on the Semantic UI Framework.", "license": "MIT", "main": "./build/index.js", @@ -12,7 +12,7 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/shared-components": "^1.1.4-beta.9", + "@performant-software/shared-components": "^1.1.4-beta.10", "@react-google-maps/api": "^2.8.1", "axios": "^0.26.1", "i18next": "^19.4.4", diff --git a/packages/semantic-ui/src/components/FacetSlider.css b/packages/semantic-ui/src/components/FacetSlider.css index 4392ed0d..7ba49032 100644 --- a/packages/semantic-ui/src/components/FacetSlider.css +++ b/packages/semantic-ui/src/components/FacetSlider.css @@ -1,3 +1,5 @@ +@import 'rc-slider/assets/index.css'; + .facet-slider > .ui.grid { margin-top: 0em; } diff --git a/packages/semantic-ui/src/components/FacetSlider.js b/packages/semantic-ui/src/components/FacetSlider.js index bc92fd07..57fac68e 100644 --- a/packages/semantic-ui/src/components/FacetSlider.js +++ b/packages/semantic-ui/src/components/FacetSlider.js @@ -11,10 +11,6 @@ import { Grid } from 'semantic-ui-react'; import Facet, { type Props as FacetProps } from './Facet'; import { type RangeSliderProps } from '../types/InstantSearch'; -// This is copied from the rc-slider node_module. SO update if updating versions -// See https://nextjs.org/docs/messages/css-npm -import './rc-slider.css'; - import './FacetSlider.css'; type Props = FacetProps & RangeSliderProps; diff --git a/packages/semantic-ui/src/components/LazyDocument.css b/packages/semantic-ui/src/components/LazyDocument.css index c03027ad..f6ff476b 100644 --- a/packages/semantic-ui/src/components/LazyDocument.css +++ b/packages/semantic-ui/src/components/LazyDocument.css @@ -1,3 +1,6 @@ +@import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; +@import 'react-pdf/dist/esm/Page/TextLayer.css'; + .lazy-document.ui.segment { display: inline-block !important; max-width: 100%; diff --git a/packages/semantic-ui/src/components/LazyDocument.js b/packages/semantic-ui/src/components/LazyDocument.js index 51b25826..853d74af 100644 --- a/packages/semantic-ui/src/components/LazyDocument.js +++ b/packages/semantic-ui/src/components/LazyDocument.js @@ -14,11 +14,6 @@ import { import DownloadButton from './DownloadButton'; import LazyLoader from './LazyLoader'; -// These are copied from the react-pdt node_module. This is for NextJS builds -// see https://nextjs.org/docs/messages/css-npm -import './AnnotationLayer.css'; -import './TextLayer.css'; - import './LazyDocument.css'; import ViewPDFButton from './ViewPDFButton'; diff --git a/packages/semantic-ui/webpack.config.js b/packages/semantic-ui/webpack.config.js index a3c6b1e1..01914b8a 100644 --- a/packages/semantic-ui/webpack.config.js +++ b/packages/semantic-ui/webpack.config.js @@ -10,6 +10,18 @@ module.exports = configure(__dirname, { './react-calendar/dist/Calendar.css$': path.resolve( __dirname, '../../node_modules/react-calendar/dist/Calendar.css' + ), + './rc-slider/assets/index.css$': path.resolve( + __dirname, + '../../node_modules/rc-slider/assets/index.css' + ), + './react-pdf/dist/esm/Page/AnnotationLayer.css$': path.resolve( + __dirname, + '../../node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css' + ), + './react-pdf/dist/esm/Page/TextLayer.css$': path.resolve( + __dirname, + '../../node_modules/react-pdf/dist/esm/Page/TextLayer.css' ) } }, diff --git a/packages/shared/package.json b/packages/shared/package.json index 6373459b..b56b9a16 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/shared-components", - "version": "1.1.4-beta.9", + "version": "1.1.4-beta.10", "description": "A package of shared, framework agnostic, components.", "license": "MIT", "main": "./build/index.js", diff --git a/packages/user-defined-fields/package.json b/packages/user-defined-fields/package.json index 93a95daf..9325b8e5 100644 --- a/packages/user-defined-fields/package.json +++ b/packages/user-defined-fields/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/user-defined-fields", - "version": "1.1.4-beta.9", + "version": "1.1.4-beta.10", "description": "A package of components used for allowing end users to define fields on models. Use with the \"user_defined_fields\" gem.", "license": "MIT", "main": "./build/index.js", @@ -9,8 +9,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.9", - "@performant-software/shared-components": "^1.1.4-beta.9", + "@performant-software/semantic-components": "^1.1.4-beta.10", + "@performant-software/shared-components": "^1.1.4-beta.10", "i18next": "^21.9.1", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/visualize/package.json b/packages/visualize/package.json index 2cef80d6..5a75c51b 100644 --- a/packages/visualize/package.json +++ b/packages/visualize/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/visualize", - "version": "1.1.4-beta.9", + "version": "1.1.4-beta.10", "description": "A package of components used for data visualization", "license": "MIT", "main": "./build/index.js", diff --git a/react-components.json b/react-components.json index e2f8ad2f..ebc6d052 100644 --- a/react-components.json +++ b/react-components.json @@ -7,5 +7,5 @@ "packages/user-defined-fields", "packages/visualize" ], - "version": "1.1.4-beta.9" + "version": "1.1.4-beta.10" } \ No newline at end of file From 166e41e70406d0ace08c293e9d229003466be777 Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Wed, 21 Feb 2024 10:25:51 -0500 Subject: [PATCH 4/7] Refactored LazyDocument --- packages/controlled-vocabulary/package.json | 6 +++--- packages/geospatial/package.json | 2 +- packages/semantic-ui/package.json | 4 ++-- .../semantic-ui/src/components/LazyDocument.css | 9 ++++++--- .../semantic-ui/src/components/LazyDocument.js | 16 ++-------------- packages/shared/package.json | 2 +- .../src/semantic-ui/LazyDocument.stories.js | 14 +++++++++++--- packages/user-defined-fields/package.json | 6 +++--- packages/visualize/package.json | 2 +- react-components.json | 2 +- 10 files changed, 31 insertions(+), 32 deletions(-) diff --git a/packages/controlled-vocabulary/package.json b/packages/controlled-vocabulary/package.json index 2927c196..7101e6fd 100644 --- a/packages/controlled-vocabulary/package.json +++ b/packages/controlled-vocabulary/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/controlled-vocabulary", - "version": "1.1.4-beta.10", + "version": "1.1.4-beta.11", "description": "A package of components to allow user to configure dropdown elements. Use with the \"controlled_vocabulary\" gem.", "license": "MIT", "main": "./build/index.js", @@ -12,8 +12,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.10", - "@performant-software/shared-components": "^1.1.4-beta.10", + "@performant-software/semantic-components": "^1.1.4-beta.11", + "@performant-software/shared-components": "^1.1.4-beta.11", "i18next": "^21.9.2", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/geospatial/package.json b/packages/geospatial/package.json index 5421a3b6..28bcd19f 100644 --- a/packages/geospatial/package.json +++ b/packages/geospatial/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/geospatial", - "version": "1.1.4-beta.10", + "version": "1.1.4-beta.11", "description": "TODO: ADD", "license": "MIT", "main": "./build/index.js", diff --git a/packages/semantic-ui/package.json b/packages/semantic-ui/package.json index e03bf8f1..7a8144c8 100644 --- a/packages/semantic-ui/package.json +++ b/packages/semantic-ui/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/semantic-components", - "version": "1.1.4-beta.10", + "version": "1.1.4-beta.11", "description": "A package of shared components based on the Semantic UI Framework.", "license": "MIT", "main": "./build/index.js", @@ -12,7 +12,7 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/shared-components": "^1.1.4-beta.10", + "@performant-software/shared-components": "^1.1.4-beta.11", "@react-google-maps/api": "^2.8.1", "axios": "^0.26.1", "i18next": "^19.4.4", diff --git a/packages/semantic-ui/src/components/LazyDocument.css b/packages/semantic-ui/src/components/LazyDocument.css index f6ff476b..f9fce2cb 100644 --- a/packages/semantic-ui/src/components/LazyDocument.css +++ b/packages/semantic-ui/src/components/LazyDocument.css @@ -1,6 +1,3 @@ -@import 'react-pdf/dist/esm/Page/AnnotationLayer.css'; -@import 'react-pdf/dist/esm/Page/TextLayer.css'; - .lazy-document.ui.segment { display: inline-block !important; max-width: 100%; @@ -10,6 +7,7 @@ .lazy-document.ui.segment .buttons { display: flex; flex-direction: column; + z-index: 1000; } .lazy-document.ui.segment .buttons .ui.button { @@ -33,3 +31,8 @@ .lazy-document > .image.hidden { display: none; } + +.pdf-container { + width: 200px; + height: 300px; +} diff --git a/packages/semantic-ui/src/components/LazyDocument.js b/packages/semantic-ui/src/components/LazyDocument.js index 853d74af..768adf05 100644 --- a/packages/semantic-ui/src/components/LazyDocument.js +++ b/packages/semantic-ui/src/components/LazyDocument.js @@ -15,7 +15,6 @@ import DownloadButton from './DownloadButton'; import LazyLoader from './LazyLoader'; import './LazyDocument.css'; -import ViewPDFButton from './ViewPDFButton'; type Props = { children?: Node, @@ -25,8 +24,6 @@ type Props = { image?: any, pdf?: boolean, preview?: ?string, - view?: Boolean, - viewUrl?: String, size?: string, src?: string }; @@ -122,21 +119,12 @@ const LazyDocument = (props: Props) => { > )} - {!error && loaded && props.view && props.viewUrl && props.pdf && dimmer && ( - -
- -
-
- )} {(error || (!props.preview && !(props.src && props.pdf))) && ( ( export const ViewContent = () => ( + viewUrl={pdf} + > + + ); +export const DownloadContent = () => ( + +); export const ListContent = () => ( diff --git a/packages/user-defined-fields/package.json b/packages/user-defined-fields/package.json index 9325b8e5..8a698bc6 100644 --- a/packages/user-defined-fields/package.json +++ b/packages/user-defined-fields/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/user-defined-fields", - "version": "1.1.4-beta.10", + "version": "1.1.4-beta.11", "description": "A package of components used for allowing end users to define fields on models. Use with the \"user_defined_fields\" gem.", "license": "MIT", "main": "./build/index.js", @@ -9,8 +9,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.10", - "@performant-software/shared-components": "^1.1.4-beta.10", + "@performant-software/semantic-components": "^1.1.4-beta.11", + "@performant-software/shared-components": "^1.1.4-beta.11", "i18next": "^21.9.1", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/visualize/package.json b/packages/visualize/package.json index 5a75c51b..c09623c4 100644 --- a/packages/visualize/package.json +++ b/packages/visualize/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/visualize", - "version": "1.1.4-beta.10", + "version": "1.1.4-beta.11", "description": "A package of components used for data visualization", "license": "MIT", "main": "./build/index.js", diff --git a/react-components.json b/react-components.json index ebc6d052..4be98b04 100644 --- a/react-components.json +++ b/react-components.json @@ -7,5 +7,5 @@ "packages/user-defined-fields", "packages/visualize" ], - "version": "1.1.4-beta.10" + "version": "1.1.4-beta.11" } \ No newline at end of file From 6bc5f10497f5fa54534add0fbfac79f64b37c71a Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Wed, 21 Feb 2024 15:10:41 -0500 Subject: [PATCH 5/7] Removed react-pdf CSS files --- packages/controlled-vocabulary/package.json | 6 +- packages/geospatial/package.json | 2 +- packages/semantic-ui/package.json | 4 +- .../src/components/AnnotationLayer.css | 329 ------------------ .../semantic-ui/src/components/TextLayer.css | 110 ------ packages/semantic-ui/webpack.config.js | 8 - packages/shared/package.json | 2 +- packages/user-defined-fields/package.json | 6 +- packages/visualize/package.json | 2 +- react-components.json | 2 +- 10 files changed, 12 insertions(+), 459 deletions(-) delete mode 100644 packages/semantic-ui/src/components/AnnotationLayer.css delete mode 100644 packages/semantic-ui/src/components/TextLayer.css diff --git a/packages/controlled-vocabulary/package.json b/packages/controlled-vocabulary/package.json index 7101e6fd..b0958636 100644 --- a/packages/controlled-vocabulary/package.json +++ b/packages/controlled-vocabulary/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/controlled-vocabulary", - "version": "1.1.4-beta.11", + "version": "1.1.4-beta.12", "description": "A package of components to allow user to configure dropdown elements. Use with the \"controlled_vocabulary\" gem.", "license": "MIT", "main": "./build/index.js", @@ -12,8 +12,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.11", - "@performant-software/shared-components": "^1.1.4-beta.11", + "@performant-software/semantic-components": "^1.1.4-beta.12", + "@performant-software/shared-components": "^1.1.4-beta.12", "i18next": "^21.9.2", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/geospatial/package.json b/packages/geospatial/package.json index 28bcd19f..808ff909 100644 --- a/packages/geospatial/package.json +++ b/packages/geospatial/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/geospatial", - "version": "1.1.4-beta.11", + "version": "1.1.4-beta.12", "description": "TODO: ADD", "license": "MIT", "main": "./build/index.js", diff --git a/packages/semantic-ui/package.json b/packages/semantic-ui/package.json index 7a8144c8..cc245d06 100644 --- a/packages/semantic-ui/package.json +++ b/packages/semantic-ui/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/semantic-components", - "version": "1.1.4-beta.11", + "version": "1.1.4-beta.12", "description": "A package of shared components based on the Semantic UI Framework.", "license": "MIT", "main": "./build/index.js", @@ -12,7 +12,7 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/shared-components": "^1.1.4-beta.11", + "@performant-software/shared-components": "^1.1.4-beta.12", "@react-google-maps/api": "^2.8.1", "axios": "^0.26.1", "i18next": "^19.4.4", diff --git a/packages/semantic-ui/src/components/AnnotationLayer.css b/packages/semantic-ui/src/components/AnnotationLayer.css deleted file mode 100644 index db3f1bce..00000000 --- a/packages/semantic-ui/src/components/AnnotationLayer.css +++ /dev/null @@ -1,329 +0,0 @@ -/* Copyright 2014 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -:root { - --react-pdf-annotation-layer: 1; - --annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,"); - --input-focus-border-color: Highlight; - --input-focus-outline: 1px solid Canvas; - --input-unfocused-border-color: transparent; - --input-disabled-border-color: transparent; - --input-hover-border-color: black; - --link-outline: none; -} - -@media screen and (forced-colors: active) { - :root { - --input-focus-border-color: CanvasText; - --input-unfocused-border-color: ActiveText; - --input-disabled-border-color: GrayText; - --input-hover-border-color: Highlight; - --link-outline: 1.5px solid LinkText; - } - .annotationLayer .textWidgetAnnotation :is(input, textarea):required, - .annotationLayer .choiceWidgetAnnotation select:required, - .annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required { - outline: 1.5px solid selectedItem; - } - - .annotationLayer .linkAnnotation:hover { - backdrop-filter: invert(100%); - } -} - -.annotationLayer { - position: absolute; - top: 0; - left: 0; - pointer-events: none; - transform-origin: 0 0; - z-index: 3; -} - -.annotationLayer[data-main-rotation='90'] .norotate { - transform: rotate(270deg) translateX(-100%); -} -.annotationLayer[data-main-rotation='180'] .norotate { - transform: rotate(180deg) translate(-100%, -100%); -} -.annotationLayer[data-main-rotation='270'] .norotate { - transform: rotate(90deg) translateY(-100%); -} - -.annotationLayer canvas { - position: absolute; - width: 100%; - height: 100%; -} - -.annotationLayer section { - position: absolute; - text-align: initial; - pointer-events: auto; - box-sizing: border-box; - margin: 0; - transform-origin: 0 0; -} - -.annotationLayer .linkAnnotation { - outline: var(--link-outline); -} - -.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a { - position: absolute; - font-size: 1em; - top: 0; - left: 0; - width: 100%; - height: 100%; -} - -.annotationLayer :is(.linkAnnotation, .buttonWidgetAnnotation.pushButton) > a:hover { - opacity: 0.2; - background: rgba(255, 255, 0, 1); - box-shadow: 0 2px 10px rgba(255, 255, 0, 1); -} - -.annotationLayer .textAnnotation img { - position: absolute; - cursor: pointer; - width: 100%; - height: 100%; - top: 0; - left: 0; -} - -.annotationLayer .textWidgetAnnotation :is(input, textarea), -.annotationLayer .choiceWidgetAnnotation select, -.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input { - background-image: var(--annotation-unfocused-field-background); - border: 2px solid var(--input-unfocused-border-color); - box-sizing: border-box; - font: calc(9px * var(--scale-factor)) sans-serif; - height: 100%; - margin: 0; - vertical-align: top; - width: 100%; -} - -.annotationLayer .textWidgetAnnotation :is(input, textarea):required, -.annotationLayer .choiceWidgetAnnotation select:required, -.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:required { - outline: 1.5px solid red; -} - -.annotationLayer .choiceWidgetAnnotation select option { - padding: 0; -} - -.annotationLayer .buttonWidgetAnnotation.radioButton input { - border-radius: 50%; -} - -.annotationLayer .textWidgetAnnotation textarea { - resize: none; -} - -.annotationLayer .textWidgetAnnotation :is(input, textarea)[disabled], -.annotationLayer .choiceWidgetAnnotation select[disabled], -.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input[disabled] { - background: none; - border: 2px solid var(--input-disabled-border-color); - cursor: not-allowed; -} - -.annotationLayer .textWidgetAnnotation :is(input, textarea):hover, -.annotationLayer .choiceWidgetAnnotation select:hover, -.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input:hover { - border: 2px solid var(--input-hover-border-color); -} -.annotationLayer .textWidgetAnnotation :is(input, textarea):hover, -.annotationLayer .choiceWidgetAnnotation select:hover, -.annotationLayer .buttonWidgetAnnotation.checkBox input:hover { - border-radius: 2px; -} - -.annotationLayer .textWidgetAnnotation :is(input, textarea):focus, -.annotationLayer .choiceWidgetAnnotation select:focus { - background: none; - border: 2px solid var(--input-focus-border-color); - border-radius: 2px; - outline: var(--input-focus-outline); -} - -.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) :focus { - background-image: none; - background-color: transparent; -} - -.annotationLayer .buttonWidgetAnnotation.checkBox :focus { - border: 2px solid var(--input-focus-border-color); - border-radius: 2px; - outline: var(--input-focus-outline); -} - -.annotationLayer .buttonWidgetAnnotation.radioButton :focus { - border: 2px solid var(--input-focus-border-color); - outline: var(--input-focus-outline); -} - -.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before, -.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after, -.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before { - background-color: CanvasText; - content: ''; - display: block; - position: absolute; -} - -.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before, -.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after { - height: 80%; - left: 45%; - width: 1px; -} - -.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::before { - transform: rotate(45deg); -} - -.annotationLayer .buttonWidgetAnnotation.checkBox input:checked::after { - transform: rotate(-45deg); -} - -.annotationLayer .buttonWidgetAnnotation.radioButton input:checked::before { - border-radius: 50%; - height: 50%; - left: 30%; - top: 20%; - width: 50%; -} - -.annotationLayer .textWidgetAnnotation input.comb { - font-family: monospace; - padding-left: 2px; - padding-right: 0; -} - -.annotationLayer .textWidgetAnnotation input.comb:focus { - /* - * Letter spacing is placed on the right side of each character. Hence, the - * letter spacing of the last character may be placed outside the visible - * area, causing horizontal scrolling. We avoid this by extending the width - * when the element has focus and revert this when it loses focus. - */ - width: 103%; -} - -.annotationLayer .buttonWidgetAnnotation:is(.checkBox, .radioButton) input { - appearance: none; -} - -.annotationLayer .popupTriggerArea { - height: 100%; - width: 100%; -} - -.annotationLayer .fileAttachmentAnnotation .popupTriggerArea { - position: absolute; -} - -.annotationLayer .popupWrapper { - position: absolute; - font-size: calc(9px * var(--scale-factor)); - width: 100%; - min-width: calc(180px * var(--scale-factor)); - pointer-events: none; -} - -.annotationLayer .popup { - position: absolute; - max-width: calc(180px * var(--scale-factor)); - background-color: rgba(255, 255, 153, 1); - box-shadow: 0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) - rgba(136, 136, 136, 1); - border-radius: calc(2px * var(--scale-factor)); - padding: calc(6px * var(--scale-factor)); - margin-left: calc(5px * var(--scale-factor)); - cursor: pointer; - font: message-box; - white-space: normal; - word-wrap: break-word; - pointer-events: auto; -} - -.annotationLayer .popup > * { - font-size: calc(9px * var(--scale-factor)); -} - -.annotationLayer .popup h1 { - display: inline-block; -} - -.annotationLayer .popupDate { - display: inline-block; - margin-left: calc(5px * var(--scale-factor)); -} - -.annotationLayer .popupContent { - border-top: 1px solid rgba(51, 51, 51, 1); - margin-top: calc(2px * var(--scale-factor)); - padding-top: calc(2px * var(--scale-factor)); -} - -.annotationLayer .richText > * { - white-space: pre-wrap; - font-size: calc(9px * var(--scale-factor)); -} - -.annotationLayer .highlightAnnotation, -.annotationLayer .underlineAnnotation, -.annotationLayer .squigglyAnnotation, -.annotationLayer .strikeoutAnnotation, -.annotationLayer .freeTextAnnotation, -.annotationLayer .lineAnnotation svg line, -.annotationLayer .squareAnnotation svg rect, -.annotationLayer .circleAnnotation svg ellipse, -.annotationLayer .polylineAnnotation svg polyline, -.annotationLayer .polygonAnnotation svg polygon, -.annotationLayer .caretAnnotation, -.annotationLayer .inkAnnotation svg polyline, -.annotationLayer .stampAnnotation, -.annotationLayer .fileAttachmentAnnotation { - cursor: pointer; -} - -.annotationLayer section svg { - position: absolute; - width: 100%; - height: 100%; - top: 0; - left: 0; -} - -.annotationLayer .annotationTextContent { - position: absolute; - width: 100%; - height: 100%; - opacity: 0; - color: transparent; - user-select: none; - pointer-events: none; -} - -.annotationLayer .annotationTextContent span { - width: 100%; - display: inline-block; -} diff --git a/packages/semantic-ui/src/components/TextLayer.css b/packages/semantic-ui/src/components/TextLayer.css deleted file mode 100644 index 592ec1c4..00000000 --- a/packages/semantic-ui/src/components/TextLayer.css +++ /dev/null @@ -1,110 +0,0 @@ -/* Copyright 2014 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -:root { - --react-pdf-text-layer: 1; - --highlight-bg-color: rgba(180, 0, 170, 1); - --highlight-selected-bg-color: rgba(0, 100, 0, 1); -} - -@media screen and (forced-colors: active) { - :root { - --highlight-bg-color: Highlight; - --highlight-selected-bg-color: ButtonText; - } -} - -[data-main-rotation='90'] { - transform: rotate(90deg) translateY(-100%); -} -[data-main-rotation='180'] { - transform: rotate(180deg) translate(-100%, -100%); -} -[data-main-rotation='270'] { - transform: rotate(270deg) translateX(-100%); -} - -.textLayer { - position: absolute; - text-align: initial; - inset: 0; - overflow: hidden; - line-height: 1; - text-size-adjust: none; - forced-color-adjust: none; - transform-origin: 0 0; - z-index: 2; -} - -.textLayer :is(span, br) { - color: transparent; - position: absolute; - white-space: pre; - cursor: text; - margin: 0; - transform-origin: 0 0; -} - -/* Only necessary in Google Chrome, see issue 14205, and most unfortunately - * the problem doesn't show up in "text" reference tests. */ -.textLayer span.markedContent { - top: 0; - height: 0; -} - -.textLayer .highlight { - margin: -1px; - padding: 1px; - background-color: var(--highlight-bg-color); - border-radius: 4px; -} - -.textLayer .highlight.appended { - position: initial; -} - -.textLayer .highlight.begin { - border-radius: 4px 0 0 4px; -} - -.textLayer .highlight.end { - border-radius: 0 4px 4px 0; -} - -.textLayer .highlight.middle { - border-radius: 0; -} - -.textLayer .highlight.selected { - background-color: var(--highlight-selected-bg-color); -} - -/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */ -.textLayer br::selection { - background: transparent; -} - -.textLayer .endOfContent { - display: block; - position: absolute; - inset: 100% 0 0; - z-index: -1; - cursor: default; - user-select: none; -} - -.textLayer .endOfContent.active { - top: 0; -} diff --git a/packages/semantic-ui/webpack.config.js b/packages/semantic-ui/webpack.config.js index 01914b8a..723e6bbd 100644 --- a/packages/semantic-ui/webpack.config.js +++ b/packages/semantic-ui/webpack.config.js @@ -14,14 +14,6 @@ module.exports = configure(__dirname, { './rc-slider/assets/index.css$': path.resolve( __dirname, '../../node_modules/rc-slider/assets/index.css' - ), - './react-pdf/dist/esm/Page/AnnotationLayer.css$': path.resolve( - __dirname, - '../../node_modules/react-pdf/dist/esm/Page/AnnotationLayer.css' - ), - './react-pdf/dist/esm/Page/TextLayer.css$': path.resolve( - __dirname, - '../../node_modules/react-pdf/dist/esm/Page/TextLayer.css' ) } }, diff --git a/packages/shared/package.json b/packages/shared/package.json index 87284ed2..c0cf0e7f 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/shared-components", - "version": "1.1.4-beta.11", + "version": "1.1.4-beta.12", "description": "A package of shared, framework agnostic, components.", "license": "MIT", "main": "./build/index.js", diff --git a/packages/user-defined-fields/package.json b/packages/user-defined-fields/package.json index 8a698bc6..a283cd14 100644 --- a/packages/user-defined-fields/package.json +++ b/packages/user-defined-fields/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/user-defined-fields", - "version": "1.1.4-beta.11", + "version": "1.1.4-beta.12", "description": "A package of components used for allowing end users to define fields on models. Use with the \"user_defined_fields\" gem.", "license": "MIT", "main": "./build/index.js", @@ -9,8 +9,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.11", - "@performant-software/shared-components": "^1.1.4-beta.11", + "@performant-software/semantic-components": "^1.1.4-beta.12", + "@performant-software/shared-components": "^1.1.4-beta.12", "i18next": "^21.9.1", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/visualize/package.json b/packages/visualize/package.json index c09623c4..2c068b51 100644 --- a/packages/visualize/package.json +++ b/packages/visualize/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/visualize", - "version": "1.1.4-beta.11", + "version": "1.1.4-beta.12", "description": "A package of components used for data visualization", "license": "MIT", "main": "./build/index.js", diff --git a/react-components.json b/react-components.json index 4be98b04..1c9cc2e2 100644 --- a/react-components.json +++ b/react-components.json @@ -7,5 +7,5 @@ "packages/user-defined-fields", "packages/visualize" ], - "version": "1.1.4-beta.11" + "version": "1.1.4-beta.12" } \ No newline at end of file From ac0bd9f9d8197a333356283854577136c0f85bc7 Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Wed, 21 Feb 2024 15:18:29 -0500 Subject: [PATCH 6/7] removed unneeded CSS --- .../semantic-ui/src/components/rc-slider.css | 267 ------------------ 1 file changed, 267 deletions(-) delete mode 100644 packages/semantic-ui/src/components/rc-slider.css diff --git a/packages/semantic-ui/src/components/rc-slider.css b/packages/semantic-ui/src/components/rc-slider.css deleted file mode 100644 index 3d521941..00000000 --- a/packages/semantic-ui/src/components/rc-slider.css +++ /dev/null @@ -1,267 +0,0 @@ -.rc-slider { - position: relative; - width: 100%; - height: 14px; - padding: 5px 0; - border-radius: 6px; - touch-action: none; - box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -.rc-slider * { - box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -.rc-slider-rail { - position: absolute; - width: 100%; - height: 4px; - background-color: #e9e9e9; - border-radius: 6px; -} -.rc-slider-track { - position: absolute; - height: 4px; - background-color: #abe2fb; - border-radius: 6px; -} -.rc-slider-track-draggable { - z-index: 1; - box-sizing: content-box; - background-clip: content-box; - border-top: 5px solid rgba(0, 0, 0, 0); - border-bottom: 5px solid rgba(0, 0, 0, 0); - transform: translateY(-5px); -} -.rc-slider-handle { - position: absolute; - width: 14px; - height: 14px; - margin-top: -5px; - background-color: #fff; - border: solid 2px #96dbfa; - border-radius: 50%; - cursor: pointer; - cursor: -webkit-grab; - cursor: grab; - opacity: 0.8; - touch-action: pan-x; -} -.rc-slider-handle-dragging.rc-slider-handle-dragging.rc-slider-handle-dragging { - border-color: #57c5f7; - box-shadow: 0 0 0 5px #96dbfa; -} -.rc-slider-handle:focus { - outline: none; - box-shadow: none; -} -.rc-slider-handle:focus-visible { - border-color: #2db7f5; - box-shadow: 0 0 0 3px #96dbfa; -} -.rc-slider-handle-click-focused:focus { - border-color: #96dbfa; - box-shadow: unset; -} -.rc-slider-handle:hover { - border-color: #57c5f7; -} -.rc-slider-handle:active { - border-color: #57c5f7; - box-shadow: 0 0 5px #57c5f7; - cursor: -webkit-grabbing; - cursor: grabbing; -} -.rc-slider-mark { - position: absolute; - top: 18px; - left: 0; - width: 100%; - font-size: 12px; -} -.rc-slider-mark-text { - position: absolute; - display: inline-block; - color: #999; - text-align: center; - vertical-align: middle; - cursor: pointer; -} -.rc-slider-mark-text-active { - color: #666; -} -.rc-slider-step { - position: absolute; - width: 100%; - height: 4px; - background: transparent; -} -.rc-slider-dot { - position: absolute; - bottom: -2px; - width: 8px; - height: 8px; - vertical-align: middle; - background-color: #fff; - border: 2px solid #e9e9e9; - border-radius: 50%; - cursor: pointer; -} -.rc-slider-dot-active { - border-color: #96dbfa; -} -.rc-slider-dot-reverse { - margin-right: -4px; -} -.rc-slider-disabled { - background-color: #e9e9e9; -} -.rc-slider-disabled .rc-slider-track { - background-color: #ccc; -} -.rc-slider-disabled .rc-slider-handle, -.rc-slider-disabled .rc-slider-dot { - background-color: #fff; - border-color: #ccc; - box-shadow: none; - cursor: not-allowed; -} -.rc-slider-disabled .rc-slider-mark-text, -.rc-slider-disabled .rc-slider-dot { - cursor: not-allowed !important; -} -.rc-slider-vertical { - width: 14px; - height: 100%; - padding: 0 5px; -} -.rc-slider-vertical .rc-slider-rail { - width: 4px; - height: 100%; -} -.rc-slider-vertical .rc-slider-track { - bottom: 0; - left: 5px; - width: 4px; -} -.rc-slider-vertical .rc-slider-track-draggable { - border-top: 0; - border-bottom: 0; - border-right: 5px solid rgba(0, 0, 0, 0); - border-left: 5px solid rgba(0, 0, 0, 0); - transform: translateX(-5px); -} -.rc-slider-vertical .rc-slider-handle { - margin-top: 0; - margin-left: -5px; - touch-action: pan-y; -} -.rc-slider-vertical .rc-slider-mark { - top: 0; - left: 18px; - height: 100%; -} -.rc-slider-vertical .rc-slider-step { - width: 4px; - height: 100%; -} -.rc-slider-vertical .rc-slider-dot { - margin-left: -2px; -} -.rc-slider-tooltip-zoom-down-enter, -.rc-slider-tooltip-zoom-down-appear { - display: block !important; - animation-duration: 0.3s; - animation-fill-mode: both; - animation-play-state: paused; -} -.rc-slider-tooltip-zoom-down-leave { - display: block !important; - animation-duration: 0.3s; - animation-fill-mode: both; - animation-play-state: paused; -} -.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active, -.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active { - animation-name: rcSliderTooltipZoomDownIn; - animation-play-state: running; -} -.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active { - animation-name: rcSliderTooltipZoomDownOut; - animation-play-state: running; -} -.rc-slider-tooltip-zoom-down-enter, -.rc-slider-tooltip-zoom-down-appear { - transform: scale(0, 0); - animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1); -} -.rc-slider-tooltip-zoom-down-leave { - animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06); -} -@keyframes rcSliderTooltipZoomDownIn { - 0% { - transform: scale(0, 0); - transform-origin: 50% 100%; - opacity: 0; - } - 100% { - transform: scale(1, 1); - transform-origin: 50% 100%; - } -} -@keyframes rcSliderTooltipZoomDownOut { - 0% { - transform: scale(1, 1); - transform-origin: 50% 100%; - } - 100% { - transform: scale(0, 0); - transform-origin: 50% 100%; - opacity: 0; - } -} -.rc-slider-tooltip { - position: absolute; - top: -9999px; - left: -9999px; - visibility: visible; - box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -.rc-slider-tooltip * { - box-sizing: border-box; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -.rc-slider-tooltip-hidden { - display: none; -} -.rc-slider-tooltip-placement-top { - padding: 4px 0 8px 0; -} -.rc-slider-tooltip-inner { - min-width: 24px; - height: 24px; - padding: 6px 2px; - color: #fff; - font-size: 12px; - line-height: 1; - text-align: center; - text-decoration: none; - background-color: #6c6c6c; - border-radius: 6px; - box-shadow: 0 0 4px #d9d9d9; -} -.rc-slider-tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow { - bottom: 4px; - left: 50%; - margin-left: -4px; - border-width: 4px 4px 0; - border-top-color: #6c6c6c; -} From d819993bc365e502742a2056dfc16d9c0ba219f3 Mon Sep 17 00:00:00 2001 From: lorinjameson Date: Wed, 21 Feb 2024 15:25:04 -0500 Subject: [PATCH 7/7] Publishing 1.1.4 --- packages/controlled-vocabulary/package.json | 6 +++--- packages/geospatial/package.json | 2 +- packages/semantic-ui/package.json | 4 ++-- packages/shared/package.json | 2 +- packages/user-defined-fields/package.json | 6 +++--- packages/visualize/package.json | 2 +- react-components.json | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/controlled-vocabulary/package.json b/packages/controlled-vocabulary/package.json index b0958636..563eb8ff 100644 --- a/packages/controlled-vocabulary/package.json +++ b/packages/controlled-vocabulary/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/controlled-vocabulary", - "version": "1.1.4-beta.12", + "version": "1.1.4", "description": "A package of components to allow user to configure dropdown elements. Use with the \"controlled_vocabulary\" gem.", "license": "MIT", "main": "./build/index.js", @@ -12,8 +12,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.12", - "@performant-software/shared-components": "^1.1.4-beta.12", + "@performant-software/semantic-components": "^1.1.4", + "@performant-software/shared-components": "^1.1.4", "i18next": "^21.9.2", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/geospatial/package.json b/packages/geospatial/package.json index 808ff909..dc2416d7 100644 --- a/packages/geospatial/package.json +++ b/packages/geospatial/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/geospatial", - "version": "1.1.4-beta.12", + "version": "1.1.4", "description": "TODO: ADD", "license": "MIT", "main": "./build/index.js", diff --git a/packages/semantic-ui/package.json b/packages/semantic-ui/package.json index cc245d06..f1753cdc 100644 --- a/packages/semantic-ui/package.json +++ b/packages/semantic-ui/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/semantic-components", - "version": "1.1.4-beta.12", + "version": "1.1.4", "description": "A package of shared components based on the Semantic UI Framework.", "license": "MIT", "main": "./build/index.js", @@ -12,7 +12,7 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/shared-components": "^1.1.4-beta.12", + "@performant-software/shared-components": "^1.1.4", "@react-google-maps/api": "^2.8.1", "axios": "^0.26.1", "i18next": "^19.4.4", diff --git a/packages/shared/package.json b/packages/shared/package.json index c0cf0e7f..87cbb28e 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/shared-components", - "version": "1.1.4-beta.12", + "version": "1.1.4", "description": "A package of shared, framework agnostic, components.", "license": "MIT", "main": "./build/index.js", diff --git a/packages/user-defined-fields/package.json b/packages/user-defined-fields/package.json index a283cd14..4b3b458b 100644 --- a/packages/user-defined-fields/package.json +++ b/packages/user-defined-fields/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/user-defined-fields", - "version": "1.1.4-beta.12", + "version": "1.1.4", "description": "A package of components used for allowing end users to define fields on models. Use with the \"user_defined_fields\" gem.", "license": "MIT", "main": "./build/index.js", @@ -9,8 +9,8 @@ "build": "webpack --mode production && flow-copy-source -v src types" }, "dependencies": { - "@performant-software/semantic-components": "^1.1.4-beta.12", - "@performant-software/shared-components": "^1.1.4-beta.12", + "@performant-software/semantic-components": "^1.1.4", + "@performant-software/shared-components": "^1.1.4", "i18next": "^21.9.1", "semantic-ui-react": "^2.1.2", "underscore": "^1.13.2" diff --git a/packages/visualize/package.json b/packages/visualize/package.json index 2c068b51..3d1b4caa 100644 --- a/packages/visualize/package.json +++ b/packages/visualize/package.json @@ -1,6 +1,6 @@ { "name": "@performant-software/visualize", - "version": "1.1.4-beta.12", + "version": "1.1.4", "description": "A package of components used for data visualization", "license": "MIT", "main": "./build/index.js", diff --git a/react-components.json b/react-components.json index 1c9cc2e2..ebd79dec 100644 --- a/react-components.json +++ b/react-components.json @@ -7,5 +7,5 @@ "packages/user-defined-fields", "packages/visualize" ], - "version": "1.1.4-beta.12" + "version": "1.1.4" } \ No newline at end of file