@consumidor-positivo/aurora 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/README.md +59 -3
  2. package/astro/AdBox/index.astro +28 -0
  3. package/astro/Alert/index.astro +257 -0
  4. package/astro/BadgeInfo/index.astro +55 -0
  5. package/astro/BadgeState/index.astro +79 -0
  6. package/astro/Button/index.astro +11 -3
  7. package/astro/Card/Container/index.astro +44 -0
  8. package/astro/Card/Emphasis/index.astro +39 -0
  9. package/astro/Card/Image/index.astro +26 -0
  10. package/astro/Card/Root/index.astro +53 -0
  11. package/astro/Card/Tag/index.astro +26 -0
  12. package/astro/Chip/index.astro +48 -0
  13. package/astro/ChipBanner/index.astro +160 -0
  14. package/astro/Container/index.astro +16 -0
  15. package/astro/Divider/index.astro +27 -0
  16. package/astro/Image/index.astro +26 -0
  17. package/astro/LazyImage/index.astro +55 -0
  18. package/astro/LinkButton/index.astro +54 -0
  19. package/astro/Logo/ac/BadgeFullWhite.astro +20 -0
  20. package/astro/Logo/ac/BadgeWhite.astro +23 -0
  21. package/astro/Logo/ac/BadgeWhiteStroke.astro +27 -0
  22. package/astro/Logo/ac/BadgeWhiteStrokeDefault.astro +28 -0
  23. package/astro/Logo/ac/Badget.astro +24 -0
  24. package/astro/Logo/ac/Primary.astro +28 -0
  25. package/astro/Logo/ac/PrimaryFillWhite.astro +28 -0
  26. package/astro/Logo/ac/PrimaryFullWhite.astro +20 -0
  27. package/astro/Logo/ac/PrimaryNegative.astro +20 -0
  28. package/astro/Logo/ac/PrimaryWhite.astro +20 -0
  29. package/astro/Logo/ac/TertiaryWhite.astro +72 -0
  30. package/astro/Logo/cp/BadgeWhiteStroke.astro +10 -0
  31. package/astro/Logo/cp/Badget.astro +14 -0
  32. package/astro/Logo/cp/PrimaryFillWhite.astro +63 -0
  33. package/astro/Logo/cp/PrimaryFullWhite.astro +27 -0
  34. package/astro/Logo/cp/PrimaryLogoWhite.astro +67 -0
  35. package/astro/Logo/cp/PrimaryNegative.astro +27 -0
  36. package/astro/Logo/cp/PrimaryWhite.astro +27 -0
  37. package/astro/Modal/index.astro +213 -0
  38. package/astro/NotificationsBar/Link/index.astro +70 -0
  39. package/astro/NotificationsBar/List/index.astro +38 -0
  40. package/astro/NotificationsBar/index.astro +24 -0
  41. package/astro/PartnerBanner/index.astro +52 -0
  42. package/astro/ProfileNav/index.astro +34 -0
  43. package/astro/ProgressBar/index.astro +70 -0
  44. package/astro/Skeleton/index.astro +50 -0
  45. package/astro/SpecialButton/index.astro +331 -0
  46. package/astro/Spinner/index.astro +75 -0
  47. package/astro/SubHeader/index.astro +57 -0
  48. package/astro/Switch/Card/index.astro +69 -0
  49. package/astro/Switch/Pure/index.astro +47 -0
  50. package/astro/Tooltip/index.astro +38 -0
  51. package/astro/form/Checkbox/Field/index.astro +68 -0
  52. package/astro/form/Checkbox/Group/index.astro +79 -0
  53. package/astro/form/Datepicker/Calendar/index.astro +53 -0
  54. package/astro/form/Datepicker/CalendarHeader/index.astro +57 -0
  55. package/astro/form/Datepicker/Segment/index.astro +53 -0
  56. package/astro/form/Datepicker/index.astro +756 -0
  57. package/astro/form/EmailField/index.astro +237 -0
  58. package/astro/form/Field/ErrorMessage/index.astro +20 -0
  59. package/astro/form/Field/Input/index.astro +15 -0
  60. package/astro/form/Field/InputHolder/index.astro +28 -0
  61. package/astro/form/Field/Label/index.astro +80 -0
  62. package/astro/form/Field/Message/index.astro +29 -0
  63. package/astro/form/Field/Root/index.astro +37 -0
  64. package/astro/form/Field/TextArea/index.astro +69 -0
  65. package/astro/form/InputField/index.astro +96 -0
  66. package/astro/form/PasswordField/index.astro +123 -0
  67. package/astro/form/Radio/Field/index.astro +52 -0
  68. package/astro/form/Radio/Group/index.astro +78 -0
  69. package/astro/form/SelectField/index.astro +561 -0
  70. package/astro/form/TextareaField/index.astro +81 -0
  71. package/astro/form/TokenField/index.astro +211 -0
  72. package/astro/tokens/package.json +6 -0
  73. package/dist/{tokens-C4ypB4bY.js → astro/tokens/index.es.js} +101 -101
  74. package/dist/astro/tokens/index.es.js.map +1 -0
  75. package/dist/components/Alert/index.es.js +1 -1
  76. package/dist/components/BadgeInfo/index.es.js +1 -1
  77. package/dist/components/BadgeState/index.es.js +1 -1
  78. package/dist/components/Image/index.es.js +1 -1
  79. package/dist/components/Spinner/index.es.js +1 -1
  80. package/dist/components/form/Checkbox/Field/index.es.js +1 -1
  81. package/dist/components/form/Datepicker/Calendar/index.es.js +2 -2
  82. package/dist/components/form/Datepicker/CalendarHeader/index.es.js +2 -2
  83. package/dist/components/form/Datepicker/PortalHolder/index.es.js +1 -1
  84. package/dist/components/form/Datepicker/Segment/index.es.js +1 -1
  85. package/dist/components/form/Datepicker/index.es.js +3 -3
  86. package/dist/components/form/Field/Label/index.es.js +1 -1
  87. package/dist/components/form/SelectField/index.es.js +1 -1
  88. package/dist/{index-BcC9liUl.js → index-Bkl5OBIY.js} +3 -3
  89. package/dist/{index-BcC9liUl.js.map → index-Bkl5OBIY.js.map} +1 -1
  90. package/dist/{index-CFYmtkje.js → index-CZfMkAoF.js} +2 -2
  91. package/dist/{index-CFYmtkje.js.map → index-CZfMkAoF.js.map} +1 -1
  92. package/dist/{index-CeClo_WS.js → index-Cw1KtRQr.js} +2 -2
  93. package/dist/{index-CeClo_WS.js.map → index-Cw1KtRQr.js.map} +1 -1
  94. package/dist/main.es.js +101 -101
  95. package/package.json +7 -1
  96. package/dist/tokens-C4ypB4bY.js.map +0 -1
