@tangible/ui 0.2.45 → 0.2.47

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.
Files changed (38) hide show
  1. package/components/PasswordInput/PasswordInput.d.ts +7 -0
  2. package/components/PasswordInput/PasswordInput.js +64 -0
  3. package/components/PasswordInput/index.d.ts +3 -0
  4. package/components/PasswordInput/index.js +2 -0
  5. package/components/PasswordInput/types.d.ts +45 -0
  6. package/components/PasswordInput/types.js +6 -0
  7. package/components/PasswordStrength/PasswordStrength.d.ts +7 -0
  8. package/components/PasswordStrength/PasswordStrength.js +73 -0
  9. package/components/PasswordStrength/index.d.ts +3 -0
  10. package/components/PasswordStrength/index.js +2 -0
  11. package/components/PasswordStrength/types.d.ts +36 -0
  12. package/components/PasswordStrength/types.js +4 -0
  13. package/components/SecretInput/SecretInput.js +10 -33
  14. package/components/index.d.ts +4 -0
  15. package/components/index.js +2 -0
  16. package/figma-tokens.json +1 -1
  17. package/icons/icons.svg +1 -1
  18. package/icons/sprite-version.js +1 -1
  19. package/icons/sprite.php +1 -1
  20. package/package.json +9 -1
  21. package/skills/building-with-tui/SKILL.md +11 -3
  22. package/styles/all.css +1 -1
  23. package/styles/all.expanded.css +108 -0
  24. package/styles/all.expanded.unlayered.css +108 -0
  25. package/styles/all.unlayered.css +1 -1
  26. package/styles/components/_bundle.scss +7 -1
  27. package/styles/components/password-input.scss +24 -0
  28. package/styles/components/password-strength.scss +95 -0
  29. package/styles/components/secret-input.scss +1 -65
  30. package/styles/system/_reveal.scss +82 -0
  31. package/styles/system/index.scss +1 -0
  32. package/tui-manifest.json +161 -2
  33. package/utils/reveal/RevealToggle.d.ts +32 -0
  34. package/utils/reveal/RevealToggle.js +57 -0
  35. package/utils/reveal/index.d.ts +3 -0
  36. package/utils/reveal/index.js +4 -0
  37. package/utils/reveal/useReveal.d.ts +26 -0
  38. package/utils/reveal/useReveal.js +55 -0
@@ -317,6 +317,17 @@
317
317
  --tui-overlap-stack-border-color
318
318
  */
