@usecapsule/core-components 1.0.13 → 2.0.0-dev.dropdown
Sign up to get free protection for your applications and to get access to all the features.
- package/css/capsule-core.css +86 -41
- package/css/capsule-core.css.map +1 -1
- package/dist/capsule/capsule.esm.js +1 -1
- package/dist/capsule/capsule.esm.js.map +1 -1
- package/dist/capsule/index.esm.js +1 -1
- package/dist/capsule/index.esm.js.map +1 -1
- package/dist/capsule/p-0462f723.js +2 -0
- package/dist/capsule/p-0462f723.js.map +1 -0
- package/dist/capsule/p-0cab90fa.entry.js +2 -0
- package/dist/capsule/{p-1dc07cd7.entry.js.map → p-0cab90fa.entry.js.map} +1 -1
- package/dist/capsule/{p-11048392.entry.js → p-193ac141.entry.js} +2 -2
- package/dist/capsule/p-6fb7c4d1.js +3 -0
- package/dist/capsule/p-6fb7c4d1.js.map +1 -0
- package/dist/capsule/{p-62e7869a.entry.js → p-a95ec4df.entry.js} +2 -2
- package/dist/capsule/p-bea93fae.entry.js +29 -0
- package/dist/capsule/p-bea93fae.entry.js.map +1 -0
- package/dist/capsule/p-c2bf050b.js +2 -0
- package/dist/capsule/p-c2bf050b.js.map +1 -0
- package/dist/capsule/p-cb8dc0a4.entry.js +2 -0
- package/dist/capsule/p-d7be092d.entry.js +10 -0
- package/dist/capsule/p-d7be092d.entry.js.map +1 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js +12 -0
- package/dist/cjs/_commonjsHelpers-b3309d7b.js.map +1 -0
- package/dist/cjs/capsule.cjs.js +2 -2
- package/dist/cjs/constants-4bb85cc5.js +12 -0
- package/dist/cjs/constants-4bb85cc5.js.map +1 -0
- package/dist/cjs/{cpsl-alert_17.cjs.entry.js → cpsl-alert_18.cjs.entry.js} +3838 -537
- package/dist/cjs/cpsl-alert_18.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js +20129 -0
- package/dist/cjs/cpsl-animation.cjs.entry.js.map +1 -0
- package/dist/cjs/cpsl-col.cjs.entry.js +2 -2
- package/dist/cjs/cpsl-grid.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-info-box.cjs.entry.js +3 -3
- package/dist/cjs/cpsl-info-box.cjs.entry.js.map +1 -1
- package/dist/cjs/cpsl-row.cjs.entry.js +2 -2
- package/dist/cjs/{index-2a026742.js → index-3fccb5b4.js} +24 -3
- package/dist/cjs/index-3fccb5b4.js.map +1 -0
- package/dist/cjs/index.cjs.js +358 -0
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/assets/icons/capsule-rings-dark.svg +34 -0
- package/dist/collection/assets/icons/capsule.svg +4 -4
- package/dist/collection/assets/icons/chevron-up.svg +3 -0
- package/dist/collection/assets/icons/hero-email.svg +8 -30
- package/dist/collection/assets/icons/hero-lock.svg +4 -34
- package/dist/collection/assets/icons/hero-passkey.svg +9 -17
- package/dist/collection/assets/icons/hero-phone.svg +4 -15
- package/dist/collection/assets/icons/hero-wallet.svg +5 -44
- package/dist/collection/assets/icons/index.js +5 -2
- package/dist/collection/assets/icons/index.js.map +1 -1
- package/dist/collection/assets/icons/more-login-options.svg +10 -10
- package/dist/collection/assets/icons/plus-circle.svg +5 -0
- package/dist/collection/assets/icons/wallet.svg +5 -0
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/cpsl-alert/cpsl-alert.js +1 -1
- package/dist/collection/components/cpsl-animation/cpsl-animation.css +17 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.js +102 -0
- package/dist/collection/components/cpsl-animation/cpsl-animation.js.map +1 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js +29 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js +37 -0
- package/dist/collection/components/cpsl-animation/test/cpsl-animation.spec.js.map +1 -0
- package/dist/collection/components/cpsl-button/cpsl-button.css +3 -0
- package/dist/collection/components/cpsl-button/cpsl-button.js +2 -2
- package/dist/collection/components/cpsl-button/cpsl-button.js.map +1 -1
- package/dist/collection/components/cpsl-code-input/cpsl-code-input.js +1 -1
- package/dist/collection/components/cpsl-col/cpsl-col.js +1 -1
- package/dist/collection/components/cpsl-divider/cpsl-divider.js +1 -1
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.css +88 -0
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js +113 -0
- package/dist/collection/components/cpsl-dropdown/cpsl-dropdown.js.map +1 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js +29 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.e2e.js.map +1 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js +37 -0
- package/dist/collection/components/cpsl-dropdown/test/cpsl-dropdown.spec.js.map +1 -0
- package/dist/collection/components/cpsl-grid/cpsl-grid.js +2 -2
- package/dist/collection/components/cpsl-icon/cpsl-icon.css +14 -0
- package/dist/collection/components/cpsl-icon/cpsl-icon.js +2 -3
- package/dist/collection/components/cpsl-icon/cpsl-icon.js.map +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.css +1 -1
- package/dist/collection/components/cpsl-info-box/cpsl-info-box.js +1 -1
- package/dist/collection/components/cpsl-input/cpsl-input.css +12 -7
- package/dist/collection/components/cpsl-input/cpsl-input.js +8 -6
- package/dist/collection/components/cpsl-input/cpsl-input.js.map +1 -1
- package/dist/collection/components/cpsl-modal/cpsl-modal.css +46 -4
- package/dist/collection/components/cpsl-modal/cpsl-modal.js +341 -24
- package/dist/collection/components/cpsl-modal/cpsl-modal.js.map +1 -1
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js +30 -13
- package/dist/collection/components/cpsl-overlay/cpsl-overlay.js.map +1 -1
- package/dist/collection/components/cpsl-pill/cpsl-pill.css +3 -3
- package/dist/collection/components/cpsl-pill/cpsl-pill.js +1 -1
- package/dist/collection/components/cpsl-progress-indicator/cpsl-progress-indicator.css +3 -3
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.css +3 -3
- package/dist/collection/components/cpsl-qr-code/cpsl-qr-code.js +1 -1
- package/dist/collection/components/cpsl-row/cpsl-row.js +1 -1
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.css +11 -9
- package/dist/collection/components/cpsl-slide-button/cpsl-slide-button.js +3 -3
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.css +2 -2
- package/dist/collection/components/cpsl-spinner/cpsl-spinner.js +2 -2
- package/dist/collection/components/cpsl-tab/cpsl-tab.js +1 -1
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.css +17 -16
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js +2 -2
- package/dist/collection/components/cpsl-tabs/cpsl-tabs.js.map +1 -1
- package/dist/collection/components/cpsl-text/cpsl-text.css +101 -0
- package/dist/collection/components/cpsl-text/cpsl-text.js +110 -1
- package/dist/collection/components/cpsl-text/cpsl-text.js.map +1 -1
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.css +3 -0
- package/dist/collection/components/cpsl-tile-button/cpsl-tile-button.js +2 -2
- package/dist/collection/constants.js +6 -0
- package/dist/collection/constants.js.map +1 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/interface.js.map +1 -1
- package/dist/collection/utils/theme/generateBorderRadii.js +56 -0
- package/dist/collection/utils/theme/generateBorderRadii.js.map +1 -0
- package/dist/collection/utils/theme/generateFont.js +28 -0
- package/dist/collection/utils/theme/generateFont.js.map +1 -0
- package/dist/collection/utils/theme/generatePalette.js +46 -0
- package/dist/collection/utils/theme/generatePalette.js.map +1 -0
- package/dist/collection/utils/theme/generateTheme.js +11 -0
- package/dist/collection/utils/theme/generateTheme.js.map +1 -0
- package/dist/collection/utils/theme/utils.js +21 -0
- package/dist/collection/utils/theme/utils.js.map +1 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js +9 -0
- package/dist/esm/_commonjsHelpers-1789f0cf.js.map +1 -0
- package/dist/esm/capsule.js +3 -3
- package/dist/esm/constants-7b49abd5.js +9 -0
- package/dist/esm/constants-7b49abd5.js.map +1 -0
- package/dist/esm/{cpsl-alert_17.entry.js → cpsl-alert_18.entry.js} +3837 -537
- package/dist/esm/cpsl-alert_18.entry.js.map +1 -0
- package/dist/esm/cpsl-animation.entry.js +20125 -0
- package/dist/esm/cpsl-animation.entry.js.map +1 -0
- package/dist/esm/cpsl-col.entry.js +2 -2
- package/dist/esm/cpsl-grid.entry.js +3 -3
- package/dist/esm/cpsl-info-box.entry.js +3 -3
- package/dist/esm/cpsl-info-box.entry.js.map +1 -1
- package/dist/esm/cpsl-row.entry.js +2 -2
- package/dist/esm/{index-7c2f5cb9.js → index-f00e090c.js} +24 -3
- package/dist/esm/index-f00e090c.js.map +1 -0
- package/dist/esm/index.js +355 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/assets/icons/index.d.ts +4 -1
- package/dist/types/components/cpsl-animation/cpsl-animation.d.ts +9 -0
- package/dist/types/components/cpsl-dropdown/cpsl-dropdown.d.ts +25 -0
- package/dist/types/components/cpsl-modal/cpsl-modal.d.ts +26 -5
- package/dist/types/components/cpsl-overlay/cpsl-overlay.d.ts +2 -2
- package/dist/types/components/cpsl-text/cpsl-text.d.ts +4 -0
- package/dist/types/components.d.ts +170 -13
- package/dist/types/constants.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/interface.d.ts +137 -0
- package/dist/types/utils/theme/generateBorderRadii.d.ts +2 -0
- package/dist/types/utils/theme/generateFont.d.ts +2 -0
- package/dist/types/utils/theme/generatePalette.d.ts +7 -0
- package/dist/types/utils/theme/generateTheme.d.ts +2 -0
- package/dist/types/utils/theme/utils.d.ts +5 -0
- package/package.json +5 -3
- package/dist/capsule/p-0e2fbb7f.entry.js +0 -20
- package/dist/capsule/p-0e2fbb7f.entry.js.map +0 -1
- package/dist/capsule/p-1dc07cd7.entry.js +0 -2
- package/dist/capsule/p-5c020abe.entry.js +0 -2
- package/dist/capsule/p-9647dd63.js +0 -3
- package/dist/capsule/p-9647dd63.js.map +0 -1
- package/dist/cjs/cpsl-alert_17.cjs.entry.js.map +0 -1
- package/dist/cjs/index-2a026742.js.map +0 -1
- package/dist/collection/assets/icons/more-login-options-dark.svg +0 -13
- package/dist/esm/cpsl-alert_17.entry.js.map +0 -1
- package/dist/esm/index-7c2f5cb9.js.map +0 -1
- /package/dist/capsule/{p-11048392.entry.js.map → p-193ac141.entry.js.map} +0 -0
- /package/dist/capsule/{p-62e7869a.entry.js.map → p-a95ec4df.entry.js.map} +0 -0
- /package/dist/capsule/{p-5c020abe.entry.js.map → p-cb8dc0a4.entry.js.map} +0 -0
- /package/dist/types/Users/{taylorbosch → vinay}/Documents/GitHub/Capsule/component-library/core/.stencil/scripts/buildIconLibrary.d.ts +0 -0
package/css/capsule-core.css
CHANGED
@@ -66,47 +66,6 @@ body.backdrop-no-scroll {
|
|
66
66
|
:root {
|
67
67
|
--cpsl-color-black: #000000;
|
68
68
|
--cpsl-color-white: #ffffff;
|
69
|
-
--cpsl-color-modal-surface-main: #ffffff;
|
70
|
-
--cpsl-color-modal-surface-footer: #fafafa;
|
71
|
-
--cpsl-color-modal-border: #fafafa;
|
72
|
-
--cpsl-color-tile-button-surface-default: #ffffff;
|
73
|
-
--cpsl-color-tile-button-surface-hover: #fafafa;
|
74
|
-
--cpsl-color-tile-button-border: #f5f5f5;
|
75
|
-
--cpsl-color-input-surface-disabled: #fafafa;
|
76
|
-
--cpsl-color-input-surface-default: #ffffff;
|
77
|
-
--cpsl-color-input-border-placeholder: #e0e0e0;
|
78
|
-
--cpsl-color-input-border-active: #808080;
|
79
|
-
--cpsl-color-input-border-error: #f04438;
|
80
|
-
--cpsl-color-primary-button-surface-default: #1f1f1f;
|
81
|
-
--cpsl-color-primary-button-surface-hover: #3f3f3f;
|
82
|
-
--cpsl-color-primary-button-surface-pressed: #121212;
|
83
|
-
--cpsl-color-primary-button-surface-disabled: #c0c0c0;
|
84
|
-
--cpsl-color-primary-button-border-default: #3f3f3f;
|
85
|
-
--cpsl-color-primary-button-border-disabled: #c0c0c0;
|
86
|
-
--cpsl-color-primary-button-outline: #c0c0c0;
|
87
|
-
--cpsl-color-secondary-button-surface-default: #fafafa;
|
88
|
-
--cpsl-color-secondary-button-surface-hover: #e0e0e0;
|
89
|
-
--cpsl-color-secondary-button-surface-pressed: #c0c0c0;
|
90
|
-
--cpsl-color-secondary-button-surface-disabled: #c0c0c0;
|
91
|
-
--cpsl-color-secondary-button-border-default: #e0e0e0;
|
92
|
-
--cpsl-color-secondary-button-border-disabled: #c0c0c0;
|
93
|
-
--cpsl-color-secondary-button-outline: #c0c0c0;
|
94
|
-
--cpsl-color-divider: #e0e0e0;
|
95
|
-
--cpsl-color-text-primary: #121212;
|
96
|
-
--cpsl-color-text-secondary: #a2a2a2;
|
97
|
-
--cpsl-color-text-subtle: #c0c0c0;
|
98
|
-
--cpsl-color-text-inverted: #fafafa;
|
99
|
-
--cpsl-color-text-error: #f04438;
|
100
|
-
--cpsl-color-background-primary: #ffffff;
|
101
|
-
--cpsl-color-background-subtle: #fafafa;
|
102
|
-
--cpsl-color-foreground-primary: #121212;
|
103
|
-
--cpsl-color-foreground-secondary: #3f3f3f;
|
104
|
-
--cpsl-color-foreground-ternary: #808080;
|
105
|
-
--cpsl-color-foreground-quarternary: #c0c0c0;
|
106
|
-
--cpsl-color-foreground-quinary: #e0e0e0;
|
107
|
-
--cpsl-color-foreground-senary: #fafafa;
|
108
|
-
--cpsl-color-alert-surface-error: #fee4e2;
|
109
|
-
--cpsl-color-alert-border-error: #f97066;
|
110
69
|
--cpsl-color-alpha-black-2: rgba(0, 0, 0, 0.0196078431);
|
111
70
|
--cpsl-color-alpha-black-4: rgba(0, 0, 0, 0.0392156863);
|
112
71
|
--cpsl-color-alpha-black-8: rgba(0, 0, 0, 0.0784313725);
|
@@ -119,8 +78,82 @@ body.backdrop-no-scroll {
|
|
119
78
|
--cpsl-color-alpha-black-50: rgba(0, 0, 0, 0.5019607843);
|
120
79
|
--cpsl-color-alpha-white-4: rgba(255, 255, 255, 0.0392156863);
|
121
80
|
--cpsl-color-alpha-white-25: rgba(255, 255, 255, 0.2509803922);
|
81
|
+
--cpsl-color-background-0: rgb(255, 255, 255);
|
82
|
+
--cpsl-color-background-8: rgb(235, 235, 235);
|
83
|
+
--cpsl-color-background-16: rgb(214, 214, 214);
|
84
|
+
--cpsl-color-background-32: rgb(173, 173, 173);
|
85
|
+
--cpsl-color-background-48: rgb(133, 133, 133);
|
86
|
+
--cpsl-color-background-64: rgb(92, 92, 92);
|
87
|
+
--cpsl-color-background-80: rgb(51, 51, 51);
|
88
|
+
--cpsl-color-background-96: rgb(10, 10, 10);
|
89
|
+
--cpsl-color-foreground-0: rgb(31, 31, 31);
|
90
|
+
--cpsl-color-foreground-8: rgb(49, 49, 49);
|
91
|
+
--cpsl-color-foreground-16: rgb(67, 67, 67);
|
92
|
+
--cpsl-color-foreground-32: rgb(103, 103, 103);
|
93
|
+
--cpsl-color-foreground-48: rgb(139, 139, 139);
|
94
|
+
--cpsl-color-foreground-64: rgb(174, 174, 174);
|
95
|
+
--cpsl-color-foreground-80: rgb(210, 210, 210);
|
96
|
+
--cpsl-color-foreground-96: rgb(246, 246, 246);
|
97
|
+
--cpsl-color-text-primary: var(--cpsl-color-foreground-0);
|
98
|
+
--cpsl-color-text-secondary: var(--cpsl-color-background-64);
|
99
|
+
--cpsl-color-text-subtle: var(--cpsl-color-background-64);
|
100
|
+
--cpsl-color-text-inverted: var(--cpsl-color-foreground-96);
|
101
|
+
--cpsl-color-text-error: #f04438;
|
102
|
+
--cpsl-color-modal-surface-main: var(--cpsl-color-background-0);
|
103
|
+
--cpsl-color-modal-surface-footer: var(--cpsl-color-background-8);
|
104
|
+
--cpsl-color-modal-border: var(--cpsl-color-background-8);
|
105
|
+
--cpsl-color-input-surface-disabled: var(--cpsl-color-background-8);
|
106
|
+
--cpsl-color-input-surface-default: var(--cpsl-color-background-0);
|
107
|
+
--cpsl-color-input-border-placeholder: var(--cpsl-color-foreground-48);
|
108
|
+
--cpsl-color-input-border-active: var(--cpsl-color-foreground-16);
|
109
|
+
--cpsl-color-input-border-error: #f04438;
|
110
|
+
--cpsl-color-tile-button-surface-default: var(--cpsl-color-background-0);
|
111
|
+
--cpsl-color-tile-button-surface-hover: var(--cpsl-color-background-8);
|
112
|
+
--cpsl-color-tile-button-surface-pressed: var(--cpsl-color-background-48);
|
113
|
+
--cpsl-color-tile-button-border: var(--cpsl-color-background-8);
|
114
|
+
--cpsl-color-primary-button-surface-default: var(--cpsl-color-foreground-0);
|
115
|
+
--cpsl-color-primary-button-surface-hover: var(--cpsl-color-foreground-16);
|
116
|
+
--cpsl-color-primary-button-surface-pressed: var(--cpsl-color-foreground-32);
|
117
|
+
--cpsl-color-primary-button-surface-disabled: var(--cpsl-color-background-32);
|
118
|
+
--cpsl-color-primary-button-border-default: var(--cpsl-color-foreground-16);
|
119
|
+
--cpsl-color-primary-button-border-disabled: var(--cpsl-color-background-32);
|
120
|
+
--cpsl-color-primary-button-outline: var(--cpsl-color-foreground-32);
|
121
|
+
--cpsl-color-secondary-button-surface-default: var(--cpsl-color-background-0);
|
122
|
+
--cpsl-color-secondary-button-surface-hover: var(--cpsl-color-background-16);
|
123
|
+
--cpsl-color-secondary-button-surface-pressed: var(--cpsl-color-background-32);
|
124
|
+
--cpsl-color-secondary-button-surface-disabled: var(--cpsl-color-foreground-32);
|
125
|
+
--cpsl-color-secondary-button-border-default: var(--cpsl-color-background-16);
|
126
|
+
--cpsl-color-secondary-button-border-disabled: var(--cpsl-color-foreground-32);
|
127
|
+
--cpsl-color-secondary-button-outline: var(--cpsl-color-background-32);
|
128
|
+
--cpsl-color-divider: var(--cpsl-color-background-32);
|
129
|
+
--cpsl-color-spinner-path: var(--cpsl-color-background-32);
|
130
|
+
--cpsl-color-spinner-circle: var(--cpsl-color-foreground-0);
|
131
|
+
--cpsl-color-pill-text: var(--cpsl-color-text-secondary);
|
132
|
+
--cpsl-color-pill-container-background: var(--cpsl-color-background-0);
|
133
|
+
--cpsl-color-pill-container-border: var(--cpsl-color-background-8);
|
134
|
+
--cpsl-color-progressIndicator-active: var(--cpsl-color-foreground-0);
|
135
|
+
--cpsl-color-progressIndicator-next: var(--cpsl-color-background-32);
|
136
|
+
--cpsl-color-progressIndicator-previous: var(--cpsl-color-background-64);
|
137
|
+
--cpsl-color-qr-fill: var(--cpsl-color-black);
|
138
|
+
--cpsl-color-qr-background: var(--cpsl-color-white);
|
139
|
+
--cpsl-color-qr-border: var(--cpsl-color-background-32);
|
140
|
+
--cpsl-color-slideButton-slider-container-start-background: var(--cpsl-color-background-0);
|
141
|
+
--cpsl-color-slideButton-slider-container-end-background: var(--cpsl-color-foreground-0);
|
142
|
+
--cpsl-color-slideButton-slider-container-start-border: var(--cpsl-color-background-32);
|
143
|
+
--cpsl-color-slideButton-slider-container-end-border: var(--cpsl-color-foreground-32);
|
144
|
+
--cpsl-color-slideButton-slider-border: var(--cpsl-color-foreground-32);
|
145
|
+
--cpsl-color-slideButton-slider-background: var(--cpsl-color-foreground-0);
|
146
|
+
--cpsl-color-slideButton-slider-text: var(--cpsl-color-text-inverted);
|
147
|
+
--cpsl-color-slideButton-start-text: var(--cpsl-color-text-secondary);
|
148
|
+
--cpsl-color-slideButton-end-text: var(--cpsl-color-text-inverted);
|
149
|
+
--cpsl-color-tabs-border: var(--cpsl-color-background-32);
|
150
|
+
--cpsl-color-tabs-background: var(--cpsl-color-background-8);
|
151
|
+
--cpsl-color-tabs-slider-background: var(--cpsl-color-background-0);
|
152
|
+
--cpsl-color-alert-surface-error: #fee4e2;
|
153
|
+
--cpsl-color-alert-border-error: #f97066;
|
122
154
|
--cpsl-border-radius-input: 8px;
|
123
155
|
--cpsl-border-radius-alert: 8px;
|
156
|
+
--cpsl-border-radius-tabs: 8px;
|
124
157
|
--cpsl-border-radius-primary-button: 8px;
|
125
158
|
--cpsl-border-radius-secondary-button: 8px;
|
126
159
|
--cpsl-border-radius-tile-button: 8px;
|
@@ -128,6 +161,18 @@ body.backdrop-no-scroll {
|
|
128
161
|
--cpsl-border-radius-pill: 1000px;
|
129
162
|
--cpsl-border-radius-qr-code: 24px;
|
130
163
|
--cpsl-border-radius-info-box: 8px;
|
164
|
+
--cpsl-font-size-body-2xs: clamp(8px, 0.625rem, 15px);
|
165
|
+
--cpsl-font-size-body-xs: clamp(9.6px, 0.75rem, 18px);
|
166
|
+
--cpsl-font-size-body-s: clamp(11.2px, 0.875rem, 21px);
|
167
|
+
--cpsl-font-size-body-m: clamp(12.8px, 1rem, 24px);
|
168
|
+
--cpsl-font-size-body-l: clamp(16px, 1.25rem, 30px);
|
169
|
+
--cpsl-font-size-body-xl: clamp(19.2px, 1.5rem, 36px);
|
170
|
+
--cpsl-font-size-heading-xs: clamp(19.2px, 1.5rem, 36px);
|
171
|
+
--cpsl-font-size-heading-s: clamp(25.6px, 2rem, 48px);
|
172
|
+
--cpsl-font-size-heading-m: clamp(32px, 2.5rem, 60px);
|
173
|
+
--cpsl-font-size-heading-l: clamp(44.8px, 3.5rem, 84px);
|
174
|
+
--cpsl-font-size-heading-xl: clamp(51.2px, 4rem, 96px);
|
175
|
+
--cpsl-font-size-heading-2xl: clamp(57.6px, 4.5rem, 108px);
|
131
176
|
}
|
132
177
|
|
133
178
|
@keyframes spin {
|
package/css/capsule-core.css.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/themes/capsule.functions.font.scss","../src/themes/capsule.mixins.scss","../src/css/capsule-core.scss"],"names":[],"mappings":"AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AC/CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACZA;EACE;EACA;EACA;;;AAGF;EACE;;;AAuBF;EAbE;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAUA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;;AAYF;EACE;IACE;IACA;;EAEF;IACE;IACA;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;EAEF;IACE;;EAEF;IACE","file":"capsule-core.css","sourcesContent":["@use 'sass:math';\n\n$baselineSize: 16px !default;\n$baselineUnit: 1rem !default;\n\n/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font($size, $unit: $baselineUnit) {\n @return (math.div($size, $baselineSize)) * $unit;\n}\n\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font-max($size, $maxScale, $unit: $baselineUnit) {\n $baseScale: dynamic-font($size, $unit);\n $maxScale: $size * $maxScale;\n\n @return min($baseScale, $maxScale);\n}\n\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font-min($minScale, $size, $unit: $baselineUnit) {\n $baseScale: dynamic-font($size, $unit);\n $minScale: $size * $minScale;\n\n @return max($minScale, $baseScale);\n}\n\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font-clamp($minScale, $baseSize, $maxScale, $unit: $baselineUnit) {\n $baseScale: dynamic-font($baseSize, $unit);\n $maxScale: $baseSize * $maxScale;\n $minScale: $baseSize * $minScale;\n\n @return clamp($minScale, $baseScale, $maxScale);\n}\n","/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n@mixin tablet-viewport() {\n @media screen and (min-width: 768px) {\n @content;\n }\n}\n\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n@mixin mobile-viewport() {\n @media screen and (max-width: 767px) {\n @content;\n }\n}\n\n@mixin input-cover() {\n @include position(0, null, null, 0);\n @include margin(0);\n\n position: absolute;\n\n width: 100%;\n height: 100%;\n\n border: 0;\n background: transparent;\n cursor: pointer;\n\n appearance: none;\n outline: none;\n\n &::-moz-focus-inner {\n border: 0;\n }\n}\n\n@mixin visually-hidden() {\n position: absolute;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100%;\n\n margin: 0;\n padding: 0;\n\n border: 0;\n outline: 0;\n clip: rect(0 0 0 0);\n\n opacity: 0;\n overflow: hidden;\n\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n@mixin text-inherit() {\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-indent: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n}\n\n@mixin button-state() {\n @include position(0, 0, 0, 0);\n\n position: absolute;\n\n content: '';\n\n opacity: 0;\n}\n\n// Get the key from a map based on the index\n@function index-to-key($map, $index) {\n $keys: map-keys($map);\n\n @return nth($keys, $index);\n}\n\n// Breakpoint Mixins\n// ---------------------------------------------------------------------------------\n\n// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$screen-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// ---------------------------------------------------------------------------------\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $screen-breakpoints) {\n $min: map-get($breakpoints, $name);\n\n @return if($name != index-to-key($breakpoints, 1), $min, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $screen-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, '', '-#{$name}');\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $screen-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $screen-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Maximum breakpoint width. Null for the smallest (first) breakpoint.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n//\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\t// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\t// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $screen-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - 0.02, null);\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $screen-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Text Direction - ltr / rtl\n//\n// CSS defaults to use the ltr css, and adds [dir=rtl] selectors\n// to override ltr defaults.\n// ----------------------------------------------------------\n\n@mixin multi-dir() {\n @content;\n\n // $root: #{&};\n // @at-root [dir] {\n // #{$root} {\n // @content;\n // }\n // }\n}\n\n@mixin rtl() {\n $root: #{&};\n\n $rootSplit: str-split($root, ',');\n $selectors: #{add-root-selector($root, '[dir=rtl]')};\n $selectorsSplit: str-split($selectors, ',');\n\n $hostContextSelectors: ();\n $restSelectors: ();\n $dirSelectors: ();\n\n // Selectors must be split into individual selectors in case the browser\n // doesn't support a specific selector.\n // For example, Firefox and Safari doesn't support `:host-context()`.\n // If an invalid selector is used, then the entire group of selectors\n // will be ignored.\n // @link https://www.w3.org/TR/selectors-3/#grouping\n @each $selector in $selectorsSplit {\n // Group the selectors back into a single selector to optimize the output.\n @if str-index($selector, ':host-context') {\n $hostContextSelectors: append($hostContextSelectors, $selector, comma);\n } @else {\n // Group the selectors back into a single selector to optimize the output.\n $restSelectors: append($restSelectors, $selector, comma);\n }\n }\n\n // Supported by Chrome.\n @if length($hostContextSelectors) > 0 {\n @at-root #{$hostContextSelectors} {\n @content;\n }\n }\n\n // Supported by all browsers.\n @if length($restSelectors) > 0 {\n @at-root #{$restSelectors} {\n @content;\n }\n }\n\n // If browser can support `:dir()`, then add the `:dir()` selectors.\n @supports selector(:dir(rtl)) {\n // Adding :dir() in case the browser doesn't support `:host-context()` and does support `:dir()`.\n // `:host-context()` is added:\n // - through the `add-root-selector()` function.\n // - first so that it takes precedence over `:dir()`.\n // For example,\n // - Firefox doesn't support `:host-context()`, but does support `:dir()`.\n // - Safari doesn't support `:host-context()`, but Safari 16.4+ supports `:dir()`\n // @link https://webkit.org/blog/13966/webkit-features-in-safari-16-4/\n // -- However, there is a Webkit bug on v16 that prevents `:dir()` from working when\n // -- the app direction is changed dynamically. v17+ works fine.\n // -- @link https://bugs.webkit.org/show_bug.cgi?id=257133\n\n // Supported by Firefox.\n @at-root #{add-root-selector($root, \":dir(rtl)\", false)} {\n @content;\n }\n }\n}\n\n@mixin ltr() {\n @content;\n}\n\n// SVG Background Image Mixin\n// @param {string} $svg\n// ----------------------------------------------------------\n@mixin svg-background-image($svg, $flip-rtl: false) {\n $url: url-encode($svg);\n $viewBox: str-split(str-extract($svg, \"viewBox='\", \"'\"), ' ');\n\n @if $flip-rtl != true or $viewBox == null {\n @include multi-dir() {\n background-image: url('data:image/svg+xml;charset=utf-8,#{$url}');\n }\n } @else {\n $transform: \"transform='translate(#{nth($viewBox, 3)}, 0) scale(-1, 1)'\";\n $flipped-url: $svg;\n $flipped-url: str-replace($flipped-url, '<path', '<path #{$transform}');\n $flipped-url: str-replace($flipped-url, '<line', '<line #{$transform}');\n $flipped-url: str-replace($flipped-url, '<polygon', '<polygon #{$transform}');\n $flipped-url: url-encode($flipped-url);\n\n @include ltr() {\n background-image: url('data:image/svg+xml;charset=utf-8,#{$url}');\n }\n @include rtl() {\n background-image: url('data:image/svg+xml;charset=utf-8,#{$flipped-url}');\n }\n }\n}\n\n// Add property horizontal\n// @param {string} $start\n// @param {string} $end\n// ----------------------------------------------------------\n@mixin property-horizontal($prop, $start, $end: $start) {\n @if $start == 0 and $end == 0 {\n #{$prop}-left: $start;\n #{$prop}-right: $end;\n } @else {\n -webkit-#{$prop}-start: $start;\n #{$prop}-inline-start: $start;\n -webkit-#{$prop}-end: $end;\n #{$prop}-inline-end: $end;\n }\n}\n\n// Add property for all directions\n// @param {string} $prop\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// @param {boolean} $content include content or use default\n// ----------------------------------------------------------\n@mixin property($prop, $top, $end: $top, $bottom: $top, $start: $end) {\n @include property-horizontal($prop, $start, $end);\n #{$prop}-top: $top;\n #{$prop}-bottom: $bottom;\n}\n\n// Add padding horizontal\n// @param {string} $start\n// @param {string} $end\n// ----------------------------------------------------------\n@mixin padding-horizontal($start, $end: $start) {\n @include property-horizontal(padding, $start, $end);\n}\n\n// Add padding for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin padding($top, $end: $top, $bottom: $top, $start: $end) {\n @include property(padding, $top, $end, $bottom, $start);\n}\n\n// Add margin horizontal\n// @param {string} $start\n// @param {string} $end\n// ----------------------------------------------------------\n@mixin margin-horizontal($start, $end: $start) {\n @include property-horizontal(margin, $start, $end);\n}\n\n// Add margin for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin margin($top, $end: $top, $bottom: $top, $start: $end) {\n @include property(margin, $top, $end, $bottom, $start);\n}\n\n// Add position horizontal\n// @param {string} $start - amount to position start\n// @param {string} $end - amount to left: 0; end\n// ----------------------------------------------------------\n@mixin position-horizontal($start: null, $end: null) {\n @if $start == $end {\n @include multi-dir() {\n left: $start;\n right: $end;\n }\n } @else {\n @at-root {\n @supports (inset-inline-start: 0) {\n & {\n inset-inline-start: $start;\n inset-inline-end: $end;\n }\n }\n }\n\n // TODO FW-3766\n @at-root {\n @supports not (inset-inline-start: 0) {\n & {\n @include ltr() {\n left: $start;\n right: $end;\n }\n @include rtl() {\n left: unset;\n right: unset;\n\n left: $end;\n right: $start;\n }\n }\n }\n }\n }\n}\n\n// Add position for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin position($top: null, $end: null, $bottom: null, $start: null) {\n @include position-horizontal($start, $end);\n top: $top;\n bottom: $bottom;\n}\n\n// Add border for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin border($top, $end: $top, $bottom: $top, $start: $end) {\n @include property(border, $top, $end, $bottom, $start);\n}\n\n// Add border radius for all directions\n// @param {string} $top-start\n// @param {string} $top-end\n// @param {string} $bottom-end\n// @param {string} $bottom-start\n// ----------------------------------------------------------\n@mixin border-radius($top-start, $top-end: $top-start, $bottom-end: $top-start, $bottom-start: $top-end) {\n @if $top-start == $top-end and $top-start == $bottom-end and $top-start == $bottom-start {\n @include multi-dir() {\n border-radius: $top-start;\n }\n } @else {\n @include ltr() {\n border-top-left-radius: $top-start;\n border-top-right-radius: $top-end;\n border-bottom-right-radius: $bottom-end;\n border-bottom-left-radius: $bottom-start;\n }\n\n @include rtl() {\n border-top-left-radius: $top-end;\n border-top-right-radius: $top-start;\n border-bottom-right-radius: $bottom-start;\n border-bottom-left-radius: $bottom-end;\n }\n }\n}\n\n// Add direction for all directions\n// @param {string} $dir - Direction on LTR\n@mixin direction($dir) {\n $other-dir: null;\n\n @if $dir == ltr {\n $other-dir: rtl;\n } @else {\n $other-dir: ltr;\n }\n\n @include ltr() {\n direction: $dir;\n }\n @include rtl() {\n direction: $other-dir;\n }\n}\n\n// Add float for all directions\n// @param {string} $side\n// @param {string} $decorator - !important\n@mixin float($side, $decorator: null) {\n @if $side == start {\n @include ltr() {\n float: left $decorator;\n }\n @include rtl() {\n float: right $decorator;\n }\n } @else if $side == end {\n @include ltr() {\n float: right $decorator;\n }\n @include rtl() {\n float: left $decorator;\n }\n } @else {\n @include multi-dir() {\n float: $side $decorator;\n }\n }\n}\n\n@mixin background-position($horizontal, $horizontal-amount: null, $vertical: null, $vertical-amount: null) {\n @if $horizontal == start or $horizontal == end {\n $horizontal-ltr: null;\n $horizontal-rtl: null;\n @if $horizontal == start {\n $horizontal-ltr: left;\n $horizontal-rtl: right;\n } @else {\n $horizontal-ltr: right;\n $horizontal-rtl: left;\n }\n\n @include ltr() {\n background-position: $horizontal-ltr $horizontal-amount $vertical $vertical-amount;\n }\n @include rtl() {\n background-position: $horizontal-rtl $horizontal-amount $vertical $vertical-amount;\n }\n } @else {\n @include multi-dir() {\n background-position: $horizontal $horizontal-amount $vertical $vertical-amount;\n }\n }\n}\n\n@mixin transform-origin($x-axis, $y-axis: null) {\n @if $x-axis == start {\n @include ltr() {\n transform-origin: left $y-axis;\n }\n @include rtl() {\n transform-origin: right $y-axis;\n }\n } @else if $x-axis == end {\n @include ltr() {\n transform-origin: right $y-axis;\n }\n @include rtl() {\n transform-origin: left $y-axis;\n }\n } @else if $x-axis == left or $x-axis == right {\n @include multi-dir() {\n transform-origin: $x-axis $y-axis;\n }\n } @else {\n @include ltr() {\n transform-origin: $x-axis $y-axis;\n }\n @include rtl() {\n transform-origin: calc(100% - #{$x-axis}) $y-axis;\n }\n }\n}\n\n// Add transform for all directions\n// @param {string} $transforms - comma separated list of transforms\n@mixin transform($transforms...) {\n $extra: null;\n\n $x: null;\n $ltr-translate: null;\n $rtl-translate: null;\n\n @each $transform in $transforms {\n @if (str-index($transform, translate3d)) {\n $transform: str-replace($transform, 'translate3d(');\n $transform: str-replace($transform, ')');\n\n $coordinates: str-split($transform, ',');\n\n $x: nth($coordinates, 1);\n $y: nth($coordinates, 2);\n $z: nth($coordinates, 3);\n\n $ltr-translate: translate3d($x, $y, $z);\n $rtl-translate: translate3d(calc(-1 * #{$x}), $y, $z);\n } @else {\n @if $extra == null {\n $extra: $transform;\n } @else {\n $extra: $extra $transform;\n }\n }\n }\n\n @if $x == '0' or $x == null {\n @include multi-dir() {\n transform: $ltr-translate $extra;\n }\n } @else {\n @include ltr() {\n transform: $ltr-translate $extra;\n }\n\n @include rtl() {\n transform: $rtl-translate $extra;\n }\n }\n}\n","@import '../themes/capsule.globals.scss';\n\n// Capsule Font Family\n// --------------------------------------------------\n\nhtml {\n --cpsl-default-font: 'Helvetica', sans-serif;\n --cpsl-default-dynamic-font: -apple-system-body;\n --cpsl-font-family: var(--cpsl-default-font);\n}\n\nbody.backdrop-no-scroll {\n overflow: hidden;\n}\n\n// Capsule Colors\n// --------------------------------------------------\n// Generates the default color vars\n\n@mixin generate-color($color-name) {\n $value: map-get($colors, $color-name);\n\n --cpsl-color-#{$color-name}: #{$value};\n}\n\n// Capsule Border Radii\n// --------------------------------------------------\n// Generates the default border vars\n\n@mixin generate-border-radius($border-radius-name) {\n $value: map-get($borderRadii, $border-radius-name);\n\n --cpsl-border-radius-#{$border-radius-name}: #{$value};\n}\n\n:root {\n @each $color-name, $value in $colors {\n @include generate-color($color-name);\n }\n @each $border-radius-name, $value in $borderRadii {\n @include generate-border-radius($border-radius-name);\n }\n}\n\n@keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n -webkit-transform: rotate(360deg);\n }\n}\n@-moz-keyframes spin {\n 100% {\n -moz-transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 50% {\n -webkit-transform: rotate(180deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n}\n"]}
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/themes/capsule.functions.font.scss","../src/themes/capsule.mixins.scss","../src/css/capsule-core.scss"],"names":[],"mappings":"AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AC/CA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACZA;EACE;EACA;EACA;;;AAGF;EACE;;;AAiCF;EAvBE;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAUA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAUA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;;AAeF;EACE;IACE;IACA;;EAEF;IACE;IACA;;;AAGJ;EACE;IACE;;;AAGJ;EACE;IACE;;EAEF;IACE;;EAEF;IACE","file":"capsule-core.css","sourcesContent":["@use 'sass:math';\n\n$baselineSize: 16px !default;\n$baselineUnit: 1rem !default;\n\n/**\n * Convert a font size to a dynamic font size.\n * Fonts that participate in Dynamic Type should use\n * dynamic font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param unit (optional) - The unit to convert to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font($size, $unit: $baselineUnit) {\n @return (math.div($size, $baselineSize)) * $unit;\n}\n\n/**\n * Convert a font size to a dynamic font size but impose\n * a maximum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font-max($size, $maxScale, $unit: $baselineUnit) {\n $baseScale: dynamic-font($size, $unit);\n $maxScale: $size * $maxScale;\n\n @return min($baseScale, $maxScale);\n}\n\n/**\n * Convert a font size to a dynamic font size but impose\n * a minimum font size.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font-min($minScale, $size, $unit: $baselineUnit) {\n $baseScale: dynamic-font($size, $unit);\n $minScale: $size * $minScale;\n\n @return max($minScale, $baseScale);\n}\n\n/**\n * Convert a font size to a dynamic font size but impose\n * maximum and minimum font sizes.\n * @param size - The initial font size including the unit (i.e. px or pt)\n * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).\n * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).\n * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to\n * convert to a unit other than $baselineUnit.\n */\n@function dynamic-font-clamp($minScale, $baseSize, $maxScale, $unit: $baselineUnit) {\n $baseScale: dynamic-font($baseSize, $unit);\n $maxScale: $baseSize * $maxScale;\n $minScale: $baseSize * $minScale;\n\n @return clamp($minScale, $baseScale, $maxScale);\n}\n","/**\n * A heuristic that applies CSS to tablet\n * viewports.\n *\n * Usage:\n * @include tablet-viewport() {\n * :host {\n * background-color: green;\n * }\n * }\n */\n@mixin tablet-viewport() {\n @media screen and (min-width: 768px) {\n @content;\n }\n}\n\n/**\n * A heuristic that applies CSS to mobile\n * viewports (i.e. phones, not tablets).\n *\n * Usage:\n * @include mobile-viewport() {\n * :host {\n * background-color: blue;\n * }\n * }\n */\n@mixin mobile-viewport() {\n @media screen and (max-width: 767px) {\n @content;\n }\n}\n\n@mixin input-cover() {\n @include position(0, null, null, 0);\n @include margin(0);\n\n position: absolute;\n\n width: 100%;\n height: 100%;\n\n border: 0;\n background: transparent;\n cursor: pointer;\n\n appearance: none;\n outline: none;\n\n &::-moz-focus-inner {\n border: 0;\n }\n}\n\n@mixin visually-hidden() {\n position: absolute;\n\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n\n width: 100%;\n height: 100%;\n\n margin: 0;\n padding: 0;\n\n border: 0;\n outline: 0;\n clip: rect(0 0 0 0);\n\n opacity: 0;\n overflow: hidden;\n\n -webkit-appearance: none;\n -moz-appearance: none;\n}\n\n@mixin text-inherit() {\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-weight: inherit;\n letter-spacing: inherit;\n text-decoration: inherit;\n text-indent: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n text-align: inherit;\n white-space: inherit;\n color: inherit;\n}\n\n@mixin button-state() {\n @include position(0, 0, 0, 0);\n\n position: absolute;\n\n content: '';\n\n opacity: 0;\n}\n\n// Get the key from a map based on the index\n@function index-to-key($map, $index) {\n $keys: map-keys($map);\n\n @return nth($keys, $index);\n}\n\n// Breakpoint Mixins\n// ---------------------------------------------------------------------------------\n\n// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$screen-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// ---------------------------------------------------------------------------------\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $screen-breakpoints) {\n $min: map-get($breakpoints, $name);\n\n @return if($name != index-to-key($breakpoints, 1), $min, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash infront.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $screen-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, '', '-#{$name}');\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $screen-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $screen-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Maximum breakpoint width. Null for the smallest (first) breakpoint.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n//\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\t// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\t// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $screen-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - 0.02, null);\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $screen-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Text Direction - ltr / rtl\n//\n// CSS defaults to use the ltr css, and adds [dir=rtl] selectors\n// to override ltr defaults.\n// ----------------------------------------------------------\n\n@mixin multi-dir() {\n @content;\n\n // $root: #{&};\n // @at-root [dir] {\n // #{$root} {\n // @content;\n // }\n // }\n}\n\n@mixin rtl() {\n $root: #{&};\n\n $rootSplit: str-split($root, ',');\n $selectors: #{add-root-selector($root, '[dir=rtl]')};\n $selectorsSplit: str-split($selectors, ',');\n\n $hostContextSelectors: ();\n $restSelectors: ();\n $dirSelectors: ();\n\n // Selectors must be split into individual selectors in case the browser\n // doesn't support a specific selector.\n // For example, Firefox and Safari doesn't support `:host-context()`.\n // If an invalid selector is used, then the entire group of selectors\n // will be ignored.\n // @link https://www.w3.org/TR/selectors-3/#grouping\n @each $selector in $selectorsSplit {\n // Group the selectors back into a single selector to optimize the output.\n @if str-index($selector, ':host-context') {\n $hostContextSelectors: append($hostContextSelectors, $selector, comma);\n } @else {\n // Group the selectors back into a single selector to optimize the output.\n $restSelectors: append($restSelectors, $selector, comma);\n }\n }\n\n // Supported by Chrome.\n @if length($hostContextSelectors) > 0 {\n @at-root #{$hostContextSelectors} {\n @content;\n }\n }\n\n // Supported by all browsers.\n @if length($restSelectors) > 0 {\n @at-root #{$restSelectors} {\n @content;\n }\n }\n\n // If browser can support `:dir()`, then add the `:dir()` selectors.\n @supports selector(:dir(rtl)) {\n // Adding :dir() in case the browser doesn't support `:host-context()` and does support `:dir()`.\n // `:host-context()` is added:\n // - through the `add-root-selector()` function.\n // - first so that it takes precedence over `:dir()`.\n // For example,\n // - Firefox doesn't support `:host-context()`, but does support `:dir()`.\n // - Safari doesn't support `:host-context()`, but Safari 16.4+ supports `:dir()`\n // @link https://webkit.org/blog/13966/webkit-features-in-safari-16-4/\n // -- However, there is a Webkit bug on v16 that prevents `:dir()` from working when\n // -- the app direction is changed dynamically. v17+ works fine.\n // -- @link https://bugs.webkit.org/show_bug.cgi?id=257133\n\n // Supported by Firefox.\n @at-root #{add-root-selector($root, \":dir(rtl)\", false)} {\n @content;\n }\n }\n}\n\n@mixin ltr() {\n @content;\n}\n\n// SVG Background Image Mixin\n// @param {string} $svg\n// ----------------------------------------------------------\n@mixin svg-background-image($svg, $flip-rtl: false) {\n $url: url-encode($svg);\n $viewBox: str-split(str-extract($svg, \"viewBox='\", \"'\"), ' ');\n\n @if $flip-rtl != true or $viewBox == null {\n @include multi-dir() {\n background-image: url('data:image/svg+xml;charset=utf-8,#{$url}');\n }\n } @else {\n $transform: \"transform='translate(#{nth($viewBox, 3)}, 0) scale(-1, 1)'\";\n $flipped-url: $svg;\n $flipped-url: str-replace($flipped-url, '<path', '<path #{$transform}');\n $flipped-url: str-replace($flipped-url, '<line', '<line #{$transform}');\n $flipped-url: str-replace($flipped-url, '<polygon', '<polygon #{$transform}');\n $flipped-url: url-encode($flipped-url);\n\n @include ltr() {\n background-image: url('data:image/svg+xml;charset=utf-8,#{$url}');\n }\n @include rtl() {\n background-image: url('data:image/svg+xml;charset=utf-8,#{$flipped-url}');\n }\n }\n}\n\n// Add property horizontal\n// @param {string} $start\n// @param {string} $end\n// ----------------------------------------------------------\n@mixin property-horizontal($prop, $start, $end: $start) {\n @if $start == 0 and $end == 0 {\n #{$prop}-left: $start;\n #{$prop}-right: $end;\n } @else {\n -webkit-#{$prop}-start: $start;\n #{$prop}-inline-start: $start;\n -webkit-#{$prop}-end: $end;\n #{$prop}-inline-end: $end;\n }\n}\n\n// Add property for all directions\n// @param {string} $prop\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// @param {boolean} $content include content or use default\n// ----------------------------------------------------------\n@mixin property($prop, $top, $end: $top, $bottom: $top, $start: $end) {\n @include property-horizontal($prop, $start, $end);\n #{$prop}-top: $top;\n #{$prop}-bottom: $bottom;\n}\n\n// Add padding horizontal\n// @param {string} $start\n// @param {string} $end\n// ----------------------------------------------------------\n@mixin padding-horizontal($start, $end: $start) {\n @include property-horizontal(padding, $start, $end);\n}\n\n// Add padding for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin padding($top, $end: $top, $bottom: $top, $start: $end) {\n @include property(padding, $top, $end, $bottom, $start);\n}\n\n// Add margin horizontal\n// @param {string} $start\n// @param {string} $end\n// ----------------------------------------------------------\n@mixin margin-horizontal($start, $end: $start) {\n @include property-horizontal(margin, $start, $end);\n}\n\n// Add margin for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin margin($top, $end: $top, $bottom: $top, $start: $end) {\n @include property(margin, $top, $end, $bottom, $start);\n}\n\n// Add position horizontal\n// @param {string} $start - amount to position start\n// @param {string} $end - amount to left: 0; end\n// ----------------------------------------------------------\n@mixin position-horizontal($start: null, $end: null) {\n @if $start == $end {\n @include multi-dir() {\n left: $start;\n right: $end;\n }\n } @else {\n @at-root {\n @supports (inset-inline-start: 0) {\n & {\n inset-inline-start: $start;\n inset-inline-end: $end;\n }\n }\n }\n\n // TODO FW-3766\n @at-root {\n @supports not (inset-inline-start: 0) {\n & {\n @include ltr() {\n left: $start;\n right: $end;\n }\n @include rtl() {\n left: unset;\n right: unset;\n\n left: $end;\n right: $start;\n }\n }\n }\n }\n }\n}\n\n// Add position for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin position($top: null, $end: null, $bottom: null, $start: null) {\n @include position-horizontal($start, $end);\n top: $top;\n bottom: $bottom;\n}\n\n// Add border for all directions\n// @param {string} $top\n// @param {string} $end\n// @param {string} $bottom\n// @param {string} $start\n// ----------------------------------------------------------\n@mixin border($top, $end: $top, $bottom: $top, $start: $end) {\n @include property(border, $top, $end, $bottom, $start);\n}\n\n// Add border radius for all directions\n// @param {string} $top-start\n// @param {string} $top-end\n// @param {string} $bottom-end\n// @param {string} $bottom-start\n// ----------------------------------------------------------\n@mixin border-radius($top-start, $top-end: $top-start, $bottom-end: $top-start, $bottom-start: $top-end) {\n @if $top-start == $top-end and $top-start == $bottom-end and $top-start == $bottom-start {\n @include multi-dir() {\n border-radius: $top-start;\n }\n } @else {\n @include ltr() {\n border-top-left-radius: $top-start;\n border-top-right-radius: $top-end;\n border-bottom-right-radius: $bottom-end;\n border-bottom-left-radius: $bottom-start;\n }\n\n @include rtl() {\n border-top-left-radius: $top-end;\n border-top-right-radius: $top-start;\n border-bottom-right-radius: $bottom-start;\n border-bottom-left-radius: $bottom-end;\n }\n }\n}\n\n// Add direction for all directions\n// @param {string} $dir - Direction on LTR\n@mixin direction($dir) {\n $other-dir: null;\n\n @if $dir == ltr {\n $other-dir: rtl;\n } @else {\n $other-dir: ltr;\n }\n\n @include ltr() {\n direction: $dir;\n }\n @include rtl() {\n direction: $other-dir;\n }\n}\n\n// Add float for all directions\n// @param {string} $side\n// @param {string} $decorator - !important\n@mixin float($side, $decorator: null) {\n @if $side == start {\n @include ltr() {\n float: left $decorator;\n }\n @include rtl() {\n float: right $decorator;\n }\n } @else if $side == end {\n @include ltr() {\n float: right $decorator;\n }\n @include rtl() {\n float: left $decorator;\n }\n } @else {\n @include multi-dir() {\n float: $side $decorator;\n }\n }\n}\n\n@mixin background-position($horizontal, $horizontal-amount: null, $vertical: null, $vertical-amount: null) {\n @if $horizontal == start or $horizontal == end {\n $horizontal-ltr: null;\n $horizontal-rtl: null;\n @if $horizontal == start {\n $horizontal-ltr: left;\n $horizontal-rtl: right;\n } @else {\n $horizontal-ltr: right;\n $horizontal-rtl: left;\n }\n\n @include ltr() {\n background-position: $horizontal-ltr $horizontal-amount $vertical $vertical-amount;\n }\n @include rtl() {\n background-position: $horizontal-rtl $horizontal-amount $vertical $vertical-amount;\n }\n } @else {\n @include multi-dir() {\n background-position: $horizontal $horizontal-amount $vertical $vertical-amount;\n }\n }\n}\n\n@mixin transform-origin($x-axis, $y-axis: null) {\n @if $x-axis == start {\n @include ltr() {\n transform-origin: left $y-axis;\n }\n @include rtl() {\n transform-origin: right $y-axis;\n }\n } @else if $x-axis == end {\n @include ltr() {\n transform-origin: right $y-axis;\n }\n @include rtl() {\n transform-origin: left $y-axis;\n }\n } @else if $x-axis == left or $x-axis == right {\n @include multi-dir() {\n transform-origin: $x-axis $y-axis;\n }\n } @else {\n @include ltr() {\n transform-origin: $x-axis $y-axis;\n }\n @include rtl() {\n transform-origin: calc(100% - #{$x-axis}) $y-axis;\n }\n }\n}\n\n// Add transform for all directions\n// @param {string} $transforms - comma separated list of transforms\n@mixin transform($transforms...) {\n $extra: null;\n\n $x: null;\n $ltr-translate: null;\n $rtl-translate: null;\n\n @each $transform in $transforms {\n @if (str-index($transform, translate3d)) {\n $transform: str-replace($transform, 'translate3d(');\n $transform: str-replace($transform, ')');\n\n $coordinates: str-split($transform, ',');\n\n $x: nth($coordinates, 1);\n $y: nth($coordinates, 2);\n $z: nth($coordinates, 3);\n\n $ltr-translate: translate3d($x, $y, $z);\n $rtl-translate: translate3d(calc(-1 * #{$x}), $y, $z);\n } @else {\n @if $extra == null {\n $extra: $transform;\n } @else {\n $extra: $extra $transform;\n }\n }\n }\n\n @if $x == '0' or $x == null {\n @include multi-dir() {\n transform: $ltr-translate $extra;\n }\n } @else {\n @include ltr() {\n transform: $ltr-translate $extra;\n }\n\n @include rtl() {\n transform: $rtl-translate $extra;\n }\n }\n}\n","@import '../themes/capsule.globals.scss';\n\n// Capsule Font Family\n// --------------------------------------------------\n\nhtml {\n --cpsl-default-font: 'Helvetica', sans-serif;\n --cpsl-default-dynamic-font: -apple-system-body;\n --cpsl-font-family: var(--cpsl-default-font);\n}\n\nbody.backdrop-no-scroll {\n overflow: hidden;\n}\n\n// Capsule Colors\n// --------------------------------------------------\n// Generates the default color vars\n\n@mixin generate-color($color-name) {\n $value: map-get($colors, $color-name);\n\n --cpsl-color-#{$color-name}: #{$value};\n}\n\n// Capsule Border Radii\n// --------------------------------------------------\n// Generates the default border vars\n\n@mixin generate-border-radius($border-radius-name) {\n $value: map-get($borderRadii, $border-radius-name);\n\n --cpsl-border-radius-#{$border-radius-name}: #{$value};\n}\n\n// Capsule Font Sizes\n// --------------------------------------------------\n// Generates the default font sizes\n\n@mixin generate-font-size($font-size-name) {\n $value: map-get($fontSizes, $font-size-name);\n\n --cpsl-font-size-#{$font-size-name}: #{dynamic-font-clamp(0.8, $value, 1.5)};\n}\n\n:root {\n @each $color-name, $value in $colors {\n @include generate-color($color-name);\n }\n @each $border-radius-name, $value in $borderRadii {\n @include generate-border-radius($border-radius-name);\n }\n @each $font-size-name, $value in $fontSizes {\n @include generate-font-size($font-size-name);\n }\n}\n\n@keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n -webkit-transform: rotate(360deg);\n }\n}\n@-moz-keyframes spin {\n 100% {\n -moz-transform: rotate(360deg);\n }\n}\n@-webkit-keyframes spin {\n 0% {\n -webkit-transform: rotate(0deg);\n }\n 50% {\n -webkit-transform: rotate(180deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n }\n}\n"]}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{p as e,b as t}from"./p-
|
1
|
+
import{p as e,b as t}from"./p-6fb7c4d1.js";export{s as setNonce}from"./p-6fb7c4d1.js";import{g as l}from"./p-e1255160.js";const o=()=>{const t=import.meta.url;const s={};if(t!==""){s.resourcesUrl=new URL(".",t).href}return e(s)};o().then((async e=>{await l();return t([["p-d7be092d",[[1,"cpsl-animation",{src:[1],replayAnimation:[64]}]]],["p-a95ec4df",[[1,"cpsl-col",{offset:[1],offsetXs:[1,"offset-xs"],offsetSm:[1,"offset-sm"],offsetMd:[1,"offset-md"],offsetLg:[1,"offset-lg"],offsetXl:[1,"offset-xl"],pull:[1],pullXs:[1,"pull-xs"],pullSm:[1,"pull-sm"],pullMd:[1,"pull-md"],pullLg:[1,"pull-lg"],pullXl:[1,"pull-xl"],push:[1],pushXs:[1,"push-xs"],pushSm:[1,"push-sm"],pushMd:[1,"push-md"],pushLg:[1,"push-lg"],pushXl:[1,"push-xl"],size:[1],sizeXs:[1,"size-xs"],sizeSm:[1,"size-sm"],sizeMd:[1,"size-md"],sizeLg:[1,"size-lg"],sizeXl:[1,"size-xl"]},[[9,"resize","onResize"]]]]],["p-193ac141",[[1,"cpsl-grid",{fixed:[4]}]]],["p-0cab90fa",[[1,"cpsl-info-box"]]],["p-cb8dc0a4",[[1,"cpsl-row"]]],["p-bea93fae",[[1,"cpsl-code-input",{code:[1025],errorText:[1,"error-text"],helperText:[1,"helper-text"],length:[2],type:[1]}],[1,"cpsl-input",{autocapitalize:[1],autocomplete:[1],autocorrect:[1],noAutoDisable:[4,"no-auto-disable"],autofocus:[4],disabled:[4],enterkeyhint:[1],errorText:[1,"error-text"],helperText:[1,"helper-text"],inputmode:[1],label:[1],max:[8],maxlength:[2],min:[8],minlength:[2],multiple:[4],name:[1],pattern:[1],placeholder:[1],readonly:[4],required:[4],spellcheck:[4],startIconSrc:[1,"start-icon-src"],startIcon:[1,"start-icon"],step:[1],type:[1],value:[1025],hasFocus:[32]},null,{disabled:["handleDisable"]}],[1,"cpsl-modal",{enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"],footerExpanded:[4,"footer-expanded"],footerTransitionDuration:[2,"footer-transition-duration"],noOverlay:[4,"no-overlay"],open:[4],hasFooter:[32]},null,{footerExpanded:["toggleHeight"],open:["toggleModal"]}],[1,"cpsl-slide-button",{disabled:[4],endIcon:[1,"end-icon"],endText:[1,"end-text"],startIcon:[1,"start-icon"],startText:[1,"start-text"]}],[1,"cpsl-tile-button",{src:[1],icon:[1]}],[1,"cpsl-alert",{type:[1],icon:[1]}],[1,"cpsl-button",{disabled:[516],variant:[513]}],[1,"cpsl-divider"],[1,"cpsl-dropdown",{width:[1],items:[16],isOpen:[32],selectedItem:[32]},null,{isOpen:["handleOpenChange"]}],[1,"cpsl-pill",{text:[1]}],[1,"cpsl-progress-indicator",{totalSteps:[2,"total-steps"],step:[2]}],[1,"cpsl-qr-code",{url:[1],imageSrc:[1,"image-src"],size:[2]}],[1,"cpsl-spinner",{size:[2],speed:[2]}],[1,"cpsl-tab",{selected:[4],tab:[1]},[[8,"cpslTabsChanged","onTabsChanged"],[8,"cpslTabsInit","onTabsInit"]]],[1,"cpsl-tabs",{fullWidth:[4,"full-width"],selectedTab:[1,"selected-tab"],selectedTabRect:[32],loaded:[32]},null,{fullWidth:["updateSlider"],selectedTab:["updateTab"]}],[1,"cpsl-text",{color:[1],variant:[1],weight:[1]}],[1,"cpsl-overlay",{open:[4],enterTransitionDuration:[2,"enter-transition-duration"],exitTransitionDuration:[2,"exit-transition-duration"]},null,{open:["toggleHeight"]}],[1,"cpsl-icon",{src:[1],icon:[1]}]]]],e)}));
|
2
2
|
//# sourceMappingURL=capsule.esm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","pull","pullXs","pullSm","pullMd","pullLg","pullXl","push","pushXs","pushSm","pushMd","pushLg","pushXl","size","sizeXs","sizeSm","sizeMd","sizeLg","sizeXl","fixed","code","errorText","helperText","length","type","autocapitalize","autocomplete","autocorrect","noAutoDisable","autofocus","disabled","enterkeyhint","inputmode","label","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","spellcheck","startIconSrc","startIcon","step","value","hasFocus","endIcon","endText","startText","
|
1
|
+
{"version":3,"names":["patchBrowser","importMeta","url","opts","resourcesUrl","URL","href","promiseResolve","then","async","options","globalScripts","bootstrapLazy","src","replayAnimation","offset","offsetXs","offsetSm","offsetMd","offsetLg","offsetXl","pull","pullXs","pullSm","pullMd","pullLg","pullXl","push","pushXs","pushSm","pushMd","pushLg","pushXl","size","sizeXs","sizeSm","sizeMd","sizeLg","sizeXl","fixed","code","errorText","helperText","length","type","autocapitalize","autocomplete","autocorrect","noAutoDisable","autofocus","disabled","enterkeyhint","inputmode","label","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","spellcheck","startIconSrc","startIcon","step","value","hasFocus","enterTransitionDuration","exitTransitionDuration","footerExpanded","footerTransitionDuration","noOverlay","open","hasFooter","endIcon","endText","startText","icon","variant","width","items","isOpen","selectedItem","text","totalSteps","imageSrc","speed","selected","tab","fullWidth","selectedTab","selectedTabRect","loaded","color","weight"],"sources":["../node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.12.5 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(async (options) => {\n await globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options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AA,IAAA2B,QAAA,eAAAC,QAAA,eAAAZ,UAAA,iBAAAa,UAAA,0CAAAlE,IAAA,IAAAmE,KAAA,uBAAApC,KAAA,IAAAoC,KAAA,wBAAA9B,SAAA,MAAA+B,QAAA,+CAAAC,MAAA,IAAAC,MAAA,KAAAC,OAAA,KAAAC,aAAA,YAAAD,OAAA,uCAAAE,KAAA,oCAAAC,WAAA,kBAAApB,KAAA,yBAAAjE,IAAA,IAAAsF,SAAA,gBAAAvD,KAAA,yBAAAA,KAAA,IAAAwD,MAAA,qBAAAC,SAAA,IAAAC,IAAA,8FAAAC,UAAA,iBAAAC,YAAA,mBAAAC,gBAAA,KAAAC,OAAA,YAAAH,UAAA,iBAAAC,YAAA,gCAAAG,MAAA,IAAAf,QAAA,IAAAgB,OAAA,yBAAAtB,KAAA,IAAAL,wBAAA,gCAAAC,uBAAA,sCAAAI,KAAA,mCAAA9D,IAAA,IAAAmE,KAAA,SAAAtE,EAAA"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
import{D as o}from"./p-c2bf050b.js";const n=({borderRadius:o})=>{if(!Boolean(o)){return}let n=8;let t=16;let e=24;const r=1e3;let c=false;let s=false;switch(o){case"none":{s=true;n=0;t=0;e=0;break}case"xs":{n=4;t=12;e=20;break}case"md":{n=12;t=20;e=28;break}case"lg":{n=16;t=24;e=32;break}case"full":{n=16;t=24;e=32;c=true;break}}document.documentElement.style.setProperty("--cpsl-border-radius-input",`${c?r:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-alert",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tabs",`${c?r:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-primary-button",`${c?r:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-secondary-button",`${c?r:n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-tile-button",`${n}px`);document.documentElement.style.setProperty("--cpsl-border-radius-modal",`${t}px`);document.documentElement.style.setProperty("--cpsl-border-radius-pill",`${s?0:r}px`);document.documentElement.style.setProperty("--cpsl-border-radius-qr-code",`${e}px`);document.documentElement.style.setProperty("--cpsl-border-radius-info-box",`${n}px`)};const t={body2XS:"body-2xs",bodyXS:"body-xs",bodyS:"body-s",bodyM:"body-m",bodyL:"body-l",bodyXL:"body-xl",headingXS:"heading-xs",headingS:"heading-s",headingM:"heading-m",headingL:"heading-l",headingXL:"heading-xl",heading2XL:"heading-2xl"};const e=({font:o,customFontSizes:n})=>{if(Boolean(o)){document.documentElement.style.setProperty("--cpsl-default-font",o)}Object.entries(t).forEach((([o,t])=>{if(n===null||n===void 0?void 0:n[o]){document.documentElement.style.setProperty(`--cpsl-font-size-${t}`,n[o])}else{document.documentElement.style.removeProperty(`--cpsl-font-size-${t}`)}}))};function r(o,n,t){return Math.min(Math.max(o,t),n)}class c extends Error{constructor(o){super(`Failed to parse color: "${o}"`)}}var s=c;function d(o){if(typeof o!=="string")throw new s(o);if(o.trim().toLowerCase()==="transparent")return[0,0,0,0];let n=o.trim();n=m.test(o)?_(o):o;const t=f.exec(n);if(t){const o=Array.from(t).slice(1);return[...o.slice(0,3).map((o=>parseInt(i(o,2),16))),parseInt(i(o[3]||"f",2),16)/255]}const e=p.exec(n);if(e){const o=Array.from(e).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,16))),parseInt(o[3]||"ff",16)/255]}const c=b.exec(n);if(c){const o=Array.from(c).slice(1);return[...o.slice(0,3).map((o=>parseInt(o,10))),parseFloat(o[3]||"1")]}const d=g.exec(n);if(d){const[n,t,e,c]=Array.from(d).slice(1).map(parseFloat);if(r(0,100,t)!==t)throw new s(o);if(r(0,100,e)!==e)throw new s(o);return[...k(n,t,e),Number.isNaN(c)?1:c]}throw new s(o)}function l(o){let n=5381;let t=o.length;while(t){n=n*33^o.charCodeAt(--t)}return(n>>>0)%2341}const u=o=>parseInt(o.replace(/_/g,""),36);const a="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((o,n)=>{const t=u(n.substring(0,3));const e=u(n.substring(3)).toString(16);let r="";for(let o=0;o<6-e.length;o++){r+="0"}o[t]=`${r}${e}`;return o}),{});function _(o){const n=o.toLowerCase().trim();const t=a[l(n)];if(!t)throw new s(o);return`#${t}`}const i=(o,n)=>Array.from(Array(n)).map((()=>o)).join("");const f=new RegExp(`^#${i("([a-f0-9])",3)}([a-f0-9])?$`,"i");const p=new RegExp(`^#${i("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i");const b=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${i(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i");const g=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i;const m=/^[a-z]+$/i;const z=o=>Math.round(o*255);const k=(o,n,t)=>{let e=t/100;if(n===0){return[e,e,e].map(z)}const r=(o%360+360)%360/60;const c=(1-Math.abs(2*e-1))*(n/100);const s=c*(1-Math.abs(r%2-1));let d=0;let l=0;let u=0;if(r>=0&&r<1){d=c;l=s}else if(r>=1&&r<2){d=s;l=c}else if(r>=2&&r<3){l=c;u=s}else if(r>=3&&r<4){l=s;u=c}else if(r>=4&&r<5){d=s;u=c}else if(r>=5&&r<6){d=c;u=s}const a=e-c/2;const _=d+a;const i=l+a;const f=u+a;return[_,i,f].map(z)};function y(o){if(o==="transparent")return 0;function n(o){const n=o/255;return n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}const[t,e,r]=d(o);return.2126*n(t)+.7152*n(e)+.0722*n(r)}function h(o,n,t,e){return`rgba(${r(0,255,o).toFixed()}, ${r(0,255,n).toFixed()}, ${r(0,255,t).toFixed()}, ${parseFloat(r(0,1,e).toFixed(3))})`}function x(o,n,t){const e=(o,n)=>n===3?o:o/255;const[r,c,s,l]=d(o).map(e);const[u,a,_,i]=d(n).map(e);const f=i-l;const p=t*2-1;const b=p*f===-1?p:p+f/(1+p*f);const g=(b+1)/2;const m=1-g;const z=(r*m+u*g)*255;const k=(c*m+a*g)*255;const y=(s*m+_*g)*255;const x=i*t+l*(1-t);return h(z,k,y,x)}function w(o){return y(o)>.179}const j=o=>{const n=(new Option).style;n.color=o;return n.color!==""};const $=o=>o.replace(/([a-z0–9])([A-Z])/g,"$1-$2").toLowerCase();const v=(o,n)=>{let t={};for(const e in n){const r=`${o}-${$(e)}`;if(typeof n[e]==="object"&&n[e]!==null){t=Object.assign(Object.assign({},t),v(r,n[e]))}else{t[r]=n[e]}}return t};const q=o=>v("--cpsl-color",o);const F=[0,.08,.16,.32,.48,.64,.8,.96];const C=({foregroundColor:n,backgroundColor:t,customPalette:e})=>{if(!Boolean(n)||!j(n)){n=o.foregroundColor}if(!Boolean(t)||!j(t)){t=o.backgroundColor}const r=!w(t);const c={foregroundColors:[],backgroundColors:[],isDarkBackground:r};const s=r?"#FFFFFF":"#000000";const d=r?"#000000":"#FFFFFF";F.forEach((o=>{c.foregroundColors.push(x(n,d,o));c.backgroundColors.push(x(t,s,o))}));document.documentElement.style.setProperty("--cpsl-color-background-0",c.backgroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-background-8",c.backgroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-background-16",c.backgroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-background-32",c.backgroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-background-48",c.backgroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-background-64",c.backgroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-background-80",c.backgroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-background-96",c.backgroundColors[7]);document.documentElement.style.setProperty("--cpsl-color-foreground-0",c.foregroundColors[0]);document.documentElement.style.setProperty("--cpsl-color-foreground-8",c.foregroundColors[1]);document.documentElement.style.setProperty("--cpsl-color-foreground-16",c.foregroundColors[2]);document.documentElement.style.setProperty("--cpsl-color-foreground-32",c.foregroundColors[3]);document.documentElement.style.setProperty("--cpsl-color-foreground-48",c.foregroundColors[4]);document.documentElement.style.setProperty("--cpsl-color-foreground-64",c.foregroundColors[5]);document.documentElement.style.setProperty("--cpsl-color-foreground-80",c.foregroundColors[6]);document.documentElement.style.setProperty("--cpsl-color-foreground-96",c.foregroundColors[7]);if(Boolean(e)){const o=q(e);Object.entries(o).forEach((([o,n])=>document.documentElement.style.setProperty(o,n)))}return c};const M=({foregroundColor:t=o.foregroundColor,backgroundColor:r=o.backgroundColor,font:c,customPalette:s,borderRadius:d,customFontSizes:l})=>{const u=C({foregroundColor:t,backgroundColor:r,customPalette:s});e({font:c,customFontSizes:l});n({borderRadius:d});return u.isDarkBackground};export{M as generateTheme};
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":[],"mappings":""}
|
1
|
+
{"version":3,"names":["generateBorderRadii","borderRadius","Boolean","smallRadius","mediumRadius","largeRadius","fullRadius","isFull","isNone","document","documentElement","style","setProperty","FONT_NAME_MAP","body2XS","bodyXS","bodyS","bodyM","bodyL","bodyXL","headingXS","headingS","headingM","headingL","headingXL","heading2XL","generateFont","font","customFontSizes","Object","entries","forEach","key","value","removeProperty","guard","low","high","Math","min","max","ColorError","Error","constructor","color","super","ColorError$1","parseToRgba","trim","toLowerCase","normalizedColor","namedColorRegex","test","nameToHex","reducedHexMatch","reducedHexRegex","exec","arr","Array","from","slice","map","x","parseInt","r","hexMatch","hexRegex","rgbaMatch","rgbaRegex","parseFloat","hslaMatch","hslaRegex","h","s","l","a","hslToRgb","Number","isNaN","hash","str","i","length","charCodeAt","colorToInt","replace","compressedColorMap","split","reduce","acc","next","substring","hex","toString","prefix","normalizedColorName","result","amount","join","RegExp","roundColor","round","hue","saturation","lightness","huePrime","chroma","abs","secondComponent","red","green","blue","lightnessModification","finalRed","finalGreen","finalBlue","getLuminance","f","channel","pow","g","b","rgba","alpha","toFixed","mix","color1","color2","weight","normalize","n","index","r1","g1","b1","a1","r2","g2","b2","a2","alphaDelta","normalizedWeight","combinedWeight","weight2","weight1","readableColorIsBlack","isColor","strColor","Option","toKebabCase","pascal","buildVars","prev","obj","resp","k","name","assign","getCssColors","customPalette","MIXES","generatePalette","foregroundColor","backgroundColor","DEFAULT_THEME","isDarkBackground","palette","foregroundColors","backgroundColors","backgroundMixColor","foregroundMixColor","push","cssColorVars","v","generateTheme"],"sources":["src/utils/theme/generateBorderRadii.ts","src/utils/theme/generateFont.ts","../node_modules/color2k/dist/index.module.es.js","src/utils/theme/utils.ts","src/utils/theme/generatePalette.ts","src/utils/theme/generateTheme.ts"],"sourcesContent":["import { Theme } from '../../interface';\n\nexport const generateBorderRadii = ({ borderRadius }: Pick<Theme, 'borderRadius'>) => {\n if (!Boolean(borderRadius)) {\n return;\n }\n\n let smallRadius = 8;\n let mediumRadius = 16;\n let largeRadius = 24;\n const fullRadius = 1000;\n let isFull = false;\n let isNone = false;\n\n switch (borderRadius) {\n case 'none': {\n isNone = true;\n smallRadius = 0;\n mediumRadius = 0;\n largeRadius = 0;\n break;\n }\n case 'xs': {\n smallRadius = 4;\n mediumRadius = 12;\n largeRadius = 20;\n break;\n }\n case 'md': {\n smallRadius = 12;\n mediumRadius = 20;\n largeRadius = 28;\n break;\n }\n case 'lg': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n break;\n }\n case 'full': {\n smallRadius = 16;\n mediumRadius = 24;\n largeRadius = 32;\n isFull = true;\n break;\n }\n }\n\n document.documentElement.style.setProperty('--cpsl-border-radius-input', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-alert', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tabs', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-primary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-secondary-button', `${isFull ? fullRadius : smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-tile-button', `${smallRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-modal', `${mediumRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-pill', `${isNone ? 0 : fullRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-qr-code', `${largeRadius}px`);\n document.documentElement.style.setProperty('--cpsl-border-radius-info-box', `${smallRadius}px`);\n};\n","import { Theme } from '../../interface';\n\nconst FONT_NAME_MAP = {\n body2XS: 'body-2xs',\n bodyXS: 'body-xs',\n bodyS: 'body-s',\n bodyM: 'body-m',\n bodyL: 'body-l',\n bodyXL: 'body-xl',\n headingXS: 'heading-xs',\n headingS: 'heading-s',\n headingM: 'heading-m',\n headingL: 'heading-l',\n headingXL: 'heading-xl',\n heading2XL: 'heading-2xl',\n};\n\nexport const generateFont = ({ font, customFontSizes }: Pick<Theme, 'font' | 'customFontSizes'>) => {\n if (Boolean(font)) {\n document.documentElement.style.setProperty('--cpsl-default-font', font);\n }\n\n Object.entries(FONT_NAME_MAP).forEach(([key, value]) => {\n if (customFontSizes?.[key]) {\n document.documentElement.style.setProperty(`--cpsl-font-size-${value}`, customFontSizes[key]);\n } else {\n document.documentElement.style.removeProperty(`--cpsl-font-size-${value}`);\n }\n });\n};\n","/**\n * A simple guard function:\n *\n * ```js\n * Math.min(Math.max(low, value), high)\n * ```\n */\nfunction guard(low, high, value) {\n return Math.min(Math.max(low, value), high);\n}\n\nclass ColorError extends Error {\n constructor(color) {\n super(`Failed to parse color: \"${color}\"`);\n }\n}\nvar ColorError$1 = ColorError;\n\n/**\n * Parses a color into red, gree, blue, alpha parts\n *\n * @param color the input color. Can be a RGB, RBGA, HSL, HSLA, or named color\n */\nfunction parseToRgba(color) {\n if (typeof color !== 'string') throw new ColorError$1(color);\n if (color.trim().toLowerCase() === 'transparent') return [0, 0, 0, 0];\n let normalizedColor = color.trim();\n normalizedColor = namedColorRegex.test(color) ? nameToHex(color) : color;\n const reducedHexMatch = reducedHexRegex.exec(normalizedColor);\n if (reducedHexMatch) {\n const arr = Array.from(reducedHexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(r(x, 2), 16)), parseInt(r(arr[3] || 'f', 2), 16) / 255];\n }\n const hexMatch = hexRegex.exec(normalizedColor);\n if (hexMatch) {\n const arr = Array.from(hexMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 16)), parseInt(arr[3] || 'ff', 16) / 255];\n }\n const rgbaMatch = rgbaRegex.exec(normalizedColor);\n if (rgbaMatch) {\n const arr = Array.from(rgbaMatch).slice(1);\n return [...arr.slice(0, 3).map(x => parseInt(x, 10)), parseFloat(arr[3] || '1')];\n }\n const hslaMatch = hslaRegex.exec(normalizedColor);\n if (hslaMatch) {\n const [h, s, l, a] = Array.from(hslaMatch).slice(1).map(parseFloat);\n if (guard(0, 100, s) !== s) throw new ColorError$1(color);\n if (guard(0, 100, l) !== l) throw new ColorError$1(color);\n return [...hslToRgb(h, s, l), Number.isNaN(a) ? 1 : a];\n }\n throw new ColorError$1(color);\n}\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i) {\n hash = hash * 33 ^ str.charCodeAt(--i);\n }\n\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */\n return (hash >>> 0) % 2341;\n}\nconst colorToInt = x => parseInt(x.replace(/_/g, ''), 36);\nconst compressedColorMap = '1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm'.split(' ').reduce((acc, next) => {\n const key = colorToInt(next.substring(0, 3));\n const hex = colorToInt(next.substring(3)).toString(16);\n\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n let prefix = '';\n for (let i = 0; i < 6 - hex.length; i++) {\n prefix += '0';\n }\n acc[key] = `${prefix}${hex}`;\n return acc;\n}, {});\n\n/**\n * Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.\n */\nfunction nameToHex(color) {\n const normalizedColorName = color.toLowerCase().trim();\n const result = compressedColorMap[hash(normalizedColorName)];\n if (!result) throw new ColorError$1(color);\n return `#${result}`;\n}\nconst r = (str, amount) => Array.from(Array(amount)).map(() => str).join('');\nconst reducedHexRegex = new RegExp(`^#${r('([a-f0-9])', 3)}([a-f0-9])?$`, 'i');\nconst hexRegex = new RegExp(`^#${r('([a-f0-9]{2})', 3)}([a-f0-9]{2})?$`, 'i');\nconst rgbaRegex = new RegExp(`^rgba?\\\\(\\\\s*(\\\\d+)\\\\s*${r(',\\\\s*(\\\\d+)\\\\s*', 2)}(?:,\\\\s*([\\\\d.]+))?\\\\s*\\\\)$`, 'i');\nconst hslaRegex = /^hsla?\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)%\\s*,\\s*([\\d.]+)%(?:\\s*,\\s*([\\d.]+))?\\s*\\)$/i;\nconst namedColorRegex = /^[a-z]+$/i;\nconst roundColor = color => {\n return Math.round(color * 255);\n};\nconst hslToRgb = (hue, saturation, lightness) => {\n let l = lightness / 100;\n if (saturation === 0) {\n // achromatic\n return [l, l, l].map(roundColor);\n }\n\n // formulae from https://en.wikipedia.org/wiki/HSL_and_HSV\n const huePrime = (hue % 360 + 360) % 360 / 60;\n const chroma = (1 - Math.abs(2 * l - 1)) * (saturation / 100);\n const secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));\n let red = 0;\n let green = 0;\n let blue = 0;\n if (huePrime >= 0 && huePrime < 1) {\n red = chroma;\n green = secondComponent;\n } else if (huePrime >= 1 && huePrime < 2) {\n red = secondComponent;\n green = chroma;\n } else if (huePrime >= 2 && huePrime < 3) {\n green = chroma;\n blue = secondComponent;\n } else if (huePrime >= 3 && huePrime < 4) {\n green = secondComponent;\n blue = chroma;\n } else if (huePrime >= 4 && huePrime < 5) {\n red = secondComponent;\n blue = chroma;\n } else if (huePrime >= 5 && huePrime < 6) {\n red = chroma;\n blue = secondComponent;\n }\n const lightnessModification = l - chroma / 2;\n const finalRed = red + lightnessModification;\n const finalGreen = green + lightnessModification;\n const finalBlue = blue + lightnessModification;\n return [finalRed, finalGreen, finalBlue].map(roundColor);\n};\n\n// taken from:\n// https://github.com/styled-components/polished/blob/a23a6a2bb26802b3d922d9c3b67bac3f3a54a310/src/internalHelpers/_rgbToHsl.js\n\n/**\n * Parses a color in hue, saturation, lightness, and the alpha channel.\n *\n * Hue is a number between 0 and 360, saturation, lightness, and alpha are\n * decimal percentages between 0 and 1\n */\nfunction parseToHsla(color) {\n const [red, green, blue, alpha] = parseToRgba(color).map((value, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? value : value / 255);\n const max = Math.max(red, green, blue);\n const min = Math.min(red, green, blue);\n const lightness = (max + min) / 2;\n\n // achromatic\n if (max === min) return [0, 0, lightness, alpha];\n const delta = max - min;\n const saturation = lightness > 0.5 ? delta / (2 - max - min) : delta / (max + min);\n const hue = 60 * (red === max ? (green - blue) / delta + (green < blue ? 6 : 0) : green === max ? (blue - red) / delta + 2 : (red - green) / delta + 4);\n return [hue, saturation, lightness, alpha];\n}\n\n/**\n * Takes in hsla parts and constructs an hsla string\n *\n * @param hue The color circle (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue\n * @param saturation Percentage of saturation, given as a decimal between 0 and 1\n * @param lightness Percentage of lightness, given as a decimal between 0 and 1\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction hsla(hue, saturation, lightness, alpha) {\n return `hsla(${(hue % 360).toFixed()}, ${guard(0, 100, saturation * 100).toFixed()}%, ${guard(0, 100, lightness * 100).toFixed()}%, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Adjusts the current hue of the color by the given degrees. Wraps around when\n * over 360.\n *\n * @param color input color\n * @param degrees degrees to adjust the input color, accepts degree integers\n * (0 - 360) and wraps around on overflow\n */\nfunction adjustHue(color, degrees) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h + degrees, s, l, a);\n}\n\n/**\n * Darkens using lightness. This is equivalent to subtracting the lightness\n * from the L in HSL.\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction darken(color, amount) {\n const [hue, saturation, lightness, alpha] = parseToHsla(color);\n return hsla(hue, saturation, lightness - amount, alpha);\n}\n\n/**\n * Desaturates the input color by the given amount via subtracting from the `s`\n * in `hsla`.\n *\n * @param amount The amount to desaturate, given as a decimal between 0 and 1\n */\nfunction desaturate(color, amount) {\n const [h, s, l, a] = parseToHsla(color);\n return hsla(h, s - amount, l, a);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getLuminance.js\n\n/**\n * Returns a number (float) representing the luminance of a color.\n */\nfunction getLuminance(color) {\n if (color === 'transparent') return 0;\n function f(x) {\n const channel = x / 255;\n return channel <= 0.04045 ? channel / 12.92 : Math.pow((channel + 0.055) / 1.055, 2.4);\n }\n const [r, g, b] = parseToRgba(color);\n return 0.2126 * f(r) + 0.7152 * f(g) + 0.0722 * f(b);\n}\n\n// taken from:\n// https://github.com/styled-components/polished/blob/0764c982551b487469043acb56281b0358b3107b/src/color/getContrast.js\n\n/**\n * Returns the contrast ratio between two colors based on\n * [W3's recommended equation for calculating contrast](http://www.w3.org/TR/WCAG20/#contrast-ratiodef).\n */\nfunction getContrast(color1, color2) {\n const luminance1 = getLuminance(color1);\n const luminance2 = getLuminance(color2);\n return luminance1 > luminance2 ? (luminance1 + 0.05) / (luminance2 + 0.05) : (luminance2 + 0.05) / (luminance1 + 0.05);\n}\n\n/**\n * Takes in rgba parts and returns an rgba string\n *\n * @param red The amount of red in the red channel, given in a number between 0 and 255 inclusive\n * @param green The amount of green in the red channel, given in a number between 0 and 255 inclusive\n * @param blue The amount of blue in the red channel, given in a number between 0 and 255 inclusive\n * @param alpha Percentage of opacity, given as a decimal between 0 and 1\n */\nfunction rgba(red, green, blue, alpha) {\n return `rgba(${guard(0, 255, red).toFixed()}, ${guard(0, 255, green).toFixed()}, ${guard(0, 255, blue).toFixed()}, ${parseFloat(guard(0, 1, alpha).toFixed(3))})`;\n}\n\n/**\n * Mixes two colors together. Taken from sass's implementation.\n */\nfunction mix(color1, color2, weight) {\n const normalize = (n, index) =>\n // 3rd index is alpha channel which is already normalized\n index === 3 ? n : n / 255;\n const [r1, g1, b1, a1] = parseToRgba(color1).map(normalize);\n const [r2, g2, b2, a2] = parseToRgba(color2).map(normalize);\n\n // The formula is copied from the original Sass implementation:\n // http://sass-lang.com/documentation/Sass/Script/Functions.html#mix-instance_method\n const alphaDelta = a2 - a1;\n const normalizedWeight = weight * 2 - 1;\n const combinedWeight = normalizedWeight * alphaDelta === -1 ? normalizedWeight : normalizedWeight + alphaDelta / (1 + normalizedWeight * alphaDelta);\n const weight2 = (combinedWeight + 1) / 2;\n const weight1 = 1 - weight2;\n const r = (r1 * weight1 + r2 * weight2) * 255;\n const g = (g1 * weight1 + g2 * weight2) * 255;\n const b = (b1 * weight1 + b2 * weight2) * 255;\n const a = a2 * weight + a1 * (1 - weight);\n return rgba(r, g, b, a);\n}\n\n/**\n * Given a series colors, this function will return a `scale(x)` function that\n * accepts a percentage as a decimal between 0 and 1 and returns the color at\n * that percentage in the scale.\n *\n * ```js\n * const scale = getScale('red', 'yellow', 'green');\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(0.5)); // rgba(255, 255, 0, 1)\n * console.log(scale(1)); // rgba(0, 128, 0, 1)\n * ```\n *\n * If you'd like to limit the domain and range like chroma-js, we recommend\n * wrapping scale again.\n *\n * ```js\n * const _scale = getScale('red', 'yellow', 'green');\n * const scale = x => _scale(x / 100);\n *\n * console.log(scale(0)); // rgba(255, 0, 0, 1)\n * console.log(scale(50)); // rgba(255, 255, 0, 1)\n * console.log(scale(100)); // rgba(0, 128, 0, 1)\n * ```\n */\nfunction getScale(...colors) {\n return n => {\n const lastIndex = colors.length - 1;\n const lowIndex = guard(0, lastIndex, Math.floor(n * lastIndex));\n const highIndex = guard(0, lastIndex, Math.ceil(n * lastIndex));\n const color1 = colors[lowIndex];\n const color2 = colors[highIndex];\n const unit = 1 / lastIndex;\n const weight = (n - unit * lowIndex) / unit;\n return mix(color1, color2, weight);\n };\n}\n\nconst guidelines = {\n decorative: 1.5,\n readable: 3,\n aa: 4.5,\n aaa: 7\n};\n\n/**\n * Returns whether or not a color has bad contrast against a background\n * according to a given standard.\n */\nfunction hasBadContrast(color, standard = 'aa', background = '#fff') {\n return getContrast(color, background) < guidelines[standard];\n}\n\n/**\n * Lightens a color by a given amount. This is equivalent to\n * `darken(color, -amount)`\n *\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction lighten(color, amount) {\n return darken(color, -amount);\n}\n\n/**\n * Takes in a color and makes it more transparent by convert to `rgba` and\n * decreasing the amount in the alpha channel.\n *\n * @param amount The amount to increase the transparency by, given as a decimal between 0 and 1\n */\nfunction transparentize(color, amount) {\n const [r, g, b, a] = parseToRgba(color);\n return rgba(r, g, b, a - amount);\n}\n\n/**\n * Takes a color and un-transparentizes it. Equivalent to\n * `transparentize(color, -amount)`\n *\n * @param amount The amount to increase the opacity by, given as a decimal between 0 and 1\n */\nfunction opacify(color, amount) {\n return transparentize(color, -amount);\n}\n\n/**\n * An alternative function to `readableColor`. Returns whether or not the \n * readable color (i.e. the color to be place on top the input color) should be\n * black.\n */\nfunction readableColorIsBlack(color) {\n return getLuminance(color) > 0.179;\n}\n\n/**\n * Returns black or white for best contrast depending on the luminosity of the\n * given color.\n */\nfunction readableColor(color) {\n return readableColorIsBlack(color) ? '#000' : '#fff';\n}\n\n/**\n * Saturates a color by converting it to `hsl` and increasing the saturation\n * amount. Equivalent to `desaturate(color, -amount)`\n * \n * @param color Input color\n * @param amount The amount to darken, given as a decimal between 0 and 1\n */\nfunction saturate(color, amount) {\n return desaturate(color, -amount);\n}\n\n/**\n * Takes in any color and returns it as a hex code.\n */\nfunction toHex(color) {\n const [r, g, b, a] = parseToRgba(color);\n let hex = x => {\n const h = guard(0, 255, x).toString(16);\n // NOTE: padStart could be used here but it breaks Node 6 compat\n // https://github.com/ricokahler/color2k/issues/351\n return h.length === 1 ? `0${h}` : h;\n };\n return `#${hex(r)}${hex(g)}${hex(b)}${a < 1 ? hex(Math.round(a * 255)) : ''}`;\n}\n\n/**\n * Takes in any color and returns it as an rgba string.\n */\nfunction toRgba(color) {\n return rgba(...parseToRgba(color));\n}\n\n/**\n * Takes in any color and returns it as an hsla string.\n */\nfunction toHsla(color) {\n return hsla(...parseToHsla(color));\n}\n\nexport { ColorError$1 as ColorError, adjustHue, darken, desaturate, getContrast, getLuminance, getScale, guard, hasBadContrast, hsla, lighten, mix, opacify, parseToHsla, parseToRgba, readableColor, readableColorIsBlack, rgba, saturate, toHex, toHsla, toRgba, transparentize };\n//# sourceMappingURL=index.module.es.js.map\n","import { CustomPalette } from '../../interface';\n\nexport const isColor = strColor => {\n const s = new Option().style;\n s.color = strColor;\n return s.color !== '';\n};\n\nconst toKebabCase = (pascal: string) => pascal.replace(/([a-z0–9])([A-Z])/g, '$1-$2').toLowerCase();\n\n// This function handles arrays and objects\nconst buildVars = (prev: string, obj: any): { [k: string]: string } => {\n let resp = {};\n\n for (const k in obj) {\n const name = `${prev}-${toKebabCase(k)}`;\n if (typeof obj[k] === 'object' && obj[k] !== null) {\n resp = { ...resp, ...buildVars(name, obj[k]) };\n } else {\n resp[name] = obj[k];\n }\n }\n\n return resp;\n};\n\nexport const getCssColors = (customPalette: CustomPalette): { [k: string]: string } => buildVars('--cpsl-color', customPalette);\n","import { mix, readableColorIsBlack } from 'color2k';\nimport { Theme } from '../../interface';\nimport { getCssColors, isColor } from './utils';\nimport { DEFAULT_THEME } from '../../constants';\n\nexport type Palette = {\n foregroundColors: string[];\n backgroundColors: string[];\n isDarkBackground: boolean;\n};\n\nconst MIXES = [0, 0.08, 0.16, 0.32, 0.48, 0.64, 0.8, 0.96];\n\nexport const generatePalette = ({ foregroundColor, backgroundColor, customPalette }: Pick<Theme, 'foregroundColor' | 'backgroundColor' | 'customPalette'>): Palette => {\n if (!Boolean(foregroundColor) || !isColor(foregroundColor)) {\n foregroundColor = DEFAULT_THEME.foregroundColor;\n }\n if (!Boolean(backgroundColor) || !isColor(backgroundColor)) {\n backgroundColor = DEFAULT_THEME.backgroundColor;\n }\n\n const isDarkBackground = !readableColorIsBlack(backgroundColor);\n\n const palette: Palette = {\n foregroundColors: [],\n backgroundColors: [],\n isDarkBackground,\n };\n\n const backgroundMixColor = isDarkBackground ? '#FFFFFF' : '#000000';\n const foregroundMixColor = isDarkBackground ? '#000000' : '#FFFFFF';\n\n MIXES.forEach(value => {\n palette.foregroundColors.push(mix(foregroundColor, foregroundMixColor, value));\n palette.backgroundColors.push(mix(backgroundColor, backgroundMixColor, value));\n });\n\n // BACKGROUND\n document.documentElement.style.setProperty('--cpsl-color-background-0', palette.backgroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-background-8', palette.backgroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-background-16', palette.backgroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-background-32', palette.backgroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-background-48', palette.backgroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-background-64', palette.backgroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-background-80', palette.backgroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-background-96', palette.backgroundColors[7]);\n\n // FOREGROUND\n document.documentElement.style.setProperty('--cpsl-color-foreground-0', palette.foregroundColors[0]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-8', palette.foregroundColors[1]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-16', palette.foregroundColors[2]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-32', palette.foregroundColors[3]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-48', palette.foregroundColors[4]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-64', palette.foregroundColors[5]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-80', palette.foregroundColors[6]);\n document.documentElement.style.setProperty('--cpsl-color-foreground-96', palette.foregroundColors[7]);\n\n if (Boolean(customPalette)) {\n const cssColorVars = getCssColors(customPalette);\n Object.entries(cssColorVars).forEach(([k, v]) => document.documentElement.style.setProperty(k, v));\n }\n\n return palette;\n};\n","import { DEFAULT_THEME } from '../../constants';\nimport { Theme } from '../../interface';\nimport { generateBorderRadii } from './generateBorderRadii';\nimport { generateFont } from './generateFont';\nimport { generatePalette } from './generatePalette';\n\n/**\n * Generates css theme variables.\n * @returns @boolean Whether background is dark or not.\n */\nexport const generateTheme = ({\n foregroundColor = DEFAULT_THEME.foregroundColor,\n backgroundColor = DEFAULT_THEME.backgroundColor,\n font,\n customPalette,\n borderRadius,\n customFontSizes,\n}: Theme): boolean => {\n const palette = generatePalette({ foregroundColor, backgroundColor, customPalette });\n\n generateFont({ font, customFontSizes });\n\n generateBorderRadii({ borderRadius });\n\n return palette.isDarkBackground;\n};\n"],"mappings":"oCAEO,MAAMA,EAAsB,EAAGC,mBACpC,IAAKC,QAAQD,GAAe,CAC1B,M,CAGF,IAAIE,EAAc,EAClB,IAAIC,EAAe,GACnB,IAAIC,EAAc,GAClB,MAAMC,EAAa,IACnB,IAAIC,EAAS,MACb,IAAIC,EAAS,MAEb,OAAQP,GACN,IAAK,OAAQ,CACXO,EAAS,KACTL,EAAc,EACdC,EAAe,EACfC,EAAc,EACd,K,CAEF,IAAK,KAAM,CACTF,EAAc,EACdC,EAAe,GACfC,EAAc,GACd,K,CAEF,IAAK,KAAM,CACTF,EAAc,GACdC,EAAe,GACfC,EAAc,GACd,K,CAEF,IAAK,KAAM,CACTF,EAAc,GACdC,EAAe,GACfC,EAAc,GACd,K,CAEF,IAAK,OAAQ,CACXF,EAAc,GACdC,EAAe,GACfC,EAAc,GACdE,EAAS,KACT,K,EAIJE,SAASC,gBAAgBC,MAAM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!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}export{e as c,n as g};
|
2
|
+
//# sourceMappingURL=p-0462f723.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sources":[],"mappings":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import{r as d,h as o,H as r}from"./p-6fb7c4d1.js";const a=":host{--box-border-radius:var(--cpsl-border-radius-info-box);--box-padding-top:16px;--box-padding-bottom:16px;--box-padding-start:16px;--box-padding-end:16px;--box-border-width:1px}.info-box-container{border-radius:var(--input-border-radius);-webkit-padding-start:var(--box-padding-start);padding-inline-start:var(--box-padding-start);-webkit-padding-end:var(--box-padding-end);padding-inline-end:var(--box-padding-end);padding-top:var(--box-padding-top);padding-bottom:var(--box-padding-bottom);display:flex;background-color:var(--cpsl-color-background-secondary);border:var(--box-border-width) solid var(--cpsl-color-input-border-placeholder);border-radius:var(--box-border-radius)}";const n=a;const i=class{constructor(o){d(this,o)}render(){return o(r,{key:"c3adc346763da83e631c71bbc4f1ce7aad99ba04"},o("div",{key:"c03ce70d8c94d42264216c1376d81f8601a45656",class:"info-box-container"},o("slot",{key:"3ae35495b7371479d0ad8e731011fb8b06a2c0d9"})))}};i.style=n;export{i as cpsl_info_box};
|
2
|
+
//# sourceMappingURL=p-0cab90fa.entry.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["cpslInfoBoxCss","CpslInfoBoxStyle0","CpslInfoBox","render","h","Host","key","class"],"sources":["src/components/cpsl-info-box/cpsl-info-box.scss?tag=cpsl-info-box&encapsulation=shadow","src/components/cpsl-info-box/cpsl-info-box.tsx"],"sourcesContent":["@import '../../themes/capsule.globals';\n\n:host {\n --box-border-radius: var(--cpsl-border-radius-info-box);\n --box-padding-top: 16px;\n --box-padding-bottom: 16px;\n --box-padding-start: 16px;\n --box-padding-end: 16px;\n --box-border-width: 1px;\n}\n\n.info-box-container {\n @include border-radius(var(--input-border-radius));\n @include padding(var(--box-padding-top), var(--box-padding-end), var(--box-padding-bottom), var(--box-padding-start));\n\n display: flex;\n background-color: var(--cpsl-color-background-
|
1
|
+
{"version":3,"names":["cpslInfoBoxCss","CpslInfoBoxStyle0","CpslInfoBox","render","h","Host","key","class"],"sources":["src/components/cpsl-info-box/cpsl-info-box.scss?tag=cpsl-info-box&encapsulation=shadow","src/components/cpsl-info-box/cpsl-info-box.tsx"],"sourcesContent":["@import '../../themes/capsule.globals';\n\n:host {\n --box-border-radius: var(--cpsl-border-radius-info-box);\n --box-padding-top: 16px;\n --box-padding-bottom: 16px;\n --box-padding-start: 16px;\n --box-padding-end: 16px;\n --box-border-width: 1px;\n}\n\n.info-box-container {\n @include border-radius(var(--input-border-radius));\n @include padding(var(--box-padding-top), var(--box-padding-end), var(--box-padding-bottom), var(--box-padding-start));\n\n display: flex;\n background-color: var(--cpsl-color-background-secondary);\n border: var(--box-border-width) solid var(--cpsl-color-input-border-placeholder);\n border-radius: var(--box-border-radius);\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'cpsl-info-box',\n styleUrl: 'cpsl-info-box.scss',\n shadow: true,\n})\nexport class CpslInfoBox {\n render() {\n return (\n <Host>\n <div class=\"info-box-container\">\n <slot></slot>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"kDAAA,MAAMA,EAAiB,+qBACvB,MAAAC,EAAeD,E,MCMFE,EAAW,M,yBACtB,MAAAC,GACE,OACEC,EAACC,EAAI,CAAAC,IAAA,4CACHF,EAAA,OAAAE,IAAA,2CAAKC,MAAM,sBACTH,EAAA,QAAAE,IAAA,8C"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import{r as d,h as i,H as p}from"./p-
|
2
|
-
//# sourceMappingURL=p-
|
1
|
+
import{r as d,h as i,H as p}from"./p-6fb7c4d1.js";const a=":host{-webkit-padding-start:var(--cpsl-grid-padding-xs, var(--cpsl-grid-padding, 0px));padding-inline-start:var(--cpsl-grid-padding-xs, var(--cpsl-grid-padding, 0px));-webkit-padding-end:var(--cpsl-grid-padding-xs, var(--cpsl-grid-padding, 0px));padding-inline-end:var(--cpsl-grid-padding-xs, var(--cpsl-grid-padding, 0px));padding-top:var(--cpsl-grid-padding-xs, var(--cpsl-grid-padding, 0px));padding-bottom:var(--cpsl-grid-padding-xs, var(--cpsl-grid-padding, 0px));-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;display:block;flex:1}@media (min-width: 576px){:host{-webkit-padding-start:var(--cpsl-grid-padding-sm, var(--cpsl-grid-padding, 0px));padding-inline-start:var(--cpsl-grid-padding-sm, var(--cpsl-grid-padding, 0px));-webkit-padding-end:var(--cpsl-grid-padding-sm, var(--cpsl-grid-padding, 0px));padding-inline-end:var(--cpsl-grid-padding-sm, var(--cpsl-grid-padding, 0px));padding-top:var(--cpsl-grid-padding-sm, var(--cpsl-grid-padding, 0px));padding-bottom:var(--cpsl-grid-padding-sm, var(--cpsl-grid-padding, 0px))}}@media (min-width: 768px){:host{-webkit-padding-start:var(--cpsl-grid-padding-md, var(--cpsl-grid-padding, 0px));padding-inline-start:var(--cpsl-grid-padding-md, var(--cpsl-grid-padding, 0px));-webkit-padding-end:var(--cpsl-grid-padding-md, var(--cpsl-grid-padding, 0px));padding-inline-end:var(--cpsl-grid-padding-md, var(--cpsl-grid-padding, 0px));padding-top:var(--cpsl-grid-padding-md, var(--cpsl-grid-padding, 0px));padding-bottom:var(--cpsl-grid-padding-md, var(--cpsl-grid-padding, 0px))}}@media (min-width: 992px){:host{-webkit-padding-start:var(--cpsl-grid-padding-lg, var(--cpsl-grid-padding, 0px));padding-inline-start:var(--cpsl-grid-padding-lg, var(--cpsl-grid-padding, 0px));-webkit-padding-end:var(--cpsl-grid-padding-lg, var(--cpsl-grid-padding, 0px));padding-inline-end:var(--cpsl-grid-padding-lg, var(--cpsl-grid-padding, 0px));padding-top:var(--cpsl-grid-padding-lg, var(--cpsl-grid-padding, 0px));padding-bottom:var(--cpsl-grid-padding-lg, var(--cpsl-grid-padding, 0px))}}@media (min-width: 1200px){:host{-webkit-padding-start:var(--cpsl-grid-padding-xl, var(--cpsl-grid-padding, 0px));padding-inline-start:var(--cpsl-grid-padding-xl, var(--cpsl-grid-padding, 0px));-webkit-padding-end:var(--cpsl-grid-padding-xl, var(--cpsl-grid-padding, 0px));padding-inline-end:var(--cpsl-grid-padding-xl, var(--cpsl-grid-padding, 0px));padding-top:var(--cpsl-grid-padding-xl, var(--cpsl-grid-padding, 0px));padding-bottom:var(--cpsl-grid-padding-xl, var(--cpsl-grid-padding, 0px))}}:host(.grid-fixed){width:var(--cpsl-grid-width-xs, var(--cpsl-grid-width, 100%));max-width:100%}@media (min-width: 576px){:host(.grid-fixed){width:var(--cpsl-grid-width-sm, var(--cpsl-grid-width, 540px))}}@media (min-width: 768px){:host(.grid-fixed){width:var(--cpsl-grid-width-md, var(--cpsl-grid-width, 720px))}}@media (min-width: 992px){:host(.grid-fixed){width:var(--cpsl-grid-width-lg, var(--cpsl-grid-width, 960px))}}@media (min-width: 1200px){:host(.grid-fixed){width:var(--cpsl-grid-width-xl, var(--cpsl-grid-width, 1140px))}}:host(.cpsl-no-padding){--cpsl-grid-column-padding:0;--cpsl-grid-column-padding-xs:0;--cpsl-grid-column-padding-sm:0;--cpsl-grid-column-padding-md:0;--cpsl-grid-column-padding-lg:0;--cpsl-grid-column-padding-xl:0}";const g=a;const r=class{constructor(i){d(this,i);this.fixed=false}render(){return i(p,{key:"ad08de3e168770731291ad1fd2ddffcac4ca6145",class:{"grid-fixed":this.fixed}},i("slot",{key:"0c93c6a07b6acfaa4bd50c6edabbae30e37ed09d"}))}};r.style=g;export{r as cpsl_grid};
|
2
|
+
//# sourceMappingURL=p-193ac141.entry.js.map
|
@@ -0,0 +1,3 @@
|
|
1
|
+
const t="capsule";let e;let n;let s=false;let o=false;let l=false;const c=(t,e="")=>{{return()=>{}}};const i=(t,e)=>{{return()=>{}}};const f="{visibility:hidden}.hydrated{visibility:inherit}";const r="slot-fb{display:contents}slot-fb[hidden]{display:none}";const u={};const a="http://www.w3.org/2000/svg";const d="http://www.w3.org/1999/xhtml";const v=t=>t!=null;const p=t=>{t=typeof t;return t==="object"||t==="function"};function h(t){var e,n,s;return(s=(n=(e=t.head)===null||e===void 0?void 0:e.querySelector('meta[name="csp-nonce"]'))===null||n===void 0?void 0:n.getAttribute("content"))!==null&&s!==void 0?s:undefined}const y=(t,e,...n)=>{let s=null;let o=null;let l=false;let c=false;const i=[];const f=e=>{for(let n=0;n<e.length;n++){s=e[n];if(Array.isArray(s)){f(s)}else if(s!=null&&typeof s!=="boolean"){if(l=typeof t!=="function"&&!p(s)){s=String(s)}if(l&&c){i[i.length-1].t+=s}else{i.push(l?m(null,s):s)}c=l}}};f(n);if(e){if(e.key){o=e.key}{const t=e.className||e.class;if(t){e.class=typeof t!=="object"?t:Object.keys(t).filter((e=>t[e])).join(" ")}}}const r=m(t,null);r.o=e;if(i.length>0){r.l=i}{r.i=o}return r};const m=(t,e)=>{const n={u:0,v:t,t:e,p:null,l:null};{n.o=null}{n.i=null}return n};const b={};const w=t=>t&&t.v===b;const $=(t,e)=>{if(t!=null&&!p(t)){if(e&4){return t==="false"?false:t===""||!!t}if(e&2){return parseFloat(t)}if(e&1){return String(t)}return t}return t};const g=t=>ht(t).$hostElement$;const S=(t,e,n)=>{const s=g(t);return{emit:t=>j(s,e,{bubbles:!!(n&4),composed:!!(n&2),cancelable:!!(n&1),detail:t})}};const j=(t,e,n)=>{const s=kt.ce(e,n);t.dispatchEvent(s);return s};const O=new WeakMap;const k=(t,e,n)=>{let s=St.get(t);if(Pt&&n){s=s||new CSSStyleSheet;if(typeof s==="string"){s=e}else{s.replaceSync(e)}}else{s=e}St.set(t,s)};const C=(t,e,n)=>{var s;const o=P(e);const l=St.get(o);t=t.nodeType===11?t:Ot;if(l){if(typeof l==="string"){t=t.head||t;let n=O.get(t);let c;if(!n){O.set(t,n=new Set)}if(!n.has(o)){{c=Ot.createElement("style");c.innerHTML=l;const e=(s=kt.h)!==null&&s!==void 0?s:h(Ot);if(e!=null){c.setAttribute("nonce",e)}t.insertBefore(c,t.querySelector("link"))}if(e.u&4){c.innerHTML+=r}if(n){n.add(o)}}}else if(!t.adoptedStyleSheets.includes(l)){t.adoptedStyleSheets=[...t.adoptedStyleSheets,l]}}return o};const M=t=>{const e=t.m;const n=t.$hostElement$;const s=e.u;const o=c("attachStyles",e.$);const l=C(n.shadowRoot?n.shadowRoot:n.getRootNode(),e);if(s&10){n["s-sc"]=l;n.classList.add(l+"-h")}o()};const P=(t,e)=>"sc-"+t.$;const x=(t,e,n,s,o,l)=>{if(n!==s){let c=bt(t,e);let i=e.toLowerCase();if(e==="class"){const e=t.classList;const o=L(n);const l=L(s);e.remove(...o.filter((t=>t&&!l.includes(t))));e.add(...l.filter((t=>t&&!o.includes(t))))}else if(e==="style"){{for(const e in n){if(!s||s[e]==null){if(e.includes("-")){t.style.removeProperty(e)}else{t.style[e]=""}}}}for(const e in s){if(!n||s[e]!==n[e]){if(e.includes("-")){t.style.setProperty(e,s[e])}else{t.style[e]=s[e]}}}}else if(e==="key");else if(!c&&e[0]==="o"&&e[1]==="n"){if(e[2]==="-"){e=e.slice(3)}else if(bt(jt,i)){e=i.slice(2)}else{e=i[2]+e.slice(3)}if(n||s){const o=e.endsWith(U);e=e.replace(A,"");if(n){kt.rel(t,e,n,o)}if(s){kt.ael(t,e,s,o)}}}else{const i=p(s);if((c||i&&s!==null)&&!o){try{if(!t.tagName.includes("-")){const o=s==null?"":s;if(e==="list"){c=false}else if(n==null||t[e]!=o){t[e]=o}}else{t[e]=s}}catch(t){}}if(s==null||s===false){if(s!==false||t.getAttribute(e)===""){{t.removeAttribute(e)}}}else if((!c||l&4||o)&&!i){s=s===true?"":s;{t.setAttribute(e,s)}}}}};const E=/\s/;const L=t=>!t?[]:t.split(E);const U="Capture";const A=new RegExp(U+"$");const N=(t,e,n,s)=>{const o=e.p.nodeType===11&&e.p.host?e.p.host:e.p;const l=t&&t.o||u;const c=e.o||u;{for(s in l){if(!(s in c)){x(o,s,l[s],undefined,n,e.u)}}}for(s in c){x(o,s,l[s],c[s],n,e.u)}};const R=(t,s,l,c)=>{const i=s.l[l];let f=0;let r;let u;if(i.t!==null){r=i.p=Ot.createTextNode(i.t)}else{if(!o){o=i.v==="svg"}r=i.p=Ot.createElementNS(o?a:d,i.v);if(o&&i.v==="foreignObject"){o=false}{N(null,i,o)}if(v(e)&&r["s-si"]!==e){r.classList.add(r["s-si"]=e)}if(i.l){for(f=0;f<i.l.length;++f){u=R(t,i,f);if(u){r.appendChild(u)}}}{if(i.v==="svg"){o=false}else if(r.tagName==="foreignObject"){o=true}}}r["s-hn"]=n;return r};const T=(t,e,s,o,l,c)=>{let i=t;let f;if(i.shadowRoot&&i.tagName===n){i=i.shadowRoot}for(;l<=c;++l){if(o[l]){f=R(null,s,l);if(f){o[l].p=f;i.insertBefore(f,e)}}}};const W=(t,e,n)=>{for(let s=e;s<=n;++s){const e=t[s];if(e){const t=e.p;if(t){t.remove()}}}};const F=(t,e,n,s,o=false)=>{let l=0;let c=0;let i=0;let f=0;let r=e.length-1;let u=e[0];let a=e[r];let d=s.length-1;let v=s[0];let p=s[d];let h;let y;while(l<=r&&c<=d){if(u==null){u=e[++l]}else if(a==null){a=e[--r]}else if(v==null){v=s[++c]}else if(p==null){p=s[--d]}else if(H(u,v,o)){q(u,v,o);u=e[++l];v=s[++c]}else if(H(a,p,o)){q(a,p,o);a=e[--r];p=s[--d]}else if(H(u,p,o)){q(u,p,o);t.insertBefore(u.p,a.p.nextSibling);u=e[++l];p=s[--d]}else if(H(a,v,o)){q(a,v,o);t.insertBefore(a.p,u.p);a=e[--r];v=s[++c]}else{i=-1;{for(f=l;f<=r;++f){if(e[f]&&e[f].i!==null&&e[f].i===v.i){i=f;break}}}if(i>=0){y=e[i];if(y.v!==v.v){h=R(e&&e[c],n,i)}else{q(y,v,o);e[i]=undefined;h=y.p}v=s[++c]}else{h=R(e&&e[c],n,c);v=s[++c]}if(h){{u.p.parentNode.insertBefore(h,u.p)}}}}if(l>r){T(t,s[d+1]==null?null:s[d+1].p,n,s,c,d)}else if(c>d){W(e,l,r)}};const H=(t,e,n=false)=>{if(t.v===e.v){if(!n){return t.i===e.i}return true}return false};const q=(t,e,n=false)=>{const l=e.p=t.p;const c=t.l;const i=e.l;const f=e.v;const r=e.t;if(r===null){{o=f==="svg"?true:f==="foreignObject"?false:o}{if(f==="slot"&&!s);else{N(t,e,o)}}if(c!==null&&i!==null){F(l,c,e,i,n)}else if(i!==null){if(t.t!==null){l.textContent=""}T(l,null,e,i,0,i.length-1)}else if(c!==null){W(c,0,c.length-1)}if(o&&f==="svg"){o=false}}else if(t.t!==r){l.data=r}};const D=(t,o,l=false)=>{const c=t.$hostElement$;const i=t.m;const f=t.S||m(null,null);const r=w(o)?o:y(null,null,o);n=c.tagName;if(i.j){r.o=r.o||{};i.j.map((([t,e])=>r.o[e]=c[t]))}if(l&&r.o){for(const t of Object.keys(r.o)){if(c.hasAttribute(t)&&!["key","ref","style","class"].includes(t)){r.o[t]=c[t]}}}r.v=null;r.u|=4;t.S=r;r.p=f.p=c.shadowRoot||c;{e=c["s-sc"]}s=(i.u&1)!==0;q(f,r,l)};const I=(t,e)=>{if(e&&!t.O&&e["s-p"]){e["s-p"].push(new Promise((e=>t.O=e)))}};const V=(t,e)=>{{t.u|=16}if(t.u&4){t.u|=512;return}I(t,t.k);const n=()=>_(t,e);return Rt(n)};const _=(t,e)=>{const n=c("scheduleUpdate",t.m.$);const s=t.C;let o;if(e){{t.u|=256;if(t.M){t.M.map((([t,e])=>Y(s,t,e)));t.M=undefined}}{o=Y(s,"componentWillLoad")}}n();return z(o,(()=>G(t,s,e)))};const z=(t,e)=>B(t)?t.then(e):e();const B=t=>t instanceof Promise||t&&t.then&&typeof t.then==="function";const G=async(t,e,n)=>{var s;const o=t.$hostElement$;const l=c("update",t.m.$);const i=o["s-rc"];if(n){M(t)}const f=c("render",t.m.$);{J(t,e,o,n)}if(i){i.map((t=>t()));o["s-rc"]=undefined}f();l();{const e=(s=o["s-p"])!==null&&s!==void 0?s:[];const n=()=>K(t);if(e.length===0){n()}else{Promise.all(e).then(n);t.u|=4;e.length=0}}};const J=(t,e,n,s)=>{try{e=e.render();{t.u&=~16}{t.u|=2}{{{D(t,e,s)}}}}catch(e){wt(e,t.$hostElement$)}return null};const K=t=>{const e=t.m.$;const n=t.$hostElement$;const s=c("postUpdate",e);const o=t.C;const l=t.k;if(!(t.u&64)){t.u|=64;{Z(n)}{Y(o,"componentDidLoad")}s();{t.P(n);if(!l){X()}}}else{s()}{t.L(n)}{if(t.O){t.O();t.O=undefined}if(t.u&512){Nt((()=>V(t,false)))}t.u&=~(4|512)}};const Q=t=>{{const e=ht(t);const n=e.$hostElement$.isConnected;if(n&&(e.u&(2|16))===2){V(e,false)}return n}};const X=e=>{{Z(Ot.documentElement)}Nt((()=>j(jt,"appload",{detail:{namespace:t}})))};const Y=(t,e,n)=>{if(t&&t[e]){try{return t[e](n)}catch(t){wt(t)}}return undefined};const Z=t=>t.classList.add("hydrated");const tt=(t,e)=>ht(t).U.get(e);const et=(t,e,n,s)=>{const o=ht(t);const l=o.$hostElement$;const c=o.U.get(e);const i=o.u;const f=o.C;n=$(n,s.A[e][0]);const r=Number.isNaN(c)&&Number.isNaN(n);const u=n!==c&&!r;if((!(i&8)||c===undefined)&&u){o.U.set(e,n);if(f){if(s.N&&i&128){const t=s.N[e];if(t){t.map((t=>{try{f[t](n,c,e)}catch(t){wt(t,l)}}))}}if((i&(2|16))===2){V(o,false)}}}};const nt=(t,e,n)=>{var s;const o=t.prototype;if(e.A){if(t.watchers){e.N=t.watchers}const l=Object.entries(e.A);l.map((([t,[s]])=>{if(s&31||n&2&&s&32){Object.defineProperty(o,t,{get(){return tt(this,t)},set(n){et(this,t,n,e)},configurable:true,enumerable:true})}else if(n&1&&s&64){Object.defineProperty(o,t,{value(...e){var n;const s=ht(this);return(n=s===null||s===void 0?void 0:s.R)===null||n===void 0?void 0:n.then((()=>{var n;return(n=s.C)===null||n===void 0?void 0:n[t](...e)}))}})}}));if(n&1){const n=new Map;o.attributeChangedCallback=function(t,s,l){kt.jmp((()=>{var c;const i=n.get(t);if(this.hasOwnProperty(i)){l=this[i];delete this[i]}else if(o.hasOwnProperty(i)&&typeof this[i]==="number"&&this[i]==l){return}else if(i==null){const n=ht(this);const o=n===null||n===void 0?void 0:n.u;if(o&&!(o&8)&&o&128&&l!==s){const o=n.C;const i=(c=e.N)===null||c===void 0?void 0:c[t];i===null||i===void 0?void 0:i.forEach((e=>{if(o[e]!=null){o[e].call(o,l,s,t)}}))}return}this[i]=l===null&&typeof this[i]==="boolean"?false:l}))};t.observedAttributes=Array.from(new Set([...Object.keys((s=e.N)!==null&&s!==void 0?s:{}),...l.filter((([t,e])=>e[0]&15)).map((([t,s])=>{var o;const l=s[1]||t;n.set(l,t);if(s[0]&512){(o=e.j)===null||o===void 0?void 0:o.push([t,l])}return l}))]))}}return t};const st=async(t,e,n,s)=>{let o;if((e.u&32)===0){e.u|=32;const s=n.T;if(s){o=gt(n);if(o.then){const t=i();o=await o;t()}if(!o.isProxied){{n.N=o.watchers}nt(o,n,2);o.isProxied=true}const t=c("createInstance",n.$);{e.u|=8}try{new o(e)}catch(t){wt(t)}{e.u&=~8}{e.u|=128}t()}else{o=t.constructor;customElements.whenDefined(n.$).then((()=>e.u|=128))}if(o.style){let t=o.style;const e=P(n);if(!St.has(e)){const s=c("registerStyles",n.$);k(e,t,!!(n.u&1));s()}}}const l=e.k;const f=()=>V(e,true);if(l&&l["s-rc"]){l["s-rc"].push(f)}else{f()}};const ot=t=>{};const lt=t=>{if((kt.u&1)===0){const e=ht(t);const n=e.m;const s=c("connectedCallback",n.$);if(!(e.u&1)){e.u|=1;{let n=t;while(n=n.parentNode||n.host){if(n["s-p"]){I(e,e.k=n);break}}}if(n.A){Object.entries(n.A).map((([e,[n]])=>{if(n&31&&t.hasOwnProperty(e)){const n=t[e];delete t[e];t[e]=n}}))}{st(t,e,n)}}else{rt(t,e,n.W);if(e===null||e===void 0?void 0:e.C);else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>ot()))}}s()}};const ct=t=>{};const it=async t=>{if((kt.u&1)===0){const e=ht(t);{if(e.H){e.H.map((t=>t()));e.H=undefined}}if(e===null||e===void 0?void 0:e.C);else if(e===null||e===void 0?void 0:e.F){e.F.then((()=>ct()))}}};const ft=(t,e={})=>{var n;const s=c();const o=[];const l=e.exclude||[];const i=jt.customElements;const u=Ot.head;const a=u.querySelector("meta[charset]");const d=Ot.createElement("style");const v=[];let p;let y=true;Object.assign(kt,e);kt.q=new URL(e.resourcesUrl||"./",Ot.baseURI).href;let m=false;t.map((t=>{t[1].map((e=>{var n;const s={u:e[0],$:e[1],A:e[2],W:e[3]};if(s.u&4){m=true}{s.A=e[2]}{s.W=e[3]}{s.j=[]}{s.N=(n=e[4])!==null&&n!==void 0?n:{}}const c=s.$;const f=class extends HTMLElement{constructor(t){super(t);t=this;mt(t,s);if(s.u&1){{{t.attachShadow({mode:"open"})}}}}connectedCallback(){if(p){clearTimeout(p);p=null}if(y){v.push(this)}else{kt.jmp((()=>lt(this)))}}disconnectedCallback(){kt.jmp((()=>it(this)))}componentOnReady(){return ht(this).F}};s.T=t[0];if(!l.includes(c)&&!i.get(c)){o.push(c);i.define(c,nt(f,s,1))}}))}));if(o.length>0){if(m){d.textContent+=r}{d.textContent+=o+f}if(d.innerHTML.length){d.setAttribute("data-styles","");const t=(n=kt.h)!==null&&n!==void 0?n:h(Ot);if(t!=null){d.setAttribute("nonce",t)}u.insertBefore(d,a?a.nextSibling:u.firstChild)}}y=false;if(v.length){v.map((t=>t.connectedCallback()))}else{{kt.jmp((()=>p=setTimeout(X,30)))}}s()};const rt=(t,e,n,s)=>{if(n){n.map((([n,s,o])=>{const l=at(t,n);const c=ut(e,o);const i=dt(n);kt.ael(l,s,c,i);(e.H=e.H||[]).push((()=>kt.rel(l,s,c,i)))}))}};const ut=(t,e)=>n=>{try{{if(t.u&256){t.C[e](n)}else{(t.M=t.M||[]).push([e,n])}}}catch(t){wt(t)}};const at=(t,e)=>{if(e&8)return jt;return t};const dt=t=>Ct?{passive:(t&1)!==0,capture:(t&2)!==0}:(t&2)!==0;const vt=t=>kt.h=t;const pt=new WeakMap;const ht=t=>pt.get(t);const yt=(t,e)=>pt.set(e.C=t,e);const mt=(t,e)=>{const n={u:0,$hostElement$:t,m:e,U:new Map};{n.R=new Promise((t=>n.L=t))}{n.F=new Promise((t=>n.P=t));t["s-p"]=[];t["s-rc"]=[]}rt(t,n,e.W);return pt.set(t,n)};const bt=(t,e)=>e in t;const wt=(t,e)=>(0,console.error)(t,e);const $t=new Map;const gt=(t,e,n)=>{const s=t.$.replace(/-/g,"_");const o=t.T;const l=$t.get(o);if(l){return l[s]}
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import(`./${o}.entry.js${""}`).then((t=>{{$t.set(o,t)}return t[s]}),wt)};const St=new Map;const jt=typeof window!=="undefined"?window:{};const Ot=jt.document||{head:{}};const kt={u:0,q:"",jmp:t=>t(),raf:t=>requestAnimationFrame(t),ael:(t,e,n,s)=>t.addEventListener(e,n,s),rel:(t,e,n,s)=>t.removeEventListener(e,n,s),ce:(t,e)=>new CustomEvent(t,e)};const Ct=(()=>{let t=false;try{Ot.addEventListener("e",null,Object.defineProperty({},"passive",{get(){t=true}}))}catch(t){}return t})();const Mt=t=>Promise.resolve(t);const Pt=(()=>{try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(t){}return false})();const xt=[];const Et=[];const Lt=(t,e)=>n=>{t.push(n);if(!l){l=true;if(e&&kt.u&4){Nt(At)}else{kt.raf(At)}}};const Ut=t=>{for(let e=0;e<t.length;e++){try{t[e](performance.now())}catch(t){wt(t)}}t.length=0};const At=()=>{Ut(xt);{Ut(Et);if(l=xt.length>0){kt.raf(At)}}};const Nt=t=>Mt().then(t);const Rt=Lt(Et,true);export{b as H,ft as b,S as c,Q as f,g,y as h,Mt as p,yt as r,vt as s};
|
3
|
+
//# sourceMappingURL=p-6fb7c4d1.js.map
|