@planningcenter/tapestry 3.3.2-qa-889.0 → 3.4.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/dist/components/button/Button.d.ts +1 -0
- package/dist/components/button/Button.d.ts.map +1 -1
- package/dist/components/button/Button.js +1 -0
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/DropdownButton.d.ts +18 -4
- package/dist/components/button/DropdownButton.d.ts.map +1 -1
- package/dist/components/button/DropdownButton.js +7 -0
- package/dist/components/button/DropdownButton.js.map +1 -1
- package/dist/components/button/DropdownIconButton.d.ts +8 -0
- package/dist/components/button/DropdownIconButton.d.ts.map +1 -1
- package/dist/components/button/DropdownIconButton.js +8 -0
- package/dist/components/button/DropdownIconButton.js.map +1 -1
- package/dist/components/button/IconButton.d.ts +1 -0
- package/dist/components/button/IconButton.d.ts.map +1 -1
- package/dist/components/button/IconButton.js +1 -0
- package/dist/components/button/IconButton.js.map +1 -1
- package/dist/components/button/LoadingButton.d.ts +1 -0
- package/dist/components/button/LoadingButton.d.ts.map +1 -1
- package/dist/components/button/LoadingButton.js +1 -0
- package/dist/components/button/LoadingButton.js.map +1 -1
- package/dist/components/button/PageHeaderActionsDropdownButton.d.ts +8 -0
- package/dist/components/button/PageHeaderActionsDropdownButton.d.ts.map +1 -1
- package/dist/components/button/PageHeaderActionsDropdownButton.js +8 -0
- package/dist/components/button/PageHeaderActionsDropdownButton.js.map +1 -1
- package/dist/components/checkbox/Checkbox.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.js +1 -0
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/combo-box/ComboBox.d.ts +12 -2
- package/dist/components/combo-box/ComboBox.d.ts.map +1 -1
- package/dist/components/combo-box/ComboBox.js +6 -2
- package/dist/components/combo-box/ComboBox.js.map +1 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/date-picker/DatePicker.js +12 -9
- package/dist/components/date-picker/DatePicker.js.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +155 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.js +103 -0
- package/dist/components/dropdown/Dropdown.js.map +1 -0
- package/dist/components/dropdown/index.d.ts +4 -0
- package/dist/components/dropdown/index.d.ts.map +1 -0
- package/dist/components/input/Input.d.ts +9 -0
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/input/Input.js +9 -0
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/link/IconLink.d.ts +7 -0
- package/dist/components/link/IconLink.d.ts.map +1 -1
- package/dist/components/link/IconLink.js +7 -0
- package/dist/components/link/IconLink.js.map +1 -1
- package/dist/components/link/Link.d.ts +8 -0
- package/dist/components/link/Link.d.ts.map +1 -1
- package/dist/components/link/Link.js +8 -0
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/number-stepper/NumberStepper.d.ts +1 -1
- package/dist/components/number-stepper/NumberStepper.d.ts.map +1 -1
- package/dist/components/number-stepper/NumberStepper.js +1 -1
- package/dist/components/number-stepper/NumberStepper.js.map +1 -1
- package/dist/components/page-header/PageHeader.d.ts +8 -0
- package/dist/components/page-header/PageHeader.d.ts.map +1 -1
- package/dist/components/page-header/PageHeader.js +8 -0
- package/dist/components/page-header/PageHeader.js.map +1 -1
- package/dist/components/radio/Radio.d.ts +1 -0
- package/dist/components/radio/Radio.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +1 -0
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio-group/RadioGroup.d.ts +1 -0
- package/dist/components/radio-group/RadioGroup.d.ts.map +1 -1
- package/dist/components/radio-group/RadioGroup.js +1 -0
- package/dist/components/radio-group/RadioGroup.js.map +1 -1
- package/dist/components/select/Select.d.ts +9 -0
- package/dist/components/select/Select.d.ts.map +1 -1
- package/dist/components/select/Select.js +9 -0
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/SelectNative.d.ts +10 -0
- package/dist/components/select/SelectNative.d.ts.map +1 -1
- package/dist/components/select/SelectNative.js +10 -0
- package/dist/components/select/SelectNative.js.map +1 -1
- package/dist/components/select/SelectPopover.d.ts +10 -0
- package/dist/components/select/SelectPopover.d.ts.map +1 -1
- package/dist/components/select/SelectPopover.js +10 -0
- package/dist/components/select/SelectPopover.js.map +1 -1
- package/dist/components/sidenav/Sidenav.d.ts +3 -0
- package/dist/components/sidenav/Sidenav.d.ts.map +1 -1
- package/dist/components/sidenav/Sidenav.js +3 -0
- package/dist/components/sidenav/Sidenav.js.map +1 -1
- package/dist/components/sidenav/SidenavItem.d.ts +3 -0
- package/dist/components/sidenav/SidenavItem.d.ts.map +1 -1
- package/dist/components/sidenav/SidenavItem.js +3 -0
- package/dist/components/sidenav/SidenavItem.js.map +1 -1
- package/dist/components/sidenav/SidenavSection.d.ts +3 -0
- package/dist/components/sidenav/SidenavSection.d.ts.map +1 -1
- package/dist/components/sidenav/SidenavSection.js +3 -0
- package/dist/components/sidenav/SidenavSection.js.map +1 -1
- package/dist/components/text-area/TextArea.d.ts +8 -0
- package/dist/components/text-area/TextArea.d.ts.map +1 -1
- package/dist/components/text-area/TextArea.js +8 -0
- package/dist/components/text-area/TextArea.js.map +1 -1
- package/dist/components/time-field/TimeField.d.ts +1 -1
- package/dist/components/time-field/TimeField.d.ts.map +1 -1
- package/dist/components/time-field/TimeField.js +1 -1
- package/dist/components/time-field/TimeField.js.map +1 -1
- package/dist/components/toggle-switch/ToggleSwitch.d.ts +3 -0
- package/dist/components/toggle-switch/ToggleSwitch.d.ts.map +1 -1
- package/dist/components/toggle-switch/ToggleSwitch.js +3 -0
- package/dist/components/toggle-switch/ToggleSwitch.js.map +1 -1
- package/dist/ext/@internationalized/date/dist/{CalendarDate.js → private/CalendarDate.js} +74 -88
- package/dist/ext/@internationalized/date/dist/private/CalendarDate.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{GregorianCalendar.js → private/calendars/GregorianCalendar.js} +26 -26
- package/dist/ext/@internationalized/date/dist/private/calendars/GregorianCalendar.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{conversion.js → private/conversion.js} +55 -55
- package/dist/ext/@internationalized/date/dist/private/conversion.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{manipulation.js → private/manipulation.js} +88 -91
- package/dist/ext/@internationalized/date/dist/private/manipulation.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/private/queries.js +32 -0
- package/dist/ext/@internationalized/date/dist/private/queries.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/private/string.js +51 -0
- package/dist/ext/@internationalized/date/dist/private/string.js.map +1 -0
- package/dist/ext/@internationalized/date/dist/{utils.js → private/utils.js} +2 -2
- package/dist/ext/@internationalized/date/dist/private/utils.js.map +1 -0
- package/dist/index.css +47 -42
- package/dist/index.css.map +1 -1
- package/dist/product-tokens/home.css +1 -0
- package/dist/reactRender.css +2042 -1912
- package/dist/reactRender.css.map +1 -1
- package/dist/reactRenderLegacy.css +2042 -1912
- package/dist/reactRenderLegacy.css.map +1 -1
- package/dist/tokens.css +8 -7
- package/dist/tokens.css.map +1 -1
- package/dist/unstable.css +172 -42
- package/dist/unstable.css.map +1 -1
- package/dist/unstable.d.ts +1 -0
- package/dist/unstable.d.ts.map +1 -1
- package/dist/unstable.js +1 -0
- package/dist/unstable.js.map +1 -1
- package/package.json +6 -6
- package/dist/ext/@internationalized/date/dist/CalendarDate.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/GregorianCalendar.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/conversion.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/manipulation.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/queries.js +0 -34
- package/dist/ext/@internationalized/date/dist/queries.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/string.js +0 -51
- package/dist/ext/@internationalized/date/dist/string.js.map +0 -1
- package/dist/ext/@internationalized/date/dist/utils.js.map +0 -1
- package/dist/ext/@swc/helpers/esm/_check_private_redeclaration.js +0 -8
- package/dist/ext/@swc/helpers/esm/_check_private_redeclaration.js.map +0 -1
- package/dist/ext/@swc/helpers/esm/_class_private_field_init.js +0 -9
- package/dist/ext/@swc/helpers/esm/_class_private_field_init.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidenav.js","sources":["../../../src/components/sidenav/Sidenav.tsx"],"sourcesContent":["import React from \"react\"\n\n/**\n * The sidenav lets users navigate through subsets of data pertaining to a resource.\n * It can be nested under the page header navigation, as secondary navigation.\n *\n * The expected structure of a `Sidenav` is:\n * `<Sidenav> <SidenavSection> <SidenavItem /> </SidenavSection> </Sidenav>`\n *\n * Please refer to each component's documentation for more information on how to use them.\n */\nexport function Sidenav({\n children,\n label,\n selectedItemLabel,\n className,\n popoverId,\n}: {\n /**\n * Default slot used to nest `SidenavSection` components.\n */\n children: React.ReactNode\n className?: string\n /**\n * Label for the sidenav, used for accessibility.\n */\n label?: string\n /**\n * The id of the popover container.\n */\n popoverId?: string\n /**\n * Label displayed in the responsive header of the sidenav.\n */\n selectedItemLabel?: string\n}) {\n const popoverIdProp =\n popoverId && popoverId.trim() ? { \"popover-id\": popoverId } : {}\n\n return (\n <tds-sidenav\n label={label}\n selected-item-label={selectedItemLabel}\n class={className}\n {...popoverIdProp}\n >\n {children}\n </tds-sidenav>\n )\n}\n"],"names":[],"mappings":";;AAEA
|
|
1
|
+
{"version":3,"file":"Sidenav.js","sources":["../../../src/components/sidenav/Sidenav.tsx"],"sourcesContent":["import React from \"react\"\n\n/**\n * The sidenav lets users navigate through subsets of data pertaining to a resource.\n * It can be nested under the page header navigation, as secondary navigation.\n *\n * The expected structure of a `Sidenav` is:\n * `<Sidenav> <SidenavSection> <SidenavItem /> </SidenavSection> </Sidenav>`\n *\n * Please refer to each component's documentation for more information on how to use them.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}\n */\nexport function Sidenav({\n children,\n label,\n selectedItemLabel,\n className,\n popoverId,\n}: {\n /**\n * Default slot used to nest `SidenavSection` components.\n */\n children: React.ReactNode\n className?: string\n /**\n * Label for the sidenav, used for accessibility.\n */\n label?: string\n /**\n * The id of the popover container.\n */\n popoverId?: string\n /**\n * Label displayed in the responsive header of the sidenav.\n */\n selectedItemLabel?: string\n}) {\n const popoverIdProp =\n popoverId && popoverId.trim() ? { \"popover-id\": popoverId } : {}\n\n return (\n <tds-sidenav\n label={label}\n selected-item-label={selectedItemLabel}\n class={className}\n {...popoverIdProp}\n >\n {children}\n </tds-sidenav>\n )\n}\n"],"names":[],"mappings":";;AAEA;;;;;;;;;;;AAWG;AACG,SAAU,OAAO,CAAC,EACtB,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,SAAS,EACT,SAAS,GAmBV,EAAA;IACC,MAAM,aAAa,GACjB,SAAS,IAAI,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,SAAS,EAAE,GAAG,EAAE;AAElE,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,aAAA,EAAA,EACE,KAAK,EAAE,KAAK,yBACS,iBAAiB,EACtC,KAAK,EAAE,SAAS,EAAA,GACZ,aAAa,IAEhB,QAAQ,CACG;AAElB;;;;"}
|
|
@@ -15,6 +15,9 @@ import React from "react";
|
|
|
15
15
|
* </SidenavSection>
|
|
16
16
|
* </SidenavItem>
|
|
17
17
|
* ```
|
|
18
|
+
*
|
|
19
|
+
* @component
|
|
20
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}
|
|
18
21
|
*/
|
|
19
22
|
export declare function SidenavItem({ children, className, selected, }: {
|
|
20
23
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidenavItem.d.ts","sourceRoot":"","sources":["../../../src/components/sidenav/SidenavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB
|
|
1
|
+
{"version":3,"file":"SidenavItem.d.ts","sourceRoot":"","sources":["../../../src/components/sidenav/SidenavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,QAAQ,GACT,EAAE;IACD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,qBAOA"}
|
|
@@ -16,6 +16,9 @@ import React from 'react';
|
|
|
16
16
|
* </SidenavSection>
|
|
17
17
|
* </SidenavItem>
|
|
18
18
|
* ```
|
|
19
|
+
*
|
|
20
|
+
* @component
|
|
21
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}
|
|
19
22
|
*/
|
|
20
23
|
function SidenavItem({ children, className, selected, }) {
|
|
21
24
|
const selectedProps = selected ? { selected: true } : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidenavItem.js","sources":["../../../src/components/sidenav/SidenavItem.tsx"],"sourcesContent":["import React from \"react\"\n\n/**\n * The `SidenavItem` component is used to display a single item in the sidenav.\n *\n * @example\n * ```html\n * <SidenavItem>\n * <a href=\"#\">Home</a>\n * </SidenavItem>\n *\n * <SidenavItem>\n * <button>Foo</button>\n * <SidenavSection subnav>\n * <SidenavItem><a href=\"#\">Nested Link</a></SidenavItem>\n * </SidenavSection>\n * </SidenavItem>\n * ```\n */\nexport function SidenavItem({\n children,\n className,\n selected,\n}: {\n /**\n * Should be a link or button without any classes or styles applied.\n */\n children: React.ReactNode\n className?: string\n /**\n * Whether the sidenav item is selected.\n */\n selected?: boolean\n}) {\n const selectedProps = selected ? { selected: true } : {}\n return (\n <tds-sidenav-item class={className} {...selectedProps}>\n {children}\n </tds-sidenav-item>\n )\n}\n"],"names":[],"mappings":";;AAEA
|
|
1
|
+
{"version":3,"file":"SidenavItem.js","sources":["../../../src/components/sidenav/SidenavItem.tsx"],"sourcesContent":["import React from \"react\"\n\n/**\n * The `SidenavItem` component is used to display a single item in the sidenav.\n *\n * @example\n * ```html\n * <SidenavItem>\n * <a href=\"#\">Home</a>\n * </SidenavItem>\n *\n * <SidenavItem>\n * <button>Foo</button>\n * <SidenavSection subnav>\n * <SidenavItem><a href=\"#\">Nested Link</a></SidenavItem>\n * </SidenavSection>\n * </SidenavItem>\n * ```\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}\n */\nexport function SidenavItem({\n children,\n className,\n selected,\n}: {\n /**\n * Should be a link or button without any classes or styles applied.\n */\n children: React.ReactNode\n className?: string\n /**\n * Whether the sidenav item is selected.\n */\n selected?: boolean\n}) {\n const selectedProps = selected ? { selected: true } : {}\n return (\n <tds-sidenav-item class={className} {...selectedProps}>\n {children}\n </tds-sidenav-item>\n )\n}\n"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;AAmBG;AACG,SAAU,WAAW,CAAC,EAC1B,QAAQ,EACR,SAAS,EACT,QAAQ,GAWT,EAAA;AACC,IAAA,MAAM,aAAa,GAAG,QAAQ,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE;IACxD,QACE,KAAA,CAAA,aAAA,CAAA,kBAAA,EAAA,EAAkB,KAAK,EAAE,SAAS,EAAA,GAAM,aAAa,EAAA,EAClD,QAAQ,CACQ;AAEvB;;;;"}
|
|
@@ -4,6 +4,9 @@ import React from "react";
|
|
|
4
4
|
* All `SidenavItem` components should be nested within a `SidenavSection`.
|
|
5
5
|
*
|
|
6
6
|
* If the `label` prop is provided, it will be used to generate a header for the section, and the section will be labelled by the `aria-labelledby` attribute.
|
|
7
|
+
*
|
|
8
|
+
* @component
|
|
9
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}
|
|
7
10
|
*/
|
|
8
11
|
export declare function SidenavSection({ children, className, label, subnav, }: {
|
|
9
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidenavSection.d.ts","sourceRoot":"","sources":["../../../src/components/sidenav/SidenavSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB
|
|
1
|
+
{"version":3,"file":"SidenavSection.d.ts","sourceRoot":"","sources":["../../../src/components/sidenav/SidenavSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,GACP,EAAE;IACD;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,qBAOA"}
|
|
@@ -5,6 +5,9 @@ import React from 'react';
|
|
|
5
5
|
* All `SidenavItem` components should be nested within a `SidenavSection`.
|
|
6
6
|
*
|
|
7
7
|
* If the `label` prop is provided, it will be used to generate a header for the section, and the section will be labelled by the `aria-labelledby` attribute.
|
|
8
|
+
*
|
|
9
|
+
* @component
|
|
10
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}
|
|
8
11
|
*/
|
|
9
12
|
function SidenavSection({ children, className, label, subnav, }) {
|
|
10
13
|
const subnavProps = subnav ? { slot: "subnav" } : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidenavSection.js","sources":["../../../src/components/sidenav/SidenavSection.tsx"],"sourcesContent":["import React from \"react\"\n\n/**\n * The `SidenavSection` component is used to display a section of the sidenav.\n * All `SidenavItem` components should be nested within a `SidenavSection`.\n *\n * If the `label` prop is provided, it will be used to generate a header for the section, and the section will be labelled by the `aria-labelledby` attribute.\n */\nexport function SidenavSection({\n children,\n className,\n label,\n subnav,\n}: {\n /**\n * Default slot used to nest `SidenavItem` components.\n */\n children: React.ReactNode\n className?: string\n /**\n * Label for the section.\n */\n label?: string\n /**\n * Add subnav if this section is a subnav of a SidenavItem.\n */\n subnav?: boolean\n}) {\n const subnavProps = subnav ? { slot: \"subnav\" } : {}\n return (\n <tds-sidenav-section class={className} label={label} {...subnavProps}>\n {children}\n </tds-sidenav-section>\n )\n}\n"],"names":[],"mappings":";;AAEA
|
|
1
|
+
{"version":3,"file":"SidenavSection.js","sources":["../../../src/components/sidenav/SidenavSection.tsx"],"sourcesContent":["import React from \"react\"\n\n/**\n * The `SidenavSection` component is used to display a section of the sidenav.\n * All `SidenavItem` components should be nested within a `SidenavSection`.\n *\n * If the `label` prop is provided, it will be used to generate a header for the section, and the section will be labelled by the `aria-labelledby` attribute.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-sidenav--docs | Storybook Documentation}\n */\nexport function SidenavSection({\n children,\n className,\n label,\n subnav,\n}: {\n /**\n * Default slot used to nest `SidenavItem` components.\n */\n children: React.ReactNode\n className?: string\n /**\n * Label for the section.\n */\n label?: string\n /**\n * Add subnav if this section is a subnav of a SidenavItem.\n */\n subnav?: boolean\n}) {\n const subnavProps = subnav ? { slot: \"subnav\" } : {}\n return (\n <tds-sidenav-section class={className} label={label} {...subnavProps}>\n {children}\n </tds-sidenav-section>\n )\n}\n"],"names":[],"mappings":";;AAEA;;;;;;;;AAQG;AACG,SAAU,cAAc,CAAC,EAC7B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,MAAM,GAeP,EAAA;AACC,IAAA,MAAM,WAAW,GAAG,MAAM,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE;AACpD,IAAA,QACE,KAAA,CAAA,aAAA,CAAA,qBAAA,EAAA,EAAqB,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAM,WAAW,EAAA,EACjE,QAAQ,CACW;AAE1B;;;;"}
|
|
@@ -34,6 +34,14 @@ interface TextAreaWithAriaLabelledBy extends TextAreaBaseProps {
|
|
|
34
34
|
}
|
|
35
35
|
export type TextAreaCustomProps = TextAreaWithAriaLabelledBy | TextAreaWithHiddenLabel | TextAreaWithVisibleLabel;
|
|
36
36
|
export type TextAreaProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, keyof TextAreaCustomProps | "rows"> & TextAreaCustomProps;
|
|
37
|
+
/**
|
|
38
|
+
* A multi-line text input that renders as an HTML `<textarea>` with a
|
|
39
|
+
* label and optional description. Supports invalid state, `lg`/`md`
|
|
40
|
+
* sizing, and configurable resize behavior (`vertical`, `none`, `auto`).
|
|
41
|
+
*
|
|
42
|
+
* @component
|
|
43
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-textarea--docs | Storybook Documentation}
|
|
44
|
+
*/
|
|
37
45
|
export declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
38
46
|
export {};
|
|
39
47
|
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/text-area/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,EAAc,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAEtE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;AAEzD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAA;AAEtC,UAAU,iBAAiB;IACzB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gCAAgC;IAChC,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,IAAI,CAAC,EAAE,YAAY,CAAA;CACpB;AAED,UAAU,wBAAyB,SAAQ,iBAAiB;IAC1D,mEAAmE;IACnE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,uCAAuC;IACvC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,UAAU,uBAAwB,SAAQ,iBAAiB;IACzD,mEAAmE;IACnE,SAAS,EAAE,IAAI,CAAA;IACf,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,0BAA2B,SAAQ,iBAAiB;IAC5D,+DAA+D;IAC/D,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,MAAM,MAAM,mBAAmB,GAC3B,0BAA0B,GAC1B,uBAAuB,GACvB,wBAAwB,CAAA;AAE5B,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,MAAM,mBAAmB,GAAG,MAAM,CACnC,GACC,mBAAmB,CAAA;AAErB,eAAO,MAAM,QAAQ,2FAoDpB,CAAA"}
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../src/components/text-area/TextArea.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,EAAc,KAAK,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAEtE,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAA;AAEzD,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,CAAA;AAEtC,UAAU,iBAAiB;IACzB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,mDAAmD;IACnD,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gCAAgC;IAChC,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,IAAI,CAAC,EAAE,YAAY,CAAA;CACpB;AAED,UAAU,wBAAyB,SAAQ,iBAAiB;IAC1D,mEAAmE;IACnE,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,uCAAuC;IACvC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,UAAU,uBAAwB,SAAQ,iBAAiB;IACzD,mEAAmE;IACnE,SAAS,EAAE,IAAI,CAAA;IACf,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,0BAA2B,SAAQ,iBAAiB;IAC5D,+DAA+D;IAC/D,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,MAAM,MAAM,mBAAmB,GAC3B,0BAA0B,GAC1B,uBAAuB,GACvB,wBAAwB,CAAA;AAE5B,MAAM,MAAM,aAAa,GAAG,IAAI,CAC9B,sBAAsB,CAAC,mBAAmB,CAAC,EAC3C,MAAM,mBAAmB,GAAG,MAAM,CACnC,GACC,mBAAmB,CAAA;AAErB;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,2FAoDpB,CAAA"}
|
|
@@ -2,6 +2,14 @@ import { InputTextBase } from '../input-text-base/InputTextBase.js';
|
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React__default, { forwardRef } from 'react';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* A multi-line text input that renders as an HTML `<textarea>` with a
|
|
7
|
+
* label and optional description. Supports invalid state, `lg`/`md`
|
|
8
|
+
* sizing, and configurable resize behavior (`vertical`, `none`, `auto`).
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-textarea--docs | Storybook Documentation}
|
|
12
|
+
*/
|
|
5
13
|
const TextArea = forwardRef(function TextArea({ "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className, description, hideLabel, id, invalid, label, resize = "vertical", rows = 3, size = "md", ...restProps }, ref) {
|
|
6
14
|
const wrapperClassName = classNames({
|
|
7
15
|
"tds-textarea--resize-auto": resize === "auto",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sources":["../../../src/components/text-area/TextArea.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { InputTextBase } from \"@components/input-text-base\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, type TextareaHTMLAttributes } from \"react\"\n\nexport type TextAreaResize = \"auto\" | \"none\" | \"vertical\"\n\nexport type TextAreaSize = \"lg\" | \"md\"\n\ninterface TextAreaBaseProps {\n /** Helper text displayed below the textarea. Styled as error text when `invalid`. */\n description?: string\n /** Whether the textarea is in an invalid state. */\n invalid?: boolean\n /** Controls resize behavior. */\n resize?: TextAreaResize\n /** Visible height in lines. */\n rows?: number\n /** The size of the textarea. */\n size?: TextAreaSize\n}\n\ninterface TextAreaWithVisibleLabel extends TextAreaBaseProps {\n /** If true, the label is visually hidden and set as aria-label. */\n hideLabel?: false\n /** The label text for the textarea. */\n label: React.ReactNode\n}\n\ninterface TextAreaWithHiddenLabel extends TextAreaBaseProps {\n /** If true, the label is visually hidden and set as aria-label. */\n hideLabel: true\n /** The label text for the textarea. Must be a string when hidden. */\n label: string\n}\n\ninterface TextAreaWithAriaLabelledBy extends TextAreaBaseProps {\n /** ID of an external label element. Use instead of `label`. */\n \"aria-labelledby\": string\n hideLabel?: never\n label?: never\n}\n\nexport type TextAreaCustomProps =\n | TextAreaWithAriaLabelledBy\n | TextAreaWithHiddenLabel\n | TextAreaWithVisibleLabel\n\nexport type TextAreaProps = Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n keyof TextAreaCustomProps | \"rows\"\n> &\n TextAreaCustomProps\n\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className,\n description,\n hideLabel,\n id,\n invalid,\n label,\n resize = \"vertical\",\n rows = 3,\n size = \"md\",\n ...restProps\n }: TextAreaProps,\n ref\n ) {\n const wrapperClassName = classNames(\n {\n \"tds-textarea--resize-auto\": resize === \"auto\",\n \"tds-textarea--resize-none\": resize === \"none\",\n \"tds-textarea--resize-vertical\": resize === \"vertical\",\n },\n className\n )\n\n return (\n <InputTextBase\n className={wrapperClassName}\n description={description}\n hideLabel={hideLabel || !!ariaLabelledBy}\n id={id}\n invalid={invalid}\n label={label}\n size={size}\n >\n {({ descriptionId, inputId }) => (\n <textarea\n {...restProps}\n aria-describedby={descriptionId}\n aria-invalid={invalid || undefined}\n aria-label={hideLabel ? ariaLabel || (label as string) : ariaLabel}\n aria-labelledby={ariaLabelledBy}\n id={inputId}\n ref={ref}\n rows={rows}\n />\n )}\n </InputTextBase>\n )\n }\n)\n\nTextArea.displayName = \"TextArea\"\n"],"names":["React"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../src/components/text-area/TextArea.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { InputTextBase } from \"@components/input-text-base\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, type TextareaHTMLAttributes } from \"react\"\n\nexport type TextAreaResize = \"auto\" | \"none\" | \"vertical\"\n\nexport type TextAreaSize = \"lg\" | \"md\"\n\ninterface TextAreaBaseProps {\n /** Helper text displayed below the textarea. Styled as error text when `invalid`. */\n description?: string\n /** Whether the textarea is in an invalid state. */\n invalid?: boolean\n /** Controls resize behavior. */\n resize?: TextAreaResize\n /** Visible height in lines. */\n rows?: number\n /** The size of the textarea. */\n size?: TextAreaSize\n}\n\ninterface TextAreaWithVisibleLabel extends TextAreaBaseProps {\n /** If true, the label is visually hidden and set as aria-label. */\n hideLabel?: false\n /** The label text for the textarea. */\n label: React.ReactNode\n}\n\ninterface TextAreaWithHiddenLabel extends TextAreaBaseProps {\n /** If true, the label is visually hidden and set as aria-label. */\n hideLabel: true\n /** The label text for the textarea. Must be a string when hidden. */\n label: string\n}\n\ninterface TextAreaWithAriaLabelledBy extends TextAreaBaseProps {\n /** ID of an external label element. Use instead of `label`. */\n \"aria-labelledby\": string\n hideLabel?: never\n label?: never\n}\n\nexport type TextAreaCustomProps =\n | TextAreaWithAriaLabelledBy\n | TextAreaWithHiddenLabel\n | TextAreaWithVisibleLabel\n\nexport type TextAreaProps = Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n keyof TextAreaCustomProps | \"rows\"\n> &\n TextAreaCustomProps\n\n/**\n * A multi-line text input that renders as an HTML `<textarea>` with a\n * label and optional description. Supports invalid state, `lg`/`md`\n * sizing, and configurable resize behavior (`vertical`, `none`, `auto`).\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-textarea--docs | Storybook Documentation}\n */\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(\n function TextArea(\n {\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n className,\n description,\n hideLabel,\n id,\n invalid,\n label,\n resize = \"vertical\",\n rows = 3,\n size = \"md\",\n ...restProps\n }: TextAreaProps,\n ref\n ) {\n const wrapperClassName = classNames(\n {\n \"tds-textarea--resize-auto\": resize === \"auto\",\n \"tds-textarea--resize-none\": resize === \"none\",\n \"tds-textarea--resize-vertical\": resize === \"vertical\",\n },\n className\n )\n\n return (\n <InputTextBase\n className={wrapperClassName}\n description={description}\n hideLabel={hideLabel || !!ariaLabelledBy}\n id={id}\n invalid={invalid}\n label={label}\n size={size}\n >\n {({ descriptionId, inputId }) => (\n <textarea\n {...restProps}\n aria-describedby={descriptionId}\n aria-invalid={invalid || undefined}\n aria-label={hideLabel ? ariaLabel || (label as string) : ariaLabel}\n aria-labelledby={ariaLabelledBy}\n id={inputId}\n ref={ref}\n rows={rows}\n />\n )}\n </InputTextBase>\n )\n }\n)\n\nTextArea.displayName = \"TextArea\"\n"],"names":["React"],"mappings":";;;;AAuDA;;;;;;;AAOG;MACU,QAAQ,GAAG,UAAU,CAChC,SAAS,QAAQ,CACf,EACE,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAS,EACT,WAAW,EACX,SAAS,EACT,EAAE,EACF,OAAO,EACP,KAAK,EACL,MAAM,GAAG,UAAU,EACnB,IAAI,GAAG,CAAC,EACR,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACE,EAChB,GAAG,EAAA;IAEH,MAAM,gBAAgB,GAAG,UAAU,CACjC;QACE,2BAA2B,EAAE,MAAM,KAAK,MAAM;QAC9C,2BAA2B,EAAE,MAAM,KAAK,MAAM;QAC9C,+BAA+B,EAAE,MAAM,KAAK,UAAU;KACvD,EACD,SAAS,CACV;AAED,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,aAAa,IACZ,SAAS,EAAE,gBAAgB,EAC3B,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,SAAS,IAAI,CAAC,CAAC,cAAc,EACxC,EAAE,EAAE,EAAE,EACN,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EAAA,EAET,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,MAC1BA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA,EAAA,GACM,SAAS,EAAA,kBAAA,EACK,aAAa,kBACjB,OAAO,IAAI,SAAS,EAAA,YAAA,EACtB,SAAS,GAAG,SAAS,IAAK,KAAgB,GAAG,SAAS,qBACjD,cAAc,EAC/B,EAAE,EAAE,OAAO,EACX,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,GACV,CACH,CACa;AAEpB,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
@@ -3,7 +3,7 @@ import "./index.css";
|
|
|
3
3
|
import type { CalendarDateTime, Time, ZonedDateTime } from "@internationalized/date";
|
|
4
4
|
import type { CombineAriaPropsWithCustomProps } from "../../utilities/reactAriaProps";
|
|
5
5
|
import React from "react";
|
|
6
|
-
import { type TimeFieldProps as AriaTimeFieldProps } from "react-aria-components";
|
|
6
|
+
import { type TimeFieldProps as AriaTimeFieldProps } from "react-aria-components/TimeField";
|
|
7
7
|
export type TimeFieldSize = "md" | "lg";
|
|
8
8
|
export type TimeFieldValue = CalendarDateTime | Time | ZonedDateTime;
|
|
9
9
|
export interface TimeFieldProps {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../src/components/time-field/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACJ,aAAa,EACd,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAML,KAAK,cAAc,IAAI,kBAAkB,EAC1C,MAAM,
|
|
1
|
+
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../src/components/time-field/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,aAAa,CAAA;AAEpB,OAAO,KAAK,EACV,gBAAgB,EAChB,IAAI,EACJ,aAAa,EACd,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAEhF,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAML,KAAK,cAAc,IAAI,kBAAkB,EAC1C,MAAM,iCAAiC,CAAA;AAExC,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAA;AAEvC,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,IAAI,GAAG,aAAa,CAAA;AAEpE,MAAM,WAAW,cAAc;IAC7B,gGAAgG;IAChG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+DAA+D;IAC/D,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,yDAAyD;IACzD,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,wDAAwD;IACxD,GAAG,CAAC,EAAE,cAAc,CAAA;IACpB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kCAAkC;IAClC,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB;AAED,KAAK,wBAAwB,GACzB,UAAU,GACV,aAAa,GACb,kBAAkB,GAClB,yBAAyB,GACzB,MAAM,CAAA;AAEV,KAAK,2BAA2B,GAC5B,cAAc,GACd,cAAc,GACd,WAAW,GACX,MAAM,GACN,UAAU,GACV,OAAO,CAAA;AAEX,MAAM,MAAM,qBAAqB,GAAG,+BAA+B,CACjE,kBAAkB,CAAC,cAAc,CAAC,EAClC,cAAc,EACd,wBAAwB,EACxB,2BAA2B,CAC5B,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,IAAW,EACX,GAAG,SAAS,EACb,EAAE,qBAAqB,qBAqDvB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Icon from '../../utilities/Icon.js';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { TimeField as TimeField$1, Label, DateInput, DateSegment, Text } from 'react-aria-components';
|
|
4
|
+
import { TimeField as TimeField$1, Label, DateInput, DateSegment, Text } from 'react-aria-components/TimeField';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* A time field component allows users to enter and edit time values as individual
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.js","sources":["../../../src/components/time-field/TimeField.tsx"],"sourcesContent":["import \"../input-text-base/index.css\"\nimport \"./index.css\"\n\nimport type {\n CalendarDateTime,\n Time,\n ZonedDateTime,\n} from \"@internationalized/date\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport classNames from \"classnames\"\nimport React from \"react\"\nimport {\n DateInput,\n DateSegment,\n Label,\n Text,\n TimeField as AriaTimeField,\n type TimeFieldProps as AriaTimeFieldProps,\n} from \"react-aria-components\"\n\nexport type TimeFieldSize = \"md\" | \"lg\"\n\nexport type TimeFieldValue = CalendarDateTime | Time | ZonedDateTime\n\nexport interface TimeFieldProps {\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: string\n /** Disables the field. */\n disabled?: boolean\n /** If `true`, always shows leading zeros in the hour field. */\n forceLeadingZeros?: boolean\n /** If `true`, renders the label visually hidden. */\n hideLabel?: boolean\n /** If `true`, applies error styling to the field and description. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /** The maximum allowed time (e.g. `new Time(17, 0)`). */\n max?: TimeFieldValue\n /** The minimum allowed time (e.g. `new Time(9, 0)`). */\n min?: TimeFieldValue\n /** Allows the value to be read but not changed. */\n readOnly?: boolean\n /** If `true`, appends an asterisk after the label text. */\n required?: boolean\n /** The size of the time field. */\n size?: TimeFieldSize\n}\n\ntype AriaTimeFieldPropsToOmit =\n | \"children\"\n | \"granularity\"\n | \"placeholderValue\"\n | \"shouldForceLeadingZeros\"\n | \"slot\"\n\ntype AriaTimeFieldPropsToInclude =\n | \"defaultValue\"\n | \"hideTimeZone\"\n | \"hourCycle\"\n | \"name\"\n | \"onChange\"\n | \"value\"\n\nexport type TimeFieldElementProps = CombineAriaPropsWithCustomProps<\n AriaTimeFieldProps<TimeFieldValue>,\n TimeFieldProps,\n AriaTimeFieldPropsToOmit,\n AriaTimeFieldPropsToInclude\n>\n\n/**\n * A time field component allows users to enter and edit time values as individual\n * segments. Each segment supports keyboard entry, increment/decrement\n * with arrow keys, and respects the user's locale (12- vs 24-hour clock),\n * which can be overridden with `hourCycle`.\n *\n * Values are `Time`, `CalendarDateTime`, or `ZonedDateTime` from\n * `@internationalized/date`. Restrict the allowed range with `min`/`max`.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-timefield--docs | Storybook Documentation}\n */\nexport function TimeField({\n className,\n description,\n disabled,\n forceLeadingZeros,\n hideLabel,\n invalid,\n label,\n max,\n min,\n readOnly,\n required,\n size = \"md\",\n ...restProps\n}: TimeFieldElementProps) {\n const combinedClassName = classNames(\n \"tds-field tds-time-field\",\n {\n \"tds-field--lg\": size === \"lg\",\n \"tds-time-field--lg\": size === \"lg\",\n },\n className\n )\n\n return (\n <AriaTimeField\n {...restProps}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n granularity=\"minute\"\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n maxValue={max ?? undefined}\n minValue={min ?? undefined}\n shouldForceLeadingZeros={forceLeadingZeros}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <DateInput className=\"tds-field-control tds-time-field-input\">\n {(segment) => (\n <DateSegment\n className={\n segment.type === \"literal\"\n ? \"tds-field-date-segment-separator\"\n : \"tds-field-date-segment\"\n }\n segment={segment}\n />\n )}\n </DateInput>\n {description && (\n <Text\n elementType=\"p\"\n className=\"tds-field-description\"\n slot=\"description\"\n >\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaTimeField>\n )\n}\n"],"names":["React","AriaTimeField"],"mappings":";;;;;AAwEA;;;;;;;;;;;AAWG;AACG,SAAU,SAAS,CAAC,EACxB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACU,EAAA;AACtB,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,0BAA0B,EAC1B;QACE,eAAe,EAAE,IAAI,KAAK,IAAI;QAC9B,oBAAoB,EAAE,IAAI,KAAK,IAAI;KACpC,EACD,SAAS,CACV;IAED,QACEA,cAAA,CAAA,aAAA,CAACC,WAAa,EAAA,EAAA,GACR,SAAS,gBACD,SAAS,GAAG,KAAK,GAAG,SAAS,EACzC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,uBAAuB,EAAE,iBAAiB,EAAA;QAEzC,CAAC,SAAS,IAAID,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,SAAS,EAAC,iBAAiB,EAAA,EAAE,KAAK,CAAS;QACjEA,cAAA,CAAA,aAAA,CAAC,SAAS,IAAC,SAAS,EAAC,wCAAwC,EAAA,EAC1D,CAAC,OAAO,MACPA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EACV,SAAS,EACP,OAAO,CAAC,IAAI,KAAK;AACf,kBAAE;kBACA,wBAAwB,EAE9B,OAAO,EAAE,OAAO,EAAA,CAChB,CACH,CACS;AACX,QAAA,WAAW,KACVA,cAAA,CAAA,aAAA,CAAC,IAAI,IACH,WAAW,EAAC,GAAG,EACf,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAC,aAAa,EAAA;YAElBA,cAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,oCAAoC,EAC9C,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,WAAW,CACP,CACR,CACa;AAEpB;;;;"}
|
|
1
|
+
{"version":3,"file":"TimeField.js","sources":["../../../src/components/time-field/TimeField.tsx"],"sourcesContent":["import \"../input-text-base/index.css\"\nimport \"./index.css\"\n\nimport type {\n CalendarDateTime,\n Time,\n ZonedDateTime,\n} from \"@internationalized/date\"\nimport Icon from \"@utilities/Icon\"\nimport type { CombineAriaPropsWithCustomProps } from \"@utilities/reactAriaProps\"\nimport classNames from \"classnames\"\nimport React from \"react\"\nimport {\n DateInput,\n DateSegment,\n Label,\n Text,\n TimeField as AriaTimeField,\n type TimeFieldProps as AriaTimeFieldProps,\n} from \"react-aria-components/TimeField\"\n\nexport type TimeFieldSize = \"md\" | \"lg\"\n\nexport type TimeFieldValue = CalendarDateTime | Time | ZonedDateTime\n\nexport interface TimeFieldProps {\n /** Helper text displayed below the component. Styled as error text when `invalid` is `true`. */\n description?: string\n /** Disables the field. */\n disabled?: boolean\n /** If `true`, always shows leading zeros in the hour field. */\n forceLeadingZeros?: boolean\n /** If `true`, renders the label visually hidden. */\n hideLabel?: boolean\n /** If `true`, applies error styling to the field and description. */\n invalid?: boolean\n /** Accessible label for the field. */\n label: string\n /** The maximum allowed time (e.g. `new Time(17, 0)`). */\n max?: TimeFieldValue\n /** The minimum allowed time (e.g. `new Time(9, 0)`). */\n min?: TimeFieldValue\n /** Allows the value to be read but not changed. */\n readOnly?: boolean\n /** If `true`, appends an asterisk after the label text. */\n required?: boolean\n /** The size of the time field. */\n size?: TimeFieldSize\n}\n\ntype AriaTimeFieldPropsToOmit =\n | \"children\"\n | \"granularity\"\n | \"placeholderValue\"\n | \"shouldForceLeadingZeros\"\n | \"slot\"\n\ntype AriaTimeFieldPropsToInclude =\n | \"defaultValue\"\n | \"hideTimeZone\"\n | \"hourCycle\"\n | \"name\"\n | \"onChange\"\n | \"value\"\n\nexport type TimeFieldElementProps = CombineAriaPropsWithCustomProps<\n AriaTimeFieldProps<TimeFieldValue>,\n TimeFieldProps,\n AriaTimeFieldPropsToOmit,\n AriaTimeFieldPropsToInclude\n>\n\n/**\n * A time field component allows users to enter and edit time values as individual\n * segments. Each segment supports keyboard entry, increment/decrement\n * with arrow keys, and respects the user's locale (12- vs 24-hour clock),\n * which can be overridden with `hourCycle`.\n *\n * Values are `Time`, `CalendarDateTime`, or `ZonedDateTime` from\n * `@internationalized/date`. Restrict the allowed range with `min`/`max`.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-timefield--docs | Storybook Documentation}\n */\nexport function TimeField({\n className,\n description,\n disabled,\n forceLeadingZeros,\n hideLabel,\n invalid,\n label,\n max,\n min,\n readOnly,\n required,\n size = \"md\",\n ...restProps\n}: TimeFieldElementProps) {\n const combinedClassName = classNames(\n \"tds-field tds-time-field\",\n {\n \"tds-field--lg\": size === \"lg\",\n \"tds-time-field--lg\": size === \"lg\",\n },\n className\n )\n\n return (\n <AriaTimeField\n {...restProps}\n aria-label={hideLabel ? label : undefined}\n className={combinedClassName}\n granularity=\"minute\"\n isDisabled={disabled}\n isInvalid={invalid}\n isReadOnly={readOnly}\n isRequired={required}\n maxValue={max ?? undefined}\n minValue={min ?? undefined}\n shouldForceLeadingZeros={forceLeadingZeros}\n >\n {!hideLabel && <Label className=\"tds-field-label\">{label}</Label>}\n <DateInput className=\"tds-field-control tds-time-field-input\">\n {(segment) => (\n <DateSegment\n className={\n segment.type === \"literal\"\n ? \"tds-field-date-segment-separator\"\n : \"tds-field-date-segment\"\n }\n segment={segment}\n />\n )}\n </DateInput>\n {description && (\n <Text\n elementType=\"p\"\n className=\"tds-field-description\"\n slot=\"description\"\n >\n <Icon\n aria-hidden\n className=\"tds-field-description-invalid-icon\"\n symbol=\"general#exclamation-triangle\"\n />\n {description}\n </Text>\n )}\n </AriaTimeField>\n )\n}\n"],"names":["React","AriaTimeField"],"mappings":";;;;;AAwEA;;;;;;;;;;;AAWG;AACG,SAAU,SAAS,CAAC,EACxB,SAAS,EACT,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,SAAS,EACT,OAAO,EACP,KAAK,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACU,EAAA;AACtB,IAAA,MAAM,iBAAiB,GAAG,UAAU,CAClC,0BAA0B,EAC1B;QACE,eAAe,EAAE,IAAI,KAAK,IAAI;QAC9B,oBAAoB,EAAE,IAAI,KAAK,IAAI;KACpC,EACD,SAAS,CACV;IAED,QACEA,cAAA,CAAA,aAAA,CAACC,WAAa,EAAA,EAAA,GACR,SAAS,gBACD,SAAS,GAAG,KAAK,GAAG,SAAS,EACzC,SAAS,EAAE,iBAAiB,EAC5B,WAAW,EAAC,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,SAAS,EAAE,OAAO,EAClB,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,QAAQ,EACpB,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,QAAQ,EAAE,GAAG,IAAI,SAAS,EAC1B,uBAAuB,EAAE,iBAAiB,EAAA;QAEzC,CAAC,SAAS,IAAID,cAAA,CAAA,aAAA,CAAC,KAAK,EAAA,EAAC,SAAS,EAAC,iBAAiB,EAAA,EAAE,KAAK,CAAS;QACjEA,cAAA,CAAA,aAAA,CAAC,SAAS,IAAC,SAAS,EAAC,wCAAwC,EAAA,EAC1D,CAAC,OAAO,MACPA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EACV,SAAS,EACP,OAAO,CAAC,IAAI,KAAK;AACf,kBAAE;kBACA,wBAAwB,EAE9B,OAAO,EAAE,OAAO,EAAA,CAChB,CACH,CACS;AACX,QAAA,WAAW,KACVA,cAAA,CAAA,aAAA,CAAC,IAAI,IACH,WAAW,EAAC,GAAG,EACf,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAC,aAAa,EAAA;YAElBA,cAAA,CAAA,aAAA,CAAC,IAAI,yBAEH,SAAS,EAAC,oCAAoC,EAC9C,MAAM,EAAC,8BAA8B,EAAA,CACrC;AACD,YAAA,WAAW,CACP,CACR,CACa;AAEpB;;;;"}
|
|
@@ -50,6 +50,9 @@ export type ToggleSwitchElementProps = Omit<InputHTMLAttributes<HTMLInputElement
|
|
|
50
50
|
* When using non-string content for `label` (e.g. JSX), it must not contain
|
|
51
51
|
* interactive elements. This includes native HTML elements such as `<a>` and
|
|
52
52
|
* `<button>`, as well as Tapestry or Tapestry-React interactive components.
|
|
53
|
+
*
|
|
54
|
+
* @component
|
|
55
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-toggle-switch--docs | Storybook Documentation}
|
|
53
56
|
*/
|
|
54
57
|
export declare const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchElementProps & React.RefAttributes<HTMLInputElement>>;
|
|
55
58
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-switch/ToggleSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAE9D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1C,UAAU,qBAAqB;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,qCAAqC;IACrC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB;AAED,UAAU,4BAA6B,SAAQ,qBAAqB;IAClE,iBAAiB,CAAC,EAAE,KAAK,CAAA;IACzB,yFAAyF;IACzF,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB;;;;;;;OAOG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,UAAU,2BAA4B,SAAQ,qBAAqB;IACjE,iBAAiB,CAAC,EAAE,KAAK,CAAA;IACzB,yFAAyF;IACzF,SAAS,EAAE,IAAI,CAAA;IACf,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,8BAA+B,SAAQ,qBAAqB;IACpE,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,wDAAwD;IACxD,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,MAAM,MAAM,iBAAiB,GACzB,4BAA4B,GAC5B,2BAA2B,GAC3B,8BAA8B,CAAA;AAElC,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,GAAG,eAAe,CAChE,GACC,iBAAiB,CAAA;AAEnB
|
|
1
|
+
{"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../../src/components/toggle-switch/ToggleSwitch.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AAIpB,OAAO,KAAK,EAAE,EAAc,mBAAmB,EAAE,MAAM,OAAO,CAAA;AAE9D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAA;AAE1C,UAAU,qBAAqB;IAC7B,cAAc,CAAC,EAAE,KAAK,CAAA;IACtB,YAAY,CAAC,EAAE,KAAK,CAAA;IACpB,eAAe,CAAC,EAAE,KAAK,CAAA;IACvB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,qCAAqC;IACrC,IAAI,CAAC,EAAE,gBAAgB,CAAA;CACxB;AAED,UAAU,4BAA6B,SAAQ,qBAAqB;IAClE,iBAAiB,CAAC,EAAE,KAAK,CAAA;IACzB,yFAAyF;IACzF,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB;;;;;;;OAOG;IACH,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,UAAU,2BAA4B,SAAQ,qBAAqB;IACjE,iBAAiB,CAAC,EAAE,KAAK,CAAA;IACzB,yFAAyF;IACzF,SAAS,EAAE,IAAI,CAAA;IACf,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAA;CACd;AAED,UAAU,8BAA+B,SAAQ,qBAAqB;IACpE,iBAAiB,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,wDAAwD;IACxD,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,MAAM,MAAM,iBAAiB,GACzB,4BAA4B,GAC5B,2BAA2B,GAC3B,8BAA8B,CAAA;AAElC,MAAM,MAAM,wBAAwB,GAAG,IAAI,CACzC,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,GAAG,eAAe,CAChE,GACC,iBAAiB,CAAA;AAEnB;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,mGA0DxB,CAAA"}
|
|
@@ -12,6 +12,9 @@ import React__default, { forwardRef } from 'react';
|
|
|
12
12
|
* When using non-string content for `label` (e.g. JSX), it must not contain
|
|
13
13
|
* interactive elements. This includes native HTML elements such as `<a>` and
|
|
14
14
|
* `<button>`, as well as Tapestry or Tapestry-React interactive components.
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-toggle-switch--docs | Storybook Documentation}
|
|
15
18
|
*/
|
|
16
19
|
const ToggleSwitch = forwardRef(({ "aria-describedby": ariaDescribedby, checked, className, description, hideLabel = false, id, label, size = "md", ...restProps }, ref) => {
|
|
17
20
|
const combinedClassName = classNames("tds-toggle-switch", size && size === "sm" && `tds-toggle-switch--sm`, hideLabel && `tds-toggle-switch--hide-label`, className);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToggleSwitch.js","sources":["../../../src/components/toggle-switch/ToggleSwitch.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, InputHTMLAttributes } from \"react\"\n\nexport type ToggleSwitchSize = \"md\" | \"sm\"\n\ninterface ToggleSwitchBaseProps {\n \"aria-invalid\"?: never\n \"aria-label\"?: never\n \"aria-required\"?: never\n /** Optional description text that appears below the toggle switch label. */\n description?: string\n required?: never\n /** The size of the toggle switch. */\n size?: ToggleSwitchSize\n}\n\ninterface ToggleSwitchWithVisibleLabel extends ToggleSwitchBaseProps {\n \"aria-labelledby\"?: never\n /** When true, hides the visible label and sets it as aria-label on the input instead. */\n hideLabel?: false\n /**\n * The label content for the toggle switch. Required unless\n * `aria-labelledby` is provided to reference an external label. When\n * using non-string content (e.g. JSX), it must not contain\n * interactive elements. This includes native HTML elements such as\n * `<a>` and `<button>`, as well as Tapestry or Tapestry-React\n * interactive components.\n */\n label: React.ReactNode\n}\n\ninterface ToggleSwitchWithHiddenLabel extends ToggleSwitchBaseProps {\n \"aria-labelledby\"?: never\n /** When true, hides the visible label and sets it as aria-label on the input instead. */\n hideLabel: true\n /** Label text for the toggle switch, used as an accessible `aria-label`. */\n label: string\n}\n\ninterface ToggleSwitchWithAriaLabelledBy extends ToggleSwitchBaseProps {\n \"aria-labelledby\": string\n hideLabel?: never\n /** Not available when `aria-labelledby` is provided. */\n label?: never\n}\n\nexport type ToggleSwitchProps =\n | ToggleSwitchWithVisibleLabel\n | ToggleSwitchWithHiddenLabel\n | ToggleSwitchWithAriaLabelledBy\n\nexport type ToggleSwitchElementProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n keyof ToggleSwitchProps | \"type\" | \"required\" | \"aria-required\"\n> &\n ToggleSwitchProps\n\n/**\n * A toggle switch component that renders as a checkbox input styled as a switch.\n *\n * **Required:** You must provide either:\n * - `label` - Label content for the switch (must be a string when `hideLabel` is true)\n * - `aria-labelledby` - ID of an external element that provides the label\n *\n * When using non-string content for `label` (e.g. JSX), it must not contain\n * interactive elements. This includes native HTML elements such as `<a>` and\n * `<button>`, as well as Tapestry or Tapestry-React interactive components.\n */\nexport const ToggleSwitch = forwardRef<\n HTMLInputElement,\n ToggleSwitchElementProps\n>(\n (\n {\n \"aria-describedby\": ariaDescribedby,\n checked,\n className,\n description,\n hideLabel = false,\n id,\n label,\n size = \"md\",\n ...restProps\n }: ToggleSwitchElementProps,\n ref\n ) => {\n const combinedClassName = classNames(\n \"tds-toggle-switch\",\n size && size === \"sm\" && `tds-toggle-switch--sm`,\n hideLabel && `tds-toggle-switch--hide-label`,\n className\n )\n\n const stableId = useId()\n const toggleSwitchId = id || `tds-toggle-switch-${stableId}`\n\n return (\n <div className={combinedClassName}>\n <div className=\"tds-toggle-switch-track\" aria-hidden=\"true\"></div>\n <input\n {...restProps}\n id={toggleSwitchId}\n type=\"checkbox\"\n role=\"switch\"\n aria-checked={checked}\n aria-label={hideLabel ? (label as string) : undefined}\n aria-describedby={\n description && !hideLabel\n ? `${toggleSwitchId}-description`\n : ariaDescribedby\n }\n checked={checked}\n ref={ref}\n />\n {label && !hideLabel && <label htmlFor={toggleSwitchId}>{label}</label>}\n {description && !hideLabel && (\n <p\n id={`${toggleSwitchId}-description`}\n className=\"tds-toggle-switch-description\"\n >\n {description}\n </p>\n )}\n </div>\n )\n }\n)\n\nToggleSwitch.displayName = \"ToggleSwitch\"\n"],"names":["React"],"mappings":";;;;AA4DA
|
|
1
|
+
{"version":3,"file":"ToggleSwitch.js","sources":["../../../src/components/toggle-switch/ToggleSwitch.tsx"],"sourcesContent":["import \"./index.css\"\n\nimport { useId } from \"@utilities/useId\"\nimport classNames from \"classnames\"\nimport React, { forwardRef, InputHTMLAttributes } from \"react\"\n\nexport type ToggleSwitchSize = \"md\" | \"sm\"\n\ninterface ToggleSwitchBaseProps {\n \"aria-invalid\"?: never\n \"aria-label\"?: never\n \"aria-required\"?: never\n /** Optional description text that appears below the toggle switch label. */\n description?: string\n required?: never\n /** The size of the toggle switch. */\n size?: ToggleSwitchSize\n}\n\ninterface ToggleSwitchWithVisibleLabel extends ToggleSwitchBaseProps {\n \"aria-labelledby\"?: never\n /** When true, hides the visible label and sets it as aria-label on the input instead. */\n hideLabel?: false\n /**\n * The label content for the toggle switch. Required unless\n * `aria-labelledby` is provided to reference an external label. When\n * using non-string content (e.g. JSX), it must not contain\n * interactive elements. This includes native HTML elements such as\n * `<a>` and `<button>`, as well as Tapestry or Tapestry-React\n * interactive components.\n */\n label: React.ReactNode\n}\n\ninterface ToggleSwitchWithHiddenLabel extends ToggleSwitchBaseProps {\n \"aria-labelledby\"?: never\n /** When true, hides the visible label and sets it as aria-label on the input instead. */\n hideLabel: true\n /** Label text for the toggle switch, used as an accessible `aria-label`. */\n label: string\n}\n\ninterface ToggleSwitchWithAriaLabelledBy extends ToggleSwitchBaseProps {\n \"aria-labelledby\": string\n hideLabel?: never\n /** Not available when `aria-labelledby` is provided. */\n label?: never\n}\n\nexport type ToggleSwitchProps =\n | ToggleSwitchWithVisibleLabel\n | ToggleSwitchWithHiddenLabel\n | ToggleSwitchWithAriaLabelledBy\n\nexport type ToggleSwitchElementProps = Omit<\n InputHTMLAttributes<HTMLInputElement>,\n keyof ToggleSwitchProps | \"type\" | \"required\" | \"aria-required\"\n> &\n ToggleSwitchProps\n\n/**\n * A toggle switch component that renders as a checkbox input styled as a switch.\n *\n * **Required:** You must provide either:\n * - `label` - Label content for the switch (must be a string when `hideLabel` is true)\n * - `aria-labelledby` - ID of an external element that provides the label\n *\n * When using non-string content for `label` (e.g. JSX), it must not contain\n * interactive elements. This includes native HTML elements such as `<a>` and\n * `<button>`, as well as Tapestry or Tapestry-React interactive components.\n *\n * @component\n * @see {@link https://planningcenter.github.io/tapestry/?path=/docs/components-toggle-switch--docs | Storybook Documentation}\n */\nexport const ToggleSwitch = forwardRef<\n HTMLInputElement,\n ToggleSwitchElementProps\n>(\n (\n {\n \"aria-describedby\": ariaDescribedby,\n checked,\n className,\n description,\n hideLabel = false,\n id,\n label,\n size = \"md\",\n ...restProps\n }: ToggleSwitchElementProps,\n ref\n ) => {\n const combinedClassName = classNames(\n \"tds-toggle-switch\",\n size && size === \"sm\" && `tds-toggle-switch--sm`,\n hideLabel && `tds-toggle-switch--hide-label`,\n className\n )\n\n const stableId = useId()\n const toggleSwitchId = id || `tds-toggle-switch-${stableId}`\n\n return (\n <div className={combinedClassName}>\n <div className=\"tds-toggle-switch-track\" aria-hidden=\"true\"></div>\n <input\n {...restProps}\n id={toggleSwitchId}\n type=\"checkbox\"\n role=\"switch\"\n aria-checked={checked}\n aria-label={hideLabel ? (label as string) : undefined}\n aria-describedby={\n description && !hideLabel\n ? `${toggleSwitchId}-description`\n : ariaDescribedby\n }\n checked={checked}\n ref={ref}\n />\n {label && !hideLabel && <label htmlFor={toggleSwitchId}>{label}</label>}\n {description && !hideLabel && (\n <p\n id={`${toggleSwitchId}-description`}\n className=\"tds-toggle-switch-description\"\n >\n {description}\n </p>\n )}\n </div>\n )\n }\n)\n\nToggleSwitch.displayName = \"ToggleSwitch\"\n"],"names":["React"],"mappings":";;;;AA4DA;;;;;;;;;;;;;AAaG;AACI,MAAM,YAAY,GAAG,UAAU,CAIpC,CACE,EACE,kBAAkB,EAAE,eAAe,EACnC,OAAO,EACP,SAAS,EACT,WAAW,EACX,SAAS,GAAG,KAAK,EACjB,EAAE,EACF,KAAK,EACL,IAAI,GAAG,IAAI,EACX,GAAG,SAAS,EACa,EAC3B,GAAG,KACD;IACF,MAAM,iBAAiB,GAAG,UAAU,CAClC,mBAAmB,EACnB,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,CAAA,qBAAA,CAAuB,EAChD,SAAS,IAAI,+BAA+B,EAC5C,SAAS,CACV;AAED,IAAA,MAAM,QAAQ,GAAG,KAAK,EAAE;AACxB,IAAA,MAAM,cAAc,GAAG,EAAE,IAAI,CAAA,kBAAA,EAAqB,QAAQ,EAAE;AAE5D,IAAA,QACEA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,iBAAiB,EAAA;AAC/B,QAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,yBAAyB,EAAA,aAAA,EAAa,MAAM,EAAA,CAAO;AAClE,QAAAA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAA,GACM,SAAS,EACb,EAAE,EAAE,cAAc,EAClB,IAAI,EAAC,UAAU,EACf,IAAI,EAAC,QAAQ,EAAA,cAAA,EACC,OAAO,EAAA,YAAA,EACT,SAAS,GAAI,KAAgB,GAAG,SAAS,EAAA,kBAAA,EAEnD,WAAW,IAAI,CAAC;kBACZ,CAAA,EAAG,cAAc,CAAA,YAAA;kBACjB,eAAe,EAErB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EAAA,CACR;QACD,KAAK,IAAI,CAAC,SAAS,IAAIA,cAAA,CAAA,aAAA,CAAA,OAAA,EAAA,EAAO,OAAO,EAAE,cAAc,EAAA,EAAG,KAAK,CAAS;QACtE,WAAW,IAAI,CAAC,SAAS,KACxBA,cAAA,CAAA,aAAA,CAAA,GAAA,EAAA,EACE,EAAE,EAAE,CAAA,EAAG,cAAc,cAAc,EACnC,SAAS,EAAC,+BAA+B,EAAA,EAExC,WAAW,CACV,CACL,CACG;AAEV,CAAC;AAGH,YAAY,CAAC,WAAW,GAAG,cAAc;;;;"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { compareDate as $
|
|
3
|
-
import { dateToString as $
|
|
4
|
-
import { GregorianCalendar as $
|
|
5
|
-
import { toDate as $
|
|
6
|
-
import { _ as _class_private_field_init } from '../../../@swc/helpers/esm/_class_private_field_init.js';
|
|
1
|
+
import { constrain as $435a2ceaa8778ed8$export$c4e2ecac49351ef2, add as $435a2ceaa8778ed8$export$e16d8520af44a096, subtract as $435a2ceaa8778ed8$export$4e2d2ead65e5f7e3, set as $435a2ceaa8778ed8$export$adaa4cf7ef1b65be, cycleDate as $435a2ceaa8778ed8$export$d52ced6badfb9a4c, addZoned as $435a2ceaa8778ed8$export$96b1d28349274637, subtractZoned as $435a2ceaa8778ed8$export$6814caac34ca03c7, setZoned as $435a2ceaa8778ed8$export$31b5430eb18be4f8, cycleZoned as $435a2ceaa8778ed8$export$9a297d111fc86b79, setTime as $435a2ceaa8778ed8$export$e5d5e1c1822b6e56, cycleTime as $435a2ceaa8778ed8$export$dd02b3e0007dfe28 } from './manipulation.js';
|
|
2
|
+
import { compareDate as $ad063034c8620db8$export$68781ddf31c0090f, compareTime as $ad063034c8620db8$export$c19a80a9721b80f6 } from './queries.js';
|
|
3
|
+
import { dateToString as $58246871e4652552$export$60dfd74aa96791bd, zonedDateTimeToString as $58246871e4652552$export$bf79f1ebf4b18792, dateTimeToString as $58246871e4652552$export$4223de14708adc63 } from './string.js';
|
|
4
|
+
import { GregorianCalendar as $93635573935797de$export$80ee6245ec4f29ec } from './calendars/GregorianCalendar.js';
|
|
5
|
+
import { toDate as $d07e34cce18680fd$export$e67a095c620b86fe, zonedToDate as $d07e34cce18680fd$export$83aac07b4c37b25, toZoned as $d07e34cce18680fd$export$84c95a83c799e074, toCalendarDateTime as $d07e34cce18680fd$export$b21e0b124e224484 } from './conversion.js';
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
* Copyright 2020 Adobe. All rights reserved.
|
|
@@ -20,9 +19,8 @@ import { _ as _class_private_field_init } from '../../../@swc/helpers/esm/_class
|
|
|
20
19
|
|
|
21
20
|
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
let calendar = typeof args[0] === 'object' ? args.shift() : new ($3b62074eb05584b2$export$80ee6245ec4f29ec)();
|
|
22
|
+
function $2aaf608024c21ca1$var$shiftArgs(args) {
|
|
23
|
+
let calendar = typeof args[0] === 'object' ? args.shift() : new ($93635573935797de$export$80ee6245ec4f29ec)();
|
|
26
24
|
let era;
|
|
27
25
|
if (typeof args[0] === 'string') era = args.shift();
|
|
28
26
|
else {
|
|
@@ -40,70 +38,79 @@ function $35ea8db9cb2ccb90$var$shiftArgs(args) {
|
|
|
40
38
|
day
|
|
41
39
|
];
|
|
42
40
|
}
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
//
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
class $2aaf608024c21ca1$export$99faa760c7908e4f {
|
|
42
|
+
// This prevents TypeScript from allowing other types with the same fields to match.
|
|
43
|
+
// i.e. a ZonedDateTime should not be be passable to a parameter that expects CalendarDate.
|
|
44
|
+
// If that behavior is desired, use the AnyCalendarDate interface instead.
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
#type;
|
|
47
|
+
constructor(...args){
|
|
48
|
+
let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
|
|
49
|
+
this.calendar = calendar;
|
|
50
|
+
this.era = era;
|
|
51
|
+
this.year = year;
|
|
52
|
+
this.month = month;
|
|
53
|
+
this.day = day;
|
|
54
|
+
($435a2ceaa8778ed8$export$c4e2ecac49351ef2)(this);
|
|
55
|
+
}
|
|
49
56
|
/** Returns a copy of this date. */ copy() {
|
|
50
|
-
if (this.era) return new $
|
|
51
|
-
else return new $
|
|
57
|
+
if (this.era) return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.era, this.year, this.month, this.day);
|
|
58
|
+
else return new $2aaf608024c21ca1$export$99faa760c7908e4f(this.calendar, this.year, this.month, this.day);
|
|
52
59
|
}
|
|
53
60
|
/** Returns a new `CalendarDate` with the given duration added to it. */ add(duration) {
|
|
54
|
-
return ($
|
|
61
|
+
return ($435a2ceaa8778ed8$export$e16d8520af44a096)(this, duration);
|
|
55
62
|
}
|
|
56
63
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */ subtract(duration) {
|
|
57
|
-
return ($
|
|
64
|
+
return ($435a2ceaa8778ed8$export$4e2d2ead65e5f7e3)(this, duration);
|
|
58
65
|
}
|
|
59
66
|
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
60
|
-
return ($
|
|
67
|
+
return ($435a2ceaa8778ed8$export$adaa4cf7ef1b65be)(this, fields);
|
|
61
68
|
}
|
|
62
69
|
/**
|
|
63
70
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
64
71
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
65
72
|
*/ cycle(field, amount, options) {
|
|
66
|
-
return ($
|
|
73
|
+
return ($435a2ceaa8778ed8$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
67
74
|
}
|
|
68
75
|
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ toDate(timeZone) {
|
|
69
|
-
return ($
|
|
76
|
+
return ($d07e34cce18680fd$export$e67a095c620b86fe)(this, timeZone);
|
|
70
77
|
}
|
|
71
78
|
/** Converts the date to an ISO 8601 formatted string. */ toString() {
|
|
72
|
-
return ($
|
|
79
|
+
return ($58246871e4652552$export$60dfd74aa96791bd)(this);
|
|
73
80
|
}
|
|
74
81
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
75
|
-
return ($
|
|
82
|
+
return ($ad063034c8620db8$export$68781ddf31c0090f)(this, b);
|
|
76
83
|
}
|
|
84
|
+
}
|
|
85
|
+
class $2aaf608024c21ca1$export$ca871e8dbb80966f {
|
|
86
|
+
// This prevents TypeScript from allowing other types with the same fields to match.
|
|
87
|
+
// @ts-ignore
|
|
88
|
+
#type;
|
|
77
89
|
constructor(...args){
|
|
78
|
-
|
|
79
|
-
writable: true,
|
|
80
|
-
value: void 0
|
|
81
|
-
});
|
|
82
|
-
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
90
|
+
let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
|
|
83
91
|
this.calendar = calendar;
|
|
84
92
|
this.era = era;
|
|
85
93
|
this.year = year;
|
|
86
94
|
this.month = month;
|
|
87
95
|
this.day = day;
|
|
88
|
-
(
|
|
96
|
+
this.hour = args.shift() || 0;
|
|
97
|
+
this.minute = args.shift() || 0;
|
|
98
|
+
this.second = args.shift() || 0;
|
|
99
|
+
this.millisecond = args.shift() || 0;
|
|
100
|
+
($435a2ceaa8778ed8$export$c4e2ecac49351ef2)(this);
|
|
89
101
|
}
|
|
90
|
-
}
|
|
91
|
-
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
92
|
-
// @ts-ignore
|
|
93
|
-
$35ea8db9cb2ccb90$var$_type2 = /*#__PURE__*/ new WeakMap();
|
|
94
|
-
class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
|
|
95
102
|
/** Returns a copy of this date. */ copy() {
|
|
96
|
-
if (this.era) return new $
|
|
97
|
-
else return new $
|
|
103
|
+
if (this.era) return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
104
|
+
else return new $2aaf608024c21ca1$export$ca871e8dbb80966f(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
98
105
|
}
|
|
99
106
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */ add(duration) {
|
|
100
|
-
return ($
|
|
107
|
+
return ($435a2ceaa8778ed8$export$e16d8520af44a096)(this, duration);
|
|
101
108
|
}
|
|
102
109
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */ subtract(duration) {
|
|
103
|
-
return ($
|
|
110
|
+
return ($435a2ceaa8778ed8$export$4e2d2ead65e5f7e3)(this, duration);
|
|
104
111
|
}
|
|
105
112
|
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields) {
|
|
106
|
-
return ($
|
|
113
|
+
return ($435a2ceaa8778ed8$export$adaa4cf7ef1b65be)(($435a2ceaa8778ed8$export$e5d5e1c1822b6e56)(this, fields), fields);
|
|
107
114
|
}
|
|
108
115
|
/**
|
|
109
116
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -114,98 +121,77 @@ class $35ea8db9cb2ccb90$export$ca871e8dbb80966f {
|
|
|
114
121
|
case 'year':
|
|
115
122
|
case 'month':
|
|
116
123
|
case 'day':
|
|
117
|
-
return ($
|
|
124
|
+
return ($435a2ceaa8778ed8$export$d52ced6badfb9a4c)(this, field, amount, options);
|
|
118
125
|
default:
|
|
119
|
-
return ($
|
|
126
|
+
return ($435a2ceaa8778ed8$export$dd02b3e0007dfe28)(this, field, amount, options);
|
|
120
127
|
}
|
|
121
128
|
}
|
|
122
129
|
/** Converts the date to a native JavaScript Date object in the given time zone. */ toDate(timeZone, disambiguation) {
|
|
123
|
-
return ($
|
|
130
|
+
return ($d07e34cce18680fd$export$e67a095c620b86fe)(this, timeZone, disambiguation);
|
|
124
131
|
}
|
|
125
132
|
/** Converts the date to an ISO 8601 formatted string. */ toString() {
|
|
126
|
-
return ($
|
|
133
|
+
return ($58246871e4652552$export$4223de14708adc63)(this);
|
|
127
134
|
}
|
|
128
135
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
129
|
-
let res = ($
|
|
130
|
-
if (res === 0) return ($
|
|
136
|
+
let res = ($ad063034c8620db8$export$68781ddf31c0090f)(this, b);
|
|
137
|
+
if (res === 0) return ($ad063034c8620db8$export$c19a80a9721b80f6)(this, ($d07e34cce18680fd$export$b21e0b124e224484)(b));
|
|
131
138
|
return res;
|
|
132
139
|
}
|
|
140
|
+
}
|
|
141
|
+
class $2aaf608024c21ca1$export$d3b7288e7994edea {
|
|
142
|
+
// This prevents TypeScript from allowing other types with the same fields to match.
|
|
143
|
+
// @ts-ignore
|
|
144
|
+
#type;
|
|
133
145
|
constructor(...args){
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
});
|
|
138
|
-
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
146
|
+
let [calendar, era, year, month, day] = $2aaf608024c21ca1$var$shiftArgs(args);
|
|
147
|
+
let timeZone = args.shift();
|
|
148
|
+
let offset = args.shift();
|
|
139
149
|
this.calendar = calendar;
|
|
140
150
|
this.era = era;
|
|
141
151
|
this.year = year;
|
|
142
152
|
this.month = month;
|
|
143
153
|
this.day = day;
|
|
154
|
+
this.timeZone = timeZone;
|
|
155
|
+
this.offset = offset;
|
|
144
156
|
this.hour = args.shift() || 0;
|
|
145
157
|
this.minute = args.shift() || 0;
|
|
146
158
|
this.second = args.shift() || 0;
|
|
147
159
|
this.millisecond = args.shift() || 0;
|
|
148
|
-
($
|
|
160
|
+
($435a2ceaa8778ed8$export$c4e2ecac49351ef2)(this);
|
|
149
161
|
}
|
|
150
|
-
}
|
|
151
|
-
var // This prevents TypeScript from allowing other types with the same fields to match.
|
|
152
|
-
// @ts-ignore
|
|
153
|
-
$35ea8db9cb2ccb90$var$_type3 = /*#__PURE__*/ new WeakMap();
|
|
154
|
-
class $35ea8db9cb2ccb90$export$d3b7288e7994edea {
|
|
155
162
|
/** Returns a copy of this date. */ copy() {
|
|
156
|
-
if (this.era) return new $
|
|
157
|
-
else return new $
|
|
163
|
+
if (this.era) return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.era, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
164
|
+
else return new $2aaf608024c21ca1$export$d3b7288e7994edea(this.calendar, this.year, this.month, this.day, this.timeZone, this.offset, this.hour, this.minute, this.second, this.millisecond);
|
|
158
165
|
}
|
|
159
166
|
/** Returns a new `ZonedDateTime` with the given duration added to it. */ add(duration) {
|
|
160
|
-
return ($
|
|
167
|
+
return ($435a2ceaa8778ed8$export$96b1d28349274637)(this, duration);
|
|
161
168
|
}
|
|
162
169
|
/** Returns a new `ZonedDateTime` with the given duration subtracted from it. */ subtract(duration) {
|
|
163
|
-
return ($
|
|
170
|
+
return ($435a2ceaa8778ed8$export$6814caac34ca03c7)(this, duration);
|
|
164
171
|
}
|
|
165
172
|
/** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ set(fields, disambiguation) {
|
|
166
|
-
return ($
|
|
173
|
+
return ($435a2ceaa8778ed8$export$31b5430eb18be4f8)(this, fields, disambiguation);
|
|
167
174
|
}
|
|
168
175
|
/**
|
|
169
176
|
* Returns a new `ZonedDateTime` with the given field adjusted by a specified amount.
|
|
170
177
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
171
178
|
*/ cycle(field, amount, options) {
|
|
172
|
-
return ($
|
|
179
|
+
return ($435a2ceaa8778ed8$export$9a297d111fc86b79)(this, field, amount, options);
|
|
173
180
|
}
|
|
174
181
|
/** Converts the date to a native JavaScript Date object. */ toDate() {
|
|
175
|
-
return ($
|
|
182
|
+
return ($d07e34cce18680fd$export$83aac07b4c37b25)(this);
|
|
176
183
|
}
|
|
177
184
|
/** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */ toString() {
|
|
178
|
-
return ($
|
|
185
|
+
return ($58246871e4652552$export$bf79f1ebf4b18792)(this);
|
|
179
186
|
}
|
|
180
187
|
/** Converts the date to an ISO 8601 formatted string in UTC. */ toAbsoluteString() {
|
|
181
188
|
return this.toDate().toISOString();
|
|
182
189
|
}
|
|
183
190
|
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ compare(b) {
|
|
184
191
|
// TODO: Is this a bad idea??
|
|
185
|
-
return this.toDate().getTime() - ($
|
|
186
|
-
}
|
|
187
|
-
constructor(...args){
|
|
188
|
-
(_class_private_field_init)(this, $35ea8db9cb2ccb90$var$_type3, {
|
|
189
|
-
writable: true,
|
|
190
|
-
value: void 0
|
|
191
|
-
});
|
|
192
|
-
let [calendar, era, year, month, day] = $35ea8db9cb2ccb90$var$shiftArgs(args);
|
|
193
|
-
let timeZone = args.shift();
|
|
194
|
-
let offset = args.shift();
|
|
195
|
-
this.calendar = calendar;
|
|
196
|
-
this.era = era;
|
|
197
|
-
this.year = year;
|
|
198
|
-
this.month = month;
|
|
199
|
-
this.day = day;
|
|
200
|
-
this.timeZone = timeZone;
|
|
201
|
-
this.offset = offset;
|
|
202
|
-
this.hour = args.shift() || 0;
|
|
203
|
-
this.minute = args.shift() || 0;
|
|
204
|
-
this.second = args.shift() || 0;
|
|
205
|
-
this.millisecond = args.shift() || 0;
|
|
206
|
-
($735220c2d4774dd3$export$c4e2ecac49351ef2)(this);
|
|
192
|
+
return this.toDate().getTime() - ($d07e34cce18680fd$export$84c95a83c799e074)(b, this.timeZone).toDate().getTime();
|
|
207
193
|
}
|
|
208
194
|
}
|
|
209
195
|
|
|
210
|
-
export { $
|
|
196
|
+
export { $2aaf608024c21ca1$export$99faa760c7908e4f as CalendarDate, $2aaf608024c21ca1$export$ca871e8dbb80966f as CalendarDateTime, $2aaf608024c21ca1$export$d3b7288e7994edea as ZonedDateTime };
|
|
211
197
|
//# sourceMappingURL=CalendarDate.js.map
|