319
319
  /* @tui-tokens
320
+ --tui-password-input-button-radius
321
+ */
322
+ /* @tui-tokens
323
+ --tui-password-strength-track
324
+ --tui-password-strength-weak
325
+ --tui-password-strength-fair
326
+ --tui-password-strength-strong
327
+ --tui-password-strength-bar-size
328
+ --tui-password-strength-gap
329
+ */
330
+ /* @tui-tokens
320
331
  --tui-pager-gap
321
332
  --tui-pager-nav-gap
322
333
  --tui-pager-item-border
@@ -6928,6 +6939,103 @@
6928
6939
  border-end-end-radius: var(--tui-pager-item-radius, var(--tui-radius-md));
6929
6940
  }
6930
6941
  }
6942
+ :where(.tui-interface) .tui-password-input__reveal {
6943
+ display: inline-flex;
6944
+ align-items: center;
6945
+ justify-content: center;
6946
+ flex: none;
6947
+ min-inline-size: 1.5rem;
6948
+ min-block-size: 1.5rem;
6949
+ padding: 0.1875em;
6950
+ margin-block: calc(-1 * var(--_py, var(--tui-spacing-xxs)));
6951
+ border: 0;
6952
+ border-radius: var(--tui-password-input-button-radius, var(--tui-radius-full, 999px));
6953
+ background: transparent;
6954
+ color: var(--tui-color-fg-secondary);
6955
+ cursor: pointer;
6956
+ line-height: 0;
6957
+ transition-duration: var(--tui-motion-duration);
6958
+ transition-timing-function: var(--tui-motion-timing);
6959
+ transition-property: color, background-color, outline-color;
6960
+ }
6961
+ :where(.tui-interface) .tui-password-input__reveal .tui-icon {
6962
+ font-size: 1.125em;
6963
+ }
6964
+ @media (hover: hover) {
6965
+ :where(.tui-interface) .tui-password-input__reveal:hover {
6966
+ color: var(--tui-color-fg);
6967
+ }
6968
+ }
6969
+ :where(.tui-interface) .tui-password-input__reveal:focus-visible {
6970
+ color: var(--tui-color-fg);
6971
+ outline: var(--tui-focus-ring-width) solid var(--tui-focus-ring-color);
6972
+ outline-offset: var(--tui-focus-ring-offset);
6973
+ }
6974
+ :where(.tui-interface) .tui-password-input__reveal[data-revealed=true] {
6975
+ background-color: var(--tui-color-fill-subtle);
6976
+ color: var(--tui-color-fg);
6977
+ }
6978
+ @media (forced-colors: active) {
6979
+ :where(.tui-interface) .tui-password-input__reveal {
6980
+ color: ButtonText;
6981
+ }
6982
+ :where(.tui-interface) .tui-password-input__reveal[data-revealed=true] {
6983
+ background-color: Highlight;
6984
+ color: HighlightText;
6985
+ }
6986
+ :where(.tui-interface) .tui-password-input__reveal:focus-visible {
6987
+ outline-color: Highlight;
6988
+ }
6989
+ }
6990
+ .tui-interface .tui-password-strength {
6991
+ --_fill: var(--tui-password-strength-weak, var(--tui-theme-danger-base));
6992
+ display: flex;
6993
+ flex-direction: column;
6994
+ gap: var(--tui-spacing-xxs);
6995
+ }
6996
+ .tui-interface .tui-password-strength[data-score="2"] {
6997
+ --_fill: var(--tui-password-strength-fair, var(--tui-theme-warning-base));
6998
+ }
6999
+ .tui-interface .tui-password-strength[data-score="3"], .tui-interface .tui-password-strength[data-score="4"] {
7000
+ --_fill: var(--tui-password-strength-strong, var(--tui-theme-success-base));
7001
+ }
7002
+ .tui-interface .tui-password-strength__bars {
7003
+ display: grid;
7004
+ grid-template-columns: repeat(4, minmax(0, 1fr));
7005
+ gap: var(--tui-password-strength-gap, var(--tui-spacing-xxs));
7006
+ }
7007
+ .tui-interface .tui-password-strength__bar {
7008
+ block-size: var(--tui-password-strength-bar-size, var(--tui-spacing-xxs));
7009
+ border-radius: var(--tui-radius-full, 9999px);
7010
+ background: var(--tui-password-strength-track, var(--tui-color-fill));
7011
+ transition: background-color var(--tui-motion-duration) var(--tui-motion-timing);
7012
+ }
7013
+ .tui-interface .tui-password-strength__bar[data-lit=true] {
7014
+ background: var(--_fill);
7015
+ }
7016
+ @media (forced-colors: active) {
7017
+ .tui-interface .tui-password-strength__bar {
7018
+ forced-color-adjust: none;
7019
+ background: Canvas;
7020
+ border: var(--tui-border-width) solid GrayText;
7021
+ }
7022
+ .tui-interface .tui-password-strength__bar[data-lit=true] {
7023
+ background: CanvasText;
7024
+ border-color: CanvasText;
7025
+ }
7026
+ }
7027
+ .tui-interface .tui-password-strength__text {
7028
+ margin: 0;
7029
+ color: var(--tui-color-fg-secondary);
7030
+ font-size: var(--tui-typography-size-sm);
7031
+ }
7032
+ .tui-interface .tui-password-strength__score {
7033
+ color: var(--tui-color-fg);
7034
+ font-weight: var(--tui-typography-weight-semibold);
7035
+ }
7036
+ .tui-interface .tui-password-strength__feedback {
7037
+ display: block;
7038
+ }
6931
7039
  :where(.tui-interface) .tui-popover {
6932
7040
  --_bg: var(--tui-popover-bg, var(--tui-color-bg-elevated));
6933
7041
  --_fg: var(--tui-popover-fg, var(--tui-color-fg));
@@ -317,6 +317,17 @@
317
317
  --tui-overlap-stack-border-color
318
318
  */
