@1024pix/pix-ui 41.1.2 → 42.0.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 (73) hide show
  1. package/addon/components/pix-button-base.js +3 -3
  2. package/addon/components/pix-button.hbs +31 -42
  3. package/addon/components/pix-input-code.hbs +0 -1
  4. package/addon/components/pix-input-password.hbs +1 -1
  5. package/addon/components/pix-input.hbs +2 -2
  6. package/addon/components/pix-progress-gauge.js +10 -2
  7. package/addon/components/pix-return-to.hbs +0 -2
  8. package/addon/components/pix-search-input.hbs +0 -2
  9. package/addon/components/pix-select.hbs +4 -5
  10. package/addon/components/pix-select.js +1 -3
  11. package/addon/styles/_pix-background-header.scss +3 -3
  12. package/addon/styles/_pix-banner.scss +29 -32
  13. package/addon/styles/_pix-block.scss +3 -3
  14. package/addon/styles/_pix-button-base.scss +98 -77
  15. package/addon/styles/_pix-button.scss +5 -5
  16. package/addon/styles/_pix-checkbox.scss +108 -105
  17. package/addon/styles/_pix-collapsible.scss +22 -13
  18. package/addon/styles/_pix-filter-banner.scss +15 -14
  19. package/addon/styles/_pix-filterable-and-searchable-select.scss +11 -21
  20. package/addon/styles/_pix-icon-button.scss +8 -9
  21. package/addon/styles/_pix-indicator-card.scss +28 -20
  22. package/addon/styles/_pix-input-code.scss +16 -24
  23. package/addon/styles/_pix-input-password.scss +17 -20
  24. package/addon/styles/_pix-input.scss +19 -33
  25. package/addon/styles/_pix-message.scss +16 -16
  26. package/addon/styles/_pix-modal.scss +21 -22
  27. package/addon/styles/_pix-multi-select.scss +27 -28
  28. package/addon/styles/_pix-pagination.scss +6 -6
  29. package/addon/styles/_pix-progress-gauge.scss +21 -21
  30. package/addon/styles/_pix-radio-button.scss +21 -16
  31. package/addon/styles/_pix-return-to.scss +21 -51
  32. package/addon/styles/_pix-search-input.scss +14 -14
  33. package/addon/styles/_pix-select.scss +44 -50
  34. package/addon/styles/_pix-selectable-tag.scss +24 -29
  35. package/addon/styles/_pix-sidebar.scss +16 -16
  36. package/addon/styles/_pix-stars.scss +14 -17
  37. package/addon/styles/_pix-tag.scss +48 -39
  38. package/addon/styles/_pix-textarea.scss +10 -11
  39. package/addon/styles/_pix-toggle.scss +11 -11
  40. package/addon/styles/_pix-tooltip.scss +29 -28
  41. package/addon/styles/addon.scss +1 -0
  42. package/addon/styles/component-state/_form.scss +101 -0
  43. package/addon/styles/component-state/index.scss +1 -0
  44. package/addon/styles/normalize-reset/_reset.scss +1 -1
  45. package/addon/styles/pix-design-tokens/_colors.scss +71 -10
  46. package/addon/styles/pix-design-tokens/_spacing.scss +12 -0
  47. package/addon/styles/pix-design-tokens/index.scss +0 -1
  48. package/app/stories/form.stories.js +7 -5
  49. package/app/stories/pix-background-header.stories.js +2 -0
  50. package/app/stories/pix-button-link.stories.js +11 -3
  51. package/app/stories/pix-button.stories.js +23 -25
  52. package/app/stories/pix-checkbox.stories.js +6 -10
  53. package/app/stories/pix-filter-banner.stories.js +21 -3
  54. package/app/stories/pix-filterable-and-searchable-select.stories.js +15 -17
  55. package/app/stories/pix-indicator-card.stories.js +18 -18
  56. package/app/stories/pix-modal.stories.js +12 -2
  57. package/app/stories/pix-multi-select.stories.js +56 -61
  58. package/app/stories/pix-progress-gauge.mdx +5 -1
  59. package/app/stories/pix-progress-gauge.stories.js +40 -5
  60. package/app/stories/pix-radio-button.stories.js +16 -16
  61. package/app/stories/pix-return-to.stories.js +3 -3
  62. package/app/stories/pix-search-input.stories.js +8 -10
  63. package/app/stories/pix-select.stories.js +55 -58
  64. package/app/stories/pix-selectable-tag.stories.js +8 -2
  65. package/app/stories/pix-sidebar.stories.js +9 -3
  66. package/app/stories/pix-stars.stories.js +1 -1
  67. package/app/stories/pix-tag.stories.js +2 -15
  68. package/app/stories/pix-toggle.stories.js +13 -21
  69. package/app/stories/pix-tooltip.stories.js +2 -0
  70. package/package.json +10 -7
  71. package/scripts/migrate-colors-scss-vars-to-css-vars.sh +120 -0
  72. package/scripts/migrate-spacing-scss-vars-to-css-vars.sh +23 -0
  73. package/addon/styles/pix-design-tokens/_form.scss +0 -99
