@danske/sapphire-css 16.3.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.
Files changed (109) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +57 -0
  3. package/build/themes/cjs/default-dark.d.ts +3 -0
  4. package/build/themes/cjs/default-dark.js +8 -0
  5. package/build/themes/cjs/default.d.ts +3 -0
  6. package/build/themes/cjs/default.js +8 -0
  7. package/build/themes/cjs/index.d.ts +1 -0
  8. package/build/themes/cjs/index.js +16 -0
  9. package/build/themes/cjs/june-dark.d.ts +4 -0
  10. package/build/themes/cjs/june-dark.js +9 -0
  11. package/build/themes/cjs/june.d.ts +4 -0
  12. package/build/themes/cjs/june.js +9 -0
  13. package/build/themes/esm/default-dark.d.ts +3 -0
  14. package/build/themes/esm/default-dark.js +3 -0
  15. package/build/themes/esm/default.d.ts +3 -0
  16. package/build/themes/esm/default.js +3 -0
  17. package/build/themes/esm/index.d.ts +1 -0
  18. package/build/themes/esm/index.js +1 -0
  19. package/build/themes/esm/june-dark.d.ts +4 -0
  20. package/build/themes/esm/june-dark.js +4 -0
  21. package/build/themes/esm/june.d.ts +4 -0
  22. package/build/themes/esm/june.js +4 -0
  23. package/components/accordion/accordion.module.css.d.ts +19 -0
  24. package/components/avatar/avatar.module.css.d.ts +27 -0
  25. package/components/backdrop/backdrop.module.css +8 -0
  26. package/components/backdrop/backdrop.module.css.d.ts +5 -0
  27. package/components/badge/badge.module.css +121 -0
  28. package/components/badge/badge.module.css.d.ts +16 -0
  29. package/components/button/button.module.css +278 -0
  30. package/components/button/button.module.css.d.ts +23 -0
  31. package/components/buttonGroup/buttonGroup.module.css +24 -0
  32. package/components/buttonGroup/buttonGroup.module.css.d.ts +10 -0
  33. package/components/calendar/calendar.module.css +406 -0
  34. package/components/calendar/calendar.module.css.d.ts +47 -0
  35. package/components/checkbox/checkbox.module.css +182 -0
  36. package/components/checkbox/checkbox.module.css.d.ts +18 -0
  37. package/components/contextualHelp/contextualHelp.module.css +35 -0
  38. package/components/contextualHelp/contextualHelp.module.css.d.ts +7 -0
  39. package/components/dateField/dateField.module.css +239 -0
  40. package/components/dateField/dateField.module.css.d.ts +22 -0
  41. package/components/dialog/dialog.module.css +81 -0
  42. package/components/dialog/dialog.module.css.d.ts +15 -0
  43. package/components/feedbackMessage/feedbackMessage.module.css +42 -0
  44. package/components/feedbackMessage/feedbackMessage.module.css.d.ts +10 -0
  45. package/components/field/field.module.css.d.ts +17 -0
  46. package/components/fieldGroup/fieldGroup.module.css +64 -0
  47. package/components/fieldGroup/fieldGroup.module.css.d.ts +12 -0
  48. package/components/heading/heading.module.css +143 -0
  49. package/components/heading/heading.module.css.d.ts +12 -0
  50. package/components/icon/icon.module.css +14 -0
  51. package/components/icon/icon.module.css.d.ts +8 -0
  52. package/components/iconButton/iconButton.module.css +225 -0
  53. package/components/iconButton/iconButton.module.css.d.ts +19 -0
  54. package/components/label/label.module.css.d.ts +9 -0
  55. package/components/link/link.module.css +35 -0
  56. package/components/link/link.module.css.d.ts +10 -0
  57. package/components/list/list.module.css +160 -0
  58. package/components/list/list.module.css.d.ts +19 -0
  59. package/components/listbox/listbox.module.css +211 -0
  60. package/components/listbox/listbox.module.css.d.ts +21 -0
  61. package/components/notificationBadge/notificationBadge.module.css.d.ts +16 -0
  62. package/components/pagination/pagination.module.css +44 -0
  63. package/components/pagination/pagination.module.css.d.ts +8 -0
  64. package/components/panel/panel.module.css +87 -0
  65. package/components/panel/panel.module.css.d.ts +18 -0
  66. package/components/paragraph/paragraph.module.css +35 -0
  67. package/components/paragraph/paragraph.module.css.d.ts +8 -0
  68. package/components/popover/popover.module.css +39 -0
  69. package/components/popover/popover.module.css.d.ts +8 -0
  70. package/components/radio/radio.module.css +117 -0
  71. package/components/radio/radio.module.css.d.ts +14 -0
  72. package/components/searchField/searchField.module.css +148 -0
  73. package/components/searchField/searchField.module.css.d.ts +14 -0
  74. package/components/segmentedControl/segmentedControl.module.css +140 -0
  75. package/components/segmentedControl/segmentedControl.module.css.d.ts +16 -0
  76. package/components/select/select.module.css +166 -0
  77. package/components/select/select.module.css.d.ts +19 -0
  78. package/components/skeleton/skeleton.module.css +52 -0
  79. package/components/skeleton/skeleton.module.css.d.ts +9 -0
  80. package/components/spinner/spinner.module.css.d.ts +14 -0
  81. package/components/surface/surface.module.css +19 -0
  82. package/components/surface/surface.module.css.d.ts +5 -0
  83. package/components/switch/switch.module.css +170 -0
  84. package/components/switch/switch.module.css.d.ts +13 -0
  85. package/components/table/table.module.css +303 -0
  86. package/components/table/table.module.css.d.ts +37 -0
  87. package/components/tabs/tabs.module.css +83 -0
  88. package/components/tabs/tabs.module.css.d.ts +17 -0
  89. package/components/text/text.module.css.d.ts +21 -0
  90. package/components/textField/textField.module.css +208 -0
  91. package/components/textField/textField.module.css.d.ts +22 -0
  92. package/components/toast/toast.module.css.d.ts +12 -0
  93. package/components/tooltip/tooltip.module.css +41 -0
  94. package/components/tooltip/tooltip.module.css.d.ts +6 -0
  95. package/package.json +68 -0
  96. package/themes/default-dark.css +2 -0
  97. package/themes/default-dark.d.ts +3 -0
  98. package/themes/default-dark.js +8 -0
  99. package/themes/default.css +2 -0
  100. package/themes/default.d.ts +3 -0
  101. package/themes/default.js +8 -0
  102. package/themes/index.d.ts +1 -0
  103. package/themes/index.js +16 -0
  104. package/themes/june-dark.css +3 -0
  105. package/themes/june-dark.d.ts +4 -0
  106. package/themes/june-dark.js +9 -0
  107. package/themes/june.css +3 -0
  108. package/themes/june.d.ts +4 -0
  109. package/themes/june.js +9 -0
