@hopper-ui/components 0.1.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +117 -0
- package/dist/HopperProvider/src/HopperProvider.d.ts +33 -1
- package/dist/HopperProvider/src/HopperProvider.js +2 -1
- package/dist/HopperProvider/src/index.d.ts +1 -0
- package/dist/HopperProvider/src/index.js +2 -1
- package/dist/IconList/src/IconList.css +6 -6
- package/dist/IconList/src/IconList.js +2 -1
- package/dist/IconList/src/IconListContext.js +1 -0
- package/dist/IconList/src/index.css +6 -6
- package/dist/IconList/src/index.js +2 -1
- package/dist/Label/src/Label.css +70 -70
- package/dist/Label/src/Label.js +3 -2
- package/dist/Label/src/LabelContext.js +1 -0
- package/dist/Label/src/index.css +70 -70
- package/dist/Label/src/index.js +3 -2
- package/dist/Link/src/Link.css +165 -0
- package/dist/Link/src/Link.d.ts +33 -0
- package/dist/Link/src/Link.js +11 -0
- package/dist/Link/src/LinkContext.d.ts +8 -0
- package/dist/Link/src/LinkContext.js +2 -0
- package/dist/Link/src/index.css +165 -0
- package/dist/Link/src/index.d.ts +5 -0
- package/dist/Link/src/index.js +11 -0
- package/dist/Spinner/src/Spinner.css +124 -124
- package/dist/Spinner/src/Spinner.d.ts +1 -0
- package/dist/Spinner/src/Spinner.js +5 -4
- package/dist/Spinner/src/SpinnerContext.js +1 -0
- package/dist/Spinner/src/index.css +124 -124
- package/dist/Spinner/src/index.js +5 -4
- package/dist/Text/src/Text.css +67 -67
- package/dist/Text/src/Text.d.ts +2 -3
- package/dist/Text/src/Text.js +5 -2
- package/dist/Text/src/TextContext.js +1 -0
- package/dist/Text/src/index.css +67 -67
- package/dist/Text/src/index.d.ts +1 -1
- package/dist/Text/src/index.js +5 -2
- package/dist/buttons/src/Button.css +634 -435
- package/dist/buttons/src/Button.d.ts +15 -10
- package/dist/buttons/src/Button.js +13 -9
- package/dist/buttons/src/ButtonContext.d.ts +6 -2
- package/dist/buttons/src/ButtonContext.js +1 -0
- package/dist/buttons/src/ButtonGroup.css +38 -0
- package/dist/buttons/src/ButtonGroup.d.ts +40 -0
- package/dist/buttons/src/ButtonGroup.js +83 -0
- package/dist/buttons/src/ButtonGroupContext.d.ts +9 -0
- package/dist/buttons/src/ButtonGroupContext.js +2 -0
- package/dist/buttons/src/index.css +634 -435
- package/dist/buttons/src/index.d.ts +2 -1
- package/dist/buttons/src/index.js +13 -9
- package/dist/checkbox/src/Checkbox.css +292 -0
- package/dist/checkbox/src/Checkbox.d.ts +20 -0
- package/dist/checkbox/src/Checkbox.js +11 -0
- package/dist/checkbox/src/CheckboxContext.d.ts +8 -0
- package/dist/checkbox/src/CheckboxContext.js +2 -0
- package/dist/checkbox/src/CheckboxField.css +119 -0
- package/dist/checkbox/src/CheckboxField.d.ts +26 -0
- package/dist/checkbox/src/CheckboxField.js +7 -0
- package/dist/checkbox/src/CheckboxFieldContext.d.ts +10 -0
- package/dist/checkbox/src/CheckboxFieldContext.js +2 -0
- package/dist/checkbox/src/CheckboxGroup.css +568 -0
- package/dist/checkbox/src/CheckboxGroup.d.ts +30 -0
- package/dist/checkbox/src/CheckboxGroup.js +12 -0
- package/dist/checkbox/src/CheckboxGroupContext.d.ts +8 -0
- package/dist/checkbox/src/CheckboxGroupContext.js +2 -0
- package/dist/checkbox/src/CheckboxList.d.ts +17 -0
- package/dist/checkbox/src/CheckboxList.js +3 -0
- package/dist/checkbox/src/CheckboxListContext.d.ts +10 -0
- package/dist/checkbox/src/CheckboxListContext.js +2 -0
- package/dist/checkbox/src/index.css +568 -0
- package/dist/checkbox/src/index.d.ts +13 -0
- package/dist/checkbox/src/index.js +20 -0
- package/dist/chip/src/Chip.css +261 -0
- package/dist/chip/src/Chip.d.ts +27 -0
- package/dist/chip/src/Chip.js +10 -0
- package/dist/chip/src/ChipContext.d.ts +10 -0
- package/dist/chip/src/ChipContext.js +2 -0
- package/dist/chip/src/index.css +261 -0
- package/dist/chip/src/index.d.ts +7 -0
- package/dist/chip/src/index.js +10 -0
- package/dist/chunk-2EAZPH3M.js +7 -0
- package/dist/chunk-3LRBUQC2.js +43 -0
- package/dist/chunk-4AARNXWE.js +101 -0
- package/dist/chunk-4VVNSXIB.js +7 -0
- package/dist/chunk-5KJ5IKUE.js +69 -0
- package/dist/chunk-5MBJWRZD.js +7 -0
- package/dist/{chunk-SEU4CGZD.js → chunk-65JPI4FL.js} +1 -1
- package/dist/chunk-7ELZ57E5.js +93 -0
- package/dist/chunk-A7TZHALP.js +7 -0
- package/dist/chunk-ACVMW6YD.js +7 -0
- package/dist/{chunk-YLDA2M2E.js → chunk-ANVMQBBG.js} +2 -1
- package/dist/chunk-B7WS4DBA.js +83 -0
- package/dist/chunk-BPM4ETTB.js +35 -0
- package/dist/{chunk-QIOYM2XJ.js → chunk-DFUQTSEV.js} +13 -13
- package/dist/chunk-DGLAGYBD.js +7 -0
- package/dist/chunk-ESVVLTEN.js +7 -0
- package/dist/chunk-FU5CCPLP.js +7 -0
- package/dist/chunk-GXKSX5N5.js +104 -0
- package/dist/chunk-H5YTU3U7.js +20 -0
- package/dist/chunk-H7VJS4MX.js +7 -0
- package/dist/chunk-HVRSS5RT.js +186 -0
- package/dist/chunk-HXI3MEEK.js +27 -0
- package/dist/chunk-I7AMDVGG.js +124 -0
- package/dist/{chunk-XCKF6EU7.js → chunk-IYITZANI.js} +9 -9
- package/dist/chunk-JHY3TXL4.js +101 -0
- package/dist/{chunk-6BEVZRUL.js → chunk-KVDXQMWI.js} +1 -1
- package/dist/chunk-M6UHXS6K.js +58 -0
- package/dist/chunk-MD6IFXLG.js +57 -0
- package/dist/chunk-ME3RBGOT.js +91 -0
- package/dist/chunk-N7YDPVZL.js +7 -0
- package/dist/chunk-NH3IVMXB.js +43 -0
- package/dist/chunk-NKHMUPAP.js +43 -0
- package/dist/chunk-OHPGEHL3.js +83 -0
- package/dist/chunk-VIHBOZVN.js +92 -0
- package/dist/chunk-VJQ7M2BK.js +7 -0
- package/dist/chunk-WDUQUPTE.js +7 -0
- package/dist/chunk-WTKIUAHI.js +7 -0
- package/dist/chunk-YHBJAXUY.js +7 -0
- package/dist/chunk-YSQDPG26.js +27 -0
- package/dist/chunk-YWUIJ6ZQ.js +83 -0
- package/dist/chunk-ZGNK4GWA.js +7 -0
- package/dist/{chunk-XQ3GUEBN.js → chunk-ZQEB3Y3X.js} +8 -9
- package/dist/{chunk-7QUHQYCR.js → chunk-ZWU6DRRZ.js} +1 -1
- package/dist/errorMessage/src/ErrorMessage.css +102 -0
- package/dist/errorMessage/src/ErrorMessage.d.ts +20 -0
- package/dist/errorMessage/src/ErrorMessage.js +9 -0
- package/dist/errorMessage/src/ErrorMessageContext.d.ts +9 -0
- package/dist/errorMessage/src/ErrorMessageContext.js +2 -0
- package/dist/errorMessage/src/index.css +102 -0
- package/dist/errorMessage/src/index.d.ts +6 -0
- package/dist/errorMessage/src/index.js +9 -0
- package/dist/helperMessage/src/HelperMessage.css +94 -0
- package/dist/helperMessage/src/HelperMessage.d.ts +20 -0
- package/dist/helperMessage/src/HelperMessage.js +8 -0
- package/dist/helperMessage/src/HelperMessageContext.d.ts +9 -0
- package/dist/helperMessage/src/HelperMessageContext.js +2 -0
- package/dist/helperMessage/src/index.css +94 -0
- package/dist/helperMessage/src/index.d.ts +6 -0
- package/dist/helperMessage/src/index.js +8 -0
- package/dist/{intl → i18n}/src/index.d.ts +1 -0
- package/dist/i18n/src/index.js +2 -0
- package/dist/i18n/src/useLocalizedString.d.ts +9 -0
- package/dist/i18n/src/useLocalizedString.js +2 -0
- package/dist/layout/src/Flex.js +1 -0
- package/dist/layout/src/Grid.js +1 -1
- package/dist/layout/src/Inline.js +1 -0
- package/dist/layout/src/Stack.js +1 -0
- package/dist/radio/src/Radio.css +293 -0
- package/dist/radio/src/Radio.d.ts +20 -0
- package/dist/radio/src/Radio.js +11 -0
- package/dist/radio/src/RadioContext.d.ts +8 -0
- package/dist/radio/src/RadioContext.js +2 -0
- package/dist/radio/src/RadioField.css +119 -0
- package/dist/radio/src/RadioField.d.ts +26 -0
- package/dist/radio/src/RadioField.js +7 -0
- package/dist/radio/src/RadioFieldContext.d.ts +10 -0
- package/dist/radio/src/RadioFieldContext.js +2 -0
- package/dist/radio/src/RadioGroup.css +570 -0
- package/dist/radio/src/RadioGroup.d.ts +30 -0
- package/dist/radio/src/RadioGroup.js +12 -0
- package/dist/radio/src/RadioGroupContext.d.ts +8 -0
- package/dist/radio/src/RadioGroupContext.js +2 -0
- package/dist/radio/src/RadioList.d.ts +17 -0
- package/dist/radio/src/RadioList.js +3 -0
- package/dist/radio/src/RadioListContext.d.ts +10 -0
- package/dist/radio/src/RadioListContext.js +2 -0
- package/dist/radio/src/index.css +570 -0
- package/dist/radio/src/index.d.ts +13 -0
- package/dist/radio/src/index.js +20 -0
- package/dist/switch/src/Switch.css +236 -0
- package/dist/switch/src/Switch.d.ts +20 -0
- package/dist/switch/src/Switch.js +11 -0
- package/dist/switch/src/SwitchContext.d.ts +8 -0
- package/dist/switch/src/SwitchContext.js +2 -0
- package/dist/switch/src/SwitchField.css +119 -0
- package/dist/switch/src/SwitchField.d.ts +26 -0
- package/dist/switch/src/SwitchField.js +7 -0
- package/dist/switch/src/SwitchFieldContext.d.ts +10 -0
- package/dist/switch/src/SwitchFieldContext.js +2 -0
- package/dist/switch/src/index.css +276 -0
- package/dist/switch/src/index.d.ts +9 -0
- package/dist/switch/src/index.js +13 -0
- package/dist/utils/src/ClearSlots.d.ts +28 -0
- package/dist/utils/src/ClearSlots.js +2 -0
- package/dist/utils/src/SlotProvider.js +1 -0
- package/dist/utils/src/composeClassnameRenderProps.js +2 -0
- package/dist/utils/src/cssModule.js +2 -0
- package/dist/utils/src/index.d.ts +11 -6
- package/dist/utils/src/index.js +8 -4
- package/dist/utils/src/isTextOnlyChildren.js +2 -0
- package/dist/utils/src/{size-adapter.d.ts → sizeAdapter.d.ts} +1 -1
- package/dist/utils/src/sizeAdapter.js +1 -0
- package/dist/utils/src/types.d.ts +17 -5
- package/dist/utils/src/useRenderProps.d.ts +843 -0
- package/dist/utils/src/useRenderProps.js +2 -0
- package/dist/utils/src/useSlot.d.ts +8 -0
- package/dist/utils/src/useSlot.js +2 -0
- package/package.json +32 -27
- package/dist/chunk-GXUPEV64.js +0 -24
- package/dist/chunk-WROQHGG5.js +0 -141
- package/dist/chunk-WRWNRVTG.js +0 -47
- package/dist/intl/src/index.js +0 -1
- package/dist/intl/src/useLocalizedString.d.ts +0 -26
- package/dist/intl/src/useLocalizedString.js +0 -1
- package/dist/utils/src/compose-classname-render-props.js +0 -1
- package/dist/utils/src/css-module.js +0 -1
- package/dist/utils/src/is-text-only-children.js +0 -1
- package/dist/utils/src/size-adapter.js +0 -1
- /package/dist/{chunk-D57ZIX5W.js → chunk-LQICWONC.js} +0 -0
- /package/dist/utils/src/{compose-classname-render-props.d.ts → composeClassnameRenderProps.d.ts} +0 -0
- /package/dist/utils/src/{css-module.d.ts → cssModule.d.ts} +0 -0
- /package/dist/utils/src/{is-text-only-children.d.ts → isTextOnlyChildren.d.ts} +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/IconList/src/IconList.module.css/#css-module-data */
|
|
2
|
+
.IconList-module__hop-IconList___eJ4Sl {
|
|
3
|
+
--hop-IconList-gap: var(--hop-space-inline-xs);
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-wrap: wrap;
|
|
6
|
+
gap: var(--hop-IconList-gap);
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/Text/src/Text.module.css/#css-module-data */
|
|
11
|
+
.Text-module__hop-Text___-u1e- {
|
|
12
|
+
--hop-Text-xs-font-size: var(--hop-body-xs-font-size);
|
|
13
|
+
--hop-Text-xs-font-family: var(--hop-body-xs-font-family);
|
|
14
|
+
--hop-Text-xs-font-weight: var(--hop-body-xs-font-weight);
|
|
15
|
+
--hop-Text-xs-line-height: var(--hop-body-xs-line-height);
|
|
16
|
+
--hop-Text-sm-font-size: var(--hop-body-sm-font-size);
|
|
17
|
+
--hop-Text-sm-font-family: var(--hop-body-sm-font-family);
|
|
18
|
+
--hop-Text-sm-font-weight: var(--hop-body-sm-font-weight);
|
|
19
|
+
--hop-Text-sm-line-height: var(--hop-body-sm-line-height);
|
|
20
|
+
--hop-Text-md-font-size: var(--hop-body-md-font-size);
|
|
21
|
+
--hop-Text-md-font-family: var(--hop-body-md-font-family);
|
|
22
|
+
--hop-Text-md-font-weight: var(--hop-body-md-font-weight);
|
|
23
|
+
--hop-Text-md-line-height: var(--hop-body-md-line-height);
|
|
24
|
+
--hop-Text-lg-font-size: var(--hop-body-lg-font-size);
|
|
25
|
+
--hop-Text-lg-font-family: var(--hop-body-lg-font-family);
|
|
26
|
+
--hop-Text-lg-font-weight: var(--hop-body-lg-font-weight);
|
|
27
|
+
--hop-Text-lg-line-height: var(--hop-body-lg-line-height);
|
|
28
|
+
--hop-Text-xl-font-size: var(--hop-body-xl-font-size);
|
|
29
|
+
--hop-Text-xl-font-family: var(--hop-body-xl-font-family);
|
|
30
|
+
--hop-Text-xl-font-weight: var(--hop-body-xl-font-weight);
|
|
31
|
+
--hop-Text-xl-line-height: var(--hop-body-xl-line-height);
|
|
32
|
+
--hop-Text-2xl-font-size: var(--hop-body-2xl-font-size);
|
|
33
|
+
--hop-Text-2xl-font-family: var(--hop-body-2xl-font-family);
|
|
34
|
+
--hop-Text-2xl-font-weight: var(--hop-body-2xl-font-weight);
|
|
35
|
+
--hop-Text-2xl-line-height: var(--hop-body-2xl-line-height);
|
|
36
|
+
--hop-Text-inherit-size-font-size: inherit;
|
|
37
|
+
--hop-Text-inherit-size-font-family: inherit;
|
|
38
|
+
--hop-Text-inherit-size-font-weight: inherit;
|
|
39
|
+
--hop-Text-inherit-size-line-height: inherit;
|
|
40
|
+
}
|
|
41
|
+
:where(.Text-module__hop-Text___-u1e-) {
|
|
42
|
+
font-family: var(--font-family);
|
|
43
|
+
font-size: var(--font-size);
|
|
44
|
+
font-weight: var(--font-weight);
|
|
45
|
+
line-height: var(--line-height);
|
|
46
|
+
}
|
|
47
|
+
:where(.Text-module__hop-Text--xs___P2Mlk) {
|
|
48
|
+
--font-size: var(--hop-Text-xs-font-size);
|
|
49
|
+
--font-family: var(--hop-Text-xs-font-family);
|
|
50
|
+
--font-weight: var(--hop-Text-xs-font-weight);
|
|
51
|
+
--line-height: var(--hop-Text-xs-line-height);
|
|
52
|
+
}
|
|
53
|
+
:where(.Text-module__hop-Text--sm___DIgJn) {
|
|
54
|
+
--font-size: var(--hop-Text-sm-font-size);
|
|
55
|
+
--font-family: var(--hop-Text-sm-font-family);
|
|
56
|
+
--font-weight: var(--hop-Text-sm-font-weight);
|
|
57
|
+
--line-height: var(--hop-Text-sm-line-height);
|
|
58
|
+
}
|
|
59
|
+
:where(.Text-module__hop-Text--md___EBUtj) {
|
|
60
|
+
--font-size: var(--hop-Text-md-font-size);
|
|
61
|
+
--font-family: var(--hop-Text-md-font-family);
|
|
62
|
+
--font-weight: var(--hop-Text-md-font-weight);
|
|
63
|
+
--line-height: var(--hop-Text-md-line-height);
|
|
64
|
+
}
|
|
65
|
+
:where(.Text-module__hop-Text--lg___Au1wj) {
|
|
66
|
+
--font-size: var(--hop-Text-lg-font-size);
|
|
67
|
+
--font-family: var(--hop-Text-lg-font-family);
|
|
68
|
+
--font-weight: var(--hop-Text-lg-font-weight);
|
|
69
|
+
--line-height: var(--hop-Text-lg-line-height);
|
|
70
|
+
}
|
|
71
|
+
:where(.Text-module__hop-Text--xl___UoQSa) {
|
|
72
|
+
--font-size: var(--hop-Text-xl-font-size);
|
|
73
|
+
--font-family: var(--hop-Text-xl-font-family);
|
|
74
|
+
--font-weight: var(--hop-Text-xl-font-weight);
|
|
75
|
+
--line-height: var(--hop-Text-xl-line-height);
|
|
76
|
+
}
|
|
77
|
+
:where(.Text-module__hop-Text--2xl___Nxjf-) {
|
|
78
|
+
--font-size: var(--hop-Text-2xl-font-size);
|
|
79
|
+
--font-family: var(--hop-Text-2xl-font-family);
|
|
80
|
+
--font-weight: var(--hop-Text-2xl-font-weight);
|
|
81
|
+
--line-height: var(--hop-Text-2xl-line-height);
|
|
82
|
+
}
|
|
83
|
+
:where(.Text-module__hop-Text--inherit___WPX1D) {
|
|
84
|
+
--font-size: var(--hop-Text-inherit-size-font-size);
|
|
85
|
+
--font-family: var(--hop-Text-inherit-size-font-family);
|
|
86
|
+
--font-weight: var(--hop-Text-inherit-size-font-weight);
|
|
87
|
+
--line-height: var(--hop-Text-inherit-size-line-height);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/switch/src/Switch.module.css/#css-module-data */
|
|
91
|
+
.Switch-module__hop-Switch___A9t3N {
|
|
92
|
+
--hop-Switch-border-size: 0.0625rem;
|
|
93
|
+
--hop-Switch-border-color: var(--hop-neutral-border);
|
|
94
|
+
--hop-Switch-border-radius: var(--hop-shape-rounded-lg);
|
|
95
|
+
--hop-Switch-background-color: var(--hop-neutral-surface);
|
|
96
|
+
--hop-Switch-thumb-color: var(--hop-neutral-icon);
|
|
97
|
+
--hop-Switch-text-color: var(--hop-neutral-text);
|
|
98
|
+
--hop-Switch-border-color-hover: var(--hop-neutral-border-hover);
|
|
99
|
+
--hop-Switch-background-color-hover: var(--hop-neutral-surface-hover);
|
|
100
|
+
--hop-Switch-thumb-color-hover: var(--hop-neutral-icon-hover);
|
|
101
|
+
--hop-Switch-text-color-hover: var(--hop-neutral-text-hover);
|
|
102
|
+
--hop-Switch-border-color-pressed: var(--hop-neutral-border-press);
|
|
103
|
+
--hop-Switch-background-color-pressed: var(--hop-neutral-surface-press);
|
|
104
|
+
--hop-Switch-thumb-color-pressed: var(--hop-neutral-icon-press);
|
|
105
|
+
--hop-Switch-text-color-pressed: var(--hop-neutral-text-press);
|
|
106
|
+
--hop-Switch-border-color-focus: var(--hop-neutral-border-hover);
|
|
107
|
+
--hop-Switch-background-color-focus: var(--hop-neutral-surface-hover);
|
|
108
|
+
--hop-Switch-thumb-color-focus: var(--hop-neutral-icon-hover);
|
|
109
|
+
--hop-Switch-focus-ring-color: var(--hop-primary-border-focus);
|
|
110
|
+
--hop-Switch-text-color-focus: var(--hop-neutral-text);
|
|
111
|
+
--hop-Switch-border-color-selected: var(--hop-neutral-border-selected);
|
|
112
|
+
--hop-Switch-background-color-selected: var(--hop-neutral-surface-selected);
|
|
113
|
+
--hop-Switch-thumb-color-selected: var(--hop-neutral-icon-selected);
|
|
114
|
+
--hop-Switch-text-color-selected: var(--hop-neutral-text);
|
|
115
|
+
--hop-Switch-border-color-disabled: var(--hop-neutral-border-disabled);
|
|
116
|
+
--hop-Switch-background-color-disabled: var(--hop-neutral-surface-disabled);
|
|
117
|
+
--hop-Switch-thumb-color-disabled: var(--hop-neutral-icon-disabled);
|
|
118
|
+
--hop-Switch-text-color-disabled: var(--hop-neutral-text-disabled);
|
|
119
|
+
--hop-Switch-inline-size-md: 3rem;
|
|
120
|
+
--hop-Switch-block-size-md: 1.5rem;
|
|
121
|
+
--hop-Switch-thumb-size-md: 1rem;
|
|
122
|
+
--hop-Switch-inset-inline-start-md: var(--hop-space-inset-xs);
|
|
123
|
+
--hop-Switch-text-top-offset-md: calc((var(--block-size) - (var(--hop-body-md-line-height) * var(--hop-body-md-font-size))) / 2);
|
|
124
|
+
--hop-Switch-inline-size-sm: 2rem;
|
|
125
|
+
--hop-Switch-block-size-sm: 1rem;
|
|
126
|
+
--hop-Switch-thumb-size-sm: 0.75rem;
|
|
127
|
+
--hop-Switch-inset-inline-start-sm: calc(var(--hop-space-inset-xs) / 2);
|
|
128
|
+
--hop-Switch-text-top-offset-sm: calc((var(--block-size) - (var(--hop-body-sm-line-height) * var(--hop-body-sm-font-size))) / 2);
|
|
129
|
+
--border-size: var(--hop-Switch-border-size);
|
|
130
|
+
--border-color: var(--hop-Switch-border-color);
|
|
131
|
+
--border-radius: var(--hop-Switch-border-radius);
|
|
132
|
+
--background-color: var(--hop-Switch-background-color);
|
|
133
|
+
--column-gap: var(--hop-space-inline-sm);
|
|
134
|
+
--thumb-color: var(--hop-Switch-thumb-color);
|
|
135
|
+
--thumb-transform: translate(0, -50%);
|
|
136
|
+
--outline: none;
|
|
137
|
+
--cursor: pointer;
|
|
138
|
+
--text-color: var(--hop-Switch-text-color);
|
|
139
|
+
cursor: var(--cursor);
|
|
140
|
+
display: inline-flex;
|
|
141
|
+
column-gap: var(--column-gap);
|
|
142
|
+
align-items: center;
|
|
143
|
+
align-items: start;
|
|
144
|
+
justify-content: start;
|
|
145
|
+
box-sizing: border-box;
|
|
146
|
+
inline-size: max-content;
|
|
147
|
+
max-inline-size: 100%;
|
|
148
|
+
}
|
|
149
|
+
.Switch-module__hop-Switch--sm___zmqQy {
|
|
150
|
+
--inline-size: var(--hop-Switch-inline-size-sm);
|
|
151
|
+
--block-size: var(--hop-Switch-block-size-sm);
|
|
152
|
+
--thumb-size: var(--hop-Switch-thumb-size-sm);
|
|
153
|
+
--inset-inline-start: var(--hop-Switch-inset-inline-start-sm);
|
|
154
|
+
--text-top-offset: var(--hop-Switch-text-top-offset-sm);
|
|
155
|
+
}
|
|
156
|
+
.Switch-module__hop-Switch--md___wJ5dn {
|
|
157
|
+
--inline-size: var(--hop-Switch-inline-size-md);
|
|
158
|
+
--block-size: var(--hop-Switch-block-size-md);
|
|
159
|
+
--thumb-size: var(--hop-Switch-thumb-size-md);
|
|
160
|
+
--inset-inline-start: var(--hop-Switch-inset-inline-start-md);
|
|
161
|
+
--text-top-offset: var(--hop-Switch-text-top-offset-md);
|
|
162
|
+
}
|
|
163
|
+
.Switch-module__hop-Switch___A9t3N[data-hovered] {
|
|
164
|
+
--border-color: var(--hop-Switch-border-color-hover);
|
|
165
|
+
--background-color: var(--hop-Switch-background-color-hover);
|
|
166
|
+
--thumb-color: var(--hop-Switch-thumb-color-hover);
|
|
167
|
+
--text-color: var(--hop-Switch-text-color-hover);
|
|
168
|
+
}
|
|
169
|
+
.Switch-module__hop-Switch___A9t3N[data-pressed],
|
|
170
|
+
.Switch-module__hop-Switch___A9t3N[data-pressed][data-focus-visible] {
|
|
171
|
+
--border-color: var(--hop-Switch-border-color-pressed);
|
|
172
|
+
--background-color: var(--hop-Switch-background-color-pressed);
|
|
173
|
+
--thumb-color: var(--hop-Switch-thumb-color-pressed);
|
|
174
|
+
--text-color: var(--hop-Switch-text-color-pressed);
|
|
175
|
+
}
|
|
176
|
+
.Switch-module__hop-Switch___A9t3N[data-focus-visible] {
|
|
177
|
+
--border-color: var(--hop-Switch-border-color-focus);
|
|
178
|
+
--background-color: var(--hop-Switch-background-color-focus);
|
|
179
|
+
--thumb-color: var(--hop-Switch-thumb-color-focus);
|
|
180
|
+
--outline: 0.125rem solid var(--hop-Switch-focus-ring-color);
|
|
181
|
+
--text-color: var(--hop-Switch-text-color-focus);
|
|
182
|
+
}
|
|
183
|
+
.Switch-module__hop-Switch___A9t3N[data-selected],
|
|
184
|
+
.Switch-module__hop-Switch___A9t3N[data-selected][data-pressed] {
|
|
185
|
+
--border-color: var(--hop-Switch-border-color-selected);
|
|
186
|
+
--background-color: var(--hop-Switch-background-color-selected);
|
|
187
|
+
--thumb-color: var(--hop-Switch-thumb-color-selected);
|
|
188
|
+
--thumb-transform: translate(calc(var(--inline-size) - var(--thumb-size, var(--hop-Switch-thumb-size-md)) - (2 * var(--inset-inline-start, var(--hop-Switch-inset-inline-start-md))) - (2 * var(--border-size))), -50%);
|
|
189
|
+
--text-color: var(--hop-Switch-text-color-selected);
|
|
190
|
+
}
|
|
191
|
+
.Switch-module__hop-Switch___A9t3N[data-disabled] {
|
|
192
|
+
--border-color: var(--hop-Switch-border-color-disabled);
|
|
193
|
+
--background-color: var(--hop-Switch-background-color-disabled);
|
|
194
|
+
--thumb-color: var(--hop-Switch-thumb-color-disabled);
|
|
195
|
+
--text-color: var(--hop-Switch-text-color-disabled);
|
|
196
|
+
--cursor: not-allowed;
|
|
197
|
+
}
|
|
198
|
+
.Switch-module__hop-Switch__indicator___TkQTl {
|
|
199
|
+
position: relative;
|
|
200
|
+
flex: 0 0 auto;
|
|
201
|
+
box-sizing: border-box;
|
|
202
|
+
inline-size: var(--inline-size, var(--hop-Switch-inline-size-md));
|
|
203
|
+
block-size: var(--block-size, var(--hop-Switch-block-size-md));
|
|
204
|
+
background-color: var(--background-color);
|
|
205
|
+
border: var(--border-size) solid var(--border-color);
|
|
206
|
+
border-radius: var(--border-radius);
|
|
207
|
+
outline: var(--outline);
|
|
208
|
+
outline-offset: 0.125rem;
|
|
209
|
+
transition: background var(--hop-easing-duration-2), border-color var(--hop-easing-duration-2);
|
|
210
|
+
}
|
|
211
|
+
.Switch-module__hop-Switch__indicator___TkQTl::before {
|
|
212
|
+
content: "";
|
|
213
|
+
position: absolute;
|
|
214
|
+
inset-block-start: 50%;
|
|
215
|
+
inset-inline-start: var(--inset-inline-start);
|
|
216
|
+
transform: var(--thumb-transform);
|
|
217
|
+
flex: 0 0 auto;
|
|
218
|
+
order: 1;
|
|
219
|
+
box-sizing: border-box;
|
|
220
|
+
inline-size: var(--thumb-size);
|
|
221
|
+
block-size: var(--thumb-size);
|
|
222
|
+
background-color: var(--thumb-color);
|
|
223
|
+
border-radius: var(--hop-shape-circle);
|
|
224
|
+
transition: transform var(--hop-easing-duration-2), background var(--hop-easing-duration-2);
|
|
225
|
+
}
|
|
226
|
+
.Switch-module__hop-Switch__text___PidAG {
|
|
227
|
+
flex: 0 1 auto;
|
|
228
|
+
order: 2;
|
|
229
|
+
min-inline-size: 0;
|
|
230
|
+
margin-block-start: var(--text-top-offset, var(--hop-Switch-text-top-offset-md));
|
|
231
|
+
color: var(--text-color);
|
|
232
|
+
}
|
|
233
|
+
.Switch-module__hop-Switch__icon-list___tkie7,
|
|
234
|
+
.Switch-module__hop-Switch__icon___kOrAo {
|
|
235
|
+
order: 3;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* css-module:/home/runner/work/wl-hopper/wl-hopper/packages/components/src/switch/src/SwitchField.module.css/#css-module-data */
|
|
239
|
+
.SwitchField-module__hop-SwitchField___REZnn {
|
|
240
|
+
--hop-SwitchField-description-color: var(--hop-neutral-text-weak);
|
|
241
|
+
--hop-SwitchField-description-color-disabled: var(--hop-neutral-text-disabled);
|
|
242
|
+
--hop-SwitchField-sm-row-gap: var(--hop-space-stack-xs);
|
|
243
|
+
--hop-SwitchField-switch-sm-inline-size: 2rem;
|
|
244
|
+
--hop-SwitchField-description-sm-margin-inline-start: calc(var(--hop-SwitchField-switch-sm-inline-size) + var(--hop-space-inline-sm));
|
|
245
|
+
--hop-SwitchField-md-row-gap: var(--hop-space-stack-xs);
|
|
246
|
+
--hop-SwitchField-switch-md-inline-size: 3rem;
|
|
247
|
+
--hop-SwitchField-description-md-margin-inline-start: calc(var(--hop-SwitchField-switch-md-inline-size) + var(--hop-space-inline-sm));
|
|
248
|
+
--description-color: var(--hop-SwitchField-description-color);
|
|
249
|
+
display: flex;
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
row-gap: var(--row-gap, var(--hop-space-stack-sm));
|
|
252
|
+
align-items: flex-start;
|
|
253
|
+
justify-content: flex-start;
|
|
254
|
+
box-sizing: border-box;
|
|
255
|
+
inline-size: max-content;
|
|
256
|
+
max-inline-size: 100%;
|
|
257
|
+
}
|
|
258
|
+
.SwitchField-module__hop-SwitchField___REZnn[data-disabled] {
|
|
259
|
+
--description-color: var(--hop-SwitchField-description-color-disabled);
|
|
260
|
+
}
|
|
261
|
+
.SwitchField-module__hop-SwitchField--sm___zhYuQ {
|
|
262
|
+
--row-gap: var(--hop-SwitchField-sm-row-gap);
|
|
263
|
+
--description-margin-inline-start: var(--hop-SwitchField-description-sm-margin-inline-start);
|
|
264
|
+
}
|
|
265
|
+
.SwitchField-module__hop-SwitchField--md___rcmWy {
|
|
266
|
+
--row-gap: var(--hop-SwitchField-md-row-gap);
|
|
267
|
+
--description-margin-inline-start: var(--hop-SwitchField-description-md-margin-inline-start);
|
|
268
|
+
}
|
|
269
|
+
.SwitchField-module__hop-SwitchField__description___N9E47 {
|
|
270
|
+
order: 2;
|
|
271
|
+
margin-inline-start: var(--description-margin-inline-start, var(--hop-SwitchField-description-md-margin-inline-start));
|
|
272
|
+
color: var(--description-color);
|
|
273
|
+
}
|
|
274
|
+
.SwitchField-module__hop-SwitchField__switch___znvte {
|
|
275
|
+
order: 1;
|
|
276
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { GlobalSwitchCssSelector, Switch, SwitchProps } from './Switch.js';
|
|
2
|
+
export { SwitchContext } from './SwitchContext.js';
|
|
3
|
+
export { GlobalSwitchFieldCssSelector, SwitchField, SwitchFieldProps } from './SwitchField.js';
|
|
4
|
+
export { SwitchFieldContext } from './SwitchFieldContext.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '@hopper-ui/styled-system';
|
|
7
|
+
import 'react-aria-components';
|
|
8
|
+
import '../../utils/src/types.js';
|
|
9
|
+
import '@react-types/shared';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { GlobalSwitchFieldCssSelector, _SwitchField as SwitchField } from '../../chunk-YWUIJ6ZQ.js';
|
|
2
|
+
export { SwitchFieldContext } from '../../chunk-H7VJS4MX.js';
|
|
3
|
+
export { GlobalSwitchCssSelector, _Switch as Switch } from '../../chunk-ME3RBGOT.js';
|
|
4
|
+
export { SwitchContext } from '../../chunk-YHBJAXUY.js';
|
|
5
|
+
import '../../chunk-ZWU6DRRZ.js';
|
|
6
|
+
import '../../chunk-65JPI4FL.js';
|
|
7
|
+
import '../../chunk-M6UHXS6K.js';
|
|
8
|
+
import '../../chunk-HXI3MEEK.js';
|
|
9
|
+
import '../../chunk-OE5BLFZI.js';
|
|
10
|
+
import '../../chunk-M36KANKC.js';
|
|
11
|
+
import '../../chunk-DHVVYSLB.js';
|
|
12
|
+
import '../../chunk-KVDXQMWI.js';
|
|
13
|
+
import '../../chunk-YSQDPG26.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { Context, ReactNode, PropsWithChildren } from 'react';
|
|
3
|
+
import { ContextValue } from 'react-aria-components';
|
|
4
|
+
|
|
5
|
+
interface ClearProvidersProps<T extends Element> {
|
|
6
|
+
/**
|
|
7
|
+
* The list of providers to clear.
|
|
8
|
+
*/
|
|
9
|
+
values: Context<ContextValue<unknown, T>>[];
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Writing slots in a component can be a bit tricky. This component is a utility that allows you to clear the slots of a component.
|
|
14
|
+
*
|
|
15
|
+
* For instance: In a dialog, slots could apply specific styles to a Divider divider between the heading and the content.
|
|
16
|
+
* If someone wanted to make a two column layout in their content and use a Divider, they'd need to do some work to get rid of the class name the dialog applies.
|
|
17
|
+
*
|
|
18
|
+
* There are a few reasons why you might want to clear slots:
|
|
19
|
+
* - You're trying to make a component that is a container for other components, and you don't want anything set above to affect your content.
|
|
20
|
+
* - You're trying to specify a different slot provider inside
|
|
21
|
+
*/
|
|
22
|
+
declare function ClearProviders<T extends Element>({ values, children }: ClearProvidersProps<T>): ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Most of the time, you won't need to use this component. It's mostly useful for when you're trying to make a component that is a container for other components, and you don't want anything set above to affect your content.
|
|
25
|
+
*/
|
|
26
|
+
declare function ClearContainerSlots({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { ClearContainerSlots, ClearProviders, type ClearProvidersProps };
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
export { cssModule } from './
|
|
2
|
-
export { composeClassnameRenderProps } from './
|
|
3
|
-
export { Size, SizeAdapter } from './
|
|
4
|
-
export { BaseComponentProps, DOMProps, RenderProps, StyleProps, StyleRenderProps } from './types.js';
|
|
5
|
-
export { isTextOnlyChildren } from './
|
|
1
|
+
export { cssModule } from './cssModule.js';
|
|
2
|
+
export { composeClassnameRenderProps } from './composeClassnameRenderProps.js';
|
|
3
|
+
export { Size, SizeAdapter } from './sizeAdapter.js';
|
|
4
|
+
export { BaseComponentProps, DOMProps, RenderProps, RenderPropsHookOptions, StyleProps, StyleRenderProps } from './types.js';
|
|
5
|
+
export { isTextOnlyChildren } from './isTextOnlyChildren.js';
|
|
6
6
|
export { SlotProvider, SlotProviderProps } from './SlotProvider.js';
|
|
7
|
+
export { useSlot } from './useSlot.js';
|
|
8
|
+
export { ClearContainerSlots, ClearProviders, ClearProvidersProps } from './ClearSlots.js';
|
|
9
|
+
export { useRenderProps } from './useRenderProps.js';
|
|
7
10
|
import 'clsx';
|
|
8
11
|
import '@hopper-ui/styled-system';
|
|
9
|
-
import 'react';
|
|
10
12
|
import '@react-types/shared';
|
|
13
|
+
import 'react';
|
|
11
14
|
import 'react-aria-components';
|
|
15
|
+
import 'react/jsx-runtime';
|
|
16
|
+
import 'csstype';
|
package/dist/utils/src/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import '../../chunk-
|
|
1
|
+
import '../../chunk-LQICWONC.js';
|
|
2
2
|
import '../../chunk-SNIF7MEM.js';
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { useSlot } from '../../chunk-H5YTU3U7.js';
|
|
4
|
+
export { useRenderProps } from '../../chunk-NH3IVMXB.js';
|
|
5
|
+
export { isTextOnlyChildren } from '../../chunk-ZWU6DRRZ.js';
|
|
6
|
+
export { composeClassnameRenderProps } from '../../chunk-65JPI4FL.js';
|
|
7
|
+
export { ClearContainerSlots, ClearProviders } from '../../chunk-HXI3MEEK.js';
|
|
5
8
|
export { SlotProvider } from '../../chunk-M36KANKC.js';
|
|
6
|
-
export { cssModule } from '../../chunk-
|
|
9
|
+
export { cssModule } from '../../chunk-KVDXQMWI.js';
|
|
10
|
+
import '../../chunk-YSQDPG26.js';
|
|
@@ -15,6 +15,6 @@ type SafeExtract<T> = ExtractPossibleSizes<T> extends Size ? ExtractPossibleSize
|
|
|
15
15
|
* lg: "md"
|
|
16
16
|
* };
|
|
17
17
|
*/
|
|
18
|
-
type SizeAdapter<A, B> = Record<SafeExtract<A>, SafeExtract<B
|
|
18
|
+
type SizeAdapter<A, B> = Record<SafeExtract<A>, SafeExtract<B> | undefined>;
|
|
19
19
|
|
|
20
20
|
export type { Size, SizeAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../../chunk-LQICWONC.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
1
|
import { DOMProps as DOMProps$1, AriaLabelingProps } from '@react-types/shared';
|
|
2
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
3
3
|
import { SlotProps } from 'react-aria-components';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -17,15 +17,27 @@ interface DOMProps extends StyleProps, DOMProps$1 {
|
|
|
17
17
|
}
|
|
18
18
|
interface StyleRenderProps<T> {
|
|
19
19
|
/** The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the element. A function may be provided to compute the class based on component state. */
|
|
20
|
-
className?: string | ((values: T
|
|
20
|
+
className?: string | ((values: T & {
|
|
21
|
+
defaultClassName: string | undefined;
|
|
22
|
+
}) => string);
|
|
21
23
|
/** The inline [style](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/style) for the element. A function may be provided to compute the style based on component state. */
|
|
22
|
-
style?: CSSProperties | ((values: T
|
|
24
|
+
style?: CSSProperties | ((values: T & {
|
|
25
|
+
defaultStyle: CSSProperties;
|
|
26
|
+
}) => CSSProperties);
|
|
23
27
|
}
|
|
24
28
|
interface RenderProps<T> extends StyleRenderProps<T> {
|
|
25
29
|
/** The children of the component. A function may be provided to alter the children based on component state. */
|
|
26
|
-
children?: ReactNode | ((values: T
|
|
30
|
+
children?: ReactNode | ((values: T & {
|
|
31
|
+
defaultChildren: ReactNode | undefined;
|
|
32
|
+
}) => ReactNode);
|
|
33
|
+
}
|
|
34
|
+
interface RenderPropsHookOptions<T> extends RenderProps<T>, DOMProps$1, AriaLabelingProps {
|
|
35
|
+
values: T;
|
|
36
|
+
defaultChildren?: ReactNode;
|
|
37
|
+
defaultClassName?: string;
|
|
38
|
+
defaultStyle?: CSSProperties;
|
|
27
39
|
}
|
|
28
40
|
interface BaseComponentProps extends DOMProps, AriaLabelingProps, SlotProps {
|
|
29
41
|
}
|
|
30
42
|
|
|
31
|
-
export type { BaseComponentProps, DOMProps, RenderProps, StyleProps, StyleRenderProps };
|
|
43
|
+
export type { BaseComponentProps, DOMProps, RenderProps, RenderPropsHookOptions, StyleProps, StyleRenderProps };
|