@astryxdesign/core 0.4.4 → 0.4.5-canary.1fdecb1
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.
- package/CHANGELOG.md +40 -0
- package/dist/BottomSheet/BottomSheet.d.ts +11 -2
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +4 -0
- package/dist/BottomSheet/BottomSheetPanel.d.ts +5 -2
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +65 -15
- package/dist/BottomSheet/index.d.ts +1 -1
- package/dist/BottomSheet/index.d.ts.map +1 -1
- package/dist/BottomSheet/snapOffsets.d.ts +57 -20
- package/dist/BottomSheet/snapOffsets.d.ts.map +1 -1
- package/dist/BottomSheet/snapOffsets.js +106 -30
- package/dist/BottomSheet/useSheetGestures.d.ts +13 -8
- package/dist/BottomSheet/useSheetGestures.d.ts.map +1 -1
- package/dist/BottomSheet/useSheetGestures.js +160 -64
- package/dist/Calendar/Calendar.d.ts +17 -0
- package/dist/Calendar/Calendar.d.ts.map +1 -1
- package/dist/Calendar/Calendar.js +34 -3
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts +14 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.d.ts.map +1 -0
- package/dist/Calendar/getStandaloneShortWeekdayNames.js +26 -0
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts +22 -1
- package/dist/Calendar/hooks/useCalendarConstraints.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarConstraints.js +26 -4
- package/dist/Calendar/hooks/useCalendarDays.d.ts.map +1 -1
- package/dist/Calendar/hooks/useCalendarDays.js +14 -10
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts +47 -0
- package/dist/Calendar/standaloneShortWeekdayNames.generated.d.ts.map +1 -0
- package/dist/Calendar/standaloneShortWeekdayNames.generated.js +40 -0
- package/dist/Center/Center.d.ts +23 -1
- package/dist/Center/Center.d.ts.map +1 -1
- package/dist/Center/Center.js +12 -6
- package/dist/CheckboxInput/CheckboxInput.d.ts.map +1 -1
- package/dist/CheckboxInput/CheckboxInput.js +9 -0
- package/dist/ComplexSelector/ComplexSelector.d.ts.map +1 -1
- package/dist/ComplexSelector/ComplexSelector.js +6 -1
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +6 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts +23 -1
- package/dist/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/DateRangeInput/DateRangeInput.js +38 -3
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +7 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +3 -3
- package/dist/Field/FieldLabel.d.ts +2 -1
- package/dist/Field/FieldLabel.d.ts.map +1 -1
- package/dist/Field/FieldLabel.js +21 -3
- package/dist/Field/InputClearButton.d.ts +2 -1
- package/dist/Field/InputClearButton.d.ts.map +1 -1
- package/dist/Field/InputClearButton.js +6 -1
- package/dist/FormLayout/FormLayout.d.ts +24 -2
- package/dist/FormLayout/FormLayout.d.ts.map +1 -1
- package/dist/FormLayout/FormLayout.js +7 -2
- package/dist/FormLayout/FormLayoutContext.d.ts +15 -2
- package/dist/FormLayout/FormLayoutContext.d.ts.map +1 -1
- package/dist/FormLayout/FormLayoutContext.js +19 -4
- package/dist/FormLayout/index.d.ts +1 -1
- package/dist/FormLayout/index.d.ts.map +1 -1
- package/dist/Item/Item.d.ts +9 -1
- package/dist/Item/Item.d.ts.map +1 -1
- package/dist/Item/Item.js +45 -7
- package/dist/Layer/useLayer.d.ts.map +1 -1
- package/dist/Layer/useLayer.js +3 -2
- package/dist/Layout/container.stylex.d.ts +4 -2
- package/dist/Layout/container.stylex.d.ts.map +1 -1
- package/dist/Layout/container.stylex.js +19 -11
- package/dist/Layout/index.d.ts +1 -0
- package/dist/Layout/index.d.ts.map +1 -1
- package/dist/Layout/index.js +4 -0
- package/dist/Layout/padding.stylex.d.ts +315 -12
- package/dist/Layout/padding.stylex.d.ts.map +1 -1
- package/dist/Layout/padding.stylex.js +389 -12
- package/dist/Lightbox/Lightbox.d.ts.map +1 -1
- package/dist/Lightbox/Lightbox.js +2 -1
- package/dist/Markdown/Markdown.d.ts +8 -0
- package/dist/Markdown/Markdown.d.ts.map +1 -1
- package/dist/Markdown/Markdown.js +31 -3
- package/dist/Markdown/parser.d.ts +14 -2
- package/dist/Markdown/parser.d.ts.map +1 -1
- package/dist/Markdown/parser.js +50 -2
- package/dist/MobileNav/MobileNav.d.ts +1 -0
- package/dist/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/MobileNav/MobileNav.js +24 -6
- package/dist/MultiSelector/MultiSelector.d.ts.map +1 -1
- package/dist/MultiSelector/MultiSelector.js +6 -1
- package/dist/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/NumberInput/NumberInput.js +36 -3
- package/dist/Outline/parseOutlineFromMarkdown.d.ts +2 -0
- package/dist/Outline/parseOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/parseOutlineFromMarkdown.js +5 -31
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +12 -1
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +3 -3
- package/dist/Section/Section.d.ts +36 -1
- package/dist/Section/Section.d.ts.map +1 -1
- package/dist/Section/Section.js +12 -2
- package/dist/Selector/Selector.d.ts +26 -1
- package/dist/Selector/Selector.d.ts.map +1 -1
- package/dist/Selector/Selector.js +93 -15
- package/dist/Selector/SelectorOption.d.ts +14 -1
- package/dist/Selector/SelectorOption.d.ts.map +1 -1
- package/dist/Selector/SelectorOption.js +6 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts +8 -0
- package/dist/Selector/SelectorRowLayoutContext.d.ts.map +1 -0
- package/dist/Selector/SelectorRowLayoutContext.js +27 -0
- package/dist/Selector/types.d.ts +1 -0
- package/dist/Selector/types.d.ts.map +1 -1
- package/dist/Slider/Slider.d.ts.map +1 -1
- package/dist/Slider/Slider.js +2 -2
- package/dist/Stack/Stack.d.ts +23 -1
- package/dist/Stack/Stack.d.ts.map +1 -1
- package/dist/Stack/Stack.js +12 -6
- package/dist/StatusDot/StatusDot.d.ts +43 -3
- package/dist/StatusDot/StatusDot.d.ts.map +1 -1
- package/dist/StatusDot/StatusDot.js +42 -5
- package/dist/Switch/Switch.d.ts.map +1 -1
- package/dist/Switch/Switch.js +9 -0
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.d.ts.map +1 -1
- package/dist/Table/plugins/rowExpansion/useTableRowExpansion.js +7 -2
- package/dist/TextArea/TextArea.d.ts.map +1 -1
- package/dist/TextArea/TextArea.js +6 -1
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +6 -1
- package/dist/TimeInput/TimeInput.d.ts.map +1 -1
- package/dist/TimeInput/TimeInput.js +6 -1
- package/dist/astryx.css +40 -21
- package/dist/hooks/scrollbarGutter.d.ts +28 -0
- package/dist/hooks/scrollbarGutter.d.ts.map +1 -0
- package/dist/hooks/scrollbarGutter.js +103 -0
- package/dist/hooks/useResolvedRequired.d.ts +19 -0
- package/dist/hooks/useResolvedRequired.d.ts.map +1 -0
- package/dist/hooks/useResolvedRequired.js +40 -0
- package/dist/hooks/useScrollLock.d.ts +4 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -1
- package/dist/hooks/useScrollLock.js +13 -1
- package/dist/theme/derivedVarRegistry.d.ts.map +1 -1
- package/dist/theme/derivedVarRegistry.js +7 -0
- package/dist/theme/generateThemeRules.d.ts.map +1 -1
- package/dist/theme/generateThemeRules.js +37 -4
- package/dist/utils/plainDate.d.ts +6 -0
- package/dist/utils/plainDate.d.ts.map +1 -1
- package/dist/utils/plainDate.js +12 -0
- package/locales/af-ZA.json +958 -0
- package/locales/ar-SA.json +998 -0
- package/locales/ca-ES.json +974 -0
- package/locales/cs-CZ.json +990 -0
- package/locales/da-DK.json +966 -0
- package/locales/de-DE.json +966 -0
- package/locales/el-GR.json +990 -0
- package/locales/en.json +8 -0
- package/locales/es-ES.json +978 -0
- package/locales/fi-FI.json +990 -0
- package/locales/fr-FR.json +928 -0
- package/locales/he-IL.json +990 -0
- package/locales/hu-HU.json +990 -0
- package/locales/it-IT.json +978 -0
- package/locales/ja-JP.json +998 -0
- package/locales/ko-KR.json +990 -0
- package/locales/nl-NL.json +954 -0
- package/locales/no-NO.json +978 -0
- package/locales/pl-PL.json +982 -0
- package/locales/pseudo.json +6 -0
- package/locales/pt-BR.json +982 -0
- package/locales/pt-PT.json +982 -0
- package/locales/ro-RO.json +982 -0
- package/locales/ru-RU.json +990 -0
- package/locales/sr-SP.json +990 -0
- package/locales/sv-SE.json +986 -0
- package/locales/tr-TR.json +990 -0
- package/locales/uk-UA.json +990 -0
- package/locales/vi-VN.json +986 -0
- package/locales/zh-CN.json +998 -0
- package/locales/zh-TW.json +998 -0
- package/package.json +3 -3
- package/src/BottomSheet/BottomSheet.doc.mjs +36 -3
- package/src/BottomSheet/BottomSheet.test.tsx +177 -2
- package/src/BottomSheet/BottomSheet.tsx +16 -2
- package/src/BottomSheet/BottomSheetPanel.test.tsx +41 -0
- package/src/BottomSheet/BottomSheetPanel.tsx +95 -15
- package/src/BottomSheet/index.ts +5 -1
- package/src/BottomSheet/snapOffsets.test.ts +114 -47
- package/src/BottomSheet/snapOffsets.ts +119 -33
- package/src/BottomSheet/useSheetGestures.test.ts +113 -15
- package/src/BottomSheet/useSheetGestures.ts +196 -100
- package/src/Calendar/Calendar.doc.mjs +16 -0
- package/src/Calendar/Calendar.test.tsx +137 -0
- package/src/Calendar/Calendar.tsx +65 -2
- package/src/Calendar/getStandaloneShortWeekdayNames.test.ts +54 -0
- package/src/Calendar/getStandaloneShortWeekdayNames.ts +38 -0
- package/src/Calendar/hooks/useCalendarConstraints.ts +54 -3
- package/src/Calendar/hooks/useCalendarDays.ts +13 -10
- package/src/Calendar/standaloneShortWeekdayNames.generated.ts +50 -0
- package/src/Center/Center.doc.mjs +48 -0
- package/src/Center/Center.test.tsx +158 -0
- package/src/Center/Center.tsx +50 -9
- package/src/CheckboxInput/CheckboxInput.tsx +6 -0
- package/src/ComplexSelector/ComplexSelector.tsx +3 -1
- package/src/DateInput/DateInput.tsx +3 -1
- package/src/DateRangeInput/DateRangeInput.doc.mjs +16 -0
- package/src/DateRangeInput/DateRangeInput.test.tsx +81 -1
- package/src/DateRangeInput/DateRangeInput.tsx +72 -1
- package/src/DateTimeInput/DateTimeInput.tsx +4 -2
- package/src/Dialog/Dialog.test.tsx +24 -0
- package/src/Dialog/Dialog.tsx +3 -0
- package/src/Field/Field.doc.mjs +1 -0
- package/src/Field/FieldLabel.tsx +20 -4
- package/src/Field/InputClearButton.test.tsx +25 -0
- package/src/Field/InputClearButton.tsx +4 -1
- package/src/FormLayout/FormLayout.doc.mjs +13 -0
- package/src/FormLayout/FormLayout.test.tsx +181 -4
- package/src/FormLayout/FormLayout.tsx +33 -2
- package/src/FormLayout/FormLayoutContext.ts +22 -7
- package/src/FormLayout/index.ts +1 -1
- package/src/Item/Item.doc.mjs +1 -0
- package/src/Item/Item.test.tsx +50 -0
- package/src/Item/Item.tsx +40 -1
- package/src/Layer/useLayer.tsx +13 -2
- package/src/Layout/Layout.doc.mjs +18 -0
- package/src/Layout/container.stylex.ts +11 -3
- package/src/Layout/index.ts +4 -0
- package/src/Layout/overlayPaddingReset.test.tsx +222 -0
- package/src/Layout/padding.stylex.ts +192 -12
- package/src/Lightbox/Lightbox.tsx +2 -1
- package/src/Markdown/Markdown.doc.mjs +3 -0
- package/src/Markdown/Markdown.test.tsx +78 -0
- package/src/Markdown/Markdown.tsx +41 -1
- package/src/Markdown/parser.ts +60 -2
- package/src/MobileNav/MobileNav.tsx +61 -5
- package/src/MobileNav/MobileNavEntryAnimation.test.tsx +212 -0
- package/src/MobileNav/MobileNavScrollbarGutter.test.tsx +109 -0
- package/src/MultiSelector/MultiSelector.tsx +3 -1
- package/src/NumberInput/NumberInput.doc.mjs +24 -0
- package/src/NumberInput/NumberInput.test.tsx +138 -0
- package/src/NumberInput/NumberInput.tsx +43 -5
- package/src/Outline/Outline.doc.mjs +2 -0
- package/src/Outline/parseOutlineFromMarkdown.ts +10 -40
- package/src/RadioList/RadioList.tsx +9 -1
- package/src/Resizable/ResizeHandle.test.tsx +22 -0
- package/src/Resizable/ResizeHandle.tsx +9 -3
- package/src/Section/Section.doc.mjs +55 -0
- package/src/Section/Section.test.tsx +201 -4
- package/src/Section/Section.tsx +69 -0
- package/src/Selector/Selector.doc.mjs +16 -2
- package/src/Selector/Selector.test.tsx +524 -0
- package/src/Selector/Selector.tsx +161 -17
- package/src/Selector/SelectorOption.doc.mjs +7 -0
- package/src/Selector/SelectorOption.tsx +21 -0
- package/src/Selector/SelectorRowLayoutContext.ts +32 -0
- package/src/Selector/types.ts +4 -4
- package/src/Slider/Slider.tsx +10 -0
- package/src/Stack/Stack.doc.mjs +72 -0
- package/src/Stack/Stack.test.tsx +156 -0
- package/src/Stack/Stack.tsx +50 -8
- package/src/StatusDot/StatusDot.doc.mjs +13 -0
- package/src/StatusDot/StatusDot.test.tsx +115 -8
- package/src/StatusDot/StatusDot.tsx +74 -9
- package/src/Switch/Switch.tsx +6 -0
- package/src/Table/plugins/rowExpansion/useTableRowExpansion.tsx +20 -2
- package/src/TextArea/TextArea.tsx +3 -1
- package/src/TextInput/TextInput.tsx +3 -1
- package/src/TimeInput/TimeInput.tsx +3 -1
- package/src/hooks/scrollbarGutter.test.ts +167 -0
- package/src/hooks/scrollbarGutter.ts +121 -0
- package/src/hooks/useResolvedRequired.ts +42 -0
- package/src/hooks/useScrollLock.doc.mjs +4 -4
- package/src/hooks/useScrollLock.test.ts +73 -0
- package/src/hooks/useScrollLock.ts +14 -0
- package/src/theme/derivedVarRegistry.test.ts +14 -3
- package/src/theme/derivedVarRegistry.ts +4 -0
- package/src/theme/generateThemeRules.test.ts +79 -0
- package/src/theme/generateThemeRules.ts +49 -4
- package/src/utils/plainDate.test.ts +50 -0
- package/src/utils/plainDate.ts +12 -0
|
@@ -19,7 +19,7 @@ import * as stylex from '@stylexjs/stylex';
|
|
|
19
19
|
import "../theme/tokens.stylex.js";
|
|
20
20
|
import { colorVars } from "../theme/tokens.stylex.js";
|
|
21
21
|
import { Tooltip } from "../Tooltip/Tooltip.js";
|
|
22
|
-
import { mergeProps } from "../utils/index.js";
|
|
22
|
+
import { isRenderable, mergeProps } from "../utils/index.js";
|
|
23
23
|
import { themeProps } from "../utils/themeProps.js";
|
|
24
24
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
25
25
|
/**
|
|
@@ -27,12 +27,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
27
27
|
*/
|
|
28
28
|
const pulseKeyframes = "xtut5q7-B";
|
|
29
29
|
|
|
30
|
+
/** Fixed dot size in px. A user-supplied icon is drawn into this same field. */
|
|
31
|
+
const DOT_SIZE = 8;
|
|
32
|
+
|
|
30
33
|
/**
|
|
31
34
|
* Base styles
|
|
32
35
|
*/
|
|
33
36
|
const styles = {
|
|
34
37
|
base: {
|
|
35
|
-
k1xSpc: "
|
|
38
|
+
k1xSpc: "x3nfvp2",
|
|
39
|
+
kGNEyG: "x6s0dn4",
|
|
40
|
+
kjj79g: "xl56j7k",
|
|
36
41
|
kaIpWk: "x16rqkct",
|
|
37
42
|
kmuXW: "x2lah0s",
|
|
38
43
|
kzqmXN: "x1xc55vz",
|
|
@@ -53,27 +58,40 @@ const styles = {
|
|
|
53
58
|
};
|
|
54
59
|
|
|
55
60
|
/**
|
|
56
|
-
* Variant styles mapping to theme color tokens
|
|
61
|
+
* Variant styles mapping to theme color tokens.
|
|
62
|
+
*
|
|
63
|
+
* Each variant sets both the plate colour and an ink colour: a user-supplied
|
|
64
|
+
* `icon` paints from `currentColor`, so plate and ink can never drift out of
|
|
65
|
+
* contrast (same contract as AvatarStatusDot). The ink is each plate's
|
|
66
|
+
* dedicated `--color-on-*` pairing (the Badge precedent), not the surface
|
|
67
|
+
* colour: on-warning is a fixed dark ink, which keeps an icon legible on the
|
|
68
|
+
* yellow plate (~9.6:1) where a light surface ink lands near 2:1. Neutral has
|
|
69
|
+
* no `--color-on-*` token; its mid-grey plate takes the surface ink.
|
|
57
70
|
*/
|
|
58
71
|
const variants = {
|
|
59
72
|
success: {
|
|
60
73
|
kWkggS: "xdsz4j9",
|
|
74
|
+
kMwMTN: "xri61p4",
|
|
61
75
|
$$css: true
|
|
62
76
|
},
|
|
63
77
|
warning: {
|
|
64
78
|
kWkggS: "x1q8g9m5",
|
|
79
|
+
kMwMTN: "xrebv38",
|
|
65
80
|
$$css: true
|
|
66
81
|
},
|
|
67
82
|
error: {
|
|
68
83
|
kWkggS: "x1pjz0fi",
|
|
84
|
+
kMwMTN: "x1m024r3",
|
|
69
85
|
$$css: true
|
|
70
86
|
},
|
|
71
87
|
accent: {
|
|
72
88
|
kWkggS: "x1ewilqj",
|
|
89
|
+
kMwMTN: "x17wrial",
|
|
73
90
|
$$css: true
|
|
74
91
|
},
|
|
75
92
|
neutral: {
|
|
76
93
|
kWkggS: "x1q5y3ey",
|
|
94
|
+
kMwMTN: "xrkvqaz",
|
|
77
95
|
$$css: true
|
|
78
96
|
}
|
|
79
97
|
};
|
|
@@ -86,7 +104,14 @@ const variants = {
|
|
|
86
104
|
/**
|
|
87
105
|
* A small colored dot indicator for status display (online/offline, severity, etc).
|
|
88
106
|
*
|
|
89
|
-
* Fixed 8px size.
|
|
107
|
+
* Fixed 8px size. By default the dot conveys status by colour only, which is
|
|
108
|
+
* not accessible in isolation (WCAG 2.1 SC 1.4.1) — treat it as a signal the
|
|
109
|
+
* surrounding UI must make accessible: use it as a binary present/absent
|
|
110
|
+
* signal, pair it with a visible label, pass `icon` so the status carries a
|
|
111
|
+
* non-colour mark, or convey the status accessibly elsewhere. See the usage
|
|
112
|
+
* guidance in the component docs.
|
|
113
|
+
*
|
|
114
|
+
* Renders as a non-focusable `<span>` with `role="img"` and
|
|
90
115
|
* `aria-label` for accessibility. Styles use Astryx theme tokens via StyleX.
|
|
91
116
|
* Wrap your app in `<Theme>` to apply a theme.
|
|
92
117
|
*
|
|
@@ -96,6 +121,7 @@ const variants = {
|
|
|
96
121
|
* <StatusDot variant="error" label="Offline" />
|
|
97
122
|
* <StatusDot variant="success" label="Live" isPulsing />
|
|
98
123
|
* <StatusDot variant="success" label="Online" tooltip="Online" />
|
|
124
|
+
* <StatusDot variant="success" label="Verified" icon={<CheckIcon />} />
|
|
99
125
|
* ```
|
|
100
126
|
*/
|
|
101
127
|
export function StatusDot({
|
|
@@ -103,12 +129,16 @@ export function StatusDot({
|
|
|
103
129
|
label,
|
|
104
130
|
isPulsing = false,
|
|
105
131
|
tooltip,
|
|
132
|
+
icon,
|
|
106
133
|
xstyle,
|
|
107
134
|
className,
|
|
108
135
|
style,
|
|
109
136
|
ref,
|
|
110
137
|
...props
|
|
111
138
|
}) {
|
|
139
|
+
// Booleans and empty renders don't count (safe for `cond && <Icon />`) —
|
|
140
|
+
// same contract as AvatarStatusDot.
|
|
141
|
+
const showsIcon = isRenderable(icon);
|
|
112
142
|
const dot = /*#__PURE__*/_jsx("span", {
|
|
113
143
|
ref: ref,
|
|
114
144
|
role: "img",
|
|
@@ -116,7 +146,14 @@ export function StatusDot({
|
|
|
116
146
|
...mergeProps(themeProps('statusdot', {
|
|
117
147
|
variant
|
|
118
148
|
}), stylex.props(styles.base, variants[variant], isPulsing && styles.pulsing, isPulsing && styles.reducedMotion, xstyle), className, style),
|
|
119
|
-
...props
|
|
149
|
+
...props,
|
|
150
|
+
children: showsIcon && /*#__PURE__*/_jsx("span", {
|
|
151
|
+
"aria-hidden": "true",
|
|
152
|
+
...{
|
|
153
|
+
className: "x78zum5 x6s0dn4 xl56j7k x14ju556 x1xc55vz xdk7pt"
|
|
154
|
+
},
|
|
155
|
+
children: icon
|
|
156
|
+
})
|
|
120
157
|
});
|
|
121
158
|
if (tooltip) {
|
|
122
159
|
return /*#__PURE__*/_jsx(Tooltip, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAKhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAcf,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAKhD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAiR9C,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,KAAK,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAElD,MAAM,WAAW,WAAY,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9D,wCAAwC;IACxC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC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kB,CAAC;IAClC;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AAOD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,UAAkB,EAClB,QAAQ,EACR,eAAe,EACf,UAAkB,EAClB,UAAkB,EAClB,OAAO,EACP,MAAM,EACN,SAAS,EACT,YAAY,EACZ,aAAqB,EACrB,YAAoB,EACpB,MAAM,EACN,IAAW,EACX,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,WAAW,+BAqMb;yBAhOe,MAAM"}
|
package/dist/Switch/Switch.js
CHANGED
|
@@ -28,6 +28,7 @@ import "./switch.markers.stylex.js";
|
|
|
28
28
|
import { switchScope } from "./switch.markers.stylex.js";
|
|
29
29
|
import { themeProps } from "../utils/themeProps.js";
|
|
30
30
|
import { VisuallyHidden } from "../VisuallyHidden/index.js";
|
|
31
|
+
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
31
32
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
32
33
|
const wrapperSizeStyles = {
|
|
33
34
|
sm: {
|
|
@@ -275,6 +276,13 @@ export function Switch({
|
|
|
275
276
|
const id = useId();
|
|
276
277
|
const descriptionID = useId();
|
|
277
278
|
const statusMessageID = useId();
|
|
279
|
+
// Announce the effective required state (form default included) while the
|
|
280
|
+
// native `required` stays bound to the explicit `isRequired` so a layout
|
|
281
|
+
// default never switches on browser validation.
|
|
282
|
+
const isEffectivelyRequired = useResolvedRequired({
|
|
283
|
+
isRequired,
|
|
284
|
+
isOptional
|
|
285
|
+
});
|
|
278
286
|
const [, startTransition] = useTransition();
|
|
279
287
|
const [optimisticValue, setOptimisticValue] = useOptimistic(value);
|
|
280
288
|
const isBusy = isLoading || optimisticValue !== value;
|
|
@@ -329,6 +337,7 @@ export function Switch({
|
|
|
329
337
|
"aria-disabled": showsDisabledMessage ? 'true' : undefined,
|
|
330
338
|
form: showsDisabledMessage ? '' : undefined,
|
|
331
339
|
required: isRequired,
|
|
340
|
+
"aria-required": isEffectivelyRequired ? 'true' : undefined,
|
|
332
341
|
onChange: e => {
|
|
333
342
|
if (isDisabled || isBusy) {
|
|
334
343
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableRowExpansion.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/rowExpansion/useTableRowExpansion.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useTableRowExpansion.d.ts","sourceRoot":"","sources":["../../../../src/Table/plugins/rowExpansion/useTableRowExpansion.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAkB,KAAK,SAAS,EAAC,MAAM,OAAO,CAAC;AAOtD,OAAO,KAAK,EACV,WAAW,EAIZ,MAAM,aAAa,CAAC;AAMrB;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC3E,0CAA0C;IAC1C,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,kDAAkD;IAClD,SAAS,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,MAAM,CAAC;IAC/B;;;OAGG;IACH,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IACvC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;CAC5C;AAkGD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpE,MAAM,EAAE,0BAA0B,CAAC,CAAC,CAAC,GACpC,WAAW,CAAC,CAAC,CAAC,CAwIhB"}
|
|
@@ -23,6 +23,7 @@ import { spacingVars, colorVars, radiusVars } from "../../../theme/tokens.stylex
|
|
|
23
23
|
import { Icon } from "../../../Icon/index.js";
|
|
24
24
|
import { resolveContextActions } from "../../tableContextMenu.js";
|
|
25
25
|
import { useTranslator } from "../../../i18n/index.js";
|
|
26
|
+
import { rtlStyles } from "../../../utils/index.js";
|
|
26
27
|
|
|
27
28
|
// =============================================================================
|
|
28
29
|
// Config
|
|
@@ -57,10 +58,10 @@ function ExpansionChevron({
|
|
|
57
58
|
type: "button",
|
|
58
59
|
...{
|
|
59
60
|
0: {
|
|
60
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf xx3sua9 x1ypdohk xv9yike x12pfavo xx6bhzk x1717udv x1ilzqfv x1cqbx0l"
|
|
61
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf xx3sua9 x1ypdohk xv9yike x12pfavo xx6bhzk x1717udv x1ilzqfv x1cqbx0l x7p49u4 xaafvuh"
|
|
61
62
|
},
|
|
62
63
|
1: {
|
|
63
|
-
className: "x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf xx3sua9 x1ypdohk xv9yike x12pfavo xx6bhzk x1717udv x1ilzqfv x1cqbx0l x1iffjtl"
|
|
64
|
+
className: "x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf xx3sua9 x1ypdohk xv9yike x12pfavo xx6bhzk x1717udv x1ilzqfv x1cqbx0l x1iffjtl x1nxqau"
|
|
64
65
|
}
|
|
65
66
|
}[!!isExpanded << 0],
|
|
66
67
|
onClick: e => {
|
|
@@ -162,6 +163,10 @@ export function useTableRowExpansion(config) {
|
|
|
162
163
|
icon: isExpanded ? 'chevronDown' : 'chevronRight',
|
|
163
164
|
size: "xsm",
|
|
164
165
|
"aria-hidden": true
|
|
166
|
+
// chevronDown needs no mirroring; chevronRight (collapsed,
|
|
167
|
+
// pointing toward the reveal direction) does.
|
|
168
|
+
,
|
|
169
|
+
xstyle: !isExpanded && rtlStyles.mirror
|
|
165
170
|
}),
|
|
166
171
|
onSelect: () => onToggle(key)
|
|
167
172
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../src/TextArea/TextArea.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAI5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../src/TextArea/TextArea.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAOL,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAuB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAI5D,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC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YAAoB,EACpB,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,OAAO,EACP,MAAM,EACN,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,aAAa,+BAkQf;yBAnSe,QAAQ"}
|
|
@@ -27,6 +27,7 @@ import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
|
27
27
|
import { useInputContainer } from "../hooks/useInputContainer.js";
|
|
28
28
|
import { useInputStatusIcon } from "../hooks/useInputStatusIcon.js";
|
|
29
29
|
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
30
|
+
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
30
31
|
import { useSize } from "../SizeContext/SizeContext.js";
|
|
31
32
|
import { themeProps } from "../utils/themeProps.js";
|
|
32
33
|
import { characterCount } from "../utils/characters.js";
|
|
@@ -139,6 +140,10 @@ export function TextArea({
|
|
|
139
140
|
}) {
|
|
140
141
|
const size = useSize(sizeProp, 'md');
|
|
141
142
|
const t = useTranslator();
|
|
143
|
+
const isEffectivelyRequired = useResolvedRequired({
|
|
144
|
+
isRequired,
|
|
145
|
+
isOptional
|
|
146
|
+
});
|
|
142
147
|
const announce = useAnnounce();
|
|
143
148
|
const id = useId();
|
|
144
149
|
const descriptionID = useId();
|
|
@@ -303,7 +308,7 @@ export function TextArea({
|
|
|
303
308
|
autoFocus: hasAutoFocus,
|
|
304
309
|
"data-autofocus": hasAutoFocus || undefined,
|
|
305
310
|
"aria-describedby": ariaDescribedBy,
|
|
306
|
-
"aria-required":
|
|
311
|
+
"aria-required": isEffectivelyRequired ? 'true' : undefined,
|
|
307
312
|
"aria-invalid": status?.type === 'error' || maxLength != null && valueLength > maxLength ? 'true' : undefined,
|
|
308
313
|
"aria-busy": isBusy || undefined,
|
|
309
314
|
...stylex.props(styles.textarea, textareaSizeStyles[size], isDisabled && styles.textareaDisabled, Boolean(startIcon) && styles.textareaWithStartIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/TextInput/TextInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAO3C,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAgCtD,QAAA,MAAM,UAAU;;;;;;;;;;EAUd,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC;AAMpD,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,GACvC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"TextInput.d.ts","sourceRoot":"","sources":["../../src/TextInput/TextInput.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAML,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAO3C,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAiB,KAAK,QAAQ,EAAC,MAAM,SAAS,CAAC;AAgCtD,QAAA,MAAM,UAAU;;;;;;;;;;EAUd,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,UAAU,CAAC;AAMpD,YAAY,EACV,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,GACvC,MAAM,UAAU,CAAC;AAOlB,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC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,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAC1D;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAa,EACb,KAAK,EACL,aAAqB,EACrB,WAAW,EACX,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,UAAkB,EAClB,eAAe,EACf,SAAS,EACT,MAAM,EACN,aAA0B,EAC1B,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,YAAY,EACZ,SAAiB,EACjB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,QAAgB,EAChB,YAAoB,EACpB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,GAAG,EACH,GAAG,IAAI,EACR,EAAE,cAAc,+BAyMhB;yBAxOe,SAAS"}
|
|
@@ -47,6 +47,7 @@ import { mergeProps, mergeRefs } from "../utils/index.js";
|
|
|
47
47
|
import { useSize } from "../SizeContext/SizeContext.js";
|
|
48
48
|
import { useInputContainer } from "../hooks/useInputContainer.js";
|
|
49
49
|
import { useInputStatusIcon } from "../hooks/useInputStatusIcon.js";
|
|
50
|
+
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
50
51
|
import { useInputGroup } from "../InputGroup/InputGroupContext.js";
|
|
51
52
|
import { themeProps } from "../utils/themeProps.js";
|
|
52
53
|
import { useTranslator } from "../i18n/index.js";
|
|
@@ -93,6 +94,10 @@ export function TextInput({
|
|
|
93
94
|
...rest
|
|
94
95
|
}) {
|
|
95
96
|
const t = useTranslator();
|
|
97
|
+
const isEffectivelyRequired = useResolvedRequired({
|
|
98
|
+
isRequired,
|
|
99
|
+
isOptional
|
|
100
|
+
});
|
|
96
101
|
const size = useSize(sizeProp, 'md');
|
|
97
102
|
const id = useId();
|
|
98
103
|
const inputLabelID = useId();
|
|
@@ -215,7 +220,7 @@ export function TextInput({
|
|
|
215
220
|
autoFocus: hasAutoFocus,
|
|
216
221
|
"data-autofocus": hasAutoFocus || undefined,
|
|
217
222
|
"aria-describedby": ariaDescribedBy,
|
|
218
|
-
"aria-required":
|
|
223
|
+
"aria-required": isEffectivelyRequired ? 'true' : undefined,
|
|
219
224
|
"aria-invalid": status?.type === 'error' ? 'true' : undefined,
|
|
220
225
|
"aria-busy": isBusy || undefined,
|
|
221
226
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../src/TimeInput/TimeInput.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,MAAM,MAAM,kBAAkB,CAAC;AAO3C,OAAO,EAGL,KAAK,WAAW,EAKhB,KAAK,kBAAkB,EACxB,MAAM,UAAU,CAAC;AAIlB,OAAO,EACL,KAAK,aAAa,EAWnB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"TimeInput.d.ts","sourceRoot":"","sources":["../../src/TimeInput/TimeInput.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAK,MAAM,MAA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ae,SAAS"}
|
|
@@ -28,6 +28,7 @@ import { useSize } from "../SizeContext/SizeContext.js";
|
|
|
28
28
|
import { useAnnounce } from "../hooks/useAnnounce.js";
|
|
29
29
|
import { useInputContainer } from "../hooks/useInputContainer.js";
|
|
30
30
|
import { useInputStatusIcon } from "../hooks/useInputStatusIcon.js";
|
|
31
|
+
import { useResolvedRequired } from "../hooks/useResolvedRequired.js";
|
|
31
32
|
import { useInputGroup } from "../InputGroup/InputGroupContext.js";
|
|
32
33
|
import { groupStyles } from "../InputGroup/groupStyles.js";
|
|
33
34
|
import { useTooltip } from "../Tooltip/index.js";
|
|
@@ -99,6 +100,10 @@ export function TimeInput({
|
|
|
99
100
|
ref
|
|
100
101
|
}) {
|
|
101
102
|
const t = useTranslator();
|
|
103
|
+
const isEffectivelyRequired = useResolvedRequired({
|
|
104
|
+
isRequired,
|
|
105
|
+
isOptional
|
|
106
|
+
});
|
|
102
107
|
const placeholder = placeholderFromProps ?? t('@astryx.timeInput.placeholder');
|
|
103
108
|
const size = useSize(sizeProp, 'md');
|
|
104
109
|
const id = useId();
|
|
@@ -367,7 +372,7 @@ export function TimeInput({
|
|
|
367
372
|
autoFocus: hasAutoFocus,
|
|
368
373
|
"data-autofocus": hasAutoFocus || undefined,
|
|
369
374
|
"aria-describedby": ariaDescribedBy,
|
|
370
|
-
"aria-required":
|
|
375
|
+
"aria-required": isEffectivelyRequired ? 'true' : undefined,
|
|
371
376
|
"aria-invalid": status?.type === 'error' || !isInputValid ? 'true' : undefined,
|
|
372
377
|
"aria-busy": isBusy || undefined,
|
|
373
378
|
"aria-labelledby": ariaLabelledBy,
|
package/dist/astryx.css
CHANGED
|
@@ -113,23 +113,24 @@
|
|
|
113
113
|
.x5setjs{--_reveal-opacity:1}
|
|
114
114
|
.xp0pj8v{--_reveal-position:absolute}
|
|
115
115
|
.x1r6s5ct{--_reveal-position:static}
|
|
116
|
+
.x1f17rg1{--_section-padding-propagated:initial}
|
|
117
|
+
.x2ccaqq{--_section-padding-propagated:var(--spacing-0-5)}
|
|
118
|
+
.x7mo41q{--_section-padding-propagated:var(--spacing-0)}
|
|
119
|
+
.xxa843v{--_section-padding-propagated:var(--spacing-1-5)}
|
|
120
|
+
.x1j3iakl{--_section-padding-propagated:var(--spacing-1)}
|
|
121
|
+
.x4h2jfd{--_section-padding-propagated:var(--spacing-10)}
|
|
122
|
+
.xezgk69{--_section-padding-propagated:var(--spacing-2)}
|
|
123
|
+
.x1wtz8uf{--_section-padding-propagated:var(--spacing-3)}
|
|
124
|
+
.x5wdj8h{--_section-padding-propagated:var(--spacing-4)}
|
|
125
|
+
.xgjndll{--_section-padding-propagated:var(--spacing-5)}
|
|
126
|
+
.x15i4jqh{--_section-padding-propagated:var(--spacing-6)}
|
|
127
|
+
.xmb9lpv{--_section-padding-propagated:var(--spacing-8)}
|
|
116
128
|
.x18jk3ff{--_segmented-control-padding:var(--spacing-0-5)}
|
|
117
129
|
.x9icjy1{--_segmented-control-radius:var(--radius-element)}
|
|
118
130
|
.xficto1{--_tab-indicator-bottom:calc(-1 * (var(--spacing-1) + var(--border-width)))}
|
|
119
131
|
.xbrl7fg{--_tab-indicator-bottom:var(--x---_tab-indicator-bottom)}
|
|
120
132
|
.x1kdpo6e{--_textarea-inline-padding:var(--spacing-2)}
|
|
121
133
|
.x1ur4yav{--_thumbnail-hit-inset:0px}
|
|
122
|
-
.xnvcwyz{--astryx-section-padding:var(--spacing-0-5)}
|
|
123
|
-
.xvdw317{--astryx-section-padding:var(--spacing-0)}
|
|
124
|
-
.x1rj2uvf{--astryx-section-padding:var(--spacing-1-5)}
|
|
125
|
-
.x49wo0b{--astryx-section-padding:var(--spacing-1)}
|
|
126
|
-
.xf1jhqy{--astryx-section-padding:var(--spacing-10)}
|
|
127
|
-
.x1bzoqqa{--astryx-section-padding:var(--spacing-2)}
|
|
128
|
-
.x1nvso86{--astryx-section-padding:var(--spacing-3)}
|
|
129
|
-
.x1as1t6l{--astryx-section-padding:var(--spacing-4)}
|
|
130
|
-
.xfb5lyl{--astryx-section-padding:var(--spacing-5)}
|
|
131
|
-
.x1tig3w6{--astryx-section-padding:var(--spacing-6)}
|
|
132
|
-
.x1szikzq{--astryx-section-padding:var(--spacing-8)}
|
|
133
134
|
.x16bblx1{--button-focus-offset:var(--focus-outline-offset)}
|
|
134
135
|
.x1v15ycx{--button-icon-only-aspect:1 / 1}
|
|
135
136
|
.x1mtvhk1{--color-syntax-background:transparent}
|
|
@@ -137,7 +138,7 @@
|
|
|
137
138
|
.xax9j7h{--container-padding-block-end:0px}
|
|
138
139
|
.x1omyuck{--container-padding-block-end:var(--astryx-card-padding-block-end,var(--astryx-card-padding,var(--spacing-4)))}
|
|
139
140
|
.x1gvthzm{--container-padding-block-end:var(--astryx-dialog-padding-block-end,var(--astryx-dialog-padding,var(--spacing-4)))}
|
|
140
|
-
.
|
|
141
|
+
.xek4msv{--container-padding-block-end:var(--astryx-section-padding-block-end,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4))))}
|
|
141
142
|
.xi9ns85{--container-padding-block-end:var(--layout-padding-inner-y,var(--spacing-4))}
|
|
142
143
|
.x1xjq73n{--container-padding-block-end:var(--layout-padding-outer-y,var(--spacing-4))}
|
|
143
144
|
.x1cao3zv{--container-padding-block-end:var(--spacing-0-5)}
|
|
@@ -158,7 +159,7 @@
|
|
|
158
159
|
.x1047aw6{--container-padding-block-start:0px}
|
|
159
160
|
.x1rqz8me{--container-padding-block-start:var(--astryx-card-padding-block-start,var(--astryx-card-padding,var(--spacing-4)))}
|
|
160
161
|
.x1g2kccc{--container-padding-block-start:var(--astryx-dialog-padding-block-start,var(--astryx-dialog-padding,var(--spacing-4)))}
|
|
161
|
-
.
|
|
162
|
+
.xnw7zt4{--container-padding-block-start:var(--astryx-section-padding-block-start,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4))))}
|
|
162
163
|
.xjmgx01{--container-padding-block-start:var(--layout-padding-inner-y,var(--spacing-4))}
|
|
163
164
|
.xzz8v79{--container-padding-block-start:var(--layout-padding-outer-y,var(--spacing-4))}
|
|
164
165
|
.xvdf9ev{--container-padding-block-start:var(--spacing-0-5)}
|
|
@@ -179,7 +180,7 @@
|
|
|
179
180
|
.xjsfl84{--container-padding-inline-end:0px}
|
|
180
181
|
.x1ihxwbr{--container-padding-inline-end:var(--astryx-card-padding-inline-end,var(--astryx-card-padding-inline,var(--astryx-card-padding,var(--spacing-4))))}
|
|
181
182
|
.x11h1f2o{--container-padding-inline-end:var(--astryx-dialog-padding-inline-end,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,var(--spacing-4))))}
|
|
182
|
-
.
|
|
183
|
+
.xu1wldr{--container-padding-inline-end:var(--astryx-section-padding-inline-end,var(--astryx-section-padding-inline,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4)))))}
|
|
183
184
|
.xikqloz{--container-padding-inline-end:var(--layout-padding-inner-x,var(--spacing-4))}
|
|
184
185
|
.xqpvj4r{--container-padding-inline-end:var(--layout-padding-outer-x,var(--spacing-4))}
|
|
185
186
|
.x1wz3t3y{--container-padding-inline-end:var(--spacing-0-5)}
|
|
@@ -200,7 +201,7 @@
|
|
|
200
201
|
.xrhngw9{--container-padding-inline-start:0px}
|
|
201
202
|
.xjmlhfd{--container-padding-inline-start:var(--astryx-card-padding-inline-start,var(--astryx-card-padding-inline,var(--astryx-card-padding,var(--spacing-4))))}
|
|
202
203
|
.x1tewnwq{--container-padding-inline-start:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,var(--spacing-4))))}
|
|
203
|
-
.
|
|
204
|
+
.x19lemt0{--container-padding-inline-start:var(--astryx-section-padding-inline-start,var(--astryx-section-padding-inline,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4)))))}
|
|
204
205
|
.x408pgh{--container-padding-inline-start:var(--layout-padding-inner-x,var(--spacing-4))}
|
|
205
206
|
.xdvaxxn{--container-padding-inline-start:var(--layout-padding-outer-x,var(--spacing-4))}
|
|
206
207
|
.x14ws0sr{--container-padding-inline-start:var(--spacing-0-5)}
|
|
@@ -220,9 +221,10 @@
|
|
|
220
221
|
.xraca2a{--container-padding-inline-start:var(--spacing-9)}
|
|
221
222
|
.x1qfzo5y{--indicator-color:transparent}
|
|
222
223
|
.x4906uf{--layout-content-width:var(--x---layout-content-width)}
|
|
224
|
+
.x1qfll2g{--layout-padding-inner-x:initial}
|
|
223
225
|
.x4poyjn{--layout-padding-inner-x:var(--astryx-card-padding-inline-start,var(--astryx-card-padding-inline,var(--astryx-card-padding,var(--spacing-4))))}
|
|
224
226
|
.x2so38{--layout-padding-inner-x:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,var(--spacing-4))))}
|
|
225
|
-
.
|
|
227
|
+
.x1v3gmnx{--layout-padding-inner-x:var(--astryx-section-padding-inline-start,var(--astryx-section-padding-inline,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4)))))}
|
|
226
228
|
.xlriy2h{--layout-padding-inner-x:var(--spacing-0-5)}
|
|
227
229
|
.xj1bl4l{--layout-padding-inner-x:var(--spacing-0)}
|
|
228
230
|
.xd38f90{--layout-padding-inner-x:var(--spacing-1-5)}
|
|
@@ -238,9 +240,10 @@
|
|
|
238
240
|
.xhjd9tl{--layout-padding-inner-x:var(--spacing-7)}
|
|
239
241
|
.xn7c84u{--layout-padding-inner-x:var(--spacing-8)}
|
|
240
242
|
.xeqkbsz{--layout-padding-inner-x:var(--spacing-9)}
|
|
243
|
+
.xyvxpqs{--layout-padding-inner-y:initial}
|
|
241
244
|
.x1u1kw4e{--layout-padding-inner-y:var(--astryx-card-padding-block-start,var(--astryx-card-padding,var(--spacing-4)))}
|
|
242
245
|
.xinu7xd{--layout-padding-inner-y:var(--astryx-dialog-padding-block-start,var(--astryx-dialog-padding,var(--spacing-4)))}
|
|
243
|
-
.
|
|
246
|
+
.x15yx5hm{--layout-padding-inner-y:var(--astryx-section-padding-block-start,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4))))}
|
|
244
247
|
.x180h0y5{--layout-padding-inner-y:var(--spacing-0-5)}
|
|
245
248
|
.xwuefyo{--layout-padding-inner-y:var(--spacing-0)}
|
|
246
249
|
.x1g8jpzm{--layout-padding-inner-y:var(--spacing-1-5)}
|
|
@@ -257,9 +260,10 @@
|
|
|
257
260
|
.xm2cs6f{--layout-padding-inner-y:var(--spacing-8)}
|
|
258
261
|
.x1vsq92b{--layout-padding-inner-y:var(--spacing-9)}
|
|
259
262
|
.x1wbjvqu{--layout-padding-outer-x:0px}
|
|
263
|
+
.xdt8ak2{--layout-padding-outer-x:initial}
|
|
260
264
|
.x14rzhog{--layout-padding-outer-x:var(--astryx-card-padding-inline-start,var(--astryx-card-padding-inline,var(--astryx-card-padding,var(--spacing-4))))}
|
|
261
265
|
.x1hsjncj{--layout-padding-outer-x:var(--astryx-dialog-padding-inline-start,var(--astryx-dialog-padding-inline,var(--astryx-dialog-padding,var(--spacing-4))))}
|
|
262
|
-
.
|
|
266
|
+
.x15i0zw9{--layout-padding-outer-x:var(--astryx-section-padding-inline-start,var(--astryx-section-padding-inline,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4)))))}
|
|
263
267
|
.xihiwg7{--layout-padding-outer-x:var(--spacing-0-5)}
|
|
264
268
|
.xswhm3q{--layout-padding-outer-x:var(--spacing-0)}
|
|
265
269
|
.x1u93lgd{--layout-padding-outer-x:var(--spacing-1-5)}
|
|
@@ -276,9 +280,10 @@
|
|
|
276
280
|
.x1t3kfz{--layout-padding-outer-x:var(--spacing-8)}
|
|
277
281
|
.xzr4qsh{--layout-padding-outer-x:var(--spacing-9)}
|
|
278
282
|
.xzxxx64{--layout-padding-outer-y:0px}
|
|
283
|
+
.x1rs4lu4{--layout-padding-outer-y:initial}
|
|
279
284
|
.xjej9fs{--layout-padding-outer-y:var(--astryx-card-padding-block-start,var(--astryx-card-padding,var(--spacing-4)))}
|
|
280
285
|
.x1pui4bz{--layout-padding-outer-y:var(--astryx-dialog-padding-block-start,var(--astryx-dialog-padding,var(--spacing-4)))}
|
|
281
|
-
.
|
|
286
|
+
.x1vw4zgg{--layout-padding-outer-y:var(--astryx-section-padding-block-start,var(--_section-padding-propagated,var(--astryx-section-padding,var(--spacing-4))))}
|
|
282
287
|
.x1vj96e0{--layout-padding-outer-y:var(--spacing-0-5)}
|
|
283
288
|
.x1mzf5mb{--layout-padding-outer-y:var(--spacing-0)}
|
|
284
289
|
.xd3dqby{--layout-padding-outer-y:var(--spacing-1-5)}
|
|
@@ -430,7 +435,6 @@
|
|
|
430
435
|
.x17y0mx6:not(#\#):not(#\#){inset-inline:0}
|
|
431
436
|
.xe8uvvx:not(#\#):not(#\#){list-style:none}
|
|
432
437
|
.x81ka23:not(#\#):not(#\#){margin-block:calc(-1 * (var(--spacing-3) - var(--spacing-2)))}
|
|
433
|
-
.x10hv0ee:not(#\#):not(#\#){margin-block:calc(-1 * var(--spacing-1))}
|
|
434
438
|
.xhzvc8f:not(#\#):not(#\#){margin-block:calc(-1 * var(--spacing-2))}
|
|
435
439
|
.xqixskq:not(#\#):not(#\#){margin-block:calc(var(--size-element-md) / 2 - var(--spacing-2) - var(--text-heading-2-size) * var(--text-heading-2-leading) / 2)}
|
|
436
440
|
.xacfrgf:not(#\#):not(#\#){margin-block:calc(var(--spacing-1) * -1)}
|
|
@@ -451,6 +455,9 @@
|
|
|
451
455
|
.xish69e:not(#\#):not(#\#){overscroll-behavior:contain}
|
|
452
456
|
.x8du1vd:not(#\#):not(#\#){overscroll-behavior:none}
|
|
453
457
|
.xt970qd:not(#\#):not(#\#){padding-block:0}
|
|
458
|
+
.x1vn5h1t:not(#\#):not(#\#){padding-block:calc((var(--size-element-lg) - var(--spacing-5) - 2 * var(--border-width)) / 2)}
|
|
459
|
+
.x1ioay2v:not(#\#):not(#\#){padding-block:calc((var(--size-element-md) - var(--spacing-5) - 2 * var(--border-width)) / 2)}
|
|
460
|
+
.x1ecmfrv:not(#\#):not(#\#){padding-block:calc((var(--size-element-sm) - var(--spacing-5) - 2 * var(--border-width)) / 2)}
|
|
454
461
|
.x1x7cmac:not(#\#):not(#\#){padding-block:calc(var(--spacing-1) - 1px)}
|
|
455
462
|
.xwo4yc8:not(#\#):not(#\#){padding-block:calc(var(--tree-list-row-gap,0px) / 2)}
|
|
456
463
|
.x13f7esw:not(#\#):not(#\#){padding-block:var(--spacing-0-5)}
|
|
@@ -636,6 +643,7 @@
|
|
|
636
643
|
.x1q8g9m5:not(#\#):not(#\#):not(#\#){background-color:var(--color-warning)}
|
|
637
644
|
.x1fd97le:not(#\#):not(#\#):not(#\#){background-color:var(--table-sticky-background,var(--color-background-card))}
|
|
638
645
|
.xl8spv7:not(#\#):not(#\#):not(#\#){background-color:var(--x-backgroundColor)}
|
|
646
|
+
.xafqdz2:not(#\#):not(#\#):not(#\#){background-image:linear-gradient(to bottom,var(--color-background-surface) 60%,transparent)}
|
|
639
647
|
.x1vrk509:not(#\#):not(#\#):not(#\#){background-image:linear-gradient(var(--color-background-muted),var(--color-background-muted))}
|
|
640
648
|
.x14bno8m:not(#\#):not(#\#):not(#\#){background-image:linear-gradient(var(--color-neutral),var(--color-neutral))}
|
|
641
649
|
.x18o3ruo:not(#\#):not(#\#):not(#\#){background-image:none}
|
|
@@ -643,6 +651,7 @@
|
|
|
643
651
|
.x16uus16:not(#\#):not(#\#):not(#\#){border-end-end-radius:0}
|
|
644
652
|
.x1eprgri:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--_banner-radius,var(--radius-container))}
|
|
645
653
|
.x6k0y1c:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--_chat-composer-radius)}
|
|
654
|
+
.xoao14b:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--_field-radius)}
|
|
646
655
|
.x14i3lts:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-element)}
|
|
647
656
|
.x1dgc8on:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-full)}
|
|
648
657
|
.x1whkvtz:not(#\#):not(#\#):not(#\#){border-end-end-radius:var(--radius-inner)}
|
|
@@ -668,9 +677,9 @@
|
|
|
668
677
|
.x1ga7v0g:not(#\#):not(#\#):not(#\#){border-start-end-radius:0}
|
|
669
678
|
.x13nour3:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--_banner-radius,var(--radius-container))}
|
|
670
679
|
.xzc3kxz:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--_chat-composer-radius)}
|
|
680
|
+
.x1g2gkjz:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--_field-radius)}
|
|
671
681
|
.xg0tfu:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-chat)}
|
|
672
682
|
.x7hs6f1:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-container)}
|
|
673
|
-
.xxbepff:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-element)}
|
|
674
683
|
.x8agd5o:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-full)}
|
|
675
684
|
.x126per9:not(#\#):not(#\#):not(#\#){border-start-end-radius:var(--radius-inner)}
|
|
676
685
|
.x15mokao:not(#\#):not(#\#):not(#\#){border-start-start-radius:0}
|
|
@@ -984,6 +993,7 @@
|
|
|
984
993
|
.x1g2apga:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--_textarea-inline-padding) + var(--spacing-12))}
|
|
985
994
|
.xp2dy4z:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--_textarea-inline-padding) + var(--spacing-6))}
|
|
986
995
|
.x12frdag:not(#\#):not(#\#):not(#\#){padding-inline-end:calc(var(--container-padding-inline-end) - var(--border-width))}
|
|
996
|
+
.x17sfb9:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--astryx-number-input-padding-inline-end,var(--astryx-number-input-padding-inline,var(--astryx-number-input-padding,var(--spacing-2))))}
|
|
987
997
|
.x64h4k7:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--container-padding-inline-end)}
|
|
988
998
|
.x1peupej:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--layout-padding-inner-x,var(--spacing-4))}
|
|
989
999
|
.xpc6k2p:not(#\#):not(#\#):not(#\#){padding-inline-end:var(--layout-padding-outer-x,var(--spacing-4))}
|
|
@@ -1003,6 +1013,7 @@
|
|
|
1003
1013
|
.x1b6te9z:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--_textarea-inline-padding) + var(--spacing-6))}
|
|
1004
1014
|
.xs19ii7:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--container-padding-inline-start) - var(--border-width))}
|
|
1005
1015
|
.x2a0j69:not(#\#):not(#\#):not(#\#){padding-inline-start:calc(var(--spacing-2) - var(--spacing-1) + 1px)}
|
|
1016
|
+
.x1jni19p:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--astryx-number-input-padding-inline-start,var(--astryx-number-input-padding-inline,var(--astryx-number-input-padding,var(--spacing-2))))}
|
|
1006
1017
|
.x1c35znw:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--container-padding-inline-start)}
|
|
1007
1018
|
.xwjyata:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--layout-padding-inner-x,var(--spacing-4))}
|
|
1008
1019
|
.x139j0dd:not(#\#):not(#\#):not(#\#){padding-inline-start:var(--layout-padding-outer-x,var(--spacing-4))}
|
|
@@ -1411,6 +1422,7 @@
|
|
|
1411
1422
|
.x1if0o47:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:-48px}
|
|
1412
1423
|
.xat24cr:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:0}
|
|
1413
1424
|
.x1z0f2p2:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--_chat-composer-radius))}
|
|
1425
|
+
.x13i4uq0:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--astryx-number-input-padding-block-end,var(--astryx-number-input-padding,var(--spacing-1))))}
|
|
1414
1426
|
.x6h7pi7:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--container-padding-block-end,0px))}
|
|
1415
1427
|
.x1cdrix3:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--radius-chat))}
|
|
1416
1428
|
.xdrfirk:not(#\#):not(#\#):not(#\#):not(#\#){margin-bottom:calc(-1 * var(--spacing-1-5))}
|
|
@@ -1424,6 +1436,7 @@
|
|
|
1424
1436
|
.xr1yuqi:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:auto}
|
|
1425
1437
|
.xvyqdj1:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * anchor-size(height) - 8px)}
|
|
1426
1438
|
.xckg3cf:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--_chat-composer-radius))}
|
|
1439
|
+
.x5j3pgv:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--astryx-number-input-padding-block-start,var(--astryx-number-input-padding,var(--spacing-1))))}
|
|
1427
1440
|
.x1sa9bsh:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--container-padding-block-start,0px))}
|
|
1428
1441
|
.x1c40v9y:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--spacing-1-5))}
|
|
1429
1442
|
.x1ajqlyv:not(#\#):not(#\#):not(#\#):not(#\#){margin-top:calc(-1 * var(--spacing-2))}
|
|
@@ -1517,6 +1530,7 @@
|
|
|
1517
1530
|
.xbv1mwh:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(var(--container-padding-block-end) - var(--border-width))}
|
|
1518
1531
|
.xxbfulo:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:calc(var(--spacing-3) + var(--radius-chat))}
|
|
1519
1532
|
.xvpcij2:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--_chat-composer-padding)}
|
|
1533
|
+
.x3jnfsm:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--astryx-number-input-padding-block-end,var(--astryx-number-input-padding,var(--spacing-1)))}
|
|
1520
1534
|
.xc1wllq:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--container-padding-block-end)}
|
|
1521
1535
|
.xg476vw:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--layout-padding-inner-y,var(--spacing-4))}
|
|
1522
1536
|
.xon7vh3:not(#\#):not(#\#):not(#\#):not(#\#){padding-bottom:var(--layout-padding-outer-y,var(--spacing-4))}
|
|
@@ -1538,6 +1552,7 @@
|
|
|
1538
1552
|
.x1nex4ik:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--container-padding-block-start) - var(--border-width))}
|
|
1539
1553
|
.x1ak3mig:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:calc(var(--spacing-1-5) + var(--spacing-2))}
|
|
1540
1554
|
.x2gtn7z:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--_chat-composer-padding)}
|
|
1555
|
+
.x4kswst:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--astryx-number-input-padding-block-start,var(--astryx-number-input-padding,var(--spacing-1)))}
|
|
1541
1556
|
.x14m0hsi:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--container-padding-block-start)}
|
|
1542
1557
|
.xqty4a:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--layout-padding-inner-y,var(--spacing-4))}
|
|
1543
1558
|
.x81pis9:not(#\#):not(#\#):not(#\#):not(#\#){padding-top:var(--layout-padding-outer-y,var(--spacing-4))}
|
|
@@ -1643,10 +1658,14 @@
|
|
|
1643
1658
|
.xxx281p:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{inset:0}
|
|
1644
1659
|
.xeu5z55:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset:var(--_thumbnail-hit-inset)}
|
|
1645
1660
|
@starting-style{.x4itv7f.x4itv7f:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){opacity:0}}
|
|
1661
|
+
@starting-style{.x6mt36l.x6mt36l:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}}
|
|
1662
|
+
@starting-style{.x1yqmsfc.x1yqmsfc:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}}
|
|
1646
1663
|
@starting-style{.xub2912.xub2912:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateY(-100%)}}
|
|
1647
1664
|
@starting-style{.x12p7p72.x12p7p72:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateY(-4px)}}
|
|
1648
1665
|
@starting-style{.xhbqy3z.xhbqy3z:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateY(100%)}}
|
|
1649
1666
|
@starting-style{.x1tswlu5.x1tswlu5:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateY(8px)}}
|
|
1667
|
+
@starting-style{.x1lymnkk.x1lymnkk:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(-100%)}}
|
|
1668
|
+
@starting-style{.x14gflnl.x14gflnl:is([dir="rtl"] *):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#){transform:translateX(100%)}}
|
|
1650
1669
|
.x1k48kgn:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{border-radius:inherit}
|
|
1651
1670
|
.x17gn2l9:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::before{grid-column:1}
|
|
1652
1671
|
.xd54j2p:not(#\#):not(#\#):not(#\#):not(#\#):not(#\#):not(#\#)::after{inset-block:0}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ScrollbarGutterHold {
|
|
2
|
+
/**
|
|
3
|
+
* Call once the lock's own styles are applied: measures whether the element
|
|
4
|
+
* grew anyway and, only then, pads the difference away.
|
|
5
|
+
*/
|
|
6
|
+
settle(): void;
|
|
7
|
+
/** Call on unlock: restores everything this hold changed. */
|
|
8
|
+
release(): void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Keeps `element`'s content box the width it is right now, across a scroll
|
|
12
|
+
* lock that is about to hide the document's scrollbar.
|
|
13
|
+
*
|
|
14
|
+
* Call it *before* applying the lock's styles, then {@link
|
|
15
|
+
* ScrollbarGutterHold.settle} immediately after, and {@link
|
|
16
|
+
* ScrollbarGutterHold.release} on unlock:
|
|
17
|
+
*
|
|
18
|
+
* ```
|
|
19
|
+
* const hold = holdScrollbarGutter(document.body);
|
|
20
|
+
* body.style.position = 'fixed';
|
|
21
|
+
* hold.settle();
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* Overlay scrollbars (mobile, default macOS) take no layout space, so there is
|
|
25
|
+
* nothing to hold and nothing is touched.
|
|
26
|
+
*/
|
|
27
|
+
export declare function holdScrollbarGutter(element: HTMLElement): ScrollbarGutterHold;
|
|
28
|
+
//# sourceMappingURL=scrollbarGutter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollbarGutter.d.ts","sourceRoot":"","sources":["../../src/hooks/scrollbarGutter.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,MAAM,IAAI,IAAI,CAAC;IACf,6DAA6D;IAC7D,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,WAAW,GAAG,mBAAmB,CA+D7E"}
|