@rolemodel/optics 1.4.0 → 1.6.0

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.
Binary file
@@ -2272,11 +2272,10 @@ small {
2272
2272
  }
2273
2273
  }
2274
2274
 
2275
- .badge-notice, .badge-info, .badge-danger, .badge-warning, .badge-primary, .badge {
2275
+ .badge {
2276
2276
  display: inline-flex;
2277
2277
  align-items: center;
2278
2278
  justify-content: center;
2279
- padding: var(--op-space-2x-small) var(--op-space-x-small);
2280
2279
  border-radius: var(--op-radius-medium);
2281
2280
  background-color: var(--op-color-neutral-base);
2282
2281
  color: var(--op-color-neutral-on-base);
@@ -2286,55 +2285,54 @@ small {
2286
2285
  gap: var(--op-space-x-small);
2287
2286
  letter-spacing: var(--op-letter-spacing-label);
2288
2287
  line-height: var(--op-line-height-dense);
2288
+ padding-block: var(--op-space-2x-small);
2289
+ padding-inline: var(--op-space-x-small);
2289
2290
  user-select: none;
2290
2291
  white-space: nowrap;
2291
- }
2292
- .badge-notice .material-symbols-outlined, .badge-info .material-symbols-outlined, .badge-danger .material-symbols-outlined, .badge-warning .material-symbols-outlined, .badge-primary .material-symbols-outlined, .badge .material-symbols-outlined {
2293
- font-size: var(--op-font-small);
2294
- }
2295
- .badge--pill.badge-notice, .badge--pill.badge-info, .badge--pill.badge-danger, .badge--pill.badge-warning, .badge--pill.badge-primary, .badge--pill.badge {
2296
- border-radius: var(--op-radius-pill);
2297
- }
2298
- .badge--notification-right.badge-notice, .badge--notification-right.badge-info, .badge--notification-right.badge-danger, .badge--notification-right.badge-warning, .badge--notification-right.badge-primary, .badge--notification-right.badge {
2299
- position: absolute;
2300
- top: 0;
2301
- box-shadow: 0 0 0 var(--op-border-width-large) var(--op-color-neutral-plus-max);
2302
- pointer-events: none;
2303
- right: 0;
2304
- transform: translateY(-50%) translateX(50%);
2305
- }
2306
- .badge--notification-left.badge-notice, .badge--notification-left.badge-info, .badge--notification-left.badge-danger, .badge--notification-left.badge-warning, .badge--notification-left.badge-primary, .badge--notification-left.badge {
2307
- position: absolute;
2308
- top: 0;
2309
- box-shadow: 0 0 0 var(--op-border-width-large) var(--op-color-neutral-plus-max);
2310
- pointer-events: none;
2311
- left: 0;
2312
- transform: translateY(-50%) translateX(-50%);
2313
- }
2314
-
2315
- .badge-primary {
2316
- background-color: var(--op-color-primary-base);
2317
- color: var(--op-color-primary-on-base);
2318
- }
2319
-
2320
- .badge-warning {
2321
- background-color: var(--op-color-alerts-warning-base);
2322
- color: var(--op-color-alerts-warning-on-base);
2323
- }
2324
-
2325
- .badge-danger {
2326
- background-color: var(--op-color-alerts-danger-base);
2327
- color: var(--op-color-alerts-danger-on-base);
2328
- }
2329
-
2330
- .badge-info {
2331
- background-color: var(--op-color-alerts-info-base);
2332
- color: var(--op-color-alerts-info-on-base);
2333
- }
2334
-
2335
- .badge-notice {
2336
- background-color: var(--op-color-alerts-notice-base);
2337
- color: var(--op-color-alerts-notice-on-base);
2292
+ /* Elements */
2293
+ .material-symbols-outlined {
2294
+ font-size: var(--op-font-small);
2295
+ }
2296
+ /* Modifiers */
2297
+ &.badge--primary {
2298
+ background-color: var(--op-color-primary-base);
2299
+ color: var(--op-color-primary-on-base);
2300
+ }
2301
+ &.badge--warning {
2302
+ background-color: var(--op-color-alerts-warning-base);
2303
+ color: var(--op-color-alerts-warning-on-base);
2304
+ }
2305
+ &.badge--danger {
2306
+ background-color: var(--op-color-alerts-danger-base);
2307
+ color: var(--op-color-alerts-danger-on-base);
2308
+ }
2309
+ &.badge--info {
2310
+ background-color: var(--op-color-alerts-info-base);
2311
+ color: var(--op-color-alerts-info-on-base);
2312
+ }
2313
+ &.badge--notice {
2314
+ background-color: var(--op-color-alerts-notice-base);
2315
+ color: var(--op-color-alerts-notice-on-base);
2316
+ }
2317
+ &.badge--pill {
2318
+ border-radius: var(--op-radius-pill);
2319
+ }
2320
+ &.badge--notification-right {
2321
+ position: absolute;
2322
+ box-shadow: 0 0 0 var(--op-border-width-large) var(--op-color-neutral-plus-max);
2323
+ inset-block-start: 0;
2324
+ inset-inline-end: 0;
2325
+ pointer-events: none;
2326
+ transform: translateY(-50%) translateX(50%);
2327
+ }
2328
+ &.badge--notification-left {
2329
+ position: absolute;
2330
+ box-shadow: 0 0 0 var(--op-border-width-large) var(--op-color-neutral-plus-max);
2331
+ inset-block-start: 0;
2332
+ inset-inline-start: 0;
2333
+ pointer-events: none;
2334
+ transform: translateY(-50%) translateX(-50%);
2335
+ }
2338
2336
  }
2339
2337
 
2340
2338
  .breadcrumbs {
@@ -2764,30 +2762,34 @@ small {
2764
2762
  inset: 0;
2765
2763
  outline: 0;
2766
2764
  visibility: hidden;
2767
- }
2768
- .confirm-dialog-wrapper .confirm-dialog-wrapper__backdrop {
2769
- position: fixed;
2770
- z-index: var(--op-z-index-dialog-backdrop);
2771
- background: var(--op-color-black);
2772
- inset: 0;
2773
- opacity: var(--op-opacity-none);
2774
- transition: var(--op-transition-modal);
2775
- visibility: hidden;
2776
- }
2777
- .confirm-dialog-wrapper--active.confirm-dialog-wrapper {
2778
- visibility: visible;
2779
- }
2780
- .confirm-dialog-wrapper--active.confirm-dialog-wrapper .confirm-dialog {
2781
- opacity: var(--op-opacity-full);
2782
- transform: scale(1);
2783
- }
2784
- .confirm-dialog-wrapper--active.confirm-dialog-wrapper .confirm-dialog-wrapper__backdrop {
2785
- opacity: var(--op-opacity-half);
2786
- visibility: visible;
2765
+ /* Elements */
2766
+ .confirm-dialog-wrapper__backdrop {
2767
+ position: fixed;
2768
+ z-index: var(--op-z-index-dialog-backdrop);
2769
+ background: var(--op-color-black);
2770
+ inset: 0;
2771
+ opacity: var(--op-opacity-none);
2772
+ transition: var(--op-transition-modal);
2773
+ visibility: hidden;
2774
+ }
2775
+ /* Modifiers */
2776
+ &.confirm-dialog-wrapper--active {
2777
+ visibility: visible;
2778
+ .confirm-dialog {
2779
+ opacity: var(--op-opacity-full);
2780
+ transform: scale(1);
2781
+ }
2782
+ .confirm-dialog-wrapper__backdrop {
2783
+ opacity: var(--op-opacity-half);
2784
+ visibility: visible;
2785
+ }
2786
+ }
2787
2787
  }
2788
2788
 
2789
+ /* stylelint-disable no-descending-specificity */
2789
2790
  .confirm-dialog {
2790
- --_op-confirm-dialog-width: calc(100 * var(--op-size-unit));
2791
+ /* Public API (customizable component options) */
2792
+ --_op-confirm-dialog-width: calc(100 * var(--op-size-unit)); /* 400px */
2791
2793
  z-index: var(--op-z-index-dialog-content);
2792
2794
  width: var(--_op-confirm-dialog-width);
2793
2795
  border-radius: var(--op-radius-medium);
@@ -2800,25 +2802,26 @@ small {
2800
2802
  opacity: var(--op-opacity-none);
2801
2803
  transform: scale(0.7);
2802
2804
  transition: var(--op-transition-modal);
2803
- }
2804
- .confirm-dialog .confirm-dialog__header,
2805
- .confirm-dialog .confirm-dialog__body,
2806
- .confirm-dialog .confirm-dialog__footer {
2807
- padding: var(--op-space-medium);
2808
- }
2809
- .confirm-dialog .confirm-dialog__header {
2810
- font-size: var(--op-font-large);
2811
- font-weight: var(--op-font-weight-semi-bold);
2812
- }
2813
- .confirm-dialog .confirm-dialog__body {
2814
- box-shadow: var(--op-border-all) var(--op-color-border);
2815
- }
2816
- .confirm-dialog .confirm-dialog__footer {
2817
- display: flex;
2818
- align-items: center;
2819
- justify-content: space-between;
2805
+ .confirm-dialog__header,
2806
+ .confirm-dialog__body,
2807
+ .confirm-dialog__footer {
2808
+ padding: var(--op-space-medium);
2809
+ }
2810
+ .confirm-dialog__header {
2811
+ font-size: var(--op-font-large);
2812
+ font-weight: var(--op-font-weight-semi-bold);
2813
+ }
2814
+ .confirm-dialog__body {
2815
+ box-shadow: var(--op-border-all) var(--op-color-border);
2816
+ }
2817
+ .confirm-dialog__footer {
2818
+ display: flex;
2819
+ align-items: center;
2820
+ justify-content: space-between;
2821
+ }
2820
2822
  }
2821
2823
 
2824
+ /* stylelint-enable no-descending-specificity */
2822
2825
  .divider {
2823
2826
  /* Public API (customizable component options) */
2824
2827
  --_op-divider-vertical-min-height: var(--op-space-large);
@@ -3244,6 +3247,7 @@ textarea.form-control:not([type=radio], [type=checkbox]) {
3244
3247
  }
3245
3248
 
3246
3249
  .modal-wrapper {
3250
+ /* Public API (customizable component options) */
3247
3251
  --_op-modal-backdrop-active-opacity: var(--op-opacity-half);
3248
3252
  position: fixed;
3249
3253
  z-index: var(--op-z-index-dialog);
@@ -3254,31 +3258,35 @@ textarea.form-control:not([type=radio], [type=checkbox]) {
3254
3258
  inset: 0;
3255
3259
  outline: 0;
3256
3260
  visibility: hidden;
3257
- }
3258
- .modal-wrapper .modal-wrapper__backdrop {
3259
- position: fixed;
3260
- z-index: var(--op-z-index-dialog-backdrop);
3261
- background: var(--op-color-black);
3262
- inset: 0;
3263
- opacity: var(--op-opacity-none);
3264
- transition: var(--op-transition-modal);
3265
- visibility: hidden;
3266
- }
3267
- .modal-wrapper--active.modal-wrapper {
3268
- visibility: visible;
3269
- }
3270
- .modal-wrapper--active.modal-wrapper .modal {
3271
- opacity: var(--op-opacity-full);
3272
- transform: scale(1);
3273
- }
3274
- .modal-wrapper--active.modal-wrapper .modal-wrapper__backdrop {
3275
- opacity: var(--_op-modal-backdrop-active-opacity);
3276
- visibility: visible;
3261
+ /* Elements */
3262
+ .modal-wrapper__backdrop {
3263
+ position: fixed;
3264
+ z-index: var(--op-z-index-dialog-backdrop);
3265
+ background: var(--op-color-black);
3266
+ inset: 0;
3267
+ opacity: var(--op-opacity-none);
3268
+ transition: var(--op-transition-modal);
3269
+ visibility: hidden;
3270
+ }
3271
+ /* Modifiers */
3272
+ &.modal-wrapper--active {
3273
+ visibility: visible;
3274
+ .modal {
3275
+ opacity: var(--op-opacity-full);
3276
+ transform: scale(1);
3277
+ }
3278
+ .modal-wrapper__backdrop {
3279
+ opacity: var(--_op-modal-backdrop-active-opacity);
3280
+ visibility: visible;
3281
+ }
3282
+ }
3277
3283
  }
3278
3284
 
3285
+ /* stylelint-disable no-descending-specificity */
3279
3286
  .modal {
3280
- --_op-modal-width: calc(141 * var(--op-size-unit));
3281
- --_op-modal-max-height: calc(125 * var(--op-size-unit));
3287
+ /* Public API (customizable component options) */
3288
+ --_op-modal-width: calc(141 * var(--op-size-unit)); /* 564px */
3289
+ --_op-modal-max-height: calc(125 * var(--op-size-unit)); /* 500px */
3282
3290
  z-index: var(--op-z-index-dialog-content);
3283
3291
  width: var(--_op-modal-width);
3284
3292
  border-radius: var(--op-radius-medium);
@@ -3291,31 +3299,64 @@ textarea.form-control:not([type=radio], [type=checkbox]) {
3291
3299
  opacity: var(--op-opacity-none);
3292
3300
  transform: scale(0.7);
3293
3301
  transition: var(--op-transition-modal);
3302
+ .modal__header,
3303
+ .modal__body,
3304
+ .modal__footer {
3305
+ padding: var(--op-space-medium);
3306
+ }
3307
+ .modal__header {
3308
+ display: flex;
3309
+ align-items: center;
3310
+ justify-content: space-between;
3311
+ font-size: var(--op-font-large);
3312
+ font-weight: var(--op-font-weight-semi-bold);
3313
+ }
3314
+ .modal__body {
3315
+ max-height: var(--_op-modal-max-height);
3316
+ box-shadow: var(--op-border-all) var(--op-color-border);
3317
+ overflow-y: auto;
3318
+ }
3319
+ .modal__footer {
3320
+ display: flex;
3321
+ align-items: center;
3322
+ justify-content: flex-end;
3323
+ gap: var(--op-space-small);
3324
+ }
3294
3325
  }
3295
- .modal .modal__header,
3296
- .modal .modal__body,
3297
- .modal .modal__footer {
3298
- padding: var(--op-space-medium);
3299
- }
3300
- .modal .modal__header {
3301
- display: flex;
3302
- align-items: center;
3303
- justify-content: space-between;
3304
- font-size: var(--op-font-large);
3305
- font-weight: var(--op-font-weight-semi-bold);
3306
- }
3307
- .modal .modal__body {
3308
- max-height: var(--_op-modal-max-height);
3309
- box-shadow: var(--op-border-all) var(--op-color-border);
3310
- overflow-y: auto;
3311
- }
3312
- .modal .modal__footer {
3313
- display: flex;
3314
- align-items: center;
3315
- justify-content: flex-end;
3316
- gap: var(--op-space-small);
3326
+
3327
+ /* stylelint-enable no-descending-specificity */
3328
+ dialog.modal {
3329
+ position: fixed;
3330
+ display: block;
3331
+ padding: 0;
3332
+ border: none;
3333
+ inset: 0;
3334
+ &::backdrop {
3335
+ /* The Dialog backdrop does not inheret from :root so these need to be duplicated here. */
3336
+ --op-color-black: hsl(0deg 0% 0%);
3337
+ --_op-modal-backdrop-active-opacity: 0.5;
3338
+ --op-opacity-none: 0;
3339
+ --op-opacity-full: 1;
3340
+ animation: show-backdrop 300ms ease-in;
3341
+ background: var(--op-color-black);
3342
+ opacity: var(--_op-modal-backdrop-active-opacity);
3343
+ }
3344
+ &[open] {
3345
+ opacity: var(--op-opacity-full);
3346
+ transform: scale(1);
3347
+ }
3348
+ &.modal--closing {
3349
+ opacity: var(--op-opacity-none);
3350
+ transform: scale(0.7);
3351
+ &::backdrop {
3352
+ animation: hide-backdrop 300ms ease-in;
3353
+ opacity: var(--op-opacity-none);
3354
+ }
3355
+ }
3317
3356
  }
3318
3357
 
3358
+ /* Using the Dialog element */
3359
+ /* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog */
3319
3360
  @keyframes show-backdrop {
3320
3361
  from {
3321
3362
  opacity: var(--op-opacity-none);
@@ -3332,35 +3373,6 @@ textarea.form-control:not([type=radio], [type=checkbox]) {
3332
3373
  opacity: var(--op-opacity-none);
3333
3374
  }
3334
3375
  }
3335
- dialog.modal {
3336
- position: fixed;
3337
- display: block;
3338
- padding: 0;
3339
- border: none;
3340
- inset: 0;
3341
- }
3342
- dialog.modal::backdrop {
3343
- --op-color-black: hsl(0deg 0% 0%);
3344
- --_op-modal-backdrop-active-opacity: 0.5;
3345
- --op-opacity-none: 0;
3346
- --op-opacity-full: 1;
3347
- animation: show-backdrop 300ms ease-in;
3348
- background: var(--op-color-black);
3349
- opacity: var(--_op-modal-backdrop-active-opacity);
3350
- }
3351
- dialog.modal[open] {
3352
- opacity: var(--op-opacity-full);
3353
- transform: scale(1);
3354
- }
3355
- dialog.modal.modal--closing {
3356
- opacity: var(--op-opacity-none);
3357
- transform: scale(0.7);
3358
- }
3359
- dialog.modal.modal--closing::backdrop {
3360
- animation: hide-backdrop 300ms ease-in;
3361
- opacity: var(--op-opacity-none);
3362
- }
3363
-
3364
3376
  .navbar-primary, .navbar {
3365
3377
  --_op-navbar-background-color: var(--op-color-neutral-plus-eight);
3366
3378
  --_op-navbar-text-color: var(--op-color-neutral-on-plus-eight);
@@ -3953,7 +3965,7 @@ dialog.modal.modal--closing::backdrop {
3953
3965
  overflow-y: auto;
3954
3966
  }
3955
3967
 
3956
- .tag-notice, .tag-info, .tag-warning, .tag-danger, .tag-primary, .tag-readonly {
3968
+ .tag {
3957
3969
  display: inline-flex;
3958
3970
  align-items: center;
3959
3971
  justify-content: center;
@@ -3967,120 +3979,132 @@ dialog.modal.modal--closing::backdrop {
3967
3979
  line-height: var(--op-line-height-dense);
3968
3980
  user-select: none;
3969
3981
  white-space: nowrap;
3970
- }
3971
- .tag-notice .tag__label, .tag-info .tag__label, .tag-warning .tag__label, .tag-danger .tag__label, .tag-primary .tag__label, .tag-readonly .tag__label {
3972
- padding-inline: var(--op-space-2x-small);
3973
- }
3974
- .tag-notice .btn--icon, .tag-info .btn--icon, .tag-warning .btn--icon, .tag-danger .btn--icon, .tag-primary .btn--icon, .tag-readonly .btn--icon {
3975
- --__op-btn-height: var(--op-font-medium);
3976
- }
3977
- .tag-notice .btn--icon:hover, .tag-info .btn--icon:hover, .tag-warning .btn--icon:hover, .tag-danger .btn--icon:hover, .tag-primary .btn--icon:hover, .tag-readonly .btn--icon:hover {
3978
- background-color: var(--op-color-neutral-minus-three);
3979
- box-shadow: none;
3980
- color: var(--op-color-neutral-on-minus-three);
3981
- }
3982
- .tag-notice .btn--icon:focus-visible, .tag-info .btn--icon:focus-visible, .tag-warning .btn--icon:focus-visible, .tag-danger .btn--icon:focus-visible, .tag-primary .btn--icon:focus-visible, .tag-readonly .btn--icon:focus-visible {
3983
- background-color: var(--op-color-neutral-base);
3984
- box-shadow: var(--op-input-focus-neutral);
3985
- color: var(--op-color-neutral-on-base);
3986
- }
3987
-
3988
- .tag-primary {
3989
- background-color: var(--op-color-primary-base);
3990
- color: var(--op-color-primary-on-base);
3991
- }
3992
- .tag-primary .btn--icon {
3993
- color: var(--op-color-primary-on-base);
3994
- }
3995
- .tag-primary .btn--icon:hover {
3996
- background-color: var(--op-color-primary-minus-three);
3997
- box-shadow: none;
3998
- color: var(--op-color-primary-on-minus-three);
3999
- }
4000
- .tag-primary .btn--icon:focus-visible {
4001
- background-color: var(--op-color-primary-base);
4002
- box-shadow: var(--op-input-focus-primary);
4003
- color: var(--op-color-primary-on-base);
4004
- }
4005
-
4006
- .tag-danger {
4007
- background-color: var(--op-color-alerts-danger-base);
4008
- color: var(--op-color-alerts-danger-on-base);
4009
- /* stylelint-disable no-descending-specificity */
4010
- /* stylelint-enable no-descending-specificity */
4011
- }
4012
- .tag-danger .btn--icon {
4013
- color: var(--op-color-alerts-danger-on-base);
4014
- }
4015
- .tag-danger .btn--icon:hover {
4016
- background-color: var(--op-color-alerts-danger-minus-three);
4017
- box-shadow: none;
4018
- color: var(--op-color-alerts-danger-on-minus-three);
4019
- }
4020
- .tag-danger .btn--icon:focus-visible {
4021
- background-color: var(--op-color-alerts-danger-base);
4022
- box-shadow: var(--op-input-focus-danger);
4023
- color: var(--op-color-alerts-danger-on-base);
4024
- }
4025
-
4026
- .tag-warning {
4027
- background-color: var(--op-color-alerts-warning-base);
4028
- color: var(--op-color-alerts-warning-on-base);
4029
- /* stylelint-disable no-descending-specificity */
4030
- /* stylelint-enable no-descending-specificity */
4031
- }
4032
- .tag-warning .btn--icon {
4033
- color: var(--op-color-alerts-warning-on-base);
4034
- }
4035
- .tag-warning .btn--icon:hover {
4036
- background-color: var(--op-color-alerts-warning-minus-three);
4037
- box-shadow: none;
4038
- color: var(--op-color-alerts-warning-on-minus-three);
4039
- }
4040
- .tag-warning .btn--icon:focus-visible {
4041
- background-color: var(--op-color-alerts-warning-base);
4042
- box-shadow: var(--op-input-focus-warning);
4043
- color: var(--op-color-alerts-warning-on-base);
4044
- }
4045
-
4046
- .tag-info {
4047
- background-color: var(--op-color-alerts-info-base);
4048
- color: var(--op-color-alerts-info-on-base);
4049
- /* stylelint-disable no-descending-specificity */
4050
- /* stylelint-enable no-descending-specificity */
4051
- }
4052
- .tag-info .btn--icon {
4053
- color: var(--op-color-alerts-info-on-base);
4054
- }
4055
- .tag-info .btn--icon:hover {
4056
- background-color: var(--op-color-alerts-info-minus-three);
4057
- box-shadow: none;
4058
- color: var(--op-color-alerts-info-on-minus-three);
4059
- }
4060
- .tag-info .btn--icon:focus-visible {
4061
- background-color: var(--op-color-alerts-info-base);
4062
- box-shadow: var(--op-input-focus-info);
4063
- color: var(--op-color-alerts-info-on-base);
4064
- }
4065
-
4066
- .tag-notice {
4067
- background-color: var(--op-color-alerts-notice-base);
4068
- color: var(--op-color-alerts-notice-on-base);
4069
- /* stylelint-disable no-descending-specificity */
4070
- /* stylelint-enable no-descending-specificity */
4071
- }
4072
- .tag-notice .btn--icon {
4073
- color: var(--op-color-alerts-notice-on-base);
4074
- }
4075
- .tag-notice .btn--icon:hover {
4076
- background-color: var(--op-color-alerts-notice-minus-three);
4077
- box-shadow: none;
4078
- color: var(--op-color-alerts-notice-on-minus-three);
4079
- }
4080
- .tag-notice .btn--icon:focus-visible {
4081
- background-color: var(--op-color-alerts-notice-base);
4082
- box-shadow: var(--op-input-focus-notice);
4083
- color: var(--op-color-alerts-notice-on-base);
3982
+ /* Elements */
3983
+ .tag__label {
3984
+ padding-inline: var(--op-space-2x-small);
3985
+ }
3986
+ .btn--icon {
3987
+ --__op-btn-height: var(--op-font-medium);
3988
+ /* Hover State */
3989
+ &:hover {
3990
+ background-color: var(--op-color-neutral-minus-three);
3991
+ box-shadow: none;
3992
+ color: var(--op-color-neutral-on-minus-three);
3993
+ }
3994
+ /* Focus State */
3995
+ &:focus-visible {
3996
+ background-color: var(--op-color-neutral-base);
3997
+ box-shadow: var(--op-input-focus-neutral);
3998
+ color: var(--op-color-neutral-on-base);
3999
+ }
4000
+ }
4001
+ /* Modifiers */
4002
+ &.tag--read-only {
4003
+ /* This is here for consistency */
4004
+ }
4005
+ &.tag--primary {
4006
+ background-color: var(--op-color-primary-base);
4007
+ color: var(--op-color-primary-on-base);
4008
+ .btn--icon {
4009
+ color: var(--op-color-primary-on-base);
4010
+ /* Hover State */
4011
+ &:hover {
4012
+ background-color: var(--op-color-primary-minus-three);
4013
+ box-shadow: none;
4014
+ color: var(--op-color-primary-on-minus-three);
4015
+ }
4016
+ /* Focus State */
4017
+ &:focus-visible {
4018
+ background-color: var(--op-color-primary-base);
4019
+ box-shadow: var(--op-input-focus-primary);
4020
+ color: var(--op-color-primary-on-base);
4021
+ }
4022
+ }
4023
+ }
4024
+ &.tag--danger {
4025
+ background-color: var(--op-color-alerts-danger-base);
4026
+ color: var(--op-color-alerts-danger-on-base);
4027
+ /* stylelint-disable no-descending-specificity */
4028
+ .btn--icon {
4029
+ color: var(--op-color-alerts-danger-on-base);
4030
+ /* Hover State */
4031
+ &:hover {
4032
+ background-color: var(--op-color-alerts-danger-minus-three);
4033
+ box-shadow: none;
4034
+ color: var(--op-color-alerts-danger-on-minus-three);
4035
+ }
4036
+ /* Focus State */
4037
+ &:focus-visible {
4038
+ background-color: var(--op-color-alerts-danger-base);
4039
+ box-shadow: var(--op-input-focus-danger);
4040
+ color: var(--op-color-alerts-danger-on-base);
4041
+ }
4042
+ }
4043
+ /* stylelint-enable no-descending-specificity */
4044
+ }
4045
+ &.tag--warning {
4046
+ background-color: var(--op-color-alerts-warning-base);
4047
+ color: var(--op-color-alerts-warning-on-base);
4048
+ /* stylelint-disable no-descending-specificity */
4049
+ .btn--icon {
4050
+ color: var(--op-color-alerts-warning-on-base);
4051
+ /* Hover State */
4052
+ &:hover {
4053
+ background-color: var(--op-color-alerts-warning-minus-three);
4054
+ box-shadow: none;
4055
+ color: var(--op-color-alerts-warning-on-minus-three);
4056
+ }
4057
+ /* Focus State */
4058
+ &:focus-visible {
4059
+ background-color: var(--op-color-alerts-warning-base);
4060
+ box-shadow: var(--op-input-focus-warning);
4061
+ color: var(--op-color-alerts-warning-on-base);
4062
+ }
4063
+ }
4064
+ /* stylelint-enable no-descending-specificity */
4065
+ }
4066
+ &.tag--info {
4067
+ background-color: var(--op-color-alerts-info-base);
4068
+ color: var(--op-color-alerts-info-on-base);
4069
+ /* stylelint-disable no-descending-specificity */
4070
+ .btn--icon {
4071
+ color: var(--op-color-alerts-info-on-base);
4072
+ /* Hover State */
4073
+ &:hover {
4074
+ background-color: var(--op-color-alerts-info-minus-three);
4075
+ box-shadow: none;
4076
+ color: var(--op-color-alerts-info-on-minus-three);
4077
+ }
4078
+ /* Focus State */
4079
+ &:focus-visible {
4080
+ background-color: var(--op-color-alerts-info-base);
4081
+ box-shadow: var(--op-input-focus-info);
4082
+ color: var(--op-color-alerts-info-on-base);
4083
+ }
4084
+ }
4085
+ /* stylelint-enable no-descending-specificity */
4086
+ }
4087
+ &.tag--notice {
4088
+ background-color: var(--op-color-alerts-notice-base);
4089
+ color: var(--op-color-alerts-notice-on-base);
4090
+ /* stylelint-disable no-descending-specificity */
4091
+ .btn--icon {
4092
+ color: var(--op-color-alerts-notice-on-base);
4093
+ /* Hover State */
4094
+ &:hover {
4095
+ background-color: var(--op-color-alerts-notice-minus-three);
4096
+ box-shadow: none;
4097
+ color: var(--op-color-alerts-notice-on-minus-three);
4098
+ }
4099
+ /* Focus State */
4100
+ &:focus-visible {
4101
+ background-color: var(--op-color-alerts-notice-base);
4102
+ box-shadow: var(--op-input-focus-notice);
4103
+ color: var(--op-color-alerts-notice-on-base);
4104
+ }
4105
+ }
4106
+ /* stylelint-enable no-descending-specificity */
4107
+ }
4084
4108
  }
4085
4109
 
4086
4110
  .text-pair {