@@ -13,24 +13,11 @@ export default {
13
13
  name: 'color',
14
14
  description: 'Couleur du tag',
15
15
  type: { name: 'number', required: false },
16
- table: { defaultValue: { summary: 'blue' } },
16
+ table: { defaultValue: { summary: 'primary' } },
17
17
  control: {
18
18
  type: 'select',
19
19
  },
20
- options: [
21
- 'blue',
22
- 'blue-light',
23
- 'green',
24
- 'green-light',
25
- 'grey',
26
- 'grey-light',
27
- 'purple',
28
- 'purple-light',
29
- 'orange',
30
- 'orange-light',
31
- 'yellow',
32
- 'yellow-light',
33
- ],
20
+ options: ['neutral', 'secondary', 'tertiary', 'success', 'error', 'orga'],
34
21
  },
35
22
  compact: {
36
23
  name: 'compact',
@@ -55,33 +55,25 @@ export default {
55
55
 
56
56
  export const Template = (args) => {
57
57
  return {
58
- template: hbs`
59
- <PixToggle
60
- @label={{this.label}}
61
- @onLabel={{this.onLabel}}
62
- @offLabel={{this.offLabel}}
63
- @toggled={{this.toggled}}
64
- @onChange={{this.onChange}}
65
- @inline={{this.inline}}
66
- @screenReaderOnly={{this.screenReaderOnly}}
67
- />
68
- `,
58
+ template: hbs`<PixToggle
59
+ @label={{this.label}}
60
+ @onLabel={{this.onLabel}}
61
+ @offLabel={{this.offLabel}}
62
+ @toggled={{this.toggled}}
63
+ @onChange={{this.onChange}}
64
+ @inline={{this.inline}}
65
+ @screenReaderOnly={{this.screenReaderOnly}}
66
+ />`,
69
67
  context: args,
70
68
  };
71
69
  };
72
70
 
73
71
  export const TemplateWithYields = (args) => {
74
72
  return {
75
- template: hbs`
76
- <PixToggle
77
- @label={{this.label}}
78
- @toggled={{this.toggled}}
79
- @onChange={{this.onChange}}
80
- >
81
- <:on><FaIcon @icon="sun" /></:on>
82
- <:off><FaIcon @icon="moon" /></:off>
83
- </PixToggle>
84
- `,
73
+ template: hbs`<PixToggle @label={{this.label}} @toggled={{this.toggled}} @onChange={{this.onChange}}>
74
+ <:on><FaIcon @icon='sun' /></:on>
75
+ <:off><FaIcon @icon='moon' /></:off>
76
+ </PixToggle>`,
85
77
  context: args,
86
78
  };
87
79
  };
@@ -103,6 +103,8 @@ const TemplateWithIconElement = (args) => {
103
103
  return {
104
104
  template: hbs`<PixTooltip @id={{this.id}} @isInline='true'>
105
105
  <:triggerElement>
106
+ {{! template-lint-disable no-inline-styles }}
107
+
106
108
  <button style='padding:0; margin-left:4px; line-height:0;' type='button'>
107
109
  <FaIcon class='external-link' @icon='up-right-from-square' />
108
110
  </button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "41.1.2",
3
+ "version": "42.0.0",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -70,10 +70,11 @@
70
70
  "@ember/test-helpers": "^3.0.0",
71
71
  "@embroider/macros": "^1.11.0",
72
72
  "@embroider/test-setup": "^3.0.0",
73
- "@fortawesome/ember-fontawesome": "^1.0.0",
73
+ "@fortawesome/ember-fontawesome": "^2.0.0",
74
74
  "@fortawesome/free-regular-svg-icons": "^6.2.1",
75
75
  "@fortawesome/free-solid-svg-icons": "^6.2.1",
76
76
  "@glimmer/component": "^1.1.2",
77
+ "@glimmer/syntax": "^0.87.0",
77
78
  "@glimmer/tracking": "^1.1.2",
78
79
  "@storybook/addon-a11y": "7.1.0",
79
80
  "@storybook/addon-controls": "7.1.0",
@@ -87,7 +88,7 @@
87
88
  "@storybook/theming": "7.1.0",
88
89
  "@testing-library/dom": "^8.20.0",
89
90
  "@testing-library/user-event": "^14.4.3",
90
- "chromatic": "^9.0.0",
91
+ "chromatic": "^10.0.0",
91
92
  "core-js": "^3.26.1",
92
93
  "ember-cli": "^4.8.0",
93
94
  "ember-cli-dependency-checker": "^3.3.1",
@@ -103,7 +104,7 @@
103
104
  "ember-sinon": "^5.0.0",
104
105
  "ember-source": "^4.0.1",
105
106
  "ember-source-channel-url": "^3.0.0",
106
- "ember-template-lint": "^4.18.2",
107
+ "ember-template-lint": "^5.0.0",
107
108
  "ember-template-lint-plugin-prettier": "^5.0.0",
108
109
  "ember-try": "^3.0.0-beta",
109
110
  "eslint": "^8.28.0",
@@ -122,9 +123,9 @@
122
123
  "qunit-dom": "^3.0.0",
123
124
  "sass": "^1.56.1",
124
125
  "storybook": "^7.1.0",
125
- "stylelint": "^15.0.0",
126
+ "stylelint": "^16.0.2",
126
127
  "stylelint-config-rational-order": "^0.1.2",
127
- "stylelint-config-standard-scss": "^11.0.0",
128
+ "stylelint-config-standard-scss": "^12.0.0",
128
129
  "webpack": "^5.75.0"
129
130
  },
130
131
  "bugs": {
@@ -138,7 +139,9 @@
138
139
  "files": [
139
140
  "addon/",
140
141
  "app/",
141
- "public/"
142
+ "public/",
143
+ "scripts/migrate-colors-scss-vars-to-css-vars.sh",
144
+ "scripts/migrate-spacing-scss-vars-to-css-vars.sh"
142
145
  ],
143
146
  "storybook-deployer": {
144
147
  "commitMessage": "Deploy Storybook [skip ci]"
@@ -0,0 +1,120 @@
1
+ #!/bin/bash -e
2
+
3
+ for f in $(find . -name '*.scss' -not -path './node_modules/*' -not -name '_colors.scss')
4
+ do
5
+ echo "parsing file" $f
6
+ sed -i '' -e 's/$pix-primary-5/var(--pix-primary-10)/' "$f"
7
+ sed -i '' -e 's/$pix-primary-10/var(--pix-primary-100)/' "$f"
8
+ sed -i '' -e 's/$pix-primary-20/var(--pix-primary-100)/' "$f"
9
+ sed -i '' -e 's/$pix-primary-30/var(--pix-primary-300)/' "$f"
10
+ sed -i '' -e 's/$pix-primary-40/var(--pix-primary-500)/' "$f"
11
+ sed -i '' -e 's/$pix-primary-60/var(--pix-primary-700)/' "$f"
12
+ sed -i '' -e 's/$pix-primary-70/var(--pix-primary-700)/' "$f"
13
+ sed -i '' -e 's/$pix-primary-80/var(--pix-primary-900)/' "$f"
14
+ sed -i '' -e 's/$pix-primary/var(--pix-primary-500)/' "$f"
15
+
16
+ sed -i '' -e 's/$pix-secondary-50/var(--pix-secondary-500)/' "$f"
17
+ sed -i '' -e 's/$pix-secondary-5/var(--pix-secondary-50)/' "$f"
18
+ sed -i '' -e 's/$pix-secondary-10/var(--pix-secondary-100)/' "$f"
19
+ sed -i '' -e 's/$pix-secondary-20/var(--pix-secondary-300)/' "$f"
20
+ sed -i '' -e 's/$pix-secondary-40/var(--pix-secondary-500)/' "$f"
21
+ sed -i '' -e 's/$pix-secondary-60/var(--pix-secondary-700)/' "$f"
22
+ sed -i '' -e 's/$pix-secondary-80/var(--pix-secondary-900)/' "$f"
23
+ sed -i '' -e 's/$pix-secondary/var(--pix-secondary-500)/' "$f"
24
+
25
+ sed -i '' -e 's/$pix-tertiary-50/var(--pix-tertiary-500)/' "$f"
26
+ sed -i '' -e 's/$pix-tertiary-5/var(--pix-tertiary-100)/' "$f"
27
+ sed -i '' -e 's/$pix-tertiary-10/var(--pix-tertiary-100)/' "$f"
28
+ sed -i '' -e 's/$pix-tertiary-20/var(--pix-tertiary-100)/' "$f"
29
+ sed -i '' -e 's/$pix-tertiary-30/var(--pix-tertiary-100)/' "$f"
30
+ sed -i '' -e 's/$pix-tertiary-60/var(--pix-tertiary-900)/' "$f"
31
+ sed -i '' -e 's/$pix-tertiary-70/var(--pix-tertiary-900)/' "$f"
32
+ sed -i '' -e 's/$pix-tertiary-80/var(--pix-tertiary-900)/' "$f"
33
+ sed -i '' -e 's/$pix-tertiary/var(--pix-tertiary-500)/' "$f"
34
+
35
+ sed -i '' -e 's/$pix-neutral-0/var(--pix-neutral-0)/' "$f"
36
+ sed -i '' -e 's/$pix-neutral-5/var(--pix-neutral-20)/' "$f"
37
+ sed -i '' -e 's/$pix-neutral-15/var(--pix-neutral-20)/' "$f"
38
+ sed -i '' -e 's/$pix-neutral-20/var(--pix-neutral-20)/' "$f"
39
+ sed -i '' -e 's/$pix-neutral-22/var(--pix-neutral-100)/' "$f"
40
+ sed -i '' -e 's/$pix-neutral-25/var(--pix-neutral-100)/' "$f"
41
+ sed -i '' -e 's/$pix-neutral-30/var(--pix-neutral-100)/' "$f"
42
+ sed -i '' -e 's/$pix-neutral-35/var(--pix-neutral-100)/' "$f"
43
+ sed -i '' -e 's/$pix-neutral-40/var(--pix-neutral-500)/' "$f"
44
+ sed -i '' -e 's/$pix-neutral-45/var(--pix-neutral-500)/' "$f"
45
+ sed -i '' -e 's/$pix-neutral-50/var(--pix-neutral-500)/' "$f"
46
+ sed -i '' -e 's/$pix-neutral-60/var(--pix-neutral-500)/' "$f"
47
+ sed -i '' -e 's/$pix-neutral-70/var(--pix-neutral-800)/' "$f"
48
+ sed -i '' -e 's/$pix-neutral-80/var(--pix-neutral-800)/' "$f"
49
+ sed -i '' -e 's/$pix-neutral-90/var(--pix-neutral-900)/' "$f"
50
+ sed -i '' -e 's/$pix-neutral-100/var(--pix-neutral-900)/' "$f"
51
+ sed -i '' -e 's/$pix-neutral-110/var(--pix-neutral-900)/' "$f"
52
+ sed -i '' -e 's/$pix-neutral-10/var(--pix-neutral-20)/' "$f"
53
+
54
+ sed -i '' -e 's/$pix-success-50/var(--pix-success-500)/' "$f"
55
+ sed -i '' -e 's/$pix-success-5/var(--pix-success-50)/' "$f"
56
+ sed -i '' -e 's/$pix-success-10/var(--pix-success-100)/' "$f"
57
+ sed -i '' -e 's/$pix-success-20/var(--pix-success-300)/' "$f"
58
+ sed -i '' -e 's/$pix-success-30/var(--pix-success-300)/' "$f"
59
+ sed -i '' -e 's/$pix-success-60/var(--pix-success-700)/' "$f"
60
+ sed -i '' -e 's/$pix-success-70/var(--pix-success-700)/' "$f"
61
+ sed -i '' -e 's/$pix-success-80/var(--pix-success-900)/' "$f"
62
+ sed -i '' -e 's/$pix-success/var(--pix-success-500)/' "$f"
63
+
64
+ sed -i '' -e 's/$pix-warning-50/var(--pix-warning-500)/' "$f"
65
+ sed -i '' -e 's/$pix-warning-5/var(--pix-warning-50)/' "$f"
66
+ sed -i '' -e 's/$pix-warning-10/var(--pix-warning-100)/' "$f"
67
+ sed -i '' -e 's/$pix-warning-20/var(--pix-warning-300)/' "$f"
68
+ sed -i '' -e 's/$pix-warning-30/var(--pix-warning-300)/' "$f"
69
+ sed -i '' -e 's/$pix-warning-40/var(--pix-warning-500)/' "$f"
70
+ sed -i '' -e 's/$pix-warning-60/var(--pix-warning-700)/' "$f"
71
+ sed -i '' -e 's/$pix-warning-70/var(--pix-warning-700)/' "$f"
72
+ sed -i '' -e 's/$pix-warning-80/var(--pix-warning-900)/' "$f"
73
+
74
+ sed -i '' -e 's/$pix-error-50/var(--pix-error-500)/' "$f"
75
+ sed -i '' -e 's/$pix-error-5/var(--pix-error-50)/' "$f"
76
+ sed -i '' -e 's/$pix-error-10/var(--pix-error-100)/' "$f"
77
+ sed -i '' -e 's/$pix-error-20/var(--pix-error-500)/' "$f"
78
+ sed -i '' -e 's/$pix-error-30/var(--pix-error-500)/' "$f"
79
+ sed -i '' -e 's/$pix-error-40/var(--pix-error-500)/' "$f"
80
+ sed -i '' -e 's/$pix-error-60/var(--pix-error-700)/' "$f"
81
+ sed -i '' -e 's/$pix-error-70/var(--pix-error-700)/' "$f"
82
+ sed -i '' -e 's/$pix-error-80/var(--pix-error-900)/' "$f"
83
+ sed -i '' -e 's/$pix-error-90/var(--pix-error-900)/' "$f"
84
+
85
+ sed -i '' -e 's/$pix-secondary-certif-50/var(--pix-certif-500)/' "$f"
86
+ sed -i '' -e 's/$pix-secondary-certif-5/var(--pix-certif-50)/' "$f"
87
+ sed -i '' -e 's/$pix-secondary-certif-10/var(--pix-certif-50)/' "$f"
88
+ sed -i '' -e 's/$pix-secondary-certif-20/var(--pix-certif-50)/' "$f"
89
+ sed -i '' -e 's/$pix-secondary-certif-30/var(--pix-certif-50)/' "$f"
90
+ sed -i '' -e 's/$pix-secondary-certif-60/var(--pix-certif-500)/' "$f"
91
+ sed -i '' -e 's/$pix-secondary-certif-70/var(--pix-certif-500)/' "$f"
92
+ sed -i '' -e 's/$pix-secondary-certif-80/var(--pix-certif-500)/' "$f"
93
+ sed -i '' -e 's/$pix-secondary-certif/var(--pix-certif-50)/' "$f"
94
+
95
+ sed -i '' -e 's/$pix-secondary-orga-50/var(--pix-orga-500)/' "$f"
96
+ sed -i '' -e 's/$pix-secondary-orga-5/var(--pix-orga-50)/' "$f"
97
+ sed -i '' -e 's/$pix-secondary-orga-10/var(--pix-orga-50)/' "$f"
98
+ sed -i '' -e 's/$pix-secondary-orga-20/var(--pix-orga-50)/' "$f"
99
+ sed -i '' -e 's/$pix-secondary-orga-30/var(--pix-orga-50)/' "$f"
100
+ sed -i '' -e 's/$pix-secondary-orga-60/var(--pix-orga-500)/' "$f"
101
+ sed -i '' -e 's/$pix-secondary-orga-70/var(--pix-orga-500)/' "$f"
102
+ sed -i '' -e 's/$pix-secondary-orga-80/var(--pix-orga-500)/' "$f"
103
+ sed -i '' -e 's/$pix-secondary-orga/var(--pix-orga-50)/' "$f"
104
+
105
+ sed -i '' -e 's/$pix-information-dark/var(--pix-information-dark)/' "$f"
106
+ sed -i '' -e 's/$pix-information-light/var(--pix-information-light)/' "$f"
107
+
108
+ sed -i '' -e 's/$pix-content-dark/var(--pix-content-dark)/' "$f"
109
+ sed -i '' -e 's/$pix-content-light/var(--pix-content-light)/' "$f"
110
+
111
+ sed -i '' -e 's/$pix-communication-dark/var(--pix-communication-dark)/' "$f"
112
+ sed -i '' -e 's/$pix-communication-light/var(--pix-communication-light)/' "$f"
113
+
114
+ sed -i '' -e 's/$pix-security-dark/var(--pix-security-dark)/' "$f"
115
+ sed -i '' -e 's/$pix-security-light/var(--pix-security-light)/' "$f"
116
+
117
+ sed -i '' -e 's/$pix-environment-dark/var(--pix-environment-dark)/' "$f"
118
+ sed -i '' -e 's/$pix-environment-light/var(--pix-environment-light)/' "$f"
119
+
120
+ done
@@ -0,0 +1,23 @@
1
+ #!/bin/bash -e
2
+
3
+ for f in $(find . -name '*.scss' -not -path './node_modules/*' -not -name '_spacing.scss')
4
+ do
5
+ echo "parsing file" $f
6
+ sed -i '' -e 's/$pix-spacing-xxs/var(--pix-spacing-1x)/g' "$f"
7
+ sed -i '' -e 's/$pix-spacing-xs/var(--pix-spacing-2x)/g' "$f"
8
+ sed -i '' -e 's/$pix-spacing-s/var(--pix-spacing-4x)/g' "$f"
9
+ sed -i '' -e 's/$pix-spacing-m/var(--pix-spacing-6x)/g' "$f"
10
+ sed -i '' -e 's/$pix-spacing-l/var(--pix-spacing-8x)/g' "$f"
11
+ sed -i '' -e 's/$pix-spacing-xl/var(--pix-spacing-10x)/g' "$f"
12
+ sed -i '' -e 's/$pix-spacing-xxl/var(--pix-spacing-12x)/g' "$f"
13
+
14
+ sed -i '' -e 's/\b4px/var(--pix-spacing-1x)/g' "$f"
15
+ sed -i '' -e 's/\b8px/var(--pix-spacing-2x)/g' "$f"
16
+ sed -i '' -e 's/\b12px/var(--pix-spacing-3x)/g' "$f"
17
+ sed -i '' -e 's/\b16px/var(--pix-spacing-4x)/g' "$f"
18
+ sed -i '' -e 's/\b24px/var(--pix-spacing-6x)/g' "$f"
19
+ sed -i '' -e 's/\b32px/var(--pix-spacing-8x)/g' "$f"
20
+ sed -i '' -e 's/\b40px/var(--pix-spacing-10x)/g' "$f"
21
+ sed -i '' -e 's/\b48px/var(--pix-spacing-12x)/g' "$f"
22
+
23
+ done
@@ -1,99 +0,0 @@
1
- @mixin hoverFormElement() {
2
- &:hover {
3
- background-color: $pix-neutral-5;
4
- box-shadow: inset 0 0 0 0.6px $pix-neutral-70;
5
- }
6
- }
7
-
8
- @mixin hoverFormElementDisabled() {
9
- &:hover {
10
- background-color: $pix-neutral-20;
11
- box-shadow: inset 0 0 0 0.6px $pix-neutral-70;
12
- }
13
- }
14
-
15
- @mixin formElementDisabled() {
16
- background-color: $pix-neutral-20;
17
- cursor: not-allowed;
18
- }
19
-
20
- @mixin focusFormElement() {
21
- &:focus {
22
- border-color: $pix-primary;
23
- outline: none;
24
- box-shadow: inset 0 0 0 0.6px $pix-primary;
25
- }
26
- }
27
-
28
- @mixin focusWithinFormElement() {
29
- &:focus-within {
30
- border-color: $pix-primary;
31
- outline: none;
32
- box-shadow: inset 0 0 0 0.6px $pix-primary;
33
- }
34
- }
35
-
36
- @mixin label() {
37
- display: block;
38
- margin-bottom: $pix-spacing-xxs;
39
- color: $pix-neutral-90;
40
- font-weight: $font-medium;
41
- font-size: 0.875rem;
42
- line-height: 1.375rem;
43
- }
44
-
45
- @mixin subLabel() {
46
- @include label();
47
-
48
- color: $pix-neutral-60;
49
- font-weight: $font-normal;
50
- font-size: 0.813rem;
51
- line-height: 1rem;
52
- }
53
-
54
- @mixin errorMessage() {
55
- margin-top: $pix-spacing-xxs;
56
- color: $pix-error-70;
57
- font-size: 0.75rem;
58
- }
59
-
60
- @mixin formElementInError() {
61
- border-color: $pix-error-70;
62
- box-shadow: inset 0 0 0 0.6px $pix-error-70;
63
- }
64
-
65
- @mixin formElementInSuccess() {
66
- border-color: $pix-success-60;
67
- box-shadow: inset 0 0 0 0.6px $pix-success-60;
68
- }
69
-
70
- @mixin input() {
71
- padding: 0 $pix-spacing-s 0 $pix-spacing-s;
72
- color: $pix-neutral-90;
73
- font-weight: $font-normal;
74
- font-size: 0.875rem;
75
- border-radius: $pix-spacing-xxs;
76
- }
77
-
78
- .pix-form__label {
79
- @include label();
80
-
81
- padding-bottom: 12px;
82
- }
83
-
84
- .pix-form__actions {
85
- display: flex;
86
- justify-content: center;
87
-
88
- & > .pix-button:first-child {
89
- margin-right: 10px;
90
- }
91
- }
92
-
93
- .mandatory-mark,
94
- .mandatory-mark[title] {
95
- color: $pix-error-70;
96
- text-decoration: none;
97
- border: none;
98
- cursor: help;
99
- }