diff --git a/resources/css/index.css b/resources/css/index.css index c87137f..c74a92b 100644 --- a/resources/css/index.css +++ b/resources/css/index.css @@ -24,6 +24,48 @@ html.dark .treeselect > .treeselect-input { background: transparent; } +.treeselect-list__empty-icon { + display: none; +} + +.treeselect-input__edit::placeholder, .treeselect-list__empty { + --tw-text-opacity: 1; + color: rgba(var(--gray-400), var(--tw-text-opacity)); + cursor: default; +} + +.treeselect-input__clear svg { + display: none; +} + +.treeselect-input__clear { + background-color: transparent; + background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMSIgaGVpZ2h0PSIyMSI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=); + background-position: 50%; + background-repeat: no-repeat; + background-size: .7142em .7142em; + border-width: 0; + inset-inline-end: 0; + margin-inline-end: 2.25rem; + opacity: .5; + outline: 2px solid transparent; + outline-offset: 2px; + padding: 0; + position: absolute; + text-indent: -9999px; + top: calc(50% - 0.38em); + transition-duration: 75ms; + transition-property: opacity; + transition-timing-function: cubic-bezier(.4,0,.2,1); + width: 1rem; + height: 10px; +} + +.treeselect-list__empty { + padding-top: 18px; + padding-bottom: 18px; +} + .treeselect-input__tags-count { margin-left: 9px; } @@ -259,3 +301,11 @@ html.dark [dir='rtl'] .treeselect-input { padding: 2px 4px 2px 40px; } + +.treeselect-input__arrow svg, .treeselect-input__arrow svg:hover { + stroke: #6b7280; + height: 20px; + min-width: 18px; + width: 15px; + cursor: auto; +} \ No newline at end of file diff --git a/resources/css/treeselectjs.css b/resources/css/treeselectjs.css index 6ebe509..15a0e28 100644 --- a/resources/css/treeselectjs.css +++ b/resources/css/treeselectjs.css @@ -1 +1,438 @@ -.treeselect-input{width:100%;box-sizing:border-box;border:1px solid #d7dde4;border-radius:4px;display:flex;align-items:center;flex-wrap:wrap;padding:2px 40px 2px 4px;position:relative;min-height:37px;background-color:#fff;cursor:text}.treeselect-input--unsearchable{cursor:default}.treeselect-input--unsearchable .treeselect-input__edit{caret-color:transparent;cursor:default}.treeselect-input--unsearchable .treeselect-input__edit:focus{position:absolute;z-index:-1;left:0;min-width:0;width:0}.treeselect-input--value-not-selected .treeselect-input__edit,.treeselect-input--value-not-selected.treeselect-input--unsearchable .treeselect-input__edit:focus{z-index:auto;position:static;width:100%;max-width:100%}.treeselect-input--value-not-selected .treeselect-input__tags{gap:0}[dir=rtl] .treeselect-input{padding-right:4px;padding-left:40px}[dir=rtl] .treeselect-input__operators{right:unset;left:2px}.treeselect-input__tags{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px;max-width:100%;width:100%;box-sizing:border-box}.treeselect-input__tags-element{display:inline-flex;align-items:center;background-color:#d7dde4;cursor:pointer;padding:2px 5px;border-radius:2px;font-size:14px;max-width:100%;box-sizing:border-box}.treeselect-input__tags-element:hover{background-color:#c5c7cb}.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:#eb4c42}.treeselect-input__tags-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.treeselect-input__tags-cross{display:flex;margin-left:2px}.treeselect-input__tags-cross svg{width:12px;height:12px}.treeselect-input__tags-count{font-size:14px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.treeselect-input__edit{flex:1;border:none;font-size:14px;text-overflow:ellipsis;width:100%;max-width:calc(100% - 45px);padding:0;position:absolute;z-index:-1;min-width:0}.treeselect-input__edit:focus{outline:none;min-width:30px;max-width:100%;z-index:auto;position:static}.treeselect-input__operators{display:flex;max-width:40px;position:absolute;right:2px}.treeselect-input__clear{display:flex;cursor:pointer}.treeselect-input__clear svg{stroke:#c5c7cb;width:17px;min-width:17px;height:20px}.treeselect-input__clear:hover svg{stroke:#838790}.treeselect-input__arrow{display:flex;cursor:pointer}.treeselect-input__arrow svg{stroke:#c5c7cb;width:20px;min-width:20px;height:20px}.treeselect-input__arrow:hover svg{stroke:#838790}.treeselect-list{width:100%;box-sizing:border-box;border:1px solid #d7dde4;overflow-y:auto;background-color:#fff;max-height:300px}.treeselect-list__group-container{box-sizing:border-box}.treeselect-list__item{display:flex;align-items:center;box-sizing:border-box;cursor:pointer;height:30px}.treeselect-list__item:focus{outline:none}.treeselect-list__item--focused{background-color:azure!important}.treeselect-list__item--hidden{display:none}.treeselect-list__item-icon{display:flex;align-items:center;cursor:pointer;height:20px;width:20px;min-width:20px}.treeselect-list__item-icon svg{pointer-events:none;width:100%;height:100%;stroke:#c5c7cb}.treeselect-list__item-icon *{pointer-events:none}.treeselect-list__item-icon:hover svg{stroke:#838790}.treeselect-list__item-checkbox-container{width:20px;height:20px;min-width:20px;border:1px solid #d7dde4;border-radius:3px;position:relative;background-color:#fff;pointer-events:none;box-sizing:border-box}.treeselect-list__item-checkbox-container svg{position:absolute;height:100%;width:100%}.treeselect-list__item-checkbox{margin:0;width:0;height:0;pointer-events:none;position:absolute;z-index:-1}.treeselect-list__item-checkbox-icon{position:absolute;height:100%;width:100%;left:0;top:0;text-align:left}.treeselect-list__item-label{width:100%;overflow:hidden;text-overflow:ellipsis;word-break:keep-all;white-space:nowrap;font-size:14px;padding-left:5px;pointer-events:none;text-align:left}.treeselect-list__item-label-counter{margin-left:3px;color:#838790;font-size:13px}.treeselect-list__empty{display:flex;align-items:center;height:30px;padding-left:4px}.treeselect-list__empty--hidden{display:none}.treeselect-list__empty-icon{display:flex;align-items:center}.treeselect-list__empty-text{font-size:14px;padding-left:5px;overflow:hidden;text-overflow:ellipsis;word-break:keep-all;white-space:nowrap}.treeselect-list__slot{position:sticky;box-sizing:border-box;width:100%;max-width:100%;bottom:0;background-color:#fff}.treeselect-list.treeselect-list--single-select .treeselect-list__item-checkbox-container,.treeselect-list.treeselect-list--disabled-branch-node .treeselect-list__item--group .treeselect-list__item-checkbox-container{display:none}.treeselect-list__item--checked{background-color:#e9f1f1}.treeselect-list.treeselect-list--single-select .treeselect-list__item--checked{background-color:transparent}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected{background-color:#e9f1f1}.treeselect-list__item .treeselect-list__item-checkbox-container svg{stroke:transparent}.treeselect-list__item--checked .treeselect-list__item-checkbox-container svg,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container svg{stroke:#fff}.treeselect-list__item--checked .treeselect-list__item-checkbox-container,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container{background-color:#52c67e}.treeselect-list__item--disabled .treeselect-list__item-checkbox-container{background-color:#e9f1f1}.treeselect-list__item--disabled .treeselect-list__item-label{color:#c5c7cb}[dir=rtl] .treeselect-list__item-checkbox-icon{text-align:right}[dir=rtl] .treeselect-list__item-label{text-align:right;padding-right:5px;padding-left:unset}[dir=rtl] .treeselect-list__item--closed .treeselect-list__item-icon{transform:rotate(180deg)}[dir=rtl] .treeselect-list__empty{padding-right:4px;padding-left:unset}[dir=rtl] .treeselect-list__empty-text{padding-right:5px;padding-left:unset}.treeselect{width:100%;position:relative;box-sizing:border-box}.treeselect--disabled{pointer-events:none}.treeselect-list{position:absolute;left:0;border-radius:4px;box-sizing:border-box;z-index:1000}.treeselect .treeselect-list{position:absolute}.treeselect .treeselect-list--static{position:static}.treeselect-input--focused{border-color:#101010}.treeselect-input--opened.treeselect-input--top{border-top-color:transparent;border-top-left-radius:0;border-top-right-radius:0}.treeselect-input--opened.treeselect-input--bottom{border-bottom-color:transparent;border-bottom-left-radius:0;border-bottom-right-radius:0}.treeselect-list--focused{border-color:#101010}.treeselect-list--top,.treeselect-list--top-to-body{border-bottom-color:#d7dde4;border-bottom-left-radius:0;border-bottom-right-radius:0}.treeselect-list--bottom,.treeselect-list--bottom-to-body{border-top-color:#d7dde4;border-top-left-radius:0;border-top-right-radius:0}.treeselect-list--top{left:0;bottom:100%}.treeselect-list--bottom{left:0;top:100%} \ No newline at end of file +.treeselect-input { + width: 100%; + box-sizing: border-box; + border: 1px solid #d7dde4; + border-radius: 4px; + display: flex; + align-items: center; + flex-wrap: wrap; + padding: 2px 40px 2px 4px; + position: relative; + min-height: 37px; + background-color: #fff; + cursor: text +} + +.treeselect-input--unsearchable { + cursor: default +} + +.treeselect-input--unsearchable .treeselect-input__edit { + caret-color: transparent; + cursor: default +} + +.treeselect-input--unsearchable .treeselect-input__edit:focus { + position: absolute; + z-index: -1; + left: 0; + min-width: 0; + width: 0 +} + +.treeselect-input--value-not-selected .treeselect-input__edit, .treeselect-input--value-not-selected.treeselect-input--unsearchable .treeselect-input__edit:focus { + z-index: auto; + position: static; + width: 100%; + max-width: 100% +} + +.treeselect-input--value-not-selected .treeselect-input__tags { + gap: 0 +} + +[dir=rtl] .treeselect-input { + padding-right: 4px; + padding-left: 40px +} + +[dir=rtl] .treeselect-input__operators { + right: unset; + left: 2px +} + +.treeselect-input__tags { + display: inline-flex; + align-items: center; + flex-wrap: wrap; + gap: 4px; + max-width: 100%; + width: 100%; + box-sizing: border-box +} + +.treeselect-input__tags-element { + display: inline-flex; + align-items: center; + background-color: #d7dde4; + cursor: pointer; + padding: 2px 5px; + border-radius: 2px; + font-size: 14px; + max-width: 100%; + box-sizing: border-box +} + +.treeselect-input__tags-element:hover { + background-color: #c5c7cb +} + +.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg { + stroke: #eb4c42 +} + +.treeselect-input__tags-name { + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis +} + +.treeselect-input__tags-cross { + display: flex; + margin-left: 2px +} + +.treeselect-input__tags-cross svg { + width: 12px; + height: 12px +} + +.treeselect-input__tags-count { + font-size: 14px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis +} + +.treeselect-input__edit { + flex: 1; + border: none; + font-size: 14px; + text-overflow: ellipsis; + width: 100%; + max-width: calc(100% - 45px); + padding: 0; + position: absolute; + z-index: -1; + min-width: 0 +} + +.treeselect-input__edit:focus { + outline: none; + min-width: 30px; + max-width: 100%; + z-index: auto; + position: static +} + +.treeselect-input__operators { + display: flex; + max-width: 40px; + position: absolute; + right: 2px +} + +.treeselect-input__clear { + display: flex; + cursor: pointer +} + +.treeselect-input__clear svg { + stroke: #c5c7cb; + width: 17px; + min-width: 17px; + height: 20px +} + +.treeselect-input__clear:hover svg { + stroke: #838790 +} + +.treeselect-input__arrow { + display: flex; + cursor: pointer +} + +.treeselect-input__arrow svg { + stroke: #c5c7cb; + width: 20px; + min-width: 20px; + height: 20px +} + +.treeselect-input__arrow:hover svg { + stroke: #838790 +} + +.treeselect-list { + width: 100%; + box-sizing: border-box; + border: 1px solid #d7dde4; + overflow-y: auto; + background-color: #fff; + max-height: 300px +} + +.treeselect-list__group-container { + box-sizing: border-box +} + +.treeselect-list__item { + display: flex; + align-items: center; + box-sizing: border-box; + cursor: pointer; + height: 30px +} + +.treeselect-list__item:focus { + outline: none +} + +.treeselect-list__item--focused { + background-color: azure !important +} + +.treeselect-list__item--hidden { + display: none +} + +.treeselect-list__item-icon { + display: flex; + align-items: center; + cursor: pointer; + height: 20px; + width: 20px; + min-width: 20px +} + +.treeselect-list__item-icon svg { + pointer-events: none; + width: 100%; + height: 100%; + stroke: #c5c7cb +} + +.treeselect-list__item-icon * { + pointer-events: none +} + +.treeselect-list__item-icon:hover svg { + stroke: #838790 +} + +.treeselect-list__item-checkbox-container { + width: 20px; + height: 20px; + min-width: 20px; + border: 1px solid #d7dde4; + border-radius: 3px; + position: relative; + background-color: #fff; + pointer-events: none; + box-sizing: border-box +} + +.treeselect-list__item-checkbox-container svg { + position: absolute; + height: 100%; + width: 100% +} + +.treeselect-list__item-checkbox { + margin: 0; + width: 0; + height: 0; + pointer-events: none; + position: absolute; + z-index: -1 +} + +.treeselect-list__item-checkbox-icon { + position: absolute; + height: 100%; + width: 100%; + left: 0; + top: 0; + text-align: left +} + +.treeselect-list__item-label { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + word-break: keep-all; + white-space: nowrap; + font-size: 14px; + padding-left: 5px; + pointer-events: none; + text-align: left +} + +.treeselect-list__item-label-counter { + margin-left: 3px; + color: #838790; + font-size: 13px +} + +.treeselect-list__empty { + display: flex; + align-items: center; + height: 30px; + padding-left: 4px +} + +.treeselect-list__empty--hidden { + display: none +} + +.treeselect-list__empty-icon { + display: flex; + align-items: center +} + +.treeselect-list__empty-text { + font-size: 14px; + padding-left: 5px; + overflow: hidden; + text-overflow: ellipsis; + word-break: keep-all; + white-space: nowrap +} + +.treeselect-list__slot { + position: sticky; + box-sizing: border-box; + width: 100%; + max-width: 100%; + bottom: 0; + background-color: #fff +} + +.treeselect-list.treeselect-list--single-select .treeselect-list__item-checkbox-container, .treeselect-list.treeselect-list--disabled-branch-node .treeselect-list__item--group .treeselect-list__item-checkbox-container { + display: none +} + +.treeselect-list__item--checked { + background-color: #e9f1f1 +} + +.treeselect-list.treeselect-list--single-select .treeselect-list__item--checked { + background-color: transparent +} + +.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected { + background-color: #e9f1f1 +} + +.treeselect-list__item .treeselect-list__item-checkbox-container svg { + stroke: transparent +} + +.treeselect-list__item--checked .treeselect-list__item-checkbox-container svg, .treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container svg { + stroke: #fff +} + +.treeselect-list__item--checked .treeselect-list__item-checkbox-container, .treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container { + background-color: #52c67e +} + +.treeselect-list__item--disabled .treeselect-list__item-checkbox-container { + background-color: #e9f1f1 +} + +.treeselect-list__item--disabled .treeselect-list__item-label { + color: #c5c7cb +} + +[dir=rtl] .treeselect-list__item-checkbox-icon { + text-align: right +} + +[dir=rtl] .treeselect-list__item-label { + text-align: right; + padding-right: 5px; + padding-left: unset +} + +[dir=rtl] .treeselect-list__item--closed .treeselect-list__item-icon { + transform: rotate(180deg) +} + +[dir=rtl] .treeselect-list__empty { + padding-right: 4px; + padding-left: unset +} + +[dir=rtl] .treeselect-list__empty-text { + padding-right: 5px; + padding-left: unset +} + +.treeselect { + width: 100%; + position: relative; + box-sizing: border-box +} + +.treeselect--disabled { + pointer-events: none +} + +.treeselect-list { + position: absolute; + left: 0; + border-radius: 4px; + box-sizing: border-box; + z-index: 1000 +} + +.treeselect .treeselect-list { + position: absolute +} + +.treeselect .treeselect-list--static { + position: static +} + +.treeselect-input--focused { + border-color: #101010 +} + +.treeselect-input--opened.treeselect-input--top { + border-top-color: transparent; + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.treeselect-input--opened.treeselect-input--bottom { + border-bottom-color: transparent; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0 +} + +.treeselect-list--focused { + border-color: #101010 +} + +.treeselect-list--top, .treeselect-list--top-to-body { + border-bottom-color: #d7dde4; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0 +} + +.treeselect-list--bottom, .treeselect-list--bottom-to-body { + border-top-color: #d7dde4; + border-top-left-radius: 0; + border-top-right-radius: 0 +} + +.treeselect-list--top { + left: 0; + bottom: 100% +} + +.treeselect-list--bottom { + left: 0; + top: 100% +} \ No newline at end of file diff --git a/resources/dist/filament-select-tree.css b/resources/dist/filament-select-tree.css index 00d30a3..f5dcf0e 100644 --- a/resources/dist/filament-select-tree.css +++ b/resources/dist/filament-select-tree.css @@ -1 +1 @@ -.treeselect-input{align-items:center;background-color:#fff;border:1px solid #d7dde4;border-radius:4px;box-sizing:border-box;cursor:text;display:flex;flex-wrap:wrap;min-height:37px;padding:2px 40px 2px 4px;position:relative;width:100%}.treeselect-input--unsearchable{cursor:default}.treeselect-input--unsearchable .treeselect-input__edit{caret-color:transparent;cursor:default}.treeselect-input--unsearchable .treeselect-input__edit:focus{left:0;min-width:0;position:absolute;width:0;z-index:-1}.treeselect-input--value-not-selected .treeselect-input__edit,.treeselect-input--value-not-selected.treeselect-input--unsearchable .treeselect-input__edit:focus{max-width:100%;position:static;width:100%;z-index:auto}.treeselect-input--value-not-selected .treeselect-input__tags{gap:0}[dir=rtl] .treeselect-input{padding-left:40px;padding-right:4px}[dir=rtl] .treeselect-input__operators{left:2px}.treeselect-input__tags{align-items:center;box-sizing:border-box;display:inline-flex;flex-wrap:wrap;gap:4px;max-width:100%;width:100%}.treeselect-input__tags-element{background-color:#d7dde4;border-radius:2px;box-sizing:border-box;cursor:pointer;font-size:14px;max-width:100%;padding:2px 5px}.treeselect-input__tags-element:hover{background-color:#c5c7cb}.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:#eb4c42}.treeselect-input__tags-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeselect-input__tags-cross{display:flex;margin-left:2px}.treeselect-input__tags-cross svg{height:12px;width:12px}.treeselect-input__tags-count{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeselect-input__edit{border:none;flex:1;font-size:14px;max-width:calc(100% - 45px);min-width:0;padding:0;position:absolute;text-overflow:ellipsis;width:100%;z-index:-1}.treeselect-input__edit:focus{max-width:100%;min-width:30px;outline:none;position:static;z-index:auto}.treeselect-input__operators{display:flex;max-width:40px;position:absolute;right:2px}.treeselect-input__clear{cursor:pointer;display:flex}.treeselect-input__clear svg{stroke:#c5c7cb;height:20px;min-width:17px;width:17px}.treeselect-input__clear:hover svg{stroke:#838790}.treeselect-input__arrow{cursor:pointer;display:flex}.treeselect-input__arrow svg{stroke:#c5c7cb;height:20px;min-width:20px;width:20px}.treeselect-input__arrow:hover svg{stroke:#838790}.treeselect-list{background-color:#fff;border:1px solid #d7dde4;max-height:300px;overflow-y:auto;width:100%}.treeselect-list__group-container{box-sizing:border-box}.treeselect-list__item{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;height:30px}.treeselect-list__item:focus{outline:none}.treeselect-list__item--focused{background-color:azure!important}.treeselect-list__item--hidden{display:none}.treeselect-list__item-icon{align-items:center;cursor:pointer;display:flex;height:20px;min-width:20px;width:20px}.treeselect-list__item-icon svg{stroke:#c5c7cb;height:100%;pointer-events:none;width:100%}.treeselect-list__item-icon *{pointer-events:none}.treeselect-list__item-icon:hover svg{stroke:#838790}.treeselect-list__item-checkbox-container{background-color:#fff;border:1px solid #d7dde4;border-radius:3px;box-sizing:border-box;height:20px;min-width:20px;pointer-events:none;position:relative;width:20px}.treeselect-list__item-checkbox-container svg{height:100%;position:absolute;width:100%}.treeselect-list__item-checkbox{height:0;margin:0;pointer-events:none;position:absolute;width:0;z-index:-1}.treeselect-list__item-checkbox-icon{height:100%;left:0;position:absolute;text-align:left;top:0;width:100%}.treeselect-list__item-label{font-size:14px;overflow:hidden;padding-left:5px;pointer-events:none;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%;word-break:keep-all}.treeselect-list__item-label-counter{color:#838790;font-size:13px;margin-left:3px}.treeselect-list__empty{align-items:center;display:flex;height:30px;padding-left:4px}.treeselect-list__empty--hidden{display:none}.treeselect-list__empty-icon{align-items:center;display:flex}.treeselect-list__empty-text{font-size:14px;overflow:hidden;padding-left:5px;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.treeselect-list__slot{background-color:#fff;bottom:0;box-sizing:border-box;max-width:100%;position:sticky;width:100%}.treeselect-list.treeselect-list--disabled-branch-node .treeselect-list__item--group .treeselect-list__item-checkbox-container,.treeselect-list.treeselect-list--single-select .treeselect-list__item-checkbox-container{display:none}.treeselect-list__item--checked{background-color:#e9f1f1}.treeselect-list.treeselect-list--single-select .treeselect-list__item--checked{background-color:transparent}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected{background-color:#e9f1f1}.treeselect-list__item .treeselect-list__item-checkbox-container svg{stroke:transparent}.treeselect-list__item--checked .treeselect-list__item-checkbox-container svg,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container svg{stroke:#fff}.treeselect-list__item--checked .treeselect-list__item-checkbox-container,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container{background-color:#52c67e}.treeselect-list__item--disabled .treeselect-list__item-checkbox-container{background-color:#e9f1f1}.treeselect-list__item--disabled .treeselect-list__item-label{color:#c5c7cb}[dir=rtl] .treeselect-list__item-checkbox-icon{text-align:right}[dir=rtl] .treeselect-list__item-label{padding-left:unset;padding-right:5px;text-align:right}[dir=rtl] .treeselect-list__item--closed .treeselect-list__item-icon{transform:rotate(180deg)}[dir=rtl] .treeselect-list__empty{padding-left:unset;padding-right:4px}[dir=rtl] .treeselect-list__empty-text{padding-left:unset;padding-right:5px}.treeselect{box-sizing:border-box;position:relative;width:100%}.treeselect--disabled{pointer-events:none}.treeselect-list{border-radius:4px;box-sizing:border-box;left:0;z-index:1000}.treeselect .treeselect-list,.treeselect-list{position:absolute}.treeselect .treeselect-list--static{position:static}.treeselect-input--focused{border-color:#101010}.treeselect-input--opened.treeselect-input--top{border-top-color:transparent;border-top-left-radius:0;border-top-right-radius:0}.treeselect-input--opened.treeselect-input--bottom{border-bottom-color:transparent;border-bottom-left-radius:0;border-bottom-right-radius:0}.treeselect-list--focused{border-color:#101010}.treeselect-list--top,.treeselect-list--top-to-body{border-bottom-color:#d7dde4;border-bottom-left-radius:0;border-bottom-right-radius:0}.treeselect-list--bottom,.treeselect-list--bottom-to-body{border-top-color:#d7dde4;border-top-left-radius:0;border-top-right-radius:0}.treeselect-list--top{bottom:100%;left:0}.treeselect-list--bottom{left:0;top:100%}.treeselect-input{background:transparent;border-style:none;color:rgba(var(--gray-950),var(--tw-text-opacity));font-size:.875rem;line-height:1.5rem;outline:2px solid transparent;outline-offset:2px;transition-duration:75ms}html.dark .treeselect>.treeselect-input{color:rgb(255 255 255/var(--tw-text-opacity))!important}.treeselect-input--opened.treeselect-input--bottom{border:inherit;border-radius:inherit}.treeselect-input__edit{background:transparent}.treeselect-input__tags-count{margin-left:9px}.treeselect-list{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.05);background-color:rgb(255 255 255/var(--tw-bg-opacity));border:none;border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);font-size:.875rem;line-height:1.25rem;margin-top:.5rem;padding:.25rem}.treeselect-list__item{border-radius:.475rem;padding:1.1rem}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected,.treeselect-list__item--focused,.treeselect-list__item:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity))!important}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected{font-weight:500}html.dark .treeselect-list{-tw-bg-opacity:1;--tw-ring-color:hsla(0,0%,100%,.1);background-color:rgba(var(--gray-900),var(--tw-bg-opacity))}.treeselect-input__edit{--tw-ring-color:none!important;--tw-ring-shadow:none!important;border:transparent!important}html.dark .treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected,html.dark .treeselect-list.treeselect-list--single-select html.dark.treeselect-list__item--single-selected,html.dark .treeselect-list__item--focused,html.dark .treeselect-list__item:hover{background-color:hsla(0,0%,100%,.05)!important}.treeselect-list__item--checked,html.dark .treeselect-list__item--checked{background:transparent}.treeselect-input__tags-element{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-inset:inset;--tw-ring-color:rgba(var(--primary-600),0.1);align-items:center;background-color:rgba(var(--primary-50),var(--tw-bg-opacity));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);display:inline-flex;font-size:.75rem;font-weight:500;gap:.25rem;line-height:1rem;padding:.25rem .5rem;word-break:break-all}html.dark .treeselect-input__tags-element{--tw-text-opacity:1;--tw-ring-color:rgba(var(--primary-400),0.3);background-color:rgba(var(--primary-400),.1)}.treeselect-list__item-checkbox-container{border-radius:.25rem;height:16px;min-width:16px;width:16px}.treeselect-list__item--checked .treeselect-list__item-checkbox-container,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container{background-color:rgba(var(--primary-600),var(--tw-text-opacity))}.treeselect-list__item-checkbox{background-color:transparent!important;border:none;transition-duration:75ms}.treeselect-list__item-checkbox-container{background-color:#f8f5f5;border:none}html.dark .treeselect-list__item-checkbox-container{background-color:hsla(0,0%,100%,.05);border:rgb(255 255 255/var(--tw-text-opacity))}.treeselect-list__item-checkbox-icon{height:80%;left:.1rem;top:.1rem;width:80%}.treeselect-input__tags-element:hover{background-color:rgba(var(--primary-50),var(--tw-bg-opacity))}.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:rgba(var(--gray-950),var(--tw-text-opacity))}html.dark .treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:rgb(255 255 255/var(--tw-text-opacity))}.treeselect-input__tags-element{color:rgba(var(--primary-600),var(--tw-text-opacity))}html.dark .treeselect-input__tags-element{color:rgba(var(--primary-400),var(--tw-text-opacity))}html.dark .treeselect-input__tags-cross svg{stroke-width:3px;stroke:rgb(255 255 255/var(--tw-text-opacity));opacity:.5}html.dark .treeselect-input__tags-element:hover svg{opacity:.6}.treeselect-input__clear svg{opacity:.5}.treeselect-input__tags{margin-left:3px}.treeselect--disabled .treeselect-input__arrow,.treeselect--disabled .treeselect-input__tags-cross{display:none}.treeselect-input__arrow{margin-right:7px}.treeselect--disabled .treeselect-input__clear{display:none}.treeselect-list__item--disabled{cursor:not-allowed!important}html.dark .treeselect-list__item--disabled .treeselect-list__item-checkbox-container{background-color:rgba(78,78,78,.05)}[dir=rtl] .treeselect-input__operators{left:2px!important;right:unset}[dir=rtl] .treeselect-input{padding:2px 4px 2px 40px} \ No newline at end of file +.treeselect-input{align-items:center;background-color:#fff;border:1px solid #d7dde4;border-radius:4px;box-sizing:border-box;cursor:text;display:flex;flex-wrap:wrap;min-height:37px;padding:2px 40px 2px 4px;position:relative;width:100%}.treeselect-input--unsearchable{cursor:default}.treeselect-input--unsearchable .treeselect-input__edit{caret-color:transparent;cursor:default}.treeselect-input--unsearchable .treeselect-input__edit:focus{left:0;min-width:0;position:absolute;width:0;z-index:-1}.treeselect-input--value-not-selected .treeselect-input__edit,.treeselect-input--value-not-selected.treeselect-input--unsearchable .treeselect-input__edit:focus{max-width:100%;position:static;width:100%;z-index:auto}.treeselect-input--value-not-selected .treeselect-input__tags{gap:0}[dir=rtl] .treeselect-input{padding-left:40px;padding-right:4px}[dir=rtl] .treeselect-input__operators{left:2px}.treeselect-input__tags{align-items:center;box-sizing:border-box;display:inline-flex;flex-wrap:wrap;gap:4px;max-width:100%;width:100%}.treeselect-input__tags-element{background-color:#d7dde4;border-radius:2px;box-sizing:border-box;cursor:pointer;font-size:14px;max-width:100%;padding:2px 5px}.treeselect-input__tags-element:hover{background-color:#c5c7cb}.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:#eb4c42}.treeselect-input__tags-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeselect-input__tags-cross{display:flex;margin-left:2px}.treeselect-input__tags-cross svg{height:12px;width:12px}.treeselect-input__tags-count{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.treeselect-input__edit{border:none;flex:1;font-size:14px;max-width:calc(100% - 45px);min-width:0;padding:0;position:absolute;text-overflow:ellipsis;width:100%;z-index:-1}.treeselect-input__edit:focus{max-width:100%;min-width:30px;outline:none;position:static;z-index:auto}.treeselect-input__operators{display:flex;max-width:40px;position:absolute;right:2px}.treeselect-input__clear{cursor:pointer;display:flex}.treeselect-input__clear svg{stroke:#c5c7cb;height:20px;min-width:17px;width:17px}.treeselect-input__clear:hover svg{stroke:#838790}.treeselect-input__arrow{cursor:pointer;display:flex}.treeselect-input__arrow svg{stroke:#c5c7cb;height:20px;min-width:20px;width:20px}.treeselect-input__arrow:hover svg{stroke:#838790}.treeselect-list{background-color:#fff;border:1px solid #d7dde4;max-height:300px;overflow-y:auto;width:100%}.treeselect-list__group-container{box-sizing:border-box}.treeselect-list__item{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;height:30px}.treeselect-list__item:focus{outline:none}.treeselect-list__item--focused{background-color:azure!important}.treeselect-list__item--hidden{display:none}.treeselect-list__item-icon{align-items:center;cursor:pointer;display:flex;height:20px;min-width:20px;width:20px}.treeselect-list__item-icon svg{stroke:#c5c7cb;height:100%;pointer-events:none;width:100%}.treeselect-list__item-icon *{pointer-events:none}.treeselect-list__item-icon:hover svg{stroke:#838790}.treeselect-list__item-checkbox-container{background-color:#fff;border:1px solid #d7dde4;border-radius:3px;box-sizing:border-box;height:20px;min-width:20px;pointer-events:none;position:relative;width:20px}.treeselect-list__item-checkbox-container svg{height:100%;position:absolute;width:100%}.treeselect-list__item-checkbox{height:0;margin:0;pointer-events:none;position:absolute;width:0;z-index:-1}.treeselect-list__item-checkbox-icon{height:100%;left:0;position:absolute;text-align:left;top:0;width:100%}.treeselect-list__item-label{font-size:14px;overflow:hidden;padding-left:5px;pointer-events:none;text-align:left;text-overflow:ellipsis;white-space:nowrap;width:100%;word-break:keep-all}.treeselect-list__item-label-counter{color:#838790;font-size:13px;margin-left:3px}.treeselect-list__empty{align-items:center;display:flex;height:30px;padding-left:4px}.treeselect-list__empty--hidden{display:none}.treeselect-list__empty-icon{align-items:center;display:flex}.treeselect-list__empty-text{font-size:14px;overflow:hidden;padding-left:5px;text-overflow:ellipsis;white-space:nowrap;word-break:keep-all}.treeselect-list__slot{background-color:#fff;bottom:0;box-sizing:border-box;max-width:100%;position:sticky;width:100%}.treeselect-list.treeselect-list--disabled-branch-node .treeselect-list__item--group .treeselect-list__item-checkbox-container,.treeselect-list.treeselect-list--single-select .treeselect-list__item-checkbox-container{display:none}.treeselect-list__item--checked{background-color:#e9f1f1}.treeselect-list.treeselect-list--single-select .treeselect-list__item--checked{background-color:transparent}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected{background-color:#e9f1f1}.treeselect-list__item .treeselect-list__item-checkbox-container svg{stroke:transparent}.treeselect-list__item--checked .treeselect-list__item-checkbox-container svg,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container svg{stroke:#fff}.treeselect-list__item--checked .treeselect-list__item-checkbox-container,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container{background-color:#52c67e}.treeselect-list__item--disabled .treeselect-list__item-checkbox-container{background-color:#e9f1f1}.treeselect-list__item--disabled .treeselect-list__item-label{color:#c5c7cb}[dir=rtl] .treeselect-list__item-checkbox-icon{text-align:right}[dir=rtl] .treeselect-list__item-label{padding-left:unset;padding-right:5px;text-align:right}[dir=rtl] .treeselect-list__item--closed .treeselect-list__item-icon{transform:rotate(180deg)}[dir=rtl] .treeselect-list__empty{padding-left:unset;padding-right:4px}[dir=rtl] .treeselect-list__empty-text{padding-left:unset;padding-right:5px}.treeselect{box-sizing:border-box;position:relative;width:100%}.treeselect--disabled{pointer-events:none}.treeselect-list{border-radius:4px;box-sizing:border-box;left:0;z-index:1000}.treeselect .treeselect-list,.treeselect-list{position:absolute}.treeselect .treeselect-list--static{position:static}.treeselect-input--focused{border-color:#101010}.treeselect-input--opened.treeselect-input--top{border-top-color:transparent;border-top-left-radius:0;border-top-right-radius:0}.treeselect-input--opened.treeselect-input--bottom{border-bottom-color:transparent;border-bottom-left-radius:0;border-bottom-right-radius:0}.treeselect-list--focused{border-color:#101010}.treeselect-list--top,.treeselect-list--top-to-body{border-bottom-color:#d7dde4;border-bottom-left-radius:0;border-bottom-right-radius:0}.treeselect-list--bottom,.treeselect-list--bottom-to-body{border-top-color:#d7dde4;border-top-left-radius:0;border-top-right-radius:0}.treeselect-list--top{bottom:100%;left:0}.treeselect-list--bottom{left:0;top:100%}.treeselect-input{background:transparent;border-style:none;color:rgba(var(--gray-950),var(--tw-text-opacity));font-size:.875rem;line-height:1.5rem;outline:2px solid transparent;outline-offset:2px;transition-duration:75ms}html.dark .treeselect>.treeselect-input{color:rgb(255 255 255/var(--tw-text-opacity))!important}.treeselect-input--opened.treeselect-input--bottom{border:inherit;border-radius:inherit}.treeselect-input__edit{background:transparent}.treeselect-list__empty-icon{display:none}.treeselect-input__edit::placeholder,.treeselect-list__empty{--tw-text-opacity:1;color:rgba(var(--gray-400),var(--tw-text-opacity));cursor:default}.treeselect-input__clear svg{display:none}.treeselect-input__clear{background-color:transparent;background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMSIgaGVpZ2h0PSIyMSI+PGcgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJtMi41OTIuMDQ0IDE4LjM2NCAxOC4zNjQtMi41NDggMi41NDhMLjA0NCAyLjU5MnoiLz48cGF0aCBkPSJNMCAxOC4zNjQgMTguMzY0IDBsMi41NDggMi41NDhMMi41NDggMjAuOTEyeiIvPjwvZz48L3N2Zz4=);background-position:50%;background-repeat:no-repeat;background-size:.7142em .7142em;border-width:0;height:10px;inset-inline-end:0;margin-inline-end:2.25rem;opacity:.5;outline:2px solid transparent;outline-offset:2px;padding:0;position:absolute;text-indent:-9999px;top:calc(50% - .38em);transition-duration:75ms;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:1rem}.treeselect-list__empty{padding-bottom:18px;padding-top:18px}.treeselect-input__tags-count{margin-left:9px}.treeselect-list{--tw-bg-opacity:1;--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-color:rgba(var(--gray-950),0.05);background-color:rgb(255 255 255/var(--tw-bg-opacity));border:none;border-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);font-size:.875rem;line-height:1.25rem;margin-top:.5rem;padding:.25rem}.treeselect-list__item{border-radius:.475rem;padding:1.1rem}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected,.treeselect-list__item--focused,.treeselect-list__item:hover{--tw-bg-opacity:1;background-color:rgba(var(--gray-50),var(--tw-bg-opacity))!important}.treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected{font-weight:500}html.dark .treeselect-list{-tw-bg-opacity:1;--tw-ring-color:hsla(0,0%,100%,.1);background-color:rgba(var(--gray-900),var(--tw-bg-opacity))}.treeselect-input__edit{--tw-ring-color:none!important;--tw-ring-shadow:none!important;border:transparent!important}html.dark .treeselect-list.treeselect-list--single-select .treeselect-list__item--single-selected,html.dark .treeselect-list.treeselect-list--single-select html.dark.treeselect-list__item--single-selected,html.dark .treeselect-list__item--focused,html.dark .treeselect-list__item:hover{background-color:hsla(0,0%,100%,.05)!important}.treeselect-list__item--checked,html.dark .treeselect-list__item--checked{background:transparent}.treeselect-input__tags-element{--tw-bg-opacity:1;--tw-text-opacity:1;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);--tw-ring-inset:inset;--tw-ring-color:rgba(var(--primary-600),0.1);align-items:center;background-color:rgba(var(--primary-50),var(--tw-bg-opacity));border-radius:.375rem;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000);display:inline-flex;font-size:.75rem;font-weight:500;gap:.25rem;line-height:1rem;padding:.25rem .5rem;word-break:break-all}html.dark .treeselect-input__tags-element{--tw-text-opacity:1;--tw-ring-color:rgba(var(--primary-400),0.3);background-color:rgba(var(--primary-400),.1)}.treeselect-list__item-checkbox-container{border-radius:.25rem;height:16px;min-width:16px;width:16px}.treeselect-list__item--checked .treeselect-list__item-checkbox-container,.treeselect-list__item--partial-checked .treeselect-list__item-checkbox-container{background-color:rgba(var(--primary-600),var(--tw-text-opacity))}.treeselect-list__item-checkbox{background-color:transparent!important;border:none;transition-duration:75ms}.treeselect-list__item-checkbox-container{background-color:#f8f5f5;border:none}html.dark .treeselect-list__item-checkbox-container{background-color:hsla(0,0%,100%,.05);border:rgb(255 255 255/var(--tw-text-opacity))}.treeselect-list__item-checkbox-icon{height:80%;left:.1rem;top:.1rem;width:80%}.treeselect-input__tags-element:hover{background-color:rgba(var(--primary-50),var(--tw-bg-opacity))}.treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:rgba(var(--gray-950),var(--tw-text-opacity))}html.dark .treeselect-input__tags-element:hover .treeselect-input__tags-cross svg{stroke:rgb(255 255 255/var(--tw-text-opacity))}.treeselect-input__tags-element{color:rgba(var(--primary-600),var(--tw-text-opacity))}html.dark .treeselect-input__tags-element{color:rgba(var(--primary-400),var(--tw-text-opacity))}html.dark .treeselect-input__tags-cross svg{stroke-width:3px;stroke:rgb(255 255 255/var(--tw-text-opacity));opacity:.5}html.dark .treeselect-input__tags-element:hover svg{opacity:.6}.treeselect-input__clear svg{opacity:.5}.treeselect-input__tags{margin-left:3px}.treeselect--disabled .treeselect-input__arrow,.treeselect--disabled .treeselect-input__tags-cross{display:none}.treeselect-input__arrow{margin-right:7px}.treeselect--disabled .treeselect-input__clear{display:none}.treeselect-list__item--disabled{cursor:not-allowed!important}html.dark .treeselect-list__item--disabled .treeselect-list__item-checkbox-container{background-color:rgba(78,78,78,.05)}[dir=rtl] .treeselect-input__operators{left:2px!important;right:unset}[dir=rtl] .treeselect-input{padding:2px 4px 2px 40px}.treeselect-input__arrow svg,.treeselect-input__arrow svg:hover{stroke:#6b7280;cursor:auto;height:20px;min-width:18px;width:15px} \ No newline at end of file diff --git a/src/SelectTree.php b/src/SelectTree.php index 8827347..e2eda72 100644 --- a/src/SelectTree.php +++ b/src/SelectTree.php @@ -457,7 +457,7 @@ public function getDefaultOpenLevel(): int public function getEmptyLabel(): string { - return $this->emptyLabel ? $this->evaluate($this->emptyLabel) : __('No results found'); + return $this->emptyLabel ? $this->evaluate($this->emptyLabel) : __('No options match your search.'); } public function getDirection(): string