@@ -0,0 +1,211 @@
1
+ ---
2
+ import type { HTMLAttributes } from 'astro/types'
3
+ import FieldRoot from '../Field/Root/index.astro'
4
+ import FieldLabel from '../Field/Label/index.astro'
5
+ import FieldInput from '../Field/Input/index.astro'
6
+ import FieldMessage from '../Field/Message/index.astro'
7
+ import '../../../dist/components/TokenField/styles.css'
8
+
9
+ /**
10
+ * Same props as the React `TokenField`. Every other HTML attribute (`id`,
11
+ * `data-*`, `style`) lands on the `au-field au-token-field` root; the React
12
+ * `data-testid` goes on the digits container instead.
13
+ *
14
+ * The digit handling is the component's own behavior, kept by an inline
15
+ * controller that follows the React hook step by step: a digit fills the first
16
+ * empty slot and moves to the next one, Backspace clears the current digit
17
+ * (and moves back when it was already empty), paste spreads the digits, and
18
+ * the optional `timer` counts down and clears the token when it hits zero. The
19
+ * React callbacks become events that bubble from the root, fired at the same
20
+ * moments: `au:tokenchange` and `au:tokencomplete` (both with `detail.value`)
21
+ * replace `onChange`/`onComplete`, and `au:tokentimer` (`detail.time`, from
22
+ * `timer` down to 1) replaces `onChangeTimer`.
23
+ */
24
+ export type Props = Omit<HTMLAttributes<'div'>, 'color'> & {
25
+ label?: string
26
+ disabled?: boolean
27
+ success?: boolean
28
+ error?: boolean
29
+ errorMessage?: string
30
+ helpMessage?: string
31
+ showOptionalLabel?: boolean
32
+ /** Number of digits. Defaults to 6. */
33
+ size?: number
34
+ type?: 'number' | 'password' | 'text'
35
+ /** Seconds until the token is cleared. */
36
+ timer?: number
37
+ }
38
+
39
+ const {
40
+ label,
41
+ disabled = false,
42
+ success = false,
43
+ error = false,
44
+ errorMessage,
45
+ helpMessage,
46
+ showOptionalLabel,
47
+ size = 6,
48
+ type,
49
+ timer,
50
+ class: className,
51
+ 'data-testid': dataTestId,
52
+ ...rest
53
+ } = Astro.props
54
+
55
+ const digits = Array.from({ length: size }, (_, i) => i)
56
+ ---
57
+
58
+ <FieldRoot
59
+ class:list={['au-token-field', className]}
60
+ success={success}
61
+ error={error}
62
+ disabled={disabled}
63
+ data-element="au-token-field"
64
+ data-timer={timer || undefined}
65
+ {...rest}>
66
+ <FieldLabel
67
+ text={label}
68
+ showOptionalLabel={showOptionalLabel}
69
+ success={success}
70
+ error={error}
71
+ disabled={disabled}
72
+ />
73
+ <div class="au-token-field__container" data-testid={dataTestId}>
74
+ {
75
+ digits.map((i) => (
76
+ <div>
77
+ <FieldInput
78
+ class="au-token-field__input"
79
+ type={type || 'number'}
80
+ value=""
81
+ disabled={disabled}
82
+ data-token-i={i}
83
+ inputmode="numeric"
84
+ autocomplete="one-time-code"
85
+ />
86
+ </div>
87
+ ))
88
+ }
89
+ </div>
90
+ <FieldMessage hasError={error} errorMessage={errorMessage} helpMessage={helpMessage} />
91
+ </FieldRoot>
92
+
93
+ <script>
94
+ import { elementController } from '@consumidor-positivo/aurora/astro/runtime'
95
+
96
+ const TICK_MS = 1000
97
+
98
+ // Same check as the React hook (`inputtedValueIsValid`).
99
+ const isValid = (value: string) => !Number.isNaN(Number(value))
100
+
101
+ elementController('au-token-field', ({ root, queryAll, on, emit }) => {
102
+ const inputs = queryAll<HTMLInputElement>('[data-token-i]')
103
+ const size = inputs.length
104
+ const emptyTokens = () => inputs.map(() => '')
105
+ let tokens: string[] = emptyTokens()
106
+ // React's value tracker: an input event that leaves the value where it was
107
+ // last seen does not reach `onChange`.
108
+ const seen = inputs.map((input) => input.value)
109
+
110
+ const indexOf = (target: EventTarget | null) => {
111
+ const index = (target as HTMLElement | null)?.dataset?.tokenI
112
+ return index === undefined ? -1 : Number(index)
113
+ }
114
+
115
+ const focusAt = (index: number) => inputs[index]?.focus()
116
+
117
+ // React keeps every digit controlled: after any change event the DOM value
118
+ // goes back to the state, whether or not the state moved.
119
+ function syncInputs() {
120
+ inputs.forEach((input, i) => {
121
+ if (input.value !== tokens[i]) input.value = tokens[i]
122
+ seen[i] = input.value
123
+ })
124
+ }
125
+
126
+ // `setTokenMap` + the `[tokenMap]` effect: every set fires the callbacks,
127
+ // even when the digits did not change.
128
+ function setTokens(next: string[]) {
129
+ tokens = next
130
+ syncInputs()
131
+ const value = tokens.join('')
132
+ emit('au:tokenchange', { value })
133
+ if (value.length === size) emit('au:tokencomplete', { value })
134
+ }
135
+
136
+ on('input', (event) => {
137
+ const i = indexOf(event.target)
138
+ if (i < 0) return
139
+
140
+ let value = inputs[i].value
141
+ if (value === seen[i]) return
142
+ seen[i] = value
143
+ const isEmpty = value === ''
144
+
145
+ if (isValid(value)) {
146
+ let firstEmpty = tokens.findIndex((token) => token === '')
147
+
148
+ if (value.length > 1) {
149
+ firstEmpty = firstEmpty - 1
150
+ value = value[value.length - 1]
151
+ }
152
+
153
+ if (firstEmpty < 0) {
154
+ if (value) setTokens(tokens.map((token, j) => (j === i ? value : token)))
155
+ syncInputs()
156
+ return
157
+ }
158
+
159
+ setTokens(tokens.map((token, j) => (j === firstEmpty ? value : token)))
160
+ if (!isEmpty) focusAt(firstEmpty + 1)
161
+ }
162
+ syncInputs()
163
+ })
164
+
165
+ on('keyup', (event) => {
166
+ const i = indexOf(event.target)
167
+ if (i < 0) return
168
+ if (event.which !== 8 && event.key !== 'Backspace') return
169
+
170
+ const previous = inputs[i - 1]
171
+ // React reads the value before its re-render clears the digit.
172
+ const currentHadValue = !!inputs[i].value
173
+ setTokens(tokens.map((token, j) => (j === i ? '' : token)))
174
+ if (previous && !currentHadValue) previous.focus()
175
+ })
176
+
177
+ on('paste', (event) => {
178
+ if (indexOf(event.target) < 0) return
179
+ event.preventDefault()
180
+
181
+ const value = event.clipboardData?.getData('Text') ?? ''
182
+ if (isValid(value)) {
183
+ const pasted = value.split('').slice(0, size)
184
+ setTokens(inputs.map((_, i) => pasted[i] ?? ''))
185
+ focusAt(pasted.length)
186
+ } else {
187
+ setTokens(emptyTokens())
188
+ }
189
+ })
190
+
191
+ // The `[tokenMap]` effect also runs on mount.
192
+ setTokens(tokens)
193
+
194
+ const timer = Number(root.dataset.timer) || null
195
+ let time: number | null = timer
196
+ // The `[timerTime]` effect runs on mount too.
197
+ if (time) emit('au:tokentimer', { time })
198
+ if (timer) {
199
+ const interval = setInterval(() => {
200
+ time = time ? time - 1 : null
201
+ if (time) emit('au:tokentimer', { time })
202
+ if (time === 0) {
203
+ setTokens(emptyTokens())
204
+ focusAt(0)
205
+ }
206
+ // From here on the React updater only returns null: nothing observable.
207
+ if (!time) clearInterval(interval)
208
+ }, TICK_MS)
209
+ }
210
+ })
211
+ </script>
@@ -0,0 +1,6 @@
1
+ {
2
+ "main": "../../dist/astro/tokens/index.es.js",
3
+ "module": "../../dist/astro/tokens/index.es.js",
4
+ "types": "../../dist/core/tokens/index.d.ts",
5
+ "sideEffects": false
6
+ }
@@ -99,105 +99,105 @@ const FONT_SIZE_P2 = "16px";
99
99
  const FONT_SIZE_P3 = "14px";
