@jobber/components 8.1.0 → 8.2.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/InputNumber/InputNumber.d.ts +1 -12
- package/dist/InputNumber/{InputNumber.rebuilt.types.d.ts → InputNumber.types.d.ts} +2 -3
- package/dist/InputNumber/index.cjs +9 -5076
- package/dist/InputNumber/index.d.ts +2 -11
- package/dist/InputNumber/index.mjs +8 -5079
- package/dist/InputNumber-cjs.js +5004 -0
- package/dist/InputNumber-es.js +5002 -0
- package/dist/docs/Countdown/Countdown.md +0 -1
- package/dist/docs/InputNumber/InputNumber.md +40 -36
- package/dist/docs/index.md +0 -1
- package/dist/index.cjs +2 -4
- package/dist/index.d.mts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.mjs +1 -2
- package/dist/styles.css +47 -47
- package/dist/utils/meta/meta.json +0 -1
- package/package.json +2 -7
- package/FormatTime.d.ts +0 -1
- package/FormatTime.js +0 -17
- package/dist/FormatTime/FormatTime.d.ts +0 -15
- package/dist/FormatTime/index.cjs +0 -8
- package/dist/FormatTime/index.d.ts +0 -1
- package/dist/FormatTime/index.mjs +0 -2
- package/dist/FormatTime-cjs.js +0 -24
- package/dist/FormatTime-es.js +0 -22
- package/dist/InputNumber/InputNumber.rebuilt.d.ts +0 -7
- package/dist/docs/FormatTime/FormatTime.md +0 -32
|
@@ -33,7 +33,6 @@ decision on whether to show or hide the units.
|
|
|
33
33
|
|
|
34
34
|
* To display a unit of time that has already passed, use
|
|
35
35
|
[FormatRelativeDateTime](../FormatRelativeDateTime/FormatRelativeDateTime.md)
|
|
36
|
-
* To display time as a static unit, use [FormatTime](../FormatTime/FormatTime.md)
|
|
37
36
|
|
|
38
37
|
|
|
39
38
|
## Props
|
|
@@ -17,17 +17,6 @@ InputNumber does not show a clear button. The component enforces
|
|
|
17
17
|
`clearable="never"` to align with numeric, increment/decrement-focused usage.
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
## Configuration
|
|
21
|
-
|
|
22
|
-
## Using onValidation
|
|
23
|
-
|
|
24
|
-
If you need to capture the error message and render it outside of the component.
|
|
25
|
-
Read the [InputValidation](../InputValidation/InputValidation.md) documentation.
|
|
26
|
-
|
|
27
|
-
For more details about `validation` using `Input` components, see the
|
|
28
|
-
[InputText](../InputText/InputText.md) documentation.
|
|
29
|
-
|
|
30
|
-
|
|
31
20
|
## Props
|
|
32
21
|
|
|
33
22
|
### Web
|
|
@@ -35,33 +24,48 @@ For more details about `validation` using `Input` components, see the
|
|
|
35
24
|
| Prop | Type | Required | Default | Description |
|
|
36
25
|
|------|------|----------|---------|-------------|
|
|
37
26
|
| `align` | `"center" | "right"` | No | — | Determines the alignment of the text inside the input. |
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
27
|
+
| `aria-activedescendant` | `string` | No | — | ID of the currently active descendant element. Used for composite widgets like combobox or listbox. @see {@link https... |
|
|
28
|
+
| `aria-autocomplete` | `"both" | "inline" | "list" | "none"` | No | — | Indicates the type of autocomplete interaction. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-autocomplete} |
|
|
29
|
+
| `aria-controls` | `string` | No | — | Indicates the element that controls the current element. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-controls} |
|
|
30
|
+
| `aria-describedby` | `string` | No | — | Identifies the element (or elements) that describes the object. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-... |
|
|
31
|
+
| `aria-details` | `string` | No | — | Identifies the element (or elements) that provide a detailed, extended description. @see {@link https://www.w3.org/TR... |
|
|
32
|
+
| `aria-expanded` | `Booleanish` | No | — | Indicates whether the element is expanded or collapsed. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-expanded} |
|
|
33
|
+
| `aria-label` | `string` | No | — | Defines a string value that labels the current element. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-label} |
|
|
34
|
+
| `aria-labelledby` | `string` | No | — | Identifies the element (or elements) that labels the current element. @see {@link https://www.w3.org/TR/wai-aria-1.2/... |
|
|
35
|
+
| `aria-required` | `Booleanish` | No | — | Indicates that user input is required before form submission. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-re... |
|
|
36
|
+
| `autoComplete` | `string` | No | — | Autocomplete behavior for the input (React casing, string values only). Use standard HTML autocomplete values or "on"... |
|
|
37
|
+
| `autoFocus` | `boolean` | No | — | Whether the input should be auto-focused (React casing). |
|
|
38
|
+
| `defaultValue` | `number` | No | — | |
|
|
41
39
|
| `description` | `ReactNode` | No | — | Further description of the input, can be used for a hint. |
|
|
42
|
-
| `disabled` | `boolean` | No | — |
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
40
|
+
| `disabled` | `boolean` | No | — | Whether the input is disabled. |
|
|
41
|
+
| `error` | `string` | No | — | Error message to display. This also highlights the field red. |
|
|
42
|
+
| `formatOptions` | `NumberFormatOptions` | No | — | |
|
|
43
|
+
| `id` | `string` | No | — | The unique identifier for the input element. |
|
|
44
|
+
| `inline` | `boolean` | No | — | Adjusts the form field to go inline with content. |
|
|
45
|
+
| `inputMode` | `"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url"` | No | — | Input mode hint for virtual keyboards. |
|
|
46
46
|
| `invalid` | `boolean` | No | — | Highlights the field red to indicate an error. |
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
47
|
+
| `loading` | `boolean` | No | — | Show a spinner to indicate loading. |
|
|
48
|
+
| `maxLength` | `number` | No | — | Maximum number of characters allowed in the input. |
|
|
49
|
+
| `maxValue` | `number` | No | — | |
|
|
50
|
+
| `minValue` | `number` | No | — | |
|
|
51
|
+
| `name` | `string` | No | — | The name attribute for the input element. |
|
|
52
|
+
| `onBlur` | `(event: FocusEvent<HTMLInputElement, Element>) => void` | No | — | Blur event handler. |
|
|
53
|
+
| `onChange` | `(newValue: number, event?: ChangeEvent<HTMLInputElement>) => void` | No | — | Callback for value changes. @param newValue - The new numeric value @param event - Optional change event |
|
|
54
|
+
| `onClick` | `(event: MouseEvent<HTMLInputElement, MouseEvent>) => void` | No | — | Click event handler. |
|
|
55
|
+
| `onFocus` | `(event: FocusEvent<HTMLInputElement, Element>) => void` | No | — | Focus event handler. |
|
|
56
|
+
| `onKeyDown` | `(event: KeyboardEvent<HTMLInputElement>) => void` | No | — | Key down event handler. |
|
|
57
|
+
| `onKeyUp` | `(event: KeyboardEvent<HTMLInputElement>) => void` | No | — | Key up event handler. |
|
|
58
|
+
| `onMouseDown` | `(event: MouseEvent<HTMLInputElement, MouseEvent>) => void` | No | — | Mouse down event handler. |
|
|
59
|
+
| `onMouseUp` | `(event: MouseEvent<HTMLInputElement, MouseEvent>) => void` | No | — | Mouse up event handler. |
|
|
60
|
+
| `onPointerDown` | `(event: PointerEvent<HTMLInputElement>) => void` | No | — | Pointer down event handler. |
|
|
61
|
+
| `onPointerUp` | `(event: PointerEvent<HTMLInputElement>) => void` | No | — | Pointer up event handler. |
|
|
62
|
+
| `pattern` | `string` | No | — | Validation pattern (regex) for the input. |
|
|
58
63
|
| `placeholder` | `string` | No | — | Text that appears inside the input when empty and floats above the value as a mini label once the user enters a value... |
|
|
59
|
-
| `
|
|
60
|
-
| `readonly` | `boolean` | No | — | Prevents users from editing the value. |
|
|
64
|
+
| `readOnly` | `boolean` | No | — | Whether the input is read-only (HTML standard casing). |
|
|
61
65
|
| `ref` | `Ref<InputNumberRef>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
62
|
-
| `
|
|
66
|
+
| `required` | `boolean` | No | — | Whether the input is required before form submission. |
|
|
67
|
+
| `role` | `string` | No | — | Role attribute for accessibility. |
|
|
68
|
+
| `showMiniLabel` | `boolean` | No | — | |
|
|
63
69
|
| `size` | `"large" | "small"` | No | — | Adjusts the interface to either have small or large spacing. |
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `value` | `number` | No | — | Set the component to the given value. |
|
|
67
|
-
| `version` | `1` | No | — | Experimental: Determine which version of the FormField to use. |
|
|
70
|
+
| `tabIndex` | `number` | No | — | Tab index for keyboard navigation. |
|
|
71
|
+
| `value` | `number` | No | — | |
|
package/dist/docs/index.md
CHANGED
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
[Form](./Form/Form.md)
|
|
45
45
|
[FormatFile](./FormatFile/FormatFile.md)
|
|
46
46
|
[FormatRelativeDateTime](./FormatRelativeDateTime/FormatRelativeDateTime.md)
|
|
47
|
-
[FormatTime](./FormatTime/FormatTime.md)
|
|
48
47
|
[FormField](./FormField/FormField.md)
|
|
49
48
|
[Frame](./Frame/Frame.md)
|
|
50
49
|
[Gallery](./Gallery/Gallery.md)
|
package/dist/index.cjs
CHANGED
|
@@ -47,7 +47,6 @@ var useAtlantisFormFieldName = require('./useAtlantisFormFieldName-cjs.js');
|
|
|
47
47
|
var FormFieldWrapper = require('./FormFieldWrapper-cjs.js');
|
|
48
48
|
var FormatFile = require('./FormatFile-cjs.js');
|
|
49
49
|
var FormatRelativeDateTime = require('./FormatRelativeDateTime-cjs.js');
|
|
50
|
-
var FormatTime = require('./FormatTime-cjs.js');
|
|
51
50
|
var Frame = require('./Frame-cjs.js');
|
|
52
51
|
var Gallery = require('./Gallery-cjs.js');
|
|
53
52
|
var Glimmer = require('./Glimmer-cjs.js');
|
|
@@ -59,7 +58,7 @@ var InputDate = require('./InputDate-cjs.js');
|
|
|
59
58
|
var InputEmail = require('./InputEmail-cjs.js');
|
|
60
59
|
var InputFile = require('./InputFile-cjs.js');
|
|
61
60
|
var InputGroup = require('./InputGroup-cjs.js');
|
|
62
|
-
var
|
|
61
|
+
var InputNumber = require('./InputNumber-cjs.js');
|
|
63
62
|
var InputPassword = require('./InputPassword-cjs.js');
|
|
64
63
|
var InputPhoneNumber = require('./InputPhoneNumber-cjs.js');
|
|
65
64
|
var InputText_index = require('./InputText/index.cjs');
|
|
@@ -275,7 +274,6 @@ exports.FormatFile = FormatFile.FormatFile;
|
|
|
275
274
|
exports.useFormatFile = FormatFile.useFormatFile;
|
|
276
275
|
exports.useFormatFileStyles = FormatFile.useFormatFileStyles;
|
|
277
276
|
exports.FormatRelativeDateTime = FormatRelativeDateTime.FormatRelativeDateTime;
|
|
278
|
-
exports.FormatTime = FormatTime.FormatTime;
|
|
279
277
|
exports.Frame = Frame.Frame;
|
|
280
278
|
exports.Gallery = Gallery.Gallery;
|
|
281
279
|
exports.GLIMMER_TEST_ID = Glimmer.GLIMMER_TEST_ID;
|
|
@@ -299,7 +297,7 @@ exports.mimeTypeToReadable = InputFile.mimeTypeToReadable;
|
|
|
299
297
|
exports.updateFiles = InputFile.updateFiles;
|
|
300
298
|
exports.useInputFileContentContext = InputFile.useInputFileContentContext;
|
|
301
299
|
exports.InputGroup = InputGroup.InputGroup;
|
|
302
|
-
exports.InputNumber =
|
|
300
|
+
exports.InputNumber = InputNumber.InputNumber;
|
|
303
301
|
exports.InputPassword = InputPassword.InputPassword;
|
|
304
302
|
exports.InputPhoneNumber = InputPhoneNumber.InputPhoneNumber;
|
|
305
303
|
exports.InputText = InputText_index.InputText;
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -45,7 +45,6 @@ export { u as useAtlantisFormFieldName } from './useAtlantisFormFieldName-es.js'
|
|
|
45
45
|
export { A as AffixIcon, f as AffixLabel, F as FormFieldInputHorizontalWrapper, a as FormFieldInputWrapperStyles, b as FormFieldLabel, c as FormFieldWrapper, d as FormFieldWrapperMain, e as FormFieldWrapperToolbar, u as useFormFieldWrapperStyles } from './FormFieldWrapper-es.js';
|
|
46
46
|
export { F as FormatFile, u as useFormatFile, a as useFormatFileStyles } from './FormatFile-es.js';
|
|
47
47
|
export { F as FormatRelativeDateTime } from './FormatRelativeDateTime-es.js';
|
|
48
|
-
export { F as FormatTime } from './FormatTime-es.js';
|
|
49
48
|
export { F as Frame } from './Frame-es.js';
|
|
50
49
|
export { G as Gallery } from './Gallery-es.js';
|
|
51
50
|
export { a as GLIMMER_TEST_ID, G as Glimmer } from './Glimmer-es.js';
|
|
@@ -57,7 +56,7 @@ export { I as InputDate } from './InputDate-es.js';
|
|
|
57
56
|
export { I as InputEmail } from './InputEmail-es.js';
|
|
58
57
|
export { F as FileTypes, I as InputFile, a as InputFileContentContext, c as convertToMimeTypes, f as formatMimeTypes, m as mimeTypeToReadable, u as updateFiles, b as useInputFileContentContext } from './InputFile-es.js';
|
|
59
58
|
export { I as InputGroup } from './InputGroup-es.js';
|
|
60
|
-
export { InputNumber } from './InputNumber
|
|
59
|
+
export { I as InputNumber } from './InputNumber-es.js';
|
|
61
60
|
export { I as InputPassword } from './InputPassword-es.js';
|
|
62
61
|
export { I as InputPhoneNumber } from './InputPhoneNumber-es.js';
|
|
63
62
|
export { InputText } from './InputText/index.mjs';
|
package/dist/styles.css
CHANGED
|
@@ -10533,14 +10533,14 @@ html.atlantisLightBoxActive {
|
|
|
10533
10533
|
--public-field--bottom-left-radius: var(--radius-base);
|
|
10534
10534
|
--public-field--bottom-right-radius: var(--radius-base);
|
|
10535
10535
|
}
|
|
10536
|
-
|
|
10536
|
+
.-W4QiocGsR4- {
|
|
10537
10537
|
width: 100%;
|
|
10538
10538
|
}
|
|
10539
|
-
.
|
|
10539
|
+
._9-f2CjSVojs- {
|
|
10540
10540
|
display: inline-block;
|
|
10541
10541
|
width: auto;
|
|
10542
10542
|
}
|
|
10543
|
-
.
|
|
10543
|
+
._4y342TRP-y8- {
|
|
10544
10544
|
--field--placeholder-color: var(--color-base-blue--600);
|
|
10545
10545
|
--field--value-color: var(--color-heading);
|
|
10546
10546
|
--field--border-color: var(--color-border--interactive);
|
|
@@ -10593,43 +10593,43 @@ html.atlantisLightBoxActive {
|
|
|
10593
10593
|
background-color: rgba(255, 255, 255, 1);
|
|
10594
10594
|
background-color: var(--field--background-color);
|
|
10595
10595
|
}
|
|
10596
|
-
.
|
|
10596
|
+
._4y342TRP-y8- * {
|
|
10597
10597
|
box-sizing: border-box;
|
|
10598
10598
|
}
|
|
10599
|
-
.
|
|
10599
|
+
._4y342TRP-y8-:focus-within {
|
|
10600
10600
|
position: relative;
|
|
10601
10601
|
z-index: var(--field--base-elevation);
|
|
10602
10602
|
box-shadow: 0px 0px 0px 2px rgba(255, 255, 255, 1), 0px 0px 0px 4px hsl(198, 12%, 57%);
|
|
10603
10603
|
box-shadow: var(--shadow-focus);
|
|
10604
10604
|
}
|
|
10605
|
-
|
|
10605
|
+
.-bawhitao74- {
|
|
10606
10606
|
display: -ms-flexbox;
|
|
10607
10607
|
display: flex;
|
|
10608
10608
|
height: var(--field--height);
|
|
10609
10609
|
-ms-flex: 1;
|
|
10610
10610
|
flex: 1;
|
|
10611
10611
|
}
|
|
10612
|
-
.
|
|
10613
|
-
.
|
|
10612
|
+
._0ihSRVfrcGo-,
|
|
10613
|
+
._0ihSRVfrcGo-:focus-within {
|
|
10614
10614
|
--field--border-color: var(--color-critical);
|
|
10615
10615
|
position: relative;
|
|
10616
10616
|
}
|
|
10617
|
-
.
|
|
10617
|
+
.d-YOq6z4ZxM- {
|
|
10618
10618
|
--field--placeholder-color: var(--color-disabled);
|
|
10619
10619
|
--field--value-color: var(--color-disabled);
|
|
10620
10620
|
--field--background-color: var(--color-disabled--secondary);
|
|
10621
10621
|
--field--border-color: var(--color-border);
|
|
10622
10622
|
}
|
|
10623
10623
|
/* override iOS default styling for disabled input */
|
|
10624
|
-
.
|
|
10624
|
+
.d-YOq6z4ZxM- :disabled {
|
|
10625
10625
|
-webkit-text-fill-color: var(--field--value-color);
|
|
10626
10626
|
opacity: 1;
|
|
10627
10627
|
}
|
|
10628
|
-
.
|
|
10628
|
+
.buIzMqBEpSQ- {
|
|
10629
10629
|
margin-top: 4px;
|
|
10630
10630
|
margin-top: var(--space-smaller);
|
|
10631
10631
|
}
|
|
10632
|
-
.
|
|
10632
|
+
.pY0cqJVnma0- {
|
|
10633
10633
|
-ms-flex-align: center;
|
|
10634
10634
|
align-items: center;
|
|
10635
10635
|
display: -ms-flexbox;
|
|
@@ -10640,7 +10640,7 @@ html.atlantisLightBoxActive {
|
|
|
10640
10640
|
padding: var(--space-smaller);
|
|
10641
10641
|
padding-left: 0;
|
|
10642
10642
|
}
|
|
10643
|
-
.
|
|
10643
|
+
.YTL0AyJdbC8- {
|
|
10644
10644
|
--field--padding-left: calc(var(--space-base) - var(--space-smaller));
|
|
10645
10645
|
--field--padding-right: calc(var(--space-base) - var(--space-smaller));
|
|
10646
10646
|
--field--padding-top: var(--space-small);
|
|
@@ -10648,22 +10648,22 @@ html.atlantisLightBoxActive {
|
|
|
10648
10648
|
--field--height: calc(var(--space-larger) + var(--space-smaller));
|
|
10649
10649
|
--postfix-right: calc(var(--space-small) + var(--space-smaller));
|
|
10650
10650
|
}
|
|
10651
|
-
.
|
|
10651
|
+
.mUfanIovnVg- {
|
|
10652
10652
|
--field--padding-left: var(--space-large);
|
|
10653
10653
|
--field--padding-right: var(--space-large);
|
|
10654
10654
|
--field--height: calc(var(--space-extravagant));
|
|
10655
10655
|
--postfix-right: var(--space-large);
|
|
10656
10656
|
}
|
|
10657
|
-
.
|
|
10657
|
+
._8MM9keFOeD0- {
|
|
10658
10658
|
--field--textAlign: center;
|
|
10659
10659
|
}
|
|
10660
|
-
.
|
|
10660
|
+
.mTeuCQufdj4- {
|
|
10661
10661
|
--field--textAlign: right;
|
|
10662
10662
|
}
|
|
10663
10663
|
/**
|
|
10664
10664
|
* Input Wrapper
|
|
10665
10665
|
**/
|
|
10666
|
-
.
|
|
10666
|
+
.IgE0pfetwVM- {
|
|
10667
10667
|
display: -ms-flexbox;
|
|
10668
10668
|
display: flex;
|
|
10669
10669
|
-ms-flex: 1;
|
|
@@ -10673,7 +10673,7 @@ html.atlantisLightBoxActive {
|
|
|
10673
10673
|
z-index: 0;
|
|
10674
10674
|
z-index: var(--elevation-default);
|
|
10675
10675
|
}
|
|
10676
|
-
.
|
|
10676
|
+
.H-GDJPTnTJs- {
|
|
10677
10677
|
position: relative;
|
|
10678
10678
|
-ms-flex: 1;
|
|
10679
10679
|
flex: 1;
|
|
@@ -10681,7 +10681,7 @@ html.atlantisLightBoxActive {
|
|
|
10681
10681
|
/**
|
|
10682
10682
|
* Input
|
|
10683
10683
|
**/
|
|
10684
|
-
.
|
|
10684
|
+
.MxShJMNKSB4- {
|
|
10685
10685
|
position: relative;
|
|
10686
10686
|
z-index: var(--field--base-elevation);
|
|
10687
10687
|
width: 100%;
|
|
@@ -10701,7 +10701,7 @@ html.atlantisLightBoxActive {
|
|
|
10701
10701
|
-webkit-appearance: none;
|
|
10702
10702
|
appearance: none;
|
|
10703
10703
|
}
|
|
10704
|
-
.
|
|
10704
|
+
.MxShJMNKSB4-:focus {
|
|
10705
10705
|
outline: none;
|
|
10706
10706
|
}
|
|
10707
10707
|
/* DO WE NEED TO SUPPORT AUTOFILL FOR INPUT NUMBER?? */
|
|
@@ -10714,7 +10714,7 @@ html.atlantisLightBoxActive {
|
|
|
10714
10714
|
/**
|
|
10715
10715
|
* Label
|
|
10716
10716
|
**/
|
|
10717
|
-
.
|
|
10717
|
+
.f1OiicY3UzU- {
|
|
10718
10718
|
position: absolute;
|
|
10719
10719
|
top: var(--field--placeholder-offset);
|
|
10720
10720
|
z-index: var(--field--label-elevation);
|
|
@@ -10732,7 +10732,7 @@ html.atlantisLightBoxActive {
|
|
|
10732
10732
|
transform: translateY(var(--field--placeholder-transform));
|
|
10733
10733
|
}
|
|
10734
10734
|
/* When not hiding the label, animate the transition to the miniLabel */
|
|
10735
|
-
.
|
|
10735
|
+
.IgE0pfetwVM-:not(.j9oUhNvNwsE-) .f1OiicY3UzU- {
|
|
10736
10736
|
transition: all 100ms;
|
|
10737
10737
|
transition: all var(--timing-quick);
|
|
10738
10738
|
}
|
|
@@ -10742,8 +10742,8 @@ html.atlantisLightBoxActive {
|
|
|
10742
10742
|
* label becomes "miniLabel": small and above field value
|
|
10743
10743
|
* unless inputWrapper is small
|
|
10744
10744
|
*/
|
|
10745
|
-
.
|
|
10746
|
-
.
|
|
10745
|
+
.IgE0pfetwVM-:not(.YTL0AyJdbC8-):not(.j9oUhNvNwsE-):has(
|
|
10746
|
+
.MxShJMNKSB4-:not(:-ms-input-placeholder) + .f1OiicY3UzU-:not(:empty)
|
|
10747
10747
|
) {
|
|
10748
10748
|
--field--placeholder-color: var(--color-text--secondary);
|
|
10749
10749
|
--field--placeholder-offset: var(--space-smallest);
|
|
@@ -10760,20 +10760,20 @@ html.atlantisLightBoxActive {
|
|
|
10760
10760
|
--field--padding-top: calc(var(--space-base) + var(--space-smaller));
|
|
10761
10761
|
--field--padding-bottom: var(--space-small);
|
|
10762
10762
|
}
|
|
10763
|
-
.
|
|
10764
|
-
.
|
|
10763
|
+
.IgE0pfetwVM-:not(.YTL0AyJdbC8-):not(.j9oUhNvNwsE-):has(
|
|
10764
|
+
.MxShJMNKSB4-:not(:placeholder-shown) + .f1OiicY3UzU-:not(:empty)
|
|
10765
10765
|
),
|
|
10766
|
-
.
|
|
10766
|
+
.IgE0pfetwVM-:not(.YTL0AyJdbC8-):not(.j9oUhNvNwsE-):has(.MxShJMNKSB4-:focus + .f1OiicY3UzU-:not(:empty)) {
|
|
10767
10767
|
--field--placeholder-color: var(--color-text--secondary);
|
|
10768
10768
|
--field--placeholder-offset: var(--space-smallest);
|
|
10769
10769
|
--field--placeholder-transform: 0;
|
|
10770
10770
|
--field--padding-top: calc(var(--space-base) + var(--space-smaller));
|
|
10771
10771
|
--field--padding-bottom: var(--space-small);
|
|
10772
10772
|
}
|
|
10773
|
-
.
|
|
10773
|
+
.IgE0pfetwVM-.d-YOq6z4ZxM- label {
|
|
10774
10774
|
--field--placeholder-color: var(--color-text-disabled);
|
|
10775
10775
|
}
|
|
10776
|
-
.
|
|
10776
|
+
.MxShJMNKSB4-:not(:-ms-input-placeholder) + .f1OiicY3UzU-:not(:empty) {
|
|
10777
10777
|
font-size: 12px;
|
|
10778
10778
|
font-size: var(--typography--fontSize-small);
|
|
10779
10779
|
}
|
|
@@ -10781,36 +10781,36 @@ html.atlantisLightBoxActive {
|
|
|
10781
10781
|
font-size: 12px;
|
|
10782
10782
|
font-size: var(--typography--fontSize-small);
|
|
10783
10783
|
}
|
|
10784
|
-
.
|
|
10785
|
-
.
|
|
10784
|
+
.MxShJMNKSB4-:not(:placeholder-shown) + .f1OiicY3UzU-:not(:empty),
|
|
10785
|
+
.MxShJMNKSB4-:focus + .f1OiicY3UzU-:not(:empty) {
|
|
10786
10786
|
font-size: 12px;
|
|
10787
10787
|
font-size: var(--typography--fontSize-small);
|
|
10788
10788
|
}
|
|
10789
|
-
.
|
|
10789
|
+
.j9oUhNvNwsE- .MxShJMNKSB4-:not(:-ms-input-placeholder) + .f1OiicY3UzU-:not(:empty) {
|
|
10790
10790
|
visibility: hidden;
|
|
10791
10791
|
}
|
|
10792
10792
|
.hideLabel .input:not(:-ms-input-placeholder) + .label:not(:empty) {
|
|
10793
10793
|
visibility: hidden;
|
|
10794
10794
|
}
|
|
10795
|
-
.
|
|
10796
|
-
.
|
|
10795
|
+
.j9oUhNvNwsE- .MxShJMNKSB4-:not(:placeholder-shown) + .f1OiicY3UzU-:not(:empty),
|
|
10796
|
+
.j9oUhNvNwsE- .MxShJMNKSB4-:focus + .f1OiicY3UzU-:not(:empty) {
|
|
10797
10797
|
visibility: hidden;
|
|
10798
10798
|
}
|
|
10799
10799
|
/* Size small inputs don't show a "miniLabel" */
|
|
10800
|
-
.
|
|
10800
|
+
.IgE0pfetwVM-.YTL0AyJdbC8- .MxShJMNKSB4-:not(:-ms-input-placeholder) + .f1OiicY3UzU-:not(:empty) {
|
|
10801
10801
|
display: none;
|
|
10802
10802
|
}
|
|
10803
10803
|
.inputWrapper.small .input:not(:-ms-input-placeholder) + .label:not(:empty) {
|
|
10804
10804
|
display: none;
|
|
10805
10805
|
}
|
|
10806
|
-
.
|
|
10807
|
-
.
|
|
10806
|
+
.IgE0pfetwVM-.YTL0AyJdbC8- .MxShJMNKSB4-:not(:placeholder-shown) + .f1OiicY3UzU-:not(:empty),
|
|
10807
|
+
.IgE0pfetwVM-.YTL0AyJdbC8- .MxShJMNKSB4-:focus + .f1OiicY3UzU-:not(:empty) {
|
|
10808
10808
|
display: none;
|
|
10809
10809
|
}
|
|
10810
10810
|
/* Size Large inputs adjust top padding on minilabel */
|
|
10811
|
-
.
|
|
10812
|
-
.
|
|
10813
|
-
+ .
|
|
10811
|
+
.IgE0pfetwVM-.mUfanIovnVg-:not(.j9oUhNvNwsE-)
|
|
10812
|
+
.MxShJMNKSB4-:not(:-ms-input-placeholder)
|
|
10813
|
+
+ .f1OiicY3UzU-:not(:empty) {
|
|
10814
10814
|
--field--padding-top: calc(var(--space-large) + var(--space-smaller));
|
|
10815
10815
|
}
|
|
10816
10816
|
.inputWrapper.large:not(.hideLabel)
|
|
@@ -10818,13 +10818,13 @@ html.atlantisLightBoxActive {
|
|
|
10818
10818
|
+ .label:not(:empty) {
|
|
10819
10819
|
--field--padding-top: calc(var(--space-large) + var(--space-smaller));
|
|
10820
10820
|
}
|
|
10821
|
-
.
|
|
10822
|
-
.
|
|
10823
|
-
+ .
|
|
10824
|
-
.
|
|
10821
|
+
.IgE0pfetwVM-.mUfanIovnVg-:not(.j9oUhNvNwsE-)
|
|
10822
|
+
.MxShJMNKSB4-:not(:placeholder-shown)
|
|
10823
|
+
+ .f1OiicY3UzU-:not(:empty),
|
|
10824
|
+
.IgE0pfetwVM-.mUfanIovnVg-:not(.j9oUhNvNwsE-) .MxShJMNKSB4-:focus + .f1OiicY3UzU-:not(:empty) {
|
|
10825
10825
|
--field--padding-top: calc(var(--space-large) + var(--space-smaller));
|
|
10826
10826
|
}
|
|
10827
|
-
.
|
|
10827
|
+
.IgE0pfetwVM-.mUfanIovnVg- .MxShJMNKSB4-:not(:-ms-input-placeholder) + .f1OiicY3UzU-:not(:empty) .f1OiicY3UzU- {
|
|
10828
10828
|
padding-top: 8px;
|
|
10829
10829
|
padding-top: var(--space-small);
|
|
10830
10830
|
}
|
|
@@ -10832,8 +10832,8 @@ html.atlantisLightBoxActive {
|
|
|
10832
10832
|
padding-top: 8px;
|
|
10833
10833
|
padding-top: var(--space-small);
|
|
10834
10834
|
}
|
|
10835
|
-
.
|
|
10836
|
-
.
|
|
10835
|
+
.IgE0pfetwVM-.mUfanIovnVg- .MxShJMNKSB4-:not(:placeholder-shown) + .f1OiicY3UzU-:not(:empty) .f1OiicY3UzU-,
|
|
10836
|
+
.IgE0pfetwVM-.mUfanIovnVg- .MxShJMNKSB4-:focus + .f1OiicY3UzU-:not(:empty) .f1OiicY3UzU- {
|
|
10837
10837
|
padding-top: 8px;
|
|
10838
10838
|
padding-top: var(--space-small);
|
|
10839
10839
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -210,11 +210,6 @@
|
|
|
210
210
|
"import": "./dist/FormatRelativeDateTime/index.mjs",
|
|
211
211
|
"require": "./dist/FormatRelativeDateTime/index.cjs"
|
|
212
212
|
},
|
|
213
|
-
"./FormatTime": {
|
|
214
|
-
"types": "./dist/FormatTime/index.d.ts",
|
|
215
|
-
"import": "./dist/FormatTime/index.mjs",
|
|
216
|
-
"require": "./dist/FormatTime/index.cjs"
|
|
217
|
-
},
|
|
218
213
|
"./Frame": {
|
|
219
214
|
"types": "./dist/Frame/index.d.ts",
|
|
220
215
|
"import": "./dist/Frame/index.mjs",
|
|
@@ -568,5 +563,5 @@
|
|
|
568
563
|
"> 1%",
|
|
569
564
|
"IE 10"
|
|
570
565
|
],
|
|
571
|
-
"gitHead": "
|
|
566
|
+
"gitHead": "95eed3cf18c0348874ee50b17bd3d927f392242d"
|
|
572
567
|
}
|
package/FormatTime.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./dist/FormatTime";
|
package/FormatTime.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true,
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
var FormatTime = require("./dist/FormatTime");
|
|
8
|
-
|
|
9
|
-
Object.keys(FormatTime).forEach(function(key) {
|
|
10
|
-
if (key === "default" || key === "__esModule") return;
|
|
11
|
-
Object.defineProperty(exports, key, {
|
|
12
|
-
enumerable: true,
|
|
13
|
-
get: function get() {
|
|
14
|
-
return FormatTime[key];
|
|
15
|
-
},
|
|
16
|
-
});
|
|
17
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
interface FormatTimeProps {
|
|
3
|
-
/**
|
|
4
|
-
* Time (as JS Date) to be displayed.
|
|
5
|
-
*
|
|
6
|
-
* A `string` should be an ISO 8601 format date string.
|
|
7
|
-
*/
|
|
8
|
-
readonly time: Date | string;
|
|
9
|
-
/**
|
|
10
|
-
* Optionally specify clock format. If `undefined` system format will be respected.
|
|
11
|
-
*/
|
|
12
|
-
readonly use24HourClock?: boolean;
|
|
13
|
-
}
|
|
14
|
-
export declare function FormatTime({ time: inputTime, use24HourClock, }: FormatTimeProps): React.JSX.Element;
|
|
15
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { FormatTime } from "./FormatTime";
|
package/dist/FormatTime-cjs.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var React = require('react');
|
|
4
|
-
|
|
5
|
-
function FormatTime({ time: inputTime, use24HourClock, }) {
|
|
6
|
-
let dateObject;
|
|
7
|
-
if (inputTime instanceof Date) {
|
|
8
|
-
dateObject = inputTime;
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
dateObject = new Date(inputTime);
|
|
12
|
-
}
|
|
13
|
-
return React.createElement(React.Fragment, null, dateToLocaleTimeString(dateObject, use24HourClock));
|
|
14
|
-
}
|
|
15
|
-
function dateToLocaleTimeString(date, use24HourClock) {
|
|
16
|
-
const language = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) ? navigator.language : "en";
|
|
17
|
-
return date.toLocaleTimeString(language, {
|
|
18
|
-
hourCycle: use24HourClock ? "h23" : "h12",
|
|
19
|
-
minute: "2-digit",
|
|
20
|
-
hour: "numeric",
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
exports.FormatTime = FormatTime;
|
package/dist/FormatTime-es.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
|
-
|
|
3
|
-
function FormatTime({ time: inputTime, use24HourClock, }) {
|
|
4
|
-
let dateObject;
|
|
5
|
-
if (inputTime instanceof Date) {
|
|
6
|
-
dateObject = inputTime;
|
|
7
|
-
}
|
|
8
|
-
else {
|
|
9
|
-
dateObject = new Date(inputTime);
|
|
10
|
-
}
|
|
11
|
-
return React__default.createElement(React__default.Fragment, null, dateToLocaleTimeString(dateObject, use24HourClock));
|
|
12
|
-
}
|
|
13
|
-
function dateToLocaleTimeString(date, use24HourClock) {
|
|
14
|
-
const language = (globalThis === null || globalThis === void 0 ? void 0 : globalThis.navigator) ? navigator.language : "en";
|
|
15
|
-
return date.toLocaleTimeString(language, {
|
|
16
|
-
hourCycle: use24HourClock ? "h23" : "h12",
|
|
17
|
-
minute: "2-digit",
|
|
18
|
-
hour: "numeric",
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export { FormatTime as F };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import type { InputNumberRebuiltProps } from "./InputNumber.rebuilt.types";
|
|
3
|
-
export interface InputNumberRebuiltRef {
|
|
4
|
-
blur(): void;
|
|
5
|
-
focus(): void;
|
|
6
|
-
}
|
|
7
|
-
export declare const InputNumberRebuilt: React.ForwardRefExoticComponent<InputNumberRebuiltProps & React.RefAttributes<InputNumberRebuiltRef>>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
# FormatTime
|
|
2
|
-
|
|
3
|
-
In Jobber a FormatTime is used to ensure that time is displayed in the expected
|
|
4
|
-
format. No text styling is applied, this simply formats the text.
|
|
5
|
-
|
|
6
|
-
## Specify format
|
|
7
|
-
|
|
8
|
-
You can select a specific format to use in FormatTime.
|
|
9
|
-
|
|
10
|
-
In the following example, we create a new `Date` object and set its time to
|
|
11
|
-
22:35:00 (10:35 PM) using the `setHours` method. The `setHours` method sets the
|
|
12
|
-
hours, minutes, seconds, and milliseconds for a specified date.
|
|
13
|
-
|
|
14
|
-
```tsx
|
|
15
|
-
const newDate = new Date();
|
|
16
|
-
newDate.setHours(22, 35, 0, 0);
|
|
17
|
-
|
|
18
|
-
<FormatTime time={newDate} use24HourClock={true} /> // prints 22:35
|
|
19
|
-
|
|
20
|
-
<FormatTime time={newDate} use24HourClock={false} /> // prints 10:35 PM
|
|
21
|
-
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
## Props
|
|
26
|
-
|
|
27
|
-
### Web
|
|
28
|
-
|
|
29
|
-
| Prop | Type | Required | Default | Description |
|
|
30
|
-
|------|------|----------|---------|-------------|
|
|
31
|
-
| `time` | `Date | string` | Yes | — | Time (as JS Date) to be displayed. A `string` should be an ISO 8601 format date string. |
|
|
32
|
-
| `use24HourClock` | `boolean` | No | — | Optionally specify clock format. If `undefined` system format will be respected. |
|