@cimpress-ui/react 0.0.1 → 0.1.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/LICENSE +201 -0
- package/README.md +5 -1
- package/dist/commonjs/components/button/button.d.ts +1 -1
- package/dist/commonjs/components/button/button.js +1 -1
- package/dist/commonjs/components/button/button.js.map +1 -1
- package/dist/commonjs/components/button/icon-button.d.ts +1 -1
- package/dist/commonjs/components/button/icon-button.js +1 -1
- package/dist/commonjs/components/button/icon-button.js.map +1 -1
- package/dist/commonjs/components/button/icon-link-button.d.ts +2 -2
- package/dist/commonjs/components/button/icon-link-button.d.ts.map +1 -1
- package/dist/commonjs/components/button/icon-link-button.js +1 -1
- package/dist/commonjs/components/button/icon-link-button.js.map +1 -1
- package/dist/commonjs/components/button/link-button.d.ts +2 -2
- package/dist/commonjs/components/button/link-button.d.ts.map +1 -1
- package/dist/commonjs/components/button/link-button.js +1 -1
- package/dist/commonjs/components/button/link-button.js.map +1 -1
- package/dist/commonjs/components/button/types.d.ts +1 -1
- package/dist/commonjs/components/button/types.d.ts.map +1 -1
- package/dist/commonjs/components/button/types.js.map +1 -1
- package/dist/commonjs/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/commonjs/components/checkbox/checkbox-group.js +1 -1
- package/dist/commonjs/components/checkbox/checkbox-group.js.map +1 -1
- package/dist/commonjs/components/checkbox/checkbox.d.ts +1 -1
- package/dist/commonjs/components/checkbox/checkbox.js +1 -1
- package/dist/commonjs/components/checkbox/checkbox.js.map +1 -1
- package/dist/commonjs/components/combo-box/combo-box.d.ts +3 -3
- package/dist/commonjs/components/combo-box/combo-box.d.ts.map +1 -1
- package/dist/commonjs/components/combo-box/combo-box.js +2 -2
- package/dist/commonjs/components/combo-box/combo-box.js.map +1 -1
- package/dist/commonjs/components/menu/menu.d.ts +5 -4
- package/dist/commonjs/components/menu/menu.d.ts.map +1 -1
- package/dist/commonjs/components/menu/menu.js +3 -3
- package/dist/commonjs/components/menu/menu.js.map +1 -1
- package/dist/commonjs/components/radio/radio-group.d.ts +1 -1
- package/dist/commonjs/components/radio/radio-group.js +1 -1
- package/dist/commonjs/components/radio/radio-group.js.map +1 -1
- package/dist/commonjs/components/radio/radio.d.ts +1 -1
- package/dist/commonjs/components/radio/radio.js +1 -1
- package/dist/commonjs/components/radio/radio.js.map +1 -1
- package/dist/commonjs/components/select/select.d.ts +4 -4
- package/dist/commonjs/components/select/select.d.ts.map +1 -1
- package/dist/commonjs/components/select/select.js +3 -3
- package/dist/commonjs/components/select/select.js.map +1 -1
- package/dist/commonjs/components/spinner/spinner.d.ts +5 -1
- package/dist/commonjs/components/spinner/spinner.d.ts.map +1 -1
- package/dist/commonjs/components/spinner/spinner.js +5 -2
- package/dist/commonjs/components/spinner/spinner.js.map +1 -1
- package/dist/commonjs/components/text-inputs/text-area.d.ts +1 -1
- package/dist/commonjs/components/text-inputs/text-area.d.ts.map +1 -1
- package/dist/commonjs/components/text-inputs/text-area.js.map +1 -1
- package/dist/commonjs/components/text-inputs/text-field.d.ts +2 -2
- package/dist/commonjs/components/text-inputs/text-field.d.ts.map +1 -1
- package/dist/commonjs/components/text-inputs/text-field.js +1 -1
- package/dist/commonjs/components/text-inputs/text-field.js.map +1 -1
- package/dist/commonjs/components/types.d.ts +16 -4
- package/dist/commonjs/components/types.d.ts.map +1 -1
- package/dist/commonjs/components/types.js.map +1 -1
- package/dist/commonjs/components/typography/link.d.ts +6 -2
- package/dist/commonjs/components/typography/link.d.ts.map +1 -1
- package/dist/commonjs/components/typography/link.js +5 -2
- package/dist/commonjs/components/typography/link.js.map +1 -1
- package/dist/commonjs/components/typography/text.d.ts +5 -1
- package/dist/commonjs/components/typography/text.d.ts.map +1 -1
- package/dist/commonjs/components/typography/text.js +5 -2
- package/dist/commonjs/components/typography/text.js.map +1 -1
- package/dist/commonjs/components/typography/types.d.ts +1 -1
- package/dist/commonjs/components/typography/types.d.ts.map +1 -1
- package/dist/commonjs/components/typography/types.js.map +1 -1
- package/dist/commonjs/icons/accounting-document.d.ts +8 -0
- package/dist/commonjs/icons/accounting-document.d.ts.map +1 -0
- package/dist/commonjs/icons/accounting-document.js +22 -0
- package/dist/commonjs/icons/accounting-document.js.map +1 -0
- package/dist/commonjs/icons/add-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/add-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/add-circle-fill.js +22 -0
- package/dist/commonjs/icons/add-circle-fill.js.map +1 -0
- package/dist/commonjs/icons/add-circle.d.ts +8 -0
- package/dist/commonjs/icons/add-circle.d.ts.map +1 -0
- package/dist/commonjs/icons/add-circle.js +22 -0
- package/dist/commonjs/icons/add-circle.js.map +1 -0
- package/dist/commonjs/icons/add.d.ts +1 -1
- package/dist/commonjs/icons/add.d.ts.map +1 -1
- package/dist/commonjs/icons/add.js +4 -3
- package/dist/commonjs/icons/add.js.map +1 -1
- package/dist/commonjs/icons/alert-triangle.d.ts +1 -1
- package/dist/commonjs/icons/alert-triangle.d.ts.map +1 -1
- package/dist/commonjs/icons/alert-triangle.js +4 -3
- package/dist/commonjs/icons/alert-triangle.js.map +1 -1
- package/dist/commonjs/icons/calculator-alt.d.ts +8 -0
- package/dist/commonjs/icons/calculator-alt.d.ts.map +1 -0
- package/dist/commonjs/icons/calculator-alt.js +22 -0
- package/dist/commonjs/icons/calculator-alt.js.map +1 -0
- package/dist/commonjs/icons/calculator.d.ts +8 -0
- package/dist/commonjs/icons/calculator.d.ts.map +1 -0
- package/dist/commonjs/icons/calculator.js +22 -0
- package/dist/commonjs/icons/calculator.js.map +1 -0
- package/dist/commonjs/icons/checkmark-circle-fill.d.ts +1 -1
- package/dist/commonjs/icons/checkmark-circle-fill.d.ts.map +1 -1
- package/dist/commonjs/icons/checkmark-circle-fill.js +4 -3
- package/dist/commonjs/icons/checkmark-circle-fill.js.map +1 -1
- package/dist/commonjs/icons/checkmark-circle.d.ts +8 -0
- package/dist/commonjs/icons/checkmark-circle.d.ts.map +1 -0
- package/dist/commonjs/icons/checkmark-circle.js +22 -0
- package/dist/commonjs/icons/checkmark-circle.js.map +1 -0
- package/dist/commonjs/icons/checkmark-small.d.ts +1 -1
- package/dist/commonjs/icons/checkmark-small.d.ts.map +1 -1
- package/dist/commonjs/icons/checkmark-small.js +4 -3
- package/dist/commonjs/icons/checkmark-small.js.map +1 -1
- package/dist/commonjs/icons/checkmark.d.ts +1 -1
- package/dist/commonjs/icons/checkmark.d.ts.map +1 -1
- package/dist/commonjs/icons/checkmark.js +4 -3
- package/dist/commonjs/icons/checkmark.js.map +1 -1
- package/dist/commonjs/icons/chevron-down-fill.d.ts +1 -1
- package/dist/commonjs/icons/chevron-down-fill.d.ts.map +1 -1
- package/dist/commonjs/icons/chevron-down-fill.js +4 -3
- package/dist/commonjs/icons/chevron-down-fill.js.map +1 -1
- package/dist/commonjs/icons/error-circle-fill.d.ts +1 -1
- package/dist/commonjs/icons/error-circle-fill.d.ts.map +1 -1
- package/dist/commonjs/icons/error-circle-fill.js +4 -3
- package/dist/commonjs/icons/error-circle-fill.js.map +1 -1
- package/dist/commonjs/icons/index.d.ts +8 -0
- package/dist/commonjs/icons/index.d.ts.map +1 -1
- package/dist/commonjs/icons/index.js +17 -1
- package/dist/commonjs/icons/index.js.map +1 -1
- package/dist/commonjs/icons/info-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/info-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/info-circle-fill.js +22 -0
- package/dist/commonjs/icons/info-circle-fill.js.map +1 -0
- package/dist/commonjs/icons/minus-small.d.ts +1 -1
- package/dist/commonjs/icons/minus-small.d.ts.map +1 -1
- package/dist/commonjs/icons/minus-small.js +4 -3
- package/dist/commonjs/icons/minus-small.js.map +1 -1
- package/dist/commonjs/icons/warning-circle-fill.d.ts +8 -0
- package/dist/commonjs/icons/warning-circle-fill.d.ts.map +1 -0
- package/dist/commonjs/icons/warning-circle-fill.js +22 -0
- package/dist/commonjs/icons/warning-circle-fill.js.map +1 -0
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/with-style-props.d.ts.map +1 -1
- package/dist/esm/components/button/button.d.ts +1 -1
- package/dist/esm/components/button/button.js +1 -1
- package/dist/esm/components/button/button.js.map +1 -1
- package/dist/esm/components/button/icon-button.d.ts +1 -1
- package/dist/esm/components/button/icon-button.js +1 -1
- package/dist/esm/components/button/icon-button.js.map +1 -1
- package/dist/esm/components/button/icon-link-button.d.ts +2 -2
- package/dist/esm/components/button/icon-link-button.d.ts.map +1 -1
- package/dist/esm/components/button/icon-link-button.js +1 -1
- package/dist/esm/components/button/icon-link-button.js.map +1 -1
- package/dist/esm/components/button/link-button.d.ts +2 -2
- package/dist/esm/components/button/link-button.d.ts.map +1 -1
- package/dist/esm/components/button/link-button.js +1 -1
- package/dist/esm/components/button/link-button.js.map +1 -1
- package/dist/esm/components/button/types.d.ts +1 -1
- package/dist/esm/components/button/types.d.ts.map +1 -1
- package/dist/esm/components/button/types.js.map +1 -1
- package/dist/esm/components/checkbox/checkbox-group.d.ts +1 -1
- package/dist/esm/components/checkbox/checkbox-group.js +1 -1
- package/dist/esm/components/checkbox/checkbox-group.js.map +1 -1
- package/dist/esm/components/checkbox/checkbox.d.ts +1 -1
- package/dist/esm/components/checkbox/checkbox.js +1 -1
- package/dist/esm/components/checkbox/checkbox.js.map +1 -1
- package/dist/esm/components/combo-box/combo-box.d.ts +3 -3
- package/dist/esm/components/combo-box/combo-box.d.ts.map +1 -1
- package/dist/esm/components/combo-box/combo-box.js +2 -2
- package/dist/esm/components/combo-box/combo-box.js.map +1 -1
- package/dist/esm/components/menu/menu.d.ts +5 -4
- package/dist/esm/components/menu/menu.d.ts.map +1 -1
- package/dist/esm/components/menu/menu.js +3 -3
- package/dist/esm/components/menu/menu.js.map +1 -1
- package/dist/esm/components/radio/radio-group.d.ts +1 -1
- package/dist/esm/components/radio/radio-group.js +1 -1
- package/dist/esm/components/radio/radio-group.js.map +1 -1
- package/dist/esm/components/radio/radio.d.ts +1 -1
- package/dist/esm/components/radio/radio.js +1 -1
- package/dist/esm/components/radio/radio.js.map +1 -1
- package/dist/esm/components/select/select.d.ts +4 -4
- package/dist/esm/components/select/select.d.ts.map +1 -1
- package/dist/esm/components/select/select.js +3 -3
- package/dist/esm/components/select/select.js.map +1 -1
- package/dist/esm/components/spinner/spinner.d.ts +5 -1
- package/dist/esm/components/spinner/spinner.d.ts.map +1 -1
- package/dist/esm/components/spinner/spinner.js +5 -2
- package/dist/esm/components/spinner/spinner.js.map +1 -1
- package/dist/esm/components/text-inputs/text-area.d.ts +1 -1
- package/dist/esm/components/text-inputs/text-area.d.ts.map +1 -1
- package/dist/esm/components/text-inputs/text-area.js.map +1 -1
- package/dist/esm/components/text-inputs/text-field.d.ts +2 -2
- package/dist/esm/components/text-inputs/text-field.d.ts.map +1 -1
- package/dist/esm/components/text-inputs/text-field.js +1 -1
- package/dist/esm/components/text-inputs/text-field.js.map +1 -1
- package/dist/esm/components/types.d.ts +16 -4
- package/dist/esm/components/types.d.ts.map +1 -1
- package/dist/esm/components/types.js.map +1 -1
- package/dist/esm/components/typography/link.d.ts +6 -2
- package/dist/esm/components/typography/link.d.ts.map +1 -1
- package/dist/esm/components/typography/link.js +5 -2
- package/dist/esm/components/typography/link.js.map +1 -1
- package/dist/esm/components/typography/text.d.ts +5 -1
- package/dist/esm/components/typography/text.d.ts.map +1 -1
- package/dist/esm/components/typography/text.js +5 -2
- package/dist/esm/components/typography/text.js.map +1 -1
- package/dist/esm/components/typography/types.d.ts +1 -1
- package/dist/esm/components/typography/types.d.ts.map +1 -1
- package/dist/esm/components/typography/types.js.map +1 -1
- package/dist/esm/icons/accounting-document.d.ts +8 -0
- package/dist/esm/icons/accounting-document.d.ts.map +1 -0
- package/dist/esm/icons/accounting-document.js +17 -0
- package/dist/esm/icons/accounting-document.js.map +1 -0
- package/dist/esm/icons/add-circle-fill.d.ts +8 -0
- package/dist/esm/icons/add-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/add-circle-fill.js +17 -0
- package/dist/esm/icons/add-circle-fill.js.map +1 -0
- package/dist/esm/icons/add-circle.d.ts +8 -0
- package/dist/esm/icons/add-circle.d.ts.map +1 -0
- package/dist/esm/icons/add-circle.js +17 -0
- package/dist/esm/icons/add-circle.js.map +1 -0
- package/dist/esm/icons/add.d.ts +1 -1
- package/dist/esm/icons/add.d.ts.map +1 -1
- package/dist/esm/icons/add.js +4 -3
- package/dist/esm/icons/add.js.map +1 -1
- package/dist/esm/icons/alert-triangle.d.ts +1 -1
- package/dist/esm/icons/alert-triangle.d.ts.map +1 -1
- package/dist/esm/icons/alert-triangle.js +4 -3
- package/dist/esm/icons/alert-triangle.js.map +1 -1
- package/dist/esm/icons/calculator-alt.d.ts +8 -0
- package/dist/esm/icons/calculator-alt.d.ts.map +1 -0
- package/dist/esm/icons/calculator-alt.js +17 -0
- package/dist/esm/icons/calculator-alt.js.map +1 -0
- package/dist/esm/icons/calculator.d.ts +8 -0
- package/dist/esm/icons/calculator.d.ts.map +1 -0
- package/dist/esm/icons/calculator.js +17 -0
- package/dist/esm/icons/calculator.js.map +1 -0
- package/dist/esm/icons/checkmark-circle-fill.d.ts +1 -1
- package/dist/esm/icons/checkmark-circle-fill.d.ts.map +1 -1
- package/dist/esm/icons/checkmark-circle-fill.js +4 -3
- package/dist/esm/icons/checkmark-circle-fill.js.map +1 -1
- package/dist/esm/icons/checkmark-circle.d.ts +8 -0
- package/dist/esm/icons/checkmark-circle.d.ts.map +1 -0
- package/dist/esm/icons/checkmark-circle.js +17 -0
- package/dist/esm/icons/checkmark-circle.js.map +1 -0
- package/dist/esm/icons/checkmark-small.d.ts +1 -1
- package/dist/esm/icons/checkmark-small.d.ts.map +1 -1
- package/dist/esm/icons/checkmark-small.js +4 -3
- package/dist/esm/icons/checkmark-small.js.map +1 -1
- package/dist/esm/icons/checkmark.d.ts +1 -1
- package/dist/esm/icons/checkmark.d.ts.map +1 -1
- package/dist/esm/icons/checkmark.js +4 -3
- package/dist/esm/icons/checkmark.js.map +1 -1
- package/dist/esm/icons/chevron-down-fill.d.ts +1 -1
- package/dist/esm/icons/chevron-down-fill.d.ts.map +1 -1
- package/dist/esm/icons/chevron-down-fill.js +4 -3
- package/dist/esm/icons/chevron-down-fill.js.map +1 -1
- package/dist/esm/icons/error-circle-fill.d.ts +1 -1
- package/dist/esm/icons/error-circle-fill.d.ts.map +1 -1
- package/dist/esm/icons/error-circle-fill.js +4 -3
- package/dist/esm/icons/error-circle-fill.js.map +1 -1
- package/dist/esm/icons/index.d.ts +8 -0
- package/dist/esm/icons/index.d.ts.map +1 -1
- package/dist/esm/icons/index.js +8 -0
- package/dist/esm/icons/index.js.map +1 -1
- package/dist/esm/icons/info-circle-fill.d.ts +8 -0
- package/dist/esm/icons/info-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/info-circle-fill.js +17 -0
- package/dist/esm/icons/info-circle-fill.js.map +1 -0
- package/dist/esm/icons/minus-small.d.ts +1 -1
- package/dist/esm/icons/minus-small.d.ts.map +1 -1
- package/dist/esm/icons/minus-small.js +4 -3
- package/dist/esm/icons/minus-small.js.map +1 -1
- package/dist/esm/icons/warning-circle-fill.d.ts +8 -0
- package/dist/esm/icons/warning-circle-fill.d.ts.map +1 -0
- package/dist/esm/icons/warning-circle-fill.js +17 -0
- package/dist/esm/icons/warning-circle-fill.js.map +1 -0
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/with-style-props.d.ts.map +1 -1
- package/dist-styles/styles.css +1 -1
- package/package.json +25 -25
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ export interface ButtonProps extends BaseButtonProps, TextButtonProps, ActionBut
|
|
|
4
4
|
/**
|
|
5
5
|
* Displays a labelled button that allows users to perform an action.
|
|
6
6
|
*
|
|
7
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
7
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
8
8
|
*/
|
|
9
9
|
declare const _Button: (props: ButtonProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
10
10
|
export { _Button as Button };
|
|
@@ -24,7 +24,7 @@ function Button({ children, variant = 'secondary', tone = 'base', size = 'medium
|
|
|
24
24
|
/**
|
|
25
25
|
* Displays a labelled button that allows users to perform an action.
|
|
26
26
|
*
|
|
27
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
27
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
28
28
|
*/
|
|
29
29
|
const _Button = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Button), 'Button');
|
|
30
30
|
exports.Button = _Button;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAA4D;AAC5D,yDAAkD;AAClD,mEAA2D;AAC3D,+DAAiE;AACjE,iDAA+C;AAK/C,SAAS,MAAM,CACb,EACE,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACI,EACd,GAAoC;IAEpC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,SAAS,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9B,OAAO,CACL,uBAAC,8BAAS,OACJ,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,EAC/C,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,YAEnB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClB,6DACG,SAAS,EACV,2CAAO,QAAQ,GAAQ,EACtB,OAAO,EACP,SAAS,IAAI,uBAAC,4BAAe,IAAC,IAAI,EAAE,4BAAa,CAAC,IAAI,CAAC,gBAAc,YAAY,GAAI,IACrF,CACJ,GACS,CACb,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzC,yBAAM","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { InternalSpinner } from '../internal/spinner/spinner.js';\nimport { SPINNER_SIZES } from './constants.js';\nimport type { ActionButtonProps, BaseButtonProps, TextButtonProps } from './types.js';\n\nexport interface ButtonProps extends BaseButtonProps, TextButtonProps, ActionButtonProps {}\n\nfunction Button(\n {\n children,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n iconStart,\n iconEnd,\n isLoading = false,\n loadingLabel,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n useEffect(() => {\n if (isLoading && !loadingLabel) {\n console.warn('Button requires loadingLabel when isLoading is true for accessibility');\n }\n }, [isLoading, loadingLabel]);\n\n return (\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n isPending={isLoading}\n >\n {({ isPending }) => (\n <>\n {iconStart}\n <span>{children}</span>\n {iconEnd}\n {isPending && <InternalSpinner size={SPINNER_SIZES[size]} aria-label={loadingLabel} />}\n </>\n )}\n </RACButton>\n );\n}\n\n/**\n * Displays a labelled button that allows users to perform an action.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAA4D;AAC5D,yDAAkD;AAClD,mEAA2D;AAC3D,+DAAiE;AACjE,iDAA+C;AAK/C,SAAS,MAAM,CACb,EACE,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,OAAO,EACP,SAAS,GAAG,KAAK,EACjB,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACI,EACd,GAAoC;IAEpC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,SAAS,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,uEAAuE,CAAC,CAAC;QACxF,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9B,OAAO,CACL,uBAAC,8BAAS,OACJ,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,EAC/C,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,YAEnB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClB,6DACG,SAAS,EACV,2CAAO,QAAQ,GAAQ,EACtB,OAAO,EACP,SAAS,IAAI,uBAAC,4BAAe,IAAC,IAAI,EAAE,4BAAa,CAAC,IAAI,CAAC,gBAAc,YAAY,GAAI,IACrF,CACJ,GACS,CACb,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;AAEzC,yBAAM","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { InternalSpinner } from '../internal/spinner/spinner.js';\nimport { SPINNER_SIZES } from './constants.js';\nimport type { ActionButtonProps, BaseButtonProps, TextButtonProps } from './types.js';\n\nexport interface ButtonProps extends BaseButtonProps, TextButtonProps, ActionButtonProps {}\n\nfunction Button(\n {\n children,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n iconStart,\n iconEnd,\n isLoading = false,\n loadingLabel,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: ButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n useEffect(() => {\n if (isLoading && !loadingLabel) {\n console.warn('Button requires loadingLabel when isLoading is true for accessibility');\n }\n }, [isLoading, loadingLabel]);\n\n return (\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n isPending={isLoading}\n >\n {({ isPending }) => (\n <>\n {iconStart}\n <span>{children}</span>\n {iconEnd}\n {isPending && <InternalSpinner size={SPINNER_SIZES[size]} aria-label={loadingLabel} />}\n </>\n )}\n </RACButton>\n );\n}\n\n/**\n * Displays a labelled button that allows users to perform an action.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/).\n */\nconst _Button = withStyleProps(forwardRef(Button), 'Button');\n\nexport { _Button as Button };\n"]}
|
|
@@ -4,7 +4,7 @@ export interface IconButtonProps extends BaseButtonProps, SingleIconButtonProps,
|
|
|
4
4
|
/**
|
|
5
5
|
* Displays an icon-only button that allows users to perform an action.
|
|
6
6
|
*
|
|
7
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
7
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
8
8
|
*/
|
|
9
9
|
declare const _IconButton: (props: IconButtonProps & import("react").RefAttributes<HTMLButtonElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
10
10
|
export { _IconButton as IconButton };
|
|
@@ -24,7 +24,7 @@ function IconButton({ icon, variant = 'secondary', tone = 'base', size = 'medium
|
|
|
24
24
|
/**
|
|
25
25
|
* Displays an icon-only button that allows users to perform an action.
|
|
26
26
|
*
|
|
27
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
27
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
28
28
|
*/
|
|
29
29
|
const _IconButton = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(IconButton), 'IconButton');
|
|
30
30
|
exports.IconButton = _IconButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sourceRoot":"","sources":["../../../../src/components/button/icon-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAA4D;AAC5D,yDAAkD;AAClD,mEAA2D;AAC3D,+DAAiE;AACjE,iDAA+C;AAK/C,SAAS,UAAU,CACjB,EACE,IAAI,EACJ,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,GAAG,KAAK,EACjB,YAAY,EACZ,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAoC;IAEpC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,SAAS,IAAI,CAAC,YAAY,EAAE,CAAC;YAC/B,OAAO,CAAC,IAAI,CAAC,2EAA2E,CAAC,CAAC;QAC5F,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9B,OAAO,CACL,uBAAC,8BAAS,OACJ,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,EACpD,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,YAEnB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAClB,6DACG,IAAI,EACJ,SAAS,IAAI,uBAAC,4BAAe,IAAC,IAAI,EAAE,4BAAa,CAAC,IAAI,CAAC,gBAAc,YAAY,GAAI,IACrF,CACJ,GACS,CACb,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEjD,iCAAU","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { InternalSpinner } from '../internal/spinner/spinner.js';\nimport { SPINNER_SIZES } from './constants.js';\nimport type { ActionButtonProps, BaseButtonProps, SingleIconButtonProps } from './types.js';\n\nexport interface IconButtonProps extends BaseButtonProps, SingleIconButtonProps, ActionButtonProps {}\n\nfunction IconButton(\n {\n icon,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n isLoading = false,\n loadingLabel,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: IconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n useEffect(() => {\n if (isLoading && !loadingLabel) {\n console.warn('IconButton requires loadingLabel when isLoading is true for accessibility');\n }\n }, [isLoading, loadingLabel]);\n\n return (\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-icon-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n isPending={isLoading}\n >\n {({ isPending }) => (\n <>\n {icon}\n {isPending && <InternalSpinner size={SPINNER_SIZES[size]} aria-label={loadingLabel} />}\n </>\n )}\n </RACButton>\n );\n}\n\n/**\n * Displays an icon-only button that allows users to perform an action.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
1
|
+
{"version":3,"file":"icon-button.js","sourceRoot":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E,YAAY,CAAC,CAAC;AAEjD,iCAAU","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Button as RACButton } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { InternalSpinner } from '../internal/spinner/spinner.js';\nimport { SPINNER_SIZES } from './constants.js';\nimport type { ActionButtonProps, BaseButtonProps, SingleIconButtonProps } from './types.js';\n\nexport interface IconButtonProps extends BaseButtonProps, SingleIconButtonProps, ActionButtonProps {}\n\nfunction IconButton(\n {\n icon,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n isLoading = false,\n loadingLabel,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: IconButtonProps,\n ref: ForwardedRef<HTMLButtonElement>,\n) {\n useEffect(() => {\n if (isLoading && !loadingLabel) {\n console.warn('IconButton requires loadingLabel when isLoading is true for accessibility');\n }\n }, [isLoading, loadingLabel]);\n\n return (\n <RACButton\n {...props}\n ref={ref}\n className={clsx('cim-icon-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n isPending={isLoading}\n >\n {({ isPending }) => (\n <>\n {icon}\n {isPending && <InternalSpinner size={SPINNER_SIZES[size]} aria-label={loadingLabel} />}\n </>\n )}\n </RACButton>\n );\n}\n\n/**\n * Displays an icon-only button that allows users to perform an action.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/).\n */\nconst _IconButton = withStyleProps(forwardRef(IconButton), 'IconButton');\n\nexport { _IconButton as IconButton };\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type LinkProps as RACLinkProps } from 'react-aria-components';
|
|
2
2
|
import type { NavigationProps, WithRequired } from '../types.js';
|
|
3
3
|
import type { BaseButtonProps, SingleIconButtonProps } from './types.js';
|
|
4
|
-
export interface IconLinkButtonProps extends Omit<BaseButtonProps, 'id'>, SingleIconButtonProps, WithRequired<NavigationProps, 'href'>, Pick<RACLinkProps, 'isDisabled'> {
|
|
4
|
+
export interface IconLinkButtonProps extends Omit<BaseButtonProps, 'id'>, SingleIconButtonProps, WithRequired<NavigationProps, 'href'>, Pick<RACLinkProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Displays an icon-only button that allows users to navigate to another page or resource.
|
|
8
8
|
*
|
|
9
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
9
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
10
10
|
*/
|
|
11
11
|
declare const _IconLinkButton: (props: IconLinkButtonProps & import("react").RefAttributes<HTMLAnchorElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
12
12
|
export { _IconLinkButton as IconLinkButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-link-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/icon-link-button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EACjC,qBAAqB,EACrB,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"icon-link-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/icon-link-button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAEzE,MAAM,WAAW,mBACf,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EACjC,qBAAqB,EACrB,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;CAAG;AAiCvE;;;;GAIG;AACH,QAAA,MAAM,eAAe,wKAA+D,CAAC;AAErF,OAAO,EAAE,eAAe,IAAI,cAAc,EAAE,CAAC"}
|
|
@@ -16,7 +16,7 @@ function IconLinkButton({ icon, variant = 'secondary', tone = 'base', size = 'me
|
|
|
16
16
|
/**
|
|
17
17
|
* Displays an icon-only button that allows users to navigate to another page or resource.
|
|
18
18
|
*
|
|
19
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
19
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
20
20
|
*/
|
|
21
21
|
const _IconLinkButton = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(IconLinkButton), 'IconLinkButton');
|
|
22
22
|
exports.IconLinkButton = _IconLinkButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-link-button.js","sourceRoot":"","sources":["../../../../src/components/button/icon-link-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAwF;AACxF,yDAAkD;AAClD,mEAA2D;AAU3D,SAAS,cAAc,CACrB,EACE,IAAI,EACJ,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACY,EACtB,GAAoC;IAEpC,OAAO,CACL,uBAAC,4BAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,EACpD,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,YAErB,IAAI,GACG,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,eAAe,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAEzD,yCAAc","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseButtonProps, SingleIconButtonProps } from './types.js';\n\nexport interface IconLinkButtonProps\n extends Omit<BaseButtonProps, 'id'>,\n SingleIconButtonProps,\n WithRequired<NavigationProps, 'href'>,\n Pick<RACLinkProps, 'isDisabled'> {}\n\nfunction IconLinkButton(\n {\n icon,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: IconLinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-icon-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n >\n {icon}\n </RACLink>\n );\n}\n\n/**\n * Displays an icon-only button that allows users to navigate to another page or resource.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
1
|
+
{"version":3,"file":"icon-link-button.js","sourceRoot":"","sources":["../../../../src/components/button/icon-link-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAwF;AACxF,yDAAkD;AAClD,mEAA2D;AAU3D,SAAS,cAAc,CACrB,EACE,IAAI,EACJ,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACY,EACtB,GAAoC;IAEpC,OAAO,CACL,uBAAC,4BAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,iBAAiB,EAAE,gBAAgB,CAAC,EACpD,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,YAErB,IAAI,GACG,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,eAAe,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,cAAc,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAEzD,yCAAc","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseButtonProps, SingleIconButtonProps } from './types.js';\n\nexport interface IconLinkButtonProps\n extends Omit<BaseButtonProps, 'id'>,\n SingleIconButtonProps,\n WithRequired<NavigationProps, 'href'>,\n Pick<RACLinkProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {}\n\nfunction IconLinkButton(\n {\n icon,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: IconLinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-icon-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n >\n {icon}\n </RACLink>\n );\n}\n\n/**\n * Displays an icon-only button that allows users to navigate to another page or resource.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/).\n */\nconst _IconLinkButton = withStyleProps(forwardRef(IconLinkButton), 'IconLinkButton');\n\nexport { _IconLinkButton as IconLinkButton };\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type LinkProps as RACLinkProps } from 'react-aria-components';
|
|
2
2
|
import type { NavigationProps, WithRequired } from '../types.js';
|
|
3
3
|
import type { BaseButtonProps, TextButtonProps } from './types.js';
|
|
4
|
-
export interface LinkButtonProps extends Omit<BaseButtonProps, 'id'>, TextButtonProps, WithRequired<NavigationProps, 'href'>, Pick<RACLinkProps, 'isDisabled'> {
|
|
4
|
+
export interface LinkButtonProps extends Omit<BaseButtonProps, 'id'>, TextButtonProps, WithRequired<NavigationProps, 'href'>, Pick<RACLinkProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* Displays a labelled button that allows users to navigate to another page or resource.
|
|
8
8
|
*
|
|
9
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
9
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
10
10
|
*/
|
|
11
11
|
declare const _LinkButton: (props: LinkButtonProps & import("react").RefAttributes<HTMLAnchorElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
12
12
|
export { _LinkButton as LinkButton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/link-button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EACjC,eAAe,EACf,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC;CAAG;
|
|
1
|
+
{"version":3,"file":"link-button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/link-button.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAmB,KAAK,SAAS,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEnE,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,EACjC,eAAe,EACf,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,EACrC,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,YAAY,CAAC;CAAG;AAqCvE;;;;GAIG;AACH,QAAA,MAAM,WAAW,oKAAuD,CAAC;AAEzE,OAAO,EAAE,WAAW,IAAI,UAAU,EAAE,CAAC"}
|
|
@@ -16,7 +16,7 @@ function LinkButton({ children, variant = 'secondary', tone = 'base', size = 'me
|
|
|
16
16
|
/**
|
|
17
17
|
* Displays a labelled button that allows users to navigate to another page or resource.
|
|
18
18
|
*
|
|
19
|
-
* See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
19
|
+
* See [button usage guidelines](https://ui.cimpress.io/components/button/).
|
|
20
20
|
*/
|
|
21
21
|
const _LinkButton = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(LinkButton), 'LinkButton');
|
|
22
22
|
exports.LinkButton = _LinkButton;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link-button.js","sourceRoot":"","sources":["../../../../src/components/button/link-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAwF;AACxF,yDAAkD;AAClD,mEAA2D;AAU3D,SAAS,UAAU,CACjB,EACE,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAoC;IAEpC,OAAO,CACL,wBAAC,4BAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,EAC/C,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,aAErB,SAAS,EACV,2CAAO,QAAQ,GAAQ,EACtB,OAAO,IACA,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEjD,iCAAU","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseButtonProps, TextButtonProps } from './types.js';\n\nexport interface LinkButtonProps\n extends Omit<BaseButtonProps, 'id'>,\n TextButtonProps,\n WithRequired<NavigationProps, 'href'>,\n Pick<RACLinkProps, 'isDisabled'> {}\n\nfunction LinkButton(\n {\n children,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n iconStart,\n iconEnd,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: LinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n >\n {iconStart}\n <span>{children}</span>\n {iconEnd}\n </RACLink>\n );\n}\n\n/**\n * Displays a labelled button that allows users to navigate to another page or resource.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/
|
|
1
|
+
{"version":3,"file":"link-button.js","sourceRoot":"","sources":["../../../../src/components/button/link-button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAExB,iEAAwF;AACxF,yDAAkD;AAClD,mEAA2D;AAU3D,SAAS,UAAU,CACjB,EACE,QAAQ,EACR,OAAO,GAAG,WAAW,EACrB,IAAI,GAAG,MAAM,EACb,IAAI,GAAG,QAAQ,EACf,SAAS,EACT,OAAO,EACP,UAAU,GAAG,KAAK,EAClB,SAAS,GAAG,KAAK,EACjB,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACQ,EAClB,GAAoC;IAEpC,OAAO,CACL,wBAAC,4BAAO,OACF,KAAK,EACT,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,IAAA,cAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,EAC/C,KAAK,EAAE,YAAY,kBACL,OAAO,eACV,IAAI,eACJ,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC7C,UAAU,EAAE,UAAU,aAErB,SAAS,EACV,2CAAO,QAAQ,GAAQ,EACtB,OAAO,IACA,CACX,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,WAAW,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AAEjD,iCAAU","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\nimport { Link as RACLink, type LinkProps as RACLinkProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { NavigationProps, WithRequired } from '../types.js';\nimport type { BaseButtonProps, TextButtonProps } from './types.js';\n\nexport interface LinkButtonProps\n extends Omit<BaseButtonProps, 'id'>,\n TextButtonProps,\n WithRequired<NavigationProps, 'href'>,\n Pick<RACLinkProps, 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {}\n\nfunction LinkButton(\n {\n children,\n variant = 'secondary',\n tone = 'base',\n size = 'medium',\n iconStart,\n iconEnd,\n isDisabled = false,\n fullWidth = false,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: LinkButtonProps,\n ref: ForwardedRef<HTMLAnchorElement>,\n) {\n return (\n <RACLink\n {...props}\n ref={ref}\n className={clsx('cim-button', UNSAFE_className)}\n style={UNSAFE_style}\n data-variant={variant}\n data-tone={tone}\n data-size={size}\n data-full-width={fullWidth ? true : undefined}\n isDisabled={isDisabled}\n >\n {iconStart}\n <span>{children}</span>\n {iconEnd}\n </RACLink>\n );\n}\n\n/**\n * Displays a labelled button that allows users to navigate to another page or resource.\n *\n * See [button usage guidelines](https://ui.cimpress.io/components/button/).\n */\nconst _LinkButton = withStyleProps(forwardRef(LinkButton), 'LinkButton');\n\nexport { _LinkButton as LinkButton };\n"]}
|
|
@@ -50,7 +50,7 @@ export interface SingleIconButtonProps extends Omit<LabellableProps, 'label' | '
|
|
|
50
50
|
/**
|
|
51
51
|
* Props available on buttons that perform an action (non-navigational).
|
|
52
52
|
*/
|
|
53
|
-
export interface ActionButtonProps extends Pick<RACButtonProps, 'form' | 'name' | 'value' | 'onPress' | 'type' | 'isDisabled'> {
|
|
53
|
+
export interface ActionButtonProps extends Pick<RACButtonProps, 'form' | 'name' | 'value' | 'onPress' | 'type' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
|
|
54
54
|
/**
|
|
55
55
|
* Whether the button is in a loading state.
|
|
56
56
|
* This disables the button and replaces its contents with a spinner.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,IAAI,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,WAAW;IAClD;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAC/C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC;IACrE,wCAAwC;IACxC,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,gDAAgD;IAChD,SAA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,OAAO,GAAG,YAAY,CAAC;IAC1F,wCAAwC;IACxC,IAAI,EAAE,SAAS,CAAC;IAChB,mFAAmF;IACnF,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,iBACf,SAAQ,IAAI,CACV,cAAc,EACd,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,YAAY,GAAG,cAAc,GAAG,YAAY,CAC9F;IACD;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/button/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ButtonProps as RACButtonProps } from 'react-aria-components';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\n\n/**\n * Props available on all buttons.\n */\nexport interface BaseButtonProps extends CommonProps {\n /**\n * Determines the visual appearance of the button.\n * @default 'secondary'\n */\n variant?: 'primary' | 'secondary' | 'tertiary';\n /**\n * Determines the color tone of the button.\n * @default 'base'\n */\n tone?: 'base' | 'critical';\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Whether the button should take up the whole available width.\n *\n * @default false\n */\n fullWidth?: boolean;\n}\n\n/**\n * Props available on buttons containing text.\n */\nexport interface TextButtonProps extends Omit<LabellableProps, 'label'> {\n /** The text displayed on the button. */\n children: StringLikeChildren;\n /** An icon displayed before the button text. */\n iconStart?: ReactNode;\n /** An icon displayed after the button text. */\n iconEnd?: ReactNode;\n}\n\n/**\n * Props available on buttons containing a single icon.\n */\nexport interface SingleIconButtonProps extends Omit<LabellableProps, 'label' | 'aria-label'> {\n /** The icon displayed on the button. */\n icon: ReactNode;\n /** The label describing the function of this button for assistive technologies. */\n 'aria-label': string;\n}\n\n/**\n * Props available on buttons that perform an action (non-navigational).\n */\nexport interface ActionButtonProps\n extends Pick
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/button/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\nimport type { ButtonProps as RACButtonProps } from 'react-aria-components';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\n\n/**\n * Props available on all buttons.\n */\nexport interface BaseButtonProps extends CommonProps {\n /**\n * Determines the visual appearance of the button.\n * @default 'secondary'\n */\n variant?: 'primary' | 'secondary' | 'tertiary';\n /**\n * Determines the color tone of the button.\n * @default 'base'\n */\n tone?: 'base' | 'critical';\n /**\n * The size of the button.\n * @default 'medium'\n */\n size?: 'small' | 'medium' | 'large';\n /**\n * Whether the button should take up the whole available width.\n *\n * @default false\n */\n fullWidth?: boolean;\n}\n\n/**\n * Props available on buttons containing text.\n */\nexport interface TextButtonProps extends Omit<LabellableProps, 'label'> {\n /** The text displayed on the button. */\n children: StringLikeChildren;\n /** An icon displayed before the button text. */\n iconStart?: ReactNode;\n /** An icon displayed after the button text. */\n iconEnd?: ReactNode;\n}\n\n/**\n * Props available on buttons containing a single icon.\n */\nexport interface SingleIconButtonProps extends Omit<LabellableProps, 'label' | 'aria-label'> {\n /** The icon displayed on the button. */\n icon: ReactNode;\n /** The label describing the function of this button for assistive technologies. */\n 'aria-label': string;\n}\n\n/**\n * Props available on buttons that perform an action (non-navigational).\n */\nexport interface ActionButtonProps\n extends Pick<\n RACButtonProps,\n 'form' | 'name' | 'value' | 'onPress' | 'type' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'\n > {\n /**\n * Whether the button is in a loading state.\n * This disables the button and replaces its contents with a spinner.\n *\n * @default false\n */\n isLoading?: boolean;\n /**\n * A string that identifies the loading state to assistive technologies.\n * It will be announced by screen readers together with the button label.\n * You must provide this prop if `isLoading` is `true`.\n */\n loadingLabel?: string;\n}\n"]}
|
|
@@ -14,7 +14,7 @@ export interface CheckboxGroupProps extends CommonProps, WithRequired<FieldProps
|
|
|
14
14
|
/**
|
|
15
15
|
* Allows users to select one or more items from a visible list.
|
|
16
16
|
*
|
|
17
|
-
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/
|
|
17
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
18
18
|
*/
|
|
19
19
|
declare const _CheckboxGroup: (props: CheckboxGroupProps & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
20
20
|
export { _CheckboxGroup as CheckboxGroup };
|
|
@@ -18,7 +18,7 @@ function CheckboxGroup({ label, description, error: errorMessage, direction = 'v
|
|
|
18
18
|
/**
|
|
19
19
|
* Allows users to select one or more items from a visible list.
|
|
20
20
|
*
|
|
21
|
-
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/
|
|
21
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
22
22
|
*/
|
|
23
23
|
const _CheckboxGroup = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(CheckboxGroup), 'CheckboxGroup');
|
|
24
24
|
exports.CheckboxGroup = _CheckboxGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AAGxB,iEAG+B;AAC/B,yDAAkD;AAClD,mEAA2D;AAC3D,wEAA4G;AAC5G,wDAAkD;AAoBlD,SAAS,aAAa,CACpB,EACE,KAAK,EACL,WAAW,EACX,KAAK,EAAE,YAAY,EACnB,SAAS,GAAG,UAAU,EACtB,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,GAAG,KAAK,EACW,EACrB,GAAiC;IAEjC,OAAO,CACL,wBAAC,qCAAgB,OACX,KAAK,EACT,GAAG,EAAE,GAAG,EAC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port type { ForwardedRef } from 'react';\nimport {\n CheckboxGroup as RACCheckboxGroup,\n type CheckboxGroupProps as RACCheckboxGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { Stack } from '../spacing/stack/stack.js';\nimport type { Breakpoint, Responsive, Spacing } from '../spacing/types.js';\nimport type { Direction, CommonProps, FieldProps, WithRequired } from '../types.js';\n\nexport interface CheckboxGroupProps\n extends CommonProps,\n WithRequired<FieldProps<string[]>, 'label'>,\n Pick<\n RACCheckboxGroupProps,\n 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'\n > {\n /** Checkboxes belonging to the group. Each checkbox must have a `value` prop defined. */\n children: ReactNode;\n /**\n * Determines the direction in which checkboxes will be stacked.\n * @default 'vertical'\n */\n direction?: Responsive<Direction>;\n}\n\nfunction CheckboxGroup(\n {\n label,\n description,\n error: errorMessage,\n direction = 'vertical',\n children,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: CheckboxGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACCheckboxGroup\n {...props}\n ref={ref}\n className={clsx('cim-checkbox-group', UNSAFE_className)}\n style={UNSAFE_style}\n >\n <FormFieldLabel isRequired={props.isRequired}>{label}</FormFieldLabel>\n <Stack gap={getGapFromDirection(direction)} direction={direction}>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACCheckboxGroup>\n );\n}\n\n/**\n * Allows users to select one or more items from a visible list.\n *\n * See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/
|
|
1
|
+
{"version":3,"file":"checkbox-group.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AA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AC,CAAC,CAAC,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;YACjD,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,GAAG,CAAC,CAAC;QAER,OAAO,GAAG,CAAC;IACb,CAAC;IAED,OAAO,SAAS,KAAK,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport type { ReactNode } from 'react';\nimport type { ForwardedRef } from 'react';\nimport {\n CheckboxGroup as RACCheckboxGroup,\n type CheckboxGroupProps as RACCheckboxGroupProps,\n} from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport { FormFieldDescription, FormFieldError, FormFieldLabel } from '../internal/form-field/form-field.js';\nimport { Stack } from '../spacing/stack/stack.js';\nimport type { Breakpoint, Responsive, Spacing } from '../spacing/types.js';\nimport type { Direction, CommonProps, FieldProps, WithRequired } from '../types.js';\n\nexport interface CheckboxGroupProps\n extends CommonProps,\n WithRequired<FieldProps<string[]>, 'label'>,\n Pick<\n RACCheckboxGroupProps,\n 'isDisabled' | 'isReadOnly' | 'isRequired' | 'isInvalid' | 'value' | 'onChange' | 'defaultValue' | 'name'\n > {\n /** Checkboxes belonging to the group. Each checkbox must have a `value` prop defined. */\n children: ReactNode;\n /**\n * Determines the direction in which checkboxes will be stacked.\n * @default 'vertical'\n */\n direction?: Responsive<Direction>;\n}\n\nfunction CheckboxGroup(\n {\n label,\n description,\n error: errorMessage,\n direction = 'vertical',\n children,\n UNSAFE_className,\n UNSAFE_style,\n ...props\n }: CheckboxGroupProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n return (\n <RACCheckboxGroup\n {...props}\n ref={ref}\n className={clsx('cim-checkbox-group', UNSAFE_className)}\n style={UNSAFE_style}\n >\n <FormFieldLabel isRequired={props.isRequired}>{label}</FormFieldLabel>\n <Stack gap={getGapFromDirection(direction)} direction={direction}>\n {children}\n </Stack>\n <FormFieldError>{errorMessage}</FormFieldError>\n <FormFieldDescription>{description}</FormFieldDescription>\n </RACCheckboxGroup>\n );\n}\n\n/**\n * Allows users to select one or more items from a visible list.\n *\n * See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).\n */\nconst _CheckboxGroup = withStyleProps(forwardRef(CheckboxGroup), 'CheckboxGroup');\n\nexport { _CheckboxGroup as CheckboxGroup };\n\n// Make sure that checkboxes are spaced by 16px when stacked horizontally, and 8px otherwise.\nfunction getGapFromDirection(direction: Responsive<Direction>): Responsive<Spacing> {\n if (typeof direction === 'object') {\n const gap: Responsive<Spacing> = { xs: direction.xs === 'horizontal' ? 16 : 8 };\n\n (Object.entries(direction) as [Breakpoint, Direction][]).reduce((acc, curr) => {\n gap[curr[0]] = curr[1] === 'horizontal' ? 16 : 8;\n return acc;\n }, gap);\n\n return gap;\n }\n\n return direction === 'horizontal' ? 16 : 8;\n}\n"]}
|
|
@@ -7,7 +7,7 @@ export interface CheckboxProps extends CommonProps, Omit<LabellableProps, 'label
|
|
|
7
7
|
/**
|
|
8
8
|
* Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.
|
|
9
9
|
*
|
|
10
|
-
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/
|
|
10
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
11
11
|
*/
|
|
12
12
|
declare const _Checkbox: (props: CheckboxProps & import("react").RefAttributes<HTMLLabelElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
13
13
|
export { _Checkbox as Checkbox };
|
|
@@ -25,7 +25,7 @@ function Checkbox({ children, UNSAFE_className, UNSAFE_style, ...props }, ref) {
|
|
|
25
25
|
/**
|
|
26
26
|
* Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.
|
|
27
27
|
*
|
|
28
|
-
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/
|
|
28
|
+
* See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).
|
|
29
29
|
*/
|
|
30
30
|
const _Checkbox = (0, with_style_props_js_1.withStyleProps)((0, forward_ref_js_1.forwardRef)(Checkbox), 'Checkbox');
|
|
31
31
|
exports.Checkbox = _Checkbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAAwG;AACxG,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAE3D,mDAA6C;AAsB7C,SAAS,QAAQ,CACf,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAiB,EACrE,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;QACrG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,uBAAC,gCAAW,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,YACrG,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CACxB,6DACE,gCAAK,SAAS,EAAC,6BAA6B,YAC1C,gCAAK,SAAS,EAAC,qBAAqB,YAAE,eAAe,CAAC,CAAC,CAAC,uBAAC,yBAAc,KAAG,CAAC,CAAC,CAAC,uBAAC,6BAAkB,KAAG,GAAO,GACtG,EACL,QAAQ,IAAI,CACX,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,YAC3B,QAAQ,GACJ,CACR,IACA,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Checkbox as RACCheckbox, type CheckboxProps as RACCheckboxProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmarkSmall, IconMinusSmall } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface CheckboxProps\n extends CommonProps,\n Omit<LabellableProps, 'label'>,\n Pick<\n RACCheckboxProps,\n | 'onChange'\n | 'isSelected'\n | 'isIndeterminate'\n | 'isDisabled'\n | 'isReadOnly'\n | 'isRequired'\n | 'isInvalid'\n | 'name'\n | 'value'\n | 'defaultSelected'\n > {\n /** The label rendered next to the checkbox. */\n children?: StringLikeChildren;\n}\n\nfunction Checkbox(\n { children, UNSAFE_className, UNSAFE_style, ...props }: CheckboxProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Checkbox requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACCheckbox {...props} ref={ref} className={clsx('cim-checkbox', UNSAFE_className)} style={UNSAFE_style}>\n {({ isIndeterminate }) => (\n <>\n <div className=\"cim-checkbox-toggle-wrapper\">\n <div className=\"cim-checkbox-toggle\">{isIndeterminate ? <IconMinusSmall /> : <IconCheckmarkSmall />}</div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"body\">\n {children}\n </Text>\n )}\n </>\n )}\n </RACCheckbox>\n );\n}\n\n/**\n * Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.\n *\n * See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/
|
|
1
|
+
{"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../src/components/checkbox/checkbox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;;;;;AAEb,gDAAwB;AACxB,iCAAqD;AACrD,iEAAwG;AACxG,yDAAkD;AAClD,mDAA0E;AAC1E,mEAA2D;AAE3D,mDAA6C;AAsB7C,SAAS,QAAQ,CACf,EAAE,QAAQ,EAAE,gBAAgB,EAAE,YAAY,EAAE,GAAG,KAAK,EAAiB,EACrE,GAAmC;IAEnC,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAE7E,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,QAAQ,IAAI,CAAC,SAAS,IAAI,CAAC,cAAc,EAAE,CAAC;YAC/C,OAAO,CAAC,IAAI,CAAC,oFAAoF,CAAC,CAAC;QACrG,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC;IAE1C,OAAO,CACL,uBAAC,gCAAW,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,IAAA,cAAI,EAAC,cAAc,EAAE,gBAAgB,CAAC,EAAE,KAAK,EAAE,YAAY,YACrG,CAAC,EAAE,eAAe,EAAE,EAAE,EAAE,CAAC,CACxB,6DACE,gCAAK,SAAS,EAAC,6BAA6B,YAC1C,gCAAK,SAAS,EAAC,qBAAqB,YAAE,eAAe,CAAC,CAAC,CAAC,uBAAC,yBAAc,KAAG,CAAC,CAAC,CAAC,uBAAC,6BAAkB,KAAG,GAAO,GACtG,EACL,QAAQ,IAAI,CACX,uBAAC,cAAI,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,MAAM,YAC3B,QAAQ,GACJ,CACR,IACA,CACJ,GACW,CACf,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,SAAS,GAAG,IAAA,oCAAc,EAAC,IAAA,2BAAU,EAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;AAE7C,6BAAQ","sourcesContent":["'use client';\n\nimport clsx from 'clsx';\nimport { useEffect, type ForwardedRef } from 'react';\nimport { Checkbox as RACCheckbox, type CheckboxProps as RACCheckboxProps } from 'react-aria-components';\nimport { forwardRef } from '../../forward-ref.js';\nimport { IconCheckmarkSmall, IconMinusSmall } from '../../icons/index.js';\nimport { withStyleProps } from '../../with-style-props.js';\nimport type { CommonProps, LabellableProps, StringLikeChildren } from '../types.js';\nimport { Text } from '../typography/text.js';\n\nexport interface CheckboxProps\n extends CommonProps,\n Omit<LabellableProps, 'label'>,\n Pick<\n RACCheckboxProps,\n | 'onChange'\n | 'isSelected'\n | 'isIndeterminate'\n | 'isDisabled'\n | 'isReadOnly'\n | 'isRequired'\n | 'isInvalid'\n | 'name'\n | 'value'\n | 'defaultSelected'\n > {\n /** The label rendered next to the checkbox. */\n children?: StringLikeChildren;\n}\n\nfunction Checkbox(\n { children, UNSAFE_className, UNSAFE_style, ...props }: CheckboxProps,\n ref: ForwardedRef<HTMLLabelElement>,\n) {\n const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;\n\n useEffect(() => {\n if (!children && !ariaLabel && !ariaLabelledBy) {\n console.warn('Checkbox requires one of children / aria-label / aria-labelledby for accessibility');\n }\n }, [children, ariaLabel, ariaLabelledBy]);\n\n return (\n <RACCheckbox {...props} ref={ref} className={clsx('cim-checkbox', UNSAFE_className)} style={UNSAFE_style}>\n {({ isIndeterminate }) => (\n <>\n <div className=\"cim-checkbox-toggle-wrapper\">\n <div className=\"cim-checkbox-toggle\">{isIndeterminate ? <IconMinusSmall /> : <IconCheckmarkSmall />}</div>\n </div>\n {children && (\n <Text as=\"span\" variant=\"body\">\n {children}\n </Text>\n )}\n </>\n )}\n </RACCheckbox>\n );\n}\n\n/**\n * Allows users to mark an item as selected. Can be used standalone, or as part of `CheckboxGroup`.\n *\n * See [checkbox usage guidelines](https://ui.cimpress.io/components/checkbox/).\n */\nconst _Checkbox = withStyleProps(forwardRef(Checkbox), 'Checkbox');\n\nexport { _Checkbox as Checkbox };\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
|
|
1
|
+
import { type ListBoxProps as RACListBoxProps, type ComboBoxProps as RACComboBoxProps, type ListBoxItemProps as RACListBoxItemProps } from 'react-aria-components';
|
|
2
2
|
import type { CollectionItem, CollectionProps, CommonProps, FieldWithPlaceholderProps, Key, StringLikeChildren } from '../types.js';
|
|
3
3
|
/** Represents the state of the `ComboBox` component for validation purposes. */
|
|
4
4
|
export interface ComboBoxValidationValue {
|
|
@@ -7,12 +7,12 @@ export interface ComboBoxValidationValue {
|
|
|
7
7
|
/** The value of the ComboBox input. */
|
|
8
8
|
inputValue: string;
|
|
9
9
|
}
|
|
10
|
-
export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldWithPlaceholderProps<ComboBoxValidationValue>, CollectionProps<T>, Pick<RACComboBoxProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange'> {
|
|
10
|
+
export interface ComboBoxProps<T extends CollectionItem = CollectionItem> extends CommonProps, FieldWithPlaceholderProps<ComboBoxValidationValue>, CollectionProps<T>, Pick<RACComboBoxProps<T>, 'name' | 'isDisabled' | 'isRequired' | 'isInvalid' | 'isReadOnly' | 'selectedKey' | 'defaultSelectedKey' | 'inputValue' | 'defaultInputValue' | 'autoFocus' | 'onSelectionChange' | 'onInputChange' | 'onFocus' | 'onBlur' | 'onOpenChange'>, Pick<RACListBoxProps<T>, 'onScroll'> {
|
|
11
11
|
}
|
|
12
12
|
/** Allows users to filter a collapsible list and select one item from it. */
|
|
13
13
|
declare const _ComboBox: <T extends CollectionItem>(props: ComboBoxProps<T> & import("react").RefAttributes<HTMLDivElement> & import("../../with-style-props.js").StyleProps) => import("react").JSX.Element | null;
|
|
14
14
|
export { _ComboBox as ComboBox };
|
|
15
|
-
export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled'> {
|
|
15
|
+
export interface ComboBoxItemProps<T extends CollectionItem> extends Pick<RACListBoxItemProps<T>, 'id' | 'isDisabled' | 'onHoverStart' | 'onHoverEnd'> {
|
|
16
16
|
children: StringLikeChildren;
|
|
17
17
|
}
|
|
18
18
|
/** Renders a single list item within `ComboBox`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"combo-box.d.ts","sourceRoot":"","sources":["../../../../src/components/combo-box/combo-box.tsx"],"names":[],"mappings":"AAIA,OAAO,EASL,KAAK,YAAY,IAAI,eAAe,EAIpC,KAAK,aAAa,IAAI,gBAAgB,EACtC,KAAK,gBAAgB,IAAI,mBAAmB,EAC7C,MAAM,uBAAuB,CAAC;AAM/B,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,GAAG,EACH,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,gFAAgF;AAChF,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,WAAW,EAAE,GAAG,GAAG,IAA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cAAc,EAAE,EACxD,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,CAAC,CAAC,2CAezB;yBApBe,eAAe"}
|
|
@@ -17,7 +17,7 @@ const with_style_props_js_1 = require("../../with-style-props.js");
|
|
|
17
17
|
const collapsible_list_js_1 = require("../internal/collapsible-list/collapsible-list.js");
|
|
18
18
|
const form_field_js_1 = require("../internal/form-field/form-field.js");
|
|
19
19
|
const utils_js_1 = require("../typography/utils.js");
|
|
20
|
-
function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, ...props }, ref) {
|
|
20
|
+
function ComboBox({ label, description, error, items, children, placeholder, UNSAFE_className, UNSAFE_style, isReadOnly, onScroll, ...props }, ref) {
|
|
21
21
|
const triggerPositioningRef = (0, react_1.useRef)(null);
|
|
22
22
|
const { 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy } = props;
|
|
23
23
|
(0, react_1.useEffect)(() => {
|
|
@@ -30,7 +30,7 @@ function ComboBox({ label, description, error, items, children, placeholder, UNS
|
|
|
30
30
|
}
|
|
31
31
|
return ((0, jsx_runtime_1.jsxs)(react_aria_components_1.ComboBox, { ...props, ref: ref, className: (0, clsx_1.default)('cim-combo-box', UNSAFE_className), style: UNSAFE_style, menuTrigger: "focus", isReadOnly: isReadOnly, "data-readonly": isReadOnly ? true : undefined, children: [(0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldLabel, { isRequired: props.isRequired, isDisabled: props.isDisabled, children: label }), (0, jsx_runtime_1.jsxs)(react_aria_components_1.Group, { className: "cim-combo-box-input-wrapper", ref: triggerPositioningRef, children: [(0, jsx_runtime_1.jsx)(ComboBoxInput, { isReadOnly: isReadOnly, placeholder: placeholder }), (0, jsx_runtime_1.jsx)(react_aria_components_1.Button, { className: "cim-combo-box-button", children: (0, jsx_runtime_1.jsx)(index_js_1.IconChevronDownFill, {}) })] }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldError, { children: error }), (0, jsx_runtime_1.jsx)(form_field_js_1.FormFieldDescription, { children: description }), (0, jsx_runtime_1.jsx)(collapsible_list_js_1.CollapsibleList, { offset: 5, maxHeight: 315,
|
|
32
32
|
// Position the list relative to wrapper div instead of input to account for border
|
|
33
|
-
triggerRef: triggerPositioningRef, widthCorrection: 2, children: (0, jsx_runtime_1.jsx)(react_aria_components_1.ListBox, { className: "cim-combo-box-listbox", items: items, children: children }) })] }));
|
|
33
|
+
triggerRef: triggerPositioningRef, widthCorrection: 2, children: (0, jsx_runtime_1.jsx)(react_aria_components_1.ListBox, { className: "cim-combo-box-listbox", onScroll: onScroll, items: items, children: children }) })] }));
|
|
34
34
|
}
|
|
35
35
|
// TODO: add link to usage guidelines
|
|
36
36
|
/** Allows users to filter a collapsible list and select one item from it. */
|