100
100
  const FONT_SIZE_P4 = "12px";
101
101
  export {
102
- COLOR_SUCCESS_30 as $,
103
- COLOR_ERROR_00 as A,
104
- BORDER_RADIUS_BIG as B,
105
- COLOR_BRAND_BLUE_00 as C,
106
- COLOR_ERROR_10 as D,
107
- COLOR_ERROR_20 as E,
108
- COLOR_ERROR_30 as F,
109
- COLOR_ERROR_40 as G,
110
- COLOR_ERROR_50 as H,
111
- COLOR_ERROR_60 as I,
112
- COLOR_INFO_00 as J,
113
- COLOR_INFO_10 as K,
114
- COLOR_INFO_20 as L,
115
- COLOR_INFO_30 as M,
116
- COLOR_INFO_40 as N,
117
- COLOR_INFO_50 as O,
118
- COLOR_INFO_60 as P,
119
- COLOR_NEUTRAL_00 as Q,
120
- COLOR_NEUTRAL_10 as R,
121
- COLOR_NEUTRAL_20 as S,
122
- COLOR_NEUTRAL_30 as T,
123
- COLOR_NEUTRAL_40 as U,
124
- COLOR_NEUTRAL_50 as V,
125
- COLOR_NEUTRAL_60 as W,
126
- COLOR_NEUTRAL_70 as X,
127
- COLOR_SUCCESS_00 as Y,
128
- COLOR_SUCCESS_10 as Z,
129
- COLOR_SUCCESS_20 as _,
130
- BORDER_RADIUS_MEDIUM as a,
131
- COLOR_SUCCESS_40 as a0,
132
- COLOR_SUCCESS_50 as a1,
133
- COLOR_SUCCESS_60 as a2,
134
- COLOR_WARNING_00 as a3,
135
- COLOR_WARNING_10 as a4,
136
- COLOR_WARNING_20 as a5,
137
- COLOR_WARNING_30 as a6,
138
- COLOR_WARNING_40 as a7,
139
- COLOR_WARNING_50 as a8,
140
- COLOR_WARNING_60 as a9,
141
- SPACING_050 as aA,
142
- SPACING_100 as aB,
143
- SPACING_200 as aC,
144
- SPACING_300 as aD,
145
- SPACING_400 as aE,
146
- SPACING_500 as aF,
147
- SPACING_600 as aG,
148
- SPACING_700 as aH,
149
- SPACING_800 as aI,
150
- SPACING_900 as aJ,
151
- CONTAINER_SIZE as aa,
152
- FONT_BODY as ab,
153
- FONT_SIZE_H1 as ac,
154
- FONT_SIZE_H2 as ad,
155
- FONT_SIZE_H3 as ae,
156
- FONT_SIZE_H4 as af,
157
- FONT_SIZE_H5 as ag,
158
- FONT_SIZE_H6 as ah,
159
- FONT_SIZE_P1 as ai,
160
- FONT_SIZE_P2 as aj,
161
- FONT_SIZE_P3 as ak,
162
- FONT_SIZE_P4 as al,
163
- FONT_TITLE as am,
164
- FONT_WEIGHT_BOLD as an,
165
- FONT_WEIGHT_MEDIUM as ao,
166
- FONT_WEIGHT_REGULAR as ap,
167
- FONT_WEIGHT_SEMIBOLD as aq,
168
- OPACITY_00 as ar,
169
- OPACITY_10 as as,
170
- OPACITY_20 as at,
171
- OPACITY_30 as au,
172
- OPACITY_40 as av,
173
- SHADOW_01 as aw,
174
- SHADOW_02 as ax,
175
- SHADOW_03 as ay,
176
- SHADOW_04 as az,
177
- BORDER_RADIUS_PILL as b,
178
- BORDER_RADIUS_SMALL as c,
179
- BREAKPOINT_LG as d,
180
- BREAKPOINT_MD as e,
181
- BREAKPOINT_SM as f,
182
- BREAKPOINT_XLG as g,
183
- BREAKPOINT_XSM as h,
184
- COLOR_BRAND_BLUE_10 as i,
185
- COLOR_BRAND_BLUE_20 as j,
186
- COLOR_BRAND_BLUE_30 as k,
187
- COLOR_BRAND_BLUE_40 as l,
188
- COLOR_BRAND_BLUE_50 as m,
189
- COLOR_BRAND_BLUE_60 as n,
190
- COLOR_BRAND_CYAN_10 as o,
191
- COLOR_BRAND_CYAN_20 as p,
192
- COLOR_BRAND_CYAN_30 as q,
193
- COLOR_BRAND_CYAN_40 as r,
194
- COLOR_BRAND_CYAN_50 as s,
195
- COLOR_BRAND_CYAN_60 as t,
196
- COLOR_BRAND_EMERALD_10 as u,
197
- COLOR_BRAND_EMERALD_20 as v,
198
- COLOR_BRAND_EMERALD_30 as w,
199
- COLOR_BRAND_EMERALD_40 as x,
200
- COLOR_BRAND_EMERALD_50 as y,
201
- COLOR_BRAND_EMERALD_60 as z
102
+ BORDER_RADIUS_BIG,
103
+ BORDER_RADIUS_MEDIUM,
104
+ BORDER_RADIUS_PILL,
105
+ BORDER_RADIUS_SMALL,
106
+ BREAKPOINT_LG,
107
+ BREAKPOINT_MD,
108
+ BREAKPOINT_SM,
109
+ BREAKPOINT_XLG,
110
+ BREAKPOINT_XSM,
111
+ COLOR_BRAND_BLUE_00,
112
+ COLOR_BRAND_BLUE_10,
113
+ COLOR_BRAND_BLUE_20,
114
+ COLOR_BRAND_BLUE_30,
115
+ COLOR_BRAND_BLUE_40,
116
+ COLOR_BRAND_BLUE_50,
117
+ COLOR_BRAND_BLUE_60,
118
+ COLOR_BRAND_CYAN_10,
119
+ COLOR_BRAND_CYAN_20,
120
+ COLOR_BRAND_CYAN_30,
121
+ COLOR_BRAND_CYAN_40,
122
+ COLOR_BRAND_CYAN_50,
123
+ COLOR_BRAND_CYAN_60,
124
+ COLOR_BRAND_EMERALD_10,
125
+ COLOR_BRAND_EMERALD_20,
126
+ COLOR_BRAND_EMERALD_30,
127
+ COLOR_BRAND_EMERALD_40,
128
+ COLOR_BRAND_EMERALD_50,
129
+ COLOR_BRAND_EMERALD_60,
130
+ COLOR_ERROR_00,
131
+ COLOR_ERROR_10,
132
+ COLOR_ERROR_20,
133
+ COLOR_ERROR_30,
134
+ COLOR_ERROR_40,
135
+ COLOR_ERROR_50,
136
+ COLOR_ERROR_60,
137
+ COLOR_INFO_00,
138
+ COLOR_INFO_10,
139
+ COLOR_INFO_20,
140
+ COLOR_INFO_30,
141
+ COLOR_INFO_40,
142
+ COLOR_INFO_50,
143
+ COLOR_INFO_60,
144
+ COLOR_NEUTRAL_00,
145
+ COLOR_NEUTRAL_10,
146
+ COLOR_NEUTRAL_20,
147
+ COLOR_NEUTRAL_30,
148
+ COLOR_NEUTRAL_40,
149
+ COLOR_NEUTRAL_50,
150
+ COLOR_NEUTRAL_60,
151
+ COLOR_NEUTRAL_70,
152
+ COLOR_SUCCESS_00,
153
+ COLOR_SUCCESS_10,
154
+ COLOR_SUCCESS_20,
155
+ COLOR_SUCCESS_30,
156
+ COLOR_SUCCESS_40,
157
+ COLOR_SUCCESS_50,
158
+ COLOR_SUCCESS_60,
159
+ COLOR_WARNING_00,
160
+ COLOR_WARNING_10,
161
+ COLOR_WARNING_20,
162
+ COLOR_WARNING_30,
163
+ COLOR_WARNING_40,
164
+ COLOR_WARNING_50,
165
+ COLOR_WARNING_60,
166
+ CONTAINER_SIZE,
167
+ FONT_BODY,
168
+ FONT_SIZE_H1,
169
+ FONT_SIZE_H2,
170
+ FONT_SIZE_H3,
171
+ FONT_SIZE_H4,
172
+ FONT_SIZE_H5,
173
+ FONT_SIZE_H6,
174
+ FONT_SIZE_P1,
175
+ FONT_SIZE_P2,
176
+ FONT_SIZE_P3,
177
+ FONT_SIZE_P4,
178
+ FONT_TITLE,
179
+ FONT_WEIGHT_BOLD,
180
+ FONT_WEIGHT_MEDIUM,
181
+ FONT_WEIGHT_REGULAR,
182
+ FONT_WEIGHT_SEMIBOLD,
183
+ OPACITY_00,
184
+ OPACITY_10,
185
+ OPACITY_20,
186
+ OPACITY_30,
187
+ OPACITY_40,
188
+ SHADOW_01,
189
+ SHADOW_02,
190
+ SHADOW_03,
191
+ SHADOW_04,
192
+ SPACING_050,
193
+ SPACING_100,
194
+ SPACING_200,
195
+ SPACING_300,
196
+ SPACING_400,
197
+ SPACING_500,
198
+ SPACING_600,
199
+ SPACING_700,
200
+ SPACING_800,
201
+ SPACING_900
202
202
  };
