@olenbetong/synergi-react 1.0.5 → 2.0.1
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/dist/esm/ob.react.css +216 -146
- package/dist/esm/ob.react.js +227 -131
- package/dist/esm/ob.react.min.css +1 -1
- package/dist/esm/ob.react.min.css.map +3 -3
- package/dist/esm/ob.react.min.js +1 -1
- package/dist/esm/ob.react.min.js.map +4 -4
- package/dist/iife/ob.react.css +216 -146
- package/dist/iife/ob.react.js +230 -134
- package/dist/iife/ob.react.min.css +1 -1
- package/dist/iife/ob.react.min.css.map +3 -3
- package/dist/iife/ob.react.min.js +1 -1
- package/dist/iife/ob.react.min.js.map +4 -4
- package/dist/styles/styles.css +1 -1
- package/dist/styles/styles.css.map +1 -1
- package/es/Checkbox/index.css +1 -1
- package/es/Checkbox/index.d.ts +11 -0
- package/es/Checkbox/index.js +8 -5
- package/es/ColorCard/index.d.ts +5 -2
- package/es/ColorCard/index.js +6 -0
- package/es/DateNavigator/index.css +1 -1
- package/es/DateNavigator/index.d.ts +3 -1
- package/es/DateNavigator/index.js +82 -28
- package/es/LinkedCardList/index.css +1 -1
- package/es/LinkedCardList/index.d.ts +2 -2
- package/es/LinkedCardList/index.js +2 -2
- package/es/PageBanner/index.js +2 -1
- package/es/Portal/index.js +5 -7
- package/es/ProgressBar/index.css +1 -1
- package/es/Sidebar/index.js +1 -0
- package/es/Spinner/index.d.ts +1 -1
- package/es/SplitContainer/index.d.ts +4 -2
- package/es/SplitContainer/index.js +45 -13
- package/es/ValueToggleGroup/index.d.ts +18 -0
- package/es/ValueToggleGroup/index.js +12 -0
- package/es/index.css +1 -1
- package/es/index.d.ts +8 -8
- package/es/index.js +3 -3
- package/es/useTranslation/index.js +2 -1
- package/package.json +88 -90
- package/src/Checkbox/index.scss +12 -5
- package/src/Checkbox/index.tsx +25 -7
- package/src/ColorCard/{index.scss → index.css} +50 -59
- package/src/ColorCard/index.tsx +21 -9
- package/src/DateNavigator/index.scss +66 -33
- package/src/DateNavigator/index.tsx +98 -33
- package/src/LinkedCardList/index.scss +8 -1
- package/src/LinkedCardList/index.tsx +2 -2
- package/src/PageBanner/index.tsx +2 -1
- package/src/Portal/index.tsx +8 -7
- package/src/ProgressBar/index.scss +2 -2
- package/src/Sidebar/index.tsx +1 -0
- package/src/Spinner/{index.scss → index.css} +13 -10
- package/src/Spinner/index.tsx +2 -2
- package/src/SplitContainer/index.tsx +75 -17
- package/src/ValueToggleGroup/index.css +79 -0
- package/src/ValueToggleGroup/index.tsx +52 -0
- package/src/index.scss +3 -2
- package/src/index.ts +12 -12
- package/src/useTranslation/index.ts +2 -1
- package/LICENSE +0 -21
- package/es/ColorCard/index.css +0 -1
- package/es/Spinner/index.css +0 -1
- package/es/ValueToggle/index.css +0 -1
- package/es/ValueToggle/index.d.ts +0 -18
- package/es/ValueToggle/index.js +0 -38
- package/src/ValueToggle/index.scss +0 -50
- package/src/ValueToggle/index.tsx +0 -75
package/dist/styles/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ObCheckbox-root{--check-width: 2rem;--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));--bg-color-selected: var(--brand-light);display:inline-block;height:var(--check-width);margin-bottom:0}.ObCheckbox-root:focus-within .ObCheckbox-box{border:.1rem solid #000}.ObCheckbox-root.Ob-disabled{--bg-color: rgba(150, 150, 150, 0.5);--bg-color-hover: var(--bg-color)}.ObCheckbox-box{position:relative;background:var(--bg-color);transition:background 300ms ease;overflow:hidden;border-radius:calc(var(--check-width)/15);height:var(--check-width);width:var(--check-width)}.ObCheckbox-box:hover{background:var(--bg-color-hover)}.ObCheckbox-label{position:relative;margin-bottom:0;overflow:hidden}.ObCheckbox-label:focus{outline:none}.ObCheckbox-mark{color:#fff;display:inline-block;font-size:calc(var(--check-width)*.4);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition:all 300ms ease-in-out;transition-delay:0ms;transform:translate(-50%, -50%) scale(6)}.ObCheckbox-input{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.ObCheckbox-input:focus{outline:none}.check_Label{margin-bottom:0;flex-grow:1}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label{animation:animOn 800ms 1 forwards}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{background:var(--bg-color-selected)}.ObCheckbox-input:checked+.ObCheckbox-label .ObCheckbox-box .ObCheckbox-mark{transform:translate(-50%, -50%) scale(1);transition-delay:200ms;opacity:1}.ObCheckbox-root.Ob-disabled .ObCheckbox-box{cursor:not-allowed}@keyframes animOn{40%{transform:scaleY(0.4) scaleX(2)}50%{transform:scaleY(1.2) scaleX(0.6)}60%{transform:scaleY(0.8) scaleX(1.4)}70%{transform:scaleY(1.1) scaleX(0.9)}100%{transform:scaleY(1) scaleX(1)}}.ObColorCard-root{--bg-color-border: black;--bg-color-main: white;--bg-size: 0.75rem;--card-color: rgb(0, 0, 0);align-items:stretch;background-image:linear-gradient(to right, hsl(186, 72%, 24%), hsl(186, 72%, 24%) 0.75rem, white 0.75rem, white);background-image:linear-gradient(to right, var(--bg-color-border), var(--bg-color-border) var(--bg-size), var(--bg-color-main) var(--bg-size), var(--bg-color-main));border-radius:.25rem;box-shadow:0 1px 12px rgba(0,0,0,.15),0 1px 6px rgba(0,0,0,.25);color:#666;cursor:pointer;display:flex;font-family:"Variable Bahnschrift","Bahnschrift","Open Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;min-height:10rem;overflow:hidden;transition:all ease-in-out 300ms}.ObColorCard-root:nth-of-type(5n + 1){--bg-color-border: rgb(178, 108, 190)}.ObColorCard-root:nth-of-type(5n + 2){--bg-color-border: rgb(79, 164, 61)}.ObColorCard-root:nth-of-type(5n + 3){--bg-color-border: rgb(246, 170, 23)}.ObColorCard-root:nth-of-type(5n + 4){--bg-color-border: rgb(218, 93, 83)}.ObColorCard-root:nth-of-type(5n + 5){--bg-color-border: rgb(23, 162, 184)}.ObColorCard-root:hover,.ObColorCard-root:focus{--bg-color-main: #f5f5f5;box-shadow:0 3px 18px rgba(0,0,0,.15),0 3px 12px rgba(0,0,0,.25);color:#666;text-decoration:none}@media screen and (min-width: 48rem){.ObColorCard-root{font-size:1.2rem}}.ObColorCard-column{display:flex;flex:1 1 100%;flex-direction:column;justify-content:space-between;margin:1rem 0;overflow:hidden;padding:.5rem 1.5rem .5rem 1rem;text-overflow:ellipsis}.ObColorCard-column:first-child{margin-left:.75rem;margin-left:var(--bg-size)}.ObColorCard-column.ObColorCard-minor{border-right:1px solid #e3e3e3;flex:0 0 4rem;transition:margin ease-in-out 300ms}@media screen and (min-width: 48rem){.ObColorCard-column.ObColorCard-minor{flex:0 0 8rem}}.ObColorCard-detailLabel{color:#ccc;font-size:.8rem;text-transform:uppercase}.ObColorCard-detail:not(:last-child){margin-right:1.5rem}.ObColorCard-detail.ObColorCard-primary,.ObColorCard-detail.ObColorCard-primary .ObColorCard-detailValue{font-size:1.25rem;font-weight:300}.ObColorCard-detail.ObColorCard-primary .ObColorCard-detailValue{color:unset}@media screen and (min-width: 48rem){.ObColorCard-detail{font-size:1rem}}.ObColorCard-detailValue{color:#999}.ObColorCard-label{position:relative;padding-left:1.5rem}.ObColorCard-label:not(:last-child){margin-bottom:1rem}.ObColorCard-label:not(:last-child)::after{content:"";position:absolute;width:.2rem;height:calc(100% + 1rem);border-left:.2rem dotted #666;left:.25rem;top:.5rem;z-index:0}.ObColorCard-label::before{background:#fff;border:.2rem solid hsl(186,72%,24%);border:.2rem solid var(--bg-color-border);border-radius:50%;content:"";display:block;height:.75rem;left:0;position:absolute;top:.3rem;width:.75rem;z-index:1}.ObDateNavigator-icon{display:inline-block}.ObDateNavigator-icon svg{width:.625em;position:relative;top:-1px}.ObDateNavigator-root{background-color:hsl(220,20%,96%);background-color:var(--block-header-color-bg);display:flex;font-size:1rem}.ObDateNavigator-arrow{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;display:flex;align-items:center;flex:0 0 3rem;justify-content:center;height:3rem;cursor:pointer;text-align:center}.ObDateNavigator-arrow::-moz-focus-inner{border:0;padding:0}.ObDateNavigator-arrow:hover{background-color:#e3e3e3;background-color:var(--block-header-button-hover)}.ObDateNavigator-arrowLeft{border-right:1px solid #ddd;order:1}.ObDateNavigator-arrowRight{border-left:1px solid #ddd;order:3}.ObDateNavigator-date{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;order:2;height:3rem;text-align:center}.ObLinkedList-root{list-style-type:none;margin-left:0;padding-left:0}.ObLinkedList-item{display:flex;align-items:center;flex-direction:row}.ObLinkedList-leftColumn{flex:1 1 4em;font-size:.75em;padding:0 1em;text-align:center}.ObLinkedList-rightColumn{flex:1 1 100%;padding:1em 1em 1em 1.5em}.ObLinkedList-line{display:flex;align-self:stretch;flex:0 0 .2em;background:#fff;position:relative}.ObLinkedList-bullet{background:#fff;border:1px solid rgba(50,50,50,.25);border-radius:.55em;height:.7em;width:.7em;position:absolute;left:0;top:50%;transform:translate(-0.25em, -50%)}.ObLinkedList-card{background:#fff;border:1px solid;border-color:#e5e6e9 #dfe0e4 #d0d1d5;border-radius:.1875em;color:inherit;cursor:pointer;flex:100% 1 1;position:relative}.ObLinkedList-card::before{border-bottom:.5em solid rgba(0,0,0,0);border-right:1em solid #fff;border-top:.5em solid rgba(0,0,0,0);content:" ";filter:drop-shadow(-1px 0px 1px rgba(50, 50, 50, 0.2));height:1em;left:-1em;margin-top:-0.5em;position:absolute;top:50%;width:1em}.ObLinkedList-card:hover{background-color:hsl(220,20%,94%) !important;color:inherit;text-decoration:inherit}.ObLinkedList-card:hover::before{border-right-color:hsl(220,20%,94%) !important}.ObPageBanner-root{background-color:hsl(186,72%,24%);background-color:var(--brand-dark);box-shadow:0px 8px 8px rgba(0,0,0,.2);color:#fff}.ObPageBanner-root a{color:hsl(200,50%,80%)}.ObPageBanner-inner{display:flex;align-items:center;flex-direction:column}@media screen and (min-width: 768px){.ObPageBanner-inner{align-items:flex-start;flex-direction:row}}.ObPageBanner-plantTitle{font-size:2rem}@media screen and (min-width: 992px){.ObPageBanner-plantTitle{font-size:3rem}}.ObPageBanner-bannerImage{align-self:stretch;background-color:#ddd;display:inline-block;height:20vh;object-fit:cover;object-position:center center;width:100%}@media screen and (min-width: 576px){.ObPageBanner-bannerImage{align-self:center;margin:0;margin-right:1rem;border:.4rem solid #fff;border-radius:50%;height:150px;width:150px}}@media screen and (min-width: 992px){.ObPageBanner-bannerImage{height:250px;width:250px}}.ObPageBanner-bannerTitle{margin-bottom:1rem;margin-top:1rem;font-size:2rem}@media screen and (min-width: 768px){.ObPageBanner-bannerTitle{margin-top:0}}@media screen and (min-width: 992px){.ObPageBanner-bannerTitle{font-size:3rem}}.ObPageBanner-tabList.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:1000}.ObPageBanner-tabListInner{overflow-x:auto;scrollbar-width:thin;white-space:nowrap}.ObPageBanner-tab{border-bottom:.25rem solid rgba(0,0,0,0);display:inline-block;margin-top:.5rem;min-width:8rem;padding:.5rem 1rem;text-align:center;text-transform:capitalize}.ObPageBanner-tab.active{border-color:#fff}.ObProgressBar-root{height:1.5em;width:100%;appearance:none;-webkit-appearance:none;background-color:#f5f5f5;border:none;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset;color:#4169e1;position:relative}.ObProgressBar-root::-webkit-progress-bar{background-color:#f5f5f5;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset}.ObProgressBar-root::-webkit-progress-value{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary, hsl(186, 72%, 24%)), var(--brand-light, hsl(186, 72%, 37%)));background-image:-webkit-linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),-webkit-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),-webkit-linear-gradient(left, var(--brand-primary), hsl(186, 72%, 24%), var(--brand-light, hsl(186, 72%, 37%)));background-size:35px 20px,100% 100%,100% 100%;border-radius:3px;position:relative;transition:width .5s ease-out}.ObProgressBar-root::-webkit-progress-value:after{background-color:#fff;content:"";border-radius:100%;height:5px;position:absolute;right:7px;top:7px;width:5px}.ObProgressBar-root::-moz-progress-bar{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary), var(--brand-light));background-image:-moz-linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),-moz-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),-moz-linear-gradient(left, var(--brand-primary), var(--brand-light));background-size:35px 20px,100% 100%,100% 100%;border-radius:3px;transition:width .5s ease-out}.ObSidebar-root{position:fixed;bottom:0;left:0;top:0;z-index:2;background-color:#fff;transform:translateX(-100%);transition:transform .2s ease-out;will-change:transform;overflow-y:auto}.ObSidebar-root.Ob-right{left:unset;right:0;transform:translateX(100%)}.ObSidebar-root.Ob-open{transform:translateX(0)}.ObSidebar-root.ObSidebar-shadow{box-shadow:2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-root.ObSidebar-shadow.Ob-right{box-shadow:-2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-overlay{position:fixed;bottom:0;left:0;right:0;top:0;z-index:1;opacity:0;visibility:hidden;transition:opacity .3s ease-out,visibility .3s ease-out;background-color:rgba(0,0,0,.3)}.ObSidebar-overlay.Ob-open{opacity:1;visibility:visible}.😖{display:initial}.ObSplitContainer-root{display:flex;flex-direction:column;height:100%;width:100%}.ObSplitContainer-root.horizontal{flex-direction:row}.ObSplitContainer-panel{overflow:hidden}.ObSplitContainer-divider{flex:0 0 .5rem;background-color:rgba(0,0,0,0);line-height:.75;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.ObSplitContainer-divider:focus{background-color:rgba(0,0,0,.3)}.ObSplitContainer-root.horizontal>.ObSplitContainer-divider{cursor:ew-resize;writing-mode:vertical-lr}.ObSplitContainer-panel.dragging{pointer-events:none}.ObValueToggle-root{display:flex;align-items:center}.ObValueToggle-option{margin-bottom:0}.ObValueToggle-label{cursor:pointer;font-size:.8em;margin:0 .2em;padding:.3em .5em;text-transform:uppercase}.ObValueToggle-label:hover{background:#ccc}.ObValueToggle-input:checked+.ObValueToggle-label{--color-bg: var(--brand-dark);background-color:#666;background-color:var(--color-bg);cursor:default;color:#fff}.ObValueToggle-input:checked:focus-within+.ObValueToggle-label{--color-bg: var(--brand-light)}.ObValueToggle-input:checked:hover+.ObValueToggle-label{background-color:#666;background-color:var(--color-bg)}.ObValueToggle-input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}/*# sourceMappingURL=styles.css.map */
|
|
1
|
+
.ObCheckbox-root{--check-width: 2rem;--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));--bg-color-selected: var(--brand-light);display:inline-block;height:var(--check-width);margin-bottom:0}.ObCheckbox-root:focus-within .ObCheckbox-box{border:.1rem solid #000}.ObCheckbox-root.Ob-disabled{--bg-color: rgba(150, 150, 150, 0.5);--bg-color-hover: var(--bg-color)}.ObCheckbox-box{position:relative;background:var(--bg-color);transition:background 300ms ease;overflow:hidden;border-radius:calc(var(--check-width)/15);height:var(--check-width);width:var(--check-width)}.ObCheckbox-box:hover{background:var(--bg-color-hover)}.ObCheckbox-label{position:relative;margin-bottom:0;overflow:hidden}.ObCheckbox-label:focus{outline:none}.ObCheckbox-mark{color:#fff;display:inline-block;font-size:calc(var(--check-width)*.4);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition:all 300ms ease-in-out;transition-delay:0ms;transform:translate(-50%, -50%) scale(6)}.ObCheckbox-input{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.ObCheckbox-input:focus{outline:none}.ObCheckbox-label{display:flex;gap:.5rem;align-items:center;overflow:visible}.ObCheckbox-root.Ob-reverse .ObCheckbox-label{flex-direction:row-reverse}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{animation:animOn 600ms 1 forwards}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{background:var(--bg-color-selected)}.ObCheckbox-input:checked+.ObCheckbox-label .ObCheckbox-box .ObCheckbox-mark{transform:translate(-50%, -50%) scale(1);transition-delay:200ms;opacity:1}.ObCheckbox-root.Ob-disabled .ObCheckbox-box{cursor:not-allowed}@keyframes animOn{40%{transform:scaleY(0.4) scaleX(2)}50%{transform:scaleY(1.2) scaleX(0.6)}60%{transform:scaleY(0.8) scaleX(1.4)}70%{transform:scaleY(1.1) scaleX(0.9)}100%{transform:scaleY(1) scaleX(1)}}.ObColorCard-root{--bg-color-border: black;--bg-color-main: white;--bg-size: 0.75rem;--card-color: rgb(0, 0, 0);display:flex;align-items:stretch;min-height:10rem;overflow:hidden;border-radius:.25rem;box-shadow:0 1px 12px rgba(0, 0, 0, 0.15),0 1px 6px rgba(0, 0, 0, 0.25);color:#666;background-image:linear-gradient(to right, var(--bg-color-border), var(--bg-color-border) var(--bg-size), var(--bg-color-main) var(--bg-size), var(--bg-color-main));font-family:"Variable Bahnschrift","Bahnschrift","Open Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:1rem;transition:all ease-in-out 300ms;cursor:pointer;&:nth-of-type(5n + 1){--bg-color-border: rgb(178, 108, 190)}&:nth-of-type(5n + 2){--bg-color-border: rgb(79, 164, 61)}&:nth-of-type(5n + 3){--bg-color-border: rgb(246, 170, 23)}&:nth-of-type(5n + 4){--bg-color-border: rgb(218, 93, 83)}&:nth-of-type(5n + 5){--bg-color-border: rgb(23, 162, 184)}&:hover,&:focus{--bg-color-main: #f5f5f5;box-shadow:0 3px 18px rgba(0, 0, 0, 0.15),0 3px 12px rgba(0, 0, 0, 0.25);text-decoration:none}}@media screen and (min-width: 48rem){.ObColorCard-root{font-size:1.2rem}}.ObColorCard-column{display:flex;flex:1 1 100%;flex-direction:column;justify-content:space-between;margin:1rem 0;padding:.5rem 1.5rem .5rem 1rem;overflow:hidden;text-overflow:ellipsis;&:first-child{margin-left:var(--bg-size, 0.75rem)}&.ObColorCard-minor{flex:0 0 4rem;border-right:1px solid #e3e3e3;transition:margin ease-in-out 300ms}}@media screen and (min-width: 48rem){&.ObColorCard-minor{flex:0 0 8rem}}.ObColorCard-detailLabel{color:dimgray;font-size:.8rem;text-transform:uppercase}.ObColorCard-detail{&:not(:last-child){margin-right:1.5rem}&.ObColorCard-primary,&.ObColorCard-primary .ObColorCard-detailValue{font-size:1.25rem;font-weight:300}&.ObColorCard-primary .ObColorCard-detailValue{color:unset}}@media screen and (min-width: 48rem){.ObColorCard-detail{font-size:1rem}}.ObColorCard-detailValue{color:#555}.ObColorCard-stepList{display:flex;flex-direction:column;gap:1rem}.ObColorCard-step{position:relative;text-box-trim:trim-both;display:flex;align-items:flex-start;gap:.5rem}.ObColorCard-step::before{flex:.6em 0 0;content:"";position:relative;top:.25em;width:.6em;height:.6em;background:white;border:2px solid var(--bg-color-border, #999);border-radius:50%;box-sizing:border-box;z-index:1}.ObColorCard-step:not(:last-child)::after{content:"";position:absolute;top:1em;left:calc(.3em - 1px);height:calc(100% - .95em + 1rem + .0625em);border-left:2px dotted #999;z-index:0}.ObDateNavigator-icon{display:inline-block}.ObDateNavigator-icon svg{width:.625em;position:relative;top:-1px}.ObDateNavigator-root{background-color:hsl(220,20%,96%);background-color:var(--block-header-color-bg);display:flex;font-size:1rem;outline:none}.ObDateNavigator-root:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}.ObDateNavigator-arrow{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;display:flex;align-items:center;flex:0 0 3rem;justify-content:center;height:3rem;cursor:pointer;text-align:center}.ObDateNavigator-arrow::-moz-focus-inner{border:0;padding:0}.ObDateNavigator-arrow:hover{background-color:#e3e3e3;background-color:var(--block-header-button-hover)}.ObDateNavigator-arrowLeft{border-right:1px solid #ddd;order:1}.ObDateNavigator-arrowRight{border-left:1px solid #ddd;order:3}.ObDateNavigator-date{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;order:2;height:3rem;text-align:center}.ObDateNavigator-today{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;order:4;padding:0 1rem;height:3rem;display:flex;align-items:center;justify-content:center;font-size:.875rem;color:var(--brand-dark, #336699);text-transform:uppercase;cursor:pointer;text-wrap:nowrap;border-left:1px solid #ddd}.ObDateNavigator-today::-moz-focus-inner{border:0;padding:0}.ObDateNavigator-today:hover{background-color:var(--block-header-button-hover)}.ObDateNavigator-today:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}:root{--ob-linked-list-bullet-size: 0.7em;--ob-linked-list-line-width: 0.2em}.ObLinkedList-root{list-style-type:none;margin-left:0;padding-left:0}.ObLinkedList-item{display:flex;align-items:center;flex-direction:row}.ObLinkedList-leftColumn{flex:1 1 4em;font-size:.75em;padding:0 1em;text-align:center}.ObLinkedList-rightColumn{flex:1 1 100%;padding:1em 1em 1em 1.5em}.ObLinkedList-line{display:flex;align-self:stretch;flex:0 0 .2em;background:#fff;position:relative}.ObLinkedList-bullet{background:#fff;border:1px solid rgba(50,50,50,.25);border-radius:.55em;height:.7em;width:.7em;position:absolute;left:0;top:50%;transform:translate(calc(-1 * var(--ob-linked-list-bullet-size) / 2 + var(--ob-linked-list-line-width) / 2), -50%)}.ObLinkedList-card{display:block;background:#fff;border:1px solid;border-color:#e5e6e9 #dfe0e4 #d0d1d5;border-radius:.1875em;color:inherit;cursor:pointer;flex:100% 1 1;position:relative}.ObLinkedList-card::before{border-bottom:.5em solid rgba(0,0,0,0);border-right:1em solid #fff;border-top:.5em solid rgba(0,0,0,0);content:" ";filter:drop-shadow(-1px 0px 1px rgba(50, 50, 50, 0.2));height:1em;left:-1em;margin-top:-0.5em;position:absolute;top:50%;width:1em}.ObLinkedList-card:hover{background-color:hsl(220,20%,94%) !important;color:inherit;text-decoration:inherit}.ObLinkedList-card:hover::before{border-right-color:hsl(220,20%,94%) !important}.ObPageBanner-root{background-color:hsl(186,72%,24%);background-color:var(--brand-dark);box-shadow:0px 8px 8px rgba(0,0,0,.2);color:#fff}.ObPageBanner-root a{color:hsl(200,50%,80%)}.ObPageBanner-inner{display:flex;align-items:center;flex-direction:column}@media screen and (min-width: 768px){.ObPageBanner-inner{align-items:flex-start;flex-direction:row}}.ObPageBanner-plantTitle{font-size:2rem}@media screen and (min-width: 992px){.ObPageBanner-plantTitle{font-size:3rem}}.ObPageBanner-bannerImage{align-self:stretch;background-color:#ddd;display:inline-block;height:20vh;object-fit:cover;object-position:center center;width:100%}@media screen and (min-width: 576px){.ObPageBanner-bannerImage{align-self:center;margin:0;margin-right:1rem;border:.4rem solid #fff;border-radius:50%;height:150px;width:150px}}@media screen and (min-width: 992px){.ObPageBanner-bannerImage{height:250px;width:250px}}.ObPageBanner-bannerTitle{margin-bottom:1rem;margin-top:1rem;font-size:2rem}@media screen and (min-width: 768px){.ObPageBanner-bannerTitle{margin-top:0}}@media screen and (min-width: 992px){.ObPageBanner-bannerTitle{font-size:3rem}}.ObPageBanner-tabList.sticky{position:-webkit-sticky;position:sticky;top:0;z-index:1000}.ObPageBanner-tabListInner{overflow-x:auto;scrollbar-width:thin;white-space:nowrap}.ObPageBanner-tab{border-bottom:.25rem solid rgba(0,0,0,0);display:inline-block;margin-top:.5rem;min-width:8rem;padding:.5rem 1rem;text-align:center;text-transform:capitalize}.ObPageBanner-tab.active{border-color:#fff}.ObProgressBar-root{height:1.5em;width:100%;appearance:none;-webkit-appearance:none;background-color:#f5f5f5;border:none;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset;color:#4169e1;position:relative}.ObProgressBar-root::-webkit-progress-bar{background-color:#f5f5f5;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset}.ObProgressBar-root::-webkit-progress-value{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary), var(--brand-light));background-image:-webkit-linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),-webkit-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),-webkit-linear-gradient(left, var(--brand-primary), var(--brand-light));background-size:35px 20px,100% 100%,100% 100%;border-radius:3px;position:relative;transition:width .5s ease-out}.ObProgressBar-root::-webkit-progress-value:after{background-color:#fff;content:"";border-radius:100%;height:5px;position:absolute;right:7px;top:7px;width:5px}.ObProgressBar-root::-moz-progress-bar{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary), var(--brand-light));background-image:-moz-linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),-moz-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),-moz-linear-gradient(left, var(--brand-primary), var(--brand-light));background-size:35px 20px,100% 100%,100% 100%;border-radius:3px;transition:width .5s ease-out}.ObSidebar-root{position:fixed;bottom:0;left:0;top:0;z-index:2;background-color:#fff;transform:translateX(-100%);transition:transform .2s ease-out;will-change:transform;overflow-y:auto}.ObSidebar-root.Ob-right{left:unset;right:0;transform:translateX(100%)}.ObSidebar-root.Ob-open{transform:translateX(0)}.ObSidebar-root.ObSidebar-shadow{box-shadow:2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-root.ObSidebar-shadow.Ob-right{box-shadow:-2px 2px 4px rgba(0,0,0,.15)}.ObSidebar-overlay{position:fixed;bottom:0;left:0;right:0;top:0;z-index:1;opacity:0;visibility:hidden;transition:opacity .3s ease-out,visibility .3s ease-out;background-color:rgba(0,0,0,.3)}.ObSidebar-overlay.Ob-open{opacity:1;visibility:visible}.ObSpinner-wrapper,.ObSpinner-fullPage{--bullet-size: 0.5em}.ObSpinner-root{display:inline-block}.ObSpinner-fullPage{display:flex;align-items:center;justify-content:center;height:100vh;width:100vw}.ObSpinner-spinner{display:inline-block;height:calc(var(--bullet-size)*1.5);position:relative;width:calc(var(--bullet-size)*5)}.ObSpinner-bullet{animation-timing-function:cubic-bezier(0, 1, 1, 0);background:#666;border-radius:50%;height:var(--bullet-size);position:absolute;top:.2rem;width:var(--bullet-size);&:nth-child(1){animation:scaleAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*.5)}&:nth-child(2){animation:translateAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*.5)}&:nth-child(3){animation:translateAnimation .6s infinite ease-in-out;left:calc(var(--bullet-size)*2.4)}&:nth-child(4){animation:scaleAnimation .6s infinite ease-in-out reverse;left:calc(var(--bullet-size)*4)}}@keyframes scaleAnimation{from{transform:scale(0)}to{transform:scale(1)}}@keyframes translateAnimation{from{transform:translate(0, 0)}to{transform:translate(calc(var(--bullet-size) * 1.65), 0)}}.😖{display:initial}.ObSplitContainer-root{display:flex;flex-direction:column;height:100%;width:100%}.ObSplitContainer-root.horizontal{flex-direction:row}.ObSplitContainer-panel{overflow:hidden}.ObSplitContainer-divider{flex:0 0 .5rem;background-color:rgba(0,0,0,0);line-height:.75;cursor:ns-resize;display:flex;align-items:center;justify-content:center}.ObSplitContainer-divider:focus{background-color:rgba(0,0,0,.3)}.ObSplitContainer-root.horizontal>.ObSplitContainer-divider{cursor:ew-resize;writing-mode:vertical-lr}.ObSplitContainer-panel.dragging{pointer-events:none}.ObValueToggleGroup{padding:.25rem;border:2px solid rgb(0 0 0/0.2);border-radius:4px;display:flex;gap:.25rem;flex-wrap:wrap;&.vertical{flex-direction:column;align-items:center;& .ObValueToggleOption{width:100%;& .ObValueToggleLabel{width:100%;text-align:center}}}&:focus-within{border-color:rgb(0 0 0/0.8)}}.ObValueToggleOption{display:flex;align-items:center;margin:0;position:relative}.ObValueToggleOption input{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.ObValueToggleLabel{font-size:.8em;margin:0 .2em;padding:.3em .5em;text-transform:uppercase;transition:background .2s ease,color .2s ease;border-radius:4px}.ObValueToggleOption:hover input:not(:disabled)+.ObValueToggleLabel{cursor:pointer;background:#ccc}.ObValueToggleOption input:checked+.ObValueToggleLabel{--color-bg: var(--brand-dark);background-color:var(--color-bg);color:white;cursor:default}.ObValueToggleOption input:disabled+.ObValueToggleLabel{color:rgb(0 0 0/0.5)}.ObValueToggleOption input:checked:focus-visible+.ObValueToggleLabel{--color-bg: var(--brand-light);outline:2px solid var(--brand-light)}.ObValueToggleOption input:checked:hover+.ObValueToggleLabel{background-color:var(--color-bg)}/*# sourceMappingURL=styles.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../src/Checkbox/index.scss","../../src/ColorCard/index.
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../../src/Checkbox/index.scss","../../src/ColorCard/index.css","../../src/DateNavigator/index.scss","../../src/styles/_mixins.scss","../../src/LinkedCardList/index.scss","../../src/PageBanner/index.scss","../../src/styles/_variables.scss","../../src/ProgressBar/index.scss","../../src/Sidebar/index.scss","../../src/Spinner/index.css","../../src/SplitContainer/index.scss","../../src/ValueToggleGroup/index.css"],"names":[],"mappings":"CAAA,iBACC,oBACA,qDACA,8DACA,wCAEA,qBACA,0BACA,gBAEA,8CACC,wBAGD,6BACC,qCACA,kCAIF,gBACC,kBAEA,2BACA,iCAEA,gBAEA,0CACA,0BACA,yBAEA,sBACC,iCAIF,kBACC,kBACA,gBACA,gBAEA,wBACC,aAIF,iBACC,WACA,qBACA,sCACA,SACA,UACA,oBACA,kBACA,QACA,iCACA,qBACA,yCAGD,kBACC,mBACA,qBACA,WACA,gBACA,kBACA,mBACA,UAEA,wBACC,aAIF,kBACC,aACA,UACA,mBAEA,iBAGD,8CACC,2BAGD,2EACC,kCAGD,2EACC,oCAGD,6EACC,yCACA,uBACA,UAGD,6CACC,mBAGD,kBACC,IACC,gCAGD,IACC,kCAGD,IACC,kCAGD,IACC,kCAGD,KACC,+BC3HF,kBACC,yBACA,uBACA,mBACA,2BAEA,aACA,oBACA,iBACA,gBACA,qBACA,wEACA,WACA,qKAOA,YACC,6LAaD,eACA,iCACA,eAEA,sBACC,sCAED,sBACC,oCAED,sBACC,qCAED,sBACC,oCAED,sBACC,qCAGD,gBAEC,yBACA,yEACA,sBAGD,qCA7DD,kBA8DE,kBAIF,oBACC,aACA,cACA,sBACA,8BACA,cACA,gCACA,gBACA,uBAEA,cACC,oCAGD,oBACC,cACA,+BACA,qCAEA,qCALD,oBAME,eAKH,yBACC,cACA,gBACA,yBAGD,oBACC,mBACC,oBAGD,qEAEC,kBACA,gBAGD,+CACC,aAGD,qCAfD,oBAgBE,gBAIF,yBACC,WAGD,sBACC,aACA,sBACA,SAGD,kBACC,kBACA,wBAEA,aACA,uBACA,UAGD,0BACC,cACA,WAEA,kBACA,UAEA,WACA,YACA,iBACA,8CACA,kBACA,sBACA,UAGD,0CACC,WACA,kBACA,QACA,sBACA,2CACA,4BACA,UC3JD,sBACE,qBAEA,0BACE,aACA,kBACA,SAIJ,sBACE,kCACA,8CACA,aACA,eACA,aAEA,oCACE,6CACA,mBAIJ,uBC1BC,gBACA,SACA,cAEA,aACA,mBACA,iBACA,UACA,0BACA,yBACA,sBACA,qBDiBC,aACA,mBACA,cACA,uBAEA,OAhCmB,KAkCnB,eACA,kBCvBD,yCACC,SACA,UDuBA,6BACE,yBACA,kDAIJ,2BACE,4BACA,QAGF,4BACE,2BACA,QAGF,sBACE,aACA,cACA,sBACA,uBACA,QAEA,OA5DmB,KA8DnB,kBAGF,uBClEC,gBACA,SACA,cAEA,aACA,mBACA,iBACA,UACA,0BACA,yBACA,sBACA,qBDyDC,QACA,eACA,OArEmB,KAsEnB,aACA,mBACA,uBACA,kBACA,iCACA,yBACA,eAED,iBAEA,2BCpEA,yCACC,SACA,UDoEA,6BACE,kDAGF,qCACE,6CACA,mBErFJ,MACC,oCACA,mCAGD,mBAEC,qBACA,cACA,eAGD,mBACC,aACA,mBACA,mBAGD,yBACC,aACA,gBACA,cACA,kBAGD,0BACC,cACA,0BAGD,mBACC,aACA,mBACA,cACA,gBACA,kBAGD,qBACC,gBAEA,oCACA,oBACA,OA9Ca,KA+Cb,MA/Ca,KAiDb,kBACA,OACA,QAEA,mHAGD,mBACC,cACA,gBACA,iBACA,qCACA,sBACA,cACA,eACA,cACA,kBAGD,2BACC,uCACA,4BACA,oCACA,YACA,uDACA,WACA,UACA,kBACA,kBACA,QACA,UAGD,yBACC,6CACA,cACA,wBAGD,iCACC,+CCzFD,mBACC,iBCHe,iBDIf,mCACA,sCACA,WAEA,qBACC,uBAIF,oBACC,aACA,mBACA,sBAEA,qCALD,oBAME,uBACA,oBAIF,yBACC,eAEA,qCAHD,yBAIE,gBAIF,0BACC,mBACA,sBACA,qBACA,YACA,iBACA,8BACA,WAEA,qCATD,0BAUE,kBACA,SACA,kBACA,wBACA,kBACA,aACA,aAGD,qCAnBD,0BAoBE,aACA,aAIF,0BACC,mBACA,gBACA,eAEA,qCALD,0BAME,cAGD,qCATD,0BAUE,gBAKD,6BACC,wBACA,gBACA,MACA,aAIF,2BACC,gBACA,qBACA,mBAGD,kBACC,yCACA,qBACA,iBACA,eACA,mBACA,kBACA,0BAEA,yBACC,kBE9FF,oBACC,aACA,WACA,gBACA,wBACA,yBACA,YACA,kBACA,0CACA,cACA,kBAEA,0CACC,yBACA,kBACA,0CAGD,4CACC,4QAUA,iBACC,mRAUD,gBACC,8BAGD,kBACA,kBACA,8BAGD,kDACC,sBACA,WAEA,mBACA,WAEA,kBACA,UACA,QACA,UAGD,uCACC,4QAUA,iBACC,0QAUD,gBACC,8BAGD,kBACA,8BC3FF,gBACC,eACA,SACA,OACA,MACA,UAEA,sBAEA,4BACA,kCACA,sBAQA,gBANA,yBACC,WACA,QACA,2BAKD,wBACC,wBAGD,iCACC,uCAEA,0CACC,wCAKH,mBACC,eACA,SACA,OACA,QACA,MACA,UAEA,UACA,kBAEA,WACC,6CAED,gCAEA,2BACC,UACA,mBCnDF,uCACC,qBAGD,gBACC,qBAGD,oBACC,aACA,mBACA,uBAEA,aACA,YAGD,mBACC,qBACA,oCACA,kBACA,iCAGD,kBACC,mDACA,gBACA,kBACA,0BACA,kBACA,UACA,yBAEA,eACC,kDACA,iCAGD,eACC,sDACA,iCAGD,eACC,sDACA,kCAGD,eACC,0DACA,iCAIF,0BACC,KACC,mBAGD,GACC,oBAIF,8BACC,KACC,0BAGD,GACC,yDCpEF,IACC,gBAGD,uBACC,aACA,sBACA,YACA,WAEA,kCACC,mBAIF,wBACC,gBAGD,0BACC,eACA,+BACA,gBACA,iBAEA,aACA,mBACA,uBAEA,gCACC,gCAGD,4DACC,iBACA,yBAIF,iCACC,oBC3CD,oBACC,eACA,gCACA,kBAEC,aACA,WACA,eAEA,WACE,sBACA,mBAEF,uBACC,WAEA,sBACC,WACA,oBAKF,eACE,6BAIJ,qBACE,aACA,mBACA,SACA,kBAGF,2BACE,kBACA,UACA,WACA,UACA,YACA,gBACA,sBACA,SAGF,oBACE,eACA,cACA,kBACA,yBACA,8CACA,kBAGF,oEACE,eACA,gBAGF,uDACE,8BACA,iCACA,YACA,eAGF,wDACE,qBAGF,qEACE,+BACA,qCAGF,6DACE","file":"styles.css"}
|
package/es/Checkbox/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ObCheckbox-root{--check-width: 2rem;--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));--bg-color-selected: var(--brand-light);display:inline-block;height:var(--check-width);margin-bottom:0}.ObCheckbox-root:focus-within .ObCheckbox-box{border:.1rem solid #000}.ObCheckbox-root.Ob-disabled{--bg-color: rgba(150, 150, 150, 0.5);--bg-color-hover: var(--bg-color)}.ObCheckbox-box{position:relative;background:var(--bg-color);transition:background 300ms ease;overflow:hidden;border-radius:calc(var(--check-width)/15);height:var(--check-width);width:var(--check-width)}.ObCheckbox-box:hover{background:var(--bg-color-hover)}.ObCheckbox-label{position:relative;margin-bottom:0;overflow:hidden}.ObCheckbox-label:focus{outline:none}.ObCheckbox-mark{color:#fff;display:inline-block;font-size:calc(var(--check-width)*.4);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition:all 300ms ease-in-out;transition-delay:0ms;transform:translate(-50%, -50%) scale(6)}.ObCheckbox-input{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.ObCheckbox-input:focus{outline:none}.
|
|
1
|
+
.ObCheckbox-root{--check-width: 2rem;--bg-color: var(--brand-dark, rgba(42, 65, 50, 0.5));--bg-color-hover: var(--brand-primary, rgba(42, 65, 50, 0.8));--bg-color-selected: var(--brand-light);display:inline-block;height:var(--check-width);margin-bottom:0}.ObCheckbox-root:focus-within .ObCheckbox-box{border:.1rem solid #000}.ObCheckbox-root.Ob-disabled{--bg-color: rgba(150, 150, 150, 0.5);--bg-color-hover: var(--bg-color)}.ObCheckbox-box{position:relative;background:var(--bg-color);transition:background 300ms ease;overflow:hidden;border-radius:calc(var(--check-width)/15);height:var(--check-width);width:var(--check-width)}.ObCheckbox-box:hover{background:var(--bg-color-hover)}.ObCheckbox-label{position:relative;margin-bottom:0;overflow:hidden}.ObCheckbox-label:focus{outline:none}.ObCheckbox-mark{color:#fff;display:inline-block;font-size:calc(var(--check-width)*.4);left:50%;opacity:0;pointer-events:none;position:absolute;top:50%;transition:all 300ms ease-in-out;transition-delay:0ms;transform:translate(-50%, -50%) scale(6)}.ObCheckbox-input{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.ObCheckbox-input:focus{outline:none}.ObCheckbox-label{display:flex;gap:.5rem;align-items:center;overflow:visible}.ObCheckbox-root.Ob-reverse .ObCheckbox-label{flex-direction:row-reverse}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{animation:animOn 600ms 1 forwards}.ObCheckbox-input:checked:not(:disabled)+.ObCheckbox-label .ObCheckbox-box{background:var(--bg-color-selected)}.ObCheckbox-input:checked+.ObCheckbox-label .ObCheckbox-box .ObCheckbox-mark{transform:translate(-50%, -50%) scale(1);transition-delay:200ms;opacity:1}.ObCheckbox-root.Ob-disabled .ObCheckbox-box{cursor:not-allowed}@keyframes animOn{40%{transform:scaleY(0.4) scaleX(2)}50%{transform:scaleY(1.2) scaleX(0.6)}60%{transform:scaleY(0.8) scaleX(1.4)}70%{transform:scaleY(1.1) scaleX(0.9)}100%{transform:scaleY(1) scaleX(1)}}
|
package/es/Checkbox/index.d.ts
CHANGED
|
@@ -2,7 +2,18 @@ import "./index.css";
|
|
|
2
2
|
export type CheckboxProps = React.RefAttributes<HTMLInputElement> & Omit<React.HTMLProps<HTMLInputElement>, "value"> & {
|
|
3
3
|
className?: string;
|
|
4
4
|
id?: string;
|
|
5
|
+
/**
|
|
6
|
+
* Label for the checkbox.
|
|
7
|
+
*/
|
|
8
|
+
label?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Tooltip text for the checkbox.
|
|
11
|
+
*/
|
|
5
12
|
title?: string;
|
|
6
13
|
value?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Reverses the checkbox layout, placing the label before the checkbox.
|
|
16
|
+
*/
|
|
17
|
+
reverse?: boolean;
|
|
7
18
|
};
|
|
8
19
|
export declare const Checkbox: import("react").ForwardRefExoticComponent<Omit<CheckboxProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
package/es/Checkbox/index.js
CHANGED
|
@@ -5,9 +5,12 @@ import { forwardRef, useEffect, useId, useRef } from "react";
|
|
|
5
5
|
function Mark(props) {
|
|
6
6
|
return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", ...props, children: _jsx("path", { d: "M20.285 2L9 13.567 3.714 8.556 0 12.272 9 21 24 5.715z", fill: "currentColor" }) }));
|
|
7
7
|
}
|
|
8
|
-
export const Checkbox = forwardRef(function Checkbox({ className, disabled = false, id, onChange = () => null, title, value, ...other }, ref) {
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
export const Checkbox = forwardRef(function Checkbox({ className, disabled = false, id, onChange = () => null, label, title, reverse, value, ...other }, ref) {
|
|
9
|
+
let inputId = useId();
|
|
10
|
+
inputId = id ?? inputId;
|
|
11
|
+
let inputIdRef = `#${inputId}`;
|
|
12
|
+
let input = useRef(null);
|
|
13
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: Ref object
|
|
11
14
|
useEffect(() => {
|
|
12
15
|
if (typeof ref === "function") {
|
|
13
16
|
ref(input.current);
|
|
@@ -30,12 +33,12 @@ export const Checkbox = forwardRef(function Checkbox({ className, disabled = fal
|
|
|
30
33
|
}
|
|
31
34
|
function handleKeyDown(evt) {
|
|
32
35
|
if (evt.nativeEvent) {
|
|
33
|
-
|
|
36
|
+
let { nativeEvent } = evt;
|
|
34
37
|
if (nativeEvent.key === " ") {
|
|
35
38
|
nativeEvent.preventDefault();
|
|
36
39
|
input.current?.click();
|
|
37
40
|
}
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
|
-
return (_jsxs("div", { className: clsx("ObCheckbox-root", disabled && "Ob-disabled", className), title: title, children: [_jsx("input", { className: "ObCheckbox-input", id: inputId, type: "checkbox", onChange: handleInputChanged, checked: value, disabled: disabled, ref: input, ...other }),
|
|
43
|
+
return (_jsxs("div", { className: clsx("ObCheckbox-root", disabled && "Ob-disabled", reverse && "Ob-reverse", className), title: title, children: [_jsx("input", { className: "ObCheckbox-input", id: inputId, type: "checkbox", onChange: handleInputChanged, checked: value, disabled: disabled, ref: input, ...other }), _jsxs("label", { htmlFor: inputIdRef, className: "ObCheckbox-label", onKeyDown: handleKeyDown, onClick: handleClick, children: [_jsx("div", { className: "ObCheckbox-box", children: _jsx(Mark, { className: "ObCheckbox-mark" }) }), label && _jsx("div", { className: "ObCheckbox-label-text", children: label })] })] }));
|
|
41
44
|
});
|
package/es/ColorCard/index.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
export
|
|
2
|
+
export type ColorCardProps = Pick<React.HTMLAttributes<HTMLDivElement>, "id" | "className" | "children"> & {
|
|
3
3
|
as?: "a" | "div" | "button" | "span" | "section" | "article";
|
|
4
4
|
href?: string;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export declare function ColorCard({ as: Component, children, className, href, ...other }: ColorCardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function CardStepList({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function CardStep({ children, className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
6
9
|
export declare function CardColumn({ children, className, minor, ...other }: React.HTMLAttributes<HTMLDivElement> & {
|
|
7
10
|
minor?: boolean;
|
|
8
11
|
}): import("react/jsx-runtime").JSX.Element;
|
package/es/ColorCard/index.js
CHANGED
|
@@ -5,6 +5,12 @@ export function ColorCard({ as: Component, children, className, href, ...other }
|
|
|
5
5
|
const BaseElement = Component ? Component : href ? "a" : "div";
|
|
6
6
|
return (_jsx(BaseElement, { className: clsx("ObColorCard-root", className), href: href, ...other, children: children }));
|
|
7
7
|
}
|
|
8
|
+
export function CardStepList({ children, className, ...props }) {
|
|
9
|
+
return (_jsx("div", { className: clsx("ObColorCard-stepList", className), ...props, children: children }));
|
|
10
|
+
}
|
|
11
|
+
export function CardStep({ children, className, ...props }) {
|
|
12
|
+
return (_jsx("div", { className: clsx("ObColorCard-step", className), ...props, children: _jsx("div", { className: "ObColorCard-stepText", children: children }) }));
|
|
13
|
+
}
|
|
8
14
|
export function CardColumn({ children, className, minor, ...other }) {
|
|
9
15
|
return (_jsx("div", { className: clsx("ObColorCard-column", minor && "ObColorCard-minor", className), ...other, children: children }));
|
|
10
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ObDateNavigator-icon{display:inline-block}.ObDateNavigator-icon svg{width:.625em;position:relative;top:-1px}.ObDateNavigator-root{background-color:hsl(220,20%,96%);background-color:var(--block-header-color-bg);display:flex;font-size:1rem}.ObDateNavigator-arrow{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;display:flex;align-items:center;flex:0 0 3rem;justify-content:center;height:3rem;cursor:pointer;text-align:center}.ObDateNavigator-arrow::-moz-focus-inner{border:0;padding:0}.ObDateNavigator-arrow:hover{background-color:#e3e3e3;background-color:var(--block-header-button-hover)}.ObDateNavigator-arrowLeft{border-right:1px solid #ddd;order:1}.ObDateNavigator-arrowRight{border-left:1px solid #ddd;order:3}.ObDateNavigator-date{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;order:2;height:3rem;text-align:center}
|
|
1
|
+
.ObDateNavigator-icon{display:inline-block}.ObDateNavigator-icon svg{width:.625em;position:relative;top:-1px}.ObDateNavigator-root{background-color:hsl(220,20%,96%);background-color:var(--block-header-color-bg);display:flex;font-size:1rem;outline:none}.ObDateNavigator-root:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}.ObDateNavigator-arrow{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;display:flex;align-items:center;flex:0 0 3rem;justify-content:center;height:3rem;cursor:pointer;text-align:center}.ObDateNavigator-arrow::-moz-focus-inner{border:0;padding:0}.ObDateNavigator-arrow:hover{background-color:#e3e3e3;background-color:var(--block-header-button-hover)}.ObDateNavigator-arrowLeft{border-right:1px solid #ddd;order:1}.ObDateNavigator-arrowRight{border-left:1px solid #ddd;order:3}.ObDateNavigator-date{display:flex;flex:1 1 100%;flex-direction:column;justify-content:center;order:2;height:3rem;text-align:center}.ObDateNavigator-today{background:none;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-appearance:button;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;order:4;padding:0 1rem;height:3rem;display:flex;align-items:center;justify-content:center;font-size:.875rem;color:var(--brand-dark, #336699);text-transform:uppercase;cursor:pointer;text-wrap:nowrap;border-left:1px solid #ddd}.ObDateNavigator-today::-moz-focus-inner{border:0;padding:0}.ObDateNavigator-today:hover{background-color:var(--block-header-button-hover)}.ObDateNavigator-today:focus-visible{outline:2px solid var(--brand-dark, #336699);outline-offset:2px}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
export declare function DateNavigator({ date: dateProp, onChange }: {
|
|
2
|
+
export declare function DateNavigator({ date: dateProp, onChange, minDate, maxDate, }: {
|
|
3
3
|
date?: Date;
|
|
4
4
|
onChange?: (date: Date) => void;
|
|
5
|
+
minDate?: Date;
|
|
6
|
+
maxDate?: Date;
|
|
5
7
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,13 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import "./index.css";
|
|
3
3
|
import { getLocalizedString } from "@olenbetong/appframe-core";
|
|
4
4
|
import clsx from "clsx";
|
|
5
|
-
import { useState } from "react";
|
|
5
|
+
import { useEffect, useRef, useState } from "react";
|
|
6
6
|
function getUiCulture() {
|
|
7
7
|
return af?.userSession?.culture ?? "default";
|
|
8
8
|
}
|
|
9
|
-
function Arrow(
|
|
10
|
-
|
|
11
|
-
return (_jsx("button", { className: clsx("ObDateNavigator-arrow", direction === "left" ? "ObDateNavigator-arrowLeft" : "ObDateNavigator-arrowRight"), ...rest, children: _jsx("span", { className: "ObDateNavigator-icon", children: direction === "left" ? (_jsx("svg", { "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 320 512", children: _jsx("path", { fill: "currentColor", d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z" }) })) : (_jsx("svg", { "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 320 512", children: _jsx("path", { fill: "currentColor", d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" }) })) }) }));
|
|
9
|
+
function Arrow({ direction, ...rest }) {
|
|
10
|
+
return (_jsx("button", { className: clsx("ObDateNavigator-arrow", direction === "left" ? "ObDateNavigator-arrowLeft" : "ObDateNavigator-arrowRight"), "aria-label": direction === "left" ? getLocalizedString("Previous day") : getLocalizedString("Next day"), ...rest, children: _jsx("span", { className: "ObDateNavigator-icon", children: direction === "left" ? (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 320 512", children: _jsx("path", { fill: "currentColor", d: "M34.52 239.03L228.87 44.69c9.37-9.37 24.57-9.37 33.94 0l22.67 22.67c9.36 9.36 9.37 24.52.04 33.9L131.49 256l154.02 154.75c9.34 9.38 9.32 24.54-.04 33.9l-22.67 22.67c-9.37 9.37-24.57 9.37-33.94 0L34.52 272.97c-9.37-9.37-9.37-24.57 0-33.94z" }) })) : (_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 320 512", children: _jsx("path", { fill: "currentColor", d: "M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z" }) })) }) }));
|
|
12
11
|
}
|
|
13
12
|
const formatter = new Intl.DateTimeFormat(getUiCulture(), {
|
|
14
13
|
weekday: "short",
|
|
@@ -17,35 +16,90 @@ const formatter = new Intl.DateTimeFormat(getUiCulture(), {
|
|
|
17
16
|
year: "numeric",
|
|
18
17
|
timeZone: "utc",
|
|
19
18
|
});
|
|
20
|
-
const today = new Date();
|
|
21
|
-
const todayUtc = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate());
|
|
22
19
|
const oneDay = 24 * 60 * 60 * 1000;
|
|
23
|
-
export function DateNavigator({ date: dateProp, onChange }) {
|
|
20
|
+
export function DateNavigator({ date: dateProp, onChange, minDate, maxDate, }) {
|
|
24
21
|
let [internalDate, setInternalDate] = useState(new Date());
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
let
|
|
28
|
-
let
|
|
29
|
-
let
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
22
|
+
let date = dateProp ?? internalDate;
|
|
23
|
+
let dateUtc = Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
|
|
24
|
+
let today = new Date();
|
|
25
|
+
let todayUtc = Date.UTC(today.getFullYear(), today.getMonth(), today.getDate());
|
|
26
|
+
let liveRef = useRef(null);
|
|
27
|
+
let text = (() => {
|
|
28
|
+
let base = formatter.format(new Date(dateUtc));
|
|
29
|
+
if (todayUtc === dateUtc)
|
|
30
|
+
return `${getLocalizedString("Today")}, ${base}`;
|
|
31
|
+
if (todayUtc === dateUtc + oneDay)
|
|
32
|
+
return `${getLocalizedString("Yesterday")}, ${base}`;
|
|
33
|
+
if (todayUtc === dateUtc - oneDay)
|
|
34
|
+
return `${getLocalizedString("Tomorrow")}, ${base}`;
|
|
35
|
+
return base;
|
|
36
|
+
})();
|
|
37
|
+
let disablePrev = !!minDate && dateUtc <= Date.UTC(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
|
|
38
|
+
let disableNext = !!maxDate && dateUtc >= Date.UTC(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
|
|
39
|
+
function updateDate(newDate) {
|
|
40
|
+
if (minDate && newDate < minDate) {
|
|
41
|
+
newDate = new Date(minDate); // Ensure we don't go below minDate
|
|
42
|
+
}
|
|
43
|
+
else if (maxDate && newDate > maxDate) {
|
|
44
|
+
newDate = new Date(maxDate); // Ensure we don't go above maxDate
|
|
45
|
+
}
|
|
46
|
+
if (onChange)
|
|
47
|
+
onChange(newDate);
|
|
48
|
+
else
|
|
49
|
+
setInternalDate(newDate);
|
|
38
50
|
}
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
function jumpToToday() {
|
|
52
|
+
updateDate(new Date());
|
|
41
53
|
}
|
|
42
|
-
|
|
43
|
-
if (
|
|
44
|
-
|
|
54
|
+
useEffect(() => {
|
|
55
|
+
if (liveRef.current) {
|
|
56
|
+
liveRef.current.textContent = text;
|
|
57
|
+
}
|
|
58
|
+
}, [text]);
|
|
59
|
+
function handleKeyDown(event) {
|
|
60
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight")
|
|
61
|
+
return;
|
|
62
|
+
if (event.defaultPrevented)
|
|
63
|
+
return;
|
|
64
|
+
if (event.altKey || event.metaKey)
|
|
65
|
+
return; // Ignore if alt or meta key is pressed
|
|
66
|
+
if (disablePrev && event.key === "ArrowLeft")
|
|
67
|
+
return;
|
|
68
|
+
if (disableNext && event.key === "ArrowRight")
|
|
69
|
+
return;
|
|
70
|
+
if (event.ctrlKey && event.shiftKey) {
|
|
71
|
+
// If both ctrl and shift are pressed, navigate by 1 year
|
|
72
|
+
let newDate = new Date(dateUtc);
|
|
73
|
+
if (event.key === "ArrowLeft") {
|
|
74
|
+
newDate.setFullYear(newDate.getFullYear() - 1);
|
|
75
|
+
}
|
|
76
|
+
else if (event.key === "ArrowRight") {
|
|
77
|
+
newDate.setFullYear(newDate.getFullYear() + 1);
|
|
78
|
+
}
|
|
79
|
+
updateDate(newDate);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (event.ctrlKey) {
|
|
83
|
+
// Navigate by month
|
|
84
|
+
let newDate = new Date(dateUtc);
|
|
85
|
+
if (event.key === "ArrowLeft") {
|
|
86
|
+
newDate.setMonth(newDate.getMonth() - 1);
|
|
87
|
+
}
|
|
88
|
+
else if (event.key === "ArrowRight") {
|
|
89
|
+
newDate.setMonth(newDate.getMonth() + 1);
|
|
90
|
+
}
|
|
91
|
+
updateDate(newDate);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
let modifier = event.shiftKey ? 7 : 1;
|
|
95
|
+
if (event.key === "ArrowLeft") {
|
|
96
|
+
updateDate(new Date(dateUtc - oneDay * modifier));
|
|
45
97
|
}
|
|
46
|
-
else {
|
|
47
|
-
|
|
98
|
+
else if (event.key === "ArrowRight") {
|
|
99
|
+
updateDate(new Date(dateUtc + oneDay * modifier));
|
|
48
100
|
}
|
|
49
101
|
}
|
|
50
|
-
return (
|
|
102
|
+
return (
|
|
103
|
+
// biome-ignore lint/a11y/noNoninteractiveTabindex: I hate this component
|
|
104
|
+
_jsxs("div", { className: "ObDateNavigator-root", onKeyDown: handleKeyDown, tabIndex: 0, "aria-label": "Date navigator", children: [_jsx(Arrow, { direction: "left", onClick: () => updateDate(new Date(dateUtc - oneDay)), disabled: disablePrev }), _jsx("div", { className: "ObDateNavigator-date", children: text }), _jsx(Arrow, { direction: "right", onClick: () => updateDate(new Date(dateUtc + oneDay)), disabled: disableNext }), _jsx("button", { type: "button", className: "ObDateNavigator-today", onClick: jumpToToday, children: getLocalizedString("Today") }), _jsx("div", { "aria-live": "polite", ref: liveRef, style: { position: "absolute", left: "-9999px" } })] }));
|
|
51
105
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.ObLinkedList-root{list-style-type:none;margin-left:0;padding-left:0}.ObLinkedList-item{display:flex;align-items:center;flex-direction:row}.ObLinkedList-leftColumn{flex:1 1 4em;font-size:.75em;padding:0 1em;text-align:center}.ObLinkedList-rightColumn{flex:1 1 100%;padding:1em 1em 1em 1.5em}.ObLinkedList-line{display:flex;align-self:stretch;flex:0 0 .2em;background:#fff;position:relative}.ObLinkedList-bullet{background:#fff;border:1px solid rgba(50,50,50,.25);border-radius:.55em;height:.7em;width:.7em;position:absolute;left:0;top:50%;transform:translate(-
|
|
1
|
+
:root{--ob-linked-list-bullet-size: 0.7em;--ob-linked-list-line-width: 0.2em}.ObLinkedList-root{list-style-type:none;margin-left:0;padding-left:0}.ObLinkedList-item{display:flex;align-items:center;flex-direction:row}.ObLinkedList-leftColumn{flex:1 1 4em;font-size:.75em;padding:0 1em;text-align:center}.ObLinkedList-rightColumn{flex:1 1 100%;padding:1em 1em 1em 1.5em}.ObLinkedList-line{display:flex;align-self:stretch;flex:0 0 .2em;background:#fff;position:relative}.ObLinkedList-bullet{background:#fff;border:1px solid rgba(50,50,50,.25);border-radius:.55em;height:.7em;width:.7em;position:absolute;left:0;top:50%;transform:translate(calc(-1 * var(--ob-linked-list-bullet-size) / 2 + var(--ob-linked-list-line-width) / 2), -50%)}.ObLinkedList-card{display:block;background:#fff;border:1px solid;border-color:#e5e6e9 #dfe0e4 #d0d1d5;border-radius:.1875em;color:inherit;cursor:pointer;flex:100% 1 1;position:relative}.ObLinkedList-card::before{border-bottom:.5em solid rgba(0,0,0,0);border-right:1em solid #fff;border-top:.5em solid rgba(0,0,0,0);content:" ";filter:drop-shadow(-1px 0px 1px rgba(50, 50, 50, 0.2));height:1em;left:-1em;margin-top:-0.5em;position:absolute;top:50%;width:1em}.ObLinkedList-card:hover{background-color:hsl(220,20%,94%) !important;color:inherit;text-decoration:inherit}.ObLinkedList-card:hover::before{border-right-color:hsl(220,20%,94%) !important}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
2
|
+
export declare function LinkedList({ children, className, ...other }: React.HTMLProps<HTMLUListElement>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function LinkedListItem({ children, className, label, ...other }: React.HTMLProps<HTMLLIElement> & {
|
|
4
4
|
label: React.ReactNode;
|
|
5
5
|
}): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export declare function Card({ as, children, className, ...other }: React.HTMLProps<HTMLDivElement> & {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import "./index.css";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
export function
|
|
4
|
+
export function LinkedList({ children, className, ...other }) {
|
|
5
5
|
return (_jsx("ul", { className: clsx("ObLinkedList-root", className), ...other, children: children }));
|
|
6
6
|
}
|
|
7
|
-
export function
|
|
7
|
+
export function LinkedListItem({ children, className, label, ...other }) {
|
|
8
8
|
return (_jsxs("li", { className: clsx("ObLinkedList-item", className), ...other, children: [label && _jsx("div", { className: "ObLinkedList-leftColumn", children: label }), _jsx("div", { className: "ObLinkedList-line", children: _jsx("div", { className: "ObLinkedList-bullet" }) }), _jsx("div", { className: "ObLinkedList-rightColumn", children: children })] }));
|
|
9
9
|
}
|
|
10
10
|
export function Card({ as, children, className, ...other }) {
|
package/es/PageBanner/index.js
CHANGED
|
@@ -8,7 +8,8 @@ export function PageBanner({ as, className, children, ...other }) {
|
|
|
8
8
|
}
|
|
9
9
|
export const BannerImage = React.forwardRef(function BannerImage(props, ref) {
|
|
10
10
|
const { className, ...other } = props;
|
|
11
|
-
|
|
11
|
+
// biome-ignore lint/a11y/useAltText: should be provided by the user
|
|
12
|
+
return _jsx("img", { ref: ref, className: clsx("ObPageBanner-bannerImage", className), alt: "", ...other });
|
|
12
13
|
});
|
|
13
14
|
export function TabList({ as, className, children, sticky, ...other }) {
|
|
14
15
|
const Component = as ? as : "nav";
|
package/es/Portal/index.js
CHANGED
|
@@ -9,24 +9,22 @@ export function Portal({ children, root, type = "div" }) {
|
|
|
9
9
|
const forceUpdate = useForceUpdate();
|
|
10
10
|
const mountNode = useRef(null);
|
|
11
11
|
const portalNode = useRef(null);
|
|
12
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: because reasons
|
|
12
13
|
useEffect(() => {
|
|
13
14
|
const ownerDocument = mountNode.current?.ownerDocument;
|
|
14
|
-
|
|
15
|
-
if (ownerDocument && portalElem) {
|
|
15
|
+
if (ownerDocument && !portalNode.current) {
|
|
16
16
|
let parent = root ? ownerDocument.querySelector(root) || ownerDocument.body : ownerDocument.body;
|
|
17
17
|
const node = ownerDocument.createElement(type);
|
|
18
|
-
|
|
18
|
+
portalNode.current = node;
|
|
19
19
|
parent.appendChild(node);
|
|
20
20
|
forceUpdate();
|
|
21
21
|
return () => {
|
|
22
22
|
parent.removeChild(node);
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
}, []);
|
|
25
|
+
}, [root, type]);
|
|
26
26
|
if (!portalNode.current) {
|
|
27
27
|
return _jsx("div", { ref: mountNode });
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
return createPortal(children, portalNode.current);
|
|
31
|
-
}
|
|
29
|
+
return createPortal(children, portalNode.current);
|
|
32
30
|
}
|
package/es/ProgressBar/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.ObProgressBar-root{height:1.5em;width:100%;appearance:none;-webkit-appearance:none;background-color:#f5f5f5;border:none;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset;color:#4169e1;position:relative}.ObProgressBar-root::-webkit-progress-bar{background-color:#f5f5f5;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset}.ObProgressBar-root::-webkit-progress-value{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary
|
|
1
|
+
.ObProgressBar-root{height:1.5em;width:100%;appearance:none;-webkit-appearance:none;background-color:#f5f5f5;border:none;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset;color:#4169e1;position:relative}.ObProgressBar-root::-webkit-progress-bar{background-color:#f5f5f5;border-radius:3px;box-shadow:0 2px 3px rgba(0,0,0,.2) inset}.ObProgressBar-root::-webkit-progress-value{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary), var(--brand-light));background-image:-webkit-linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),-webkit-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),-webkit-linear-gradient(left, var(--brand-primary), var(--brand-light));background-size:35px 20px,100% 100%,100% 100%;border-radius:3px;position:relative;transition:width .5s ease-out}.ObProgressBar-root::-webkit-progress-value:after{background-color:#fff;content:"";border-radius:100%;height:5px;position:absolute;right:7px;top:7px;width:5px}.ObProgressBar-root::-moz-progress-bar{background-image:linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),linear-gradient(left, var(--brand-primary), var(--brand-light));background-image:-moz-linear-gradient(135deg, transparent, transparent 33%, rgba(0, 0, 0, 0.1) 33%, rgba(0, 0, 0, 0.1) 66%, transparent 66%),-moz-linear-gradient(top, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.2)),-moz-linear-gradient(left, var(--brand-primary), var(--brand-light));background-size:35px 20px,100% 100%,100% 100%;border-radius:3px;transition:width .5s ease-out}
|
package/es/Sidebar/index.js
CHANGED
|
@@ -23,6 +23,7 @@ export function Sidebar(props) {
|
|
|
23
23
|
element?.addEventListener("transitionend", toggleHiddenContent);
|
|
24
24
|
return () => element?.removeEventListener("transitionend", toggleHiddenContent);
|
|
25
25
|
}, [open]);
|
|
26
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: TODO
|
|
26
27
|
useEffect(() => {
|
|
27
28
|
function handleCloseSidebar(evt) {
|
|
28
29
|
if (evt.key === "Escape") {
|
package/es/Spinner/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./index.css";
|
|
2
|
-
import React from "react";
|
|
2
|
+
import type React from "react";
|
|
3
3
|
export type SplitContainerProps = {
|
|
4
4
|
className?: string;
|
|
5
5
|
panelClassName?: string;
|
|
@@ -7,6 +7,8 @@ export type SplitContainerProps = {
|
|
|
7
7
|
direction?: "horizontal" | "vertical";
|
|
8
8
|
fixedPanel?: 1 | 2;
|
|
9
9
|
defaultFixedSize?: number;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
10
12
|
/**
|
|
11
13
|
* When the fixed size is persisted, changing the layoutVersion will force clients
|
|
12
14
|
* to reset to the default value.
|
|
@@ -17,4 +19,4 @@ export type SplitContainerProps = {
|
|
|
17
19
|
*/
|
|
18
20
|
id?: string;
|
|
19
21
|
};
|
|
20
|
-
export declare function SplitContainer({ className, children, direction, fixedPanel, panelClassName, defaultFixedSize, layoutVersion, id, }: SplitContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function SplitContainer({ className, children, direction, fixedPanel, panelClassName, defaultFixedSize, layoutVersion, min, max, id, }: SplitContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -36,7 +36,9 @@ settingsStore.keys().then((keys) => Promise.allSettled(keys
|
|
|
36
36
|
}
|
|
37
37
|
}))));
|
|
38
38
|
const Divider = forwardRef(function Divider(props, ref) {
|
|
39
|
-
return (_jsx("div", {
|
|
39
|
+
return (_jsx("div", { className: clsx("ObSplitContainer-divider", props.className), tabIndex: 0, ref: ref,
|
|
40
|
+
// biome-ignore lint/a11y/useSemanticElements: this is allowed according to WAI-ARIA
|
|
41
|
+
role: "separator", "aria-orientation": props.direction, "aria-valuemin": props.min, "aria-valuemax": props.max, "aria-valuenow": props.size, children: _jsx("span", { children: "\u2022\u2022\u2022" }) }));
|
|
40
42
|
});
|
|
41
43
|
function SplitRoot({ className, direction, ...props }) {
|
|
42
44
|
return _jsx("div", { className: clsx(className, "ObSplitContainer-root", direction), ...props });
|
|
@@ -48,23 +50,28 @@ function SplitPanel(props) {
|
|
|
48
50
|
};
|
|
49
51
|
return (_jsx("div", { className: clsx(props.className, "ObSplitContainer-panel"), style: style, children: props.children }));
|
|
50
52
|
}
|
|
51
|
-
export function SplitContainer({ className, children, direction = "vertical", fixedPanel = 1, panelClassName, defaultFixedSize = 400, layoutVersion = 1, id, }) {
|
|
53
|
+
export function SplitContainer({ className, children, direction = "vertical", fixedPanel = 1, panelClassName, defaultFixedSize = 400, layoutVersion = 1, min = 0, max, id, }) {
|
|
52
54
|
let [fixedSize, setFixedSize] = useState(defaultFixedSize);
|
|
53
55
|
let [isDragging, setIsDragging] = useState(false);
|
|
54
56
|
let dividerRef = useRef(null);
|
|
55
57
|
if (Children.count(children) !== 2) {
|
|
56
58
|
throw Error("SplitContainer requires exactly 2 children");
|
|
57
59
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
let containerRef = useRef(null);
|
|
61
|
+
let [containerSize, setContainerSize] = useState(0);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
if (!containerRef.current)
|
|
64
|
+
return;
|
|
65
|
+
let resizeObserver = new ResizeObserver((entries) => {
|
|
66
|
+
for (let entry of entries) {
|
|
67
|
+
if (entry.contentRect) {
|
|
68
|
+
setContainerSize(direction === "horizontal" ? entry.contentRect.width : entry.contentRect.height);
|
|
69
|
+
}
|
|
64
70
|
}
|
|
65
|
-
return newValue;
|
|
66
71
|
});
|
|
67
|
-
|
|
72
|
+
resizeObserver.observe(containerRef.current);
|
|
73
|
+
return () => resizeObserver.disconnect();
|
|
74
|
+
}, [direction]);
|
|
68
75
|
useEffect(() => {
|
|
69
76
|
if (id) {
|
|
70
77
|
let key = `${article}.${id}`;
|
|
@@ -88,12 +95,33 @@ export function SplitContainer({ className, children, direction = "vertical", fi
|
|
|
88
95
|
size: 0,
|
|
89
96
|
};
|
|
90
97
|
let movingPanel = (fixedPanel === 1 ? divider.previousElementSibling : divider.nextElementSibling);
|
|
98
|
+
function clampSize(size) {
|
|
99
|
+
let adjustedContainerSize = containerSize - 10; // make sure divider will not be stuck outside the container
|
|
100
|
+
let maxSize = Math.min(max ?? adjustedContainerSize, adjustedContainerSize);
|
|
101
|
+
if (size < min) {
|
|
102
|
+
size = min;
|
|
103
|
+
}
|
|
104
|
+
else if (size > maxSize) {
|
|
105
|
+
size = maxSize;
|
|
106
|
+
}
|
|
107
|
+
return size;
|
|
108
|
+
}
|
|
91
109
|
function getNewSize(event) {
|
|
92
110
|
let deltaSize = direction === "horizontal"
|
|
93
111
|
? event.clientX - initialPosition.clientX
|
|
94
112
|
: event.clientY - initialPosition.clientY;
|
|
95
113
|
deltaSize *= fixedPanel === 1 ? -1 : 1;
|
|
96
|
-
return initialPosition.size - deltaSize;
|
|
114
|
+
return clampSize(initialPosition.size - deltaSize);
|
|
115
|
+
}
|
|
116
|
+
function handleFixedSizeChanged(size) {
|
|
117
|
+
setFixedSize((current) => {
|
|
118
|
+
let newValue = clampSize(typeof size === "function" ? size(current) : size);
|
|
119
|
+
if (id) {
|
|
120
|
+
let key = `${article}.${id}`;
|
|
121
|
+
persistState(key, layoutVersion, newValue);
|
|
122
|
+
}
|
|
123
|
+
return newValue;
|
|
124
|
+
});
|
|
97
125
|
}
|
|
98
126
|
function handlePointerUp(event) {
|
|
99
127
|
let newSize = getNewSize(event);
|
|
@@ -105,6 +133,10 @@ export function SplitContainer({ className, children, direction = "vertical", fi
|
|
|
105
133
|
function handlePointerMove(event) {
|
|
106
134
|
event.preventDefault();
|
|
107
135
|
let newSize = getNewSize(event);
|
|
136
|
+
let divider = dividerRef.current;
|
|
137
|
+
if (divider) {
|
|
138
|
+
divider.setAttribute("aria-valuenow", String(newSize));
|
|
139
|
+
}
|
|
108
140
|
movingPanel.style.flex = `0 0 ${newSize}px`;
|
|
109
141
|
}
|
|
110
142
|
function handlePointerDown(event) {
|
|
@@ -147,6 +179,6 @@ export function SplitContainer({ className, children, direction = "vertical", fi
|
|
|
147
179
|
divider?.removeEventListener("keydown", handleKeyDown);
|
|
148
180
|
};
|
|
149
181
|
}
|
|
150
|
-
}, [direction, fixedPanel]);
|
|
151
|
-
return (_jsxs(SplitRoot, { direction: direction, className: className, children: [_jsx(SplitPanel, { className: clsx(isDragging && "dragging", panelClassName), fixed: fixedPanel === 1, size: fixedSize, children: childrenArray[0] }), _jsx(Divider, { ref: dividerRef, direction: direction, isDragging: isDragging }), _jsx(SplitPanel, { className: clsx(isDragging && "dragging", panelClassName), fixed: fixedPanel === 2, size: fixedSize, children: childrenArray[1] })] }));
|
|
182
|
+
}, [direction, fixedPanel, layoutVersion, id, min, max, containerSize]);
|
|
183
|
+
return (_jsxs(SplitRoot, { direction: direction, className: className, ref: containerRef, children: [_jsx(SplitPanel, { className: clsx(isDragging && "dragging", panelClassName), fixed: fixedPanel === 1, size: fixedSize, children: childrenArray[0] }), _jsx(Divider, { ref: dividerRef, direction: direction, isDragging: isDragging, size: fixedSize, min: min, max: max ?? containerSize }), _jsx(SplitPanel, { className: clsx(isDragging && "dragging", panelClassName), fixed: fixedPanel === 2, size: fixedSize, children: childrenArray[1] })] }));
|
|
152
184
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "./index.css";
|
|
2
|
+
export type ValueToggleOption = {
|
|
3
|
+
value: string | number;
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type ValueToggleGroupProps = {
|
|
8
|
+
options: ValueToggleOption[];
|
|
9
|
+
value?: string | number;
|
|
10
|
+
defaultValue?: string | number;
|
|
11
|
+
onChange?: (value: string | number) => void;
|
|
12
|
+
className?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
orientation?: "horizontal" | "vertical";
|
|
17
|
+
};
|
|
18
|
+
export declare const ValueToggleGroup: import("react").ForwardRefExoticComponent<ValueToggleGroupProps & import("react").RefAttributes<HTMLFieldSetElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import "./index.css";
|
|
3
|
+
import { forwardRef, useId } from "react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
export const ValueToggleGroup = forwardRef(function ValueToggleGroup({ options, value, defaultValue, onChange, className, name, id, style, orientation = "horizontal" }, ref) {
|
|
6
|
+
let randomId = useId();
|
|
7
|
+
let groupName = name || `toggle-${id ?? randomId}`;
|
|
8
|
+
let isControlled = value !== undefined;
|
|
9
|
+
return (_jsx("fieldset", { className: clsx("ObValueToggleGroup", orientation, className), role: "radiogroup", ref: ref, style: style, children: options.map((opt) => {
|
|
10
|
+
return (_jsxs("label", { className: clsx("ObValueToggleOption", { disabled: opt.disabled }), children: [_jsx("input", { type: "radio", name: groupName, value: opt.value, checked: isControlled ? value === opt.value : undefined, defaultChecked: !isControlled ? defaultValue === opt.value : undefined, onChange: () => onChange?.(opt.value), disabled: opt.disabled }), _jsx("span", { className: "ObValueToggleLabel", children: opt.label ?? opt.value })] }, opt.value));
|
|
11
|
+
}) }));
|
|
12
|
+
});
|