319
319
  /* @tui-tokens
320
+ --tui-password-input-button-radius
321
+ */
322
+ /* @tui-tokens
323
+ --tui-password-strength-track
324
+ --tui-password-strength-weak
325
+ --tui-password-strength-fair
326
+ --tui-password-strength-strong
327
+ --tui-password-strength-bar-size
328
+ --tui-password-strength-gap
329
+ */
330
+ /* @tui-tokens
320
331
  --tui-pager-gap
321
332
  --tui-pager-nav-gap
322
333
  --tui-pager-item-border
@@ -6928,6 +6939,103 @@
6928
6939
  border-end-end-radius: var(--tui-pager-item-radius, var(--tui-radius-md));
6929
6940
  }
6930
6941
  }
6942
+ :where(.tui-interface) .tui-password-input__reveal {
6943
+ display: inline-flex;
6944
+ align-items: center;
6945
+ justify-content: center;
6946
+ flex: none;
6947
+ min-inline-size: 1.5rem;
6948
+ min-block-size: 1.5rem;
6949
+ padding: 0.1875em;
6950
+ margin-block: calc(-1 * var(--_py, var(--tui-spacing-xxs)));
6951
+ border: 0;
6952
+ border-radius: var(--tui-password-input-button-radius, var(--tui-radius-full, 999px));
6953
+ background: transparent;
6954
+ color: var(--tui-color-fg-secondary);
6955
+ cursor: pointer;
6956
+ line-height: 0;
6957
+ transition-duration: var(--tui-motion-duration);
6958
+ transition-timing-function: var(--tui-motion-timing);
6959
+ transition-property: color, background-color, outline-color;
6960
+ }
6961
+ :where(.tui-interface) .tui-password-input__reveal .tui-icon {
6962
+ font-size: 1.125em;
6963
+ }
6964
+ @media (hover: hover) {
6965
+ :where(.tui-interface) .tui-password-input__reveal:hover {
6966
+ color: var(--tui-color-fg);
6967
+ }
6968
+ }
6969
+ :where(.tui-interface) .tui-password-input__reveal:focus-visible {
6970
+ color: var(--tui-color-fg);
6971
+ outline: var(--tui-focus-ring-width) solid var(--tui-focus-ring-color);
6972
+ outline-offset: var(--tui-focus-ring-offset);
6973
+ }
6974
+ :where(.tui-interface) .tui-password-input__reveal[data-revealed=true] {
6975
+ background-color: var(--tui-color-fill-subtle);
6976
+ color: var(--tui-color-fg);
6977
+ }
6978
+ @media (forced-colors: active) {
6979
+ :where(.tui-interface) .tui-password-input__reveal {
6980
+ color: ButtonText;
6981
+ }
6982
+ :where(.tui-interface) .tui-password-input__reveal[data-revealed=true] {
6983
+ background-color: Highlight;
6984
+ color: HighlightText;
6985
+ }
6986
+ :where(.tui-interface) .tui-password-input__reveal:focus-visible {
6987
+ outline-color: Highlight;
6988
+ }
6989
+ }
6990
+ .tui-interface .tui-password-strength {
6991
+ --_fill: var(--tui-password-strength-weak, var(--tui-theme-danger-base));
6992
+ display: flex;
6993
+ flex-direction: column;
6994
+ gap: var(--tui-spacing-xxs);
6995
+ }
6996
+ .tui-interface .tui-password-strength[data-score="2"] {
6997
+ --_fill: var(--tui-password-strength-fair, var(--tui-theme-warning-base));
6998
+ }
6999
+ .tui-interface .tui-password-strength[data-score="3"], .tui-interface .tui-password-strength[data-score="4"] {
7000
+ --_fill: var(--tui-password-strength-strong, var(--tui-theme-success-base));
7001
+ }
7002
+ .tui-interface .tui-password-strength__bars {
7003
+ display: grid;
7004
+ grid-template-columns: repeat(4, minmax(0, 1fr));
7005
+ gap: var(--tui-password-strength-gap, var(--tui-spacing-xxs));
7006
+ }
7007
+ .tui-interface .tui-password-strength__bar {
7008
+ block-size: var(--tui-password-strength-bar-size, var(--tui-spacing-xxs));
7009
+ border-radius: var(--tui-radius-full, 9999px);
7010
+ background: var(--tui-password-strength-track, var(--tui-color-fill));
7011
+ transition: background-color var(--tui-motion-duration) var(--tui-motion-timing);
7012
+ }
7013
+ .tui-interface .tui-password-strength__bar[data-lit=true] {
7014
+ background: var(--_fill);
7015
+ }
7016
+ @media (forced-colors: active) {
7017
+ .tui-interface .tui-password-strength__bar {
7018
+ forced-color-adjust: none;
7019
+ background: Canvas;
7020
+ border: var(--tui-border-width) solid GrayText;
7021
+ }
7022
+ .tui-interface .tui-password-strength__bar[data-lit=true] {
7023
+ background: CanvasText;
7024
+ border-color: CanvasText;
7025
+ }
7026
+ }
7027
+ .tui-interface .tui-password-strength__text {
7028
+ margin: 0;
7029
+ color: var(--tui-color-fg-secondary);
7030
+ font-size: var(--tui-typography-size-sm);
7031
+ }
7032
+ .tui-interface .tui-password-strength__score {
7033
+ color: var(--tui-color-fg);
7034
+ font-weight: var(--tui-typography-weight-semibold);
7035
+ }
7036
+ .tui-interface .tui-password-strength__feedback {
7037
+ display: block;
7038
+ }
6931
7039
  :where(.tui-interface) .tui-popover {
6932
7040
  --_bg: var(--tui-popover-bg, var(--tui-color-bg-elevated));
6933
7041
  --_fg: var(--tui-popover-fg, var(--tui-color-fg));