203
- //# sourceMappingURL=tokens-C4ypB4bY.js.map
203
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../../lib/core/tokens/.cache/tokens.ts"],"sourcesContent":["export const BORDER_RADIUS_SMALL = \"4px\";\nexport const BORDER_RADIUS_MEDIUM = \"8px\";\nexport const BORDER_RADIUS_BIG = \"16px\";\nexport const BORDER_RADIUS_PILL = \"999px\";\nexport const COLOR_NEUTRAL_70 = \"#16181d\";\nexport const COLOR_NEUTRAL_60 = \"#313131\";\nexport const COLOR_NEUTRAL_50 = \"#454a54\";\nexport const COLOR_NEUTRAL_40 = \"#5e6573\";\nexport const COLOR_NEUTRAL_30 = \"#c4c9d4\";\nexport const COLOR_NEUTRAL_20 = \"#e2e4e9\";\nexport const COLOR_NEUTRAL_10 = \"#f6f7fa\";\nexport const COLOR_NEUTRAL_00 = \"#ffffff\";\nexport const COLOR_BRAND_BLUE_60 = \"#18256c\";\nexport const COLOR_BRAND_BLUE_50 = \"#1737a4\";\nexport const COLOR_BRAND_BLUE_40 = \"#0048db\";\nexport const COLOR_BRAND_BLUE_30 = \"#9abcff\";\nexport const COLOR_BRAND_BLUE_20 = \"#dce8ff\";\nexport const COLOR_BRAND_BLUE_10 = \"#fafbff\";\nexport const COLOR_BRAND_BLUE_00 = \"#F2F5FC\";\nexport const COLOR_BRAND_EMERALD_60 = \"#013220\";\nexport const COLOR_BRAND_EMERALD_50 = \"#026441\";\nexport const COLOR_BRAND_EMERALD_40 = \"#04d98c\";\nexport const COLOR_BRAND_EMERALD_30 = \"#95f0cf\";\nexport const COLOR_BRAND_EMERALD_20 = \"#ccf2e4\";\nexport const COLOR_BRAND_EMERALD_10 = \"#edfef7\";\nexport const COLOR_BRAND_CYAN_60 = \"#004155\";\nexport const COLOR_BRAND_CYAN_50 = \"#005c77\";\nexport const COLOR_BRAND_CYAN_40 = \"#02bedf\";\nexport const COLOR_BRAND_CYAN_30 = \"#3edcff\";\nexport const COLOR_BRAND_CYAN_20 = \"#ccf3ff\";\nexport const COLOR_BRAND_CYAN_10 = \"#f1fcff\";\nexport const COLOR_SUCCESS_60 = \"#08331a\";\nexport const COLOR_SUCCESS_50 = \"#10593b\";\nexport const COLOR_SUCCESS_40 = \"#138040\";\nexport const COLOR_SUCCESS_30 = \"#66cc90\";\nexport const COLOR_SUCCESS_20 = \"#a1e5bd\";\nexport const COLOR_SUCCESS_10 = \"#e5fff0\";\nexport const COLOR_SUCCESS_00 = \"#f0fcf5\";\nexport const COLOR_ERROR_60 = \"#731111\";\nexport const COLOR_ERROR_50 = \"#991717\";\nexport const COLOR_ERROR_40 = \"#e52222\";\nexport const COLOR_ERROR_30 = \"#ff8080\";\nexport const COLOR_ERROR_20 = \"#ffbfbf\";\nexport const COLOR_ERROR_10 = \"#ffe5e5\";\nexport const COLOR_ERROR_00 = \"#f5eff0\";\nexport const COLOR_WARNING_60 = \"#803500\";\nexport const COLOR_WARNING_50 = \"#a64a08\";\nexport const COLOR_WARNING_40 = \"#fa822c\";\nexport const COLOR_WARNING_30 = \"#ffc59c\";\nexport const COLOR_WARNING_20 = \"#ffdabf\";\nexport const COLOR_WARNING_10 = \"#fff0e6\";\nexport const COLOR_WARNING_00 = \"#fcf4f0\";\nexport const COLOR_INFO_60 = \"#46008c\";\nexport const COLOR_INFO_50 = \"#510cb2\";\nexport const COLOR_INFO_40 = \"#6728e5\";\nexport const COLOR_INFO_30 = \"#bd9cff\";\nexport const COLOR_INFO_20 = \"#d4bfff\";\nexport const COLOR_INFO_10 = \"#eee6ff\";\nexport const COLOR_INFO_00 = \"#f3f0fc\";\nexport const SPACING_050 = \"4px\";\nexport const SPACING_100 = \"8px\";\nexport const SPACING_200 = \"16px\";\nexport const SPACING_300 = \"24px\";\nexport const SPACING_400 = \"32px\";\nexport const SPACING_500 = \"40px\";\nexport const SPACING_600 = \"48px\";\nexport const SPACING_700 = \"56px\";\nexport const SPACING_800 = \"64px\";\nexport const SPACING_900 = \"72px\";\nexport const BREAKPOINT_XSM = \"0px\";\nexport const BREAKPOINT_SM = \"320px\";\nexport const BREAKPOINT_MD = \"600px\";\nexport const BREAKPOINT_LG = \"1024px\";\nexport const BREAKPOINT_XLG = \"1920px\";\nexport const CONTAINER_SIZE = \"1232px\";\nexport const OPACITY_00 = \"0.05\";\nexport const OPACITY_10 = \"0.2\";\nexport const OPACITY_20 = \"0.4\";\nexport const OPACITY_30 = \"0.6\";\nexport const OPACITY_40 = \"0.8\";\nexport const SHADOW_01 = \"0px 2px 8px 0px rgba(169, 177, 197, 0.08), 0px 4px 4px 0px rgba(0, 72, 219, 0.04)\";\nexport const SHADOW_02 = \"0px 8px 24px 0px rgba(118, 134, 173, 0.08), 0px 4px 4px 0px rgba(0, 72, 219, 0.04)\";\nexport const SHADOW_03 = \"0px 16px 40px 0px rgba(118, 134, 173, 0.08), 0px 8px 8px 0px rgba(0, 72, 219, 0.04)\";\nexport const SHADOW_04 = \"0px 24px 56px 0px rgba(118, 134, 173, 0.08), 0px 12px 12px 0px rgba(0, 72, 219, 0.04)\";\nexport const FONT_TITLE = \"'Lexend Deca', sans-serif\";\nexport const FONT_BODY = \"'Source Sans 3', sans-serif\";\nexport const FONT_WEIGHT_BOLD = \"700\";\nexport const FONT_WEIGHT_SEMIBOLD = \"600\";\nexport const FONT_WEIGHT_MEDIUM = \"500\";\nexport const FONT_WEIGHT_REGULAR = \"400\";\nexport const FONT_SIZE_H1 = \"56px\";\nexport const FONT_SIZE_H2 = \"48px\";\nexport const FONT_SIZE_H3 = \"40px\";\nexport const FONT_SIZE_H4 = \"32px\";\nexport const FONT_SIZE_H5 = \"28px\";\nexport const FONT_SIZE_H6 = \"24px\";\nexport const FONT_SIZE_P1 = \"20px\";\nexport const FONT_SIZE_P2 = \"16px\";\nexport const FONT_SIZE_P3 = \"14px\";\nexport const FONT_SIZE_P4 = \"12px\";"],"names":[],"mappings":"AAAO,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAC7B,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAC3B,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAC/B,MAAM,yBAAyB;AAC/B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,sBAAsB;AAC5B,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,cAAc;AACpB,MAAM,iBAAiB;AACvB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,mBAAmB;AACzB,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAC5B,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;"}
@@ -9,9 +9,9 @@ import { IconCheck } from "../icons/IconCheck/index.es.js";
9
9
  import { IconClock } from "../icons/IconClock/index.es.js";