@@ -0,0 +1,148 @@
1
+ .sapphire-search-field {
2
+ box-sizing: border-box;
3
+ font-family: var(--sapphire-search-field-font-name);
4
+ width: var(--sapphire-search-field-size-width-control);
5
+ /* The below is meant to address a font rendering quirk in OSX where the text
6
+ * looks bolder than intended due to subpixel rendering. This quirk generally
7
+ * occurs for bold fonts on dark backgrounds but depending on the font, it
8
+ * can happen in other contexts as well.
9
+ *
10
+ * These do not do anything except in webkit browsers & firefox on OSX.
11
+ *
12
+ * For more details see:
13
+ * - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
14
+ * - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
15
+ */
16
+ -webkit-font-smoothing: antialiased;
17
+ -moz-osx-font-smoothing: grayscale;
18
+
19
+ /*
20
+ showing border with box-shadow, since the width changes between focused and
21
+ non-focused state. Using border will cause content to jump, due to resize.
22
+ Using outline will render border and focus ring outside the component's
23
+ boundary, which can lead to issues where it's clipped or overlapped with
24
+ the adjacent element.
25
+ */
26
+ box-shadow: inset 0 0 0 var(--sapphire-search-field-size-width-border)
27
+ var(--sapphire-search-field-color-border-default);
28
+ display: inline-flex;
29
+ align-items: center;
30
+ gap: var(--sapphire-search-field-size-spacing-control-gap);
31
+ border-radius: var(--sapphire-search-field-size-radius);
32
+ cursor: text;
33
+ color: var(--sapphire-search-field-color-content-input);
34
+ font-size: var(--sapphire-search-field-size-font-content);
35
+ height: var(--sapphire-search-field-size-height-field);
36
+ background-color: var(--sapphire-search-field-color-background);
37
+ }
38
+
39
+ .sapphire-search-field .sapphire-search-field__input:last-child {
40
+ padding-right: var(--sapphire-search-field-size-spacing-control-horizontal);
41
+ }
42
+
43
+ .sapphire-search-field__input {
44
+ all: unset;
45
+ flex: 1;
46
+ height: 100%;
47
+ font-weight: var(--sapphire-search-field-size-font-weight-input);
48
+ caret-color: var(--sapphire-search-field-color-caret);
49
+ position: relative;
50
+ padding-left: calc(var(--sapphire-search-field-size-height-field));
51
+ }
52
+
53
+ /**
54
+ * Placeholder
55
+ */
56
+ .sapphire-search-field__input::placeholder {
57
+ opacity: 1; /* some browsers set a lower than 1 opacity */
58
+ color: var(--sapphire-search-field-color-content-placeholder);
59
+ }
60
+
61
+ /**
62
+ * Focus
63
+ */
64
+ .sapphire-search-field.is-focus,
65
+ .sapphire-search-field:focus-within {
66
+ box-shadow: inset 0 0 0 var(--sapphire-search-field-size-focus-ring)
67
+ var(--sapphire-search-field-color-focus-ring);
68
+ }
69
+
70
+ /**
71
+ * Disabled
72
+ */
73
+ .sapphire-search-field.is-disabled {
74
+ opacity: var(--sapphire-search-field-opacity-disabled);
75
+ cursor: not-allowed;
76
+ }
77
+
78
+ .sapphire-search-field.is-disabled .sapphire-search-field__input {
79
+ cursor: not-allowed;
80
+ }
81
+
82
+ /**
83
+ * Clear button
84
+ */
85
+ /* Remove the inner padding and cancel buttons for input[type="search"] in Chrome and Safari on macOS. */
86
+ .sapphire-search-field__input::-webkit-search-cancel-button,
87
+ .sapphire-search-field__input::-webkit-search-decoration {
88
+ -webkit-appearance: none;
89
+ }
90
+ .sapphire-search-field__button {
91
+ display: flex;
92
+ justify-content: center;
93
+ align-items: center;
94
+ height: var(--sapphire-search-field-size-height-field);
95
+ width: var(--sapphire-search-field-size-height-field);
96
+ color: var(--sapphire-search-field-color-content-button-default);
97
+ cursor: default;
98
+
99
+ transition: transform var(--sapphire-search-field-time-transition);
100
+ }
101
+
102
+ .sapphire-search-field__button:not(.js-hover):hover,
103
+ .sapphire-search-field__button.is-hover {
104
+ color: var(--sapphire-search-field-color-content-button-hover);
105
+ }
106
+
107
+ .sapphire-search-field__button:active,
108
+ .sapphire-search-field__button:not(.js-hover):active,
109
+ .sapphire-search-field__button.is-active {
110
+ color: var(--sapphire-search-field-color-content-button-active);
111
+ }
112
+
113
+ .sapphire-search-field.is-disabled .sapphire-search-field__button,
114
+ .sapphire-search-field__input:read-only + .sapphire-search-field__button {
115
+ display: none;
116
+ }
117
+
118
+ .sapphire-search-field__input:placeholder-shown
119
+ + .sapphire-search-field__button,
120
+ .sapphire-search-field__input--empty + .sapphire-search-field__button {
121
+ /*
122
+ * Css only solution to:
123
+ * - hide the clear button when the input is empty.
124
+ * - Apply a gentle transition on appearance/disappearance
125
+ * IMPORTANT: there must be a placeholder provided for :placeholder-shown to
126
+ * work. " " can be set as placeholder as a fallback, or
127
+ * sapphire-search-field__input--empty class can be used instead.
128
+ */
129
+ opacity: 0;
130
+ width: 0; /* To not cover the input when invisible. */
131
+ transform: scale(0.85);
132
+ transition: transform var(--sapphire-search-field-time-transition),
133
+ opacity var(--sapphire-search-field-time-transition),
134
+ width var(--sapphire-search-field-time-transition)
135
+ /* Zero duration will kill the transition */
136
+ var(--sapphire-search-field-time-transition)
137
+ /* Delaying to prevent width transition*/;
138
+ }
139
+
140
+ /*
141
+ * Search icon
142
+ */
143
+ .sapphire-search-field__icon {
144
+ color: var(--sapphire-search-field-color-content-icon);
145
+ display: inline-flex; /* Not to take more height than the icon */
146
+ position: absolute;
147
+ margin-left: var(--sapphire-search-field-size-spacing-control-horizontal);
148
+ }
@@ -0,0 +1,14 @@
1
+ declare const styles: {
2
+ readonly "sapphire-search-field": string;
3
+ readonly "sapphire-search-field__input": string;
4
+ readonly "is-focus": string;
5
+ readonly "is-disabled": string;
6
+ readonly "sapphire-search-field__button": string;
7
+ readonly "js-hover": string;
8
+ readonly "is-hover": string;
9
+ readonly "is-active": string;
10
+ readonly "sapphire-search-field__input--empty": string;
11
+ readonly "sapphire-search-field__icon": string;
12
+ };
13
+ export = styles;
14
+
@@ -0,0 +1,140 @@
1
+ .sapphire-segmented-control {
2
+ background-color: var(--sapphire-segmented-control-color-tray);
3
+ border-radius: var(--sapphire-segmented-control-size-radius);
4
+ padding: var(--sapphire-segmented-control-size-spacing-tray);
5
+ display: inline-block;
6
+ height: var(--sapphire-segmented-control-size-height-medium);
7
+ box-sizing: border-box;
8
+ }
9
+
10
+ .sapphire-segmented-control__button-container {
11
+ display: inline-flex;
12
+ position: relative;
13
+ height: 100%;
14
+ width: 100%;
15
+ }
16
+
17
+ .sapphire-segmented-control__glider {
18
+ position: absolute;
19
+ top: 0;
20
+ left: 0;
21
+ height: 100%;
22
+ display: block;
23
+ background-color: var(--sapphire-segmented-control-color-glider);
24
+ box-shadow: var(--sapphire-global-shadow-small);
25
+ box-sizing: border-box;
26
+ z-index: 1;
27
+ border-radius: var(--sapphire-segmented-control-size-radius);
28
+ }
29
+
30
+ .sapphire-segmented-control__glider--with-transition {
31
+ transition: width var(--sapphire-segmented-control-time-transition)
32
+ ease-in-out,
33
+ left var(--sapphire-segmented-control-time-transition) ease-in-out;
34
+ }
35
+
36
+ .sapphire-segmented-control__button {
37
+ font-family: var(--sapphire-segmented-control-font-name);
38
+ font-weight: var(--sapphire-segmented-control-font-weight);
39
+ font-size: var(--sapphire-segmented-control-size-font-medium);
40
+ /* The below is meant to address a font rendering quirk in OSX where the text
41
+ * looks bolder than intended due to subpixel rendering. This quirk generally
42
+ * occurs for bold fonts on dark backgrounds but depending on the font, it
43
+ * can happen in other contexts as well.
44
+ *
45
+ * These do not do anything except in webkit browsers & firefox on OSX.
46
+ *
47
+ * For more details see:
48
+ * - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
49
+ * - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
50
+ */
51
+ -webkit-font-smoothing: antialiased;
52
+ -moz-osx-font-smoothing: grayscale;
53
+ flex: 1 1 auto;
54
+ box-sizing: content-box;
55
+ margin: 0;
56
+ border: 0;
57
+ height: 100%;
58
+ min-width: var(--sapphire-segmented-control-size-min-width-tab);
59
+ padding: 0 var(--sapphire-segmented-control-size-spacing-tab-horizontal);
60
+ background-color: transparent;
61
+ color: var(--sapphire-segmented-control-color-content-inactive);
62
+ cursor: pointer;
63
+ outline: none;
64
+ z-index: 2;
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ position: relative;
69
+ transition: color var(--sapphire-segmented-control-time-transition)
70
+ ease-in-out;
71
+ }
72
+
73
+ .sapphire-segmented-control__button--active {
74
+ color: var(--sapphire-segmented-control-color-content-active);
75
+ }
76
+
77
+ .sapphire-segmented-control__button--disabled {
78
+ opacity: var(--sapphire-segmented-control-opacity-disabled);
79
+ cursor: not-allowed;
80
+ }
81
+
82
+ .sapphire-segmented-control.focus-visible:focus-within
83
+ .sapphire-segmented-control__glider {
84
+ outline: var(--sapphire-segmented-control-size-focus-ring) solid
85
+ var(--sapphire-segmented-control-color-focus-ring);
86
+ }
87
+
88
+ /* Manual keyboard navigation */
89
+ .sapphire-segmented-control--manual-keyboard-activation.focus-visible
90
+ .sapphire-segmented-control__glider {
91
+ transition: none;
92
+ }
93
+
94
+ .sapphire-segmented-control--manual-keyboard-activation.focus-visible
95
+ .sapphire-segmented-control__button:focus {
96
+ outline: var(--sapphire-segmented-control-size-focus-ring) solid
97
+ var(--sapphire-segmented-control-color-focus-ring);
98
+ border-radius: var(--sapphire-segmented-control-size-radius);
99
+ }
100
+
101
+ .sapphire-segmented-control.focus-visible:focus-within.sapphire-segmented-control--manual-keyboard-activation
102
+ .sapphire-segmented-control__glider {
103
+ outline: none;
104
+ }
105
+
106
+ /* Sizes */
107
+ .sapphire-segmented-control--large {
108
+ height: var(--sapphire-segmented-control-size-height-large);
109
+ }
110
+
111
+ .sapphire-segmented-control--large .sapphire-segmented-control__button {
112
+ font-size: var(--sapphire-segmented-control-size-font-large);
113
+ }
114
+
115
+ .sapphire-segmented-control--small {
116
+ height: var(--sapphire-segmented-control-size-height-small);
117
+ }
118
+
119
+ .sapphire-segmented-control--small .sapphire-segmented-control__button {
120
+ font-size: var(--sapphire-segmented-control-size-font-small);
121
+ }
122
+
123
+ /* Radio-specific */
124
+ .sapphire-segmented-control__radio-input {
125
+ margin: 0;
126
+ overflow: visible;
127
+ position: absolute;
128
+ top: 0;
129
+ left: 0;
130
+ height: 100%;
131
+ width: 100%;
132
+ opacity: 0.0001; /** Some of the screen readers may ignore element with opacity:0 */
133
+ z-index: 1;
134
+ cursor: pointer;
135
+ }
136
+
137
+ .sapphire-segmented-control__button--disabled
138
+ .sapphire-segmented-control__radio-input {
139
+ cursor: not-allowed;
140
+ }
@@ -0,0 +1,16 @@
1
+ declare const styles: {
2
+ readonly "sapphire-segmented-control": string;
3
+ readonly "sapphire-segmented-control__button-container": string;
4
+ readonly "sapphire-segmented-control__glider": string;
5
+ readonly "sapphire-segmented-control__glider--with-transition": string;
6
+ readonly "sapphire-segmented-control__button": string;
7
+ readonly "sapphire-segmented-control__button--active": string;
8
+ readonly "sapphire-segmented-control__button--disabled": string;
9
+ readonly "focus-visible": string;
10
+ readonly "sapphire-segmented-control--manual-keyboard-activation": string;
11
+ readonly "sapphire-segmented-control--large": string;
12
+ readonly "sapphire-segmented-control--small": string;
13
+ readonly "sapphire-segmented-control__radio-input": string;
14
+ };
15
+ export = styles;
16
+
@@ -0,0 +1,166 @@
1
+ .sapphire-select {
2
+ font-family: var(--sapphire-select-font-name);
3
+ color: var(--sapphire-select-color-content);
4
+ width: var(--sapphire-select-size-width-control);
5
+ display: inline-block;
6
+ position: relative;
7
+
8
+ /* The below is meant to address a font rendering quirk in OSX where the text
9
+ * looks bolder than intended due to subpixel rendering. This quirk generally
10
+ * occurs for bold fonts on dark backgrounds but depending on the font, it
11
+ * can happen in other contexts as well.
12
+ *
13
+ * These do not do anything except in webkit browsers & firefox on OSX.
14
+ *
15
+ * For more details see:
16
+ * - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
17
+ * - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
18
+ */
19
+ -webkit-font-smoothing: antialiased;
20
+ -moz-osx-font-smoothing: grayscale;
21
+ }
22
+
23
+ .sapphire-select__button-container {
24
+ position: relative;
25
+ width: 100%;
26
+ }
27
+
28
+ .sapphire-select__button {
29
+ display: flex;
30
+ align-items: center;
31
+ height: var(--sapphire-select-size-height-field-default);
32
+ box-sizing: border-box;
33
+ cursor: pointer;
34
+ padding: 0 var(--sapphire-select-size-spacing-control-horizontal);
35
+ border: none;
36
+ background-color: var(--sapphire-select-color-background-field);
37
+ width: 100%;
38
+ outline: 0;
39
+ text-align: left;
40
+ color: inherit;
41
+ font-family: inherit;
42
+ box-shadow: inset 0px 0px 0px 1px
43
+ var(--sapphire-select-color-border-field-default);
44
+ border-radius: var(--sapphire-select-size-radius-field);
45
+ }
46
+
47
+ .sapphire-select__label-container {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: var(--sapphire-select-size-spacing-label-horizontal-default);
51
+ min-height: var(--sapphire-select-size-height-label);
52
+ margin-bottom: var(--sapphire-select-size-spacing-label-vertical-default);
53
+ }
54
+
55
+ .sapphire-select__label-text {
56
+ font-size: var(--sapphire-select-size-font-label-default);
57
+ font-weight: var(--sapphire-select-size-font-weight-label-default);
58
+ line-height: var(--sapphire-select-size-line-height-label-default);
59
+ }
60
+
61
+ .sapphire-select__value {
62
+ flex: 1 0 0;
63
+ min-width: 0;
64
+ font-size: var(--sapphire-select-size-font-content-default);
65
+ width: 100%;
66
+ font-weight: var(--sapphire-select-size-font-weight-item);
67
+ overflow: hidden;
68
+ text-overflow: ellipsis;
69
+ white-space: nowrap;
70
+ }
71
+
72
+ .sapphire-select__placeholder {
73
+ overflow: hidden;
74
+ text-overflow: ellipsis;
75
+ white-space: nowrap;
76
+ color: var(--sapphire-select-color-placeholder);
77
+ }
78
+
79
+ .sapphire-select__icon-container {
80
+ line-height: 0;
81
+ }
82
+
83
+ .sapphire-select__avatar {
84
+ display: flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ width: var(--sapphire-select-size-width-avatar);
88
+ height: var(--sapphire-select-size-height-avatar);
89
+ flex: 0 0 auto;
90
+ background-color: var(--sapphire-select-color-background-avatar);
91
+ border-radius: 50%;
92
+ overflow: hidden;
93
+ font-weight: var(--sapphire-select-size-font-weight-item);
94
+ color: var(--sapphire-select-color-content);
95
+ }
96
+
97
+ /*
98
+ * Search input
99
+ */
100
+ .sapphire-select__search-input {
101
+ all: inherit;
102
+ }
103
+ .sapphire-select__search-input::placeholder {
104
+ color: var(--sapphire-select-color-placeholder);
105
+ }
106
+
107
+ .sapphire-select__native-select {
108
+ position: absolute;
109
+ top: 0;
110
+ left: 0;
111
+ right: 0;
112
+ bottom: 0;
113
+ opacity: 0.01;
114
+ width: 100%;
115
+ z-index: 1;
116
+ }
117
+
118
+ /**
119
+ * Note
120
+ */
121
+
122
+ .sapphire-select__note {
123
+ color: var(--sapphire-select-color-note-default);
124
+ font-size: var(--sapphire-select-size-font-note-default);
125
+ line-height: var(--sapphire-select-size-line-height-note-default);
126
+ margin-top: var(--sapphire-select-size-spacing-note-vertical-default);
127
+ }
128
+
129
+ /**
130
+ * Error
131
+ */
132
+
133
+ .sapphire-select--error:not(.is-disabled) .sapphire-select__button {
134
+ box-shadow: inset 0px 0px 0px 1px
135
+ var(--sapphire-select-color-border-field-error);
136
+ }
137
+
138
+ .sapphire-select--error .sapphire-select__note {
139
+ color: var(--sapphire-select-color-note-error);
140
+ }
141
+
142
+ /*
143
+ * Focus
144
+ */
145
+
146
+ .sapphire-select:not(.is-disabled).is-focus .sapphire-select__button {
147
+ box-shadow: inset 0px 0px 0px var(--sapphire-select-size-focus-ring)
148
+ var(--sapphire-select-color-focus-ring);
149
+ }
150
+
151
+ .sapphire-select--error:not(.is-disabled).is-focus .sapphire-select__button {
152
+ box-shadow: inset 0px 0px 0px var(--sapphire-select-size-focus-ring)
153
+ var(--sapphire-select-color-border-field-error);
154
+ }
155
+
156
+ /**
157
+ * Disabled
158
+ */
159
+ .sapphire-select.is-disabled {
160
+ opacity: var(--sapphire-select-opacity-disabled);
161
+ cursor: not-allowed;
162
+ }
163
+
164
+ .sapphire-select.is-disabled .sapphire-select__button {
165
+ cursor: not-allowed;
166
+ }
@@ -0,0 +1,19 @@
1
+ declare const styles: {
2
+ readonly "sapphire-select": string;
3
+ readonly "sapphire-select__button-container": string;
4
+ readonly "sapphire-select__button": string;
5
+ readonly "sapphire-select__label-container": string;
6
+ readonly "sapphire-select__label-text": string;
7
+ readonly "sapphire-select__value": string;
8
+ readonly "sapphire-select__placeholder": string;
9
+ readonly "sapphire-select__icon-container": string;
10
+ readonly "sapphire-select__avatar": string;
11
+ readonly "sapphire-select__search-input": string;
12
+ readonly "sapphire-select__native-select": string;
13
+ readonly "sapphire-select__note": string;
14
+ readonly "sapphire-select--error": string;
15
+ readonly "is-disabled": string;
16
+ readonly "is-focus": string;
17
+ };
18
+ export = styles;
19
+
@@ -0,0 +1,52 @@
1
+ @keyframes skeletonPulse {
2
+ 0%,
3
+ 25% {
4
+ opacity: 1;
5
+ }
6
+ 60%,
7
+ 65% {
8
+ opacity: var(--sapphire-skeleton-opacity-faded);
9
+ }
10
+ 100% {
11
+ opacity: 1;
12
+ }
13
+ }
14
+
15
+ .sapphire-skeleton {
16
+ width: 100%;
17
+
18
+ background-color: var(--sapphire-skeleton-color-background);
19
+
20
+ animation: skeletonPulse infinite cubic-bezier(0.25, 0, 0.25, 1);
21
+ animation-duration: var(--sapphire-skeleton-time-animation);
22
+ }
23
+
24
+ .sapphire-skeleton--text {
25
+ /* Design spec required 14px height in context of 16px text
26
+ * We thus calculate that ratio from 1em to cater for
27
+ * cases where context has other size than 16px.
28
+ */
29
+ height: calc(var(--sapphire-skeleton-size-text-height-context-ratio) * 1em);
30
+ /* We're translating on y-axis half of the remaining space from above ratio up to 1
31
+ * Thus in this case pushing bar 1/16 down to leave that space above and below.
32
+ * Ie. center it vertically, but still according to font-size in context.
33
+ */
34
+ transform: translateY(
35
+ calc(
36
+ (1 - var(--sapphire-skeleton-size-text-height-context-ratio)) / 2 * 1em
37
+ )
38
+ );
39
+ /* For responding to text-align on parent */
40
+ display: inline-block;
41
+ border-radius: var(--sapphire-skeleton-size-text-radius);
42
+ }
43
+
44
+ .sapphire-skeleton--circle {
45
+ height: 100%;
46
+ border-radius: 50%;
47
+ }
48
+
49
+ .sapphire-skeleton--block {
50
+ height: 100%;
51
+ width: 100%;
52
+ }
@@ -0,0 +1,9 @@
1
+ declare const styles: {
2
+ readonly "sapphire-skeleton": string;
3
+ readonly "skeletonPulse": string;
4
+ readonly "sapphire-skeleton--text": string;
5
+ readonly "sapphire-skeleton--circle": string;
6
+ readonly "sapphire-skeleton--block": string;
7
+ };
8
+ export = styles;
9
+
@@ -0,0 +1,14 @@
1
+ declare const styles: {
2
+ readonly "sapphire-spinner": string;
3
+ readonly "rotate": string;
4
+ readonly "sapphire-spinner__track": string;
5
+ readonly "sapphire-spinner__accent": string;
6
+ readonly "sapphire-spinner--xxxs": string;
7
+ readonly "sapphire-spinner--xxs": string;
8
+ readonly "sapphire-spinner--xs": string;
9
+ readonly "sapphire-spinner--s": string;
10
+ readonly "sapphire-spinner--l": string;
11
+ readonly "sapphire-spinner--xl": string;
12
+ };
13
+ export = styles;
14
+
@@ -0,0 +1,19 @@
1
+ .sapphire-surface {
2
+ font-family: var(--sapphire-surface-font-name);
3
+ background-color: var(--sapphire-surface-color-background);
4
+ color: var(--sapphire-surface-color-content);
5
+
6
+ /* The below is meant to address a font rendering quirk in OSX where the text
7
+ * looks bolder than intended due to subpixel rendering. This quirk generally
8
+ * occurs for bold fonts on dark backgrounds but depending on the font, it
9
+ * can happen in other contexts as well.
10
+ *
11
+ * These do not do anything except in webkit browsers & firefox on OSX.
12
+ *
13
+ * For more details see:
14
+ * - https://azuredevops/Main/WCCJ/_git/sapphire/pullRequest/212710?path=%2Fpackages%2Fcss%2Fcomponents%2Fbutton%2Fbutton.module.css&discussionId=1507702&_a=files
15
+ * - https://usabilitypost.com/2012/11/05/stop-fixing-font-smoothing/
16
+ */
17
+ -webkit-font-smoothing: antialiased;
18
+ -moz-osx-font-smoothing: grayscale;
19
+ }
@@ -0,0 +1,5 @@
1
+ declare const styles: {
2
+ readonly "sapphire-surface": string;
3
+ };
4
+ export = styles;
5
+