@react-spectrum/s2 3.0.0-nightly-93c26d8bd-241028 → 3.0.0-nightly-07431f4b1-241030
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/dist/Accordion.cjs +1 -1
- package/dist/Accordion.cjs.map +1 -1
- package/dist/Accordion.css.map +1 -1
- package/dist/Accordion.mjs +2 -2
- package/dist/Accordion.mjs.map +1 -1
- package/dist/ActionButton.cjs +10 -32
- package/dist/ActionButton.cjs.map +1 -1
- package/dist/ActionButton.css +20 -60
- package/dist/ActionButton.css.map +1 -1
- package/dist/ActionButton.mjs +10 -32
- package/dist/ActionButton.mjs.map +1 -1
- package/dist/Avatar.cjs +2 -4
- package/dist/Avatar.cjs.map +1 -1
- package/dist/Avatar.css +4 -16
- package/dist/Avatar.css.map +1 -1
- package/dist/Avatar.mjs +2 -4
- package/dist/Avatar.mjs.map +1 -1
- package/dist/Badge.cjs +5 -16
- package/dist/Badge.cjs.map +1 -1
- package/dist/Badge.css +10 -30
- package/dist/Badge.css.map +1 -1
- package/dist/Badge.mjs +5 -16
- package/dist/Badge.mjs.map +1 -1
- package/dist/Breadcrumbs.cjs +12 -41
- package/dist/Breadcrumbs.cjs.map +1 -1
- package/dist/Breadcrumbs.css +38 -86
- package/dist/Breadcrumbs.css.map +1 -1
- package/dist/Breadcrumbs.mjs +12 -41
- package/dist/Breadcrumbs.mjs.map +1 -1
- package/dist/Button.cjs +19 -59
- package/dist/Button.cjs.map +1 -1
- package/dist/Button.css +37 -113
- package/dist/Button.css.map +1 -1
- package/dist/Button.mjs +19 -59
- package/dist/Button.mjs.map +1 -1
- package/dist/Card.cjs +27 -67
- package/dist/Card.cjs.map +1 -1
- package/dist/Card.css +42 -117
- package/dist/Card.css.map +1 -1
- package/dist/Card.mjs +27 -67
- package/dist/Card.mjs.map +1 -1
- package/dist/Checkbox.cjs +9 -27
- package/dist/Checkbox.cjs.map +1 -1
- package/dist/Checkbox.css +17 -49
- package/dist/Checkbox.css.map +1 -1
- package/dist/Checkbox.mjs +9 -27
- package/dist/Checkbox.mjs.map +1 -1
- package/dist/CheckboxGroup.cjs +5 -16
- package/dist/CheckboxGroup.cjs.map +1 -1
- package/dist/CheckboxGroup.css +10 -30
- package/dist/CheckboxGroup.css.map +1 -1
- package/dist/CheckboxGroup.mjs +5 -16
- package/dist/CheckboxGroup.mjs.map +1 -1
- package/dist/ClearButton.cjs +6 -17
- package/dist/ClearButton.cjs.map +1 -1
- package/dist/ClearButton.css +11 -35
- package/dist/ClearButton.css.map +1 -1
- package/dist/ClearButton.mjs +6 -17
- package/dist/ClearButton.mjs.map +1 -1
- package/dist/CloseButton.cjs +10 -32
- package/dist/CloseButton.cjs.map +1 -1
- package/dist/CloseButton.css +20 -64
- package/dist/CloseButton.css.map +1 -1
- package/dist/CloseButton.mjs +10 -32
- package/dist/CloseButton.mjs.map +1 -1
- package/dist/ColorArea.cjs +4 -16
- package/dist/ColorArea.cjs.map +1 -1
- package/dist/ColorArea.css +8 -28
- package/dist/ColorArea.css.map +1 -1
- package/dist/ColorArea.mjs +4 -16
- package/dist/ColorArea.mjs.map +1 -1
- package/dist/ColorField.cjs +5 -16
- package/dist/ColorField.cjs.map +1 -1
- package/dist/ColorField.css +10 -30
- package/dist/ColorField.css.map +1 -1
- package/dist/ColorField.mjs +5 -16
- package/dist/ColorField.mjs.map +1 -1
- package/dist/ColorHandle.cjs +5 -15
- package/dist/ColorHandle.cjs.map +1 -1
- package/dist/ColorHandle.css +10 -30
- package/dist/ColorHandle.css.map +1 -1
- package/dist/ColorHandle.mjs +5 -15
- package/dist/ColorHandle.mjs.map +1 -1
- package/dist/ColorSlider.cjs +6 -17
- package/dist/ColorSlider.cjs.map +1 -1
- package/dist/ColorSlider.css +34 -50
- package/dist/ColorSlider.css.map +1 -1
- package/dist/ColorSlider.mjs +6 -17
- package/dist/ColorSlider.mjs.map +1 -1
- package/dist/ColorSwatch.cjs +8 -26
- package/dist/ColorSwatch.cjs.map +1 -1
- package/dist/ColorSwatch.css +16 -52
- package/dist/ColorSwatch.css.map +1 -1
- package/dist/ColorSwatch.mjs +8 -26
- package/dist/ColorSwatch.mjs.map +1 -1
- package/dist/ColorSwatchPicker.cjs +6 -16
- package/dist/ColorSwatchPicker.cjs.map +1 -1
- package/dist/ColorSwatchPicker.css +8 -28
- package/dist/ColorSwatchPicker.css.map +1 -1
- package/dist/ColorSwatchPicker.mjs +6 -16
- package/dist/ColorSwatchPicker.mjs.map +1 -1
- package/dist/ComboBox.cjs +22 -71
- package/dist/ComboBox.cjs.map +1 -1
- package/dist/ComboBox.css +64 -152
- package/dist/ComboBox.css.map +1 -1
- package/dist/ComboBox.mjs +22 -71
- package/dist/ComboBox.mjs.map +1 -1
- package/dist/ContextualHelp.cjs +1 -1
- package/dist/ContextualHelp.css +2 -6
- package/dist/ContextualHelp.css.map +1 -1
- package/dist/ContextualHelp.mjs +1 -1
- package/dist/Dialog.cjs +2 -2
- package/dist/Dialog.css +2 -2
- package/dist/Dialog.mjs +2 -2
- package/dist/Disclosure.cjs +34 -68
- package/dist/Disclosure.cjs.map +1 -1
- package/dist/Disclosure.css +55 -91
- package/dist/Disclosure.css.map +1 -1
- package/dist/Disclosure.mjs +36 -70
- package/dist/Disclosure.mjs.map +1 -1
- package/dist/DropZone.cjs +2 -4
- package/dist/DropZone.cjs.map +1 -1
- package/dist/DropZone.css +4 -16
- package/dist/DropZone.css.map +1 -1
- package/dist/DropZone.mjs +2 -4
- package/dist/DropZone.mjs.map +1 -1
- package/dist/Field.cjs +16 -47
- package/dist/Field.cjs.map +1 -1
- package/dist/Field.css +31 -95
- package/dist/Field.css.map +1 -1
- package/dist/Field.mjs +16 -47
- package/dist/Field.mjs.map +1 -1
- package/dist/IllustratedMessage.cjs +6 -20
- package/dist/IllustratedMessage.cjs.map +1 -1
- package/dist/IllustratedMessage.css +10 -24
- package/dist/IllustratedMessage.css.map +1 -1
- package/dist/IllustratedMessage.mjs +6 -20
- package/dist/IllustratedMessage.mjs.map +1 -1
- package/dist/Image.cjs +2 -2
- package/dist/Image.css +2 -2
- package/dist/Image.mjs +2 -2
- package/dist/InlineAlert.cjs +2 -5
- package/dist/InlineAlert.cjs.map +1 -1
- package/dist/InlineAlert.css +11 -15
- package/dist/InlineAlert.css.map +1 -1
- package/dist/InlineAlert.mjs +2 -5
- package/dist/InlineAlert.mjs.map +1 -1
- package/dist/Menu.cjs +22 -67
- package/dist/Menu.cjs.map +1 -1
- package/dist/Menu.css +32 -96
- package/dist/Menu.css.map +1 -1
- package/dist/Menu.mjs +22 -67
- package/dist/Menu.mjs.map +1 -1
- package/dist/Meter.cjs +22 -68
- package/dist/Meter.cjs.map +1 -1
- package/dist/Meter.css +63 -139
- package/dist/Meter.css.map +1 -1
- package/dist/Meter.mjs +22 -68
- package/dist/Meter.mjs.map +1 -1
- package/dist/Modal.cjs +2 -2
- package/dist/Modal.css +2 -2
- package/dist/Modal.mjs +2 -2
- package/dist/NumberField.cjs +23 -71
- package/dist/NumberField.cjs.map +1 -1
- package/dist/NumberField.css +63 -146
- package/dist/NumberField.css.map +1 -1
- package/dist/NumberField.mjs +23 -71
- package/dist/NumberField.mjs.map +1 -1
- package/dist/Picker.cjs +23 -67
- package/dist/Picker.cjs.map +1 -1
- package/dist/Picker.css +50 -130
- package/dist/Picker.css.map +1 -1
- package/dist/Picker.mjs +23 -67
- package/dist/Picker.mjs.map +1 -1
- package/dist/ProgressBar.cjs +23 -69
- package/dist/ProgressBar.cjs.map +1 -1
- package/dist/ProgressBar.css +64 -140
- package/dist/ProgressBar.css.map +1 -1
- package/dist/ProgressBar.mjs +23 -69
- package/dist/ProgressBar.mjs.map +1 -1
- package/dist/ProgressCircle.cjs +6 -20
- package/dist/ProgressCircle.cjs.map +1 -1
- package/dist/ProgressCircle.css +12 -40
- package/dist/ProgressCircle.css.map +1 -1
- package/dist/ProgressCircle.mjs +6 -20
- package/dist/ProgressCircle.mjs.map +1 -1
- package/dist/Provider.css +7 -0
- package/dist/Provider.css.map +1 -1
- package/dist/Radio.cjs +8 -26
- package/dist/Radio.cjs.map +1 -1
- package/dist/Radio.css +16 -48
- package/dist/Radio.css.map +1 -1
- package/dist/Radio.mjs +8 -26
- package/dist/Radio.mjs.map +1 -1
- package/dist/RadioGroup.cjs +5 -16
- package/dist/RadioGroup.cjs.map +1 -1
- package/dist/RadioGroup.css +10 -30
- package/dist/RadioGroup.css.map +1 -1
- package/dist/RadioGroup.mjs +5 -16
- package/dist/RadioGroup.mjs.map +1 -1
- package/dist/SearchField.cjs +5 -16
- package/dist/SearchField.cjs.map +1 -1
- package/dist/SearchField.css +10 -30
- package/dist/SearchField.css.map +1 -1
- package/dist/SearchField.mjs +5 -16
- package/dist/SearchField.mjs.map +1 -1
- package/dist/SegmentedControl.cjs +8 -14
- package/dist/SegmentedControl.cjs.map +1 -1
- package/dist/SegmentedControl.css +9 -29
- package/dist/SegmentedControl.css.map +1 -1
- package/dist/SegmentedControl.mjs +8 -14
- package/dist/SegmentedControl.mjs.map +1 -1
- package/dist/Slider.cjs +63 -196
- package/dist/Slider.cjs.map +1 -1
- package/dist/Slider.css +61 -181
- package/dist/Slider.css.map +1 -1
- package/dist/Slider.mjs +63 -196
- package/dist/Slider.mjs.map +1 -1
- package/dist/StatusLight.cjs +9 -27
- package/dist/StatusLight.cjs.map +1 -1
- package/dist/StatusLight.css +17 -49
- package/dist/StatusLight.css.map +1 -1
- package/dist/StatusLight.mjs +9 -27
- package/dist/StatusLight.mjs.map +1 -1
- package/dist/Switch.cjs +6 -15
- package/dist/Switch.cjs.map +1 -1
- package/dist/Switch.css +10 -26
- package/dist/Switch.css.map +1 -1
- package/dist/Switch.mjs +6 -15
- package/dist/Switch.mjs.map +1 -1
- package/dist/TableView.cjs +42 -86
- package/dist/TableView.cjs.map +1 -1
- package/dist/TableView.css +65 -129
- package/dist/TableView.css.map +1 -1
- package/dist/TableView.mjs +42 -86
- package/dist/TableView.mjs.map +1 -1
- package/dist/Tabs.cjs +4 -15
- package/dist/Tabs.cjs.map +1 -1
- package/dist/Tabs.css +18 -34
- package/dist/Tabs.css.map +1 -1
- package/dist/Tabs.mjs +4 -15
- package/dist/Tabs.mjs.map +1 -1
- package/dist/TagGroup.cjs +14 -37
- package/dist/TagGroup.cjs.map +1 -1
- package/dist/TagGroup.css +23 -67
- package/dist/TagGroup.css.map +1 -1
- package/dist/TagGroup.mjs +14 -37
- package/dist/TagGroup.mjs.map +1 -1
- package/dist/TextField.cjs +11 -34
- package/dist/TextField.cjs.map +1 -1
- package/dist/TextField.css +22 -66
- package/dist/TextField.css.map +1 -1
- package/dist/TextField.mjs +11 -34
- package/dist/TextField.mjs.map +1 -1
- package/dist/Tooltip.cjs +2 -4
- package/dist/Tooltip.cjs.map +1 -1
- package/dist/Tooltip.css +4 -12
- package/dist/Tooltip.css.map +1 -1
- package/dist/Tooltip.mjs +2 -4
- package/dist/Tooltip.mjs.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +17 -17
- package/page.css +7 -0
- package/src/Accordion.tsx +1 -1
- package/src/Disclosure.tsx +13 -7
- package/src/page.macro.ts +11 -0
- package/style/dist/spectrum-theme.cjs +2 -8
- package/style/dist/spectrum-theme.cjs.map +1 -1
- package/style/dist/spectrum-theme.mjs +2 -8
- package/style/dist/spectrum-theme.mjs.map +1 -1
- package/style/dist/types.d.ts +1 -4
- package/style/dist/types.d.ts.map +1 -1
- package/style/spectrum-theme.ts +4 -4
package/dist/Checkbox.css
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
align-items: baseline;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
.
|
|
10
|
+
.lJ {
|
|
11
11
|
width: fit-content;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -89,36 +89,36 @@
|
|
|
89
89
|
outline-offset: 2px;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
.
|
|
93
|
-
width: 1rem;
|
|
92
|
+
.lf {
|
|
93
|
+
width: calc(1rem * var(--s2-scale));
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
.
|
|
97
|
-
width: .875rem;
|
|
96
|
+
.lK {
|
|
97
|
+
width: calc(.875rem * var(--s2-scale));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
.
|
|
101
|
-
width: 1.125rem;
|
|
100
|
+
.lL {
|
|
101
|
+
width: calc(1.125rem * var(--s2-scale));
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.
|
|
105
|
-
width: 1.25rem;
|
|
104
|
+
.lg {
|
|
105
|
+
width: calc(1.25rem * var(--s2-scale));
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.
|
|
109
|
-
height: 1rem;
|
|
108
|
+
.kf {
|
|
109
|
+
height: calc(1rem * var(--s2-scale));
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
.
|
|
113
|
-
height: .875rem;
|
|
112
|
+
.kK {
|
|
113
|
+
height: calc(.875rem * var(--s2-scale));
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
.
|
|
117
|
-
height: 1.125rem;
|
|
116
|
+
.kL {
|
|
117
|
+
height: calc(1.125rem * var(--s2-scale));
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
.
|
|
121
|
-
height: 1.25rem;
|
|
120
|
+
.kg {
|
|
121
|
+
height: calc(1.25rem * var(--s2-scale));
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
._vi {
|
|
@@ -327,38 +327,6 @@
|
|
|
327
327
|
._dbj {
|
|
328
328
|
font-size: 1.375rem;
|
|
329
329
|
}
|
|
330
|
-
|
|
331
|
-
.lbk {
|
|
332
|
-
width: 1.25rem;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.lb9 {
|
|
336
|
-
width: 1.09375rem;
|
|
337
|
-
}
|
|
338
|
-
|
|
339
|
-
.lb_b {
|
|
340
|
-
width: 1.40625rem;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.lbl {
|
|
344
|
-
width: 1.5625rem;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.kbk {
|
|
348
|
-
height: 1.25rem;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
.kb9 {
|
|
352
|
-
height: 1.09375rem;
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
.kb_b {
|
|
356
|
-
height: 1.40625rem;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.kbl {
|
|
360
|
-
height: 1.5625rem;
|
|
361
|
-
}
|
|
362
330
|
}
|
|
363
331
|
}
|
|
364
332
|
|
package/dist/Checkbox.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AC6CgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoBG;;;;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;;;;EA6CO;;;;;AAjEV;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA
|
|
1
|
+
{"mappings":"AC6CgB;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAoBG;;;;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;;;;EA6CO;;;;;AAjEV;EAAA;;;;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAAA;EAAA;IAAA;;;;IAoBG;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IA6CO;;;;;;AA7CP","sources":["547feb480bf9b133","packages/@react-spectrum/s2/src/Checkbox.tsx"],"sourcesContent":["@import \"bc01646daa9aaa9a\";\n@import \"4050adff4afc0e3e\";\n@import \"57a225a6b7ca79cd\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useSlottedContext} from 'react-aria-components';\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport DashIcon from '../ui-icons/Dash';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CheckboxStyleProps {\n /**\n * The size of the Checkbox.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** Whether the Checkbox should be displayed with an emphasized style. */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, CheckboxStyleProps {\n /** The label for the element. */\n children?: ReactNode\n}\n\nexport const CheckboxContext = createContext<ContextValue<CheckboxProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nexport const box = style<RenderProps>({\n ...focusRing(),\n size: 'control-sm',\n borderRadius: 'control-sm',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: 'gray-25',\n forcedColors: 'Background',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isInvalid: {\n default: baseColor('negative-900'),\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n },\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isInvalid: {\n default: 'negative',\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n }\n});\n\nexport const iconStyles = style({\n '--iconPrimary': {\n type: 'fill',\n value: {\n default: 'gray-25',\n forcedColors: 'HighlightText'\n }\n }\n});\n\nconst iconSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nfunction Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxContext);\n let boxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext);\n let ctx = useSlottedContext(CheckboxContext, props.slot);\n\n return (\n <AriaCheckbox\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => {\n let checkbox = (\n <div\n ref={boxRef}\n style={pressScale(boxRef)(renderProps)}\n className={box({\n ...renderProps,\n isSelected: renderProps.isSelected || renderProps.isIndeterminate,\n size: props.size || 'M',\n isEmphasized: isInCheckboxGroup ? ctx?.isEmphasized : props.isEmphasized\n })}>\n {renderProps.isIndeterminate &&\n <DashIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n {renderProps.isSelected && !renderProps.isIndeterminate &&\n <CheckmarkIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n </div>\n );\n\n // Only render checkbox without center baseline if no label.\n // This avoids expanding the checkbox height to the font's line height.\n if (!children) {\n return checkbox;\n }\n\n return (\n <>\n <CenterBaseline>\n {checkbox}\n </CenterBaseline>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n"],"names":[],"version":3,"file":"Checkbox.css.map"}
|
package/dist/Checkbox.mjs
CHANGED
|
@@ -44,7 +44,7 @@ const $9b405e0f8095dce0$var$wrapper = function anonymous(props, overrides) {
|
|
|
44
44
|
rules += ' _Zd';
|
|
45
45
|
rules += ' jF';
|
|
46
46
|
rules += ' _1d';
|
|
47
|
-
if (!$l) rules += '
|
|
47
|
+
if (!$l) rules += ' lJ';
|
|
48
48
|
rules += ' _c-bc1l9oh';
|
|
49
49
|
rules += ' _c-1uotwbwg';
|
|
50
50
|
rules += ' _c-eo0c6sf';
|
|
@@ -98,32 +98,14 @@ const $9b405e0f8095dce0$export$827f4ee28efc37 = function anonymous(props) {
|
|
|
98
98
|
rules += ' dx';
|
|
99
99
|
rules += ' _Nc';
|
|
100
100
|
rules += ' _M-3t1z';
|
|
101
|
-
if (props.size === "XL")
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
rules += ' l8';
|
|
110
|
-
} else {
|
|
111
|
-
rules += ' lbk';
|
|
112
|
-
rules += ' lj';
|
|
113
|
-
}
|
|
114
|
-
if (props.size === "XL") {
|
|
115
|
-
rules += ' kbl';
|
|
116
|
-
rules += ' kk';
|
|
117
|
-
} else if (props.size === "L") {
|
|
118
|
-
rules += ' kb_b';
|
|
119
|
-
rules += ' k_a';
|
|
120
|
-
} else if (props.size === "S") {
|
|
121
|
-
rules += ' kb9';
|
|
122
|
-
rules += ' k8';
|
|
123
|
-
} else {
|
|
124
|
-
rules += ' kbk';
|
|
125
|
-
rules += ' kj';
|
|
126
|
-
}
|
|
101
|
+
if (props.size === "XL") rules += ' lg';
|
|
102
|
+
else if (props.size === "L") rules += ' lL';
|
|
103
|
+
else if (props.size === "S") rules += ' lK';
|
|
104
|
+
else rules += ' lf';
|
|
105
|
+
if (props.size === "XL") rules += ' kg';
|
|
106
|
+
else if (props.size === "L") rules += ' kL';
|
|
107
|
+
else if (props.size === "S") rules += ' kK';
|
|
108
|
+
else rules += ' kf';
|
|
127
109
|
rules += ' _vi';
|
|
128
110
|
rules += ' _wi';
|
|
129
111
|
rules += ' _xi';
|
package/dist/Checkbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiCM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoE;AAE/G,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBC,MAAM
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;;;AAiCM,MAAM,0DAAkB,CAAA,GAAA,oBAAY,EAAoE;AAE/G,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CN,MAAM;AAUb,MAAM,iCAAW;IACf,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;AACN;AAEA,SAAS,+BAAS,YAAC,QAAQ,EAAE,GAAG,OAAqB,EAAE,GAAmC;IACxF,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,SAAS,CAAA,GAAA,aAAK,EAAE;IACpB,IAAI,WAAW,CAAA,GAAA,aAAK,EAA2B;IAC/C,IAAI,SAAS,CAAA,GAAA,sBAAc,EAAE,KAAK;IAClC,IAAI,WAAW,CAAC,CAAC,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACtC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,oBAAoB,CAAC,CAAC,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gCAAwB;IAC7D,IAAI,MAAM,CAAA,GAAA,wBAAgB,EAAE,2CAAiB,MAAM,IAAI;IAEvD,qBACE,gBAAC,CAAA,GAAA,eAAW;QACT,GAAG,KAAK;QACT,KAAK;QACL,UAAU;QACV,OAAO,MAAM,YAAY;QACzB,WAAW,CAAA,cAAe,AAAC,CAAA,MAAM,gBAAgB,IAAI,EAAC,IAAK,8BAAQ;gBAAC,GAAG,WAAW;0BAAE;gBAAU,MAAM,MAAM,IAAI,IAAI;YAAG,GAAG,MAAM,MAAM;kBACnI,CAAA;YACC,IAAI,yBACF,iBAAC;gBACC,KAAK;gBACL,OAAO,CAAA,GAAA,yCAAS,EAAE,QAAQ;gBAC1B,WAAW,wCAAI;oBACb,GAAG,WAAW;oBACd,YAAY,YAAY,UAAU,IAAI,YAAY,eAAe;oBACjE,MAAM,MAAM,IAAI,IAAI;oBACpB,cAAc,oBAAoB,KAAK,eAAe,MAAM,YAAY;gBAC1E;;oBACC,YAAY,eAAe,kBAC1B,gBAAC,CAAA,GAAA,wCAAO;wBAAE,MAAM,8BAAQ,CAAC,MAAM,IAAI,IAAI,IAAI;wBAAE,WAAW;;oBAEzD,YAAY,UAAU,IAAI,CAAC,YAAY,eAAe,kBACrD,gBAAC,CAAA,GAAA,wCAAY;wBAAE,MAAM,8BAAQ,CAAC,MAAM,IAAI,IAAI,IAAI;wBAAE,WAAW;;;;YAKnE,4DAA4D;YAC5D,uEAAuE;YACvE,IAAI,CAAC,UACH,OAAO;YAGT,qBACE;;kCACE,gBAAC,CAAA,GAAA,yCAAa;kCACX;;oBAEF;;;QAGP;;AAGN;AAEA;;;CAGC,GACD,IAAI,0DAAY,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/Checkbox.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Checkbox as AriaCheckbox, CheckboxProps as AriaCheckboxProps, CheckboxGroupStateContext, CheckboxRenderProps, ContextValue, useSlottedContext} from 'react-aria-components';\nimport {baseColor, focusRing, style} from '../style' with {type: 'macro'};\nimport {CenterBaseline} from './CenterBaseline';\nimport CheckmarkIcon from '../ui-icons/Checkmark';\nimport {createContext, forwardRef, ReactNode, useContext, useRef} from 'react';\nimport DashIcon from '../ui-icons/Dash';\nimport {FocusableRef, FocusableRefValue} from '@react-types/shared';\nimport {FormContext, useFormProps} from './Form';\nimport {getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {pressScale} from './pressScale';\nimport {useFocusableRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\ninterface CheckboxStyleProps {\n /**\n * The size of the Checkbox.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /** Whether the Checkbox should be displayed with an emphasized style. */\n isEmphasized?: boolean\n}\n\ninterface RenderProps extends CheckboxRenderProps, CheckboxStyleProps {}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style' | 'children' | 'onHover' | 'onHoverStart' | 'onHoverEnd' | 'onHoverChange'>, StyleProps, CheckboxStyleProps {\n /** The label for the element. */\n children?: ReactNode\n}\n\nexport const CheckboxContext = createContext<ContextValue<CheckboxProps, FocusableRefValue<HTMLLabelElement>>>(null);\n\nconst wrapper = style({\n display: 'flex',\n columnGap: 'text-to-control',\n alignItems: 'baseline',\n width: 'fit',\n font: 'control',\n transition: 'colors',\n color: {\n default: 'neutral',\n isDisabled: {\n default: 'disabled',\n forcedColors: 'GrayText'\n }\n },\n gridColumnStart: {\n isInForm: 'field'\n },\n disableTapHighlight: true\n}, getAllowedOverrides());\n\nexport const box = style<RenderProps>({\n ...focusRing(),\n size: 'control-sm',\n borderRadius: 'control-sm',\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n boxSizing: 'border-box',\n borderStyle: 'solid',\n transition: 'default',\n forcedColorAdjust: 'none',\n backgroundColor: {\n default: 'gray-25',\n forcedColors: 'Background',\n isSelected: {\n default: 'neutral',\n isEmphasized: baseColor('accent-900'),\n forcedColors: 'Highlight',\n isInvalid: {\n default: baseColor('negative-900'),\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n }\n }\n },\n borderColor: {\n default: baseColor('gray-800'),\n forcedColors: 'ButtonBorder',\n isInvalid: {\n default: 'negative',\n forcedColors: 'Mark'\n },\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText'\n },\n isSelected: 'transparent'\n }\n});\n\nexport const iconStyles = style({\n '--iconPrimary': {\n type: 'fill',\n value: {\n default: 'gray-25',\n forcedColors: 'HighlightText'\n }\n }\n});\n\nconst iconSize = {\n S: 'XS',\n M: 'S',\n L: 'M',\n XL: 'L'\n} as const;\n\nfunction Checkbox({children, ...props}: CheckboxProps, ref: FocusableRef<HTMLLabelElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxContext);\n let boxRef = useRef(null);\n let inputRef = useRef<HTMLInputElement | null>(null);\n let domRef = useFocusableRef(ref, inputRef);\n let isInForm = !!useContext(FormContext);\n props = useFormProps(props);\n let isInCheckboxGroup = !!useContext(CheckboxGroupStateContext);\n let ctx = useSlottedContext(CheckboxContext, props.slot);\n\n return (\n <AriaCheckbox\n {...props}\n ref={domRef}\n inputRef={inputRef}\n style={props.UNSAFE_style}\n className={renderProps => (props.UNSAFE_className || '') + wrapper({...renderProps, isInForm, size: props.size || 'M'}, props.styles)}>\n {renderProps => {\n let checkbox = (\n <div\n ref={boxRef}\n style={pressScale(boxRef)(renderProps)}\n className={box({\n ...renderProps,\n isSelected: renderProps.isSelected || renderProps.isIndeterminate,\n size: props.size || 'M',\n isEmphasized: isInCheckboxGroup ? ctx?.isEmphasized : props.isEmphasized\n })}>\n {renderProps.isIndeterminate &&\n <DashIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n {renderProps.isSelected && !renderProps.isIndeterminate &&\n <CheckmarkIcon size={iconSize[props.size || 'M']} className={iconStyles} />\n }\n </div>\n );\n\n // Only render checkbox without center baseline if no label.\n // This avoids expanding the checkbox height to the font's line height.\n if (!children) {\n return checkbox;\n }\n\n return (\n <>\n <CenterBaseline>\n {checkbox}\n </CenterBaseline>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n\n/**\n * Checkboxes allow users to select multiple items from a list of individual items,\n * or to mark one individual item as selected.\n */\nlet _Checkbox = forwardRef(Checkbox);\nexport {_Checkbox as Checkbox};\n"],"names":[],"version":3,"file":"Checkbox.mjs.map"}
|
package/dist/CheckboxGroup.cjs
CHANGED
|
@@ -91,22 +91,11 @@ function $883687908275b504$var$CheckboxGroup(props, ref) {
|
|
|
91
91
|
rules += ' _1d';
|
|
92
92
|
rules += ' _f-1x99dlob';
|
|
93
93
|
rules += ' _fa';
|
|
94
|
-
if (props.size === "XL")
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
rules += ' -aqrvqh_k-r';
|
|
100
|
-
} else if (props.size === "S") {
|
|
101
|
-
rules += ' -aqrvqh_k-bn';
|
|
102
|
-
rules += ' -aqrvqh_k-m';
|
|
103
|
-
} else if (props.size === "XS") {
|
|
104
|
-
rules += ' -aqrvqh_k-bl';
|
|
105
|
-
rules += ' -aqrvqh_k-k';
|
|
106
|
-
} else {
|
|
107
|
-
rules += ' -aqrvqh_k-br';
|
|
108
|
-
rules += ' -aqrvqh_k-q';
|
|
109
|
-
}
|
|
94
|
+
if (props.size === "XL") rules += ' -aqrvqh_k-n';
|
|
95
|
+
else if (props.size === "L") rules += ' -aqrvqh_k-l';
|
|
96
|
+
else if (props.size === "S") rules += ' -aqrvqh_k-h';
|
|
97
|
+
else if (props.size === "XS") rules += ' -aqrvqh_k-g';
|
|
98
|
+
else rules += ' -aqrvqh_k-j';
|
|
110
99
|
rules += ' -_1inj1bc_i--vfy389';
|
|
111
100
|
rules += ' je';
|
|
112
101
|
rules += ' __R-yksgrp';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,wCAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,0BAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,iDAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,uBAAS,EAAE,CAAA,GAAA,qCAAU;IACvC,QAAQ,CAAA,GAAA,sCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,qBACE,gCAAC,CAAA,GAAA,wCAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;YACxB,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gCAAC,CAAA,GAAA,oCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gCAAC;wBACC,WAAW;;;;;;;;;;;;;;;0BAeR;yCAAC;wBAAW;kCACf,cAAA,gCAAC,CAAA,GAAA,qCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;4BAAI;sCAChD,cAAA,gCAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;gCAAC,OAAO;kDAAC;gCAAY;0CAC3C;;;;kCAIP,gCAAC,CAAA,GAAA,kCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,IAAI,0DAAiB,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CheckboxGroup.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.cjs.map"}
|
package/dist/CheckboxGroup.css
CHANGED
|
@@ -66,24 +66,24 @@
|
|
|
66
66
|
align-items: baseline;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.-aqrvqh_k-
|
|
70
|
-
--field-height: 2rem;
|
|
69
|
+
.-aqrvqh_k-j {
|
|
70
|
+
--field-height: calc(2rem * var(--s2-scale));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
.-aqrvqh_k-
|
|
74
|
-
--field-height: 1.25rem;
|
|
73
|
+
.-aqrvqh_k-g {
|
|
74
|
+
--field-height: calc(1.25rem * var(--s2-scale));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
.-aqrvqh_k-
|
|
78
|
-
--field-height: 1.5rem;
|
|
77
|
+
.-aqrvqh_k-h {
|
|
78
|
+
--field-height: calc(1.5rem * var(--s2-scale));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.-aqrvqh_k-
|
|
82
|
-
--field-height: 2.5rem;
|
|
81
|
+
.-aqrvqh_k-l {
|
|
82
|
+
--field-height: calc(2.5rem * var(--s2-scale));
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
.-aqrvqh_k-
|
|
86
|
-
--field-height: 3rem;
|
|
85
|
+
.-aqrvqh_k-n {
|
|
86
|
+
--field-height: calc(3rem * var(--s2-scale));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.-_1inj1bc_i--vfy389 {
|
|
@@ -172,26 +172,6 @@
|
|
|
172
172
|
._dbj {
|
|
173
173
|
font-size: 1.375rem;
|
|
174
174
|
}
|
|
175
|
-
|
|
176
|
-
.-aqrvqh_k-br {
|
|
177
|
-
--field-height: 2.5rem;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.-aqrvqh_k-bl {
|
|
181
|
-
--field-height: 1.5625rem;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.-aqrvqh_k-bn {
|
|
185
|
-
--field-height: 1.875rem;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.-aqrvqh_k-bu {
|
|
189
|
-
--field-height: 3.125rem;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.-aqrvqh_k-by {
|
|
193
|
-
--field-height: 3.75rem;
|
|
194
|
-
}
|
|
195
175
|
}
|
|
196
176
|
}
|
|
197
177
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AC+EoC;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBf;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAxBe;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA
|
|
1
|
+
{"mappings":"AC+EoC;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;;EAAA;;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAwBf;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAxBe;EAAA;;;;;AAAA;;AAAA;EAAA;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;IAAA;;;;;;AAwBf","sources":["229a9af52db930e6","packages/@react-spectrum/s2/src/CheckboxGroup.tsx"],"sourcesContent":["@import \"99c19d559a913dfe\";\n@import \"3a372fd4efad6d81\";\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.css.map"}
|
package/dist/CheckboxGroup.mjs
CHANGED
|
@@ -84,22 +84,11 @@ function $4f43ac2b11e2df05$var$CheckboxGroup(props, ref) {
|
|
|
84
84
|
rules += ' _1d';
|
|
85
85
|
rules += ' _f-1x99dlob';
|
|
86
86
|
rules += ' _fa';
|
|
87
|
-
if (props.size === "XL")
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
rules += ' -aqrvqh_k-r';
|
|
93
|
-
} else if (props.size === "S") {
|
|
94
|
-
rules += ' -aqrvqh_k-bn';
|
|
95
|
-
rules += ' -aqrvqh_k-m';
|
|
96
|
-
} else if (props.size === "XS") {
|
|
97
|
-
rules += ' -aqrvqh_k-bl';
|
|
98
|
-
rules += ' -aqrvqh_k-k';
|
|
99
|
-
} else {
|
|
100
|
-
rules += ' -aqrvqh_k-br';
|
|
101
|
-
rules += ' -aqrvqh_k-q';
|
|
102
|
-
}
|
|
87
|
+
if (props.size === "XL") rules += ' -aqrvqh_k-n';
|
|
88
|
+
else if (props.size === "L") rules += ' -aqrvqh_k-l';
|
|
89
|
+
else if (props.size === "S") rules += ' -aqrvqh_k-h';
|
|
90
|
+
else if (props.size === "XS") rules += ' -aqrvqh_k-g';
|
|
91
|
+
else rules += ' -aqrvqh_k-j';
|
|
103
92
|
rules += ' -_1inj1bc_i--vfy389';
|
|
104
93
|
rules += ' je';
|
|
105
94
|
rules += ' __R-yksgrp';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACvC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,oBAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB
|
|
1
|
+
{"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAyCM,MAAM,0DAAuB,CAAA,GAAA,oBAAY,EAAiE;AAEjH,SAAS,oCAAc,KAAyB,EAAE,GAA2B;IAC3E,CAAC,OAAO,IAAI,GAAG,CAAA,GAAA,yCAAsB,EAAE,OAAO,KAAK;IACnD,IAAI,cAAc,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,yCAAU;IACvC,QAAQ,CAAA,GAAA,yCAAW,EAAE;IACrB,IAAI,SACF,KAAK,eACL,WAAW,gBACX,YAAY,YACZ,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,6BACb,qBAAqB,cACrB,OAAO,kBACP,cAAc,8BACd,mBAAmB,kBACnB,YAAY,gBACZ,YAAY,EACZ,GAAG,YACJ,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,qBACE,gBAAC,CAAA,GAAA,oBAAgB;QACd,GAAG,UAAU;QACd,KAAK;QACL,OAAO;QACP,WAAW,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAOJ;YACxB,MAAM,MAAM,IAAI;2BAChB;YACA,UAAU,CAAC,CAAC;QACd,GAAG,MAAM,MAAM;kBACd,CAAC,cAAC,UAAU,aAAE,SAAS,EAAC,iBAAM;;kCAC7B,gBAAC,CAAA,GAAA,yCAAS;wBACR,YAAY;wBACZ,YAAY,MAAM,UAAU;wBAC5B,MAAM;wBACN,eAAe;wBACf,YAAY;wBACZ,oBAAoB;wBACpB,gBAAgB,MAAM,cAAc;kCACnC;;kCAEH,gBAAC;wBACC,WAAW;;;;;;;;;;;;;;;0BAeR;yCAAC;wBAAW;kCACf,cAAA,gBAAC,CAAA,GAAA,yCAAU,EAAE,QAAQ;4BAAC,OAAO;gCAAC,GAAG,WAAW;sCAAE;4BAAI;sCAChD,cAAA,gBAAC,CAAA,GAAA,yCAAc,EAAE,QAAQ;gCAAC,OAAO;kDAAC;gCAAY;0CAC3C;;;;kCAIP,gBAAC,CAAA,GAAA,yCAAO;wBACN,MAAM;wBACN,YAAY;wBACZ,WAAW;wBACX,aAAa;wBACb,aAAa;kCACZ;;;;;AAKX;AAEA;;CAEC,GACD,IAAI,0DAAiB,CAAA,GAAA,iBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/CheckboxGroup.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n ContextValue\n} from 'react-aria-components';\nimport {CheckboxContext} from './Checkbox';\nimport {createContext, forwardRef, ReactNode, useContext} from 'react';\nimport {DOMRef, DOMRefValue, HelpTextProps, Orientation, SpectrumLabelableProps} from '@react-types/shared';\nimport {field, getAllowedOverrides, StyleProps} from './style-utils' with {type: 'macro'};\nimport {FieldLabel, HelpText} from './Field';\nimport {FormContext, useFormProps} from './Form';\nimport {style} from '../style' with {type: 'macro'};\nimport {useDOMRef} from '@react-spectrum/utils';\nimport {useSpectrumContextProps} from './useSpectrumContextProps';\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, 'className' | 'style' | 'children'>, StyleProps, SpectrumLabelableProps, HelpTextProps {\n /**\n * The size of the Checkboxes in the CheckboxGroup.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL',\n /**\n * The axis the checkboxes should align with.\n *\n * @default 'vertical'\n */\n orientation?: Orientation,\n /**\n * The Checkboxes contained within the CheckboxGroup.\n */\n children?: ReactNode,\n /**\n * By default, checkboxes are not emphasized (gray).\n * The emphasized (blue) version provides visual prominence.\n */\n isEmphasized?: boolean\n}\n\nexport const CheckboxGroupContext = createContext<ContextValue<CheckboxGroupProps, DOMRefValue<HTMLDivElement>>>(null);\n\nfunction CheckboxGroup(props: CheckboxGroupProps, ref: DOMRef<HTMLDivElement>) {\n [props, ref] = useSpectrumContextProps(props, ref, CheckboxGroupContext);\n let formContext = useContext(FormContext);\n props = useFormProps(props);\n let {\n label,\n description,\n errorMessage,\n children,\n labelPosition = 'top',\n labelAlign = 'start',\n necessityIndicator = 'icon',\n size = 'M',\n orientation = 'vertical',\n UNSAFE_className = '',\n UNSAFE_style,\n isEmphasized,\n ...groupProps\n } = props;\n let domRef = useDOMRef(ref);\n\n return (\n <AriaCheckboxGroup\n {...groupProps}\n ref={domRef}\n style={UNSAFE_style}\n className={UNSAFE_className + style({\n ...field(),\n // Double the usual gap because of the internal padding within checkbox that spectrum has.\n '--field-gap': {\n type: 'rowGap',\n value: '[calc(var(--field-height) - 1lh)]'\n }\n }, getAllowedOverrides())({\n size: props.size,\n labelPosition,\n isInForm: !!formContext\n }, props.styles)}>\n {({isDisabled, isInvalid}) => (<>\n <FieldLabel\n isDisabled={isDisabled}\n isRequired={props.isRequired}\n size={size}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n necessityIndicator={necessityIndicator}\n contextualHelp={props.contextualHelp}>\n {label}\n </FieldLabel>\n <div\n className={style({\n gridArea: 'input',\n display: 'flex',\n flexDirection: {\n orientation: {\n vertical: 'column',\n horizontal: 'row'\n }\n },\n lineHeight: 'ui',\n rowGap: '--field-gap',\n // Spectrum uses a fixed spacing value for horizontal,\n // but the gap changes depending on t-shirt size in vertical.\n columnGap: 16,\n flexWrap: 'wrap'\n })({orientation})}>\n <FormContext.Provider value={{...formContext, size}}>\n <CheckboxContext.Provider value={{isEmphasized}}>\n {children}\n </CheckboxContext.Provider>\n </FormContext.Provider>\n </div>\n <HelpText\n size={size}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n description={description}\n showErrorIcon>\n {errorMessage}\n </HelpText>\n </>)}\n </AriaCheckboxGroup>\n );\n}\n\n/**\n * A CheckboxGroup allows users to select one or more items from a list of choices.\n */\nlet _CheckboxGroup = forwardRef(CheckboxGroup);\nexport {_CheckboxGroup as CheckboxGroup};\n"],"names":[],"version":3,"file":"CheckboxGroup.mjs.map"}
|
package/dist/ClearButton.cjs
CHANGED
|
@@ -36,23 +36,12 @@ function $4fb579ecc195bd2b$var$ClearButton(props, ref) {
|
|
|
36
36
|
rules += ' _Zd';
|
|
37
37
|
rules += ' _1c';
|
|
38
38
|
rules += ' _2d';
|
|
39
|
-
rules += '
|
|
40
|
-
if (props.size === "XL")
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
rules += ' lr';
|
|
46
|
-
} else if (props.size === "S") {
|
|
47
|
-
rules += ' lbn';
|
|
48
|
-
rules += ' lm';
|
|
49
|
-
} else if (props.size === "XS") {
|
|
50
|
-
rules += ' lbl';
|
|
51
|
-
rules += ' lk';
|
|
52
|
-
} else {
|
|
53
|
-
rules += ' lbr';
|
|
54
|
-
rules += ' lq';
|
|
55
|
-
}
|
|
39
|
+
rules += ' kG';
|
|
40
|
+
if (props.size === "XL") rules += ' ln';
|
|
41
|
+
else if (props.size === "L") rules += ' ll';
|
|
42
|
+
else if (props.size === "S") rules += ' lh';
|
|
43
|
+
else if (props.size === "XS") rules += ' lg';
|
|
44
|
+
else rules += ' lj';
|
|
56
45
|
rules += ' _8-3t1x';
|
|
57
46
|
rules += ' wf';
|
|
58
47
|
rules += ' _La';
|
package/dist/ClearButton.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAyBD,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAE7B,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,WAAW,CAAA,cAAe
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAyBD,SAAS,kCAAY,KAAuB,EAAE,GAAoC;IAChF,IAAI,SAAS,CAAA,GAAA,yCAAc,EAAE;IAE7B,qBACE,gCAAC,CAAA,GAAA,iCAAK;QACH,GAAG,KAAK;QACT,KAAK;QACL,WAAW,CAAA,cAAe;;;;;;;;;;;;;;;;;;;;;;eAgBvB;gBAAC,GAAG,WAAW;gBAAE,MAAM,MAAM,IAAI,IAAI;YAAG;kBAC3C,cAAA,gCAAC,CAAA,GAAA,iCAAQ;YAAE,MAAM,MAAM,IAAI,IAAI;;;AAGrC;AAEA,IAAI,0DAAe,CAAA,GAAA,uBAAS,EAAE","sources":["packages/@react-spectrum/s2/src/ClearButton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Button,\n ButtonProps,\n ButtonRenderProps\n} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface ClearButtonStyleProps {\n /**\n * The size of the ClearButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\ninterface ClearButtonRenderProps extends ButtonRenderProps, ClearButtonStyleProps {}\ninterface ClearButtonProps extends ButtonProps, ClearButtonStyleProps {}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let domRef = useFocusableRef(ref);\n\n return (\n <Button\n {...props}\n ref={domRef}\n className={renderProps => style<ClearButtonRenderProps>({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 'full',\n width: 'control',\n flexShrink: 0,\n borderStyle: 'none',\n outlineStyle: 'none',\n backgroundColor: 'transparent',\n padding: 0,\n color: '[inherit]',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({...renderProps, size: props.size || 'M'})}>\n <CrossIcon size={props.size || 'M'} />\n </Button>\n );\n}\n\nlet _ClearButton = forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\n"],"names":[],"version":3,"file":"ClearButton.cjs.map"}
|
package/dist/ClearButton.css
CHANGED
|
@@ -15,28 +15,28 @@
|
|
|
15
15
|
justify-content: center;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.
|
|
18
|
+
.kG {
|
|
19
19
|
height: 100%;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.
|
|
23
|
-
width: 2rem;
|
|
22
|
+
.lj {
|
|
23
|
+
width: calc(2rem * var(--s2-scale));
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.
|
|
27
|
-
width: 1.25rem;
|
|
26
|
+
.lg {
|
|
27
|
+
width: calc(1.25rem * var(--s2-scale));
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.
|
|
31
|
-
width: 1.5rem;
|
|
30
|
+
.lh {
|
|
31
|
+
width: calc(1.5rem * var(--s2-scale));
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.
|
|
35
|
-
width: 2.5rem;
|
|
34
|
+
.ll {
|
|
35
|
+
width: calc(2.5rem * var(--s2-scale));
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
39
|
-
width: 3rem;
|
|
38
|
+
.ln {
|
|
39
|
+
width: calc(3rem * var(--s2-scale));
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
._8-3t1x {
|
|
@@ -81,28 +81,4 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
@layer _.b, UNSAFE_overrides;
|
|
84
|
-
|
|
85
|
-
@layer _.b.b {
|
|
86
|
-
@media not ((hover: hover) and (pointer: fine)) {
|
|
87
|
-
.lbr {
|
|
88
|
-
width: 2.5rem;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.lbl {
|
|
92
|
-
width: 1.5625rem;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.lbn {
|
|
96
|
-
width: 1.875rem;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.lbu {
|
|
100
|
-
width: 3.125rem;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.lby {
|
|
104
|
-
width: 3.75rem;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
84
|
/*# sourceMappingURL=ClearButton.css.map */
|
package/dist/ClearButton.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA0CgC;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA
|
|
1
|
+
{"mappings":"AA0CgC;;;;AAAA;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;EAAA;;;;;AAAA","sources":["packages/@react-spectrum/s2/src/ClearButton.tsx"],"sourcesContent":["/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {\n Button,\n ButtonProps,\n ButtonRenderProps\n} from 'react-aria-components';\nimport CrossIcon from '../ui-icons/Cross';\nimport {FocusableRef} from '@react-types/shared';\nimport {forwardRef} from 'react';\nimport {style} from '../style' with {type: 'macro'};\nimport {useFocusableRef} from '@react-spectrum/utils';\n\ninterface ClearButtonStyleProps {\n /**\n * The size of the ClearButton.\n *\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L' | 'XL'\n}\n\ninterface ClearButtonRenderProps extends ButtonRenderProps, ClearButtonStyleProps {}\ninterface ClearButtonProps extends ButtonProps, ClearButtonStyleProps {}\n\nfunction ClearButton(props: ClearButtonProps, ref: FocusableRef<HTMLButtonElement>) {\n let domRef = useFocusableRef(ref);\n\n return (\n <Button\n {...props}\n ref={domRef}\n className={renderProps => style<ClearButtonRenderProps>({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 'full',\n width: 'control',\n flexShrink: 0,\n borderStyle: 'none',\n outlineStyle: 'none',\n backgroundColor: 'transparent',\n padding: 0,\n color: '[inherit]',\n '--iconPrimary': {\n type: 'fill',\n value: 'currentColor'\n }\n })({...renderProps, size: props.size || 'M'})}>\n <CrossIcon size={props.size || 'M'} />\n </Button>\n );\n}\n\nlet _ClearButton = forwardRef(ClearButton);\nexport {_ClearButton as ClearButton};\n"],"names":[],"version":3,"file":"ClearButton.css.map"}
|
package/dist/ClearButton.mjs
CHANGED
|
@@ -30,23 +30,12 @@ function $f6a62e6e68437458$var$ClearButton(props, ref) {
|
|
|
30
30
|
rules += ' _Zd';
|
|
31
31
|
rules += ' _1c';
|
|
32
32
|
rules += ' _2d';
|
|
33
|
-
rules += '
|
|
34
|
-
if (props.size === "XL")
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
rules += ' lr';
|
|
40
|
-
} else if (props.size === "S") {
|
|
41
|
-
rules += ' lbn';
|
|
42
|
-
rules += ' lm';
|
|
43
|
-
} else if (props.size === "XS") {
|
|
44
|
-
rules += ' lbl';
|
|
45
|
-
rules += ' lk';
|
|
46
|
-
} else {
|
|
47
|
-
rules += ' lbr';
|
|
48
|
-
rules += ' lq';
|
|
49
|
-
}
|
|
33
|
+
rules += ' kG';
|
|
34
|
+
if (props.size === "XL") rules += ' ln';
|
|
35
|
+
else if (props.size === "L") rules += ' ll';
|
|
36
|
+
else if (props.size === "S") rules += ' lh';
|
|
37
|
+
else if (props.size === "XS") rules += ' lg';
|
|
38
|
+
else rules += ' lj';
|
|
50
39
|
rules += ' _8-3t1x';
|
|
51
40
|
rules += ' wf';
|
|
52
41
|
rules += ' _La';
|