10
10
  import { IconInfo } from "../icons/IconInfo/index.es.js";
11
11
  import { IconX } from "../icons/IconX/index.es.js";
12
+ import { COLOR_NEUTRAL_70, COLOR_WARNING_50, COLOR_NEUTRAL_60, COLOR_BRAND_CYAN_50, COLOR_INFO_50, COLOR_ERROR_50, COLOR_SUCCESS_50 } from "../../astro/tokens/index.es.js";
12
13
  import { Conditional } from "../misc/Conditional/index.es.js";
13
14
  import { Text } from "../Text/index.es.js";
14
- import { X as COLOR_NEUTRAL_70, a8 as COLOR_WARNING_50, W as COLOR_NEUTRAL_60, s as COLOR_BRAND_CYAN_50, O as COLOR_INFO_50, H as COLOR_ERROR_50, a1 as COLOR_SUCCESS_50 } from "../../tokens-C4ypB4bY.js";
15
15
  import './styles.css';const Alert = ({
16
16
  showIcon = true,
17
17
  status = "info",
@@ -3,8 +3,8 @@ import { c as classNames } from "../../index-BW2ZU5Hx.js";
3
3
  import "react";
4
4
  import "../Icon/index.es.js";
5
5
  import { IconInfo } from "../icons/IconInfo/index.es.js";
6
+ import { COLOR_NEUTRAL_70, COLOR_BRAND_CYAN_50, COLOR_INFO_50, COLOR_WARNING_50, COLOR_ERROR_50, COLOR_SUCCESS_50 } from "../../astro/tokens/index.es.js";
6
7
  import { I as If, T as Then, E as Else } from "../../react-if.esm-Cozt8l48.js";
7
- import { X as COLOR_NEUTRAL_70, s as COLOR_BRAND_CYAN_50, O as COLOR_INFO_50, a8 as COLOR_WARNING_50, H as COLOR_ERROR_50, a1 as COLOR_SUCCESS_50 } from "../../tokens-C4ypB4bY.js";
8
8
  import './styles.css';const BadgeInfo = ({
9
9
  status,
10
10
  color = "primary",
@@ -7,8 +7,8 @@ import { IconAlertTriangle } from "../icons/IconAlertTriangle/index.es.js";
7
7
  import { IconCheck } from "../icons/IconCheck/index.es.js";
8
8
  import { IconInfo } from "../icons/IconInfo/index.es.js";
9
9
  import { IconMoreHorizontal } from "../icons/IconMoreHorizontal/index.es.js";
10
+ import { COLOR_NEUTRAL_60, COLOR_BRAND_CYAN_50, COLOR_INFO_50, COLOR_WARNING_50, COLOR_ERROR_50, COLOR_SUCCESS_50 } from "../../astro/tokens/index.es.js";
10
11
  import { I as If, T as Then, E as Else } from "../../react-if.esm-Cozt8l48.js";
11
- import { W as COLOR_NEUTRAL_60, s as COLOR_BRAND_CYAN_50, O as COLOR_INFO_50, a8 as COLOR_WARNING_50, H as COLOR_ERROR_50, a1 as COLOR_SUCCESS_50 } from "../../tokens-C4ypB4bY.js";
12
12
  import './styles.css';const BadgeState = ({
13
13
  status,
14
14
  isNumberBadge = false,
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { e as BREAKPOINT_MD, d as BREAKPOINT_LG } from "../../tokens-C4ypB4bY.js";
2
+ import { BREAKPOINT_MD, BREAKPOINT_LG } from "../../astro/tokens/index.es.js";
3
3
  const Image = ({ srcMob, srcTablet, srcDesk, ...props }) => {
4
4
  return /* @__PURE__ */ jsxs("picture", { children: [
5
5
  /* @__PURE__ */ jsx("source", { media: `(max-width: ${BREAKPOINT_MD})`, srcSet: srcMob }),
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useId } from "react";
3
3
  import { c as classNames } from "../../index-BW2ZU5Hx.js";
4
- import { Q as COLOR_NEUTRAL_00, l as COLOR_BRAND_BLUE_40 } from "../../tokens-C4ypB4bY.js";
4
+ import { COLOR_NEUTRAL_00, COLOR_BRAND_BLUE_40 } from "../../astro/tokens/index.es.js";
5
5
  import './styles.css';const SIZE_MAP = {
6
6
  small: 16,
7
7
  medium: 20,
@@ -3,9 +3,9 @@ import { useState } from "react";
3
3
  import { c as classNames } from "../../../../index-BW2ZU5Hx.js";
4
4
  import "../../../Icon/index.es.js";
5
5
  import { IconCheck } from "../../../icons/IconCheck/index.es.js";
6
+ import { COLOR_NEUTRAL_00 } from "../../../../astro/tokens/index.es.js";
6
7
  import Field from "../../Field/index.es.js";
7
8
  import { Conditional } from "../../../misc/Conditional/index.es.js";
8
- import { Q as COLOR_NEUTRAL_00 } from "../../../../tokens-C4ypB4bY.js";
9
9
  import '../../../Field/styles.css';const CheckboxField = ({
10
10
  label,
11
11
  error,
@@ -1,9 +1,9 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../../../index-BW2ZU5Hx.js";
3
- import "../../../../index-CFYmtkje.js";
3
+ import "../../../../index-CZfMkAoF.js";
4
4
  import "../../../Button/index.es.js";
5
5
  import "../PortalHolder/index.es.js";
6
- import { a } from "../../../../index-BcC9liUl.js";
6
+ import { a } from "../../../../index-Bkl5OBIY.js";
7
7
  export {
8
8
  a as DatepickerCalendar
9
9
  };
@@ -4,8 +4,8 @@ import "react";
4
4
  import "../../../Icon/index.es.js";
5
5
  import "../../../icons/IconChevronLeft/index.es.js";
6
6
  import "../../../icons/IconChevronRight/index.es.js";
7
- import "../../../../index-CeClo_WS.js";
8
- import { C } from "../../../../index-CFYmtkje.js";
7
+ import "../../../../index-Cw1KtRQr.js";
8
+ import { C } from "../../../../index-CZfMkAoF.js";
9
9
  export {
10
10
  C as CalendarHeader
11
11
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import { a as above } from "../../../../screen-DfYo7XQ_.js";
3
+ import { BREAKPOINT_MD } from "../../../../astro/tokens/index.es.js";
3
4
  import { Portal } from "../../../misc/Portal/index.es.js";
4
- import { e as BREAKPOINT_MD } from "../../../../tokens-C4ypB4bY.js";
5
5
  const PortalHolder = ({ withPortal, children }) => {
6
6
  const shouldUsePortal = !above(BREAKPOINT_MD) && withPortal;
7
7
  if (shouldUsePortal) return /* @__PURE__ */ jsx(Portal, { children });
@@ -5,7 +5,7 @@ import "../../../Icon/index.es.js";
5
5
  import "../../../icons/IconChevronDown/index.es.js";
6
6
  import "../../../icons/IconChevronLeft/index.es.js";
7
7
  import "../../../icons/IconX/index.es.js";
8
- import { S } from "../../../../index-CeClo_WS.js";
8
+ import { S } from "../../../../index-Cw1KtRQr.js";
9
9
  export {
10
10
  S as Segment
11
11
  };
@@ -1,13 +1,13 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { BREAKPOINT_MD, COLOR_NEUTRAL_40 } from "../../../astro/tokens/index.es.js";
2
3
  import "../../../index-BW2ZU5Hx.js";
3
4
  import { useRef, useState, useMemo, useEffect } from "react";
4
5
  import "../../Icon/index.es.js";
5
6
  import { IconCalendar } from "../../icons/IconCalendar/index.es.js";
6
7
  import { InputField } from "../InputField/index.es.js";
7
- import { D as DDMMYYYY, g as getDefaultDate, a as DatepickerCalendar, A as AUCalendarDate } from "../../../index-BcC9liUl.js";
8
+ import { D as DDMMYYYY, g as getDefaultDate, a as DatepickerCalendar, A as AUCalendarDate } from "../../../index-Bkl5OBIY.js";
8
9
  import { a as above } from "../../../screen-DfYo7XQ_.js";
9
- import { u as useOutsideClick } from "../../../index-CeClo_WS.js";
10
- import { e as BREAKPOINT_MD, U as COLOR_NEUTRAL_40 } from "../../../tokens-C4ypB4bY.js";
10
+ import { u as useOutsideClick } from "../../../index-Cw1KtRQr.js";
11
11
  import '../../Datepicker/styles.css';function useDatepicker({
12
12
  value,
13
13
  defaultValue = "empty",
@@ -5,7 +5,7 @@ import "../../../Icon/index.es.js";
5
5
  import { IconAlertOctagon } from "../../../icons/IconAlertOctagon/index.es.js";
6
6
  import { IconCheck } from "../../../icons/IconCheck/index.es.js";
7
7
  import { IconSlash } from "../../../icons/IconSlash/index.es.js";
8
- import { a1 as COLOR_SUCCESS_50, H as COLOR_ERROR_50, U as COLOR_NEUTRAL_40 } from "../../../../tokens-C4ypB4bY.js";
8
+ import { COLOR_SUCCESS_50, COLOR_ERROR_50, COLOR_NEUTRAL_40 } from "../../../../astro/tokens/index.es.js";
9
9
  const FieldLabel = ({
10
10
  id,
11
11
  labelId,
@@ -10,9 +10,9 @@ import { IconSlash } from "../../icons/IconSlash/index.es.js";
10
10
  import { Modal } from "../../Modal/index.es.js";
11
11
  import { Text } from "../../Text/index.es.js";
12
12
  import { Conditional } from "../../misc/Conditional/index.es.js";
13
+ import { COLOR_NEUTRAL_40 } from "../../../astro/tokens/index.es.js";
13
14
  import { i as isMobile } from "../../../isMobile-RyKhTreE.js";
14
15
  import Field from "../Field/index.es.js";
15
- import { U as COLOR_NEUTRAL_40 } from "../../../tokens-C4ypB4bY.js";
16
16
  import '../../SelectField/styles.css';const useSelectField = (options, initialValue, onChange, onBlur, disabled, register, autocomplete = false, fullScreenOptions = false) => {
17
17
  var _a;
18
18
  const [isDropdownOpen, setIsDropdownOpen] = useState(false);
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c as classNames } from "./index-BW2ZU5Hx.js";
3
- import { $ as $2aaf608024c21ca1$export$99faa760c7908e4f, a as $6f9a1820b787aac7$export$e1aef45b828286de, C as CalendarHeader, b as $6f9a1820b787aac7$export$5bd780d491cfc46c, c as $6f9a1820b787aac7$export$22e2d15eaa4d2377, d as $6f9a1820b787aac7$export$ad2135cac3a11b3d, e as $6f9a1820b787aac7$export$e11f8ba65d857bff, f as $6f9a1820b787aac7$export$5d847498420df57b } from "./index-CFYmtkje.js";
3
+ import { $ as $2aaf608024c21ca1$export$99faa760c7908e4f, a as $6f9a1820b787aac7$export$e1aef45b828286de, C as CalendarHeader, b as $6f9a1820b787aac7$export$5bd780d491cfc46c, c as $6f9a1820b787aac7$export$22e2d15eaa4d2377, d as $6f9a1820b787aac7$export$ad2135cac3a11b3d, e as $6f9a1820b787aac7$export$e11f8ba65d857bff, f as $6f9a1820b787aac7$export$5d847498420df57b } from "./index-CZfMkAoF.js";
4
4
  import { Button } from "./components/Button/index.es.js";
5
5
  import { PortalHolder } from "./components/form/Datepicker/PortalHolder/index.es.js";
6
6
  import { useRef, useState, useEffect } from "react";
7
+ import { BREAKPOINT_MD } from "./astro/tokens/index.es.js";
7
8
  import { a as above } from "./screen-DfYo7XQ_.js";
8
- import { e as BREAKPOINT_MD } from "./tokens-C4ypB4bY.js";
9
9
  import './components/index/styles.css';const DDMMYYYY = {
10
10
  placeholder: "DD/MM/YYYY",
11
11
  /** Apply DD/MM/YYYY to a field text while typing */
@@ -238,4 +238,4 @@ export {
238
238
  DatepickerCalendar as a,
239
239
  getDefaultDate as g
240
240
  };
241
- //# sourceMappingURL=index-BcC9liUl.js.map
241
+ //# sourceMappingURL=index-Bkl5OBIY.js.map