diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java b/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java index 7e6b0ae1c..c344ef989 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/cards/Card.java @@ -519,12 +519,12 @@ public Card appendChild(PrefixAddOn prefix) { @Override public PostfixElement getPostfixElement() { - return PostfixElement.of(header.get().element()); + return PostfixElement.of(header.get().getMainHeader().element()); } @Override public PrefixElement getPrefixElement() { - return PrefixElement.of(header.get().element()); + return PrefixElement.of(header.get().getMainHeader().element()); } /** diff --git a/domino-ui/src/main/java/org/dominokit/domino/ui/counter/Counter.java b/domino-ui/src/main/java/org/dominokit/domino/ui/counter/Counter.java index ec527b2fe..fba42df0c 100644 --- a/domino-ui/src/main/java/org/dominokit/domino/ui/counter/Counter.java +++ b/domino-ui/src/main/java/org/dominokit/domino/ui/counter/Counter.java @@ -71,8 +71,12 @@ private void initTimer() { new Timer() { @Override public void run() { - if (currentValue < countTo) { - currentValue += increment; + if (currentValue != countTo) { + if (countFrom < countTo) { + currentValue += increment; + } else { + currentValue -= increment; + } notifyCount(); } else { cancel(); @@ -82,22 +86,33 @@ public void run() { } private void notifyCount() { - if (currentValue <= countTo) { - countHandler.onCount(currentValue); - } else { - countHandler.onCount(countTo); - } + countHandler.onCount(currentValue); } /** * Starts the counter, if the counter is already counting it will reset and start counting from * the beginning */ - public void startCounting() { - if (timer.isRunning()) timer.cancel(); + public Counter startCounting() { + if (timer.isRunning()) { + timer.cancel(); + } this.currentValue = countFrom; countHandler.onCount(countFrom); timer.scheduleRepeating(interval); + return this; + } + + /** + * Stops the counter if it is running + * + * @return same counter instance. + */ + public Counter stopCounting() { + if (this.timer.isRunning()) { + this.timer.cancel(); + } + return this; } /** Use to add an implementation of a handler to be called after each count */ diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-buttons.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-buttons.css index ac2a23438..cc6ecb8af 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-buttons.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-buttons.css @@ -38,7 +38,7 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -} + align-items: center;} .dui-btn-text { order: var(--dui-btn-text-order); diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css index 9f650f47f..b70019e76 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-forms.css @@ -152,6 +152,7 @@ fieldset.dui { order: 40; font: var(--dui-form-field-postfix-font); line-height: var(--dui-form-field-postfix-line-height); + display: flex; } .dui-form-field .dui-postfix-addon { @@ -202,7 +203,7 @@ fieldset.dui { gap: var(--dui-form-field-values-gap, var(--dui-spc-1)); border: var(--dui-form-field-input-border); font: var(--dui-form-field-input-line-font); - line-height: var(--dui-form-field-input-line-hieght); + line-height: var(--dui-form-field-input-line-height); overflow: var(--dui-form-input-overflow, hidden); white-space: var(--dui-form-field-input-whitespace); text-overflow: ellipsis; @@ -728,7 +729,7 @@ textarea.dui-field-input { border: none; border-radius: var(--dui-form-field-wrapper-radius); font: var(--dui-form-field-input-line-font); - line-height: var(--dui-form-field-input-line-hieght); + line-height: var(--dui-form-field-input-line-height); overflow: var(--dui-form-input-overflow, hidden); white-space: nowrap; text-overflow: ellipsis; diff --git a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-theme-default.css b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-theme-default.css index fd9922a07..875f1b8c7 100644 --- a/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-theme-default.css +++ b/domino-ui/src/main/resources/org/dominokit/domino/ui/public/css/domino-ui/dui-components/domino-ui-theme-default.css @@ -898,7 +898,7 @@ body.dui { --dui-form-field-input-height: 32px; --dui-form-field-input-border: none; - --dui-form-field-input-line-hieght: 31px; + --dui-form-field-input-line-height: 31px; --dui-form-field-input-line-font: var(--dui-font-regular); --dui-form-field-input-text-indent: 5px; --dui-form-field-messages-wrapper-padding: 0 5px 0 5px;